熟悉SELECTION-SCREEN相关语句做的小练习,随便看看.
REPORT ZTEST_002.
TYPE-POOLS ICON.
TABLES MARA.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME .
PARAMETERS P_WERKS TYPE WERKS.
SELECTION-SCREEN END OF BLOCK B1.
SELECTION-SCREEN SKIP 1.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN PUSHBUTTON 1(4) BUT1 USER-COMMAND BUTTON1 VISIBLE LENGTH 2.
SELECTION-SCREEN COMMENT 6(20) COM1.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME .
SELECT-OPTIONS:S_MATNR FOR MARA-MATNR MODIF ID BL1,
S_GROES FOR MARA-GROES MODIF ID BL1.
SELECTION-SCREEN END OF BLOCK B2 .
INITIALIZATION.
WRITE ICON_DATA_AREA_EXPAND AS ICON TO BUT1 .
COM1 = 'DATA EXPAND'.
AT SELECTION-SCREEN.
CASE SY-UCOMM.
WHEN 'BUTTON1'.
IF BUT1 = .
WRITE ICON_DATA_AREA_COLLAPSE AS ICON TO BUT1.
COM1 = 'DATA COLLAPSE'.
ELSE.
WRITE ICON_DATA_AREA_EXPAND AS ICON TO BUT1.
COM1 = 'DATA EXPAND'.
ENDIF.
ENDCASE.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF BUT1 = AND SCREEN-GROUP1 = 'BL1'.
SCREEN-ACTIVE = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
阅读(613) | 评论(0) | 转发(0) |