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: 

Trigger rollback during update task

Former Member
0 Kudos

Hi there ABAP'ers.

I am playing a bit with LUWs.

I prepared a test scenario where in update task I call two forms, each in separate screen.

At the end I trigger COMMIT WORK.

And now I would like to have a small test.

Let's say that first form passes in update task correctly. Whilst the second one generates an error inside itself.

Now my question is how should I trigger a rollback that the whole transaction is rolled back? I tried to put ROLLBACK WORK inside second routine but it generates a dump (because it is not acceptable to call ROLLBACK inside form launched in update task)

I will be thankful for suggestions how to trigger this rollback when second routine fails.

Regards,

P.

1 ACCEPTED SOLUTION

SuhaSaha
Advisor
Advisor
0 Kudos

I think you have your answer in SAP documentation itself : [http://help.sap.com/abapdocu_70/en/ABAPPERFORM_SUBR.htm]

2 REPLIES 2

SuhaSaha
Advisor
Advisor
0 Kudos

I think you have your answer in SAP documentation itself : [http://help.sap.com/abapdocu_70/en/ABAPPERFORM_SUBR.htm]

Former Member
0 Kudos

You mean I should not use routines in update task at all?

Creating subroutines is obsolete. If new subroutines are required for PERFORM subr ON COMMIT or PERFORM subr ON ROLLBACK, they should only be used as wrapping for a method call and must not contain any other functional coding.