Following is my code :
I am using the below logic to disable a button 'EMAIL' from the alv output.
But the statement lo_functions = gr_table->get_functions( ) doesn't return me all the PF status functions.Hence i am not able to get 'EMAIL' function in t_functions table.But i can see my other functions present in the table t_functions.
The Email button is showing in the ALV output but it is not present in t_functions table filled in get_functions method of cl_salv_function.
r_table->set_screen_status(
pfstatus = 'SALV_STANDARD'
report = gv_repid
set_functions = gr_table->c_functions_all ).
DATA: lo_functions TYPE REF TO cl_salv_functions,
lt_func_list TYPE salv_t_ui_func,
la_func_list LIKE LINE OF lt_func_list.
* Get all functions
lo_functions = gr_table->get_functions( ).
lt_func_list = lo_functions->get_functions( ).
* Hide Email
LOOP AT lt_func_list INTO la_func_list.
IF la_func_list-r_function->get_name( ) = 'EMAIL'.
la_func_list-r_function->set_visible( ' ' ).
ENDIF.
ENDLOOP.