<?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: Commit work in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work/m-p/2882422#M677022</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;&amp;lt;b&amp;gt;ROLLBACK WORK.&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;The statement ROLLBACK WORK closes the current SAP-LUW and opens a new one. In doing so, all change requests of the current SAP-LUW are canceled. To do this, ROLLBACK WORK carries out the following actions: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Executes all subprograms registered with PERFORM ON ROLLBACK. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Deletes all subprograms registered with PERFORM ON COMMIT. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Raises an internal exception in the Object Services that makes sure that the attributes of persistent objects are initialised. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Deletes all update function modules registered with CALL FUNCTION ...IN UPDATE TASK from the VBLOG and deletes all transactional remote Function Calls registered with CALL FUNCTION ... IN BACKGROUND TASK from ARFCSSTATE and from ARFCSDATA. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Removal of all SAP locks set in the current program in which the formal parameter _SCOPE of the lock function module was set to the value 2. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Triggers a database rollback, which also ends the current database-LUW. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After completion of the statement COMMIT WORK, the event TRANSACTION_FINISHED of the system class CL_SYSTEM_TRANSACTION_STATE is raised, in which the parameter KIND has the value of the constant CL_SYSTEM_TRANSACTION_STATE=&amp;gt;ROLLBACK_WORK.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 21 Sep 2007 09:18:39 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-09-21T09:18:39Z</dc:date>
    <item>
      <title>Commit work</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work/m-p/2882420#M677020</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  I have some problems..maybe you have suggestions...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; I fill some internal table in a loop, which is included in an open cursor ...close cursor instruction. &lt;/P&gt;&lt;P&gt;  Outside the loop, but in the same open cursor ...close cursor instruction, I move the records from the internal table into a database table.&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;  Now..the purpose is to write a commit work to obtain the best performance. &lt;/P&gt;&lt;P&gt;I want that commit work to follow the insert into database table , but the cursor looses its index.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt; So I want to find a way to work with cursor and commit.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help .&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>Fri, 21 Sep 2007 07:59:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work/m-p/2882420#M677020</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-21T07:59:39Z</dc:date>
    </item>
    <item>
      <title>Re: Commit work</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work/m-p/2882421#M677021</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;&amp;lt;b&amp;gt;COMMIT WORK [AND WAIT].&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The statement COMMIT WORK completes the current SAP LUW and opens a new one, storing all change requests for the currenta SAP LUW in the process. In this case, COMMIT WORK performs the following actions: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It executes all subroutines registered using PERFORM ON COMMIT. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It triggers an internal event in Object Services that ensures the registration of changes in persistent objects as the last update function module, as well as the subsequent initialization of persistent object attributes. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It initiates the processing of all registered update function modules in the update work process. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This executes all high-priority update function modules registered using CALL FUNCTION ... IN UPDATE TASK in the order of their registration and in a common database LUW. If you do not specify the addition AND WAIT, the program does not wait until the update work process has executed it (asynchronous updating). If you specify the addition AND WAIT, however, program processing after COMMIT WORK will not continue until the update work process has executed the high-priority update function modules (synchronous updating). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If all high-priority update function modules are completed successfully, the statement executes the low-priority update function modules together in a common database LUW. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In parallel, it also executes the individual function modules registered using CALL FUNCTION ... IN BACKGROUND TASK DESTINATION in a separate database LUW for each destination. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It handles all SAP locks set in the current program according to the value of the formal parameter _SCOPE of the corresponding lock function modules. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It triggers a database commit that also terminates the current database LUW. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The completion of statement COMMIT WORK triggers the event TRANSACTION_FINISHED of the system class CL_SYSTEM_TRANSACTION_STATE, where the parameter KIND has the value of the constant CL_SYSTEM_TRANSACTION_STATE=&amp;gt;COMMIT_WORK. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the statement COMMIT WORK is executed by calling special programs, be aware of the following: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In a program executed using batch input, or if you have called the program using the USING addition of the statement CALL TRANSACTION, COMMIT WORK terminates the batch input processing when using the corresponding settings. &lt;/P&gt;&lt;P&gt;In a program called using CALL DIALOG, COMMIT WORK initiates the processing of subroutines or updated function modules registered using PERFORM ... ON COMMIT and CALL FUNCTION ... IN UPDATE TASK. Therefore, it does not complete the current SAP LUW. The SAP LUW cannot be completed until you execute the COMMIT WORK statement in the calling program. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You cannot execute the COMMIT WORK statement during the updating procedure or during the execution of subroutines registered using PERFORM ... ON {COMMIT|ROLLBACK}. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;System fields&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;sy-subrc&amp;lt;/b&amp;gt; Meaning &lt;/P&gt;&lt;P&gt;0 You have specified the AND WAIT addition, and the updating of the update function modules was successful. &lt;/P&gt;&lt;P&gt;4 You have specified the AND WAIT addition, and the updating of the update function modules was not successful. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The COMMIT WORK statement always sets sy-subrc to 0 if the AND WAIT addition is not specified. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The COMMIT WORK statement closes all database cursors . Open SQL statements that access a database cursor later ( SELECT loop and FETCH) raise an exception that cannot be handled. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REward if usefull&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Sep 2007 09:15:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work/m-p/2882421#M677021</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-21T09:15:51Z</dc:date>
    </item>
    <item>
      <title>Re: Commit work</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work/m-p/2882422#M677022</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;&amp;lt;b&amp;gt;ROLLBACK WORK.&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;The statement ROLLBACK WORK closes the current SAP-LUW and opens a new one. In doing so, all change requests of the current SAP-LUW are canceled. To do this, ROLLBACK WORK carries out the following actions: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Executes all subprograms registered with PERFORM ON ROLLBACK. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Deletes all subprograms registered with PERFORM ON COMMIT. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Raises an internal exception in the Object Services that makes sure that the attributes of persistent objects are initialised. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Deletes all update function modules registered with CALL FUNCTION ...IN UPDATE TASK from the VBLOG and deletes all transactional remote Function Calls registered with CALL FUNCTION ... IN BACKGROUND TASK from ARFCSSTATE and from ARFCSDATA. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Removal of all SAP locks set in the current program in which the formal parameter _SCOPE of the lock function module was set to the value 2. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Triggers a database rollback, which also ends the current database-LUW. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After completion of the statement COMMIT WORK, the event TRANSACTION_FINISHED of the system class CL_SYSTEM_TRANSACTION_STATE is raised, in which the parameter KIND has the value of the constant CL_SYSTEM_TRANSACTION_STATE=&amp;gt;ROLLBACK_WORK.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Sep 2007 09:18:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work/m-p/2882422#M677022</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-21T09:18:39Z</dc:date>
    </item>
  </channel>
</rss>

