miércoles, 30 de septiembre de 2015
Excluir botones ALV TOOLBAR
Declaramos:
DATA: gs_exclude TYPE ui_func,
gt_tlbr_excl TYPE ui_functions.
En esta función se define los botones a eliminar, si se pone todos se eliminará todos los botones del toolbar ALV:
FORM excluir_botones .
*Exclude botón suma
gs_exclude = cl_gui_alv_grid=>mc_fc_sum.
APPEND gs_exclude TO gt_tlbr_excl.
*Exclude botón promedio
gs_exclude = cl_gui_alv_grid=>mc_fc_average.
APPEND gs_exclude TO gt_tlbr_excl.
*Exclude botón maximo
gs_exclude = cl_gui_alv_grid=>mc_fc_maximum.
APPEND gs_exclude TO gt_tlbr_excl.
*Exclude botón minimo
gs_exclude = cl_gui_alv_grid=>mc_fc_minimum.
APPEND gs_exclude TO gt_tlbr_excl.
*Exclude botón vistas
gs_exclude = cl_gui_alv_grid=>mc_mb_view.
APPEND gs_exclude TO gt_tlbr_excl.
*Exclude botón variante
gs_exclude = cl_gui_alv_grid=>mc_fc_current_variant.
APPEND gs_exclude TO gt_tlbr_excl.
* Exclude botón alv info
gs_exclude = cl_gui_alv_grid=>mc_fc_info.
APPEND gs_exclude TO gt_tlbr_excl.
* Excluir botón grafico
gs_exclude = cl_gui_alv_grid=>mc_fc_graph.
APPEND gs_exclude TO gt_tlbr_excl.
* Excluir botón imprimir
gs_exclude = cl_gui_alv_grid=>mc_fc_print.
APPEND gs_exclude TO gt_tlbr_excl.
* Excluir botón filtrar
gs_exclude = cl_gui_alv_grid=>mc_fc_filter.
APPEND gs_exclude TO gt_tlbr_excl.
* Excluir botón buscar
gs_exclude = cl_gui_alv_grid=>mc_fc_find.
APPEND gs_exclude TO gt_tlbr_excl.
* Excluir botón orden ascendente
gs_exclude = cl_gui_alv_grid=>mc_fc_sort_asc.
APPEND gs_exclude TO gt_tlbr_excl.
* Excluir botón ordenar descendente
gs_exclude = cl_gui_alv_grid=>mc_fc_sort_dsc.
APPEND gs_exclude TO gt_tlbr_excl.
* Excluir botón detalles
gs_exclude = cl_gui_alv_grid=>mc_fc_detail.
APPEND gs_exclude TO gt_tlbr_excl.
* Excluir botón abc
gs_exclude = cl_gui_alv_grid=>mc_fc_call_abc.
APPEND gs_exclude TO gt_tlbr_excl.
* Excluir botón excel
gs_exclude = cl_gui_alv_grid=>mc_fc_view_excel.
APPEND gs_exclude TO gt_tlbr_excl.
gs_exclude = cl_gui_alv_grid=>mc_fc_call_xml_export.
APPEND gs_exclude TO gt_tlbr_excl.
gs_exclude = cl_gui_alv_grid=>mc_fc_call_xxl.
APPEND gs_exclude TO gt_tlbr_excl.
gs_exclude = cl_gui_alv_grid=>mc_fc_excl_all.
APPEND gs_exclude TO gt_tlbr_excl.
ENDFORM. " EXCLUIR_BOTONES
En el método set_table_for_first_display ponemos nuestra variable gt_tlbr_excl:
CREATE OBJECT go_event_receiver.
"SET HANDLER go_event_receiver->handle_toolbar FOR go_grid.
"SET HANDLER go_event_receiver->handle_user_command FOR go_grid.
CALL METHOD go_grid->set_table_for_first_display
EXPORTING
* I_BUFFER_ACTIVE =
* I_BYPASSING_BUFFER =
* I_CONSISTENCY_CHECK =
i_default = 'X'
i_save = 'A' "gs_save
is_variant = gs_variant
is_layout = gwa_layout
* IS_PRINT =
* IT_SPECIAL_GROUPS =
it_toolbar_excluding = gt_tlbr_excl
* IT_HYPERLINK =
* IT_EXCEPT_QINFO =
* IR_SALV_ADAPTER =
CHANGING
it_outtab = gtd_rend
it_fieldcatalog = gtd_fieldcat
* IT_SORT =
* IT_FILTER =
.
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.
Suscribirse a:
Enviar comentarios (Atom)
No hay comentarios:
Publicar un comentario