09-21-2010 7:21 PM
Hi All,
I am using BDC call transaction for FBRA , FB08 and FBR2 to do the reversal.
If any transacation fails i need to rollback all the transactions(EG:IF FBR2 fails i need to rollback the FBRA changes).
Is there any way to that.i tried different ways but it was not possible to me.
Other wise give me any alternate solution.
Thanks & Regards,
Rakesh
09-21-2010 7:31 PM
Call transaction does a commit immediately so i think so its not possible, you can check for BAPI's
Im not sure whether the parameter RACOMMIT can be used for this. This will not commit by default . You have to pass a explicit commit . Pass X to that field in structure CTUPARAMS, then check sy-subrc after the call transaction statement , if its 0 then commit work else roll back work.
call transaction 'MM01' using bdcdata options from l_ctuparams.
if sy-subrc = 0.
call transaction 'MM02' using bdcdata options from l_ctuparams.
if sy-subrc = 0.
commit work.
else.
rollback work.
endif.
else.
rollback work.
endif.
09-21-2010 8:59 PM
Hello!
The parameter RACOMMIT is used to Do not end transaction at COMMIT WORK.
Is used when you want to continue execution of a BDC session after a COMMIT WORK.
This parameter will not avoid the execution of a commit inside the call transaction.
It's useless in this case.
Every Call transaction has its own LUW. So you can't commit or rollback a previous BDC.
You must use BAPIs. Or if BAPIs aren't available (for example parked documents) call a reversal transaction.
Best Regards.
Claudio (Aparatey)
09-21-2010 9:04 PM
Hi ,
I know the functionality of that parameter. I have already mentioned that im not sure and had told just to give a try.
09-21-2010 8:55 PM
Hi,
You can try the CALL Transaction extension '..Messages into itab.' ITAB should be of type BDCMSGCOLL. Look for message type 'E' in the itab. If there is an error you can skip the remaining ones. But it would not be possible to rollback the already processed ones.
Regards
Prasenjit
09-21-2010 10:02 PM
Hi,
Are there BAPIs you can use to run the postings normally created from these transactions? If so, provided the transactions are not dependant (data-wise) on each other), you should be able to run the BAPIs back-to-back with a final BAPI_COMMIT_TRANSACTION/ROLLBACK at the end of processing, based on the result of any BAPI run so far?
(Just a thought).
Regards, Andy