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

BAPI_TRANSCATION_COMMIT?

Former Member
0 Likes
790

Hi Friends,

Can anyone give a very simple and clear difference betwee Commit work in BAPIS and BAPI_Transaction_Commit, I have referred to many online info regarding the two but i m not clear about their functional difference? Please help me with very simple answers?

Regards,

MD.

6 REPLIES 6
Read only

Former Member
0 Likes
740

Hello MD

Have you ever tried to see the code written in FM BAPI_TRANSCATION_COMMIT .

There we have just Commit work .

what happens is sometimes IN BAPIs there is no internal commit used those we can test it through SE37 for that we go for Extenal commit .

Otherwise there is no difference between Commit work in BAPIS and BAPI_Transaction_Commit

regards

Hitesh

Read only

Former Member
0 Likes
740

Hi Friend,

I would say the difference is the way you call them. Otherwise both are same.

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

Hope this helps you.

Regards,

Chandra Sekhar

Read only

Former Member
0 Likes
740

hi check this...

the commit work is used when there is a need of modification for the master records such as modfying ,updating the master data ......for that weed commit work..generally we use this in the programs ....with out this there is no updataion of the change in master records....some of the fms or bapi had inside this commit work by the fm bapi_transaction_commit .

this fm is used when processing with mostly the fms

Read only

Former Member
0 Likes
740

MD,

hope this would help to understand better:

Execute external Commit when using BAPIs

Functionality
This method executes a COMMIT WORK command. It is required for transactions developed outside the SAP system that change data in the SAP system by using BAPI calls.

When you call BAPIs in your program that change data in the SAP system, you must then call this method to write the changes to the database.


Notes
Messages are returned in the parameter 'Return'. The documentation for this parameter contains the return values and their meanings.

Further information
Use the method BapiService.TransactionRollback to prevent changes to the database being committed.

Amit.

Read only

Former Member
0 Likes
740

Hi ,

When you use a BAPI, you can not

directly use commit work, instead you are allowed to use only

BAPI_TRANSACTION_COMMIT

Short text

Execute external Commit when using BAPIs

Functionality

This method executes a COMMIT WORK command. It is required for

transactions developed externally to the R/3 System that change data in

the R/3 System via BAPI calls.

When you call BAPIs in your program that change data in the R/3 System,

afterwards you must call this method to write the changes to the

database.

Notes

Messages are returned in the parameter 'return'. This parameter

documentation contains the return codes and their descriptions.

Further Information

Use the method BapiService.TransactionRollback to prevent changes to the

database being committed.

Regards.

Eshwar.

Read only

Former Member
0 Likes
740

Hi MD,

BAPIs must not invoke a COMMIT WORK. instead use the BAPI TransactionCommit to execute the commit after the BAPI has executed

cheers,

sowjanya.