12-03-2007 4:21 AM
In my application, I use 3 BAPIs executed one after the other. If any one of these BAPIs fail, I should rollback whatever database updates I did using the other BAPIs. Is it possible to achieve this? and how?
call BAPI A
if BAPI-A success
call BAPI-B
if BAPI-B suceess
call BAPI-C
if BAPI-C success
commit BAPI-A BAPI-B BAPI-C
else
rollback BAPI-A BAPI-B
else
rollback BAPI-A
endif.
Points will be rewarded.
12-03-2007 4:31 AM
it is possiable.
if BAPI-A success
call BAPI-B
commit BAPI-A BAPI-B BAPI-C
if BAPI-B suceess
commit BAPI-A BAPI-B BAPI-C
call BAPI-C
if BAPI-C success
commit BAPI-A BAPI-B BAPI-C
else
rollback BAPI-A BAPI-B
endif.
else
rollback BAPI-A
endif.
else
rollback BAPI-A
endi.
12-03-2007 5:13 AM
BAPI_COMMIT or BAPI_ROLLBACK will work for the last executed BAPI only -
> is this correct?
when i execute bapi_transaction_rollback for BAPI A, how will rollback BAPI know which bapi update to be rolled back?