Register Login

Difference between Commit work and BAPI_Transaction_Commit

Updated May 18, 2018

Commit work is used when you code directly in ABAP and make changes in the database and want to commit the database.

BAPI_TRANSACTION_COMMIT is used when you make changes to the SAP database by calling a BAPI from outside SAP and want to commit the database. When you use a BAPI, you can not  directly use commit work, instead you are allowed to use only  BAPI_TRANSACTION_COMMIT.

I would sasy the difference lies more in the way u want to call Commit Work.

With BAPI_TRANSACTION_COMMIT ..the external systems have a way of deciding on whether to Commit or to Roll back Changes.

But with Commit Work u have to code it inside ure BAPI and the outside systems then have no chance or have any hold over the commit...

So i guess the diff lies more in the way how u want to call commit ,either from outside or from within ure BAPI.  You can use both...

SAP though recommends using BAPI_Transaction_Commit and not using Commit_work in the BAPI...

But its upto u and your middleware guy to decide how u want to do it..


  • 21 Oct 2012 7:06 pm sanjana
    what is the purpore and role of bapi?