0% found this document useful (0 votes)
20 views

Demo On Tabstrips

This document provides instructions on creating a simple screen with a tabstrip in SAP. It describes how to create a Z program in SE38, paste sample code to declare variables and controls, and call screens to display input fields on different tabs. It then guides adding a tabstrip and subscreens to the layout, linking screens to tabs, and displaying a result on the last tab.

Uploaded by

Gojer Govindaraj
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views

Demo On Tabstrips

This document provides instructions on creating a simple screen with a tabstrip in SAP. It describes how to create a Z program in SE38, paste sample code to declare variables and controls, and call screens to display input fields on different tabs. It then guides adding a tabstrip and subscreens to the layout, linking screens to tabs, and displaying a result on the last tab.

Uploaded by

Gojer Govindaraj
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 12

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.

Double Click on "call screen 100".

Enter Short descriptions.

" STATUS_0130

OUTPUT

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 on Flow logic and come to layout.


Create 2 Input fields. Enter the name description and Format.

Click on SAVE

, CHECK, ACTIVATE

Double click on CALL SCREEN 130.

Give the SHORT DESCRIPTION. Click on LAYOUT

Create a text for Result.

Click on SAVE

, CHECK, ACTIVATE

Come Back To Source Code.


Click on SAVE
And EXECUTE.
Result:-

, CHECK, ACTIVATE

Enter the Value on A = 50 and B = 50.

View the Result on Tab2.

You might also like