Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

how to disable generic alv buttons in CL_SALV_TABLE?

Former Member
0 Kudos

I am needing to disable individually the generic alv buttons in CL_SALV_TABLE.

I see how to disable buttons by group. eg-

lr_functions->set_group_export( abap_false ).

lr_functions->set_group_filter( abap_false ).

lr_functions->set_group_sort( abap_false ).

etc....

However, I cannot find source codes to disable individual buttons. Is it possible to do this?... and if so would appreciate an example coding.

Best Regards,

Dean Atteberry.

1 ACCEPTED SOLUTION

naimesh_patel
Active Contributor
0 Kudos

There are method available in the class CL_SALV_FUNCTIONS_LIST which can be helpful to active / deactive certain button.

Like: To remove the SORT Ascending button:


  data: lr_functions type ref to cl_salv_functions_list.

  lr_functions = gr_table->get_functions( ).
  lr_functions->SET_SORT_ASC( ).

Regards,

Naimesh Patel

2 REPLIES 2

naimesh_patel
Active Contributor
0 Kudos

There are method available in the class CL_SALV_FUNCTIONS_LIST which can be helpful to active / deactive certain button.

Like: To remove the SORT Ascending button:


  data: lr_functions type ref to cl_salv_functions_list.

  lr_functions = gr_table->get_functions( ).
  lr_functions->SET_SORT_ASC( ).

Regards,

Naimesh Patel

0 Kudos

Thank you, Naimesh. Exactly what I was looking for!

Dean.