In the previous article of this tutorial, the author introduced a useful tool for checking program runtime errors in the ABAP system: transaction code ST22:
In the actual work process of the author, I found that some developers do not understand the difference between the concepts of runtime error (Runtime Error) and exception (Exception) very clearly, so I use this article to specifically introduce ABAP exception handling. Concept and practice.
We first find out the official SAP ABAP help document for exception handling.
Simply create a new ABAP report in the SE38 transaction code, select an ABAP keyword with the mouse, and click F1 to summon the ABAP help document embedded in SAPGUI.
In the pop-up dialog box, we ABAP - Reference->Program Flow Logic->Exception Handling
can select in turn. Exception handling involves changes to the program execution flow, so it is placed under the Program Flow Logic chapter, as shown in the following figure:
Judging from the subtitle of Exception Handling in the above figure, we can find that ABAP exceptions are divided into the following two categories:
- Non-Class-Based Exceptions - Exceptions implemented based on non-ABAP classes
- Class-Based Exception - Exception based on ABAP class implementation
Below is a detailed introduction to these concepts .