Application Development and Automation 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: 
Read only

Hide PushButtons in ALG Grid Toolbar?

Former Member
0 Likes
641

Hi All,

I am calling set_table_for_first_display to show the ALV grid..here I have no problem..But my user asked me to hide the few buttons in toolbar like Append, Insert, Delete, Copy row...How to hide the buttons of ALV Grid Toolbar?

Could you please help me how to do it?

Regards

Jaker.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
567

Add the below code to remove append , delete , insert , copy , duplicate row buttons in tool bar of ALV

<b>DATA : ls_exclude TYPE ui_func,

pt_exclude TYPE ui_functions.

ls_exclude = cl_gui_alv_grid=>mc_fc_loc_append_row .

APPEND ls_exclude TO pt_exclude.

ls_exclude = cl_gui_alv_grid=>mc_fc_loc_insert_row .

APPEND ls_exclude TO pt_exclude.

ls_exclude = cl_gui_alv_grid=>mc_fc_loc_delete_row .

APPEND ls_exclude TO pt_exclude.

ls_exclude = cl_gui_alv_grid=>mc_fc_loc_copy .

APPEND ls_exclude TO pt_exclude.

ls_exclude = cl_gui_alv_grid=>mc_fc_loc_copy_row .

APPEND ls_exclude TO pt_exclude.

  • ls_exclude = cl_gui_alv_grid=>mc_mb_paste .

  • APPEND ls_exclude TO pt_exclude.

</b>

CALL METHOD g_grid->set_table_for_first_display

EXPORTING

i_structure_name = 'JTAB'

is_layout = gs_layout

is_variant = gs_variant

i_save = x_save

<b>it_toolbar_excluding = pt_exclude</b>

is_print = is_print

CHANGING

it_outtab = jtab[]

it_sort = it_sort

  • it_filter = it_filt

it_fieldcatalog = i_fieldcat.

3 REPLIES 3
Read only

Former Member
0 Likes
567

Hi ,

Use the option IT_EXCLUDING in the set_table_for_display.

declare the code like this.

data : gt_toolbar_excluding like ui_functions.

append cl_gui_alv_grid=>mc_insert_row to gt_toolbar_excluding.

this way add all the required pushuttons to avoid .

pass the gt_toolbar_excluding to method set_table_for_display.

Please reward if useful.

Read only

Former Member
0 Likes
568

Add the below code to remove append , delete , insert , copy , duplicate row buttons in tool bar of ALV

<b>DATA : ls_exclude TYPE ui_func,

pt_exclude TYPE ui_functions.

ls_exclude = cl_gui_alv_grid=>mc_fc_loc_append_row .

APPEND ls_exclude TO pt_exclude.

ls_exclude = cl_gui_alv_grid=>mc_fc_loc_insert_row .

APPEND ls_exclude TO pt_exclude.

ls_exclude = cl_gui_alv_grid=>mc_fc_loc_delete_row .

APPEND ls_exclude TO pt_exclude.

ls_exclude = cl_gui_alv_grid=>mc_fc_loc_copy .

APPEND ls_exclude TO pt_exclude.

ls_exclude = cl_gui_alv_grid=>mc_fc_loc_copy_row .

APPEND ls_exclude TO pt_exclude.

  • ls_exclude = cl_gui_alv_grid=>mc_mb_paste .

  • APPEND ls_exclude TO pt_exclude.

</b>

CALL METHOD g_grid->set_table_for_first_display

EXPORTING

i_structure_name = 'JTAB'

is_layout = gs_layout

is_variant = gs_variant

i_save = x_save

<b>it_toolbar_excluding = pt_exclude</b>

is_print = is_print

CHANGING

it_outtab = jtab[]

it_sort = it_sort

  • it_filter = it_filt

it_fieldcatalog = i_fieldcat.

Read only

anversha_s
Active Contributor
0 Likes
567