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

Internal Table Doubt

Former Member
0 Likes
543

Hi All,

How can i move the entire internal table content from one internal table to other which has the same structure with only one extra field.

Thanks,

Yogesh

1 ACCEPTED SOLUTION
Read only

kostas_tsioubris
Contributor
0 Likes
511

Hi,

you can try something like this.

clear itab1.

loop at itab1.

clear itab2.

move-corresponding itab1 to itab2.

append itab2.

endloop.

Kostas

4 REPLIES 4
Read only

amit_khare
Active Contributor
0 Likes
511

loop at itab1 into wa1.

move-corresponding wa1 to wa2.

append wa2 to itab2.

endloop.

Regards,

Amit

Reward all helpful replies.

Read only

Former Member
0 Likes
511

HI,

if both the tables are of same structure then

itab[] = jtab[].

coz u have one additional field.

loop at jtab.

move-corresponding jtab to itab.

itab-newfield = value.

append itab.

endloop.

Thanks

Mahesh

Read only

kostas_tsioubris
Contributor
0 Likes
512

Hi,

you can try something like this.

clear itab1.

loop at itab1.

clear itab2.

move-corresponding itab1 to itab2.

append itab2.

endloop.

Kostas

Read only

Former Member
0 Likes
511

Hi,

in this case you need to loop at every entry and move one by one to anothr itab.

loop at itab1.

itab2-fld1 = itab1-fld1 .

itab2-fld2 = itab1-fld2 .

...........................

itab2-fldn = itab1-fldn .

append itab2.

endloop.

Award point if found helpful.

Thanks

Dany