In Web Dynpro ABAP you can create and display messages that contain important information for the end user of the Web Dynpro application. Messages are language-dependent texts that are displayed on the screen if, for example, an error occurs when an application is run, or the user has entered data in the wrong format.
For NW7.0 SPS11 messages and the Message Area have been given a new design that improves user guidance and is similar to the old design. The new design is the default setting. You can however switch to the old design. See also: Configuration of Messages
Example Messages in the application WDR_TEST_MSG_AREA
Example application for user input checks (WDR_TEST_INPUT)
For programming these user messages (such as information, error messages, and warnings), the Web Dynpro runtime of the application server ABAP provides a runtime service. The message component is part of every Web Dynpro application and be configured if required in the Settings for a Web Dynpro application. Three settings are possible for handling messages:
● Show message component if required
If messages exist, they are displayed.
Example with message:
Example without message (the upper area is empty):
● Always show message component
Even if there are no messages, the message component is still displayed in the top view.
Example:
User messages are displayed as links in the status bar. The user can then use the link to navigate to the user UI element that can be used to remove the error reported in an error message. The input focus is thus transferred automatically, thereby significantly increasing the efficiency of the messages. It is also possible to display multiple messages on the screen in a table.
You can assign specific views and windows to messages so that messages that actually belong for instance to the main window are not displayed in a popup. To do this, you can use the optional parameter VIEW in the message manager methods to specify the name of the relevant view or window.
To improve how your application displays messages, check whether it would be useful to include a message in a view or window in certain places, rather than it being displayed in a popup. If you use read-only popups, it may also be useful to suppress the entire message display.
Messages are defined at the level of a Web Dynpro component.
The ABAP development tools include a graphics tool for Message Maintenance.
See also:
Reusable Components and the Message Area
The message display in a popup works on demand in the standard configuration, regardless of what is set in the application.
Popups can still be configured using an indicator so that they display:
● All messages as up to now (standard setting)
● Only those messages that belong to their window, as well as all non-window-specific messages
● No messages at all.
● If a long text exists for a message, the message is displayed with a link.
● Display
Depends on the settings for the application described above.
Several messages are displayed in a scrollable table.
○ Current messages from the last user interaction.
○ Switch to message log possible
Example
Note that only messages of types info and warning are displayed in the message log Messages of all types are currently displayed.
○ The last message with the highest severity is at the beginning of the current messages, in the message log on the other hand the individual messages are displayed according to the time they occurred.
○ One counter for new messages and one counter for all messages
○ Symbol for the weighting of each message.
○ Time stamp for all messages.
● Messages are sorted in a tab strip by:
○ Weighting
○ Message text
○ Help (message long text)
○ Time stamp
● Input of filter criteria for:
○ Weighting
○ Message text
○ Help (message long text)
○ Time stamp
● Reset (delete) the entire message log
● Show and hide message log.
○ Hide
Only the current messages the link Display Message Log are displayed.
○ Mapping
Table view of the current messages and the total number of messages.
For application development the UI element MessageArea is provided for positioning the message display on the screen.
Note that the properties maxVisibleMessages and historyVisible are not evaluated.
The procedure to integrate messages into your application can be found in Integration.
You can find example applications in the system in components WDR_TEST_MSG_AREA and WDR_TEST_INPUT.