<?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 Calling BAPI's one after one in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-bapi-s-one-after-one/m-p/4489268#M1062577</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;    As per requirement i need to call 3 BAPI's one after one. If any error throws by any BAPI then all changes should be rollback. Could you please tell me how can i achieve that. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    Because if i use transaction commit then its not possible to rollback ...so please advice me.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 15 Sep 2008 14:51:06 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-09-15T14:51:06Z</dc:date>
    <item>
      <title>Calling BAPI's one after one</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-bapi-s-one-after-one/m-p/4489268#M1062577</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;    As per requirement i need to call 3 BAPI's one after one. If any error throws by any BAPI then all changes should be rollback. Could you please tell me how can i achieve that. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    Because if i use transaction commit then its not possible to rollback ...so please advice me.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Sep 2008 14:51:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-bapi-s-one-after-one/m-p/4489268#M1062577</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-15T14:51:06Z</dc:date>
    </item>
    <item>
      <title>Re: Calling BAPI's one after one</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-bapi-s-one-after-one/m-p/4489269#M1062578</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You answered to your own question! Just use BAPI_TRANSACTION_COMMIT if all the 3 bapi's returned success status. Unless they are sequential, this means one need the success of the previous one. In that case, I think you cannot do it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Valter Oliveira.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Sep 2008 14:56:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-bapi-s-one-after-one/m-p/4489269#M1062578</guid>
      <dc:creator>valter_oliveira</dc:creator>
      <dc:date>2008-09-15T14:56:36Z</dc:date>
    </item>
    <item>
      <title>Re: Calling BAPI's one after one</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-bapi-s-one-after-one/m-p/4489270#M1062579</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So you mean ... only one trasaction_commit after the last BAPI ... in case if no errors found in any of the above BAPI's. ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is it correct.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Sep 2008 14:59:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-bapi-s-one-after-one/m-p/4489270#M1062579</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-15T14:59:00Z</dc:date>
    </item>
    <item>
      <title>Re: Calling BAPI's one after one</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-bapi-s-one-after-one/m-p/4489271#M1062580</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Read all the RETURN or ERROR_MESSAGE_TABLE values, with MESSAGE_TYPE  EQ 'S'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If condition satisfies call other BAPI, like wise do for all BAPIs&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;____________________________________________________&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BAPI_PROJECT_MAINTAIN'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      i_project_definition     = ipd&lt;/P&gt;&lt;P&gt;      i_project_definition_upd = iup&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      i_method_project         = imp&lt;/P&gt;&lt;P&gt;      i_wbs_element_table      = iwbs&lt;/P&gt;&lt;P&gt;      e_message_table          = it_return.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  READ TABLE it_return INTO wa_return WITH KEY message_type = 'E'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    LOOP AT it_return INTO wa_return WHERE message_type = 'E'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      WRITE &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; wa_return-message_id,wa_return-message_type,wa_return-message_text .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    READ TABLE it_return INTO wa_return WITH KEY message_type = 'S'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'BAPI_XXXXXX_XXXXX'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE it_return INTO wa_return WITH KEY message_type = 'E'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    LOOP AT it_return INTO wa_return WHERE message_type = 'E'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      WRITE &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; wa_return-message_id,wa_return-message_type,wa_return-message_text .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    LOOP AT it_return INTO wa_return WHERE message_type &amp;lt;&amp;gt; 'S'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BAPI_XXX_XXXXX'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  READ TABLE it_return INTO wa_return WITH KEY message_type = 'E'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    LOOP AT it_return INTO wa_return WHERE message_type = 'E'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      WRITE &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; wa_return-message_id,wa_return-message_type,wa_return-message_text .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    READ TABLE it_return INTO wa_return WITH KEY message_type = 'S'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    LOOP AT it_return INTO wa_return WHERE message_type &amp;lt;&amp;gt; 'S'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      WRITE &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; wa_return-message_id,wa_return-message_type,wa_return-message_text .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      &lt;/P&gt;&lt;P&gt;    ENDLOOP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Sep 2008 14:59:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-bapi-s-one-after-one/m-p/4489271#M1062580</guid>
      <dc:creator>former_member585060</dc:creator>
      <dc:date>2008-09-15T14:59:13Z</dc:date>
    </item>
    <item>
      <title>Re: Calling BAPI's one after one</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-bapi-s-one-after-one/m-p/4489272#M1062581</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;So you mean ... only one trasaction_commit after the last BAPI ... in case if no errors found in any of the above BAPI's...&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; Yes, give it a try (and post here the result). Otherwise, you cannot achieve your goal.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, if they are related to each other it won't work, like: create sales order and then create a delivery regarding that salesorder. As I said, in those cases i can only remember of workaround, not good solutions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Valter Oliveira.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Sep 2008 15:05:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-bapi-s-one-after-one/m-p/4489272#M1062581</guid>
      <dc:creator>valter_oliveira</dc:creator>
      <dc:date>2008-09-15T15:05:15Z</dc:date>
    </item>
  </channel>
</rss>

