2009 Feb 19 7:39 PM
Hello,
I call the BAPI_TRANSACTION_COMMIT but would like to use the BAPI_TRANSACTION_ROLLBACK when the user chooses test mode on the selection screen. Objects are being filled with BAPI_ALM_ORDER_MAINTAIN. The BAPI_TRANSACTION_ROLLBACK is being called when there's an error, but will it work if I have a condition for test or simulate?
Thanks,
AJ
2009 Feb 19 7:55 PM
Yes.. this will work..
When the User selected Test or Simulation from the selection screen check box execute the BAPI BAPI_ALM_ORDER_MAINTAIN so that you can validate the data.. then execute BAPI_TRANSACTION_ROLLBACK so that the document is not commited.. the entire process is rolled back..
if the Simulation or Test is not checked from the selection screen then execute the Bapi
BAPI_ALM_ORDER_MAINTAIN , check for errors in the RETURN internal table if none.. then execute
BAPI_TRANSACTION_COMMIT
This will work.. i have done this in lot of objects.. to make sure the data is correct