<?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: Why we cannot commit inside BAPI and what if we call workflow inside BAPI? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/why-we-cannot-commit-inside-bapi-and-what-if-we-call-workflow-inside-bapi/m-p/5935295#M1333656</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;If you are calling the BAPI inside  your custom code, then you can comit the after the bapi is executed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But if the BAPI is triggering the workflow or any ohter object, then you should not write the commit inside the BAPI as the Logical Unit of work will not be satisfied.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Only the commit should happen after the transaction is successfully completed else the automatic rollback should occur..&lt;/P&gt;&lt;P&gt;This is called as Logical unit of work(LUW) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Shiva&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 19 Jul 2009 14:03:19 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-07-19T14:03:19Z</dc:date>
    <item>
      <title>Why we cannot commit inside BAPI and what if we call workflow inside BAPI?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/why-we-cannot-commit-inside-bapi-and-what-if-we-call-workflow-inside-bapi/m-p/5935293#M1333654</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;can anyone tell me why we cannot use Commit statement inside BAPI ?&lt;/P&gt;&lt;P&gt;Also what if in my BAPI ,i have triggered my workflow and through that can i commit??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mayank&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 18 Jul 2009 18:07:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/why-we-cannot-commit-inside-bapi-and-what-if-we-call-workflow-inside-bapi/m-p/5935293#M1333654</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-18T18:07:48Z</dc:date>
    </item>
    <item>
      <title>Re: Why we cannot commit inside BAPI and what if we call workflow inside BAPI?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/why-we-cannot-commit-inside-bapi-and-what-if-we-call-workflow-inside-bapi/m-p/5935294#M1333655</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;it is a part of the BAPI programming model that BAPIs use a certain transaction model. This transaction model says that one BAPI has to follow the so called ACID (atomar, consistent, isolated, durable) principle. To ensure that a BAPI is atomar you cannot put a commit work just anywhere in mid of a BAPI as this would violate the modell. Furthermore BAPIs shall allow external commit handling that means it has to be possible to include several BAPI calls in one LUW. For this there are BAPIs which are only for committing or rolling back a transaction. For more detailed information you can check as usual the SAP help [click me|http://help.sap.com/saphelp_nw04/helpdata/EN/a5/3ec8654ac011d1894e0000e829fbbd/frameset.htm]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If would suppose that when you throw a workflow event it is triggered once the LUW is closed. At least SAP should work that way. But I have to admit in newer ABAP OO developments SAP often just calls the Event raising function module with the option to not wait for the DB commit. Seems there are some problems with the newer LUW concepts / OO and the old workflow technology. This can lead in worst case to events raised for objects which were rolled back later but SAP seems to accept that so it is in my oppinion an acceptable solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps a bit&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Roman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 18 Jul 2009 20:14:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/why-we-cannot-commit-inside-bapi-and-what-if-we-call-workflow-inside-bapi/m-p/5935294#M1333655</guid>
      <dc:creator>romanweise</dc:creator>
      <dc:date>2009-07-18T20:14:58Z</dc:date>
    </item>
    <item>
      <title>Re: Why we cannot commit inside BAPI and what if we call workflow inside BAPI?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/why-we-cannot-commit-inside-bapi-and-what-if-we-call-workflow-inside-bapi/m-p/5935295#M1333656</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;If you are calling the BAPI inside  your custom code, then you can comit the after the bapi is executed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But if the BAPI is triggering the workflow or any ohter object, then you should not write the commit inside the BAPI as the Logical Unit of work will not be satisfied.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Only the commit should happen after the transaction is successfully completed else the automatic rollback should occur..&lt;/P&gt;&lt;P&gt;This is called as Logical unit of work(LUW) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Shiva&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 19 Jul 2009 14:03:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/why-we-cannot-commit-inside-bapi-and-what-if-we-call-workflow-inside-bapi/m-p/5935295#M1333656</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-19T14:03:19Z</dc:date>
    </item>
    <item>
      <title>Re: Why we cannot commit inside BAPI and what if we call workflow inside BAPI?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/why-we-cannot-commit-inside-bapi-and-what-if-we-call-workflow-inside-bapi/m-p/5935296#M1333657</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;As per the data you have given ,than i dont think from my workflow i can commit as it will again call a new LUW which doesnt fulfills ACID rules..&lt;/P&gt;&lt;P&gt;or if i didnot explain properly,then i will try to explain again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have written a Z Bapi , and inside that i have to call my workflow through which i have to commit.&lt;/P&gt;&lt;P&gt;Is it possible to commit in workflow? if yes than how??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Mayank&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 19 Jul 2009 19:19:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/why-we-cannot-commit-inside-bapi-and-what-if-we-call-workflow-inside-bapi/m-p/5935296#M1333657</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-19T19:19:05Z</dc:date>
    </item>
    <item>
      <title>Re: Why we cannot commit inside BAPI and what if we call workflow inside BAPI?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/why-we-cannot-commit-inside-bapi-and-what-if-we-call-workflow-inside-bapi/m-p/5935297#M1333658</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;This thread will answer properly the question asked.&lt;/P&gt;&lt;P&gt;For more details on this topic you can visit to the link below:&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/EN/a5/3ec8654ac011d1894e0000e829fbbd/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/EN/a5/3ec8654ac011d1894e0000e829fbbd/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: mayank verdia on Jul 19, 2009 9:27 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 19 Jul 2009 19:27:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/why-we-cannot-commit-inside-bapi-and-what-if-we-call-workflow-inside-bapi/m-p/5935297#M1333658</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-19T19:27:20Z</dc:date>
    </item>
  </channel>
</rss>

