WORKING WITH TABSTRIP CONTROL

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:


*&---------------------------------------------------------------------*
*& Module Pool       ZM_TABSTRIP_CONTROL
*&
*&---------------------------------------------------------------------*
PROGRAM ZM_TABSTRIP_CONTROL.
CONTROLS TABS TYPE TABSTRIP.
TABLEST001KNA1.
*&---------------------------------------------------------------------*
*&      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 SUBSCREENSA1 INCLUDING SY-REPID '0100',
                   SA2 INCLUDING SY
-REPID '0200'.


PROCESS AFTER INPUT.
 
MODULE USER_COMMAND_1000.
   
CALL SUBSCREENSA1SA2.
SUB SCREEN 0100:
PROCESS BEFORE OUTPUT.
* 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.

OUTPUT:
 COMPANY TAB:



                          OUTPUT:
   
 CUSTOMER TAB:


    
    OUTPUT: