‎2005 Dec 16 10:11 PM
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.
‎2005 Dec 16 10:34 PM
try by EXPORT TO MEMORY that value in the called report and IMPORT FROM MEMORY in the calling report
‎2005 Dec 16 10:34 PM
try by EXPORT TO MEMORY that value in the called report and IMPORT FROM MEMORY in the calling report
‎2005 Dec 16 10:34 PM
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
‎2005 Dec 16 11:02 PM
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.....
‎2005 Dec 17 4:35 AM
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.
‎2005 Dec 18 4:56 AM
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