2007 Feb 24 5:22 AM
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.
2007 Feb 24 6:02 AM
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.
hi,
just refer this thread.
https://forums.sdn.sap.com/click.jspa?searchID=1329128&messageID=2972806
Regards
Anver
2007 Feb 24 5:33 AM
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.
2007 Feb 24 6:02 AM
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.
2007 Feb 24 6:28 AM
hi,
just refer this thread.
https://forums.sdn.sap.com/click.jspa?searchID=1329128&messageID=2972806
Regards
Anver
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |