06-18-2010 2:45 PM
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.
06-18-2010 3:12 PM
I think you have your answer in SAP documentation itself : [http://help.sap.com/abapdocu_70/en/ABAPPERFORM_SUBR.htm]
06-18-2010 3:12 PM
I think you have your answer in SAP documentation itself : [http://help.sap.com/abapdocu_70/en/ABAPPERFORM_SUBR.htm]
06-18-2010 3:27 PM
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.