You create an exception class to build a template for objects in order to handle a class-based error. In this case, a certain message is displayed that is defined with an exception ID, which in turn displays a T100 message.
In SAP NetWeaver 7.5 SP00 and higher, the exception class implements the system interface IF_T100_DYN_MSG. It extends and covers all functionality of the system interface IF_T100_MESSAGE that is implemented in the previous SAP NetWeaver releases.
The system IF_T100_MESSAGE is used to statically assign specific messages to an exception class that defines the semantics of the exception. The system interface IF_T100_DYN_MSG allows you to assign arbitrary messages of message classes to the exception by using the statement RAISE EXCEPTION ... MESSAGE ... at runtime.
The exception class is created just like a regular ABAP class. Therefore, the back-end system creates an inactive version of a class pool in the selected package that is stored in the class library of the repository. In the Project Explorer, the new class is added to the Source Library of the corresponding package node.
In the source code editor, the initially generated source code is displayed and ready for editing.
Here, the constructor method of the superclass that is declared in the public section is added. It contains generated code that reflects the current state of the class hierarchy. Any further changes to the superclass constructor or the class itself will not trigger automatic adaptation of the constructor code in the exception class. This behavior is ensured by the ##ADT_SUPPRESS_GENERATION pragma that is added where the implementation of the constructor method begins.
The constructor code can be only regenerated by executing the cleanup utility in the back end. As a result, your own code in the constructor method will be lost in ADT after the cleanup.