on 01-13-2014 3:22 PM
Dear Experts,
Can any help me in "How to refresh ALV table columns "?
The scenario is : I have ALV table in my webdynpro component with
1st column has dropdown values (Say USERNAME , EMAIL , USER ID).
2nd Column has the facility(F4) to select values based values on 1st Column.
3rd Column has the relative description of 2nd Column values.
Now when i select USERNAME from my 1st column dropdown, and on click of F4 of 2nd column,the values related to USERNAME will display,the user can select any USERNAME value and on click of OK,Im populating the 2nd column with the value selected in F4 POPUP and 3rd Column with its respective description.
Now my 1st column in still in editable mode, But when User changes the dropdown value of 1st column from " USERNAME" to "EMAIL",The already polpulated values of USERNAME in COL-2 and COL-3 should be refreshed.
Pls help me to achieve this functionality.
Thanks in advance
Santhosh
Hi Santhosh,
You can achieve your requirement as below
lo_model->if_salv_wd_table_settings~set_cell_action_event_enabled(
abap_true ).
lo_model->if_salv_wd_table_settings~set_read_only( abap_false ).
DATA lo_node TYPE REF TO if_wd_context_node.
DATA lo_el TYPE REF TO if_wd_context_element.
" Nothing to do if column name is not "COLUMN1'
IF r_param->column NE 'COLUMN1'.
RETURN.
ENDIF.
lo_node = wd_context->get_child_node( name = wd_this->wdctx_table )." replace with your node name
"Get the element based on current index
lo_el = lo_node->get_element( index = r_param->index ).
IF lo_el IS BOUND.
"first name
lo_el->set_attribute(
EXPORTING
value = space "clear value
name = 'FIRST_NAME' "replace it with your ctx attr name
).
"last name
lo_el->set_attribute(
EXPORTING
value = space "clear value
name = 'LAST_NAME' "replace it with your ctx attr name
).
ENDIF.
Note: replace the node name, field names as per your application
Hope this helps you.
Regards,
Rama
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Santhosh,
Is your issue resolved? If yes, please close the discussion.
Regards,
Rama
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
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.