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

Report as Include

Former Member
0 Likes
688

Hi,

I need to get a particular field value of Internal table from the called report to the calling report.

Can anyone help me how is is possible. And if it is possible by Include the report then how we will execute the included report and get the values.

Senthil.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
669

try by EXPORT TO MEMORY that value in the called report and IMPORT FROM MEMORY in the calling report

5 REPLIES 5
Read only

Former Member
0 Likes
670

try by EXPORT TO MEMORY that value in the called report and IMPORT FROM MEMORY in the calling report

Read only

Former Member
0 Likes
669

use the procedure of calling external subroutine:

perform xyz(mnop) using abcd.

Hope it helps.

Please close the issue with appropriate points if helpful.

Good luck.

Venu

Read only

Former Member
0 Likes
669

In Report1 you have to do:


<b>Submit report2 and return.</b>
or 
<b>Submit report2 with p_param1 = 'value1' with p_param2 = 'value2' and return.</b>
(Here p_param1 and p_param2 should be parameters defined in report2.)

<b>if sy-sburc = 0.
Import <fieldname> from memory id 'ABCXYZ'.
endif.</b>

In Report2:


<b>Export <fieldname> to memory id 'ABCXYZ'.</b>

You have to make sure that <fieldname> should be declared the same way in both programs.....

Read only

Former Member
0 Likes
669

Hi Senthil,

1 For this u will have to slight modification in both programs.

2. First of all in the CALLED program,

after the internal table is populated,

use EXPORT ITAB-FieldName to MemoryID.

(This will place the value of field

in memory so that other programs can access it)

3. In ur 1st Program (Calling program)

u must be calling the 2nd program thru

SUBMIT .. AND Return .

After this, use syntax.

IMPORT field from memory ID

4. Also see help on Export and Import statements.

I Hope it helps.

Regards,

Amit m.

Read only

Former Member
0 Likes
669

hi, you can use set/get Parameter ID , if you can add some SET Parameter code in the called program.

Then get it in calling program.

Another way, assume the called report is in the call stack in your calling report.

that means the global variable of called program exist in the memory.

Then you can do like this:

name = '(ZXXXXX)it_XX'.

Assign (name) to <FS>.

ZXXXX is the called program name. it_XX is the name of that internal table you want.

Hope it will be helpful

thanks