<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: String templates in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-templates/m-p/10594523#M1861387</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Erm... isn't that the point? Use | | for non-translatable literals and '' for translatable?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 10 Sep 2014 12:12:01 GMT</pubDate>
    <dc:creator>matt</dc:creator>
    <dc:date>2014-09-10T12:12:01Z</dc:date>
    <item>
      <title>String templates</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-templates/m-p/10594515#M1861379</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I just played around with the string tempülates now available in one of our updated systems. So i tried&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; type_descr &lt;SPAN class="L0S55"&gt;= cl_abap_typedescr&lt;SPAN class="L0S70"&gt;=&amp;gt;&lt;/SPAN&gt;describe_by_data&lt;SPAN class="L0S55"&gt;( &lt;/SPAN&gt;s &lt;SPAN class="L0S55"&gt;)&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; &lt;SPAN class="L0S52"&gt;CASE &lt;/SPAN&gt;type_descr&lt;SPAN class="L0S70"&gt;-&amp;gt;&lt;/SPAN&gt;type_kind&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;WHEN &lt;/SPAN&gt;cl_abap_typedescr&lt;SPAN class="L0S70"&gt;=&amp;gt;&lt;/SPAN&gt;typekind_time&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; r &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;|{ s &lt;SPAN class="L0S52"&gt;time &lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;user }|&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;&lt;SPAN class="L0S55"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;&lt;SPAN class="L0S55"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;&lt;SPAN class="L0S55"&gt;Where s is an importing parameter of a method having type CLIKE&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;&lt;SPAN class="L0S55"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;&lt;SPAN class="L0S55"&gt;but i got the error "Format directive TIME cannot be used on the embedded expression".&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;&lt;SPAN class="L0S55"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;&lt;SPAN class="L0S55"&gt;Inserting a helping variable&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;&lt;SPAN class="L0S55"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;&lt;SPAN class="L0S55"&gt;ltime type t&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;&lt;SPAN class="L0S55"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;&lt;SPAN class="L0S55"&gt;and&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;&lt;SPAN class="L0S55"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;&lt;SPAN class="L0S55"&gt;ltime=s;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;&lt;SPAN class="L0S55"&gt;r &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;|{ ltime &lt;SPAN class="L0S52"&gt;time &lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;user }|&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;&lt;SPAN class="L0S55"&gt;&lt;SPAN class="L0S55"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;&lt;SPAN class="L0S55"&gt;&lt;SPAN class="L0S55"&gt;solves this, but thats exactly what i want to avoid: a helping variable just for type casting&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;&lt;SPAN class="L0S55"&gt;&lt;SPAN class="L0S55"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;&lt;SPAN class="L0S55"&gt;&lt;SPAN class="L0S55"&gt;Is there no way to solve this without a helping variable?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;&lt;SPAN class="L0S55"&gt;&lt;SPAN class="L0S55"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;&lt;SPAN class="L0S55"&gt;&lt;SPAN class="L0S55"&gt;Please don't give hints to use concatenate or write into, i know these and i know how to use this. My intention is to get experience with string templates.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;&lt;SPAN class="L0S55"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Sep 2014 07:13:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-templates/m-p/10594515#M1861379</guid>
      <dc:creator>rainer_hbenthal</dc:creator>
      <dc:date>2014-09-10T07:13:18Z</dc:date>
    </item>
    <item>
      <title>Re: String templates</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-templates/m-p/10594516#M1861380</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Quote from F1 help:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
