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 a report from the same report

Former Member
0 Likes
817

hi experts,

I have a typical design of a program. As per my requirement I have to call a report program from the same report program using job_open and other FMs. I also have to pass the internal table data of the calling program to the called program. I tried the combination of job_open and SUBMIT statement but could not find a way to pass the data to the called program. Please suggest me some ways . Thanks in advance.

regards

hi experts,

I have a typical design of a program. As per my requirement I have to call a report program from the same report program using job_open and other FMs. I also have to pass the internal table data of the calling program to the called program. I tried the combination of job_open and SUBMIT statement but could not find a way to pass the data to the called program. Please suggest me some ways . Thanks in advance.

regards

4 REPLIES 4
Read only

Former Member
0 Likes
711

If you want to do that you will have to have another dummy program, you call the dummy program from this program then call back the main program.

Hope the issue is solved.

Read only

0 Likes
711

hi,

Sorry I was not clear with the solution. I also metioned I have to passs the internal table data and other variables as well. Can u please elaborate on that. Thanks a lot.

Read only

0 Likes
711

Create another dummy program say

z_prog_dummy

, now call the main program

z_prog

, ( using SUBMIT )

The flow of the program would be that the instructions in the main program will get executed from the first line till SUBMIT is encountered, then it goes to the dummy program, in the dummy program when you use SUBMIT again, then it will call the from the 1st line of the main program.

If you want the internal table and variables also to be visible, then you could use the memory ID's IMPORT and EXPORT.

Read only

Former Member
0 Likes
711

Hi,

to call the report from other report imagine tht u hav 1st prog as z_prog1 and u want to call 2nd prog Z_prog2 use the syntax as...

Submit Z_prog2. then it will automatically call the other report.

If in case ur are dealingw with modle pool programing u can go for syntax

Submit Z_pog2 via selection-screen..

Hope it might work..

Regards,

Sana M.

reward for useful answers...