Ansicht Dokumentation

Wir wachsen stetig und suchen neue Kollegen (m/w/d)! Schauen Sie sich unsere offenen Position an, um eine passende Herausforderung zu finden!

ABAPCALL_EXCEPTIONS - CALL EXCEPTIONS

ABAPCALL_EXCEPTIONS - CALL EXCEPTIONS

Addresses (Business Address Services)   General Material Data  
This documentation is copyright by SAP AG.
SAP E-Book

EXCEPTIONS can be used to assign return codes 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 ... All numbers between 0 and 65535 can be specified. The behavior outside of this range is undefined.

By specifying OTHERS as the last entry after EXCEPTIONS, a common return code can be assigned to all exceptions not specified explicitly in exc1 exc2.... This is done by assigning a number n_others. The same return code can be assigned 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 statement is terminated immediately, any procedure parameters passed by value are not filled, 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 code, the program is terminated with a runtime error.
  • If the call of an exception raised by MESSAGE RAISING does not assign a return code, the message is sent, and the system resumes in accordance with the message type.

If no exception is raised, a call sets sy-subrc to 0.

The addition EXCEPTIONS cannot be specified in the call if RAISING is used to declare class-based exceptions in the parameter interface of the called procedure.






Fill RESBD Structure from EBP Component Structure   Fill RESBD Structure from EBP Component Structure  
This documentation is copyright by SAP AG.

Length: 2316 Date: 20230129 Time: 070528     sap01-206 ( 50 ms )