Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

need of commit work statement

Former Member
0 Likes
705

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
641

From the Keyword Documentation:

The COMMIT WORK statement closes the current SAP LUW and opens a new one

This 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:

  • Closing the current SAP LUW
  • Opening a new SAP LUW

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.

2 REPLIES 2
Read only

Former Member
0 Likes
641

Hi,

Check the below link, it will help u.

ABAP Keyword Documentation

Thanks

Read only

Former Member
0 Likes
642

From the Keyword Documentation:

The COMMIT WORK statement closes the current SAP LUW and opens a new one

This 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:

  • Closing the current SAP LUW
  • Opening a new SAP LUW

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.