<?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: Populating error messages return from bapi return parameter in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/populating-error-messages-return-from-bapi-return-parameter/m-p/7816938#M1588608</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Never mind. SAPFAN is on it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Sampath Kumar on May 9, 2011 10:54 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 09 May 2011 16:54:34 GMT</pubDate>
    <dc:creator>former_member191735</dc:creator>
    <dc:date>2011-05-09T16:54:34Z</dc:date>
    <item>
      <title>Populating error messages return from bapi return parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/populating-error-messages-return-from-bapi-return-parameter/m-p/7816932#M1588602</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All..,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am calling Bapi if its successfull ok . some times if it returns error messages those will be stored in return parameter type bapiret2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if i want to display the message i am looping it and printing wa-type,wa-id,wa-msg_log_no,wa-message_v1,wa-message etc..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but its displyaing only error type(E) and id(IO/VL) msg_log_no(229/213) something like that.. but i want the description of that error type which is stored in table T100. how can achieve..???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ex: E 213 contains serial no already assigned..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i tried like this.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it_return into wa_return.&lt;/P&gt;&lt;P&gt;write:/ wa_return-type,wa_return-id,wa_return-msg_log_no,wa_return-message.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; its displaying E IO 229 00000.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i can check the same in se91 by giving id IO and number 229 .. which is stored in table T100.. the same i want to display through the program..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help.......&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Anand&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 May 2011 16:13:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/populating-error-messages-return-from-bapi-return-parameter/m-p/7816932#M1588602</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-05-09T16:13:29Z</dc:date>
    </item>
    <item>
      <title>Re: Populating error messages return from bapi return parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/populating-error-messages-return-from-bapi-return-parameter/m-p/7816933#M1588603</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try FM &lt;STRONG&gt;FORMAT_MESSAGE&lt;/STRONG&gt;.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA: l_msg_str(100).

loop at it_return into wa_return.
 CALL FUNCTION 'FORMAT_MESSAGE'
    EXPORTING
      id        = wa_return-id
      lang      = sy-langu
      no        = wa_return-number
      v1        = message_v1
      v2        = message_v2
      v3        = message_v3
      v4        = message_v4
    IMPORTING
      msg       = l_msg_str   " Message text
    EXCEPTIONS
      not_found = 1
      OTHERS    = 2.
endloop.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 May 2011 16:17:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/populating-error-messages-return-from-bapi-return-parameter/m-p/7816933#M1588603</guid>
      <dc:creator>awin_prabhu</dc:creator>
      <dc:date>2011-05-09T16:17:00Z</dc:date>
    </item>
    <item>
      <title>Re: Populating error messages return from bapi return parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/populating-error-messages-return-from-bapi-return-parameter/m-p/7816934#M1588604</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i tried Formate_message.. but  the result is same...like my write statement from it_return loop&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; its not getting the message from the table T100&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 May 2011 16:21:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/populating-error-messages-return-from-bapi-return-parameter/m-p/7816934#M1588604</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-05-09T16:21:35Z</dc:date>
    </item>
    <item>
      <title>Re: Populating error messages return from bapi return parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/populating-error-messages-return-from-bapi-return-parameter/m-p/7816935#M1588605</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have u passed right parameters to the FM.  Better paste ur code.&lt;/P&gt;&lt;P&gt;Have you tried like below code.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA: l_msg_str(100).
 
loop at it_return into wa_return.
 CALL FUNCTION 'FORMAT_MESSAGE'
    EXPORTING
      id        = wa_return-id
      lang      = sy-langu
      no        = wa_return-number
      v1        = wa_return-message_v1
      v2        = wa_return-message_v2
      v3        = wa_return-message_v3
      v4        = wa_return-message_v4
    IMPORTING
      msg       = l_msg_str   " Message text
    EXCEPTIONS
      not_found = 1
      OTHERS    = 2.
