2011 Jan 05 1:50 PM
Hi!
I wonder does anyone know a good solution about this. I have to run a CALL TRANSACTION (MR21 transaction) and right after the CALL TRANSACTION (if it was successful) a BAPI also.
However, if the BAPI fails, I have to rollback the modifications of the CALL TRANSACTION.
Will a ROLLBACK WORK solve this problem? I don't think, because MR21 transaction will post a COMMIT at the end.
Can it be rollbacked somehow?
Thank you
Tamá
2011 Jan 05 2:13 PM
HI,
After call transaction there is no rollback.
What you can do is record the transaction two manners.
One recording with save and other without save. Initially run the recording without save and then check if the return table has any messages after using call transaction. If it doesnot have any messages execute the recording with save and then the bapi. If it has error donot execute the bapi.
Also instead of this call transaction you can search for available bapis which suits MR21 where yu will be having the option for test run.
Sorry misread your question.....Solution is search bapi for MR21. If both bapi doesnt have any error the commit
BAPI_M_REVAL_CREATEPRICECHANGE - Try for MR21
Edited by: Keshav.T on Jan 5, 2011 7:45 PM
Hi!
I wonder does anyone know a good solution about this. I have to run a CALL TRANSACTION (MR21 transaction) and right after the CALL TRANSACTION (if it was successful) a BAPI also.
However, if the BAPI fails, I have to rollback the modifications of the CALL TRANSACTION.
Will a ROLLBACK WORK solve this problem? I don't think, because MR21 transaction will post a COMMIT at the end.
Can it be rollbacked somehow?
Thank you
Tamá
2011 Jan 05 2:13 PM
HI,
After call transaction there is no rollback.
What you can do is record the transaction two manners.
One recording with save and other without save. Initially run the recording without save and then check if the return table has any messages after using call transaction. If it doesnot have any messages execute the recording with save and then the bapi. If it has error donot execute the bapi.
Also instead of this call transaction you can search for available bapis which suits MR21 where yu will be having the option for test run.
Sorry misread your question.....Solution is search bapi for MR21. If both bapi doesnt have any error the commit
BAPI_M_REVAL_CREATEPRICECHANGE - Try for MR21
Edited by: Keshav.T on Jan 5, 2011 7:45 PM
2011 Jan 05 2:32 PM
I once had a similar requirement (although it was a matter of running a number of CALL TRANSACTIONs in a row with no BAPI call. If any transaction failed, then all the previous transactions had to be rolled back. There could be hudreds or thousands.
The only way was to reverse (apply the changes in the opposite sense) the successful transactions.
Rob
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |