<?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 Bapi Return Parameter in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-return-parameter/m-p/875233#M50590</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I know that exceptions are handled in BAPI using Return parameter but i want to know how to handle this,i.e if i am calling a bapi function module and suppose it throws some errors and this will be available in Return parameter ,what is the next step , can anyone give a sample code explaining this.&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Rajanidhi Rajasekeran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 10 May 2005 06:19:06 GMT</pubDate>
    <dc:creator>former_member764673</dc:creator>
    <dc:date>2005-05-10T06:19:06Z</dc:date>
    <item>
      <title>Bapi Return Parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-return-parameter/m-p/875233#M50590</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I know that exceptions are handled in BAPI using Return parameter but i want to know how to handle this,i.e if i am calling a bapi function module and suppose it throws some errors and this will be available in Return parameter ,what is the next step , can anyone give a sample code explaining this.&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Rajanidhi Rajasekeran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 May 2005 06:19:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-return-parameter/m-p/875233#M50590</guid>
      <dc:creator>former_member764673</dc:creator>
      <dc:date>2005-05-10T06:19:06Z</dc:date>
    </item>
    <item>
      <title>Re: Bapi Return Parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-return-parameter/m-p/875234#M50591</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rajanidhi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what is to be done with the entries of the return table is something that is usually dependent on the application. some applications ahve a central log maintained and some other just choose to issue the messages. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So it largely depends on the requirement what has to be done.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Refer also to this link in the documentation - &lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/a5/3ec9f74ac011d1894e0000e829fbbd/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/a5/3ec9f74ac011d1894e0000e829fbbd/frameset.htm&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anand Mandalika.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 May 2005 06:35:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-return-parameter/m-p/875234#M50591</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-05-10T06:35:14Z</dc:date>
    </item>
    <item>
      <title>Re: Bapi Return Parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-return-parameter/m-p/875235#M50592</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;Handling of BAPI return parameters depends on the BAPI in question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In general, a message of type "E" means there has been a serious problem and the BAPI must be rolled back.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Determining if the call was successful is another matter. Some BAPIs return a success message (type "S"), others simply return nothing (i. e. an empty table). Sometimes there will be warnings and/or information messages. In my experience, you have to use trial and error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, Joerg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 May 2005 08:13:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-return-parameter/m-p/875235#M50592</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-05-10T08:13:22Z</dc:date>
    </item>
    <item>
      <title>Re: Bapi Return Parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-return-parameter/m-p/875236#M50593</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rajanidhi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In general you can simply scan the return table. See following sample code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT Z_SAMPLE_019 .
* Sample program template 019
*
DATA: it_salesorder  TYPE BAPIACSO00 OCCURS 0,
      it_salesamount TYPE BAPIACCRSO OCCURS 0,
      it_return      TYPE BAPIRET2   OCCURS 0,
      wa_return      TYPE bapiret2.

* Do your thing to fill it_salesorder and it_salesamount
*
  ...

* Call to BAPI
*
CALL FUNCTION 'BAPI_ACC_SALES_ORDER_CHECK'
  TABLES
    salesorder  = it_salesorder
    salesamount = it_salesamount
    return      = it_return.

* Error check
*
LOOP AT it_return INTO wa_return
                 WHERE type EQ 'E'
                    OR type EQ 'A'.
*   Give message
*
    MESSAGE ID wa_return-id
          TYPE wa_return-type
        NUMBER wa_return-number
          WITH wa_return-message_v1
               wa_return-message_v2
               wa_return-message_v3
               wa_return-message_v4.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Hope this helps you,&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rob.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 May 2005 09:38:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-return-parameter/m-p/875236#M50593</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-05-10T09:38:09Z</dc:date>
    </item>
    <item>
      <title>Re: Bapi Return Parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-return-parameter/m-p/875237#M50594</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;What you are asking is a basic question about how to handle errors. This is always unique to the implementation. There are standards everywhere as to how one wants to handle errors. Error handling consists of a couple of things:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Who should be notified?(Users, functional, technical support etc)&lt;/P&gt;&lt;P&gt;When should they be notified?(batch, immediately)&lt;/P&gt;&lt;P&gt;How they should be notified?(Job Spool, email, paging etc)&lt;/P&gt;&lt;P&gt;What is the mechanism for reprocessing? Do we store the error record(s) in a file or a table or just throw it away? Do we keep them in an IDOC format or a batch input session, if those options are available for the transaction you are using?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Apart from these aspects, most BAPIs require an explicit commit after the BAPI call. So depending on the success or failure of the BAPI call you either call BAPI_COMMIT_TRANSACTION or BAPI_ROLLBACK_TRANSACTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Srinivas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 May 2005 15:06:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-return-parameter/m-p/875237#M50594</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-05-10T15:06:05Z</dc:date>
    </item>
  </channel>
</rss>

