2005 May 19 11:52 AM
Dear ALL,
Kindly help me on the basis of following information.
I have to run a BDC1 on SU10 TCode to delimit roles assigned to a user. after that i have to run BDC2 to assign roles to that user. my req is that if one BDC1 passes and BDC2 fails then i have to rollback the changes made by BDC1.
how should i go about it.
if anyone has some code then kindly mail me at amitgkv@rediffmail.com
Thanks in advance.
2005 May 19 12:06 PM
2005 May 19 12:12 PM
anand,
i am using call transaction method and not batch input method.
Kindly let me know more about it.
2005 May 19 12:16 PM
Hi Amit,
the thing is, once a transaction completed successfully (even a call transaction), all postings are commited. So how will you rollback already commited records?
regards
Siggi
2005 May 19 12:20 PM
Hi Amit,
It seems that you have not bothered to scroll down the thread to see what has been discussed. i'll paste it here for you.
What you're seeking to accomplish is not possible.
And I don't think it makes too much sense. Let us say, you are
using a CALL TRANSACTION, then each CALL TRANSACTION is supposed
to be consistent and complete in itself.....and you cannot span
an LUW across multiple transactions....it is so much against the
concept of an LUW.
To give you a slightly non-technical explanation, you must first
ask yourself the question 'Why do we use BATCH INPUT'? Is it not
to just reduce the manual creation of all the documents in their
corresponding transactions?
Now in your case, when the first transaction finishes sucessfully, it mean that a COMMIT statement will get triggerred for that transaction. How are you going to roll back it back after a COMMIT ? You would have to
delete / unassign the roles manually.
So even in this case, you can only do a delete operation. Not a ROLLBACK.
Now if you really want to stick to this functionality, then the option that
is left for you is to find out if there are any Function Modules available to
do the DELETE operation.
Personally, if I were you, I would use the MESSAGES option for the CALL TRANSACTION
statement and display them to the user, so that he would know which transaction
had failed. He can then continue with the remaining ones and manually revert the changes done by the first transaction whose corresponding second transactions ahve failed.
Hope that is clear. Please do get back if you have further doubts. Else, please
reward points and mark the question as "answered".
regards,
anand mandalika.