SAP EXCEPTION CLASS CREATE



Get Example source ABAP code based on a different SAP table
  



Creating Exception Classes
Exception classes can be defined globally in the Class Library or locally in a program. The naming conventions for global exception classes prescribe the prefix CX_ or, in the case of exception classes created in customer systems, YCX_ or ZCX_. There is a set of predefined global exception classes, such as those prefixed with CX_SY_, whose exceptions are raised in exception situations in the runtime framework.
All exception classes inherit the following instance methods from CX_ROOT:
GET_TEXT and GET_LONGTEXT return the exception text (short text and long text) as return values of type string. These methods are defined in the interface IF_MESSAGE implemented in CX_ROOT and can be addressed using the identically named alias name for the class.
GET_SOURCE_POSITION returns the program name, the name of a