‎2007 Apr 24 5:51 AM
hi,
standard report RFTBCF00 .
in the copy of standard report(ZRFTBCF00_BW ) i added the following as suggested.
export thead to memory id '001'.
export titem to memory id '002'.
submit ZRFTBCF00_BW and return exporting list to memory .
and in other program i added
import thead FROM MEMORY id '001'.
import titem from memory id '002'.
but wen i m checking the data the thead and titem both are initial.
plz letme know where m rong
‎2007 Apr 24 4:17 PM
Hi,
Try decalring the internal tables in same way at the sender & receiver and it must work. But don't forget to Free the memory.
Eg:
I have used in a BADI (OO)
TYPES: BEGIN OF it_cert,
ebelp TYPE ebelp,
matnr TYPE matnr,
charg TYPE charg_d,
lichn TYPE lichn,
cert(4) TYPE c,
END OF it_cert.
Data: ws_memid(10) TYPE c.
DATA wa_cert TYPE it_cert.
DATA t_cert TYPE STANDARD TABLE OF it_cert.
... After processing the internal table
ws_memid = 'CERT'.
EXPORT t_cert FROM t_cert TO MEMORY ID ws_memid.
In other BADI declaration is same.
ws_memid = 'CERT'.
IMPORT t_cert TO t_cert FROM MEMORY ID ws_memid.
FREE MEMORY ID 'CERT'.
Try to use this code.. I was able to Export the table & Imported by using in this BADI.
‎2007 Apr 24 6:39 AM
can any one let me know the reason why data is not coming
thnx,
points will b assigned
‎2007 Apr 24 6:54 AM
Hello Nishu
THEAD and TITEM are defined as itabs with header lines:
************************************************************************
* Internal tables
************************************************************************
data:
tfha like vtbfha occurs 0,
tfhapo like vtbfhapo occurs 0,
begin of thead occurs 0.
include structure vtbfha.
data:
xgsart(30) type c,
xfhaart(30) type c,
end of thead,
begin of titem occurs 0.
include structure vtbfhapo.
data:
vgtyp(30) type c,
xbewebe(30) type c,
xbewart(30) type c,
whwbetr like vtbfhapo-wzbetr,
end of titem.Thus, if you export THEAD (or TITEM) you are exporting the <b>header line</b> which apprently is empty.
To export the itab body use:
EXPORT thead[] TO MEMORY ID '001'.
EXPORT titem[] TO MEMORY ID '001'.Regards
Uwe
‎2007 Apr 24 7:35 AM
Thnx,
but still wen i m importing the table its coming empty.
Points will b assigned
‎2007 Apr 24 7:41 AM
‎2007 Apr 24 7:45 AM
Hi,
If you use these EXPORT and IMPORT atatment directly then that won't work in another Program, you need to use the DATABASE ID
You can at this link, you need to use the DATABASE Index for this
http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/export01.htm
After writing this write FREE <Database_ID>.
‎2007 Apr 24 7:59 AM
Hello Nishu
I did not read your posting carefully enough.
When you are exporting a list using SUBMIT <reportname> ... EXPORTING LIST TO MEMORY then you have to use function module <b>LIST_FROM_MEMORY</b> to fetch the list again.
However, this works only if you fetch the list in the program which is calling report ZRFTBCF00_BW via SUBMIT.
If you need the list in a completely different program then you have to store it in a <b>persistent</b> way, e.g.:
EXPORT thead[] titem[] TO DATABASE indx(zy) ID '<my id>'.Regards
Uwe
‎2007 Apr 24 8:16 AM
thnx for ur reply
i used da same n wen i m importing it in other program
import thead[] titem[] from DATABASE indx(zy) ID '<my id>'.
m getting empty tables can u letme know why data is not coming
‎2007 Apr 24 4:17 PM
Hi,
Try decalring the internal tables in same way at the sender & receiver and it must work. But don't forget to Free the memory.
Eg:
I have used in a BADI (OO)
TYPES: BEGIN OF it_cert,
ebelp TYPE ebelp,
matnr TYPE matnr,
charg TYPE charg_d,
lichn TYPE lichn,
cert(4) TYPE c,
END OF it_cert.
Data: ws_memid(10) TYPE c.
DATA wa_cert TYPE it_cert.
DATA t_cert TYPE STANDARD TABLE OF it_cert.
... After processing the internal table
ws_memid = 'CERT'.
EXPORT t_cert FROM t_cert TO MEMORY ID ws_memid.
In other BADI declaration is same.
ws_memid = 'CERT'.
IMPORT t_cert TO t_cert FROM MEMORY ID ws_memid.
FREE MEMORY ID 'CERT'.
Try to use this code.. I was able to Export the table & Imported by using in this BADI.