可以调用函数RS_SET_SELSCREEN_STATUS隐藏选择画面中状态栏中的按钮,比如运行按钮(function code是‘ONLI’)。这个功能键可以通过/HS 启动系统debug(System Debugging)得到,如下:
<img class="alignnone size-full wp-image-3630" src="http://www.baidusap.com/wp-content/uploads/2017-03-11_22-21-33.png" alt="2017-03-11_22-21-33" width="600" height="222" />系统变量 sy-ucomm中就是运行按钮的function code
<img class="alignnone wp-image-3631 size-medium" src="http://www.baidusap.com/wp-content/uploads/2017-03-11_22-27-24-740x246.png" alt="2017-03-11_22-27-24" width="740" height="246" srcset="http://www.baidusap.com/wp-content/uploads/2017-03-11_22-27-24-740x246.png 740w, http://www.baidusap.com/wp-content/uploads/2017-03-11_22-27-24-768x255.png 768w, http://www.baidusap.com/wp-content/uploads/2017-03-11_22-27-24.png 947w" sizes="(max-width: 740px) 100vw, 740px" />
代码:
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.
运行效果:
<img class="alignnone size-full wp-image-3629" src="http://www.baidusap.com/wp-content/uploads/2017-03-11_22-10-44.png" alt="2017-03-11_22-10-44" width="620" height="232" />以上。