灰掉工具栏上部分按钮
作者:互联网
效果图
点BUT01后,BUT01后,01灰掉,02可点击
代码:
*&---------------------------------------------------------------------*
*& Report ZTEST_007
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT ZTEST_007.
TYPE-POOLS:SLIS.
DATA:RT_EXTAB TYPE SLIS_T_EXTAB.
INITIALIZATION.
START-OF-SELECTION.
APPEND 'BUT02' TO RT_EXTAB.
SET PF-STATUS 'STANDARD' EXCLUDING RT_EXTAB.
WRITE '两个按钮,右边那个被灰掉了'.
WRITE / '虽然显示但是不可以按'.
AT USER-COMMAND.
IF SY-UCOMM = 'BACK'.
LEAVE PROGRAM.
ELSEIF SY-UCOMM = 'BUT01'.
REFRESH RT_EXTAB.
APPEND 'BUT01' TO RT_EXTAB.
SET PF-STATUS 'STANDARD' IMMEDIATELY EXCLUDING RT_EXTAB.
ELSEIF SY-UCOMM = 'BUT02'.
REFRESH RT_EXTAB.
APPEND 'BUT02' TO RT_EXTAB.
SET PF-STATUS 'STANDARD' IMMEDIATELY EXCLUDING RT_EXTAB.
ENDIF.
* ***两个按钮是交互生效,主要设置如下
*1,双击SET PF-STATUS 'STANDARD' 中 STANDARD 输入 BUT01 BUT02 BACK 等参数
*2,goto->attributes->pushbutton assignment...->Display all 这步是关键
*3, 激活 OK
截图如下:
Status
设置:
标签:RT,STATUS,工具栏,BUT01,STANDARD,EXTAB,PF,按钮,灰掉 来源: https://blog.51cto.com/15057820/2628620