Start of Content Area

Background documentation Message Integration   Locate the document in its SAP Library structure

Messages are integrated into the message log of a component using the Message Manager (interface IF_WD_MESSAGE_MANAGER) . The Message Manager is integrated into the Web Dynpro Code Wizard. The following methods are provided for triggering messages:

      CLEAR_MESSAGES

Deletes all messages

      IS_EMPTY

Queries whether there are any messages

      REPORT_ATTRIBUTE_ERROR_MESSAGE

Reports a Web Dynpro exception to a context attribute

      REPORT_ATTRIBUTE_EXCEPTION

Reports a Web Dynpro exception to a context attribute

      REPORT_ATTRIBUTE_T100_MESSAGE

Reports a Web Dynpro exception to a context attribute

      REPORT_ERROR_MESSAGE

Reports a Web Dynpro message with optional parameters

      REPORT_EXCEPTION

Reports a Web Dynpro exception (it may come back)

      REPORT_FATAL_ERROR_MESSAGE

Reports a fatal Web Dynpro message with optional parameters

      REPORT_FATAL_EXCEPTION

Reports a fatal Web Dynpro exception

      REPORT_SUCCESS

Reports a success message

      REPORT_T100_MESSAGE

Reports a message using a T100 entry

      REPORT_WARNING

Reports a warning

Note

Note the RAISE methods in the Message Manager are deprecated. For this reason you should not use it.

For the relevant methods you can use the optional parameter VIEW to enter the name of the window or view in which you want to display the message.

Additional Information

You can find additional information about the various methods in the documentation of the IF_WD_MESSAGE_MANAGER interface as well as in the interface documentation and method documentation which is stored under each object in the system.

Example

Triggering a T100 Message

* get message manager

data: L_CURRENT_CONTROLLER type ref to IF_WD_CONTROLLER,

      L_MESSAGE_MANAGER    type ref to IF_WD_MESSAGE_MANAGER.

 

L_CURRENT_CONTROLLER ?= WD_THIS->WD_GET_API( ).

 

call method L_CURRENT_CONTROLLER->GET_MESSAGE_MANAGER

  receiving

    MESSAGE_MANAGER = L_MESSAGE_MANAGER

    .

 

* report message

call method L_MESSAGE_MANAGER->REPORT_T100_MESSAGE

  exporting

    MSGID         ='BC'

    MSGNO         ='005'

    MSGTY         ='E'

*    P1            =

*    P2            =

*    P3            =

*    P4            =

*    MSG_USER_DATA =

 

 

 

 

 

End of Content Area