<?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's and error handling. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-s-and-error-handling/m-p/4091812#M978451</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chris,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The way you had asked may not be possible...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If any clarifications needed check these links..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://publib.boulder.ibm.com/infocenter/wbihelp/v6rxmx/index.jsp?topic=/com.ibm.wbia_adapters.doc/doc/mysap4/mysap472.htm" target="test_blank"&gt;http://publib.boulder.ibm.com/infocenter/wbihelp/v6rxmx/index.jsp?topic=/com.ibm.wbia_adapters.doc/doc/mysap4/mysap472.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_46c/helpdata/en/a5/3ec9f74ac011d1894e0000e829fbbd/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_46c/helpdata/en/a5/3ec9f74ac011d1894e0000e829fbbd/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope you get the desired information.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Narin Nandivada.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 30 Jun 2008 21:07:11 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-06-30T21:07:11Z</dc:date>
    <item>
      <title>BAPI's and error handling.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-s-and-error-handling/m-p/4091809#M978448</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am pushing to use a BAPI on a project I am working on where we are going to create and change sales orders from an external application that will call the BAPI.  The only issue is that if there are errors, we want SAP to store them so we can process the errors directly in SAP in a similar fashion to BDC's.  Some people here want to use a BDC for the order process whereas I want to use the BAPI.  I've used BAPI's before as a means for realtime data processing but never had a request to have error handling as part of it.  Can this be done?  And if so, how?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jun 2008 20:37:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-s-and-error-handling/m-p/4091809#M978448</guid>
      <dc:creator>former_member332696</dc:creator>
      <dc:date>2008-06-30T20:37:26Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI's and error handling.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-s-and-error-handling/m-p/4091810#M978449</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Chris Castillo ,&lt;/P&gt;&lt;P&gt;                                  Your requirement is not possible using BAPI. According to the SAP Standard functionality BAPI will save a transaction (commit) or it will give the error information back.&lt;/P&gt;&lt;P&gt;Hope this answers your question.&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;Greetson&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jun 2008 20:43:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-s-and-error-handling/m-p/4091810#M978449</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-30T20:43:12Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI's and error handling.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-s-and-error-handling/m-p/4091811#M978450</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can handle errors in bapi too, as there is a table called Bapiret2 where all the errors will be stored. You classify them in to different errors like E, A, W etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And process that internal table later to roll back the updates etc.&lt;/P&gt;&lt;P&gt;If bapiret2 gives u sucess messge as S then call bapi_commit&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try out......good luck&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jun 2008 20:46:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-s-and-error-handling/m-p/4091811#M978450</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-30T20:46:25Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI's and error handling.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-s-and-error-handling/m-p/4091812#M978451</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chris,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The way you had asked may not be possible...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If any clarifications needed check these links..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://publib.boulder.ibm.com/infocenter/wbihelp/v6rxmx/index.jsp?topic=/com.ibm.wbia_adapters.doc/doc/mysap4/mysap472.htm" target="test_blank"&gt;http://publib.boulder.ibm.com/infocenter/wbihelp/v6rxmx/index.jsp?topic=/com.ibm.wbia_adapters.doc/doc/mysap4/mysap472.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_46c/helpdata/en/a5/3ec9f74ac011d1894e0000e829fbbd/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_46c/helpdata/en/a5/3ec9f74ac011d1894e0000e829fbbd/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope you get the desired information.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Narin Nandivada.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jun 2008 21:07:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-s-and-error-handling/m-p/4091812#M978451</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-30T21:07:11Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI's and error handling.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-s-and-error-handling/m-p/4091813#M978452</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chris,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls chk this code as example for BAPI and message handling.&lt;/P&gt;&lt;P&gt;Pls modify this code as per the standards. Like not using tables with header line etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  ZH_BAPI_CC_01                           .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES : BEGIN OF tw_output,&lt;/P&gt;&lt;P&gt;            kostl TYPE kostl,&lt;/P&gt;&lt;P&gt;            datab TYPE datab,&lt;/P&gt;&lt;P&gt;            datbi TYPE datbi,&lt;/P&gt;&lt;P&gt;            ktext TYPE ktext,&lt;/P&gt;&lt;P&gt;            verak TYPE verak,&lt;/P&gt;&lt;P&gt;            kosar TYPE kosar,&lt;/P&gt;&lt;P&gt;            khinr TYPE khinr,&lt;/P&gt;&lt;P&gt;            bukrs TYPE bukrs,&lt;/P&gt;&lt;P&gt;            gsber TYPE gsber,&lt;/P&gt;&lt;P&gt;            prctr TYPE prctr,&lt;/P&gt;&lt;P&gt;        END OF tw_output,&lt;/P&gt;&lt;P&gt;        tt_output TYPE STANDARD TABLE OF tw_output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA :  lw_output TYPE tw_output,&lt;/P&gt;&lt;P&gt;        lt_output TYPE tt_output,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        ccil      TYPE bapi0012_ccinputlist OCCURS 0 WITH HEADER LINE,&lt;/P&gt;&lt;P&gt;        &lt;STRONG&gt;lt_return TYPE bapiret2 OCCURS 0 WITH HEADER LINE,&lt;/STRONG&gt;        wa_kokrs  TYPE bapi0012_gen-co_area,&lt;/P&gt;&lt;P&gt;        kokrs     TYPE kokrs,&lt;/P&gt;&lt;P&gt;        lf_path   TYPE string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.&lt;/P&gt;&lt;P&gt;          PARAMETERS: conarea TYPE kokrs,&lt;/P&gt;&lt;P&gt;                      filepath TYPE rlgrap-filename.&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN END OF BLOCK b1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN ON VALUE-REQUEST FOR filepath.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'F4_FILENAME'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      program_name  = syst-cprog&lt;/P&gt;&lt;P&gt;      dynpro_number = syst-dynnr&lt;/P&gt;&lt;P&gt;      field_name    = ' '&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      file_name     = filepath.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa_kokrs = conarea.&lt;/P&gt;&lt;P&gt;lf_path = filepath.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'GUI_UPLOAD'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    filename                      = lf_path&lt;/P&gt;&lt;P&gt;    filetype                      = 'ASC'&lt;/P&gt;&lt;P&gt;    has_field_separator           = 'X'&lt;/P&gt;&lt;P&gt;  TABLES&lt;/P&gt;&lt;P&gt;    data_tab                      = lt_output&lt;/P&gt;&lt;P&gt;  EXCEPTIONS&lt;/P&gt;&lt;P&gt;    FILE_OPEN_ERROR               = 1&lt;/P&gt;&lt;P&gt;    FILE_READ_ERROR               = 2&lt;/P&gt;&lt;P&gt;    NO_BATCH                      = 3&lt;/P&gt;&lt;P&gt;    GUI_REFUSE_FILETRANSFER       = 4&lt;/P&gt;&lt;P&gt;    INVALID_TYPE                  = 5&lt;/P&gt;&lt;P&gt;    NO_AUTHORITY                  = 6&lt;/P&gt;&lt;P&gt;    UNKNOWN_ERROR                 = 7&lt;/P&gt;&lt;P&gt;    BAD_DATA_FORMAT               = 8&lt;/P&gt;&lt;P&gt;    HEADER_NOT_ALLOWED            = 9&lt;/P&gt;&lt;P&gt;    SEPARATOR_NOT_ALLOWED         = 10&lt;/P&gt;&lt;P&gt;    HEADER_TOO_LONG               = 11&lt;/P&gt;&lt;P&gt;    UNKNOWN_DP_ERROR              = 12&lt;/P&gt;&lt;P&gt;    ACCESS_DENIED                 = 13&lt;/P&gt;&lt;P&gt;    DP_OUT_OF_MEMORY              = 14&lt;/P&gt;&lt;P&gt;    DISK_FULL                     = 15&lt;/P&gt;&lt;P&gt;    DP_TIMEOUT                    = 16&lt;/P&gt;&lt;P&gt;    OTHERS                        = 17.&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;   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;P&gt;IF NOT lt_output IS INITIAL.&lt;/P&gt;&lt;P&gt;   LOOP AT lt_output INTO lw_output.&lt;/P&gt;&lt;P&gt;        MOVE : lw_output-kostl TO ccil-costcenter,&lt;/P&gt;&lt;P&gt;               lw_output-datab TO ccil-valid_from,&lt;/P&gt;&lt;P&gt;               lw_output-datbi TO ccil-valid_to,&lt;/P&gt;&lt;P&gt;               lw_output-ktext TO ccil-name,&lt;/P&gt;&lt;P&gt;               lw_output-verak TO ccil-person_in_charge,&lt;/P&gt;&lt;P&gt;               lw_output-kosar TO ccil-costcenter_type,&lt;/P&gt;&lt;P&gt;               lw_output-khinr TO ccil-costctr_hier_grp,&lt;/P&gt;&lt;P&gt;               lw_output-bukrs TO ccil-comp_code,&lt;/P&gt;&lt;P&gt;               lw_output-gsber TO ccil-bus_area,&lt;/P&gt;&lt;P&gt;               lw_output-prctr TO ccil-profit_ctr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         append ccil.&lt;/P&gt;&lt;P&gt;         clear lw_output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      CALL FUNCTION 'BAPI_COSTCENTER_CREATEMULTIPLE'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;         controllingarea            = wa_kokrs&lt;/P&gt;&lt;P&gt;       TABLES&lt;/P&gt;&lt;P&gt;         costcenterlist             = ccil&lt;/P&gt;&lt;P&gt;         return                     = lt_return&lt;/P&gt;&lt;P&gt;                     .&lt;/P&gt;&lt;P&gt;      &lt;STRONG&gt;CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      &lt;STRONG&gt;IF NOT lt_return[] IS INITIAL.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;         &lt;STRONG&gt;CALL FUNCTION 'BAPI_MESSAGE_GETDETAIL'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;           &lt;STRONG&gt;EXPORTING&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;              &lt;STRONG&gt;id                = sy-msgid&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;              &lt;STRONG&gt;number            = sy-msgno&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;              &lt;STRONG&gt;language          = sy-langu&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;              &lt;STRONG&gt;textformat        = 'ASC'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;              &lt;STRONG&gt;message_v1        = sy-msgv1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;              &lt;STRONG&gt;message_v2        = sy-msgv2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;              &lt;STRONG&gt;message_v3        = sy-msgv3&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;              &lt;STRONG&gt;message_v4        = sy-msgv4&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;           &lt;STRONG&gt;IMPORTING&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;              &lt;STRONG&gt;message           = LT_RETURN-MESSAGE&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;           &lt;STRONG&gt;return            = lt_return&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;                  &lt;STRONG&gt;.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;           &lt;STRONG&gt;WRITE: / LT_RETURN-MESSAGE.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;        &lt;STRONG&gt;ELSE.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;           &lt;STRONG&gt;MESSAGE i002(zrept).&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;      &lt;STRONG&gt;ENDIF.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;   &lt;STRONG&gt;ENDLOOP.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ENDIF.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Chandralekha.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Jul 2008 00:57:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-s-and-error-handling/m-p/4091813#M978452</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-01T00:57:57Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI's and error handling.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-s-and-error-handling/m-p/4091814#M978453</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chris,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We are having a similar scenario, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My suggestion is, once you have all the required sales order data to be passed to the BAPI, store this data as records in a custom table ( as flat records, with key fields, like the date, PO # , customer, file name , etc ) and this can be a back up. If the BAPI fails to create SO,  you can have these orders stored into the database as a backup for reprocessing using either BDC or BAPI.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Jul 2008 01:12:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-s-and-error-handling/m-p/4091814#M978453</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-01T01:12:24Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI's and error handling.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-s-and-error-handling/m-p/4091815#M978454</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;bapis hav a return table which hold all kinds of messages, u can filter out error messages and handle them in sap.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Jul 2008 03:29:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-s-and-error-handling/m-p/4091815#M978454</guid>
      <dc:creator>former_member188827</dc:creator>
      <dc:date>2008-07-01T03:29:11Z</dc:date>
    </item>
  </channel>
</rss>

