‎2008 Nov 25 6:00 AM
Hi guys,
I have 2 reports.
Report1-uploads file into internal table ITAB1.
Report2-To be called in Report 1 and shd be able to access the TAB1 values.
How shd i do this?DO guide me precisely.
‎2008 Nov 25 6:02 AM
Hi Alka,
use SET PARAMETER and GET PARAMETER
please go through the KEY word documentation
there is a system table called INDX( HK )
this will serve your purpose.
Regards
Ramchander Rao.K
‎2008 Nov 25 6:07 AM
‎2008 Nov 25 6:12 AM
Hi Alka,
Try this...
In report one after ITAB1 is filled us memory id
export itab1 to memory id 'NAA'.
in report 2...
submit REPORT1 using selection-screen '1000'
with <selection screen parameters>
and return.
import itab1 from memory id 'NAA'.
if sy-subrc = 0.
use itab1 here.
-
endif.
Ater that free memory id
FREE MEMORY ID 'NAA'.
Dont forget to declare itab1 in REPORT2 with same structure declared inREPORT1
Regards,
Mr.A
‎2008 Nov 25 6:18 AM
hi ,
if you want to use an internal table from one report to another,
then you can use export and import statements to do so.
in report 1 :
data: indxkey like indx-srtfd,
wa_indx type indx.
concatenate sy-uname '_' sy-datum '_' sy-uzeit into indxkey.
export <internal table name> from <internal table name> to database indx(st) from wa_indx id indxkey
submit report2
in report 2 :
data: indxkey like indx-srtfd,
indx_wa type indx.
concatenate sy-uname '_' sy-datum '_' sy-uzeit into indxkey.
import <internal table name> = <internal table name>
from database indx(st) id indxkey to indx_wa.
note ; the definition for internal tables in both the programs should be exaclty the same.
Edited by: Srinivas Manchikalapati on Nov 25, 2008 7:18 AM
‎2008 Nov 25 6:23 AM
‎2008 Nov 25 6:21 AM
just create two internal tables of same type in both programs.
then in report1.
use
export itab1 = itab1 to memory id 'MEMID'. (any string u can specify)
then in report2
import itab1 = itab1 from memory id 'MEMID'
‎2008 Nov 25 6:21 AM
Hi ,
try :
SUBMIT report EXPORTING LIST TO MEMORY
AND RETURN.
or
write a method in your original program to return the internal table.
in your report 2 use Call method to call the method of report1 which returns your table list.
Shruthi
‎2008 Nov 25 6:29 AM
Export itab1 from report1 and import itab1 into report2.
EXPORT it_outtab = lt_text TO DATABASE indx(xy) ID 'XYZ'.
IMPORT it_outtab = it_outtab1 FROM DATABASE indx(xy) ID 'XYZ'.
note - no need to define it_outtab. and lt_text can be of any type. it_outtab1 should be of type lt_text.
Regards,
Aparna.