<?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 Commit Work in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work/m-p/4161863#M995011</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is the difference between Commit Work and using BAPI_TRANSACTION_COMMIT. when should we use each of these.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Salil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 24 Jul 2008 16:31:41 GMT</pubDate>
    <dc:creator>former_member188001</dc:creator>
    <dc:date>2008-07-24T16:31:41Z</dc:date>
    <item>
      <title>Commit Work</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work/m-p/4161863#M995011</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is the difference between Commit Work and using BAPI_TRANSACTION_COMMIT. when should we use each of these.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Salil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jul 2008 16:31:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work/m-p/4161863#M995011</guid>
      <dc:creator>former_member188001</dc:creator>
      <dc:date>2008-07-24T16:31:41Z</dc:date>
    </item>
    <item>
      <title>Re: Commit Work</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work/m-p/4161864#M995012</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 see the code of the BAPI_TRANSACTION_COMMIT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
IF WAIT EQ SPACE.
  COMMIT WORK.
ELSE.
  COMMIT WORK AND WAIT.
  IF SY-SUBRC NE 0.
    CALL FUNCTION 'BALW_BAPIRETURN_GET2'
         EXPORTING
              TYPE       = 'E'
              CL         = 'S&amp;amp;'
              NUMBER     = '150'
         IMPORTING
              RETURN     = RETURN.
  ENDIF.
ENDIF.
CALL FUNCTION 'BUFFER_REFRESH_ALL'.
ENDFUNCTION.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;COMMIT WORK IS INTERNALLY USED.&lt;/P&gt;&lt;P&gt;It further provides BAPIRET2 structure as output ,waits and refresh.&lt;/P&gt;&lt;P&gt;So it is always better to use this while using the BAPI.&lt;/P&gt;&lt;P&gt;And there is a rule that..Dont ever write Commit work inside the bapi call.Always use this function after the completion of the BAPI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you call BAPIs in your program that change data in the R/3 System,afterwards you must call this method to write the changes to the database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;commit work&lt;/P&gt;&lt;P&gt;Executes a database commit and thus closes a Logical Unit of Work &lt;/P&gt;&lt;P&gt;All database updates are made irrevocable and cannot be reversed with ROLLBACK WORK &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All database locks are released. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jul 2008 16:43:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work/m-p/4161864#M995012</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-24T16:43:02Z</dc:date>
    </item>
    <item>
      <title>Re: Commit Work</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work/m-p/4161865#M995013</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi check this...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As of Release 4.0 BAPIs must not execute 'COMMIT WORK' commands. Because The caller should have control of the transaction. Several BAPIs should be able to be combined within one LUW. &lt;/P&gt;&lt;P&gt;The BAPI's created with new guidelines will not have COMMIT WORK or&lt;/P&gt;&lt;P&gt;ROLLBACK Statement in it. Based on the Failure/Success of the BAPI we have to explicitly call BAPI_TRANSACTION_ROLLBACK and BAPI_TRANSACTION_COMMIT which will have &lt;/P&gt;&lt;P&gt;ROLLBACK WORK or COMMIT WORK Respectively in it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Commit work is used when you code directly in ABAP and make changes in the database and &lt;/P&gt;&lt;P&gt;want to commit the database. &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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jul 2008 16:44:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work/m-p/4161865#M995013</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-24T16:44:02Z</dc:date>
    </item>
    <item>
      <title>Re: Commit Work</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work/m-p/4161866#M995014</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Both are same except the message handling.&lt;/P&gt;&lt;P&gt;(WAIT we can use with COMMIT WORK) ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;COMMIT WORK we have to manually handle the sy-subrc check.&lt;/P&gt;&lt;P&gt;But in that function BAPI_TRANSACTION_COMMIT it is handled.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jul 2008 16:47:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work/m-p/4161866#M995014</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-24T16:47:31Z</dc:date>
    </item>
    <item>
      <title>Re: Commit Work</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work/m-p/4161867#M995015</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The question is closed. I looked at coupel of standard documents to clarify this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Aug 2008 19:09:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work/m-p/4161867#M995015</guid>
      <dc:creator>former_member188001</dc:creator>
      <dc:date>2008-08-19T19:09:22Z</dc:date>
    </item>
  </channel>
</rss>

