选择屏幕折叠效果

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 = '@K1@'.
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 = '@K2@' AND SCREEN-GROUP1 = 'BL1'.
SCREEN-ACTIVE = 0.
MODIFY SCREEN.
ENDIF.

你可能感兴趣的:(选择)