on 03-31-2009 1:00 PM
I remember that I once saw a method that allowed to switch on all features of an ALV with one method call (e.g. sorting, filtering, personallization, aggregations, graphical view, etc.), but I forgot the method name.
Can somebody tell me?
I just ran down through the interface of CL_SALV_WD_CONFIG_TABLE and I don't see any such method listed there. That's where it would be if there was one, but I don't remember there ever being such a thing. Many of the options default to being on anyway. I would suggest that if there is a common configuration that you like that you write a simple static class method that calls the SET_*_ALLOWED methods of the Config Table Model. That way you have one reusable, central place where you can maintain the settings (as SAP adds new options over the years).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Please check out the same - This will disable the things
DATA:
lr_filter TYPE REF TO if_salv_wd_std_functions. "Reference for the standard alv function
*" Set the UI elements.
if lr_model is not initial.
lr_filter ?= lr_model. "Model object for ALV
*" Specify the setting for using ALV filter
lr_filter->set_filter_complex_allowed( value = abap_false ).
lr_filter->set_sort_headerclick_allowed( abap_false ).
lr_filter->set_filter_filterline_allowed( abap_false ).
lr_filter->set_sort_complex_allowed( abap_false ).
lr_filter->set_view_list_allowed( abap_false ).
lr_filter->set_pdf_allowed( abap_false ).
endif.
If you want to hide the toolbar settings also then you have use this code -
***Reference to the standard button reference of the ALV
DATA:
ls_functions_std type SALV_WD_S_FUNCTION_STD_REF.
***Modifying The standard functionality buttons
if lt_functions_std1 is not initial.
loop at lt_functions_std1 into ls_functions_std.
case ls_functions_std-id.
when wd_assist->GC_APPEND_ROW. "'SALV_WD_INPUT_APPEND_ROW'
CALL METHOD LS_FUNCTIONS_STD-R_FUNCTION->SET_VISIBLE
EXPORTING
VALUE = CL_WD_UIELEMENT=>E_VISIBLE-NONE.
when wd_assist->GC_INPUT_DELETE. "'SALV_WD_INPUT_DELETE'
CALL METHOD LS_FUNCTIONS_STD-R_FUNCTION->SET_VISIBLE
EXPORTING
VALUE = CL_WD_UIELEMENT=>E_VISIBLE-NONE.
when wd_assist->GC_INSERT_ROW. "'SALV_WD_INPUT_INSERT_ROW'
CALL METHOD LS_FUNCTIONS_STD-R_FUNCTION->SET_VISIBLE
EXPORTING
VALUE = CL_WD_UIELEMENT=>E_VISIBLE-NONE.
when wd_assist->GC_EXPORT_EXCEL. "'SALV_WD_EXPORT_EXCEL'
CALL METHOD LS_FUNCTIONS_STD-R_FUNCTION->SET_VISIBLE
EXPORTING
VALUE = CL_WD_UIELEMENT=>E_VISIBLE-NONE.
when wd_assist->GC_PDF. "'SALV_WD_PDF'
CALL METHOD LS_FUNCTIONS_STD-R_FUNCTION->SET_VISIBLE
EXPORTING
VALUE = CL_WD_UIELEMENT=>E_VISIBLE-NONE.
when wd_assist->GC_INPUT_CHECK. "'SALV_WD_INPUT_CHECK'
CALL METHOD LS_FUNCTIONS_STD-R_FUNCTION->SET_VISIBLE
EXPORTING
VALUE = CL_WD_UIELEMENT=>E_VISIBLE-NONE.
when wd_assist->GC_EXPORT. "'SALV_WD_EXPORT'
CALL METHOD LS_FUNCTIONS_STD-R_FUNCTION->SET_VISIBLE
EXPORTING
VALUE = CL_WD_UIELEMENT=>E_VISIBLE-NONE.
when wd_assist->GC_FILTER . "'SALV_WD_FILTER'
CALL METHOD LS_FUNCTIONS_STD-R_FUNCTION->SET_VISIBLE
EXPORTING
VALUE = CL_WD_UIELEMENT=>E_VISIBLE-NONE.
when wd_assist->GC_SETTINGS. "'SALV_WD_SETTINGS'
CALL METHOD LS_FUNCTIONS_STD-R_FUNCTION->SET_VISIBLE
EXPORTING
VALUE = CL_WD_UIELEMENT=>E_VISIBLE-NONE.
endcase. "Case ls_functions_std-id
clear LS_FUNCTIONS_STD.
endloop. "LOOP at lt_functions_std1 into ls_functions_std.
endif. "IF lt_functions_std1 is not
initial.
Regards,
Lekha.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.