<?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: Dynamically adding text in Text Element. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-adding-text-in-text-element/m-p/12086272#M1971397</link>
    <description>&lt;P&gt;Follow the recommendation of Arthur &amp;amp; use the message class.&lt;/P&gt;&lt;P&gt;Otherwise, create 2 texts and do a   lv_result = text-001 &amp;amp;&amp;amp; lv_value &amp;amp;&amp;amp; text-002. &lt;/P&gt;</description>
    <pubDate>Wed, 07 Aug 2019 13:09:24 GMT</pubDate>
    <dc:creator>FredericGirod</dc:creator>
    <dc:date>2019-08-07T13:09:24Z</dc:date>
    <item>
      <title>Dynamically adding text in Text Element.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-adding-text-in-text-element/m-p/12086267#M1971392</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;
  &lt;P&gt;I have very simple requirement, where I need to print a text in output using text element.&lt;/P&gt;
  &lt;P&gt;I created a text Element like &lt;/P&gt;
  &lt;P&gt;001 Text1 &amp;amp;1 Text2.&lt;/P&gt;
  &lt;P&gt;In the program I am using this text element inside a loop. When I try to use "WITH", it is resulting error.&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;loop .....&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;Write:/ text-001 with lv_var1.&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;Endloop&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;Kindly guide me to resolve this.&lt;/P&gt;
  &lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 07 Aug 2019 11:53:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-adding-text-in-text-element/m-p/12086267#M1971392</guid>
      <dc:creator>karthick1608</dc:creator>
      <dc:date>2019-08-07T11:53:26Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically adding text in Text Element.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-adding-text-in-text-element/m-p/12086268#M1971393</link>
      <description>&lt;P&gt;The "WITH" option only works if your using a message class and are giving messages.&lt;/P&gt;&lt;P&gt;For what you want to do I would place text-001 in a different variabel and then use REPLACE to change &amp;amp;1 with your other variable.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Aug 2019 12:13:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-adding-text-in-text-element/m-p/12086268#M1971393</guid>
      <dc:creator>ArthurParisius</dc:creator>
      <dc:date>2019-08-07T12:13:07Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically adding text in Text Element.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-adding-text-in-text-element/m-p/12086269#M1971394</link>
      <description>&lt;P&gt;Hi Karthick,&lt;/P&gt;&lt;P&gt;if you want to print the value of text-001 and lv_var1 together then you can write -  &lt;/P&gt;&lt;P&gt;lv_var = text-001 &amp;amp;&amp;amp; lv_var1.&lt;/P&gt;&lt;P&gt;then print using write statement.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Aug 2019 12:28:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-adding-text-in-text-element/m-p/12086269#M1971394</guid>
      <dc:creator>former_member199306</dc:creator>
      <dc:date>2019-08-07T12:28:18Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically adding text in Text Element.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-adding-text-in-text-element/m-p/12086270#M1971395</link>
      <description>&lt;P&gt;Thanks for your reply!&lt;/P&gt;&lt;P&gt;I am new to ABAP, I know that we cannot use "WITH" in write statement.&lt;/P&gt;&lt;P&gt;For understanding purpose only I used like that. &lt;/P&gt;&lt;P&gt;Your idea is good and it will work, is there any other way without creating temporary variable, in your case?&lt;/P&gt;&lt;P&gt;Thanks again!!&lt;/P&gt;</description>
      <pubDate>Wed, 07 Aug 2019 13:03:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-adding-text-in-text-element/m-p/12086270#M1971395</guid>
      <dc:creator>karthick1608</dc:creator>
      <dc:date>2019-08-07T13:03:46Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically adding text in Text Element.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-adding-text-in-text-element/m-p/12086271#M1971396</link>
      <description>&lt;P&gt;Hi Bhupendra, &lt;/P&gt;&lt;P&gt;Thanks for your response.&lt;/P&gt;&lt;P&gt;I am using dynamic variable in between the text symbol. &lt;/P&gt;&lt;P&gt;So, your idea wont work in my case.&lt;/P&gt;&lt;P&gt;Suggest if you have any other idea.&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Wed, 07 Aug 2019 13:05:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-adding-text-in-text-element/m-p/12086271#M1971396</guid>
      <dc:creator>karthick1608</dc:creator>
      <dc:date>2019-08-07T13:05:12Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically adding text in Text Element.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-adding-text-in-text-element/m-p/12086272#M1971397</link>
      <description>&lt;P&gt;Follow the recommendation of Arthur &amp;amp; use the message class.&lt;/P&gt;&lt;P&gt;Otherwise, create 2 texts and do a   lv_result = text-001 &amp;amp;&amp;amp; lv_value &amp;amp;&amp;amp; text-002. &lt;/P&gt;</description>
      <pubDate>Wed, 07 Aug 2019 13:09:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-adding-text-in-text-element/m-p/12086272#M1971397</guid>
      <dc:creator>FredericGirod</dc:creator>
      <dc:date>2019-08-07T13:09:24Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically adding text in Text Element.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-adding-text-in-text-element/m-p/12086273#M1971398</link>
      <description>&lt;P&gt;From the top of my head I would say split your text element in to 2 different elements. You could then use &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;write:/ text-001, lv_var1, text-002.&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 07 Aug 2019 13:09:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-adding-text-in-text-element/m-p/12086273#M1971398</guid>
      <dc:creator>ArthurParisius</dc:creator>
      <dc:date>2019-08-07T13:09:30Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically adding text in Text Element.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-adding-text-in-text-element/m-p/12086274#M1971399</link>
      <description>&lt;P&gt;I recommend to avoid splitting the string into multiple text elements. This can cause problems during translation, as the variable position may differ in various languages. Either use a message class or the REPLACE statement.&lt;/P&gt;&lt;P&gt;Whenever I cannot use message classes for any reason I do something like this to emulate the behavior&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;message = message_with_symbols.&lt;BR /&gt;
