‎2007 Aug 23 10:31 AM
hi,
i have 2 internal tables itab1,itab2.itab1 contains fields A,B,C,D,E & ITAB2 has fields C ,E,F only.how can i move the values of C& E in itab1 to C&E in ITAB2.plz help.
‎2007 Aug 23 10:34 AM
hi srinivas,
this will create new lines in itab1, I hope this is what you want:
LOOP AT itab1.
itab2-c = itab1-c.
itab2-e = itab1-e.
APPEND itab2.
ENDLOOP.
hope this helps
ec
‎2007 Aug 23 10:34 AM
Hi,
Use the below statement.
MOVE-CORRESPONDING xbap-matnr TO itab-matnr.
MOVE-CORRESPONDING xbap-quantity TO itab-quantity.
Hope it helps.
rewards point.
‎2007 Aug 23 10:34 AM
use this
loop at itab1.
itab2-c = itab1-c.
itab2-e - itab1-e
modify itab1.
endloop.
‎2007 Aug 23 10:34 AM
hi srinivas,
this will create new lines in itab1, I hope this is what you want:
LOOP AT itab1.
itab2-c = itab1-c.
itab2-e = itab1-e.
APPEND itab2.
ENDLOOP.
hope this helps
ec
‎2007 Aug 23 10:35 AM
‎2007 Aug 23 10:35 AM
Hi Srinivas,
You need to loop in first itab and modify the 2nd itab as follows:
LOOP AT ITAB1 into LS_ITAB1.
READ ITAB2 into LS_ITAB2WITH KEY C = LS_ITAB1-C
E = LS_ITAB1-E
BINARY SEARCH.
IF SY-SUBRC = 0.
MODIFY ITAB2 INDEX sy-tabix TRANSPORTING C
E.
ENDIF.
ENDLOOP.
<b>Reward points for helpful answers.</b>
Best Regards,
Ram.
‎2007 Aug 23 10:35 AM
Hi,
U can move values of C and E in itab1 to itab2 by looping on itab1.
loop itab1.
itab2-C = itab1-C.
itab2-E = itab1-E.
append itab2.
clear itab2.
endloop.
Regards,
Sankar
‎2007 Aug 23 10:36 AM
using corresponding fields
move correponding fields of itab1 to itab2.
‎2007 Aug 23 10:37 AM
using corresponding fields
move correponding fields itab1 to itab2.
MOVE-CORRESPONDING struc1 TO struc2.