<?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: Handling BAPI responses.. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/handling-bapi-responses/m-p/4640562#M1092436</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check FORMAT_MESSAGE FM, here you need to pass the message id, type and number. It will return you the actual descriptive message&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 13 Oct 2008 07:02:53 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-10-13T07:02:53Z</dc:date>
    <item>
      <title>Handling BAPI responses..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/handling-bapi-responses/m-p/4640556#M1092430</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 am using the Bapi --&amp;gt; BAPI_BOM_UPLOAD_SAVE for BOM creation.. so while creating the BOM i am giving the mandatory fields &lt;/P&gt;&lt;P&gt;for the creation of a BOM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For eg: if i create a BOM using this BAPI, if the BOM is successfully created then a response will get 000 as a success indicator with its LOg_Msg_No as 0000000 and  i am not getting any message as successfully created, and in case of failure it is just generating some error with message ID and type..&lt;/P&gt;&lt;P&gt;In the response i am getting the error message with its 3 digit code, but is it possibe to get the message along with its ID and type..&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;is there any way to capture the response message, &lt;/P&gt;&lt;P&gt;and also let us know the possibilities of capturing the error message..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the message classes w.r.t this BAPI are W_ and 29&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;Kishore&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Oct 2008 06:46:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/handling-bapi-responses/m-p/4640556#M1092430</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-13T06:46:53Z</dc:date>
    </item>
    <item>
      <title>Re: Handling BAPI responses..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/handling-bapi-responses/m-p/4640557#M1092431</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;you can capture the error messages in the following way:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data: it_ret type standard table of bapiret2,
        wa_ret type bapiret2.

CALL FUNCTION 'BAPI_BOM_UPLOAD_SAVE'
  EXPORTING
    IS_MAST         =
    IS_STZU         =
 IMPORTING
   ES_RETURN       = it_ret
  TABLES
    IT_STKO         =
    IT_STPO         =
    IT_STAS         =


loop at it_ret into wa_ret.

write: / wa_ret-message.

endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vishwa.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Oct 2008 06:50:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/handling-bapi-responses/m-p/4640557#M1092431</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-13T06:50:17Z</dc:date>
    </item>
    <item>
      <title>Re: Handling BAPI responses..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/handling-bapi-responses/m-p/4640558#M1092432</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;Check FM "FORMAT_MESSAGE"&lt;/P&gt;&lt;P&gt;Once you get messages in the return table then pass it to this FM, to get a meaningful description.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Navneeth K.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Oct 2008 06:52:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/handling-bapi-responses/m-p/4640558#M1092432</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-13T06:52:45Z</dc:date>
    </item>
    <item>
      <title>Re: Handling BAPI responses..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/handling-bapi-responses/m-p/4640559#M1092433</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kishor,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check out the structure BAPIRET2. The BAPI will return only types like 000 or 001 etc as messages. U wud need to code accordingly to tell the user that its a success msg/ warning or error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The structure also contains BAPIRET2-MESSAGE.&lt;/P&gt;&lt;P&gt;Try displaying that and check if its working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Oct 2008 06:53:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/handling-bapi-responses/m-p/4640559#M1092433</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-13T06:53:27Z</dc:date>
    </item>
    <item>
      <title>Re: Handling BAPI responses..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/handling-bapi-responses/m-p/4640560#M1092434</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;Actually we can see what type of error it is coming with its Type, ID field and Number field..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Type -- E -- Specifies the Error&lt;/P&gt;&lt;P&gt;ID -- W_ -- Specifies the error belongs to W_&lt;/P&gt;&lt;P&gt;Number -- 003 -- error in W_ &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to view W_ go to messag class SE91 and see there, like this how many possiblities of tables of errors are there for this BAPI..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As a response i am getting only the ID and its Number, but i need along with the response error message which is accross that Number.. how to get that as a response message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Kishore&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Oct 2008 06:57:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/handling-bapi-responses/m-p/4640560#M1092434</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-13T06:57:57Z</dc:date>
    </item>
    <item>
      <title>Re: Handling BAPI responses..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/handling-bapi-responses/m-p/4640561#M1092435</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;We can have message display this way :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;LOOP AT it_return.
WRITE:/ it_return-type, it_return-id, it_return-number,
it_return-message.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or we can use function module " Format_Message".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanx.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Oct 2008 07:02:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/handling-bapi-responses/m-p/4640561#M1092435</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-13T07:02:38Z</dc:date>
    </item>
    <item>
      <title>Re: Handling BAPI responses..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/handling-bapi-responses/m-p/4640562#M1092436</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check FORMAT_MESSAGE FM, here you need to pass the message id, type and number. It will return you the actual descriptive message&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Oct 2008 07:02:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/handling-bapi-responses/m-p/4640562#M1092436</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-13T07:02:53Z</dc:date>
    </item>
    <item>
      <title>Re: Handling BAPI responses..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/handling-bapi-responses/m-p/4640563#M1092437</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;Go through the Es_return strucuture in the BAPI in se37 tcode..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check if there are fields which satisfy ur requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;loop at it_ret into wa_ret.

write: wa_ret-message.... " u can add the fields here.

endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vishwa.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Oct 2008 07:04:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/handling-bapi-responses/m-p/4640563#M1092437</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-13T07:04:38Z</dc:date>
    </item>
    <item>
      <title>Re: Handling BAPI responses..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/handling-bapi-responses/m-p/4640564#M1092438</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Navaneeth,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am using XI here how can i use multiple function modules at a time.. Can u elaborate more on how to use this FORMAT_Message function module, i have checked it when i give some input parameters it is working fine.. but while executing the BAPI, the response of the BAPI gives the input parameters for the FM Format_Message, how to map this two function modules..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Kishore&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Oct 2008 07:09:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/handling-bapi-responses/m-p/4640564#M1092438</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-13T07:09:19Z</dc:date>
    </item>
    <item>
      <title>Re: Handling BAPI responses..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/handling-bapi-responses/m-p/4640565#M1092439</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;once the BAPI is executed, loop at the reuturn table ( of type bapiret2). and call this FM in the loop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Oct 2008 07:11:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/handling-bapi-responses/m-p/4640565#M1092439</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-13T07:11:22Z</dc:date>
    </item>
  </channel>
</rss>

