Skip to Content
0
Former Member
Dec 01, 2006 at 08:01 PM

How could avoid duplicates by using DISTINCT or how to delete duplicates

104 Views

by executing code

...

select * from marm where meinh = 'ST'.

select * from m_mat1p where matnr = marm-matnr.

select single * from makt where matnr = m_MAT1P-matnr.

itab-matnr = marm-matnr.

itab-maktx = makt-maktx.

itab-umrez = marm-umrez.

itab-umren = marm-umren.

itab-prodh = m_mat1p-prodh.

append itab. clear itab.

endselect.

endselect.

i get multiple results like

....

000000000000000170 Bonusabrechnung 1 1 0011000105

000000000000000170 Bonusabrechnung 1 1 0011000105

000000000000000170 Bonusabrechnung 1 1 0011000105

000000000000000170 Bonusabrechnung 1 1 0011000105

000000000000000170 Bonusabrechnung 1 1 0011000105

....

How could avoid this by using DISTINCT or how to delete duplicates. Would you be so kind and send me a sample code(like this above)

Thank you in advance