2006 Oct 06 5:28 AM
Hello,
Can you please tell me how can I export and import data across two different LUWs? We have a program which generates another dynamic program and then executes this dynamic program in a separate task. (SAP does not allow to SUBMIT generated program with the clause EXPORTING LIST TO MEMORY).
This generated program generates a list which is retrieved using RECEIVE RESULTS statement. But somehow my program hangs at this stage and I am not able to receive a list from the second task to my first task.
Thanks a lot for all the help
Regards
Priyanka
2006 Oct 06 5:33 AM
Hi ,
first trance the task ,then u will come to know whats happening ?
dynamic means ?
submit (t_repid) using selection-set 'EMAIL'
with s_werks eq yplant-pplnt
with s_budat in s_budat
exporting list to memory and return.
* and read list from memory into table
call function 'LIST_FROM_MEMORY'
tables
listobject = listobject
exceptions
others = 1.
if sy-subrc <> 0.
message id '61' type 'E' number '731'
with 'LIST_FROM_MEMORY'.
endif.
regards
Prabhu
2006 Oct 06 5:33 AM
HI,
you can use export and import to do this.
<b>In calling program for export</b>
data: it_bkpf type table of bkpf with header line.
SELECT * FROM bkpf into table it_bkpf.
<b>EXPORT it_bkpf[] TO MEMORY ID 'MID'.</b>
<b>In called program for import</b>
data: it_bkpf type table of bkpf with header line.
<b>IMPORT it_bkpf[] FROM MEMORY ID 'MID'.</b>
LOOP AT It_bkpf.
write:/ it_bkpf-belnr, 'found' color col_positive.
ENDLOOP.
Regards,
2006 Oct 06 5:41 AM
Hello Priyanka
You could save the required data from the submitted report persistently, e.g.:
EXPORT <data> TO DATABASE indx(<ar>) ID <key>.
In your submitting report you can now import these data:
IMPORT <data> FROM DATABASE indx(<ar>) ID <key>.
If you need a link between both reports you could add the <key> as an additional parameter to your submitted report.
Regards
Uwe