09-10-2008 6:28 AM
expert:
two transaction is CALL TRANSACTION tcode1 and CALL TRANSACTION tcode2 perform in turn.
if Call transaction tcode2 occurs error ,CALL TRANSACTION tcode1 will be rollback.how to do it.
thanks in advance.
fgq.
09-10-2008 6:31 AM
09-10-2008 6:38 AM
09-10-2008 6:42 AM
Not sure but you can try with Submit <your report name> if your tcode2 contains error.
09-10-2008 6:41 AM
Hello There.
While calling the transaction from program we use SUBMIT statement.
I hope you also have used that statement.
If this statement is removed after calling of the transaction, there is no updating and automatic rollback is performed.
If this is the case then that's good.
If not then you can give feedback.
Good Luck & Regards.
Harsh Dave
09-10-2008 6:55 AM
my program don't submit report,I will perform two tcodes: 'mb1b'. Material move type is '541' and '309'.
09-10-2008 6:57 AM
try somthing like:
call transaction tcode2.
if fails.
submit <current reportname>.
endif.
09-10-2008 7:06 AM
09-10-2008 7:16 AM
Hello There.
I suppose you will have to use, (SAY)
loop at _____
If ____ sucess.
COMMIT WORK.
else.
ROLLBACK WORK.
endif.
endloop.
COMMIT WORK statement updates the database.
If there is no COMMIT WORK, the transaction is terminated in case of error ROLLBACK WORK serves the purpose.
If that solves its fine and if not give feedback.
Good Luck & Regards.
Harsh Dave
09-10-2008 7:13 AM
you can use this for example:
call tarnsaction tcode1.
if sy-subrc = 0.
call transaction tcode2.
if sy-subrc = 0.
commit work.
else.
rollback.
endif.
endif.
Hope this will solve the problem.
09-10-2008 7:36 AM
to perfom commit work and rollback work has no effect to call transaction....
but thank very much.
fgq
09-10-2008 7:22 AM
try posting reversal 542 if tcode 2 fails... i think you cant rollback work in tcode1 if you fail in tcode 2. because it is already commited work and separate transaction. hope it helps
09-10-2008 7:40 AM