Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Doubt in Submit...return

Former Member
0 Likes
402

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

2 REPLIES 2
Read only

Former Member
0 Likes
364

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

Read only

Former Member
0 Likes
364

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