‎2006 Nov 04 4:25 PM
hi all
i am using some custom remote function modules which they have used call transaction in it
now i am using some standard bapis and some custome rfc's
i have to update database when all functions are sucess or else i have to roll back all the updates
how to roll back this custom rfc's updates.
thanks & regards
kiran
‎2006 Nov 05 10:45 PM
Hello Kiran,
the invocation of a remote enabled fuba via RFC triggers an implicit commit work. So if the requirement is to update the local db only in case of successful remote computing any change to the db has to occur only after the FuBa returns.
If the requirement is that way that remote and local side should have a transactional behavior (common commit) you face the so called "2 phase commit" problem. To my knowledge there is no perfect solution available for this scenario.
Regards
Klaus
‎2006 Nov 04 4:31 PM
Hi,
YOu can use the follwoing functionmodules.
BAPI_TRANSACTION_COMMIT
BAPI_TRANSACTION_ROLLBACK
Since both are RFC-enabled, you can use for both purposes.
Thanks
Ramakrishna
‎2006 Nov 04 4:33 PM
Hi Kiran,
You can code something like this after calling custom remote function module.
...
IF SY-SUBRC = 0.
COMMIT WORK.
ELSE.
ROLLBACK WORK.
ENDIF.
...Hope this will help.
Regards,
Ferry Lianto
Please reward points if helpful.
‎2006 Nov 05 10:45 PM
Hello Kiran,
the invocation of a remote enabled fuba via RFC triggers an implicit commit work. So if the requirement is to update the local db only in case of successful remote computing any change to the db has to occur only after the FuBa returns.
If the requirement is that way that remote and local side should have a transactional behavior (common commit) you face the so called "2 phase commit" problem. To my knowledge there is no perfect solution available for this scenario.
Regards
Klaus