on 01-22-2016 12:23 PM
Hi,
I have to display the mandatory fields error as ' Fill in all required fields - field name' (Attribute name).
how can I get the attribute name using the standard error message?
Message was edited by: Mustafa Shareef
Hi Mustafa,
Try below code:
call method cl_wd_dynamic_tool=>check_mandatory_attr_on_view
exporting
view_controller = lo_view_controller
display_messages = abap_false " to hide message display
importing
messages = lt_messages.
here all message will come to itab lt_messages.
then by looping lt_messages to wa and changing message text to appropirate then you can pass as blow.
CALL METHOD lo_message_manager->report_element_error_message
EXPORTING
message_text = msg
element = ls_messages-context_element
attributes = lt_attributes.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.