COMMIT WORK and BAPI_TRANSACTION_COMMIT

-----Original Message-----
Subject: COMMIT WORK and BAPI_TRANSACTION_COMMIT

Does anybody know what's the difference between the two? 

-----Reply Message-----
Subject: RE: COMMIT WORK and BAPI_TRANSACTION_COMMIT

Hi,
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.

Regards, 

-----Reply Message-----
Subject: RE: COMMIT WORK and BAPI_TRANSACTION_COMMIT

I would sasy the diff 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.

u can use both...

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

but its upto u and ure middleware guy to decide how u want to do it..

regds,

-----End of Message-----

Read Also
Simple Program that Create Internal Table Dynamically

ABAP Books
ABAP Certification, BAPI, Java, Web Programming, Smart Forms, Sapscripts Reference Books

More ABAP Tips

Main Index
SAP ERP Modules, Basis, ABAP and Other IMG Stuff

All the site contents are Copyright © www.erpgreat.com and the content authors. All rights reserved.
All product names are trademarks of their respective companies.  The site www.erpgreat.com is in no way affiliated with SAP AG. 
Every effort is made to ensure the content integrity.  Information used on this site is at your own risk. 
 The content on this site may not be reproduced or redistributed without the express written permission of 
www.erpgreat.com or the content authors.