RAISE
Short Reference
Syntax
RAISE exception.
Effect
The statement triggers the non class-based exception
exception. It is only useful during processing of methods and function modules in which the
exception exception is defined. After the exception exception is triggered, the system proceeds as follows:
-
If the exception is triggered in a method or function module whose caller assigns a return value to the exception, then the
procedure ends immediately, the system
returns to the calling position, and the system field sy-subrc is set according to the assignments.
-
If the exception is triggered in a method or function module whose caller does not assign a return value to the exception, a runtime error is then triggered whose
short dump contains the name of the exception.
-
If the exception is triggered in a subprogram, the system searches for the first function module in
the procedures for the preceding call hierarchy. If it finds such a function module and the exception
is defined in it, the system acts as though the exception was triggered in this function module. Otherwise, a runtime error will occur.
-
In all other processing blocks, the triggering of a non class-based exception causes a runtime error that immediately ends all further program execution.
This form of the statement RAISE cannot be used in the same
processing block as the statement
RAISE EXCEPTION to trigger class-based exceptions.
Note
The statement MESSAGE with the addition
RAISING also triggers a non class-based exception.
Non-Catchable Exceptions
-
Cause: The raised exception has not been handled by the caller.
Runtime Error:
-
RAISE_EXCEPTION