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

Do I have to issue commit statement after modify dbtab?

Former Member
0 Likes
5,229

Hello to all,

Is it necessary for me too issue an explicit commit statement after using modify dbtab from wa, or this is done implicitly?

Best Regards to all.

1 ACCEPTED SOLUTION
Read only

jhilden
Explorer
2,685

You do not *have* to issue an explicit COMMIT afterwards to successfully complete the db update (the end of the program will be the end of the logical unit of work), but there may be reasons why you may want to:

The COMMIT executes a database commit and thus closes a logical processing unit or Logical Unit of Work ( LUW ).

This means that

  • all database changes are made irrevocable and cannot
    be reversed with ROLLBACK WORK and
  • all database locks are
    released.
3 REPLIES 3
Read only

jhilden
Explorer
2,686

You do not *have* to issue an explicit COMMIT afterwards to successfully complete the db update (the end of the program will be the end of the logical unit of work), but there may be reasons why you may want to:

The COMMIT executes a database commit and thus closes a logical processing unit or Logical Unit of Work ( LUW ).

This means that

  • all database changes are made irrevocable and cannot
    be reversed with ROLLBACK WORK and
  • all database locks are
    released.
Read only

ibrahim_u
Active Participant
0 Likes
2,685

You dont have to use COMMIT statement. SAP LUW concept responsible for it.

SAP LUW Concept

Database Logical Unit of Work (LUW) - ABAP Programming (BC-ABA) - SAP Library

But you may want to use the data that you insert or modify in DB table before the LUW ends. In this case, yes you can use COMMIT.

Read only

RaymondGiuseppi
Active Contributor
2,685

No need for COMMIT/ROLLBACK WORK with simple open-sql statement, but you can use those, just read their documentation,  COMMIT WORK, they execute more than a database commit. To insure success (or force rollback) you may consider using FM DB_COMMIT (resp. DB_ROLLBACK) to trigger a database commit. Or you can wait for an Implicit Database Commit as triggered by any dialog step.

Regards,

Raymond.