SAP StackFICOHRMMSDPMPSABAPNetWeaverTablesTcodes ☰MENU

ABAP COMMIT WORK and WAIT statement

COMMIT WORK statement in ABAP programming is used for closing the current LUW and save all the database change requests along with releasing all the database locks.

Syntax

COMMIT WORK [AND WAIT]

WAIT addition is used for synchronous updating, that means the program will resume its execution till the update work finish, and it will continue after the database update. Otherwise it will be a asynchronous update (means the program wont wait for the database update).

When we call a COMMIT WORK the following actions are occurring in the system.

  1. Execute all subroutines registered using PERFORM ON COMMIT bases on the registration order.
  2. Trigger an internal event for the Persistence Service of the Object Services.
  3. It Handles the SAP locks associated with the current program.
  4. Trigger database commit and close the current database LUW and database cursors.
  5. Trigger the TRANSACTION_FINISHED event

The system field sy-subrc will contain the following follows when we execute this statement.

Also Read : View Other ABAP Keywords & Syntax -> ABAP Transaction codes

SAP ALECRMSCMSRMSAP Solutions SAP ReferencesSAP BasicsPP ModuleWMSAP Partners
HomeContact & Privacy PolicyTwitter
All of the product names here are trademarks of their respective companies. The site sapstack.com is not affiliated with SAP AG.
©2024 sapstack.com