Application Development and Automation 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: 
Read only

subscreen

Former Member
0 Likes
702

What is subscreen in modul pool?

5 REPLIES 5
Read only

Former Member
0 Likes
587

Hi,

Subscreens allow you to embed one screen within another at runtime. The term subscreen applies both to the screen that you embed, and the area on the main screen in which you place it. This section is about subscreen areas. The actual screens that you embed are called subscreen screens. When you use a subscreen, the flow logic of the embedded screen is also embedded in the flow logic of the main screen. Using subscreens on screens is like using includes in ABAP programs.

Subscreens allow you to expand the content of a screen dynamically at runtime. For example, screen exits, which are part of the enhancement concept, use the subscreen technique. Some complex screen elements, like tabstrip controls, also use them.

To use a subscreen, you must:

1.Define the subscreen area(s) on a screen

2.Define suitable subscreen screens

3.Include the subscreen screen in the subscreen area.

Reward if useful!

Read only

Former Member
0 Likes
587
Read only

Former Member
0 Likes
587

Hi,

Sub screen is a screen within a screen.

It can not have its own gui status and can not call another subscreen.

If you go to any enjoy transaction all tabstrips contain subscreens.

Reward points,

Aleem.

Read only

0 Likes
587

How do I stop the getting answer in gmail id?

Read only

Former Member
0 Likes
587

HI,

Subscreens allow you to embed one screen within another at runtime. The term subscreen applies both to the screen that you embed, and the area on the main screen in which you place it.The actual screens that you embed are called subscreen screens. When you use a subscreen, the flow logic of the embedded screen is also embedded in the flow logic of the main screen. Using subscreens on screens is like using includes in ABAP programs.

Subscreens allow you to expand the content of a screen dynamically at runtime

Defining Subscreen Areas

You define subscreen areas using the Screen Painter in the layout of the screen on which you want to embed a subscreen. Each subscreen area on a screen has a unique name, and a position, length, and height. Subscreen areas may not overlap either with each other or with other screen elements. You can also specify whether a subscreen area can be resized vertically or horizontally when the user resizes the window. If the area supports resizing, you can specify a minimum size for it. If the resizing attributes are selected, the PAI event is triggered whenever the user resizes the main screen.

Defining Subscreen Screens

You can create subscreen screens either in the same program or a different program. To create a subscreen screen, enter the screen type Subscreen in the screen attributes. The statically-defined next screen must be the number of the subscreen itself. Choose a size for the screen, making sure that it fits within the subscreen area into which you want to place it. If the subscreen screen is too big for the subscreen area, only the top left-hand corner of it will be displayed.

You create the layout, element list, and flow logic of a subscreen screen in the same way as a normal screen. Subscreens may also include other subscreens

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.

Reward points if it is helpful..

regards,

Omkar.