Application Development and Automation 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: 
Read only

append 2 itab

Former Member
0 Likes
545

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

3 REPLIES 3
Read only

Former Member
0 Likes
509

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,

Read only

Former Member
0 Likes
509

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

Read only

Former Member
0 Likes
509

define Another internal table with MATNR & qty fields.

LOOP AT ITAB1.

ITAB2-MATNR = ITAB1-MATNR.

ITAB2-QTY = ITAB1-QTY.

COLLECT ITAB2.

ENDLOOP.

regards

srikanth