ABAP 状态栏排除某些按钮
GUI State状态栏
在状态栏这里有这些按钮,现在在导出界面要排除掉这些按钮:
将要排除的按钮追加到gt_code内表:
gt_fcode功能码内表的定义
DATA:gt_fcode TYPE TABLE OF sy-ucomm,
完整程序
*&---------------------------------------------------------------------*
*& Module STATUS_2000 OUTPUT
*&---------------------------------------------------------------------*
*&
*&---------------------------------------------------------------------*
MODULE status_2000 OUTPUT.
* APPEND '&BACK' TO GT_FCODE.
IF p_zx = 'X'.
APPEND '&CANCEL' TO gt_fcode.
SET TITLEBAR 'T2000' WITH '模具分摊执行程序'."lhy
ELSEIF p_dc = 'X'.
"APPEND '&CREATE' TO gt_fcode.
APPEND '&CREATE' TO gt_fcode.
APPEND '&CANCEL' TO gt_fcode.
APPEND '&SALL' TO gt_fcode.
APPEND '&DALL' TO gt_fcode.
SET TITLEBAR 'T2000' WITH '模具分摊导出程序'."lhy
ELSEIF p_dr = 'X'.
"APPEND '&CREATE' TO gt_fcode.
SET TITLEBAR 'T2000' WITH '模具分摊导入程序'."lhy
ELSEIF p_cx = 'X'.
APPEND '&CREATE' TO gt_fcode.
SET TITLEBAR 'T2000' WITH '模具分摊冲销程序'.
ELSE.
APPEND '&CREATE' TO gt_fcode.
APPEND '&CANCEL' TO gt_fcode.
SET TITLEBAR 'T2000' WITH '模具分摊汇总查询程序'.
ENDIF.
SET PF-STATUS 'S2000' EXCLUDING gt_fcode.
ENDMODULE.
重点
SET PF-STATUS 'S2000' EXCLUDING gt_fcode.
EXCLUDING 也就是将gt_fcode的功能码的对应的按钮排除掉。
运行效果
现在上面的那些按钮就被排除了