write:/ l_msg_str.
endloop.
 &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 May 2011 16:24:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/populating-error-messages-return-from-bapi-return-parameter/m-p/7816935#M1588605</guid>
      <dc:creator>awin_prabhu</dc:creator>
      <dc:date>2011-05-09T16:24:56Z</dc:date>
    </item>
    <item>
      <title>Re: Populating error messages return from bapi return parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/populating-error-messages-return-from-bapi-return-parameter/m-p/7816936#M1588606</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi thank you for helping..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i passed correctly even i checked in debugging mode those parameters doesn't contain any data....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;any other FM?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 May 2011 16:36:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/populating-error-messages-return-from-bapi-return-parameter/m-p/7816936#M1588606</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-05-09T16:36:16Z</dc:date>
    </item>
    <item>
      <title>Re: Populating error messages return from bapi return parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/populating-error-messages-return-from-bapi-return-parameter/m-p/7816937#M1588607</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Also try FM &lt;STRONG&gt;BAPI_MESSAGE_GETDETAIL&lt;/STRONG&gt; which returns long text also&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 May 2011 16:39:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/populating-error-messages-return-from-bapi-return-parameter/m-p/7816937#M1588607</guid>
      <dc:creator>awin_prabhu</dc:creator>
      <dc:date>2011-05-09T16:39:16Z</dc:date>
    </item>
    <item>
      <title>Re: Populating error messages return from bapi return parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/populating-error-messages-return-from-bapi-return-parameter/m-p/7816938#M1588608</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Never mind. SAPFAN is on it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Sampath Kumar on May 9, 2011 10:54 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 May 2011 16:54:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/populating-error-messages-return-from-bapi-return-parameter/m-p/7816938#M1588608</guid>
      <dc:creator>former_member191735</dc:creator>
      <dc:date>2011-05-09T16:54:34Z</dc:date>
    </item>
    <item>
      <title>Re: Populating error messages return from bapi return parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/populating-error-messages-return-from-bapi-return-parameter/m-p/7816939#M1588609</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ok fine..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dont mind..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did you got my point.. i want to get the message from standard message table T100 based on error number from bapi return parameter. because bapi return internal table doesn't have message test nothing..it just showing empty all the message variables..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 May 2011 17:11:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/populating-error-messages-return-from-bapi-return-parameter/m-p/7816939#M1588609</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-05-09T17:11:55Z</dc:date>
    </item>
    <item>
      <title>Re: Populating error messages return from bapi return parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/populating-error-messages-return-from-bapi-return-parameter/m-p/7816940#M1588610</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Alright here is more details&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Following BAPI can be used to get the message for any message id, Message no and/or for message variables that comes from BAPI in the form of BAPIRET2 structure or in fact any form as long as you have the Message ID/no and language. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example: &lt;/P&gt;&lt;P&gt;call function 'BAPI_MESSAGE_GETDETAIL'&lt;/P&gt;&lt;P&gt;    exporting&lt;/P&gt;&lt;P&gt;      id         = msgid&lt;/P&gt;&lt;P&gt;      number     = msgno&lt;/P&gt;&lt;P&gt;      language   = sy-langu&lt;/P&gt;&lt;P&gt;      textformat = 'NON'&lt;/P&gt;&lt;P&gt;      message_v1 = msgv1&lt;/P&gt;&lt;P&gt;      message_v2 = msgv2&lt;/P&gt;&lt;P&gt;      message_v3 = msgv3&lt;/P&gt;&lt;P&gt;      message_v4 = msgv4&lt;/P&gt;&lt;P&gt;    importing&lt;/P&gt;&lt;P&gt;      message    = message&lt;/P&gt;&lt;P&gt;      return     = wa_return.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What the above BAPI does is simple. for example, if you get just message id(V0) and number(010) in IT_BAPIRET2 - (Obviously, you should loop the internal table to work area) - BAPI selects message text from message class V0 and number 001 and gives you the formatted message (System: More than 9 windows open: system limit reached) . You can see the same in SE91 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you get any message variables in IT_BAPIRET2 for example ID(Message class) = V0 and number 040 and MSGV1 = 'xxxx' and MSGV2 = '8' &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then the same bapi would return the message Data backup table 'XXXX' with RC= 8 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is as simple as selecting messages from error table T100 for Language/application area (message class/id) and message number but the only difference is the bapi formats the data based on message variable and you dont need to code it. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you dont see any data in IT_BAPIRET2 then that is fine.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 May 2011 20:19:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/populating-error-messages-return-from-bapi-return-parameter/m-p/7816940#M1588610</guid>
      <dc:creator>former_member191735</dc:creator>
      <dc:date>2011-05-09T20:19:19Z</dc:date>
    </item>
    <item>
      <title>Re: Populating error messages return from bapi return parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/populating-error-messages-return-from-bapi-return-parameter/m-p/7816941#M1588611</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Usually I had no problem using MESSAGE field in the BAPI return table. Are you saying this field is not getting populated? Strange...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 May 2011 19:21:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/populating-error-messages-return-from-bapi-return-parameter/m-p/7816941#M1588611</guid>
      <dc:creator>Jelena_Perfiljeva</dc:creator>
      <dc:date>2011-05-10T19:21:40Z</dc:date>
    </item>
    <item>
      <title>Re: Populating error messages return from bapi return parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/populating-error-messages-return-from-bapi-return-parameter/m-p/7816942#M1588612</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Its working verywell with u r ans..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; I gave u full points&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 15 May 2011 11:17:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/populating-error-messages-return-from-bapi-return-parameter/m-p/7816942#M1588612</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-05-15T11:17:43Z</dc:date>
    </item>
  </channel>
</rss>

