<?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: How to capture error message? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-capture-error-message/m-p/4468191#M1058553</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Ronny,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data:&lt;/P&gt;&lt;P&gt;wa_error(150) type C.&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="5" type="ul"&gt;&lt;P&gt;Call Function/BAPI&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'FORMAT_MESSAGE'&lt;/P&gt;&lt;P&gt; EXPORTING&lt;/P&gt;&lt;P&gt;          id  = sy-msgid&lt;/P&gt;&lt;P&gt;          no  = sy-msgno&lt;/P&gt;&lt;P&gt;          v1  = sy-msgv1&lt;/P&gt;&lt;P&gt;          v2  = sy-msgv2&lt;/P&gt;&lt;P&gt;          v3  = sy-msgv3&lt;/P&gt;&lt;P&gt;          v4  = sy-msgv4&lt;/P&gt;&lt;P&gt;        IMPORTING&lt;/P&gt;&lt;P&gt;          msg = wa_err&lt;/P&gt;&lt;P&gt;          EXCEPTIONS&lt;/P&gt;&lt;P&gt;            not_found.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If wa_err is not initial.&lt;/P&gt;&lt;P&gt;Write:/ 'This error occurred: ', wa_err.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;C&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 09 Sep 2008 14:13:39 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-09-09T14:13:39Z</dc:date>
    <item>
      <title>How to capture error message?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-capture-error-message/m-p/4468190#M1058552</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How to capture error message like below in to the string?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno&lt;/P&gt;&lt;P&gt;     WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ronny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Sep 2008 14:09:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-capture-error-message/m-p/4468190#M1058552</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-09T14:09:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to capture error message?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-capture-error-message/m-p/4468191#M1058553</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Ronny,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data:&lt;/P&gt;&lt;P&gt;wa_error(150) type C.&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="5" type="ul"&gt;&lt;P&gt;Call Function/BAPI&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'FORMAT_MESSAGE'&lt;/P&gt;&lt;P&gt; EXPORTING&lt;/P&gt;&lt;P&gt;          id  = sy-msgid&lt;/P&gt;&lt;P&gt;          no  = sy-msgno&lt;/P&gt;&lt;P&gt;          v1  = sy-msgv1&lt;/P&gt;&lt;P&gt;          v2  = sy-msgv2&lt;/P&gt;&lt;P&gt;          v3  = sy-msgv3&lt;/P&gt;&lt;P&gt;          v4  = sy-msgv4&lt;/P&gt;&lt;P&gt;        IMPORTING&lt;/P&gt;&lt;P&gt;          msg = wa_err&lt;/P&gt;&lt;P&gt;          EXCEPTIONS&lt;/P&gt;&lt;P&gt;            not_found.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If wa_err is not initial.&lt;/P&gt;&lt;P&gt;Write:/ 'This error occurred: ', wa_err.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;C&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Sep 2008 14:13:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-capture-error-message/m-p/4468191#M1058553</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-09T14:13:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to capture error message?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-capture-error-message/m-p/4468192#M1058554</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;even easier:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno &lt;STRONG&gt;INTO lf_string&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;      WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Sep 2008 14:16:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-capture-error-message/m-p/4468192#M1058554</guid>
      <dc:creator>ThomasZloch</dc:creator>
      <dc:date>2008-09-09T14:16:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to capture error message?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-capture-error-message/m-p/4468193#M1058555</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;call transaction 'XK01' using i_bdcdata&lt;/P&gt;&lt;P&gt;                 mode 'N'&lt;/P&gt;&lt;P&gt;                 update 'S'&lt;/P&gt;&lt;P&gt;                 messages into i_bdcmsgcoll.&lt;/P&gt;&lt;P&gt;if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    perform get_error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        write:/ itab , v_text.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*****************************************&lt;/P&gt;&lt;P&gt;*Form&lt;/P&gt;&lt;P&gt;*****************************************&lt;/P&gt;&lt;P&gt;form get_error.&lt;/P&gt;&lt;P&gt;loop at i_bdcmsgcoll.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'FORMAT_MESSAGE'&lt;/P&gt;&lt;P&gt; EXPORTING&lt;/P&gt;&lt;P&gt;   ID              = i_bdcmsgcoll-MSGID&lt;/P&gt;&lt;P&gt;   LANG            = sy-langu&lt;/P&gt;&lt;P&gt;   NO              = i_bdcmsgcoll-MSGNr&lt;/P&gt;&lt;P&gt;   V1              = i_bdcmsgcoll-MSGV1&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  V2              = SY-MSGV2&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  V3              = SY-MSGV3&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  V4              = SY-MSGV4&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt; IMPORTING&lt;/P&gt;&lt;P&gt;   MSG             = v_text&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  NOT_FOUND       = 1&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  OTHERS          = 2&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;          .&lt;/P&gt;&lt;P&gt;IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.                    " get_error&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Bala Krishna on Sep 9, 2008 7:50 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Sep 2008 14:20:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-capture-error-message/m-p/4468193#M1058555</guid>
      <dc:creator>former_member585060</dc:creator>
      <dc:date>2008-09-09T14:20:44Z</dc:date>
    </item>
  </channel>
</rss>

