Application Development 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: 

BDC call transaction

Former Member
0 Kudos

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

5 REPLIES 5

kesavadas_thekkillath
Active Contributor
0 Kudos

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.

0 Kudos

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)

0 Kudos

Hi ,

I know the functionality of that parameter. I have already mentioned that im not sure and had told just to give a try.

prasenjit_sharma
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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