可以调用函数RS_SET_SELSCREEN_STATUS隐藏选择画面中状态栏中的按钮,比如运行按钮(function code是‘ONLI’)。这个功能键可以通过/HS 启动系统debug(System Debugging)得到,如下:
![2017-03-11_22-21-33](http://www.baidusap.com/wp-content/uploads/2017-03-11_22-21-33.png)
系统变量 sy-ucomm中就是运行按钮的function code
![2017-03-11_22-27-24](http://www.baidusap.com/wp-content/uploads/2017-03-11_22-27-24-740x246.png)
代码:
REPORT ztest_hide_run.
DATA git_exclude TYPE TABLE OF sy-ucomm.
PARAMETER p_matnr TYPE matnr.
AT SELECTION-SCREEN OUTPUT.
*** "ONLI"是运行按钮的code
***SY-PFKEY为当前屏幕GUI STATUS的名字
"APPEND 'ONLI' TO git_exclude.
CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'
EXPORTING
p_status = sy-pfkey
TABLES
p_exclude = git_exclude.
运行效果:
![2017-03-11_22-10-44](http://www.baidusap.com/wp-content/uploads/2017-03-11_22-10-44.png)
以上。