Ansicht
Dokumentation

ABENMESSAGE_INTERFACE_GLOBAL_ABEXA - MESSAGE INTERFACE GLOBAL ABEXA

ABENMESSAGE_INTERFACE_GLOBAL_ABEXA - MESSAGE INTERFACE GLOBAL ABEXA

General Data in Customer Master   ABAP Short Reference  
This documentation is copyright by SAP AG.
SAP E-Book

- IF_T100_MESSAGE in a Global Exception Class

This example demonstrates how a global exception class is linked with a message

Source Code

Execute

Description

This example works in the same way as the executable example in System Interface IF_T100_MESSAGE in a Local Exception Class. Here, however, the interface IF_T100_MESSAGE is included in the global exception class CX_DEMO_T100. The association with a message class was selected when the class was created. This specifies that the exception class is generated in such a way that it supports messages as exception texts, rather than merely including the interface IF_T100_MESSAGE.

On the tab Texts in the Class Builder, the message 888 from the message class SABAPDEMOS is assigned to the exception text DEMO of the exception class under Message Text. The placeholders of the message are linked with the attributes TEXT1 to TEXT4. The source code of the public section of the class implements this assignment using the structured constant DEMO with the type SCX_T100KEY. The constructor has an input parameter TEXTID that can be passed the constant DEMO and the input parameters TEXT1 to TEXT4 used to fill the identically named attributes.

A structure passed to the input parameter TEXTID when an exception from this class is raised is assigned to the structure T100KEY of the interface IF_T100_MESSAGE. This uses the corresponding message as an exception text. It is recommended that only the predefined constants of the class are passed, as shown here.

See also the executable examples listed below.






Addresses (Business Address Services)   CL_GUI_FRONTEND_SERVICES - Frontend Services  
This documentation is copyright by SAP AG.

Length: 2665 Date: 20240420 Time: 073109     sap01-206 ( 47 ms )