08-27-2009 4:07 AM
Hello all,
In my requirement in a function module FM1 i am submitting a report to be executed in background. Inside this report there is a call to another function module FM2. Now the data for the importing parameters for function module FM2 are known to me before submitting the report to execute in background in FM1 but how do i pass this to the report when i submit it so that it can be used in the FM2 which is called in the report.
The parameters that i am passing is a table and a structure.
Can you please give the code which can do this.
Warm Regards,
Naveen M
08-27-2009 4:41 AM
Hi Naveen,
Use EXPORT/IMPORT statements to pass data between two internal sessions.
<li>In FM1 use EXPORT to transfer itab/structure data like below
<li>In Called program use IMPORT to retrieve itab/structure data like below
EXPORT itab TO MEMORY ID 'TAB1'.
<li>Structures should be the same in both places.
Thanks
Venkat.OIMPORT itab FROM MEMORY ID 'TAB1'.
08-27-2009 4:41 AM
Hi Naveen,
Use EXPORT/IMPORT statements to pass data between two internal sessions.
<li>In FM1 use EXPORT to transfer itab/structure data like below
<li>In Called program use IMPORT to retrieve itab/structure data like below
EXPORT itab TO MEMORY ID 'TAB1'.
<li>Structures should be the same in both places.
Thanks
Venkat.OIMPORT itab FROM MEMORY ID 'TAB1'.
08-27-2009 6:22 AM
Hello Venkat,
I tried with import and export parameters. But it dint work. Before i scheduled the report in background i exported the data in then submitted the report to execute in background. Inside the report used import but the data was not imported from the memory id.
Can anyone tell any means of fullfilling this requirement.
Warm Regards,
Naveen M
08-27-2009 6:32 AM
Naveen,
Memory ID will not hold the values if the process goes thorugh different sessions.So,check in the debugging mode if the memory id is actually holding the value or not.If it is not holding then you create a ztable and capture the data in it.For further processing fetch the data from this ztable.
To check whether the memory id is actually holding the values or not you can check as below
In the debugging mode GOTO >>SYSTEM AREAS >> ABAP MEMORY/SAP MEMORY
K.Kiran.
08-27-2009 5:20 AM
Hello Naveen,
There is no difference to pass parameters to function module in foreground or background. You can pass them as the normal way you do.
Thanks,
Augustin.
08-27-2009 5:20 AM
Hello Naveen,
There is no difference to pass parameters to function module in foreground or background. You can pass them as the normal way you do.
Thanks,
Augustin.