Demo on Tabstrips

By Vikram Chellappa, Mouri Tech Solutions

In this document, we would work on creating a simple screen with a tabstrip on it. 

Go to SE38 T-code.

Create a Z program.

 

Paste the below code in the source code. 

REPORT  ZTABSTRIP.
************************************************************************
*     DATA DECLARATIONS                                                *
************************************************************************
DATA : NUMBER1 TYPE I,
NUMBER2 TYPE I,
RESULT TYPE I,
N1 TYPE I,
N2 TYPE I,
OK_CODE LIKE SY-UCOMM.
CONTROLS TABSTRIP TYPE TABSTRIP.
CALL SCREEN 100.
CALL SCREEN 110.
CALL SCREEN 130.
*&---------------------------------------------------------------------*
*&      Module  STATUS_0100  OUTPUT
*&---------------------------------------------------------------------*
text
*----------------------------------------------------------------------*
MODULE STATUS_0100 OUTPUT.
SET PF-STATUS 'BACK'.
ENDMODULE.                 " STATUS_0100  OUTPUT
*&---------------------------------------------------------------------*
*&      Module  USER_COMMAND_0100  INPUT
*&---------------------------------------------------------------------*
text
*----------------------------------------------------------------------*
MODULE USER_COMMAND_0100 INPUT.
CASE OK_CODE.
WHEN 'TAB1'.
TABSTRIP-ACTIVETAB = 'TAB1'.
WHEN 'TAB2'.
TABSTRIP-ACTIVETAB = 'TAB2'.
RESULT = NUMBER1 + NUMBER2.
WHEN 'BACK'.
LEAVE PROGRAM.
ENDCASE.
ENDMODULE.                 " USER_COMMAND_0100  INPUT
*&---------------------------------------------------------------------*
*&      Module  USER_COMMAND_0130  INPUT
*&---------------------------------------------------------------------*
text
*----------------------------------------------------------------------*
MODULE USER_COMMAND_0130 INPUT.
RESULT = NUMBER1 + NUMBER2.
ENDMODULE.                 " USER_COMMAND_0130  INPUT
*&---------------------------------------------------------------------*
*&      Module  USER_COMMAND_0110  INPUT
*&---------------------------------------------------------------------*
text
*----------------------------------------------------------------------*
MODULE USER_COMMAND_0110 INPUT.
N1 = NUMBER1.
N2 = NUMBER2.
ENDMODULE.                 " USER_COMMAND_0110  INPUT
*&---------------------------------------------------------------------*
*&      Module  STATUS_0110  OUTPUT
*&---------------------------------------------------------------------*
text
*----------------------------------------------------------------------*
MODULE STATUS_0110 OUTPUT.
SET PF-STATUS 'xxxxxxxx'.
SET TITLEBAR 'xxx'.
ENDMODULE.                 " STATUS_0110  OUTPUT
*&---------------------------------------------------------------------*
*&      Module  STATUS_0130  OUTPUT
*&---------------------------------------------------------------------*
text
*----------------------------------------------------------------------*
MODULE STATUS_0130 OUTPUT.
SET PF-STATUS 'xxxxxxxx'.
SET TITLEBAR 'xxx'.
RESULT = NUMBER1 + NUMBER2.
ENDMODULE.                 " STATUS_0130  OUTPUT

Double Click on "call screen 100". 

Enter Short descriptions.

Come to Flow logic.

 

Click on Layout Button.   or Press Ctrl+F7. 

 

Create A Tab Strip and Sub screens and place Sub screen in the appropriate tab strip. 

 

Enter the name of the created TABSTRIP and sub SCREEN. 

 

Enter the required Name, Text, Function code.

 

 

Enter the OK_CODE. 

 

Double click on CALL SCREEN 110.

Give the short description.

Click on SAVE , CHECK, ACTIVATE .  

Click here to continue...

Please send us your feedback/suggestions at webmaster@SAPTechnical.COM 

HomeContribute About Us Privacy Terms Of Use • Disclaimer • SafeCompanies: Advertise on SAPTechnical.COM | Post JobContact Us  

Graphic Design by Round the Bend Wizards

footer image footer image