Application Development 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 a report into another report

Former Member
0 Kudos

Hi,

I want to call report2(ALV) containg output table ITAB into report 1. How to write SUBMIT statement for this and how to bring ITAB into report1 from report2.Please help.

Thanks

Venkat

1 ACCEPTED SOLUTION

Former Member
0 Kudos

For this requirement you have to export your internal table into memory id for temporary storage.

Use following code:

from report 2 :

EXPORT ITAB TO MEMORY ID 'XYZ'.

now in report 1 you need this ITAB so write the follwing code.

IMPORT ITAB FROM MEMORY ID 'XYZ'.

"XYZ' - you can give any name for memory id.

Condition: in both the reports the ITAB should be of same type.

4 REPLIES 4

former_member156446
Active Contributor
0 Kudos
SUBMIT zrsnast00 WITH s_kappl = wa_zoutput_cntl-kappl
                         WITH s_objky = wa_zoutput_cntl-objky
                         WITH s_kschl = wa_zoutput_cntl-kschl
                         WITH s_nacha = '1'
                         WITH p_again = 'X'
                         WITH p_noprt = 'X'
                         WITH p_print = 'LP01' AND RETURN.

Former Member
0 Kudos

For this requirement you have to export your internal table into memory id for temporary storage.

Use following code:

from report 2 :

EXPORT ITAB TO MEMORY ID 'XYZ'.

now in report 1 you need this ITAB so write the follwing code.

IMPORT ITAB FROM MEMORY ID 'XYZ'.

"XYZ' - you can give any name for memory id.

Condition: in both the reports the ITAB should be of same type.

Former Member
0 Kudos

Hi,

Let..

Program A : ZAM_TEMP00

Program B : ZAM_Temp0

Program A will call B (In B we will get the contents of ITAB present in program A)

ZAM_TEMP00

report abc.

data : itab like table of t001 with header line.

select * from t001 into table itab.

export itab to memory id 'ITAB'.

submit zam_temp0 and return.

ZAM_TEMP0

report abc.

data : itab like table of t001 with header line.

import itab from memory id 'ITAB'.

Regards.

Nitesh

danilo_henriques
Explorer
0 Kudos

You can use:

Submit name_of_your_program with p_name = wa_data-name

p_age = wa_data-age

via selection-screen and return.