‎2006 May 29 6:38 AM
Hi,
I am using 'Call transaction...' statements for transactions VAP2 and XD02. If something goes wrong with XD02, changes made thru VAP2 should be rolled back.
Please advise me...
-Tejal
‎2006 May 29 6:44 AM
Hi,
Each call transaction will be committed immediately and I don't think you can rollback that.
Probably you might want to look at calling BAPI's so that you can control commit and rollback.
Regards,
Ravi
Note : Please mark all the helpful answers
‎2006 May 29 6:44 AM
Hi,
Each call transaction will be committed immediately and I don't think you can rollback that.
Probably you might want to look at calling BAPI's so that you can control commit and rollback.
Regards,
Ravi
Note : Please mark all the helpful answers
‎2006 May 29 7:15 AM
Hi Tejal,
they are independent transactions, so Roll back won't work, it is not possible to control also if you use Call transaction.
Regards
vijay
‎2006 May 29 7:29 AM
‎2006 May 29 2:58 PM
You can do it, but not through the rollback process. Before you change the contact information, keep everything that was changed in an internal table. If there's a problem with the customer, you can then call XD02 again and change the contact information back the way it was.
I've done this for a different process and it works quite well. The logic for you would be something like:
PERFORM call_vab2
TABLES new_contact_data.
IF... "the call to VAP2 is ok
PERFORM call_xd02
TABLES customer_data.
IF... "the call to xd02 didn't work.
PERFORM call_vab2
TABLES old_contact_data.
ENDIF.
ENDIF.
Rob
‎2006 May 29 3:03 PM
In calling the transaction, fill in the parameter RACOMMIT in CTU_PARAMS as 'X'
x_ctuparams-DISMODE = 'N'.
x_ctuparams-UPDMODE = 'A'.
x_ctuparams-DEFSIZE = 'X' .
x_ctuparams-RACOMMIT = 'X'.
call transaction <TCODE> using it_bdcdata options from x_ctuparams.
This wouldn't commit the transaction by default.
<b>call transaction <TCODE1> using it_bdcdata options from x_ctuparams.
call transaction <TCODE2> using it_bdcdata options from x_ctuparams.
if sy-subrc = 0.
commit work.
else.
ROLLBACK WORK.
endif.</b>
Regards,
Ravi