<?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: bapi return message in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-return-message/m-p/2048265#M421947</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;where the message coming from? where to maintain if  we need to maintain or sap provides?&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 11 Mar 2007 05:49:33 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-03-11T05:49:33Z</dc:date>
    <item>
      <title>bapi return message</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-return-message/m-p/2048261#M421943</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;1) i got the help from gurus that normally FM would use exceptions but not bapi FM. bapi FM uses bapiret2 internal table to know exception of the errors, warnings, success messages occurred when processing bapi.&lt;/P&gt;&lt;P&gt;may i know where to get (or keep)  the message that return in RETURN in the calling program? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) may i know those message variable below are messages maintained by customer or sap system message? where we store the message?  &lt;/P&gt;&lt;P&gt;message-id sy-msgid type sy-msgty number sy-msgno with&lt;/P&gt;&lt;P&gt;sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3) message in point 1 and point 2 are referring to same source? i mean messages for point 1 and point 2 getting from the same place?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 11 Mar 2007 02:50:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-return-message/m-p/2048261#M421943</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-11T02:50:52Z</dc:date>
    </item>
    <item>
      <title>Re: bapi return message</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-return-message/m-p/2048262#M421944</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The messages in points 1 are returned in rows of an internal table (usually named BAPIRET2 but not necessarily, can have other names) and they have the similar structure in terms of msgid, msgno etc as in point 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example if you look at BAPI_MATERIAL_SAVEDATA, its messages are returned in internal table RETURNMESSAGES, which has the below structure&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TYPE
ID
NUMBER
MESSAGE
LOG_NO
LOG_MSG_NO
MESSAGE_V1
MESSAGE_V2
MESSAGE_V3
MESSAGE_V4
PARAMETER
ROW
FIELD
SYSTEM&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 11 Mar 2007 03:10:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-return-message/m-p/2048262#M421944</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-11T03:10:59Z</dc:date>
    </item>
    <item>
      <title>Re: bapi return message</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-return-message/m-p/2048263#M421945</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;bapiret1, bapiret2, bapireturn, bapimessages &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;are they the same? i read from post that advisable to use bapiret2 than using bapiret1 and bapireturn. what about this bapimessages?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rgds&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 11 Mar 2007 03:28:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-return-message/m-p/2048263#M421945</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-11T03:28:44Z</dc:date>
    </item>
    <item>
      <title>Re: bapi return message</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-return-message/m-p/2048264#M421946</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;All of them will have similar structures (but not necessarily identical) but all of them will definitely contain msgid, msgno etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It doesn't make a difference as far as you need to just return messages. Moreover if none of those return structures satisfy your requirement (ie. you want some addition fields to return from your bapi), you can create your own dictionary structure and use it in your definition.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 11 Mar 2007 04:14:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-return-message/m-p/2048264#M421946</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-11T04:14:34Z</dc:date>
    </item>
    <item>
      <title>Re: bapi return message</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-return-message/m-p/2048265#M421947</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;where the message coming from? where to maintain if  we need to maintain or sap provides?&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 11 Mar 2007 05:49:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-return-message/m-p/2048265#M421947</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-11T05:49:33Z</dc:date>
    </item>
    <item>
      <title>Re: bapi return message</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-return-message/m-p/2048266#M421948</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi el,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in most cases the messages are those you would get from the corresponding transaction if processed online. BAPI_PO_CHANGE will process the same routines as transaction ME23N, BAPI_ORDER_CREATE1 is the equivalent of VA01 and so on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For test purposes, you may display the return table as an ALV grid; just call FM REUSE_ALV_GRID_DISPLAY with structure_name 'BAPIRET2' (or what structure the return table is) and table RETURN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For productive environment it will be good to put them into an application log. For IDocs it is possible to create a reference to the application log in IDoc status record. If processed in report, you can issue the message preceded with ICON_LED_GREEN, YELLOW or RED to make the message type visible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One good reason for the RETURN table is that there is no limit for the number and type of messages including info, warning, success and error. An exception raised means just one type of (failed) end of processing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The decision about handling depends on your specific requirements. To check if the processing was successful it is OK just to check if there was any message of types E, A or X:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
loop at lt_return transporting no fields
  where msgty ca 'EAX'.
endloop.
if sy-subrc = 0.
* Failed!
  call function 'BAPI_TRANSACTION_ROLLBACK'.
else.
* Good
  call function 'BAPI_TRANSACTION_COMMIT'.
endif.
&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;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 11 Mar 2007 12:08:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-return-message/m-p/2048266#M421948</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2007-03-11T12:08:07Z</dc:date>
    </item>
  </channel>
</rss>

