‎2007 Jun 26 8:07 PM
Hi all,
I have 2 internal tables itab1 and itab2.
itab1 contains one more internal table itab1_1 and some other fields.
itab2 is same as itab1_1 table.
i want to copy the itab2 values into the itab1_1 table which is available in the itab1.
can any body help me with the sample code.
thanks in advance
kp
‎2007 Jun 26 8:17 PM
loop at itab2.
move itab2-field to itab1-fields( i mean itab1 has itab1_1).
Move each field one by one .
do not use move-corresponding ( I mean it will have performance issue )
endloop.
Thanks
Seshu
‎2007 Jun 26 8:55 PM
Hi,
1. Declare a work area or structure (<b>wa_itab1</b>) of type itab1.
2. Then copy contents of itab2 to wa_itab1-itab1_1,
i.e <b>wa_itab1-itab1_1 = itab2.</b>
3. If u know the index of the row in itab1 where u want to insert itab2, then use
<b>MODIFY itab1 FROM w_itab1 INDEX index_no</b>
OR use
<b>MODIFY TABLE itab1 FROM w_itab1 .</b>
Reward points if the answer is helpful.
Regards,
Mukul