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: 

ALV Toolbar on modal dialog screen and toolbar on text edit control

Former Member
0 Kudos

Hello,

I have created one container and producing ALV Grid output on a modal dialog screen. i do not want the ALV Toolbar to appear on this screen. How can I hide it ?

ALso I need to hide some buttons on a Text edit control. How can I hide them ?

Thanks and rgds,

Anand

3 REPLIES 3

Former Member
0 Kudos

Hi,

To exclude some Toolbar functions, please do the below

DATA:

lt_toolbar_excl TYPE ui_functions.

  • Exclude Some toolbar functions

APPEND cl_gui_alv_grid=>mc_fc_detail TO lt_toolbar_excl.

APPEND cl_gui_alv_grid=>mc_fc_info TO lt_toolbar_excl.

APPEND cl_gui_alv_grid=>mc_fc_graph TO lt_toolbar_excl.

APPEND cl_gui_alv_grid=>mc_fc_view_crystal TO lt_toolbar_excl.

APPEND cl_gui_alv_grid=>mc_fc_loc_delete_row TO lt_toolbar_excl.

APPEND cl_gui_alv_grid=>mc_fc_loc_append_row TO lt_toolbar_excl.

APPEND cl_gui_alv_grid=>mc_fc_loc_insert_row TO lt_toolbar_excl.

APPEND cl_gui_alv_grid=>mc_fc_loc_copy_row TO lt_toolbar_excl.

APPEND cl_gui_alv_grid=>mc_fc_loc_undo TO lt_toolbar_excl.

APPEND cl_gui_alv_grid=>mc_fc_check TO lt_toolbar_excl.

APPEND cl_gui_alv_grid=>mc_fc_refresh TO lt_toolbar_excl.

And Pass the lt_toolbar_excl to the ALV object

Display

CALL METHOD go_alv_grid->set_table_for_first_display

EXPORTING

is_variant = ls_variant

is_layout = ls_alv_lay

is_print = ls_print

i_save = 'A'

it_toolbar_excluding = lt_toolbar_excl

CHANGING

it_sort = lt_sort

it_outtab = gt_user[]

it_fieldcatalog = lt_alv_cat.

Hope this helps you.

Thanks,

Ruthra

former_member188685
Active Contributor
0 Kudos

one signle statement will exclude all buttons.

ps_layout-NO_TOOLBAR = 'X'. "this excludes all the buttons 
  call method g_grid->set_table_for_first_display
       exporting is_layout             = ps_layout
       changing  it_fieldcatalog       = pt_fieldcat
                 it_outtab             = pt_outtab.

Former Member
0 Kudos

thanks.