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 Changes Rollback

Former Member
0 Kudos

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.

4 REPLIES 4

Former Member
0 Kudos

Hi Amit,

That is simply not possible. Exactly the same discussion has happened a few weeks back. you can find that at , where it has been explained why it is not possible.

Regards,

Anand Mandalika.

0 Kudos

anand,

i am using call transaction method and not batch input method.

Kindly let me know more about it.

0 Kudos

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

0 Kudos

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.