2162082 - Integrity Constraint Violated with Import Data - References in SuccessFactors Learning

SAP Knowledge Base Article - Public

2162082 - Integrity Constraint Violated with Import Data - References in SuccessFactors Learning

Symptom

You may see an error similar to one of the following, although a different foreign key may be mentioned:

  • The system could not update the record for one or more reasons: java.sql.SQLIntegrityConstraintViolationException: ORA-02291: integrity constraint (FK_CMPL_STAT__TAP_DEF) violated - parent key not found
  • The system could not add the record for one or more reasons: java.sql.SQLIntegrityConstraintViolationException: ORA-02291: integrity constraint (FK_CMPL_STAT__TAP_DEF) violated - parent key not found

Environment

SuccessFactors Learning

Reproducing the Issue

Import reference data, in this example the issue is with importing a completion status

  1. Go to System Admin > Tools > Import Data
  2. Choose Download Template, and then choose to download the template for References
  3. Go to the Completion Status tab in the excel template that was just downloaded
  4. Add records for any Completion Statuses you would like to update, or any new ones you would like to add
  5. Now go back to Import Data, this time choose Import Data instead of Download Template, References as the Record Type, Add and Update to the Import Option depending on the action  you are performing, and choose the file you have just altered to import
  6. Submit the file, and then choose to run the job now
  7. At this point if the import fails you can go back to the Import Data to view failed jobs
  8. Download the Error Log and you should see the reason for the failed import in the Comment section beside each row that failed

Cause

  • If you see a constraint violated - parent key not found error like in this example it is caused by a referenced field not pointing to a a valid existing object
  • In the example above it is referencing the Approval Process column of the template
  • This is a referenced field so it must point to an Approval Process ID that already exists
  • Another example would be a violation of FK_CMPL_STAT_CPNT_TYPE which would mean the Item Type specified does not exist

Resolution

  • To resolve this issue for required referenced fields make sure the ID that you put is a valid ID that already exists in the system
  • To resolve the issue for a non required field like the Approval Process column either enter a valid ID that already exists, or just leave the column blank

Keywords

KBA , LOD-SF-LMS , SuccessFactors Learning , Problem

Product

SuccessFactors Learning 1207 ; SuccessFactors Learning 1210 ; SuccessFactors Learning 1302 ; SuccessFactors Learning 1305 ; SuccessFactors Learning 1308 ; SuccessFactors Learning 1311 ; SuccessFactors Learning 1405 ; SuccessFactors Learning 1408