Show TOC

Background documentationIntegrating Messages Locate this document in the navigation structure

 

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

Method

Description

CLEAR_MESSAGES

Deletes all messages

IS_EMPTY

Queries whether messages are available

REPORT_ATTRIBUTE_ERROR_MESSAGE

Reports a Web Dynpro exception for a context attribute

REPORT_ATTRIBUTE_EXCEPTION

Reports a Web Dynpro exception for a context attribute

REPORT_ATTRIBUTE_T100_MESSAGE

Reports a Web Dynpro exception for a context attribute

REPORT_ERROR_MESSAGE

Reports a Web Dynpro message with optional parameters

REPORT_EXCEPTION

Reports a Web Dynpro exception (may be returned)

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 them.

You can specify the name of the window or view where the message is to be displayed in the relevant methods using optional parameter VIEW.

End of the note.

Example

Syntax Syntax

Triggering a T100 Message:

  1. * get message manager
  2. data: L_CURRENT_CONTROLLER type ref to IF_WD_CONTROLLER,
  3.       L_MESSAGE_MANAGER    type ref to IF_WD_MESSAGE_MANAGER.
  4. L_CURRENT_CONTROLLER ?= WD_THIS->WD_GET_API( ).
  5. call method L_CURRENT_CONTROLLER->GET_MESSAGE_MANAGER
  6.   receiving
  7.     MESSAGE_MANAGER = L_MESSAGE_MANAGER
  8. * report message
  9. call method L_MESSAGE_MANAGER->REPORT_T100_MESSAGE
  10.   exporting
  11.     MSGID         ='BC'
  12.     MSGNO         ='005'
  13.     MSGTY         ='E'
  14. *    P1            =
  15. *    P2            =
  16. *    P3            =
  17. *    P4            =
  18. *    MSG_USER_DATA =
End of the code.

More Information

For more information about the various methods, see the documentation of interface IF_WD_MESSAGE_MANAGER and the system interface and method documentation for the respective objects.