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: 

Remove buttons in alv

Former Member
0 Kudos
75

Hi,

I am using an ALV OO, i need to keep with 2 buttons in the ALV these buttons are Search and Filter in the toolbar, can anyone tell me how can i do that.

Thanks.

Guillermo

2 REPLIES 2

former_member194669
Active Contributor
0 Kudos
45

Please check the program LK41CF32. line 50 to 59


  perform exclude_icons_from_grids changing lt_excl.

* initialize grid
  call method g_alv_grid->set_table_for_first_display
       exporting
            is_layout            = ls_layout
            it_toolbar_excluding = lt_excl
       changing
            it_fieldcatalog  = lt_fieldcat
            it_outtab        = ct_headers.

Former Member
0 Kudos
45

Hi,

try to exclude it in this way:

DATA: GT_EXCLUDE TYPE UI_FUNCTIONS.

DATA: GS_EXCLUDE TYPE UI_FUNC.

...

GS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_FIND.

APPEND GS_EXCLUDE TO GT_EXCLUDE.

GS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_FILTER.

APPEND GS_EXCLUDE TO GT_EXCLUDE.

CALL METHOD GR_ALVGRID->SET_TABLE_FOR_FIRST_DISPLAY

EXPORTING

IT_TOOLBAR_EXCLUDING = GT_EXCLUDE

IS_LAYOUT = GS_LAYOUT

IS_VARIANT = GS_VARIANT

I_SAVE = 'X'

  • IT_EXCEPT_QINFO = GT_EXCEPT_QINFO

CHANGING

IT_FIELDCATALOG = GT_FIELDCAT

IT_SORT = GT_SORT

IT_OUTTAB = IT_ITAB.

*

Regards, Dieter