SAP RAISE MESSAGE GLOBAL ABEXA



Get Example source ABAP code based on a different SAP table
  


VX_EXA_ONLY

ABAP_MSG - IF_T100_DYN_MSG in a Global Exception Class
This example demonstrates how a global exception class is linked with a message

ABAP_SOURCE_CODE
DEMO CL_DEMO_RAISE_MSG_GLOBAL

ABAP_DESCRIPTION
This example demonstrates the transformation of a non-class-based exception raised in a method using the statement MESSAGE RAISING and, when the method is called, handled using the addition EXCEPTIONS, to a class-based exception. This example works in the same way as the executable example for the system interface IF_T100_MESSAGE , but uses the class CX_DEMO_DYN_T100 , which implements the system interface IF_T100_DYN_MSG.
In both cases, sy-msgid and sy-msgno can be used after the addition MESSAGE of the statement RAISE EXCEPTION to associate the exception object with the message.
sy-msgv1 to sy-msgv4 can be specified after WITH and are automatically assigned to the interface attributes MSGV1 to MSGV4 here.
sy-msgty can also be passed here using MESSAGE.



Latest notes:

See also the executable example for using a short form of statement RAISE EXCEPTION MESSAGE.
ABAP_HINT_END