&lt;P&gt;This formatting option defines the format of a time. You can declare the option &lt;SPAN class="qtext"&gt;TIME&lt;/SPAN&gt; &lt;STRONG&gt;only if the embedded expression has the data type &lt;SPAN class="qtext"&gt;t&lt;/SPAN&gt;. &lt;/STRONG&gt;&lt;/P&gt;
&lt;P style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&lt;SPAN class="L0S55"&gt;&lt;SPAN class="L0S55"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt; &lt;/P&gt;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;So you can not use it without putting type t there &lt;SPAN __jive_emoticon_name="sad" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.sap.com/1024/images/emoticons/sad.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe it could be done with inline data/variable declaration. But i can't try it, since its not available in my ABAP version...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Sep 2014 07:55:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-templates/m-p/10594516#M1861380</guid>
      <dc:creator>Tomas_Buryanek</dc:creator>
      <dc:date>2014-09-10T07:55:56Z</dc:date>
    </item>
    <item>
      <title>Re: String templates</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-templates/m-p/10594517#M1861381</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Beat me to it - this first example works, the second has Rainer's error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;DATA: &lt;/SPAN&gt;s &lt;SPAN class="L0S52"&gt;Type &lt;/SPAN&gt;syuzeit.&lt;/P&gt;&lt;P&gt;&amp;nbsp; s &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;sy&lt;SPAN class="L0S70"&gt;-&lt;/SPAN&gt;uzeit.&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;DATA &lt;/SPAN&gt;st &lt;SPAN class="L0S52"&gt;TYPE &lt;/SPAN&gt;string.&lt;/P&gt;&lt;P&gt;&amp;nbsp; st &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;|{ s &lt;SPAN class="L0S52"&gt;TIME &lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;USER }|.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333339691162px;"&gt;&lt;SPAN class="L0S52"&gt;DATA: &lt;/SPAN&gt;s &lt;SPAN class="L0S52"&gt;Type &lt;/SPAN&gt;c length 10.&lt;/P&gt;&lt;P style="font-size: 13.3333339691162px;"&gt;&amp;nbsp; s &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;sy&lt;SPAN class="L0S70"&gt;-&lt;/SPAN&gt;uzeit.&lt;/P&gt;&lt;P style="font-size: 13.3333339691162px;"&gt;&lt;SPAN class="L0S52"&gt;DATA &lt;/SPAN&gt;st &lt;SPAN class="L0S52"&gt;TYPE &lt;/SPAN&gt;string.&lt;/P&gt;&lt;P style="font-size: 13.3333339691162px;"&gt;&amp;nbsp; st &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;|{ s &lt;SPAN class="L0S52"&gt;TIME &lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;USER }|.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Sep 2014 08:11:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-templates/m-p/10594517#M1861381</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2014-09-10T08:11:28Z</dc:date>
    </item>
    <item>
      <title>Re: String templates</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-templates/m-p/10594518#M1861382</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Embarrassing that i've read the online help &lt;SPAN __jive_emoticon_name="blush" __jive_macro_name="emoticon" class="jive_macro_emoticon jive_macro jive_emote" src="https://community.sap.com/1024/images/emoticons/blush.gif"&gt;&lt;/SPAN&gt; but it doesnt made click in my head ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And of course date = user has the same restriction. This type casting with dummy variables really drives me nuts, yesterday i had a method importing character length 15 and i had a string &lt;SPAN __jive_emoticon_name="angry" __jive_macro_name="emoticon" class="jive_macro_emoticon jive_macro jive_emote" src="https://community.sap.com/1024/images/emoticons/angry.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Sep 2014 08:14:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-templates/m-p/10594518#M1861382</guid>
      <dc:creator>rainer_hbenthal</dc:creator>
      <dc:date>2014-09-10T08:14:06Z</dc:date>
    </item>
    <item>
      <title>Re: String templates</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-templates/m-p/10594519#M1861383</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Matthew,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;found something around this here&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A __default_attr="85780" __jive_macro_name="blogpost" class="jive_macro jive_macro_blogpost" data-orig-content="ABAP News for Release 7.40 - Inline Declarations" href="https://community.sap.com/" modifiedtitle="true" title="ABAP News for Release 7.40 - Inline Declarations"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but... not available here...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Sep 2014 08:23:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-templates/m-p/10594519#M1861383</guid>
      <dc:creator>rainer_hbenthal</dc:creator>
      <dc:date>2014-09-10T08:23:39Z</dc:date>
    </item>
    <item>
      <title>Re: String templates</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-templates/m-p/10594520#M1861384</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm currently developing with them. Used with care they do make code more readable. The downside is that you lose the navigation by double click on the type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;DATA(s) &lt;SPAN class="L0S55" style="font-weight: inherit; font-style: inherit; font-family: inherit; background: transparent;"&gt;= &lt;/SPAN&gt;sy&lt;SPAN class="L0S70" style="font-weight: inherit; font-style: inherit; font-family: inherit; background: transparent;"&gt;-&lt;/SPAN&gt;uzeit.&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;&lt;SPAN class="L0S52" style="font-weight: inherit; font-style: inherit; font-family: inherit; background: transparent;"&gt;DATA(&lt;/SPAN&gt;st) &lt;SPAN class="L0S55" style="font-family: inherit; font-weight: inherit; font-style: inherit; background: transparent;"&gt;= &lt;/SPAN&gt;|{ s &lt;SPAN class="L0S52" style="font-family: inherit; font-weight: inherit; font-style: inherit; background: transparent;"&gt;TIME &lt;/SPAN&gt;&lt;SPAN class="L0S55" style="font-family: inherit; font-weight: inherit; font-style: inherit; background: transparent;"&gt;= &lt;/SPAN&gt;USER }|.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Sep 2014 09:27:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-templates/m-p/10594520#M1861384</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2014-09-10T09:27:47Z</dc:date>
    </item>
    <item>
      <title>Re: String templates</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-templates/m-p/10594521#M1861385</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm more referring to the CONV() type cast function, also mentioned in the discussion below the blog, that would really help avoiding those temporary helping variables&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Sep 2014 10:35:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-templates/m-p/10594521#M1861385</guid>
      <dc:creator>rainer_hbenthal</dc:creator>
      <dc:date>2014-09-10T10:35:12Z</dc:date>
    </item>
    <item>
      <title>Re: String templates</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-templates/m-p/10594522#M1861386</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Another downside is that they cannot be made translateable as easily as character literals (--&amp;gt; text elements). &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Sep 2014 10:59:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-templates/m-p/10594522#M1861386</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-09-10T10:59:03Z</dc:date>
    </item>
    <item>
      <title>Re: String templates</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-templates/m-p/10594523#M1861387</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Erm... isn't that the point? Use | | for non-translatable literals and '' for translatable?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Sep 2014 12:12:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-templates/m-p/10594523#M1861387</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2014-09-10T12:12:01Z</dc:date>
    </item>
    <item>
      <title>Re: String templates</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-templates/m-p/10594524#M1861388</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yup. Wait untill you see the first MESSAGE |You can't do { lv_action } with { lv_object }.| TYPE 'E'. Lesson learned: There's always someone who will miss the point...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Sep 2014 13:42:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-templates/m-p/10594524#M1861388</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-09-10T13:42:29Z</dc:date>
    </item>
    <item>
      <title>Re: String templates</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-templates/m-p/10594525#M1861389</link>
      <description>&lt;P&gt;Try conv time( s ).&lt;/P&gt;</description>
      <pubDate>Sun, 25 Oct 2020 23:00:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-templates/m-p/10594525#M1861389</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2020-10-25T23:00:45Z</dc:date>
    </item>
  </channel>
</rss>

