‎2006 Jun 13 9:49 AM
Hi all,
i am trying a simple program .See below
REPORT Ztest.
data: begin of itab occurs 0,
za(3) type c,
end of itab.
export itab[] to memory id 'ZPARA'.
submit ztestcall and return.
write:/ itab-za.
In the pgm ztestcall, i have written,
report ztestcall.
data: begin of itab occurs 0,
za(3) type c,
end of itab.
itab-za = 'ABC'.
append itab.
itab-za = 'XYZ'.
append itab.
import itab[] from memory id 'ZPARA'.
Now, when i execute the first pgm ztest, the contents of itab is not getting populated...
It will be very helpful if u help me out in this.
TIA,
sinthu
‎2006 Jun 13 9:53 AM
Hi Sinthu,
<b>In your ZTEST you didnt populate any values to ITAB. Populate values to ITAB using APPEND statement</b>.
clear itab.
itab-za = 'AAA'.
append itab.
clear itab.
itab-za = 'BBB'.
append itab.
In addition to this,<b>when import/exporting internal table use memory id as workarea name only.</b>
<b>export itab[] to memory id 'ITAB'.
import itab[] from memory id 'ITAB'.</b>
Thanks,
Vinay
‎2006 Jun 13 10:02 AM
Hi,
REPORT Ztest.
data: begin of itab occurs 0,
za(3) type c,
end of itab.
export itab[] to memory id 'ZPARA'. <u><b>==> here u r exporting empty records.</b></u>
submit ztestcall and return.
write:/ itab-za. <u><b>==> Use READ TABEL ITAB or LOOP AT ITAB. after that u display the records</b></u>
In the pgm ztestcall, i have written,
report ztestcall.
data: begin of itab occurs 0,
za(3) type c,
end of itab.
itab-za = 'ABC'.
append itab.
itab-za = 'XYZ'.
append itab.
import itab[] from memory id 'ZPARA'. <u><b>==> Here u import the empty records from itab using Memory ID 'ZPARA'</b></u>
Thats why u are not getting any value.
May be u can try this program:
REPORT Ztest.
data: begin of itab occurs 0,
za(3) type c,
end of itab.
itab-za = 'ABC'.
append itab.
itab-za = 'XYZ'.
append itab.
export itab[] to memory id 'ZPARA'.
submit ztestcall and return.
In the pgm ztestcall,
report ztestcall.
data: begin of itab occurs 0,
za(3) type c,
end of itab.
import itab[] from memory id 'ZPARA'.
loop at itab.
write: / itab.
endloop.
- Selvapandian Arunachalam