<?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: Question reg. 'replace' in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/question-reg-replace/m-p/1691440#M303737</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;If you know the message ID and number..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use the function module MESSAGE_PREPARE with the parameters MSGID, MSGNO, MSGV1 , MSGV2 , MSGV3, MSGV4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will also check your code..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 06 Nov 2006 22:03:12 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-11-06T22:03:12Z</dc:date>
    <item>
      <title>Question reg. 'replace'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/question-reg-replace/m-p/1691439#M303736</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have an internal table with a record with fields:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Text: Change delivery &amp;amp;1 , customer &amp;amp;2 (of type char 73)&lt;/P&gt;&lt;P&gt;msgv1: 5678 (of char 50)&lt;/P&gt;&lt;P&gt;msgv2: 457890 (of char 50)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I want to replace &amp;amp;1 with msgv1 and &amp;amp;2 with msgv2 values. I tried the following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     LOOP AT itab.&lt;/P&gt;&lt;P&gt;       IF itab-msgv1 NE space.&lt;/P&gt;&lt;P&gt;         REPLACE '&amp;amp;1' WITH itab-msgv1 INTO itab-text.&lt;/P&gt;&lt;P&gt;         CONDENSE itab-text.&lt;/P&gt;&lt;P&gt;         MODIFY itab.&lt;/P&gt;&lt;P&gt;       ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       IF itab-msgv2 NE space.&lt;/P&gt;&lt;P&gt;         REPLACE '&amp;amp;2' WITH itab-msgv2 INTO itab-text.&lt;/P&gt;&lt;P&gt;         CONDENSE itab-text.&lt;/P&gt;&lt;P&gt;         MODIFY itab.&lt;/P&gt;&lt;P&gt;       ENDIF.&lt;/P&gt;&lt;P&gt;      endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now when I set breakpoint and see after the loop, that record in itab-text contains value:&lt;/P&gt;&lt;P&gt;Change delivery 5678&lt;/P&gt;&lt;P&gt;(where as I could nt find any replacement for customer &amp;amp;2 and not even the original text customer &amp;amp;2). Am I doing anything wrong?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please suggest/correct the code here reg. correct complete replacements?&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Nov 2006 21:57:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/question-reg-replace/m-p/1691439#M303736</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-06T21:57:21Z</dc:date>
    </item>
    <item>
      <title>Re: Question reg. 'replace'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/question-reg-replace/m-p/1691440#M303737</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;If you know the message ID and number..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use the function module MESSAGE_PREPARE with the parameters MSGID, MSGNO, MSGV1 , MSGV2 , MSGV3, MSGV4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will also check your code..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Nov 2006 22:03:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/question-reg-replace/m-p/1691440#M303737</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-06T22:03:12Z</dc:date>
    </item>
    <item>
      <title>Re: Question reg. 'replace'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/question-reg-replace/m-p/1691441#M303738</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;Try to condense the field itab-msgv1, itab-msgv2 before doing the concatenate..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT itab.&lt;/P&gt;&lt;P&gt;IF itab-msgv1 NE space.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;CONDENSE itab-msgv1.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;REPLACE '&amp;amp;1' WITH itab-msgv1 INTO itab-text.&lt;/P&gt;&lt;P&gt;CONDENSE itab-text.&lt;/P&gt;&lt;P&gt;MODIFY itab.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF itab-msgv2 NE space.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;CONDENSE itab-msgv2.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;REPLACE '&amp;amp;2' WITH itab-msgv2 INTO itab-text.&lt;/P&gt;&lt;P&gt;CONDENSE itab-text.&lt;/P&gt;&lt;P&gt;MODIFY itab.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Nov 2006 22:05:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/question-reg-replace/m-p/1691441#M303738</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-06T22:05:33Z</dc:date>
    </item>
  </channel>
</rss>

