on 09-16-2014 11:36 AM
Hi Friends
I am validating an input field(mandataory), when i get error message, it should set focus for this input field, can any one pls let me know how to do this
Thanks
Vijaya
Hi,
Use report_attribute_error_message( ) method which highlights the input automatically.
DATA lo_api_controller TYPE REF TO if_wd_controller.
DATA lo_message_manager TYPE REF TO if_wd_message_manager.
lo_api_controller ?= wd_this->wd_get_api( ).
CALL METHOD lo_api_controller->get_message_manager
RECEIVING
message_manager = lo_message_manager
.
CALL METHOD lo_message_manager->report_attribute_error_message
EXPORTING
message_text = 'Message Text'
element = lo_el_context
attribute_name = 'ATTR_NAME' " ATTR_NAME is the name of attribute to which the I/P is bound
Regards,
Kiran
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Use the message type as 'E' or the constants CO_TYPE_ERROR.
Or,
DATA ls_t100_msg TYPE symsg.
ls_t100_msg-msgid = message_class.
ls_t100_msg-msgno = message_number.
ls_t100_msg-msgty = message_type.
ls_t100_msg-msgv1 = message_parameter.
message_manager->report_attribute_t100_message(
msg = ls_t100_msg
element = lo_element
attribute_name = 'ATT_NAME'
).
Regards,
Kiran
Hi Vijaya,
Check REPORT_ATTRIBUTE_T100_MESSAGE( ) method. It will help you.
DATA ls_msg TYPE symsg.
ls_msg1-msgid = '<message_class_name>'.
ls_msg1-msgty = 'E'.
ls_msg1-msgno = <message no>.
CALL METHOD lo_message_manager->report_attribute_t100_message
EXPORTING
msg = ls_msg
element = <Element Reference>
attribute_name = '<attribute name'.
Thanks
KH
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
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.