cancel
Showing results for 
Search instead for 
Did you mean: 

Custom message on Check_mandatory_attr_on_view

Former Member
0 Kudos

Hi,

How can I customize the message on check_mandatory_attr_on_view?

Scenario:

My application has a input field with required item.

When I try save with blank input field, It shows me the box with message "Fill Input Field".

I want to change this message.

Thanks

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

The method CHECK_MANDATORY_ATTR_ON_VIEW returns to you a table with the following information:

- The actual message

- The context element

- The attribute

You need not directly display the message, you can loop into this table, use the information supplied from the method and display your own message.

Regards,

Wenonah

dork_nubla
Participant
0 Kudos

hi,

How can i changed the error messages? i tried to modify the message table but it seems that it posts the error message inside the method. So even if i edit/delete the output table, nothing happens. here's my code:

TYPES: begin of t_check_result_message,

t100_message type symsg,

context_element type ref to if_wd_context_element,

attribute_name type string,

end of t_check_result_message .

DATA: lt_messages TYPE TABLE OF t_check_result_message.

DATA: l_view_controller type ref to if_wd_view_controller.

l_view_controller = wd_this->wd_get_api( ).

CALL METHOD CL_WD_DYNAMIC_TOOL=>CHECK_MANDATORY_ATTR_ON_VIEW

EXPORTING

VIEW_CONTROLLER = l_view_controller

DISPLAY_MESSAGES = ABAP_TRUE

IMPORTING

MESSAGES = lt_messages.

REFRESH lt_messages[].