Get Example source ABAP code based on a different SAP table
• CALL FUNCTION EXCEPTIONS - short form ABAP Statement
CALL FUNCTION EXCEPTIONS>, Short Form
ABAP_SYNTAX_OBS CALL FUNCTION func ... EXCEPTIONS exc1 exc2 ...>
What does it do? This short form for specifying non-class-based exceptions in the parameter list> of the statement CALL FUNCTION>> is obsolete. It has the same effect as the following: CALL FUNCTION func ... EXCEPTIONS exc1 = 1 exc2 = 1 ...> Each exception specified after EXCEPTIONS> that is not assigned to an explicit return code using => is assigned the value 1 implicitly.
Latest notes:
This short form is extremely error-prone and should never be used.
Both the short form and the complete form can appear in a CALL FUNCTION> statement. ABAP_HINT_END
Example ABAP Coding
The syntax of the following function module call is correct but can have unexpected results. CALL FUNCTION func EXCEPTIONS = 4.> The developer probably expected the following: CALL FUNCTION func EXCEPTIONS OTHERS = 4.> The complete form of the statement is as follows, however: CALL FUNCTION func EXCEPTIONS = = 1 4 = 1.> Since exceptions called => are not possible, and exceptions called 4> are unlikely, this call will almost certainly not catch any exceptions, even though it is designed to catch every exception. ABAP_EXAMPLE_END