Register Login

How to find duplicate records and show them in output?

Updated May 18, 2018

Dear SAP Professionals,

I have an assignment in SAP which I am trying to solve, but so far I did not managed to, as a beginner in SAP and ABAP.

I need to check if there are duplicated records in the address data base.

The customer are stored in the following tables:

KNA1 Master data with address, global view

KNB1 Master data for company code


We were filling into the field KNB1-ALTKN the previous number.


Now the idea is to find all duplicated records with this number, but there are only duplicated records if the KUNNR is different. Because the same customer can be in several company codes (BUKRS), there are for sure more than one entry with the same ALTKN.

So the condition here is : different KUNNR with the same ALTKN means duplicated record.


In this case, I need to find the duplicates and show them in an output. Can some one please help me do this ?


Thank you in advance.


×