Hi,
you can sort the table by confirmed quantity (BMENG) descending and then delete adjacent duplicates.
for e.g.
SORT ITAB DESCENDING BY VBELN POSNR BMENG.
DELETE ADJACENT DUPLICATES FROM ITAB COMPARING VBELN POSNR.
SORT ITAB ASCENDING BY VBELN POSNR.