<?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 Can i use BAPI_COMMIT/BAPI_ROLLBACK to commit/rollback more BAPI actions? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/can-i-use-bapi-commit-bapi-rollback-to-commit-rollback-more-bapi-actions/m-p/2764760#M643752</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi to all,&lt;/P&gt;&lt;P&gt; may i use BAPI_TRANSACTION_COMMIT to commit two BAPIs or BAPI_TRANSACTION_ROLLBACK to rollback two BAPIs?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pratical example.&lt;/P&gt;&lt;P&gt;I call BAPI_OUTB_DELIVERY_CHANGE to delete a delivery. &lt;/P&gt;&lt;P&gt;After i have to call BAPI_PO_CHANGE to change a transfer order.&lt;/P&gt;&lt;P&gt;(The example uses the real BAPI i'll have to use in my code).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need that if the second BAPI goes wrong (there are error messages) the first one (and the second) should be rolled-back.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Code-example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
call function 'BAPI_OUTB_DELIVERY_CHANGE'
 exporting .....

...other code lines ....


call function 'BAPI_PO_CHANGE'
 exporting .....

if sy-subrc eq 0. "means return_tab contains no errors
 call function 'BAPI_TRANSACTION_COMMIT'.
else.
 call function 'BAPI_TRANSACTION_ROLLBACK'.
endif.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This code will work, or the rollback will reset only the second bapi db-actions (means that cannot rollback the delivery delete)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thx a lot&lt;/P&gt;&lt;P&gt;Andrea&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 11 Sep 2007 11:54:32 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-09-11T11:54:32Z</dc:date>
    <item>
      <title>Can i use BAPI_COMMIT/BAPI_ROLLBACK to commit/rollback more BAPI actions?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/can-i-use-bapi-commit-bapi-rollback-to-commit-rollback-more-bapi-actions/m-p/2764760#M643752</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi to all,&lt;/P&gt;&lt;P&gt; may i use BAPI_TRANSACTION_COMMIT to commit two BAPIs or BAPI_TRANSACTION_ROLLBACK to rollback two BAPIs?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pratical example.&lt;/P&gt;&lt;P&gt;I call BAPI_OUTB_DELIVERY_CHANGE to delete a delivery. &lt;/P&gt;&lt;P&gt;After i have to call BAPI_PO_CHANGE to change a transfer order.&lt;/P&gt;&lt;P&gt;(The example uses the real BAPI i'll have to use in my code).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need that if the second BAPI goes wrong (there are error messages) the first one (and the second) should be rolled-back.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Code-example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
call function 'BAPI_OUTB_DELIVERY_CHANGE'
 exporting .....

...other code lines ....


call function 'BAPI_PO_CHANGE'
 exporting .....

if sy-subrc eq 0. "means return_tab contains no errors
 call function 'BAPI_TRANSACTION_COMMIT'.
else.
 call function 'BAPI_TRANSACTION_ROLLBACK'.
endif.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This code will work, or the rollback will reset only the second bapi db-actions (means that cannot rollback the delivery delete)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thx a lot&lt;/P&gt;&lt;P&gt;Andrea&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Sep 2007 11:54:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/can-i-use-bapi-commit-bapi-rollback-to-commit-rollback-more-bapi-actions/m-p/2764760#M643752</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-11T11:54:32Z</dc:date>
    </item>
    <item>
      <title>Re: Can i use BAPI_COMMIT/BAPI_ROLLBACK to commit/rollback more BAPI actions?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/can-i-use-bapi-commit-bapi-rollback-to-commit-rollback-more-bapi-actions/m-p/2764761#M643753</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;AFAIK, BAPI_COMMIT or BAPI_ROLLBACK will work for the last executed BAPI...So you better consider put one call per BAPI...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greetings,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Blag.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Sep 2007 22:26:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/can-i-use-bapi-commit-bapi-rollback-to-commit-rollback-more-bapi-actions/m-p/2764761#M643753</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-11T22:26:20Z</dc:date>
    </item>
  </channel>
</rss>

