2007 Jan 22 11:47 AM
2007 Jan 22 11:52 AM
Hi Praveen,
use this,
appending lines of itab to itab1.
if both the internal structure are in same structure then this will help u .
else.
use
loop at itab.
move-corresponding fields of itab to itab1.
append itab1.
clear itab1.
.....endloop.
Regards,
ashok
Hi Praveen,
use this,
appending lines of itab to itab1.
if both the internal structure are in same structure then this will help u .
else.
use
loop at itab.
move-corresponding fields of itab to itab1.
append itab1.
clear itab1.
.....endloop.
Regards,
ashok
2007 Jan 22 11:49 AM
sort i_mpos by warpl.
sort i_mhis by warpl.
sort i_plwp by plnnr.
sort i_plpo by plnnr.
loop at i_mpos.
move-corresponding i_mpos to it_final.
read table i_mhis with key warpl eq i_mpos-warpl binary search.
if sy-subrc eq 0.
move-corresponding i_mhis to it_final.
endif.
read table i_plwp with key plnnr eq i_mpos-plnnr binary search.
if sy-subrc eq 0.
move-corresponding i_plwp to it_final.
endif.
read table i_plpo with key plnnr eq i_mpos-plnnr binary search.
if sy-subrc eq 0.
move-corresponding i_plpo to it_final.
endif.
append it_final.
clear it_final.
endloop.
2007 Jan 22 11:50 AM
2007 Jan 22 11:50 AM
Sort itab_vbap by vbeln posnr.
sort itab_vbkd by vbeln posnr.
Loop at itab_vbap into wa_vbap.
read table itab_vbkd into wa_vbkd with key vbeln = wa_vbap-vbeln posnr = wa_vbap-posnr binary search.
if sy-subrc = 0.
move corresponding wa_vbap to wa_final.
move corresponding wa_vbkd to wa_final.
append wa_final to itab_final.
endif.
endloop.
For move corresponding statement the name of the fields should match in both the work areas.
2007 Jan 22 11:52 AM
Hi Praveen,
use this,
appending lines of itab to itab1.
if both the internal structure are in same structure then this will help u .
else.
use
loop at itab.
move-corresponding fields of itab to itab1.
append itab1.
clear itab1.
.....endloop.
Regards,
ashok
2007 Jan 22 11:52 AM
hi ..
You can loop on one table and read the second table inside the loop .
LOOP at i_tab1 into wa_tab1.
wa_tab3-field1 = wa_tab1-field1.
wa_tab3-field2 = wa_tab1-filed2.
READ TABLE i_tab2 into wa_tab2 WITH KEY vbeln = wa_tab1-vbeln.
wa_tab3-field3 = wa_tab2-field4.
watab4-field5 = wa_tab2-filed6 .
ENDLOOP.
Reward if helpful.
2007 Jan 22 11:55 AM
Hi Praveen,
Check these threads.
https://forums.sdn.sap.com/click.jspa?searchID=837697&messageID=2894360
https://forums.sdn.sap.com/click.jspa?searchID=837697&messageID=2593804
https://forums.sdn.sap.com/click.jspa?searchID=837697&messageID=723600
https://forums.sdn.sap.com/click.jspa?searchID=837697&messageID=2894360
https://forums.sdn.sap.com/click.jspa?searchID=837697&messageID=2912699
Hope this helps. Mark if helpful.
Regards,
-Priyanka.
2007 Jan 22 11:57 AM
hi,
data it_tab like table of wa_struct.
data it_tab2 like table of wa_struct.
it_tab-field1 = "a".
append it_tab.
it_tab2-field2 = "b".
append it_tab2.
move-correponding it_tab to it_tab2.
or
data it_tab3 like table of wa_struct.
loop at it_tab.
it_tab3-field = it_tab -field.
append it_tab3.
endloop.
loop at it_tab2.
it_tab3-field = it_tab2-field.
append it_tab3.
endloop.
regards,
Siva
REGARDS,
Siva.
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |