Skip to Content
2
Jul 10, 2019 at 01:09 PM

Rollback under SAP LUW

1075 Views

dear experts, i have a question about SAP LUW, i am always confused about the SAP LUW rollback mechanism.

As the ABAP document said, no ROLLBACK WORK and COMMIT WORK statement allow under SAP LUW, only message with type A could implicit rollback the SAP LUW, i did below test:

my system component versions are:

i create two tables YLUW1 and YLUW2 like below, and initial the value:

i wrote a report to execute the PERFORM...ON COMMIT statement which is one of the solutions of SAP LUW:

first case, i use message with type A to trigger a implicit rollback and it's worked, but program terminate with error.

result:

second case, i didn't write anything under sy-subrc check, and table YLUW1 inserted successfully, YLUW2 inserted failed.

result:

the last case, i raise a exception to trigger a implicit rollback and it's worked, but program terminate with error.

result:

after all of these, my question is: how i can rollback the SAP LUW when any table insert/update/delete error and i could catch the SAP LUW error then deal with it.

Attachments

1.jpg (47.0 kB)
2.jpg (23.3 kB)
3.jpg (23.6 kB)
4.jpg (75.4 kB)
5.jpg (116.6 kB)
6.jpg (68.5 kB)
7.jpg (119.9 kB)
8.jpg (70.7 kB)
9.jpg (233.9 kB)