on 09-16-2013 6:40 AM
Hi Experts,
I have a webdynpro ALV report. In the ALV table there is a column ROUTECODE which is editable.
If there are 5 rows in the ALV table and user changes the field ROUTECODE of the second row and press enter button.
Then if the entered value is invalid, how to put focus on that cell ( field ROUTECODE of second row) with error message?
I have tried the sample code below but got stuck.
lo_api_controller ?= wd_this->wd_get_api( ).
CALL METHOD lo_api_controller->get_message_manager
RECEIVING
message_manager = lo_message_manager.
* report message
CALL METHOD lo_message_manager->report_attribute_error_message(
EXPORTING
message_text = lv_error
element = <-- Here how to get reference of the context element ( field ROUTECODE of second row) ?
attribute_name = 'ROUTECODE' ).
Thanks
Gopal
Hi,
To get the reference of 2nd row use the below code.
lo_el_<NODE> = lo_nd_<NODE>->get_element( index = 2 ).
For error handling you can simply loop the internal table and and validate the field and display error.
EX:
LOOP AT lt_flight INTO ls_flight.
* Do Validation
if error.
lo_el_flight = lo_nd_flight->get_element( index = sy-tabix ).
Display error
endif.
ENDLOOP.
Hope this helps u.,
Regards,
Kiran
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.