Skip to Content
Former Member
Sep 26, 2013 at 05:09 PM

Adding an Exception to EXIT_SAPLV56U_004


We have a requirement to exit out of EXIT_SAPLV56U_004 without saving under certain circumstances. However, there is not an exception defined for FM EXIT_SAPLV56U_004. We have tested out adding an exception to the FM and it does give us the functionality we need, but has anyone else tried to do this and encountered any issues we should be aware of before we adopt this as our final solution? We have simply modified EXIT_SAPLV56U_004 to have the exception OTHERS and then added the RAISE OTHERS command in the userexit code.

We tried other options, such as generating an error message from within the userexit logic, but none of our attempts resulted in the changes not being saved and the processing being terminated cleanly. We also tried to manipulate SY-SUBRC in the userexit code, but the changed value was not retained once processing exited the customer function, so that also did not work. The only solution that fit our needs was adding and raising the new exception.

We appreciate any feedback from anyone who has either successfully implemented this same modification, or who has encountered issues after doing so.

We are fine with having made the modification to enable the exception, we were just concerned about any potential negative impacts to doing so. But it does appear to be working for our requirements, so if no one responds saying they encountered issues attempting to do the same, then we are happy.