Basic Features
When an exception is raised using RAISE EXCEPTION, the runtime environment immediately searches for a suitable handler, first in the procedure (that is, a modularization unit such as a subroutine, method, or function module) where the error occurred and then further up in the call hierarchy. Once a suitable handler is found, the control flow branches to that location and processes the code of the handler before continuing. If no handler can be found, the program ends with a short dump.
An exception object can contain translatable, parameterized texts, whose parameters are substituted at runtime. These texts should contain information about the error, which should be suitable for the relevant recipient. If it is a programmer, you can use a technical error description. However, if the error information is intended for end users, you should avoid messages such as "Severe error at memory location 1FA359. Do you want to debug?" and use a text that the end user can understand, for example “No database access”.
You can only handle an exception in an ABAP program if it is raised in a protected area. This is the area between TRY and the handlers within a TRY-ENDTRY structure. The handlers themselves are not part of the protected area.
