<?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 Replace a variable in a string by an internal table field value in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/replace-a-variable-in-a-string-by-an-internal-table-field-value/m-p/4539050#M1072371</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   I have a internal table with a field message of length 1500.&lt;/P&gt;&lt;P&gt;I have to replace &amp;amp;1 and &amp;amp;2 in the message field with the value of year and Amount. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   For example:&lt;/P&gt;&lt;P&gt;ITAB-Message - 'The letter is for the year &amp;amp;1 and the total amount to be payed is &amp;amp;2'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this, &amp;amp;1 should be replace with the year value.&lt;/P&gt;&lt;P&gt;and &amp;amp;2 by amount value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you help me in this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vimala&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 28 Sep 2008 06:06:37 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-09-28T06:06:37Z</dc:date>
    <item>
      <title>Replace a variable in a string by an internal table field value</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replace-a-variable-in-a-string-by-an-internal-table-field-value/m-p/4539050#M1072371</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   I have a internal table with a field message of length 1500.&lt;/P&gt;&lt;P&gt;I have to replace &amp;amp;1 and &amp;amp;2 in the message field with the value of year and Amount. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   For example:&lt;/P&gt;&lt;P&gt;ITAB-Message - 'The letter is for the year &amp;amp;1 and the total amount to be payed is &amp;amp;2'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this, &amp;amp;1 should be replace with the year value.&lt;/P&gt;&lt;P&gt;and &amp;amp;2 by amount value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you help me in this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vimala&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 28 Sep 2008 06:06:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replace-a-variable-in-a-string-by-an-internal-table-field-value/m-p/4539050#M1072371</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-28T06:06:37Z</dc:date>
    </item>
    <item>
      <title>Re: Replace a variable in a string by an internal table field value</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replace-a-variable-in-a-string-by-an-internal-table-field-value/m-p/4539051#M1072372</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;


REPORT ZPROG .


data: begin of itab,
      msg(255) type c,
      end of itab.

data: itab1 like itab occurs 0 with header line.

data: year(4) type n value '1995',
      amount(4) type n value '4000'.


itab1-msg = 'The letter is for year &amp;amp;1 and total amount to payed is &amp;amp;2'
.

replace '&amp;amp;1' with year into itab1-msg.

replace '&amp;amp;2' with amount into itab1-msg.


write:/ itab1-msg.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 28 Sep 2008 06:48:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replace-a-variable-in-a-string-by-an-internal-table-field-value/m-p/4539051#M1072372</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-28T06:48:00Z</dc:date>
    </item>
  </channel>
</rss>

