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 fields

Former Member
0 Likes
889

hi gurus...

this is may be a simple question but i am unable to do this..i have two internal tables itab1 and itab2.itab1 has f1 and f2 fields of type i.and itab2 has fields f1 , f2 and f3 fields of type 1.i want to transfer data from itab1 to itab2 and in f3 field i want to store the value of f1+f2. plz give reply???

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
869

hiii Pavan,....

do it like this...

*********************************************

Loop at itab1.

itab2-f1 = itab1-f1.

itab2-f2 = itab1-f2.

itab2-f3 = itab1-f1 + itab1-f2.

Append itab2.

clear itab2.

Endloop.

*********************************************

<b>Reward Points for Helpful answers.</b>

Regards,

Tejas

8 REPLIES 8
Read only

Former Member
0 Likes
870

hiii Pavan,....

do it like this...

*********************************************

Loop at itab1.

itab2-f1 = itab1-f1.

itab2-f2 = itab1-f2.

itab2-f3 = itab1-f1 + itab1-f2.

Append itab2.

clear itab2.

Endloop.

*********************************************

<b>Reward Points for Helpful answers.</b>

Regards,

Tejas

Read only

Former Member
0 Likes
869

hi

move-corresponding itab1 to itab2.

loop at itab2.

itab2-f3 = itab-f1 + itab-f2.

modify itab2 index sy-tabix.

endloop.

if helpful, reward

Sathish. R

Read only

Former Member
0 Likes
869

Loop on Itab1.

Move values to corresponding fields of Itab2

Append Itab2

Please reward if useful.

regards

Read only

Former Member
0 Likes
869

Loop at itab1.

itab2-f1 = itab1-f1.

itab2-2 = itab1-f2.

itab2-f3 = itab1-f1 + itab1-f2.

append itab2.

endloop.

Read only

Former Member
0 Likes
869

loop at itab1.

itab2-f1 = itab1-f1.

itab2-f2 = itab1-f2.

itab2-f3 = itab1-f1 + itab1-f2.

append itab2.

endloop.

regards

shiba dutta

Read only

Former Member
0 Likes
869

Hi,

Loop at itab1.

itab2-f1 = itab1-f1.

itab2-2 = itab1-f2.

itab2-f3 = itab1-f1 + itab1-f2.

append itab2.

clear itab2.

endloop.

Reward if it helps you.

Regards,

Sandhya

Read only

Former Member
0 Likes
869

hiii Pavan,....

do it like this...

Loop at itab1.

itab2-f1 = itab1-f1.

itab2-f2 = itab1-f2.

itab2-f3 = itab1-f1 + itab1-f2.

Append itab2.

clear itab2.

Endloop.

Reward Points for Helpful answers.

Regards,

Kunjal

Read only

Former Member
0 Likes
869

Hi pavan!

Loop at itab1.

itab2-f1 = itab1-f1.

itab2-2 = itab1-f2.

itab2-f3 = itab1-f1 + itab1-f2.

append itab2.

clear itab2.

endloop.

Reward if it helps.

Regards,

Neha Bansal.