Skip to main content

Hi everyone,
I received the following error message during the last few data uploads:

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 "PM_AFRU": key columns ("MANDT", "AUFPL", "APLZL"), key ('100', '1016228353', '00000001'), rows 0 and 1. Table "AFVC": key columns ("MANDT", "AUFPL", "APLZL"), key ('100', '1018097598', '00000001'), rows 1603274 and 1608762.

Everything was working fine about a year ago, and I have checked the table relationships—they are correct. What could be the issue?Can anyone help?

THX, M

There are duplicates in either PM_AFRU or AFVC.
Run the following query to identify them. Removing the duplicates should help you reload the data model. The issue may be due to a structural change or unintended data duplication.

Check for duplicates in PM_AFRU

SELECT "MANDT", "AUFPL", "APLZL", COUNT(*) AS duplicate_count FROM PM_AFRU GROUP BY "MANDT", "AUFPL", "APLZL" HAVING COUNT(*) > 1;

 

Check for duplicates in AFVC

SELECT "MANDT", "AUFPL", "APLZL", COUNT(*) AS duplicate_count FROM AFVC GROUP BY "MANDT", "AUFPL", "APLZL" HAVING COUNT(*) > 1;

 


Tank you.


Reply