Ansicht
Dokumentation

ABENEXCEPTION_TEXTS_INTERNAL - EXCEPTION TEXTS INTERNAL

ABENEXCEPTION_TEXTS_INTERNAL - EXCEPTION TEXTS INTERNAL

Addresses (Business Address Services)   ABAP Short Reference  
This documentation is copyright by SAP AG.
SAP E-Book

Exception Texts for System Classes

If an exception class does not implement the interface IF_T100_MESSAGE, texts stored in OTR (Online Text Repository) are used as exception texts. These texts can be defined with any number of placeholders. Each placeholder is represented by the name of an attribute of the exception class, which is enclosed by the "&" characters. When the exception is raised, the placeholders are replaced by the content of the attributes. The maintenance of exception texts is only possible in one tool:

  • Any exception texts can be defined on the Texts tab in the Class Builder in the ABAP Workbench. When saved, they are stored under a UUID in the OTR. For each exception text, the Class Builder creates an identically named constant with the data type SOTR_CONC from the ABAP Dictionary, which contains the UUID and generates an appropriate instance constructor.
  • The ABAP Development Tools (ADT) do not support any exception texts from OTR. No exception texts can be defined for the OTR and no UUIDs are created.

The input parameter TEXTID of the instance constructor has the data type SOTR_CONC. When an exception with these exception texts is raised, a UUID that identifies a text from OTR can be passed to the constructor. It is strongly recommended that only the constants that exist in the class for the predefined exception texts are passed, which selects a text defined for the exception. The attributes assigned to the placeholders of the text can be supplied with values using the input parameters of the same name of the instance constructor.

Notes

  • OTR texts should only occur in predefined exception classes for system exceptions and should not be used in self-defined exception classes. One example are the predefined exception classes for ABAP statements.
  • An exception text from the OTR is visible and can be edited on the Texts tab of the Class Builder, but the actual reference of the class to the text is created by the UUID that is stored in the identically named constant.
  • From a technical perspective, any UUID that specifies any text from OTR can also be passed to the input parameter TEXTID of the instance constructor. This is strongly discouraged, however, because an exception should only be raised with specific texts.
  • If the implementation of the interface IF_T100_MESSAGE is deleted from an existing exception class using messages as exception texts, the instance constructor can be modified using the function Utilities → Clean Up → Constructor in Class Builder in ABAP Workbench.





General Material Data   TXBHW - Original Tax Base Amount in Local Currency  
This documentation is copyright by SAP AG.

Length: 3395 Date: 20240426 Time: 141530     sap01-206 ( 70 ms )