‎2011 May 26 9:38 AM
Hi All,
I have two different reports,let say ZPRO1 & ZPRO2. I want to export internal table data of ZPRO1 to ZPRO2 and then I want to do some calculations in ZPRO2 with the imported internal table data(ZPRO1).
If I use 'SUBMIT' or CALL TRANSACTION syntax ZPRO1 is displaying..but I want to use only internal table data of ZPRO1.
Pls advise.
Pranitha.
‎2011 May 26 9:49 AM
I understand that these programs are custom! The easiest(and convenient) solution would be to EXPORT the internal table of ZPRO1 to some memory cluster & later on IMPORT it in ZPRO2.
Since you intend to SUBMIT ZPRO1, you must remember accessing the table through the call stack is not an option!
BR,
Suhas
PS: Similar requirements have been discussed before in the forums, you can refer to those as well
Edited by: Suhas Saha on May 26, 2011 2:20 PM
‎2011 May 26 10:10 AM
Hi Pranitha,
You can use export and import statements to use your programs.
In the first program, use EXPORT statement and in the sceond one you can IMPORT it.
For the sytax, press F1 key on the words EXPORT and IMPORT.
For variable we use EXPORT statement as below:
EXPORT V_BATCH_FLAG TO MEMORY ID 'ZCON_LM05'.Thanks,
Archana
‎2011 May 26 10:22 AM
EXPORT obj1 ... objn TO DATABASE dbtab(ar) ID key.
IMPORT obj1 ... objn FROM DATABASE dbtab(ar) ID key.
‎2011 May 26 10:43 AM
Hi,
Please follow the simple code and try to solve your issue.
Code in program1
types: begin of ty_itab,
matnr type matnr,
end of ty_itab.
data: it_itab type table of ty_itab,
wa_itab type ty_itab,
it_itab1 type table of ty_itab.
select matnr from mara into table it_itab.
export it_itab to shared buffer indx(st) id 'ABC'.
Code in program2
types: begin of ty_itab,
matnr type matnr,
end of ty_itab.
data: it_itab type table of ty_itab,
wa_itab type ty_itab.
import it_itab from shared buffer indx(st) id 'ABC'.
loop at it_itab into wa_itab.
write:/ wa_itab-matnr.
endloop.
Please delete shared buffer indx(st) id 'ABC', once we don't need the internal table data.
Regards
Dande
‎2011 May 30 2:55 AM