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: 

Hide sort(ascending and descending) buttons in an alv report.

Former Member
0 Kudos

Hi,

I want to hide the sort(ascending and descending) buttons in an alv report.

can any one help me with the code?

I am not able to use the parameter IT_TOOLBAR_EXCLUDING

of SET_TABLE_FOR_FIRST_DISPLAY of class CL_GUI_ALV_GRID.

Regards,

Himanshu.

2 REPLIES 2

Former Member
0 Kudos

And why can't you use this parameter (this is exactly the parameter to be used for hiding buttons)?

Regards,

John.

Former Member
0 Kudos

Hi,

data it_exclude type ui_functions.

  • Exclude Standard Functions

PERFORM f_excludetoolbar USING obj_cust_grid

CHANGING it_exclude.

FORM f_excludetoolbar USING u_obj_cust_grid TYPE REF TO cl_gui_alv_grid

CHANGING c_it_exclude TYPE ui_functions.

  • Exclude Standard Functions

CLEAR: c_it_exclude.

APPEND u_obj_cust_grid->mc_fc_check TO c_it_exclude.

APPEND u_obj_cust_grid->mc_fc_refresh TO c_it_exclude.

APPEND u_obj_cust_grid->mc_fc_loc_copy TO c_it_exclude.

APPEND u_obj_cust_grid->mc_fc_loc_copy_row TO c_it_exclude.

APPEND u_obj_cust_grid->mc_fc_loc_cut TO c_it_exclude.

APPEND u_obj_cust_grid->mc_fc_loc_delete_row TO c_it_exclude.

APPEND u_obj_cust_grid->mc_fc_loc_append_row TO c_it_exclude.

APPEND u_obj_cust_grid->mc_fc_loc_insert_row TO c_it_exclude.

APPEND u_obj_cust_grid->mc_fc_loc_move_row TO c_it_exclude.

  • APPEND u_obj_cust_grid->MC_FC_SORT_DSC TO c_it_exclude.

APPEND u_obj_cust_grid->MC_FC_SORT_ASC TO c_it_exclude.

APPEND u_obj_cust_grid->MC_FC_SORT TO c_it_exclude.*

ENDFORM. " f_excludetoolbar

Hope it will helpful for you.

Reward if found helpful.

Regards,

SB