Skip to main content
Question

Data Model load failed

  • February 24, 2025
  • 2 replies
  • 78 views

marietta.kalla
Level 1
Forum|alt.badge.img

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

2 replies

abhishek.chatu14
Level 11
Forum|alt.badge.img+4

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;

 


marietta.kalla
Level 1
Forum|alt.badge.img
  • Author
  • Level 1
  • 1 reply
  • February 25, 2025

Tank you.