REPORT报表的自定义工具栏按钮。
SELECTION-SCREEN: FUNCTION KEY 是包含在选择画面(1000)的标准GUI的功能按钮,最多只能有5个,功能码是FC1~FC5.也是系统预留好的。
然后,以上被定义的按钮的图标和文本描述都是可以设定的,在tables:sscrfields的functxt_01 ,functxt_02,functxt_03…………..
下面有个例子:
REPORT demo_sel_screen_function_key.
TYPE-POOLS icon.
TABLES sscrfields.
DATA functxt TYPE smp_dyntxt.
PARAMETERS: p_carrid TYPE s_carr_id,
p_cityfr TYPE s_from_cit.
SELECTION-SCREEN: FUNCTION KEY 1,
FUNCTION KEY 2.
INITIALIZATION.
functxt-icon_id = icon_ws_plane.
functxt-quickinfo = ‘Preselected Carrier’.
functxt-icon_text = ‘LH’.
sscrfields-functxt_01 = functxt.
functxt-icon_text = ‘UA’.
sscrfields-functxt_02 = functxt.
AT SELECTION-SCREEN.
CASE sscrfields-ucomm.
WHEN ‘FC01’.
p_carrid = ‘LH’.
p_cityfr = ‘Frankfurt’.
WHEN ‘FC02’.
p_carrid = ‘UA’.
p_cityfr = ‘Chicago’.
WHEN OTHERS.
…
ENDCASE.
效果图:
1.初始画面
2.【LH】按钮按下的时候
3.【UA】按钮按下的时候
原创文章,作者:Maggie-Hunter,如若转载,请注明出处:https://blog.ytso.com/19638.html