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: 

Calling Subscreen from different program

0 Kudos
1,979

when we call subscreen from different program, how do we transfer the data from other program. Hope it is possible with Function group. Please explain with example.

6 REPLIES 6

Former Member
0 Kudos
714

Hai Sreedhar

The syntax is as follows

CALL SUBSCREEN <AREA> INCLUDING <PROGRAM NAME> <SCREEN NO>.

Example:

Call subscreen SC1 including 'ZReport' '200'.

Thanks & regards

Sreenivasulu P

0 Kudos
714

Thank you very much. I am aware of the syntax,However, I am module program ABC and I am calling a subscreen 100 of Module program XYZ. Then how the data of XYZ program visible to ABC.

dani_mn
Active Contributor
0 Kudos
714

Declare your data in TOP include of the function module group and this will be availabe to called program.

or share a include program between these two programs.

OR use

'EXPORT', 'IMPORT' to get data in different programs.

Regards,

Wasim Ahmed

Former Member
0 Kudos
714

Hi Sreedhar,

I worked on one of the problem like that.

what i actually did to transfer the data from calling program to the called program is to use SET/GET parameters.

since i had just one parameter to pass.

Eg:

calling program:

DATA REPID like sy-repid VALUE 'RSPFPAR'. 
SET PARAMETER ID 'RID' FIELD REPID.
call subscreen <subscreen> including <progname> 
                                     <scrname>.

called program:

since only the PBO of the subscreen will be called so i write the GET parameter code here

DATA : REPID LIKE SY-REPID. 
GET PARAMETER ID 'RID' FIELD REPID.

and finally use the parameter for use in the subscreen called.

I hope this will help you.

Regards,

Kinshuk

0 Kudos
714

If I use the function group, I should have both programs with in the same function group. However, customer is NOT willing to use same Function group.

0 Kudos
714

Using SET & GET parameters, I can't pass more data like

internal tables.