ā2016 Jun 08 8:01 AM
Hi everyone,
Can you please guide me know when we need to use Commit work statement in SAP-ABAP, and when can we avoid Commit work statement.
Thanks & regards,
Shravan
ā2016 Jun 08 8:38 AM
From the Keyword Documentation:
The COMMIT WORK statement closes the current SAP LUW and opens a new oneThis is very important if you have Situations where multiple datasets have to be modified. If one of the modifications fail, you want to do a ROLLBACK.
But If you made other changes to the database those would be rolled back as well. So COMMIT WORK is basically just doing what the Documentation says:
This helps you to keep databse changes that have to be executed together to be in line even when there is a lock on the table or techical issues appear.
ā2016 Jun 08 8:05 AM
ā2016 Jun 08 8:38 AM
From the Keyword Documentation:
The COMMIT WORK statement closes the current SAP LUW and opens a new oneThis is very important if you have Situations where multiple datasets have to be modified. If one of the modifications fail, you want to do a ROLLBACK.
But If you made other changes to the database those would be rolled back as well. So COMMIT WORK is basically just doing what the Documentation says:
This helps you to keep databse changes that have to be executed together to be in line even when there is a lock on the table or techical issues appear.