Top. 선언.
DATA: sub_init(1).
CONTROLS: tabstrip TYPE TABSTRIP.
*DATA: tab_strip TYPE TABSTRIP.
DATA: dynnr TYPE sy-dynnr.
ㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡ
Screen.
PROCESS BEFORE OUTPUT.
MODULE status_0300.
MODULE set_dynnr.
CALL SUBSCREEN sub1 INCLUDING sy-cprog dynnr.
PROCESS AFTER INPUT.
CALL SUBSCREEN sub1.
MODULE user_command_0300.
ㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡ
PBO. 트랜잭션에 따른 탭 스트립 제한.
MODULE set_dynnr OUTPUT.
IF sy-tcode EQ 'ZPBPM7005'.
CASE tabstrip-activetab.
WHEN 'TAB1'.
dynnr = '0310'.
WHEN 'TAB2'.
dynnr = '0320'.
WHEN OTHERS.
dynnr = '0310'.
tabstrip-activetab = 'TAB1'.
ENDCASE.
ELSEIF sy-tcode EQ 'ZPBPM7006'.
CASE tabstrip-activetab.
WHEN 'TAB2'.
dynnr = '0320'.
WHEN OTHERS.
dynnr = '0320'.
tabstrip-activetab = 'TAB2'.
ENDCASE.
LOOP AT SCREEN.
IF screen-group1 = 'GR1'.
screen-active = 0.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ELSE.
CASE tabstrip-activetab.
WHEN 'TAB1'.
dynnr = '0310'.
WHEN 'TAB2'.
dynnr = '0320'.
WHEN OTHERS.
dynnr = '0310'.
tabstrip-activetab = 'TAB1'.
ENDCASE.
ENDIF.
ENDMODULE. " SET_DYNNR OUTPUT
ㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡ
PBO. Subscreen 호출.
CALL SUBSCREEN sub1 INCLUDING sy-cprog dynnr.
ㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡ
PAI. Subscreen 호출.
CALL SUBSCREEN sub1.
ㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡ
PAI. 탭스트립 선턱.
MODULE user_command_0300 INPUT.
CASE ok_code300.
WHEN 'BACK' OR 'CNCL'.
CLEAR ok_code300.
LEAVE TO SCREEN 0.
WHEN 'EXIT'.
LEAVE PROGRAM.
WHEN 'TAB1'.
* CLEAR OK_CODE300.
tabstrip-activetab = ok_code300.
dynnr = '0310'.
WHEN 'TAB2'.
* CLEAR OK_CODE300.
tabstrip-activetab = ok_code300.
dynnr = '0320'.
ENDCASE.
ENDMODULE. " USER_COMMAND_0300 INPUT
ㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡ
'Abap' 카테고리의 다른 글
[ABAP] Dynamic table - cell color (0) | 2013.11.29 |
---|---|
[ABAP] Dynamic Table (0) | 2013.11.27 |
[Abap-Excel] 엑셀에 데이터 넘기기 2 (매크로) - 엑셀부분 (0) | 2013.09.16 |
[Abap-Excel] 엑셀에 데이터 넘기기 1 (매크로) - Abap 부분 (0) | 2013.09.16 |
[Abap-ALV] 각각의 alv에 variant 줄때 (0) | 2013.09.09 |