<?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 general SAP rules for when to commit and when to rollback in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-general-sap-rules-for-when-to-commit-and-when-to-rollback/m-p/1809594#M347232</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Raj,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the response.  I already do an explicit "COMMIT WORK AND WAIT", and the BAPI is already preceded with a "SET UPDATE TASK LOCAL".  What is the benefit of using BAPI_TRANSACTION_COMMIT versus just doing the commit directly in the body of the calling program?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, I already do this commit if the billing document number is passed.  BUT, I then loop through the return table and rollback and exit if I stumble across a 'E'. (No harm in a rollback after a commit, just won't find anything to rollback.)  BUT, I only do that if VBUK-FKSTK (Billing status) is not set to 'completed'.  I throw in that last condition because I don't want to rollback if it's not posted to accouting for whatever reason.  Perhaps I should not be making the rollback conditional on that field, however I imagine there are some E's where a rollback isn't absolutely necessary??  I wonder what SAP's take on this would be.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 12 Dec 2006 16:50:36 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-12-12T16:50:36Z</dc:date>
    <item>
      <title>BAPI general SAP rules for when to commit and when to rollback</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-general-sap-rules-for-when-to-commit-and-when-to-rollback/m-p/1809592#M347230</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Most standard BAPI's utilize a return table.  This return table can have many possible message types after the BAPI has been executed (i.e. S Success, E Error, W Warning, I Info, A Abort).  For standard delivered BAPI's, does SAP have any guidelines that it tries to generally enforce amongst its delivered BAPI's as to when the calling program should commit or rollback based on these message types?  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example:  If a resulting message type equals A and E, then you should ALWAYS rollback.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've scanned through a lot of SAP documentation and posts on here, and I've seen conflicting recommendations as when to rollback.  Some say rollback on A, and commit on E, and others say rollback for both A and E.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Perhaps there really is no general guideline, in that case, my question pertains specifically to BAPI_BILLINGDOC_CREATEMULTIPLE.  There is no documentation for it as when to commit and when to rollback.  The BAPI is used to create billings documents.  A common R/3 error is that when a billing document is created, it is not released to accounting for whatever reason.  I believe this will produce an "E" type message, however, I really don't care about the accounting document and wouldn't want to rollback in this case.  (After all, standard VF01 doesn't rollback in that case!)  BUT, I suspect there may be some legitimate errors of type "E" when a rollback would be absolutely necessary???  (I ask the question as I've seen a billing document number appear in a doc flow of a delivery that was never successfully invoiced -- seems to me that a rollback wasn't performed to cleanup after a hiccup in the BAPI call.)  Also, the BAPI has a SUCCESS tab, however I don't believe its contents alone can be used to reliably decide to commit or rollback.   &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyone have any experience with this or suggestions?  I'll be sure to reward points for a quality answer.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Dec 2006 23:06:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-general-sap-rules-for-when-to-commit-and-when-to-rollback/m-p/1809592#M347230</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-11T23:06:33Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI general SAP rules for when to commit and when to rollback</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-general-sap-rules-for-when-to-commit-and-when-to-rollback/m-p/1809593#M347231</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Paul,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can goahead and commit using BAPI_TRANSACTION_COMMIT, when you find the Billing document number created in the BAPI_RETURN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Generally, if the return consists any of 'AEX', we roll back the changes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Dec 2006 01:38:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-general-sap-rules-for-when-to-commit-and-when-to-rollback/m-p/1809593#M347231</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-12T01:38:46Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI general SAP rules for when to commit and when to rollback</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-general-sap-rules-for-when-to-commit-and-when-to-rollback/m-p/1809594#M347232</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Raj,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the response.  I already do an explicit "COMMIT WORK AND WAIT", and the BAPI is already preceded with a "SET UPDATE TASK LOCAL".  What is the benefit of using BAPI_TRANSACTION_COMMIT versus just doing the commit directly in the body of the calling program?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, I already do this commit if the billing document number is passed.  BUT, I then loop through the return table and rollback and exit if I stumble across a 'E'. (No harm in a rollback after a commit, just won't find anything to rollback.)  BUT, I only do that if VBUK-FKSTK (Billing status) is not set to 'completed'.  I throw in that last condition because I don't want to rollback if it's not posted to accouting for whatever reason.  Perhaps I should not be making the rollback conditional on that field, however I imagine there are some E's where a rollback isn't absolutely necessary??  I wonder what SAP's take on this would be.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Dec 2006 16:50:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-general-sap-rules-for-when-to-commit-and-when-to-rollback/m-p/1809594#M347232</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-12T16:50:36Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI general SAP rules for when to commit and when to rollback</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-general-sap-rules-for-when-to-commit-and-when-to-rollback/m-p/1809595#M347233</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Paul,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Have you got the solution,, if so means Kindly guide me....i too stuck in the portion..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Mar 2011 14:54:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-general-sap-rules-for-when-to-commit-and-when-to-rollback/m-p/1809595#M347233</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-03-11T14:54:10Z</dc:date>
    </item>
  </channel>
</rss>

