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

calling program from other program

Former Member
0 Likes
707

Hi all,

I am facing problem in calling a program from another program.

Actually i have two reports Report1 and Report2.

In Report1 there is a data in internal tables.Now i want to execute report2 from report1 just by filling the report2 selection screen with the data present in the internal tables.that means when i execute the report1 it will display the output of the report two by taking the data present in the internal tables of the report1 into its selection screen.

Thanks in advance

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
679

Hi Shwetha,

Use the SUBMIT keyword and call the first program into the second program.

Hope this resolves your query.

Reward all the helpful answers.

Regards

6 REPLIES 6
Read only

Former Member
0 Likes
680

Hi Shwetha,

Use the SUBMIT keyword and call the first program into the second program.

Hope this resolves your query.

Reward all the helpful answers.

Regards

Read only

Former Member
0 Likes
679

Hi

REPORT ZREPORT1.

EXPORT ITAB TO MEMORY ID 'ZREPORT1'.

SUBMIT ZREPORT2 WITH ..................... AND RETURN.

REPORT ZREPORT2.

INITIALIZATION.

IMPORT ITAB FROM MEMORY ID 'ZREPORT1'.

Max

Read only

Former Member
0 Likes
679

HI,

see this example.

program1.

REPORT ZEXAMPLE10.

tables:mara.

select-options:matnr for mara-matnr.

submit zexample11 with i_matnr in matnr and return.

program2.

REPORT ZEXAMPLE11.

tables:mara.

select-options:i_matnr for mara-matnr.

select * from mara where matnr in i_matnr.

write:/ mara-matnr.

endselect.

check this code this will b helpful.

regards,

bharat.

Read only

Former Member
0 Likes
679

Hi..

use Submit <prg name> via Selection screen.

hope this helps..

-kothai

Read only

Former Member
0 Likes
679

Hi Shweta,

When ever you want a program to be called from another program just use SUBMIT <Program Name>, then it will execute that program and then it then comes to the current program.

Thanks and regards

Vipin Das

Read only

Former Member
0 Likes
679

Hi!

In the first Report program, write

SUBMIT REPORT2 WITH ..................... AND RETURN.

This statement calls REPORT2 executes it and control returns back to REPORT1.

Reward if it helps.

Regards,

Neha Bansal.