MOVE 'BUTTON1' TO sscrfields-functxt_01. MOVE 'BUTTON2' TO sscrfields-functxt_02. AT SELECTION-SCREEN. IF SSCRFIELDS-UCOMM = 'FC01'. MESSAGE '按钮1事件' TYPE 'I'. ELSEIF SSCRFIELDS-UCOMM = 'FC02'. MESSAGE '按钮2事件' TYPE 'I'. ENDIF. 10. 在屏幕上创建页签. SELECTION-SCREEN ...
(1).其实就像一个 FORM,所以在这个事件里声明的变量都是局部变量。 (2).根据 SY-UCOMM 这个系统变量可以判断用户的命令 。 (3).在这个事件里响应的是屏幕上选择条件中的事件,例如 CHECKBOX 的选择与 否,RADIOBUTTON 的选择,LISTBOX 的选择等等。所以分为以下几个方面: 1. ... ON psel :在 PARAMETER ...
ATSELECTION-SCREEN. IFSSCRFIELDS-UCOMM ='FC05'."触发 FC05工具栏按钮,将要执行什么操作 CALLSELECTION-SCREEN1234."调用程序中的子屏幕 ENDIF. 运行界面如下: 以下代码来自官方网站上面的例子: *官方菜单SELECTION-SCREEN FUNCTION KEY n (demo:http://help.sap.com/abapdocu_70/en/ABAPSELECTION-SCREEN_FUNCT...
ATSELECTION-SCREEN. IFSSCRFIELDS-UCOMM ='FC05'."触发 FC05工具栏按钮,将要执行什么操作 CALLSELECTION-SCREEN1234."调用程序中的子屏幕 ENDIF. 运行界面如下: 以下代码来自官方网站上面的例子: *官方菜单SELECTION-SCREEN FUNCTION KEY n (demo:http://help.sap.com/abapdocu_70/en/ABAPSELECTION-SCREEN_FUNCT...
SSCRFIELDS-UCOMM = ''. RETURN. ELSEIF SSCRFIELDS-UCOMM = 'FC02'. PERFORM FRM_EXCEL_DOWN USING 'B'. SSCRFIELDS-UCOMM = ''. RETURN. ENDIF. IF SY-UCOMM = 'ONLI' ."执行时 * IF P_CHK01 = 'X'. * IF P_ZGZRQ IS INITIAL * OR P_HKONT1 IS INITIAL * OR P_RSTGR IS INITIAL...
实现过程:如下 (定义+ function) 1、定义 : TABLES:sscrfields. 2、Function key 代码如下: SELECTION-SCREEN: FUNCTION KEY 1. "激活按钮INITIALIZATION. sscrfields-ucomm = 'FC01'. sscrfields-functxt_01 = ‘下载模板’."'下载模板 1. 2. 3....
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.
SUB-PROG = SY-REPID. SUB-DYNNR = 100. AT SELECTION-SCREEN. CASE SY-DYNNR. WHEN 100. IF SSCRFIELDS-UCOMM = 'FC01'. SUB-DYNNR = 300. ELSEIF SSCRFIELDS-UCOMM = 'FC02'. SUB-DYNNR = 200. ENDIF. WHEN 200. IF SSCRFIELDS-UCOMM = 'FC01'. ...
I checked the value of sy-ucomm and it shows CRET. However when i tried running the same program on a different server it ran fine ... with the sy-ucomm value shown as ONLI . I'd appreciate any help possible. Thanks!!!Reply...
CASE sy-dynnr. WHEN 100. IF sscrfields-ucomm = 'FC01'. sub-dynnr = 300. ELSEIF sscrfields-ucomm = 'FC02'. sub-dynnr = 200. ENDIF. WHEN 200. IF sscrfields-ucomm = 'FC01'. sub-dynnr = 100. ELSEIF sscrfields-ucomm = 'FC02'. sub-dynnr = 300. ENDIF. ...