REPORT ztabstrip_week1.
DATA: wa_spfli TYPE spfli.
DATA: it_spfli LIKE TABLE OF wa_spfli.
SELECTION-SCREEN BEGIN OF SCREEN 101 AS SUBSCREEN.
PARAMETERS: pa_car TYPE scarr-carrid.
SELECTION-SCREEN END OF SCREEN 101.
SELECTION-SCREEN BEGIN OF SCREEN 102 AS SUBSCREEN.
SELECT-OPTIONS so_con FOR wa_spfli-connid.
SELECTION-SCREEN END OF SCREEN 102.
SELECTION-SCREEN BEGIN OF TABBED BLOCK tab_block FOR 3 LINES.
SELECTION-SCREEN TAB (10) tab1 USER-COMMAND comm1 DEFAULT SCREEN 101.
SELECTION-SCREEN TAB (10) tab2 USER-COMMAND comm2 DEFAULT SCREEN 102.
SELECTION-SCREEN END OF BLOCK tab_block.
INITIALIZATION.
so_con-sign = 'I'.
so_con-option = 'BT'.
so_con-low = '0001'.
so_con-high = '0017'.
APPEND so_con.
*tab1 = 'Airline'.
*tab2 = 'Connection'.
tab1 = text-001.
tab2 = text-002.
tab_block-activetab = 'COMM1'.
tab_block-dynnr = '101'.
AT SELECTION-SCREEN ON pa_car.
IF pa_car = 'UA'.
MESSAGE 'UA is not allowed!' TYPE 'E'.
ENDIF.
START-OF-SELECTION.
SELECT * INTO CORRESPONDING FIELDS OF TABLE it_spfli
FROM spfli
WHERE carrid = pa_car
AND connid IN so_con.
LOOP AT it_spfli INTO wa_spfli.
write:/ sy-tabix, wa_spfli-carrid, wa_spfli-connid.
ENDLOOP.
tab_block-activetab = 'COMM1'. 는 활성화 되는 tab 을 정의 하는 것이므로 comm1 이 아닌 tab1 이 되어야 합니다.
SELECTION-SCREEN TAB (10) tab1 USER-COMMAND comm1 DEFAULT SCREEN 101.
----
참고하세요.