Show TOC

Dealing with ExceptionsLocate this document in the navigation structure

Exceptions are situations that occur while an ABAP program is being executed, in which normal continuation of the program does not make any sense. Exceptions can be raised either implicitly in the ABAP runtime environment or explicitly in the ABAP program. For example, division by zero leads to an exception in the ABAP runtime environment. It is possible to determine this situation through a query in the ABAP program and to trigger an exception there.

There are two main types of exceptions:  those that can be handled and those that cannot be handled.

Exceptions that can be handled occur in error situations in the runtime environment or in the ABAP program, where the program can continue executing after the ABAP program has handled the exception, without the system ending up in a critical state. If such an exception is not handled, a runtime error occurs.

The second type of exceptions are those that cannot be handled. These are critical error situations in the runtime environment. Handling with ABAP means is not possible and they always cause a runtime error.

As of Release 6.10, exceptions and their handling are generally based on exception classes . This concept covers the functions of the preceding concepts , enhances them, and thus replaces them.