Skip to main content

The load failed: Load failed. Error Message: Could not execute foreign key join: there are duplicates on both sides of the specified key relationship. Table "BSEG": key columns ("GJAHR", "BELNR", "BUKRS", "MANDT"), key ('2021', '0100408024', '7000', '100'), rows 1028848 and 1028849. Table "BKPF": key columns ("GJAHR", "BELNR", "BUKRS", "MANDT"), key ('2021', '5102905179', '4001', '100'), rows 1404891 and 1404892.

Hi Travon,

Celonis does not allow N:N (many to many) relationships and it seems that in the BSEG and BKPF tables of your data model there are duplicate data so Celonis considers an N:N relationship and this is why this error appears, the keys that indicate that they are duplicates are '2021', '0100408024', '7000', '100'.

I recommend using a SELECT DISTINCT in the table that has the "1" relationship (of the 1:N relationship) and run the data job again to eliminate these duplicate data.

 

I hope you find it useful.


Hi,

I think you should check why table BKPF is containing duplicates. As BKPF is a header table it shouldn't have duplicate values for combination of MANDT, BELNR, BUKRS, GJAHR.

 

Try to identify it like this:

 

SELECT MANDT, BELNR, BUKRS, GJAHR FROM BKPF

GROUP BY MANDT, BELNR, BUKRS, GJAHR

HAVING COUNT(*) > 1

 

After that you need to check why those results are stored in BKPF multiple times.

 

How are you extracting BKPF? In total or by using JOINS on BSIK / BSAK or BSID / BSAD?

 

BR

Dennis


Reply