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

Former Member
0 Likes
392

hello sap gurus,

can any one tell me why we use "BAPI_TRANSACTION_COMMIT" and "BAPI_TRANSACTION_ROLLBACK" in bapi?

Thank you very much in adnance.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
366

After passing the parameters to BAPI function module.

It will post the document or relavent process it will do.

It depends the parameters you are passing.

If it have been executed sucessfully then the return code will be zero.

then you can go for commit work nothing but

"BAPI_TRANSACTION_COMMIT"

Else the return code will be some value.

then you have to roll back the process what you have done for that you will go for.

"BAPI_TRANSACTION_ROLLBACK".

Hope it will help you.

Regards,

Madan.

2 REPLIES 2
Read only

Former Member
0 Likes
367

After passing the parameters to BAPI function module.

It will post the document or relavent process it will do.

It depends the parameters you are passing.

If it have been executed sucessfully then the return code will be zero.

then you can go for commit work nothing but

"BAPI_TRANSACTION_COMMIT"

Else the return code will be some value.

then you have to roll back the process what you have done for that you will go for.

"BAPI_TRANSACTION_ROLLBACK".

Hope it will help you.

Regards,

Madan.

Read only

Former Member
0 Likes
366

Hi,

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

BAPI_TRANSACTION_ROLLBACK

____________________________________________________

Short Text

Execute external Rollback when using BAPIs

Functionality

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

If you call BAPIs in your program that change data in the SAP system, this method can prevent these changes being written to the database. The prerequisite is that these changes have not already been transferred to the database with a COMMIT WORK command.

Regards

Kiran Sure