Skip to Content

Report multiple different attribute error/success/warning messages at a time.

This document guides you how to report multiple different messages at a time.

Create a structure at se11 level like below:


and write the below code in your WDP component:

data:      lt_messages type table of ZST_WD_REPORT_ATTR_ERROR_MSG,

             ls_messages type ZST_WD_REPORT_ATTR_ERROR_MSG.

ls_messages-attribute_name = ‘ATTRIBUTE1’.

ls_messages-element           = <lo_element>.

ls_messages-message          = ‘Display message 1’.

append ls_messages to lt_messages.

ls_messages-attribute_name = ‘ATTRIBUTE 2’.

ls_messages-element           = <lo_element>.

ls_messages-message          = ‘Display message 2’.

append ls_messages to lt_messages.

ls_messages-attribute_name = ‘ATTRIBUTE 3’.

ls_messages-element           = <lo_element>.

ls_messages-message          = ‘Display message 3’.

append ls_messages to lt_messages.

***** Display messages at a time.

if lt_messages is not initial.

     loop at lt_messages into ls_messages.


                    attribute_name = ls_messages-attribute_name

                    element           = ls_messages-element

                    message_text  = ls_messages-message ).

          clear: ls_messages.




**************** above is the sample for attribute error message, you can use this for all types of messages by pointing respective parameters.

hope this would be very helpful.

Be the first to leave a comment
You must be Logged on to comment or reply to a post.