on 06-04-2009 12:59 PM
Hi All,
For example, during we create our resumes in monster or naukri, if there is a error in a field, the field colour changes from white to yellow, like that i have a requirement in my webdynpro screen.
You can use report_attribute_error_message, this will highlight the field with a red border.
Use the following code,
* get message manager
DATA lo_api_controller TYPE REF TO if_wd_controller.
DATA lo_message_manager TYPE REF TO if_wd_message_manager.
data: l_node type ref to if_wd_context_node.
data: l_elem type ref to if_wd_context_element.
lo_api_controller ?= wd_this->wd_get_api( ).
CALL METHOD lo_api_controller->get_message_manager
RECEIVING
message_manager = lo_message_manager.
l_node = wd_context->get_child_node( 'NODENAME' ).
lr_element = l_node->get_element( ).
* report message
CALL METHOD lo_message_manager->report_attribute_error_message
EXPORTING
message_text = 'Your Text'
element = lr_element
attribute_name = 'ATTRIBUTE NAME'.
Regards,
Radhika.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi all!
I¡m trying to do something similiar but I want to highlight a input field cell of an ALV row table.
I've used the same source code but nothing appears on the screen, no message and no cell highlighted. I put my source code for more information:
LOOP AT lt_data_mod INTO ls_data_mod.
alternative access via index
lo_el_n_empleado = lo_nd_n_empleado->get_element( index = ls_data_mod-index ).
CHECK VALUE
report message
CALL METHOD wd_comp_controller->go_message->report_attribute_t100_message
EXPORTING
msg = ls_msg
element = lo_el_n_empleado
attribute_name = ls_data_mod-attribute.
All that source code is in ON_DATA_CHECK event of ALV component.
Can anyone help me ?
Thanks!
Hi Siva,
There is no prperty like changing the background color , but what you can do is you anyway binded this input field value to some context node attribute. so if the user enters a wrong value in the input field and press enter . in the ON_ENTER event you can check the wrong value and change the context node attribute value to 'Please enter a correct value' like that .
Regards,
Anil kumar G
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.