Working with Tabstrip Control:-
Strip of tabs.
Each tab must contain at least one sub screen area.
Each sub screen area can call only one sub screen at a time.
By default tab strip contains 2 tabs.
Only one tab is always activated.
Syntax of declaring the tab strip in ABAP editor:-
Controls <TAB STRIP NAME> type tabstrip.
Syntax of activate the tab: -
<TAB STRIP NAME>- Active tab = ‘TAB NAME’.
PROGRAM:
COMPANY TAB:
OUTPUT:
CUSTOMER TAB:
OUTPUT:
Strip of tabs.
Each tab must contain at least one sub screen area.
Each sub screen area can call only one sub screen at a time.
By default tab strip contains 2 tabs.
Only one tab is always activated.
Syntax of declaring the tab strip in ABAP editor:-
Controls <TAB STRIP NAME> type tabstrip.
Syntax of activate the tab: -
*&---------------------------------------------------------------------*
*& Module Pool ZM_TABSTRIP_CONTROL
*&
*&---------------------------------------------------------------------*
PROGRAM ZM_TABSTRIP_CONTROL.
CONTROLS TABS TYPE TABSTRIP.
TABLES: T001, KNA1.
*&---------------------------------------------------------------------*
*& Module STATUS_1000 OUTPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE status_1000 OUTPUT.
SET PF-STATUS 'STAT'.
* SET TITLEBAR 'xxx'.
ENDMODULE. " STATUS_1000 OUTPUT
*&---------------------------------------------------------------------*
*& Module USER_COMMAND_1000 INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE user_command_1000 INPUT.
IF SY-UCOMM = 'BACK'.
LEAVE TO SCREEN 0.
ELSEIF SY-UCOMM = 'COMP'.
TABS-ACTIVETAB = 'COMP'.
ELSEIF SY-UCOMM = 'CUST'.
TABS-ACTIVETAB = 'CUST'.
ENDIF.
ENDMODULE. " USER_COMMAND_1000 INPUT
*&---------------------------------------------------------------------*
*& Module USER_COMMAND_0100 INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE user_command_0100 INPUT.
IF SY-UCOMM = 'SAVE'.
INSERT T001 FROM T001.
ENDIF.
ENDMODULE. " USER_COMMAND_0100 INPUT
*&---------------------------------------------------------------------*
*& Module USER_COMMAND_0200 INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE user_command_0200 INPUT.
IF SY-UCOMM = 'INS'.
INSERT KNA1 FROM KNA1.
ENDIF.
ENDMODULE. " USER_COMMAND_0200 INPUT
*& Module Pool ZM_TABSTRIP_CONTROL
*&
*&---------------------------------------------------------------------*
PROGRAM ZM_TABSTRIP_CONTROL.
CONTROLS TABS TYPE TABSTRIP.
TABLES: T001, KNA1.
*&---------------------------------------------------------------------*
*& Module STATUS_1000 OUTPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE status_1000 OUTPUT.
SET PF-STATUS 'STAT'.
* SET TITLEBAR 'xxx'.
ENDMODULE. " STATUS_1000 OUTPUT
*&---------------------------------------------------------------------*
*& Module USER_COMMAND_1000 INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE user_command_1000 INPUT.
IF SY-UCOMM = 'BACK'.
LEAVE TO SCREEN 0.
ELSEIF SY-UCOMM = 'COMP'.
TABS-ACTIVETAB = 'COMP'.
ELSEIF SY-UCOMM = 'CUST'.
TABS-ACTIVETAB = 'CUST'.
ENDIF.
ENDMODULE. " USER_COMMAND_1000 INPUT
*&---------------------------------------------------------------------*
*& Module USER_COMMAND_0100 INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE user_command_0100 INPUT.
IF SY-UCOMM = 'SAVE'.
INSERT T001 FROM T001.
ENDIF.
ENDMODULE. " USER_COMMAND_0100 INPUT
*&---------------------------------------------------------------------*
*& Module USER_COMMAND_0200 INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE user_command_0200 INPUT.
IF SY-UCOMM = 'INS'.
INSERT KNA1 FROM KNA1.
ENDIF.
ENDMODULE. " USER_COMMAND_0200 INPUT
SCREEN 1000:
PROCESS BEFORE OUTPUT.
MODULE STATUS_1000.
CALL SUBSCREEN: SA1 INCLUDING SY-REPID '0100',
SA2 INCLUDING SY-REPID '0200'.
PROCESS AFTER INPUT.
MODULE USER_COMMAND_1000.
CALL SUBSCREEN: SA1, SA2.
MODULE STATUS_1000.
CALL SUBSCREEN: SA1 INCLUDING SY-REPID '0100',
SA2 INCLUDING SY-REPID '0200'.
PROCESS AFTER INPUT.
MODULE USER_COMMAND_1000.
CALL SUBSCREEN: SA1, SA2.
SUB SCREEN 0100:
PROCESS BEFORE OUTPUT.
* MODULE STATUS_0100.
*
PROCESS AFTER INPUT.
MODULE USER_COMMAND_0100.
* MODULE STATUS_0100.
*
PROCESS AFTER INPUT.
MODULE USER_COMMAND_0100.
SUB SCREEN 0200:
PROCESS BEFORE OUTPUT.
* MODULE STATUS_0200.
*
PROCESS AFTER INPUT.
MODULE USER_COMMAND_0200.
* MODULE STATUS_0200.
*
PROCESS AFTER INPUT.
MODULE USER_COMMAND_0200.
OUTPUT:
CUSTOMER TAB:
OUTPUT: