Get Example source ABAP code based on a different SAP table
ABAP_MSG - IF_T100_MESSAGE> in a Regular Class This example demonstrates how a regular class is linked with a message
ABAP_SOURCE_CODE DEMO CL_DEMO_IF_T100_MESSAGE
ABAP_DESCRIPTION Objects in the example class msg> shown here can represent any messages from the table T100> and can be used in the statement MESSAGE>>. There are four attributes ATTR1 > to ATTR4> for the content of four placeholders. The constructor provides input parameters for all necessary values. In the constructor, the message class and the message number are written directly to the associated components of the interface structure T100KEY>. The identically named attributes are assigned to the components ATTR1> to ATTR4> and filled with the passed values. After the class is instantiated, the message text is obtained using the interface method GET_TEXT>, which is implemented appropriately in the class and for which an alias name is declared. The object of the class can be used directly as an operand of the statement MESSAGE>> in ABAP language versions where that syntax is allowed. The message type is not stored as an attribute of the class but must be specified in the calling method.
Latest notes: See also the executable example System Interface IF_T100_DYN_MSG> in Regular Class>. NON_V5_HINTS ABAP_HINT_END