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.
lo_message_manager->report_attribute_error_message(
attribute_name = ls_messages-attribute_name
element = ls_messages-element
message_text = ls_messages-message ).
clear: ls_messages.
endloop.
return.
endif.
**************** 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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
13 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 | |
3 | |
2 | |
2 |