Ansicht
Dokumentation

ABAPRAISING_EFFECT - RAISING EFFECT

ABAPRAISING_EFFECT - RAISING EFFECT

TXBHW - Original Tax Base Amount in Local Currency   General Data in Customer Master  
This documentation is copyright by SAP AG.
SAP E-Book

Effect

The addition you can use for the definition of METHODS, FORM and FUNCTION informs the calling program which class-based exceptions can occur.

After RAISING, you therefore list the exception classes whose exceptions may occur and which cannot be caught locally within the procedure. You may only specify classes of the categories CX_STATIC_CHECK and CX_DYNAMIC_CHECK. It is possible to specify superclasses to declare groups of exceptions in a simple manner. Since the order of the exceptions is important to the CATCH clause, you must specify the exception classes according to their inheritance hierarchy even if you declare them in ascending order.

If the interface is violated at runtime for exceptions of the categories CX_STATIC_CHECK and CX_DYNAMIC_CHECK - that is, an exception of this type leaves a procedure and the exception was not defined in the RAISING clause - the system triggers an exception of the class CX_SY_NO_HANDLER and stores a reference to the original exception in the attribute PREVIOUS. (Any handler for such an exception then does not catch the original exception but instead a programming error in the procedure called.)

The addition may only be used for the definition of METHODS and FUNCTIONS if the addition EXCEPTIONS (for exceptions that are not class-based) is not used simultaneously. Also, using the RAISING addition within the procedure defined that way means the following restrictions:

  • Catchable runtime errors can then only be caught using TRY ... CATCH and the corresponding exception classes for the runtime error, but not using CATCH SYSTEM-EXCEPTIONS.
  • You can no longer use the command RAISE to trigger exceptions that are not class-based.





General Material Data   ROGBILLS - Synchronize billing plans  
This documentation is copyright by SAP AG.

Length: 2327 Date: 20240418 Time: 044707     sap01-206 ( 51 ms )