‎2008 Feb 13 10:59 AM
i have itabA like this
A1 B1 21 abc
A1 B1 22 pqr
A1 B1 23 xyz
A1 B2 24 abc
A1 B2 25 pqr
A1 B2 26 xyz
itabB like this
A1 B1 31
A1 B1 32
A1 B1 33
A1 B2 34
A1 B2 35
A1 B2 36
now i want to change ItabB from ItabA like this
A1 B1 31 abc
A1 B1 32 pqr
A1 B1 33 xyz
A1 B2 34 abc
A1 B2 35 pqr
A1 B2 36 xyz
how to do that.?
‎2008 Feb 13 11:04 AM
loop at itabB.
read table itab1 with key fld1 = itabB-fld1 fld2 = itabB-fld2.
if sy-subrc is initial.
itabB-fld4 = itabA-fld4.
modify itabB.
endif.
endloop.
‎2008 Feb 13 11:04 AM
loop at itabB.
read table itab1 with key fld1 = itabB-fld1 fld2 = itabB-fld2.
if sy-subrc is initial.
itabB-fld4 = itabA-fld4.
modify itabB.
endif.
endloop.
‎2008 Feb 13 11:08 AM
loop at itabB.
read table itab1 with key fld1 = itabB-fld1 fld2 = itabB-fld2.
if sy-subrc =0
itabB-fld4 = itabA-fld4.
modify itabB.
endif.
endloop
‎2008 Feb 13 11:11 AM
loop at itabB INTO waB.
V_IND = SY-TABIX
read table itab1 INTO waA with key field1 = waB-field1
field2 = waB-field2.
if sy-subrc =0.
waB-field4 = waA-field4.
modify itabB FROM waB INDEX v_ind transporting field4.
endif.
endloop.
‎2008 Feb 13 11:07 AM
‎2008 Feb 13 11:16 AM
loop at itabB.
read table itabA with key fld1 = itabB-fld1 fld2 = itabB-fld2.
if sy-subrc is 0.
itabB-fld4 = itabA-fld4.
modify itabB transporting fld4.
endif.
endloop.Regards