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

Roll back a BAPI...

Former Member
0 Likes
464

Hi, i have used 'BAPI_GOODSMVT_CREATE' with Movement-type '309' and 'BAPI_TRANSACTION_COMMIT'. Here i have created a new Batch-ID through the BAPI for which i have to change/update some data using a Function Module. If some Problem occurs in the function Module i want to roll back the BAPI Call. Is it possible after Bapi commit work?

if i give the 'BAPI_TRANSACTION_COMMIT' after the execution of the Function Module, it throws an error because the Batch-ID has not yet been created. So how can handle this situation were i don't want to lose the data while i entered while the Batch-id is created through BAPI.

Thanking you... waiting for your suggestions.

1 REPLY 1
Read only

Former Member
0 Likes
356

Once a COMMIT is performed, it is too late to do a rollback; however, you can use BAPI_GOODSMVT_CANCEL to reverse the earlier document.

Rob