Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Tabstrip and Subscreen

Former Member
0 Kudos

Dear All

I want to know "how to use tabstrip and subscreen". Pls give steps ( step by step) or link for this.

Thanks

Suresh

4 REPLIES 4

Former Member
0 Kudos

Hi,

I am giving u brief steps for sub screens and tabstrips..

U hav to design the layout in se51.

Select the tab strips and give the name to it.

put sub screens on the tab strips.

u hav to design layout for the sub screens seperately.ie., wat ever fields u want to put

u can add them seperately by desigining the layout for that respective subscreen..

In the module pool program u hav to use control tabstrip statement in order to

specify that u hav used tabstrip in ur layout..

u can refer to link. These may help u for details about subscreen & tabstrip.

1)http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbabfe35c111d1829f0000e829fbfe/content.htm

2)http://help.sap.com/saphelp_nw04/helpdata/en/17/5bf1b52ba211d2954f0000e8353423/content.htm

1) Briefly saying tabstrip itself contains many subscreens on the same main screen.

2) Whereas subscreen occupies area on main screen. Again there can be many subscreen on the same main screen.

3) Tabstrip control gives u the systematic arrangement of subscreens on the main page. we dont have to design much manually. again the readymade code u get by tabstrip. u have to modify as per ur requirement.

Please reward points if it helps

Thanks

Vikranth

Former Member
0 Kudos

hi,

Subscreens are screens which can be embeded into another screen. These can be used and created with both selection screen as well as screen painter.

They differ from normal screens in the way that that they don't have OK_CODE field of ther own and there PBO and PAI transfer data to the ABAP program in which these screens were created and the cannot have module calls which change status or leave screen and module call AT EXIT-COMMAND AND E type function codes.

In screen painter(SE51) choose the subscreen tool button and draw a subscreen area on the screen,this subscreen area will be used to hold the subscreen at run time.To make a subscreen select the attribute screen type as subscreen and specify the size of the subscreen according to the size of the subscreen area in which it will be placed.

We use ABAP statement to embed and start the flow logic of the subscreen area in the PBO of a screen. A subscreen can contain another subscreen.

CALL SUBSCREEN subscreen_area INCLUDING program screen_number.

A similar call should also exist in PAI of screen.It will also call the PAI modules of the subscreen and will transfer data from subscreen to ABAP program.

CALL SUBSCREEN subscreen_area.

Subscreen can be created in selection screen using ABAP ststement and can be used with tabstrip defined on the selection screen or with the screen defined in the screen painter.

SELECTION-SCREEN BEGIN OF SCREEN screen_number AS SUBSCREEN NO-INTERVALS.

....

...

SELECTION-SCREEN END OF SCREEN screen_number .

to use such a subscreen with tabstrip defined on the selection screen we should

use the DYNNR compnent of the structure which is created when the tabstrip is created and specifying the number of the screen .We can also define the subscreen statically for such a tabstrip by using

DEFAULT PROGRAM program SCREEN subscreen_number when declaring a tabstrip in selection screen.

SELECTION-SCREEN BEGIN OF TABBED BLOCK tab_area FOR height LINES.

SELECTION-SCREN TAB (width)tab_name USER_COMMAND funct_code DEFAULT program SCREEN subscreen_no .

...

END OF BLOCK tab_area .

For each tabbed apge TAB addition is used with SELECTION-SCREEN statement. At the initialization event we can fill the tabstrip structure to dsiplay the default screen or specify it with DEFAULT addition.

tab_area-PROGRAM = SY-REPID.

tab_area-DYNNR = subscreen_nummber.

tab_area-ACTIVETAB = tabname.

and

This is a example code explaining the use of TabStrip in selection screen .

*& Use of TabStrip and SubScreen explained

*& -


The report shows the material on one tab

*& and plant on one tab.Pressing the execute button will show

*& the description of the material or plant as the case is.

*& TEXT-002 = Material Number

*& TEXT-003 = Plant Number.

REPORT znr1 NO STANDARD PAGE HEADING

LINE-SIZE 80 LINE-COUNT 60.

TABLES : sscrfields.

DATA activetab(6) TYPE c .

DATA mat_des TYPE makt-maktx.

DATA pl_des TYPE t001w-name1 .

SELECTION-SCREEN BEGIN OF SCREEN 001 AS SUBSCREEN NO INTERVALS.

SELECTION-SCREEN BEGIN OF BLOCK block1 WITH FRAME TITLE text-002 NO

INTERVALS.

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN COMMENT 14(18) text-002 FOR FIELD matnr.

PARAMETERS matnr TYPE mara-matnr.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN END OF BLOCK block1.

SELECTION-SCREEN END OF SCREEN 001.

SELECTION-SCREEN BEGIN OF SCREEN 002 AS SUBSCREEN NO INTERVALS.

SELECTION-SCREEN BEGIN OF BLOCK block2 WITH FRAME TITLE text-003 NO

INTERVALS.

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN COMMENT 14(18) text-003 FOR FIELD matnr.

PARAMETERS werks TYPE t001w-werks.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN END OF BLOCK block2.

SELECTION-SCREEN END OF SCREEN 002.

SELECTION-SCREEN BEGIN OF TABBED BLOCK tabb1 FOR 5 LINES NO INTERVALS.

SELECTION-SCREEN TAB (15) tabs1 USER-COMMAND ucomm1

DEFAULT SCREEN 001.

SELECTION-SCREEN TAB (15) tabs2 USER-COMMAND ucomm2.

  • DEFAULT SCREEN 002 .

SELECTION-SCREEN END OF BLOCK tabb1.

INITIALIZATION.

tabs1 = text-002.

tabs2 = text-003.

activetab = 'TABS1'.

AT SELECTION-SCREEN .

CASE sscrfields-ucomm.

WHEN 'UCOMM1'.

tabb1-prog = sy-repid.

tabb1-dynnr = 001.

tabb1-activetab = 'TABS1'.

activetab = 'TABS1' .

WHEN 'UCOMM2'.

tabb1-prog = sy-repid.

tabb1-dynnr = 002.

tabb1-activetab = 'TABS2'.

activetab = 'TABS2'.

ENDCASE.

START-OF-SELECTION.

CASE activetab.

WHEN 'TABS1'.

SELECT SINGLE maktx FROM makt INTO pl_des WHERE matnr = matnr.

WRITE: 'Material ' , matnr , mat_des .

WHEN 'TABS2'.

SELECT SINGLE name1 FROM t001w INTO pl_des WHERE werks = werks.

WRITE: 'Plant ' , werks ,pl_des.

hope this will be helpful........

regards,

praveena.