sapdev logo background
sapdev logo sapdev logo
Comments

ABAP CALL EXCEPTIONS Statement syntax, information and example SAP source code



Return to Statement index


INCLUDE
You can use EXCEPTIONS to assign return values to non-class-based exceptions exc1 exc2 ... declared in the parameter interface. Each exception exc1 exc2 ... that the caller wants to handle must be assigned to a directly specified number n1 n2 ... . You can specify all numbers between 0 and 65535. The behavior outside of this range is undefined.
By specifying OTHERS as the last item after EXCEPTIONS , you can assign all exceptions not listed explicitly in exc1 exc2...
a common return code, by assigning a number n_others . You can assign the same return code to different exceptions (including
OTHERS ). The behavior when an exception is raised is as follows:
If the statement RAISE or MESSAGE RAISING is used to raise an exception exc1 exc2 ... (to which a return code is assigned) the procedure is ended immediately, any output parameters or return values passed by value are canceled, and the number n1 n2 ... assigned to the exception is available to be evaluated in sy-subrc .
If the call of an exception raised by
RAISE does not assign a return value, the program terminates with a runtime error.
If the call of an exception raised by
MESSAGE RAISING does not assign a return value, the message is sent and the system continues in accordance with the message type.
If no exception is raised, a call sets sy-subrc to 0.
If class-based exceptions are declared in the parameter interface, the addition EXCEPTIONS cannot be specified in the call.
Documentation extract taken from SAP system, � Copyright SAP AG. All rights reserved




CALL_DIALOG
CALL_FUNCTION




comments powered by Disqus