Get Example source ABAP code based on a different SAP table
Warning: Undefined variable $prev in /customers/b/9/9/trailsap.com/httpd.www/sap-help/index.php on line 54
ARTIClE
Exceptions, RAISE> This example demonstrates the statement RAISE EXCEPTION>.
ABAP_SOURCE_CODE ABAP_EXEC >
ABAP_DESCRIPTION This example shows the two variants of the RAISE EXCEPTION> statement. The first statement raises an exception of class CX_DEMO_CONSTRUCTOR> in the inner TRY> block, generates the relevant object, and passes the program name to the instance constructor. The inner CATCH> block handles the exception, provides the exception text, and raises the exception again without generating a new object. The outer CATCH> block handles the exception again. The CX_DEMO_CONSTRUCTOR> class is defined in such a way that the passed program name appears in the exception text. The generated instance constructor takes care of this. The line number in which the exception was raised is shown to indicate that, when the existing exception object was reused, information relevant to this object was modified.