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

how to call sub-screen in report program

Former Member
0 Likes
7,438

hi friends.

how to call sub screen in report program.

with luv

pauldharma

hi friends.

how to call sub screen in report program.

with luv

pauldharma

6 REPLIES 6
Read only

Former Member
0 Likes
2,907
Read only

Former Member
0 Likes
2,907

hi,

A subscreen area is a reserved rectangular area on a screen, into which you place another screen at

runtime. Subscreen areas may not contain any other screen elements. To use a subscreen, you create a

second screen (with the type subscreen), and display it in the subscreen area you defined on the main

screen.

A subscreen is an independent screen that you display within another screen. You may want to use a

subscreen as a way of displaying a group of objects from the main screen in certain circumstances, but

not in others. You can use this technique to display or hide extra fields on the main screen, depending

on the entries the user has made.



PROCESS BEFORE OUTPUT.
CALL SUBSCREEN <subarea>
INCLUDING <program_name> <dynpro_number>.

PROCESS AFTER INPUT.
CALL SUBSCREEN <subarea>.


The following restrictions apply to subscreens:

CALL SUBSCREEN ... is not allowed between LOOP and ENDLOOP or between

CHAIN and ENDCHAIN.

A subscreen may not have a named OK_CODE field.

Object names must be unique within the set of all subscreens called in a single main screen.

Subscreens may not contain a module with the AT EXIT-COMMAND addition.

You cannot use the SET TITLEBAR, SET PF-STATUS, SET SCREEN, or LEAVE SCREEN

statements in the modules of a subscreen.

To create a subscreen area, choose subscreen from the object list in the Screen Painter and place it on

the screen. Fix the top-left hand corner of the table control area, and then drag the object to the required

size.

In the Object text field, enter a name for the subscreen area. You need this to identify the area when you

call the subscreen.

To use a subscreen, you must call it in both the PBO and PAI sections of the flow logic of the main

screen. The CALL SUBSCREEN <subarea> statement tells the system to execute the PBO and PAI

processing blocks for the subscreen as components of the PBO and PAI of the main screen. You

program the ABAP modules for subscreens in the same way as for a normal screen (apart from the

restrictions already mentioned).

Hope this helps, Do reward.

Edited by: Runal Singh on Apr 23, 2008 10:55 AM

Read only

Former Member
0 Likes
2,907

in flow logic you have to call subscreen not in report like:

process before output.

call subscreen : <subscreen area> including [program] <screen no>.

process after input.

call subscreen: <subscreen area>.

within the report you declare subscreen as:

CONTROLS <tabstrip sontrolname> type tabstrip.

Reward if useful.

Dara.

Read only

Former Member
0 Likes
2,907

Hai

Dharma Raj,

Generally subscreens are called from screen flow logic ( PAI and PBO ) of main screen.

You include a subscreen screen using the

CALL SUBSCREENstatement in the flow logic of the main screen.

Syntax:

PROCESS BEFORE OUTPUT.

...

CALL SUBSCREEN area_name INCLUDING prog dynp.

This statement assigns the subscreen screen with number dynp to the subscreen area-name called area.

To call the PAI flow logic of the subscreen screen, use the following statement in the PAI flow logic of the main screen:

Syntax:

PROCESS AFTER INPUT.

...

CALL SUBSCREEN area_name.

...

There is no other choice to call subscreen directly from Report program upto my knowledge.

If it is useful, reward points.

Thank you,

G.V.K.Prasad

Read only

Former Member
0 Likes
2,907

Hi Pauldharma,

We cannot call a subscreen directly in the report programming.A subscreen can only be called in the main screen.

I think you are trying to call a subscreen so that the screen looks smaller, if it is so u can reduce the main screen size to the size of the subscreen .

HOW CAN WE DO THIS ?

we can do this by calling the screen as following

CALL SCREEN 'SCREEN_NO' STARTING AT X1 Y1 ENDING AT X2Y2.

EG : CALL SCREEN 'SCREEN_NO' STARTING AT 20 20 ENDING AT 40 20.

with this you can reduce the size of the screen so that you get the desired size.

HOW TO CALL SUBSCREEN ?

To call a subscreen you need to do as following

in flowlogic of main screen

PROCESS BEFORE OUTPUT.

call subscreen 'subscree_name' using 'programname' 'screen_no'.

PROCESS AFTER INPUT.

call subscreen 'subscree_name'.

this will work.

*****Reward if useful.

Read only

venkat_o
Active Contributor
0 Likes
2,907

Hi Dharma Raj, Check the following sample program. It shows how to define subscreen in report and how can we use it .

SELECTION-SCREEN BEGIN OF SCREEN 100 AS SUBSCREEN. 
PARAMETERS: p1 TYPE c LENGTH 10, 
            p2 TYPE c LENGTH 10, 
            p3 TYPE c LENGTH 10. 
SELECTION-SCREEN END OF SCREEN 100. 

SELECTION-SCREEN BEGIN OF SCREEN 200 AS SUBSCREEN. 
PARAMETERS: q1 TYPE c LENGTH 10, 
            q2 TYPE c LENGTH 10, 
            q3 TYPE c LENGTH 10. 
SELECTION-SCREEN END OF SCREEN 200. 

SELECTION-SCREEN: BEGIN OF TABBED BLOCK mytab FOR 10 LINES, 
                  TAB (20) button1 USER-COMMAND push1 
                                   DEFAULT SCREEN 100, 
                  TAB (20) button2 USER-COMMAND push2 
                                   DEFAULT SCREEN 200, 
                  END OF BLOCK mytab. 

INITIALIZATION. 
  button1 = 'Selection Screen 1'. 
  button2 = 'Selection Screen 2'.
Check the important point here. These statements serve the same function as the statements for creating selection screens as normal screens, but here the selection screen is defined as a subscreen screen. Like all subscreen screens, selection screens defined as subscreen screens can be included in other screens or selection screens, or in subscreen areas and page elements. However, they cannot be accessed with a CALL SELECTION-SCREEN statement. They can be integrated into selection screens using the addition TABBED BLOCK to the statement SELECTION-SCREEN. This addition enables an individual subscreen area to be defined without tab titles as a special case. I hope that it helps u . Regards, Venkat.O