REPLACE FIRST OCCURRENCE OF '&amp;amp;' IN message WITH variable1.
REPLACE FIRST OCCURRENCE OF '&amp;amp;' IN message WITH variable2.&lt;BR /&gt;...&lt;BR /&gt;&lt;BR /&gt;REPLACE ALL OCCURRENCES OF '&amp;amp;1' IN message WITH variable1.&lt;BR /&gt;REPLACE ALL OCCURRENCES OF '&amp;amp;2' IN message WITH variable2.&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 07 Aug 2019 13:44:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-adding-text-in-text-element/m-p/12086274#M1971399</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2019-08-07T13:44:25Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically adding text in Text Element.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-adding-text-in-text-element/m-p/12086275#M1971400</link>
      <description>&lt;P&gt; @&lt;A href="https://answers.sap.com/users/4022/gabmarian.html"&gt;Gábor Márián &lt;/A&gt;&lt;/P&gt;&lt;P&gt;The only reason I suggested splitting was because he asked for a way to try and realize it without a temporary variable. Personally I would go with the temporary variable and the replace option, and the reason would most likely be to prevent issues with translations like you indicated.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Aug 2019 13:51:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-adding-text-in-text-element/m-p/12086275#M1971400</guid>
      <dc:creator>ArthurParisius</dc:creator>
      <dc:date>2019-08-07T13:51:09Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically adding text in Text Element.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-adding-text-in-text-element/m-p/12086276#M1971401</link>
      <description>&lt;P&gt;  &lt;SPAN class="mention-scrubbed"&gt;aparisius&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;My intention was to emphasize that a temp variable today is better than a translation issue tomorrow &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Aug 2019 14:17:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-adding-text-in-text-element/m-p/12086276#M1971401</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2019-08-07T14:17:55Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically adding text in Text Element.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-adding-text-in-text-element/m-p/12086277#M1971402</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Either use a Message class text or Replace as has been explained bellow.&lt;/P&gt;&lt;P&gt;Data : l_text type string.&lt;/P&gt;&lt;P&gt;l_text = TEXT-I01.&lt;/P&gt;&lt;P&gt;REPLACE '&amp;amp;1' WITH v_inr INTO l_text .&lt;/P&gt;&lt;P&gt;REPLACE '&amp;amp;2' WITH y_tbr INTO l_text.&lt;/P&gt;&lt;P&gt;CONDENSE l_text.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Aug 2019 14:32:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-adding-text-in-text-element/m-p/12086277#M1971402</guid>
      <dc:creator>Nawanandana</dc:creator>
      <dc:date>2019-08-07T14:32:43Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically adding text in Text Element.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-adding-text-in-text-element/m-p/12086278#M1971403</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;DATA(message) = replace( val = 'Hello &amp;amp;1 how are you doing?'(001) sub = '&amp;amp;1' with = 'Angela' ).&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 07 Aug 2019 14:56:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-adding-text-in-text-element/m-p/12086278#M1971403</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2019-08-07T14:56:13Z</dc:date>
    </item>
  </channel>
</rss>

