<?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 CODE INF in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-return-code-inf/m-p/1723687#M315645</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;  All the BAPIs will the return the success or error messages in the return parameter..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; The sy-subrc will always be zero..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; For checking if the BAPI is successful or not..do the following..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT RETURN WITH TYPE = 'E' OR TYPE 'A'.&lt;/P&gt;&lt;P&gt;    EXIT.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; SUCCESSFUL END OF TRANSACTION&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;TRANSACTION FAILED..&lt;/P&gt;&lt;/LI&gt;&lt;/UL&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;Thanks,&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 08 Nov 2006 03:41:28 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-11-08T03:41:28Z</dc:date>
    <item>
      <title>BAPI-RETURN CODE INF</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-return-code-inf/m-p/1723686#M315644</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everybody what is the main purpose of return code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data dictionary structures&lt;/P&gt;&lt;P&gt;-BAPIRETURN&lt;/P&gt;&lt;P&gt;-BAPIRETURN1&lt;/P&gt;&lt;P&gt;-BAPIRET1&lt;/P&gt;&lt;P&gt;-BAPRET2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;THANKS IN ADVANCE.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Nov 2006 03:37:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-return-code-inf/m-p/1723686#M315644</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-08T03:37:22Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI-RETURN CODE INF</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-return-code-inf/m-p/1723687#M315645</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;  All the BAPIs will the return the success or error messages in the return parameter..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; The sy-subrc will always be zero..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; For checking if the BAPI is successful or not..do the following..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT RETURN WITH TYPE = 'E' OR TYPE 'A'.&lt;/P&gt;&lt;P&gt;    EXIT.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; SUCCESSFUL END OF TRANSACTION&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;TRANSACTION FAILED..&lt;/P&gt;&lt;/LI&gt;&lt;/UL&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;Thanks,&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Nov 2006 03:41:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-return-code-inf/m-p/1723687#M315645</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-08T03:41:28Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI-RETURN CODE INF</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-return-code-inf/m-p/1723688#M315646</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Each BAPI has a return parameter that is either an export parameter or an export table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A BAPI should be able to record and classify all possible errors that may occur. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have to create a parameter named Return for every BAPI. This parameter returns exception messages or success messages to the calling program. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BAPIs themselves must not trigger any messages (such as MESSAGE xnnn) in the coding. In particular they must not generate terminations or display dialog boxes. Instead, all messages must be intercepted internally and reported back to the calling program in the Return parameter. Otherwise the BAPI will not be processed correctly and control may not be given back to the calling program. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The export parameter Return can be implemented as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As a structure, whereby it must be defined in the function module as an export parameter, as well as in the method in the BOR. &lt;/P&gt;&lt;P&gt;As a table, whereby it must be defined in the function module as a table parameter, as well as in the method in the BOR as an export parameter.&lt;/P&gt;&lt;P&gt;Before filling the Return parameter you should either initialize the structure with CLEAR or the table with REFRESH and CLEAR. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the return parameter is not set or is set to an initial value this means that no error has occurred.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Return parameter may be based on the following reference structures:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BAPIRET2&lt;/P&gt;&lt;P&gt;You must use this reference structure when developing new BAPIS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BAPIRET1, BAPIRETURN&lt;/P&gt;&lt;P&gt;These reference structures are still partly used in old BAPIs. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Both structures must be filled in the logon language.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a look at return parameters in below link.&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/a5/3ec9f74ac011d1894e0000e829fbbd/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/a5/3ec9f74ac011d1894e0000e829fbbd/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Vibha &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Please mark all the helpful answers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Nov 2006 04:35:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-return-code-inf/m-p/1723688#M315646</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-08T04:35:21Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI-RETURN CODE INF</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-return-code-inf/m-p/1723689#M315647</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;do they have any particular situations to use particular return codes like BAPIRETURN1/BAPIRETURN/BAPIRET1/BAPIRET2&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Nov 2006 14:23:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-return-code-inf/m-p/1723689#M315647</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-08T14:23:17Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI-RETURN CODE INF</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-return-code-inf/m-p/1723690#M315648</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi nagini,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. The only purpose is that they &lt;/P&gt;&lt;P&gt;  have some more fields / extra fields / different fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Instead of enhancing the same structure,&lt;/P&gt;&lt;P&gt;   SAP has created new structures,&lt;/P&gt;&lt;P&gt;  so that the old ones are not distrubed.&lt;/P&gt;&lt;P&gt;  (Since they are used in BAPI, its critial not to disturb them)&lt;/P&gt;&lt;P&gt;&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;amit m.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Nov 2006 14:27:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-return-code-inf/m-p/1723690#M315648</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-08T14:27:48Z</dc:date>
    </item>
  </channel>
</rss>

