<?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 concatenate 3 fields in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/concatenate-3-fields/m-p/5311242#M1224498</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 one work area lwa_messtab whose fild values are as below.&lt;/P&gt;&lt;P&gt;Field name      Field value&lt;/P&gt;&lt;P&gt;Tcode              CJ02&lt;/P&gt;&lt;P&gt;DYNAME         SAPLKACB&lt;/P&gt;&lt;P&gt;DYNUMB         0002&lt;/P&gt;&lt;P&gt;MSGTYP         E&lt;/P&gt;&lt;P&gt;MSGSPRA      E&lt;/P&gt;&lt;P&gt;MSGID            KM&lt;/P&gt;&lt;P&gt;MSGNR          183&lt;/P&gt;&lt;P&gt;MSGV1           31730100&lt;/P&gt;&lt;P&gt;MSGV2           8001&lt;/P&gt;&lt;P&gt;MSGV3&lt;/P&gt;&lt;P&gt;MSGV4&lt;/P&gt;&lt;P&gt;ENV                CTU&lt;/P&gt;&lt;P&gt;FLDNAME       COBL-PRCTR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Catch Error Message in Record&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      SELECT SINGLE text FROM t100 INTO lwa_report-message&lt;/P&gt;&lt;P&gt;     WHERE sprsl = sy-langu&lt;/P&gt;&lt;P&gt;    AND arbgb = lwa_messtab-msgid&lt;/P&gt;&lt;P&gt;         AND msgnr = lwa_messtab-msgnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, lwa_report-message =  "No postings can be made to profit center &amp;amp;1 in company code &amp;amp;2"&lt;/P&gt;&lt;P&gt;I want to put &amp;amp;1 place MSGV1 = 31730100 and &amp;amp;2 place MSGV2 = 8001.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The output should be as below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     &lt;STRONG&gt;No postings can be made to profit center 31730100 in company code 8001&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Deepthi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Mar 2009 07:18:30 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-03-18T07:18:30Z</dc:date>
    <item>
      <title>concatenate 3 fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/concatenate-3-fields/m-p/5311242#M1224498</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 one work area lwa_messtab whose fild values are as below.&lt;/P&gt;&lt;P&gt;Field name      Field value&lt;/P&gt;&lt;P&gt;Tcode              CJ02&lt;/P&gt;&lt;P&gt;DYNAME         SAPLKACB&lt;/P&gt;&lt;P&gt;DYNUMB         0002&lt;/P&gt;&lt;P&gt;MSGTYP         E&lt;/P&gt;&lt;P&gt;MSGSPRA      E&lt;/P&gt;&lt;P&gt;MSGID            KM&lt;/P&gt;&lt;P&gt;MSGNR          183&lt;/P&gt;&lt;P&gt;MSGV1           31730100&lt;/P&gt;&lt;P&gt;MSGV2           8001&lt;/P&gt;&lt;P&gt;MSGV3&lt;/P&gt;&lt;P&gt;MSGV4&lt;/P&gt;&lt;P&gt;ENV                CTU&lt;/P&gt;&lt;P&gt;FLDNAME       COBL-PRCTR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Catch Error Message in Record&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      SELECT SINGLE text FROM t100 INTO lwa_report-message&lt;/P&gt;&lt;P&gt;     WHERE sprsl = sy-langu&lt;/P&gt;&lt;P&gt;    AND arbgb = lwa_messtab-msgid&lt;/P&gt;&lt;P&gt;         AND msgnr = lwa_messtab-msgnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, lwa_report-message =  "No postings can be made to profit center &amp;amp;1 in company code &amp;amp;2"&lt;/P&gt;&lt;P&gt;I want to put &amp;amp;1 place MSGV1 = 31730100 and &amp;amp;2 place MSGV2 = 8001.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The output should be as below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     &lt;STRONG&gt;No postings can be made to profit center 31730100 in company code 8001&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Deepthi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2009 07:18:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/concatenate-3-fields/m-p/5311242#M1224498</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-18T07:18:30Z</dc:date>
    </item>
    <item>
      <title>Re: concatenate 3 fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/concatenate-3-fields/m-p/5311243#M1224499</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;    Try with REPLACE or FIND statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPLACE '1&amp;amp;' IN lwa_report-message WITH lwa_messtab-msgv1.
REPLACE '2&amp;amp;' IN lwa_report-message WITH lwa_messtab-msgv2.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Bala Krishna&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Bala Krishna on Mar 18, 2009 12:55 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2009 07:21:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/concatenate-3-fields/m-p/5311243#M1224499</guid>
      <dc:creator>former_member585060</dc:creator>
      <dc:date>2009-03-18T07:21:54Z</dc:date>
    </item>
    <item>
      <title>Re: concatenate 3 fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/concatenate-3-fields/m-p/5311244#M1224500</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try to use concatenate statment&lt;/P&gt;&lt;P&gt;   CONCATENATE '''' '123' '''' INTO W_FIELD&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2009 07:24:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/concatenate-3-fields/m-p/5311244#M1224500</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-18T07:24:35Z</dc:date>
    </item>
    <item>
      <title>Re: concatenate 3 fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/concatenate-3-fields/m-p/5311245#M1224501</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;lwa_report-message = 'No postings can be made to profit center &amp;amp;1 in company code &amp;amp;2'
replace '&amp;amp;1' with lwa_messtab-msgv1 into lwa_report-message.
replace '&amp;amp;2' with lwa_messtab-msgv2 into lwa_report-message.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2009 07:24:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/concatenate-3-fields/m-p/5311245#M1224501</guid>
      <dc:creator>former_member222860</dc:creator>
      <dc:date>2009-03-18T07:24:47Z</dc:date>
    </item>
    <item>
      <title>Re: concatenate 3 fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/concatenate-3-fields/m-p/5311246#M1224502</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;U can do something like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA : temp TYPE string.

concatenate 'No postings can be made to profit center' lwa_messtab-MSGV1  'in company code ' lwa_messtab-MSGV2 INTO temp. 

lwa_report-message = temp.

message lwa_report-message type 'E'.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Hope it will solve your problem..&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;P&gt;ilesh 24x7&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ilesh Nandaniya&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2009 07:38:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/concatenate-3-fields/m-p/5311246#M1224502</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-18T07:38:31Z</dc:date>
    </item>
    <item>
      <title>Re: concatenate 3 fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/concatenate-3-fields/m-p/5311247#M1224503</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Deepthi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    Just try with the FM given below if it help's to met your requirement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;loop at t_messtab into fs_messtab.
      call function 'FORMAT_MESSAGE'
            exporting
              id        = fs_messtab-msgid
              lang      = sy-langu
              no        = fs_messtab-msgnr
              v1        = fs_messtab-msgv1
              v2        = fs_messtab-msgv2
              v3        = fs_messtab-msgv3
              v4        = fs_messtab-msgv4
            importing
              msg       = lw_string
            exceptions
              not_found = 1
              others    = 2.

      if sy-subrc &amp;lt;&amp;gt; 0.
        message id sy-msgid type sy-msgty number sy-msgno
              with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      endif.&lt;/CODE&gt;&lt;/PRE&gt;&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;P&gt;&lt;/P&gt;&lt;P&gt;With luck,&lt;/P&gt;&lt;P&gt;Pritam.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2009 07:41:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/concatenate-3-fields/m-p/5311247#M1224503</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-18T07:41:24Z</dc:date>
    </item>
  </channel>
</rss>

