sap的选择屏幕的标准工具栏上系统预先定义了5个按钮,他们对应的功能码是FC01-FC05,默认是不激活的。用户可以使用SELECTION-SCREEN FUNCTION KEY i.来激活这5个按钮(这里的i必须是1-5),这五个按钮的文本放在SSCRFields的对应的Functxt_0i中。当用户按下按钮时,系统将触发AT SELECTION-SCREEN 事件,并将功能码放到sscrfields的ucomm字段中。 REPORT z_zcd_014. TABLES sscrfields. "定义工作区 PARAMETERS: p_carrid TYPE s_carr_id, p_cityfr TYPE s_from_cit. SELECTION-SCREEN: FUNCTION KEY 1, "激活按钮 FUNCTION KEY 2. INITIALIZATION. sscrfields-functxt_01 = '@49@ 哈哈'. sscrfields-functxt_02 = '@54@ 呵呵'. AT SELECTION-SCREEN. CASE sscrfields-ucomm. "处理按钮命令 WHEN'FC01'. p_carrid = 'LH'. p_cityfr = 'Frankfurt'. WHEN 'FC02'. p_carrid = 'UA'. p_cityfr = 'Chicago'. ENDCASE. START-OF-SELECTION. WRITE / 'START-OF-SELECTION'.
ABAP 选择屏幕上增加自定义按钮
2020-11-27 17:16:06
浏览数 (1)