通过单选按钮,切换下界面就可以根据不同条件检索不同的结果,如图:
选择物料,显示物料号parameter
选择工厂时,显示工厂select-option
代码如下:通过修改screen 的active属性实现隐藏/显示切换
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
REPORT Z_WUWEI_0004. TABLES:EKPO. SELECTION-SCREEN: BEGIN OF BLOCK B1 WITH FRAME. PARAMETERS R_MATNR TYPE EKPO-MATNR DEFAULT '800-000001' MODIF ID OO. SELECTION-SCREEN: END OF BLOCK B1. SELECTION-SCREEN: BEGIN OF BLOCK B2 WITH FRAME. SELECT-OPTIONS: R_WERKS FOR EKPO-WERKS MODIF ID PP. SELECTION-SCREEN: END OF BLOCK B2. SELECTION-SCREEN: BEGIN OF BLOCK B3 WITH FRAME. PARAMETERS : R1 RADIOBUTTON GROUP D1 DEFAULT 'X' USER-COMMAND SINGLECLICK, R2 RADIOBUTTON GROUP D1 . SELECTION-SCREEN: END OF BLOCK B3. AT SELECTION-SCREEN OUTPUT. IF R1 = 'X'. LOOP AT SCREEN. IF SCREEN-GROUP1 = 'PP'. SCREEN-ACTIVE = '0'. ENDIF. MODIFY SCREEN. ENDLOOP. ELSEIF R2 = 'X'. LOOP AT SCREEN. IF SCREEN-GROUP1 = 'OO'. SCREEN-ACTIVE = '0'. ENDIF. MODIFY SCREEN. ENDLOOP. ENDIF. |
以上。
发表评论