![选择屏幕添加Functionbutton,隐藏F8执行按钮 选择屏幕添加Functionbutton,隐藏F8执行按钮](https://img-blog.csdnimg.cn/img_convert/fdd6c1bbabc8f225af9a314a87df56c8.png)
REPORT ZLM_SCREEN1.
TABLES: sscrfields.
DATA it_exclude TYPE TABLE OF sy-ucomm.
PARAMETERS p_data TYPE string.
"添加了五个按钮
SELECTION-SCREEN: FUNCTION KEY 1,FUNCTION KEY 2,
FUNCTION KEY 3,FUNCTION KEY 4,FUNCTION KEY 5.
INITIALIZATION.
APPEND 'ONLI' TO it_exclude.
CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'
EXPORTING
p_status = sy-pfkey
TABLES
p_exclude = it_exclude.
"按钮显示描述
sscrfields-functxt_01 = 'DISPLAY'."'DISPLAY'.
sscrfields-functxt_02 = text-f02."
sscrfields-functxt_03 = text-f03."
sscrfields-functxt_04 = text-f04."
sscrfields-functxt_05 = text-f05."
AT SELECTION-SCREEN.
"按钮相应
CASE sscrfields-ucomm.
WHEN 'FC01'. "DISPLAY
WHEN 'FC02'. "
WHEN 'FC03'. "
WHEN 'FC04'. "
WHEN 'FC05'. "
WHEN 'ONLI'. "F8
WHEN OTHERS.
ENDCASE.