<?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: Has anyone used the FORMAT_MESSAGE function module in ECC 6.0 ?? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/has-anyone-used-the-format-message-function-module-in-ecc-6-0/m-p/4761758#M1116523</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 like this....&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  CALL_TRANSACTION
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  --&amp;gt;  p1        text
*  &amp;lt;--  p2        text
*----------------------------------------------------------------------*
FORM call_transaction .
  CALL TRANSACTION '&amp;lt;Y......&amp;gt;' USING it_bdcdata
                             MESSAGES INTO messtab
                             MODE 'N'
                             UPDATE 'S'.

  LOOP AT messtab.
    CALL FUNCTION 'FORMAT_MESSAGE'
      EXPORTING
        id        = messtab-msgid
        lang      = sy-langu
        no        = messtab-msgnr
        v1        = messtab-msgv1
        v2        = messtab-msgv2
        v3        = messtab-msgv3
        v4        = messtab-msgv4
      IMPORTING
        msg       = msg_txt
      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.

    IF messtab-msgtyp EQ 'E'.
      WRITE:/ icon_checked AS ICON, 10 msg_txt.
      WRITE: 5 i_tab-wb_book COLOR 6.
*    ELSEIF messtab-msgtyp EQ 'S'.
*      WRITE:/10 msg_txt COLOR 6.
*    ELSEIF messtab-msgtyp EQ 'W'.
*      WRITE:/10 msg_txt COLOR 3.
*    ELSE.
*      WRITE:/10 msg_txt COLOR 4.
    ENDIF.
    CLEAR msg_txt.
  ENDLOOP.
  REFRESH:it_bdcdata,messtab.

ENDFORM.                    " CALL_TRANSACTION
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Arunima&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 07 Nov 2008 04:23:14 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-11-07T04:23:14Z</dc:date>
    <item>
      <title>Has anyone used the FORMAT_MESSAGE function module in ECC 6.0 ??</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/has-anyone-used-the-format-message-function-module-in-ecc-6-0/m-p/4761755#M1116520</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We've upgraded to ECC 6.0 and now I have a BDC program using FORMAT_MESSAGE function module that has a problem.  The number after the &amp;amp; (&amp;amp;1, &amp;amp;2, &amp;amp;3, &amp;amp;4) in the function mod isn't replaced, it stays as a literal and only the &amp;amp; is replaced with a valid value which it then passes back to the program. &lt;/P&gt;&lt;P&gt;Anyone else have this problem?  Any ideas how to fix?&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;lz&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Nov 2008 21:41:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/has-anyone-used-the-format-message-function-module-in-ecc-6-0/m-p/4761755#M1116520</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-06T21:41:59Z</dc:date>
    </item>
    <item>
      <title>Re: Has anyone used the FORMAT_MESSAGE function module in ECC 6.0 ??</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/has-anyone-used-the-format-message-function-module-in-ecc-6-0/m-p/4761756#M1116521</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 using the FM message_prepare...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: v_message TYPE string.

CALL FUNCTION 'MESSAGE_PREPARE'
  EXPORTING
    language               = sy-langu
    msg_id                 = '00'
    msg_no                 = '275'
    msg_var1               = 'Test'
    msg_var2               = 'Test'
  IMPORTING
    msg_text               = v_message
  EXCEPTIONS
    function_not_completed = 1
    message_not_found      = 2
    OTHERS                 = 3.

WRITE: / v_message.&lt;/CODE&gt;&lt;/PRE&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>Thu, 06 Nov 2008 23:01:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/has-anyone-used-the-format-message-function-module-in-ecc-6-0/m-p/4761756#M1116521</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-06T23:01:59Z</dc:date>
    </item>
    <item>
      <title>Re: Has anyone used the FORMAT_MESSAGE function module in ECC 6.0 ??</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/has-anyone-used-the-format-message-function-module-in-ecc-6-0/m-p/4761757#M1116522</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Instead of the FM you can try with the MESSAGE with addition into .&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
 MESSAGE ID '00' TYPE 'E' NUMBER '398'
         into IT_MESSAGE-message
         WITH 'Test Message' SY-MSGV2 SY-MSGV3 SY-MSGV4.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Naimesh Patel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Nov 2008 23:08:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/has-anyone-used-the-format-message-function-module-in-ecc-6-0/m-p/4761757#M1116522</guid>
      <dc:creator>naimesh_patel</dc:creator>
      <dc:date>2008-11-06T23:08:26Z</dc:date>
    </item>
    <item>
      <title>Re: Has anyone used the FORMAT_MESSAGE function module in ECC 6.0 ??</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/has-anyone-used-the-format-message-function-module-in-ecc-6-0/m-p/4761758#M1116523</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 like this....&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  CALL_TRANSACTION
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  --&amp;gt;  p1        text
*  &amp;lt;--  p2        text
*----------------------------------------------------------------------*
FORM call_transaction .
  CALL TRANSACTION '&amp;lt;Y......&amp;gt;' USING it_bdcdata
                             MESSAGES INTO messtab
                             MODE 'N'
                             UPDATE 'S'.

  LOOP AT messtab.
    CALL FUNCTION 'FORMAT_MESSAGE'
      EXPORTING
        id        = messtab-msgid
        lang      = sy-langu
        no        = messtab-msgnr
        v1        = messtab-msgv1
        v2        = messtab-msgv2
        v3        = messtab-msgv3
        v4        = messtab-msgv4
      IMPORTING
        msg       = msg_txt
      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.

    IF messtab-msgtyp EQ 'E'.
      WRITE:/ icon_checked AS ICON, 10 msg_txt.
      WRITE: 5 i_tab-wb_book COLOR 6.
*    ELSEIF messtab-msgtyp EQ 'S'.
*      WRITE:/10 msg_txt COLOR 6.
*    ELSEIF messtab-msgtyp EQ 'W'.
*      WRITE:/10 msg_txt COLOR 3.
*    ELSE.
*      WRITE:/10 msg_txt COLOR 4.
    ENDIF.
    CLEAR msg_txt.
  ENDLOOP.
  REFRESH:it_bdcdata,messtab.

ENDFORM.                    " CALL_TRANSACTION
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Arunima&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Nov 2008 04:23:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/has-anyone-used-the-format-message-function-module-in-ecc-6-0/m-p/4761758#M1116523</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-07T04:23:14Z</dc:date>
    </item>
    <item>
      <title>Re: Has anyone used the FORMAT_MESSAGE function module in ECC 6.0 ??</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/has-anyone-used-the-format-message-function-module-in-ecc-6-0/m-p/4761759#M1116524</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks everyone for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Nov 2008 21:43:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/has-anyone-used-the-format-message-function-module-in-ecc-6-0/m-p/4761759#M1116524</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-17T21:43:47Z</dc:date>
    </item>
  </channel>
</rss>

