SAP ABAP EXCEPTIONS



Get Example source ABAP code based on a different SAP table
  



Exception Handling
Exceptions are events during the execution of an ABAP program that interrupt the program flow because it is not possible for the program to continue in a meaningful way. Exception handling enables a response to these events.
Exception situations can be detected either by the program or by the runtime framework. When an exception situation is detected, either the ABAP program or the runtime framework raises an exception.
BEGIN_SECTION VERSION 5 OUT Exceptions in the ABAP runtime framework are generally caused by error situations that cannot be predicted by the static program check.
END_SECTION VERSION 5 OUT
Exceptions are either catchable or uncatchable.
Catchable exceptions are class-based. They are predefined in the system, or can be user-defined. They are raised either by the ABAP runtime framework or in an ABAP program using
The statement RAISE EXCEPTION
THROW specified in a conditional expression They can be handled using TRY - CATCH - ENDTRY.
BEGIN_SECTION VERSION 5 OUT In addition, there are also non-class-based exceptions and obsolete catchable runtime errors.
END_SECTION VERSION 5 OUT
Uncatchable exceptions are raised only by the ABAP runtime framework. They are a response to error situations that cannot generally be handled meaningfully in a program.
Exceptions that were not caught, that is, all uncatchable exceptions and all catchable exceptions not caught in the program, produce a runtime error, which means that the program is terminated with a short dump.