首页 > 其他 > 详细

OO的ALV隐藏工具栏的form

时间:2014-06-03 09:16:43      阅读:532      评论:0      收藏:0      [点我收藏+]

OO的ALV隐藏工具栏:

bubuko.com,布布扣
***展示数据
  CALL METHOD gr_alvgrid->set_table_for_first_display
    EXPORTING
      is_variant                    = gs_variant
      i_save                        = A
      is_layout                     = gs_layout
      it_toolbar_excluding          = gt_exclude   “隐藏的工具栏
    CHANGING
      it_outtab                     = gt_data
      it_fieldcatalog               = gt_fieldcat
    EXCEPTIONS
      invalid_parameter_combination = 1
      program_error                 = 2
      too_many_lines                = 3
      OTHERS                        = 4.
bubuko.com,布布扣

 

以下是需要隐藏的工具栏form程序

bubuko.com,布布扣
FORM exclude_tb_functions  USING    pt_exclude TYPE ui_functions.
  DATA ls_exclude TYPE ui_func.
  ls_exclude = cl_gui_alv_grid=>mc_fc_current_variant. "当前变式
  APPEND ls_exclude TO pt_exclude.
  ls_exclude = cl_gui_alv_grid=>mc_fc_save_variant.  "保存变式
  APPEND ls_exclude TO pt_exclude.
  ls_exclude = cl_gui_alv_grid=>mc_fc_average.       "平均值
  APPEND ls_exclude TO pt_exclude.
  ls_exclude = cl_gui_alv_grid=>mc_fc_load_variant.   "加载变式
  APPEND ls_exclude TO pt_exclude.
  ls_exclude = cl_gui_alv_grid=>mc_fc_minimum.        "最大数
  APPEND ls_exclude TO pt_exclude.
  ls_exclude = cl_gui_alv_grid=>mc_fc_maximum.         "最小数
  APPEND ls_exclude TO pt_exclude.
  ls_exclude = cl_gui_alv_grid=>mc_fc_maintain_variant. "变式
  APPEND ls_exclude TO pt_exclude.
  ls_exclude = cl_gui_alv_grid=>mc_fc_views.            "视图
  APPEND ls_exclude TO pt_exclude.
  ls_exclude = cl_gui_alv_grid=>mc_fc_graph.            "显示图形
  APPEND ls_exclude TO pt_exclude.
  ls_exclude = cl_gui_alv_grid=>mc_fc_sum.              "汇总
  APPEND ls_exclude TO pt_exclude.
  ls_exclude = cl_gui_alv_grid=>mc_fc_subtot.           "子项目汇总
  APPEND ls_exclude TO pt_exclude.
*  ls_exclude = cl_gui_alv_grid=>mc_fc_filter.           “过滤
*  APPEND ls_exclude TO pt_exclude.
*  ls_exclude = cl_gui_alv_grid=>mc_fc_sort_dsc.          "降序
*  APPEND ls_exclude TO pt_exclude.
*  ls_exclude = cl_gui_alv_grid=>mc_fc_sort_asc.           "升序
*  APPEND ls_exclude TO pt_exclude.
*  ls_exclude = cl_gui_alv_grid=>mc_fc_check.              "检查
*  APPEND ls_exclude TO pt_exclude.
*  ls_exclude = cl_gui_alv_grid=>mc_fc_detail.             "详细
*  APPEND ls_exclude TO pt_exclude.
*  ls_exclude = cl_gui_alv_grid=>mc_fc_refresh.            "刷新
*  APPEND ls_exclude TO pt_exclude.

  IF p_inse <> X . "非插入数据的alv工具栏需要隐藏的工具

    ls_exclude = cl_gui_alv_grid=>mc_fc_loc_paste_new_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_append_row.    "添加行
    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_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_move_row.
    APPEND ls_exclude TO pt_exclude.
    ls_exclude = cl_gui_alv_grid=>mc_fc_loc_cut.           "剪切
    APPEND ls_exclude TO pt_exclude.
    ls_exclude = cl_gui_alv_grid=>mc_fc_loc_paste.         "粘贴
    APPEND ls_exclude TO pt_exclude.
    ls_exclude = cl_gui_alv_grid=>mc_fc_loc_undo.          "撤销
    APPEND ls_exclude TO pt_exclude.

  ENDIF.
ENDFORM.                    " EXCLUDE_TB_FUNCTIONS
bubuko.com,布布扣

 

OO的ALV隐藏工具栏的form,布布扣,bubuko.com

OO的ALV隐藏工具栏的form

原文:http://www.cnblogs.com/caizjian/p/3760639.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!