Hi,
We have requirement to handle error messages. In a data input form, if we get multiple errors we are displaying all errors in a message area. When we click on error message, focus should go to the UI element which causes to the error.
We have used 'CALL METHOD lo_message_manager->report_attribute_error_message' by exporting the element and attribute name. This method works fine incase of Input Field type UI element. When we run the application on DISPLAY action errors are displaying for both fields 'INPUT FIELD' and 'DROPDOWNBYINDEX' . But we have URL on the error related to 'INPUT FIELD' and when we click on error message control/cursor going to the INPUT FIELD.
But we could not find same functionality incase of DropDownbyIndex UI Element.
Please help us to resolve the problem. Does SAP Web Dynpro ABAP provide this functionality?
Below attached written code for reference.
CASE lo_action->name.
WHEN 'DISPLAY'.
IF lv_num1 IS INITIAL.
report message
CALL METHOD lo_message_manager-report_attribute_error_message
EXPORTING
message_text = 'Please enter the value'
element = lo_el_numbers
attribute_name = `NUM1`
params =
msg_user_data =
is_permanent = ABAP_FALSE
scope_permanent_msg = CO_MSG_SCOPE_CTXT_ELEMENT
msg_index =
cancel_navigation =
is_validation_independent = ABAP_FALSE
.
ENDIF.
IF lv_age eq '999'.
report message
CALL METHOD lo_message_manager-report_attribute_error_message
EXPORTING
message_text = 'Please enter the age'
element = lo_el_personal_info
attribute_name = `AGE`
params =
msg_user_data =
is_permanent = ABAP_FALSE
scope_permanent_msg = CO_MSG_SCOPE_CTXT_ELEMENT
msg_index =
cancel_navigation =
is_validation_independent = ABAP_FALSE
.
ENDIF.
ENDCASE.
Thanks
Venkat