SAP IF T100 DYN MSG



Get Example source ABAP code based on a different SAP table
  


VERSION 5 IN
• IF_T100_DYN_MSG ABAP_INTERFACE

ABAP_MSG - System Interface IF_T100_DYN_MSG
The interface IF_T100_DYN_MSG contains the interface IF_T100_MESSAGE as a component interface and adds the following to it:
The attribute MSGTY for the message type
The attributes MSGV1 to MSGV4 for the placeholders of the message
Like IF_T100_MESSAGE, the interface IF_T100_DYN_MSG associates classes with messages, whereby the attributes for the message type and placeholders of the message are already predefined.



Latest notes:

The interface IF_T100_DYN_MSG is designed specifically for raising class-based exceptions with the addition MESSAGE of the statement RAISE EXCEPTION or the addition THROW in conditional expressions. The properties of the message specified after MESSAGE are assigned automatically to the associated attributes in exception classes that include IF_T100_DYN_MSG.
The addition MESSAGE of RAISE EXCEPTION and/or THROW has a short form USING MESSAGE. This can be used for exception classes with the interface IF_T100_DYN_MSG and enables determining the message from the current content of the system fields sy-msg.... The short form can be used particularly for converting classical exceptions to class-based exceptions.
If the object reference variable oref points to an object that includes the system interface IF_T100_DYN_MSG in the variant MESSAGE oref of the statement MESSAGE, the addition TYPE can be omitted and the message type from the interface attribute MSGTY of the object is used implicitly.
NON_V5_HINTS
ABAP_HINT_END

ABAP_EXAMPLE_VX5
THROW is used to raise an exception of the class CX_DEMO_DYN_T100, which implements the interface IF_T100_DYN_MSG.
ABEXA 01049
ABAP_EXAMPLE_END

ABAP_EXAMPLES_ABEXA
System Interface IF_T100_DYN_MSG in a Regular Class
System Interface IF_T100_DYN_MSG in a Local Exception Class
System Interface IF_T100_DYN_MSG in a Global Exception Class
System Interface IF_T100_DYN_MSG for Exception error_message
ABAP_EXAMPLE_END