<?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 in module pool in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-in-module-pool/m-p/1826937#M352716</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Amit..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WELCOME TO SDN&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;COMMIT &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Variants: &lt;/P&gt;&lt;P&gt;1. COMMIT WORK. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. COMMIT CONNECTION con. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;Executes a database commit and thus closes a Logical Unit of Work ( LUW) (see also Transaction Processing). This means that: &lt;/P&gt;&lt;P&gt;&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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;COMMIT WORK belongs to the Open-SQL command set. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Variant 1 &lt;/P&gt;&lt;P&gt;COMMIT WORK. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition: &lt;/P&gt;&lt;P&gt;... AND WAIT &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;COMMIT WORK also &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Calls the subroutines specified by PERFORM ... ON COMMIT &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Executes asynchronously any update requests (see CALL FUNCTION ... IN UPDATE TASK) specified in these subroutines or started just before &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Processes the function modules specified in CALL FUNCTION ... IN BACKGROUND TASK &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Resets the time slice counter to 0. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ensures that the locks of the SAP locking concept are handled in accordance with its SCOPE Parameter. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Executes a database commit on all database connections &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Closes all open database cursors (OPEN CURSOR) on all database connections &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Releases all database locks on all database connections &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After the COMMIT WORK has been executed, the event RAISE_TRANSACTION_FINISHED of the class CL_SYSTEM_TRANSACTION_STATE with parameter value CL_SYSTEM_TRANSACTION_STATE=&amp;gt;COMMIT_WORK is triggered. However, this does not apply to the COMMIT WORK at the end of the update. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Return Code SY-SUBRC is set to 0. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Notes &lt;/P&gt;&lt;P&gt;All subroutines called with PERFORM ... ON COMMIT are processed in the LUW concluded by the COMMIT WORK command. All V1 update requests specified in CALL FUNCTION ... IN UPDATE TASK are also executed in one LUW. When all V1 update requests have been successfully concluded, the V2 update requests (update with start delayed ) are processed, each in one LUW. Parallel to this, the function modules specified in CALL FUNCTION ... IN BACKGROUND TASK are each executed in one LUW per destination. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;COMMIT WORK commands processed within CALL DIALOG processing do all of the following: &lt;/P&gt;&lt;P&gt;- A database commit on all database connections (see above), &lt;/P&gt;&lt;P&gt;- Close all open database cursors on all database connections &lt;/P&gt;&lt;P&gt;- Reset the time slice counter &lt;/P&gt;&lt;P&gt;- Call the function modules registered in CALL DIALOG processing using CALL FUNCTION IN BACKGROUND TASK &lt;/P&gt;&lt;P&gt;However, subroutines and function modules called with PERFORM ... ON COMMIT or CALL FUNCTION ... IN UPDATE TASK in CALL DIALOG processing are not executed in the calling transaction until a COMMIT WORK occurs. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since COMMIT WORK closes all open database cursors, any attempt to continue a SELECT loop after a COMMIT WORKresults in a runtime error. For the same reason, a FETCH after a COMMIT WORK on the now closed cursors also produces a runtime error. You must therefore ensure that any open cursors are no longer used after the COMMIT WORK. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;COMMIT WORK may not be used during the update (CALL FUNCTION ... IN UPDATE TASK) or during the execution of FORMs that were registered using PERFORM ... ON COMMIT or PERFORM ... ON ROLLBACK. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With batch input and CALL TRANSACTION ... USING, COMMIT WORK successfully concludes the processing. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition &lt;/P&gt;&lt;P&gt;... AND WAIT &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;The addition ... AND WAIT makes the program wait for the type V1 update (update with immediate start) to be executed. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Return Code is set as follows: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SY-SUBRC = 0: &lt;/P&gt;&lt;P&gt;The update was performed successfully. &lt;/P&gt;&lt;P&gt;SY-SUBRC &amp;lt;&amp;gt; 0: &lt;/P&gt;&lt;P&gt;The update was not performed successfully. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Variant 2 &lt;/P&gt;&lt;P&gt;COMMIT CONNECTION con. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;The COMMIT command is not executed on the standard database, but only on the secondary database connection specified with con. con is the name of the database connection as it was specified in the table DBCON in the column CON_NAME. The database connection con can also be specified dynamically in the form (source_text) - the source_text field contains the name of the database connection as ABAP Source Code. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On the specified secondary database connection, the database commit: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Closes all open database cursors (OPEN CURSOR) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Releases all database locks &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note &lt;/P&gt;&lt;P&gt;Because all open database cursors are closed with the COMMIT, the attempt to continue a SELECT loop after a COMMIT causes a runtime error. For the same reason, a FETCH after the COMMIT to the now closed cursor causes runtime error. You must ensure that open cursors are no longer used after the COMMIT. The only exception are cursors that were opened using the WITH HOLD addition.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 18 Jan 2007 07:23:07 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-01-18T07:23:07Z</dc:date>
    <item>
      <title>Commit in module pool</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-in-module-pool/m-p/1826936#M352715</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 what happens when we explicitly write " COMMIT " or " COMMIT WORK" statement  in module pool.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jan 2007 07:20:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/commit-in-module-pool/m-p/1826936#M352715</guid>
      <dc:creator>amit_20</dc:creator>
      <dc:date>2007-01-18T07:20:44Z</dc:date>
    </item>
    <item>
      <title>Re: Commit in module pool</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-in-module-pool/m-p/1826937#M352716</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Amit..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WELCOME TO SDN&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;COMMIT &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Variants: &lt;/P&gt;&lt;P&gt;1. COMMIT WORK. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. COMMIT CONNECTION con. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;Executes a database commit and thus closes a Logical Unit of Work ( LUW) (see also Transaction Processing). This means that: &lt;/P&gt;&lt;P&gt;&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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;COMMIT WORK belongs to the Open-SQL command set. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Variant 1 &lt;/P&gt;&lt;P&gt;COMMIT WORK. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition: &lt;/P&gt;&lt;P&gt;... AND WAIT &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;COMMIT WORK also &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Calls the subroutines specified by PERFORM ... ON COMMIT &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Executes asynchronously any update requests (see CALL FUNCTION ... IN UPDATE TASK) specified in these subroutines or started just before &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Processes the function modules specified in CALL FUNCTION ... IN BACKGROUND TASK &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Resets the time slice counter to 0. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ensures that the locks of the SAP locking concept are handled in accordance with its SCOPE Parameter. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Executes a database commit on all database connections &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Closes all open database cursors (OPEN CURSOR) on all database connections &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Releases all database locks on all database connections &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After the COMMIT WORK has been executed, the event RAISE_TRANSACTION_FINISHED of the class CL_SYSTEM_TRANSACTION_STATE with parameter value CL_SYSTEM_TRANSACTION_STATE=&amp;gt;COMMIT_WORK is triggered. However, this does not apply to the COMMIT WORK at the end of the update. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Return Code SY-SUBRC is set to 0. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Notes &lt;/P&gt;&lt;P&gt;All subroutines called with PERFORM ... ON COMMIT are processed in the LUW concluded by the COMMIT WORK command. All V1 update requests specified in CALL FUNCTION ... IN UPDATE TASK are also executed in one LUW. When all V1 update requests have been successfully concluded, the V2 update requests (update with start delayed ) are processed, each in one LUW. Parallel to this, the function modules specified in CALL FUNCTION ... IN BACKGROUND TASK are each executed in one LUW per destination. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;COMMIT WORK commands processed within CALL DIALOG processing do all of the following: &lt;/P&gt;&lt;P&gt;- A database commit on all database connections (see above), &lt;/P&gt;&lt;P&gt;- Close all open database cursors on all database connections &lt;/P&gt;&lt;P&gt;- Reset the time slice counter &lt;/P&gt;&lt;P&gt;- Call the function modules registered in CALL DIALOG processing using CALL FUNCTION IN BACKGROUND TASK &lt;/P&gt;&lt;P&gt;However, subroutines and function modules called with PERFORM ... ON COMMIT or CALL FUNCTION ... IN UPDATE TASK in CALL DIALOG processing are not executed in the calling transaction until a COMMIT WORK occurs. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since COMMIT WORK closes all open database cursors, any attempt to continue a SELECT loop after a COMMIT WORKresults in a runtime error. For the same reason, a FETCH after a COMMIT WORK on the now closed cursors also produces a runtime error. You must therefore ensure that any open cursors are no longer used after the COMMIT WORK. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;COMMIT WORK may not be used during the update (CALL FUNCTION ... IN UPDATE TASK) or during the execution of FORMs that were registered using PERFORM ... ON COMMIT or PERFORM ... ON ROLLBACK. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With batch input and CALL TRANSACTION ... USING, COMMIT WORK successfully concludes the processing. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition &lt;/P&gt;&lt;P&gt;... AND WAIT &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;The addition ... AND WAIT makes the program wait for the type V1 update (update with immediate start) to be executed. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Return Code is set as follows: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SY-SUBRC = 0: &lt;/P&gt;&lt;P&gt;The update was performed successfully. &lt;/P&gt;&lt;P&gt;SY-SUBRC &amp;lt;&amp;gt; 0: &lt;/P&gt;&lt;P&gt;The update was not performed successfully. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Variant 2 &lt;/P&gt;&lt;P&gt;COMMIT CONNECTION con. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;The COMMIT command is not executed on the standard database, but only on the secondary database connection specified with con. con is the name of the database connection as it was specified in the table DBCON in the column CON_NAME. The database connection con can also be specified dynamically in the form (source_text) - the source_text field contains the name of the database connection as ABAP Source Code. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On the specified secondary database connection, the database commit: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Closes all open database cursors (OPEN CURSOR) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Releases all database locks &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note &lt;/P&gt;&lt;P&gt;Because all open database cursors are closed with the COMMIT, the attempt to continue a SELECT loop after a COMMIT causes a runtime error. For the same reason, a FETCH after the COMMIT to the now closed cursor causes runtime error. You must ensure that open cursors are no longer used after the COMMIT. The only exception are cursors that were opened using the WITH HOLD addition.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jan 2007 07:23:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/commit-in-module-pool/m-p/1826937#M352716</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-18T07:23:07Z</dc:date>
    </item>
    <item>
      <title>Re: Commit in module pool</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-in-module-pool/m-p/1826938#M352717</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When a COMMIT WORK statement is encountered, all the bundled updates (bundled using perform on commit or call function in update task) will be executed. That is when the actual database update happens. All the updates happen one after the other in the sequence in which they were called earlier. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Manoj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jan 2007 07:23:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/commit-in-module-pool/m-p/1826938#M352717</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-18T07:23:30Z</dc:date>
    </item>
    <item>
      <title>Re: Commit in module pool</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-in-module-pool/m-p/1826939#M352718</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;All changes from the last save will be saved to the database. The current LUW (Logical Unit of Work) gets saved. All DB modifications in the current LUW gets saved.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jan 2007 07:24:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/commit-in-module-pool/m-p/1826939#M352718</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-18T07:24:27Z</dc:date>
    </item>
    <item>
      <title>Re: Commit in module pool</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-in-module-pool/m-p/1826940#M352719</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;please go thru this url&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/commit.htm" target="test_blank"&gt;http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/commit.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapdb.org/7.4/htmhelp/5e/eba66a440a11d3a98200a0c9449261/content.htm" target="test_blank"&gt;http://www.sapdb.org/7.4/htmhelp/5e/eba66a440a11d3a98200a0c9449261/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Shiva&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jan 2007 07:27:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/commit-in-module-pool/m-p/1826940#M352719</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-18T07:27:27Z</dc:date>
    </item>
  </channel>
</rss>

