Application Development 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: 

Internal Table Doubt

Former Member
0 Kudos

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

kostas_tsioubris
Contributor
0 Kudos

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

amit_khare
Active Contributor
0 Kudos

loop at itab1 into wa1.

move-corresponding wa1 to wa2.

append wa2 to itab2.

endloop.

Regards,

Amit

Reward all helpful replies.

Former Member
0 Kudos

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

kostas_tsioubris
Contributor
0 Kudos

Hi,

you can try something like this.

clear itab1.

loop at itab1.

clear itab2.

move-corresponding itab1 to itab2.

append itab2.

endloop.

Kostas

Former Member
0 Kudos

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