07-19-2007 12:17 PM
HI,
I have :
<i>LOOP AT ITAB1.
AT NEW POPER.
read table itab1 index sy-tabix.
append itab1 to itab2.
ENDAT.
ENDLOOP.
delete from Z99BW92.
INSERT Z99BW92 FROM TABLE ITAB2." ACCEPTING DUPLICATE KEYS.</i>
ITAB2 has 4 fields that have diferents orden than Z99BW92.
How can i use "corresponding files " here?
thanks a lot
07-19-2007 12:20 PM
Hi
You can use MOVE-CORRESPONDING only when similar fields are present in both internal tables
LOOP AT ITAB1.
AT NEW POPER.
read table itab1 index sy-tabix.
MOVE-CORRESPONDING itab1 to itab2.
append itab2.
ENDAT.
clear itab2.
ENDLOOP.
<b>Reward points for useful Answers</b>
Regards
Anji
07-19-2007 12:20 PM
Hi
You can use MOVE-CORRESPONDING only when similar fields are present in both internal tables
LOOP AT ITAB1.
AT NEW POPER.
read table itab1 index sy-tabix.
MOVE-CORRESPONDING itab1 to itab2.
append itab2.
ENDAT.
clear itab2.
ENDLOOP.
<b>Reward points for useful Answers</b>
Regards
Anji
07-19-2007 12:21 PM
07-19-2007 12:22 PM
ok. Y try it. Between 2 internal tables . I go to copy the strcuture from Z99 to ITAB2.
Thanks a lot
07-19-2007 12:20 PM
instead of <i>append itab1 to itab2.</i>, move the required fields into the workarea of itab2
eg itab2-field1 = itab1-field1.
and then append itab2.
07-19-2007 12:23 PM
data: waz99 type Z99BW92
loop at itab into wa.
move corresponding wa to wa99.
insert wa99 into Z99BW92.
endloop.
07-19-2007 12:23 PM
Hi,
This option is not provided,
What you can do is.
DATA:ITAB3 TYPE TABLE OF Z99BW92.
LOOP AT ITAB2.
MOVE-CORRESPONDING ITAB2 to ITAB3.
APPEN ITAB3.
ENDLOOP.
INSERT Z99BW92 FROM TABLE ITAB3.
Regards,
Sesh