‎2007 May 22 11:28 AM
i have a internal table i_final in program 1 and this internal table data need to be input of other program, so how i need to pass the i_final data to other program.
‎2007 May 22 12:09 PM
Hmmm, I tried it and it worked fine:
Report 1:
DATA: BEGIN OF lt_test OCCURS 0.
INCLUDE STRUCTURE bkpf.
DATA: END OF lt_test.
I've added a line in debug mode.
EXPORT lt_test TO MEMORY ID 'zftest'.
Submit report2.
Report 2:
DATA: BEGIN OF lt_test OCCURS 0.
INCLUDE STRUCTURE bkpf.
DATA: END OF lt_test.
IMPORT lt_test FROM MEMORY ID 'zftest'.
Please check of the table definition is the same and both reports. If so, please let me know your release and the text of the dump.
Regards
Nicola
‎2007 May 22 11:31 AM
Use submit.
submit prg_name.
Declare same internal table in target proram also.
‎2007 May 22 11:32 AM
‎2007 May 22 11:31 AM
If you don't have a chance to use perform routines you'll have to use 'EXPORT TO MEMORY' and in the other program 'IMPORT FROM MEMORY'.
Regards
Nicola
‎2007 May 22 11:50 AM
Simply use submit statement.
submit test. (test is target program).
declare the same internal table in target program.
Use the data in target program.
‎2007 May 22 11:51 AM
Sure,
e.g.:
EXPORT lt_table TO MEMORY ID 'ZFTABLE'.
IMPORT lt_table FROM MEMORY ID 'ZFTABLE'.
in both reports the table definition and the name of the ID has to be the same (you can choose any name you like).
Hope that helps!
Nicola
‎2007 May 22 11:52 AM
Simply use submit statement.
submit test. (test is target program).
declare the same internal table in target program.
Use the data in target program.
‎2007 May 22 11:53 AM
it doesn't work with submit, at least not up to release 4.7
With submit you can transfer a selection table but not an internal table with data.
Regards
Nicola
‎2007 May 22 12:01 PM
hi nicolas,
i have tried using export and import its not working.
‎2007 May 22 12:03 PM
this is the code in program 1:
ENDIF.
**appending work area to internal table.
APPEND wa_final TO i_final.
ENDLOOP.
EXPORT i_final to memory id 'zfinal'.
this is the code in program 2:
TYPES: BEGIN OF t_final,
bukrs TYPE bkpf-bukrs,
belnr TYPE bkpf-belnr,
blart TYPE bkpf-blart,
xblnr TYPE bkpf-xblnr,
ebeln TYPE ekbe-ebeln,
ebelp TYPE ekbe-ebelp,
belnr1 TYPE ekbe-belnr,
xblnr1 TYPE ekbe-xblnr,
ebeln1 TYPE ekko-ebeln,
exnum TYPE ekko-exnum,
lands TYPE ekko-lands,
stceg_l TYPE ekko-stceg_l,
END OF t_final.
DATA: i_final TYPE STANDARD TABLE OF t_final WITH HEADER LINE.
DATA: wa_final TYPE t_final.
IMPORT i_final from memory ID 'zfinal'.
write: i_final.
its giving Dump.
‎2007 May 22 12:09 PM
Hmmm, I tried it and it worked fine:
Report 1:
DATA: BEGIN OF lt_test OCCURS 0.
INCLUDE STRUCTURE bkpf.
DATA: END OF lt_test.
I've added a line in debug mode.
EXPORT lt_test TO MEMORY ID 'zftest'.
Submit report2.
Report 2:
DATA: BEGIN OF lt_test OCCURS 0.
INCLUDE STRUCTURE bkpf.
DATA: END OF lt_test.
IMPORT lt_test FROM MEMORY ID 'zftest'.
Please check of the table definition is the same and both reports. If so, please let me know your release and the text of the dump.
Regards
Nicola
‎2007 May 22 12:21 PM
‎2007 May 22 12:22 PM