â2012 Apr 11 9:02 PM
Hi,
I do have a proxy call and table update(using RFC function module) in my program. I want make it both commit at one time and if any issues happen in either table updation or proxy call both should be rolled back.
My FM is RFC one returning some flag value, I can't make it update FM i believe.
Suggest me some ways
â2012 Apr 12 4:17 AM
Hi Sujit,
Not sure about the entire scenario, but what i would do is, bring them into one SAP LUW, meaning i will create a new FM/Proxy, and call the current proxy and FM sequentially, and on successful execution of both proxy and FM, i will perform a commit, otherwise i will run a rollback command.
Hope this helps.
Reg
Pras
â2012 Apr 12 4:37 AM
Hi ,
To elaborate in program looks like below
call proxy method
if sy-subrc eq 0.
Call the FM that updates the DB table,
if sy-subrc eq 0
commit work.
endif.
endif.
(I can't write table modifcation logic inside my program, as there are many other programs doing same this)
I think when the FM call returns back to my program SAP does a commit itself,I can't rollBack DB entry.so problem happens modification happens first then the proxy is commited.
I need both the things to be dependent on each other.
â2012 Apr 12 4:57 AM
Hi Sujit,
Try to write a new single wrapper FM in the target system, which will have the logic to call the proxy and FM and have a single commit work based on the requirement. Later, you can use the new FM to call from another system using RFC.
There by you achieve dependency and also the rollback on failure.
Regards,
Prasanna