<?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 in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi/m-p/3125296#M742300</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This message was moderated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 29 Jan 2015 15:00:22 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2015-01-29T15:00:22Z</dc:date>
    <item>
      <title>bapi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi/m-p/3125292#M742296</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;how to handle the errors in bapi?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 18 Nov 2007 07:31:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi/m-p/3125292#M742296</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-18T07:31:51Z</dc:date>
    </item>
    <item>
      <title>Re: bapi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi/m-p/3125293#M742297</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sudhakar,&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;All error messages or indeed any message that may be returned by the BAPI, must be defined in message table (Tools -&amp;gt; ABAP Workbench -&amp;gt; Development -&amp;gt; Programming environment -&amp;gt; Messages) and described in the documentation for the return parameter. This also applies to the most important or most likely error messages generated by other programs that can be indirectly passed via the BAPI to the application program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ans in BAPI'S u can handle the errors with the help of BAPI RETURN parameter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;U have to declare an internal table like BAPIRET2. u need to pass this internal table to the RETURN structure .Now this internal table will capture the error messages once u run the BAPI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a look at below link.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/a5/3ec9f74ac011d1894e0000e829fbbd/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/a5/3ec9f74ac011d1894e0000e829fbbd/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="501567"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it will solve ur problem&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Reward points if useful..&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;P&gt;ilesh 24x7&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 18 Nov 2007 07:51:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi/m-p/3125293#M742297</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-18T07:51:26Z</dc:date>
    </item>
    <item>
      <title>Re: bapi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi/m-p/3125294#M742298</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;In Every Bapi there will be a RETURN parameter of type BAPIRET2.&lt;/P&gt;&lt;P&gt;WE PASS IT AS TABLES PARAMETERS&lt;/P&gt;&lt;P&gt;AND ALL THE ERRORS ARE COLLECTED INTO IT&lt;/P&gt;&lt;P&gt;see the sample code&lt;/P&gt;&lt;P&gt;REPORT z34332_bdc_create_material .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: la_headdata type BAPIMATHEAD,&lt;/P&gt;&lt;P&gt;la_clientdata type BAPI_MARA,&lt;/P&gt;&lt;P&gt;la_CLIENTDATAX type BAPI_MARAX,&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;la_return type BAPIRET2.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: i_materialdescription type table of BAPI_MAKT,&lt;/P&gt;&lt;P&gt;wa_materialdescription like line of i_materialdescription.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;la_headdata-MATERIAL = '000000000000000004'.&lt;/P&gt;&lt;P&gt;la_headdata-IND_SECTOR = 'M'.&lt;/P&gt;&lt;P&gt;la_headdata-MATL_TYPE = 'FERT'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;la_clientdata-BASE_UOM = 'FT3'.&lt;/P&gt;&lt;P&gt;la_CLIENTDATAX-BASE_UOM = 'X'.&lt;/P&gt;&lt;P&gt;la_clientdata-MATL_GROUP = '01'.&lt;/P&gt;&lt;P&gt;la_CLIENTDATAX-MATL_GROUP = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa_materialdescription = 'TEST'.&lt;/P&gt;&lt;P&gt;append wa_materialdescription to i_materialdescription.&lt;/P&gt;&lt;P&gt;clear: wa_materialdescription.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;headdata = la_headdata&lt;/P&gt;&lt;P&gt;CLIENTDATA = la_clientdata&lt;/P&gt;&lt;P&gt;CLIENTDATAX = la_CLIENTDATAX&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;PLANTDATA =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;PLANTDATAX =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;FORECASTPARAMETERS =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;FORECASTPARAMETERSX =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;PLANNINGDATA =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;PLANNINGDATAX =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;STORAGELOCATIONDATA =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;STORAGELOCATIONDATAX =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;VALUATIONDATA =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;VALUATIONDATAX =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;WAREHOUSENUMBERDATA =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;WAREHOUSENUMBERDATAX =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;SALESDATA =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;SALESDATAX =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;STORAGETYPEDATA =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;STORAGETYPEDATAX =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;FLAG_ONLINE = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;FLAG_CAD_CALL = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;RETURN = la_return&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;MATERIALDESCRIPTION = i_materialdescription&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;UNITSOFMEASURE =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;UNITSOFMEASUREX =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;INTERNATIONALARTNOS =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MATERIALLONGTEXT =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;TAXCLASSIFICATIONS =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;RETURNMESSAGES =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;PRTDATA =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;PRTDATAX =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;EXTENSIONIN =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;EXTENSIONINX =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;write: la_return-TYPE, ',', la_return-MESSAGE.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;clear: la_headdata, la_return, la_clientdata, la_clientdatax. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 18 Nov 2007 07:57:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi/m-p/3125294#M742298</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-18T07:57:12Z</dc:date>
    </item>
    <item>
      <title>Re: bapi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi/m-p/3125295#M742299</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 could try to use application logs.&lt;/P&gt;&lt;P&gt;Check out sample program: SBAL_DEMO_04&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;Regards,&lt;/P&gt;&lt;P&gt;Joanne&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:&lt;/P&gt;&lt;P&gt;  gs_log_handle         TYPE balloghndl,&lt;/P&gt;&lt;P&gt;  gs_control_handle     TYPE balcnthndl,&lt;/P&gt;&lt;P&gt;  gs_container          TYPE REF TO cl_gui_dialogbox_container,&lt;/P&gt;&lt;P&gt;  gs_s_log              TYPE bal_s_log,&lt;/P&gt;&lt;P&gt;  gs_t_log_handle       TYPE bal_t_logh,&lt;/P&gt;&lt;P&gt;  gs_s_msg              TYPE bal_s_msg,&lt;/P&gt;&lt;P&gt;  gs_s_display_profile  TYPE bal_s_prof,&lt;/P&gt;&lt;P&gt;  gs_msgno              TYPE bal_s_msg-msgno.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  gs_s_log-extnumber = 'APPLICATION LOG CONTROL FOR OPERATION'.&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'BAL_LOG_CREATE'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      i_s_log      = gs_s_log&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      e_log_handle = gs_log_handle&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      OTHERS       = 1.&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;             WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'BAL_DSP_LOG_PARAMETERS'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      i_log_handle  = gs_log_handle&lt;/P&gt;&lt;P&gt;      i_langu       = sy-langu&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      log_not_found = 1&lt;/P&gt;&lt;P&gt;      OTHERS        = 2.&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ADD 1 TO gs_msgno.&lt;/P&gt;&lt;P&gt;  CLEAR gs_s_msg.&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'BAL_LOG_MSG_ADD'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      i_log_handle = gs_log_handle&lt;/P&gt;&lt;P&gt;      i_s_msg      = gs_s_msg&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      OTHERS       = 1.&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;             WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Get a prepared profile&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CALL FUNCTION 'BAL_DSP_PROFILE_POPUP_GET'&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      e_s_display_profile = gs_s_display_profile&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      OTHERS              = 1.&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno&lt;/P&gt;&lt;P&gt;             WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Set report to allow saving of variants&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  gs_s_display_profile-disvariant-report = sy-repid.&lt;/P&gt;&lt;P&gt;  gs_s_display_profile-disvariant-handle = 'LOG'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'BAL_DSP_LOG_DISPLAY'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      i_s_display_profile = gs_s_display_profile&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      OTHERS              = 1.&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;           WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Nov 2007 03:54:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi/m-p/3125295#M742299</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-30T03:54:06Z</dc:date>
    </item>
    <item>
      <title>Re: bapi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi/m-p/3125296#M742300</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This message was moderated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jan 2015 15:00:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi/m-p/3125296#M742300</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-01-29T15:00:22Z</dc:date>
    </item>
  </channel>
</rss>

