Show TOC Start of Content Area

Background documentation User Messages  Locate the document in its SAP Library structure

Messages are language-specific texts that are displayed on the screen if an error occurred during the execution of an application. The messages are defined at the level of a Web Dynpro component.

Sources of User Message Texts

Messages can come from the following sources:

      message texts, that you enter directly in the coding of the controller method

You can use API methods to directly display message text on the screen (hard coded messages).

Caution

An international application must not contain any language-specific text elements in its source code. For maintenance reasons, SAP strongly recommends not to enter user messages directly in the coding.

      message texts, that you maintain within the Message Editor tool

You maintain message texts and assign an appropriate key. These texts can be translated into all required languages by means of language specific XLF files. To display the message, you refer to the message key in the source code. The system displays the required language version at runtime.

More information: Defining User Messages 

      message texts, that are automatically generated by the system

You can define UI elements bound to a context attribute of a basic data type. If the user triggers an error message using these UI elements, the system automatically generates the appropriate text. You cannot modify the text or the appearance of the text.

Additionally to the message, the UI element that triggers the message is assigned a red frame to indicate, where the error occurred.

More information: Bindable Data Types

User Message Types

The runtime environment offers users a dialog with the Web Dynpro application using the appropriate methods and depending on the message type. The message types also appear differently on the user interface.

You can create a user message of the following available types:

Message Type

Indicator

Success

This graphic is explained in the accompanying text

Warning

This graphic is explained in the accompanying text

Error

This graphic is explained in the accompanying text

Info

This graphic is explained in the accompanying text

These message types are used by the IWDMessageManager class and become runtime constants, each message being of type IWDMessage. Depending on which message type you assigned the message at design time, the appropriate icon is displayed with the message at runtime.

If you do not want to assign one of the message types already at design time, you can also assign the message type text. These messages are of type IWDText. You access these messages through class IWDTextAccessor. To display the message with the required icon, you then use the appropriate method.

End of Content Area