Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

duplicate record issue

hi all

pl review following code

SORT i_pri BY part_nbr mfgng_duns_nbr.

LOOP AT i_pri INTO i_pri5.

IF sy-subrc = 0.

IF i_pri5-part_nbr = wa_pri_dup-part_nbr AND

i_pri5-mfgng_duns_nbr = wa_pri_dup-mfgng_duns_nbr.

i_pri5-status = 'D'.

i_pri5-error_text = 'Duplicate Record'.

modify i_pri FROM i_pri5.

ENDIF.

wa_pri_dup = i_pri5.

ENDIF.

ENDLOOP.

in the above code i am trying to find duplicate records.

code is showing all duplicate records as status D including first duplicate record. what i want is if there are 3 duplicate records then first record should not have status D where are other should have status D.

record1 status ' '

record2 status 'D'

record3 status 'D'.

is my requirement

is there any solution for this problem?

please help

thanx

rocky

Tags:
Former Member
Not what you were looking for? View more on this topic or Ask a question