Procedure documentationHiding Standard Functions Locate this document in the navigation structure

 

Depending on the application area and the data displayed in the ALV Grid Control, not all standard functions are needed or useful. This is why you can either hide the entire toolbar or display only a subset of the standard functions available.

Procedure

Hiding the Entire Toolbar
  1. Set the parameter NO_TOOLBAR of the layout structure:

    Syntax Syntax

    1. data:	gs_layout type lvc_s_layo.
      	gs_layout-no_toolbar = 'X'.
    End of the code.
  2. Pass the layout structure with method set_table_for_first_display.

Hiding Individual Functions
  1. Define a table of type UI_FUNCTIONS and a work area of type UI_FUNC:

    Syntax Syntax

    1. data:	lt_exclude type ui_functions,
      	ls_exclude type ui_func.
    End of the code.
  2. Append the attributes of the functions you want to hide to the table:

    Syntax Syntax

    1. ls_exclude = cl_gui_alv_grid=>mc_fc_sum.
      append ls_exclude to lt_exclude.
    End of the code.

    Note Note

    The attributes of the standard functions all begin with the prefix MC_FC_. In addition, there is the prefix MC_MB_ for an entire menu in the toolbar.

    End of the note.
  3. Pass the table using the parameter it_toolbar_excluding of the method set_table_for_first_display.

Result

Either the entire toolbar or the icons of the standard functions passed in the table are not visible during the entire lifetime of the ALV Grid Control.