Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

append 2 itab

Former Member
0 Kudos

i need to append the collect result but only 2 field (qty) into new_itab (matnr is key) how???

3 REPLIES 3

Former Member
0 Kudos

Hello,

data: begin of ita_new occurs 0,

matnr like mara-matnr,

qty like mard-menge,

end of itab_new.

Loop at itab.

collect itab.

move-corresponding itab to itab_new.

append itab_new.

endloop.

If useful reward points,

Former Member
0 Kudos

Hi,

Try following logic.

Loop at itab1.

collect itab1.

clear itab2.

move-corrersponding itab1 to itab2.

append itab2.

endloop.

Your itab2 should contain Matnr and req quantity fields only.

Regards,

Shashank

Former Member
0 Kudos

define Another internal table with MATNR & qty fields.

LOOP AT ITAB1.

ITAB2-MATNR = ITAB1-MATNR.

ITAB2-QTY = ITAB1-QTY.

COLLECT ITAB2.

ENDLOOP.

regards

srikanth