<?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 Commit in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-commit/m-p/3346151#M802389</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;BAPI_TRANSACTION_COMMIT is used when you make changes to the SAP database by calling &lt;/P&gt;&lt;P&gt;a BAPI from outside SAP and want to commit the database. When you use a BAPI, you can not &lt;/P&gt;&lt;P&gt;directly use commit work, instead you are allowed to use only  &lt;/P&gt;&lt;P&gt;BAPI_TRANSACTION_COMMIT. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BAPI_TRANSACTION_COMMIT is used with some of the BAPIs.&lt;/P&gt;&lt;P&gt;incase you call the bapi inside a loop, then the BAPI_TRANSACTION_COMMIT also has to be called inside the loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward points if useful..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 06 Feb 2008 05:02:46 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-02-06T05:02:46Z</dc:date>
    <item>
      <title>BAPI Commit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-commit/m-p/3346148#M802386</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a question on how BAPI_TRANSACTION_COMMIT functions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  CALL FUNCTION BAPI_...&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;BAPI_TRANSACTION_COMMIT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this case will calling the Commit after the loop endloop commit all posted documents or will it commit only the last transaction?&lt;/P&gt;&lt;P&gt;I know that the commit inside the loop will commit the document but how does it function if we have it outside the loop?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Feb 2008 21:40:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-commit/m-p/3346148#M802386</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-05T21:40:09Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI Commit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-commit/m-p/3346149#M802387</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi..&lt;/P&gt;&lt;P&gt;If you don;t put te COMMIT inside the loop, you might get 'locking issues'.&lt;/P&gt;&lt;P&gt;if you put the COMMIT outside the loop, most prob only one 'lucky' record might get committed&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;~Arun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Feb 2008 21:48:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-commit/m-p/3346149#M802387</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-05T21:48:37Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI Commit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-commit/m-p/3346150#M802388</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This method executes a COMMIT WORK command. It is required for transactions developed externally to the R/3 system that change data in the R/3 system via BAPI calls. When you call BAPIs in your program that change data in the R/3 system,afterwards you must call this method to write changes to database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This has an importing parameter WAIT, if WAIT is blank or SPACE, only a COMMIT work is executed, if it is filled with some value, the system executes a COMMIT WORK AND WAIT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the commit is not executed properly then exporting parameter RETURN will have a value indicating the user that it got error, this happens only when a WAIT (importing parameter) is set to some value. But WAIT is kept blank and the commit doesn't get executed properly then system crashes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this explains you better.Please reward points.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;In your case&lt;/STRONG&gt;, you should put it inside the LOOP ....ENDLOOP if the FM BAPI_.... handles the locking th*en there is no problem. But keeping outside will not COMMIT all the records, it will do only the last one.But remember to handle the locking.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Deepti..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Deepti Kaza on Feb 5, 2008 11:00 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Feb 2008 21:57:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-commit/m-p/3346150#M802388</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-05T21:57:01Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI Commit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-commit/m-p/3346151#M802389</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;BAPI_TRANSACTION_COMMIT is used when you make changes to the SAP database by calling &lt;/P&gt;&lt;P&gt;a BAPI from outside SAP and want to commit the database. When you use a BAPI, you can not &lt;/P&gt;&lt;P&gt;directly use commit work, instead you are allowed to use only  &lt;/P&gt;&lt;P&gt;BAPI_TRANSACTION_COMMIT. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BAPI_TRANSACTION_COMMIT is used with some of the BAPIs.&lt;/P&gt;&lt;P&gt;incase you call the bapi inside a loop, then the BAPI_TRANSACTION_COMMIT also has to be called inside the loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward points if useful..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Feb 2008 05:02:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-commit/m-p/3346151#M802389</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-06T05:02:46Z</dc:date>
    </item>
  </channel>
</rss>

