on 06-02-2008 2:41 PM
Can someone tell me what methods need to be used to modify an ALV table to inhibit the showing of the functioniality in the header? I want to introduce this functionality to the users at a later date, but for now it should look like a standard table.
Hi Bob
Use methods SET_DIALOG_SETTINGS_ALLOWED, SET_VIEW_LIST_ALLOWED, SET_FILTER_FILTERLINE_ALLOWED,SET_FILTER_COMPLEX_ALLOWED of class IF_SALV_WD_STD_FUNCTIONS
Here is the sample code
data:
lr_std TYPE REF TO if_salv_wd_std_functions,
l_VALUE type ref to Cl_Salv_Wd_Config_Table.
l_VALUE = l_ref_INTERFACECONTROLLER->Get_Model(
).
lr_std->SET_DIALOG_SETTINGS( abap_false ).
lr_std->SET_VIEW_LIST_ALLOWED( abap_false ).
Regards
Naresh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bob,
The following piece of code can be used to hide the drop down and the settings and filter buttons in the standard toolbar.
* get all std functions and hide by ID
data: lt_std_func type SALV_WD_T_FUNCTION_STD_REF,
ls_std_func type SALV_WD_S_FUNCTION_STD_REF,
* Hide the settings and filter buttons
lt_std_func = l_alv_model->if_salv_wd_function_settings~get_functions_std( ).
loop at lt_std_func into ls_std_func.
case ls_std_func-id.
when 'SALV_WD_FILTER' or 'SALV_WD_SETTINGS' or 'SALV_WD_VIEW_LOAD'.
ls_std_func-r_function->set_visible( CL_WD_UIELEMENT=>E_VISIBLE-NONE ).
when others.
ls_std_func-r_function->set_visible( CL_WD_UIELEMENT=>E_VISIBLE-VISIBLE ).
endcase.
endloop.
Instead of getting all the std functions, you can also get individual functions by ID and hide them. Or you can achieve this by calling methods of IF_SALV_WD_STD_FUNCTIONS.
Regards,
Nithya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bob.
Hide / add function buttons in your ALV
You can hide all function buttons of the ALV with one of these methods.
Set toolbar visibility to false.
data: lr_function_settings type ref to if_salv_wd_function_settings.
lr_function_settings ?= wd_this->r_table. lr_function_settings->set_visible( CL_WD_UIELEMENT=>E_VISIBLE-NONE ).
set default ALV Functions off
data: lr_standard_functions type ref to if_salv_wd_std_functions.
lr_standard_functions ?= wd_this->r_table.
lr_standard_functions->set_sort_headerclick_allowed( ABAP_false ).
lr_standard_functions->set_filter_filterline_allowed( ABAP_false ).
lr_standard_functions->set_filter_complex_allowed( ABAP_false ).
lr_standard_functions->set_sort_complex_allowed( ABAP_false ).
You can set individual functions with these methods:
CALL METHOD cl_salv_wd_config_table=>if_salv_wd_standard_functions~set_<x>_allowed
EXPORTING
Value = ABAP_true.
Where <x> is to be replaced with the property of your choice.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
77 | |
10 | |
9 | |
7 | |
6 | |
5 | |
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.