on 09-10-2013 3:30 PM
Hi Katrice,
You can control this with methods SET_ROW_SELECTABLE and SET_SELECTION_MODE of interface IF_SALV_WD_TABLE_SETTINGS. You only need to call one or the other method, not both. Each method has a slightly different effect. SET_SELECTION_MODE will show or hide the selection column and SET_ROW_SELECTABLE will always show the selection column but will enable or disable the buttons.
DATA lo_cmp_usage TYPE REF TO if_wd_component_usage.
DATA lo_interfacecontroller TYPE REF TO iwci_salv_wd_table .
DATA lo_model TYPE REF TO cl_salv_wd_config_table.
DATA lo_settings TYPE REF TO if_salv_wd_table_settings.
* -- Instantiate the ALV used component
lo_cmp_usage = wd_this->wd_cpuse_alv_table( ).
IF lo_cmp_usage->has_active_component( ) IS INITIAL.
lo_cmp_usage->create_component( ).
ENDIF.
* -- Get ALV model
lo_interfacecontroller = wd_this->wd_cpifc_alv_table( ).
lo_model = lo_interfacecontroller->get_model( ).
* -- Enable or disable row selection
lo_settings = lo_model->if_salv_wd_view_settings~get_table_settings( ).
lo_settings->set_row_selectable( abap_false ). " or call...
lo_settings->set_selection_mode( cl_wd_table=>e_selection_mode-none ).
And re-enable row selection with
lo_settings->set_row_selectable( abap_true ). " or call...
lo_settings->set_selection_mode( cl_wd_table=>e_selection_mode-auto ).
Cheers,
Amy
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 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
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.