SAP Knowledge Base Article - Public

2278722 - Record Learning error: ORA-02291

Symptom

When recording completion for an Item Completion via Record Learning Multiple or User completion we receive the below error:

ORA-02291: integrity constraint (CustomerSchema.FK_CPNT_CD__EVTHST_STUD) violated - parent key not found
ORA-06512: at "CustomerSchema.PKG_LEARNINGHST", line 6640
ORA-06512: at "CustomerSchema.PKG_LEARNINGHST", line 5659
ORA-06512: at "CustomerSchema.PKG_LEARNINGHST", line 2732

Environment

  • Successfactors LMS
  • Learning Management System
  • Users > Tools > Record learning Financial or Multiple

Cause

When an item is assigned to user and the assignment type is set to Required then when a learning event is recorded for the item, a record is also inserted into pa_cpnt_compliance_data table because the assignment type is set to Required.
This pa_cpnt_compliance_data table has a foreign key to the pa_cpnt_evthst table which is cpnt_id, cpnt_typ_id, rev_dte, compl_dte, compl_stat_id.

Now say an item with rev_dte 11/20/15 is assigned to a user with assignment type as Required and then revised with rev_dte 11/21/15 and assigned back to the user with assignment type as Required again.
The user will end up with the same item twice on their LP if the old item was not inactivated while revising.

Now, record a learning event for the item with the latest revision date which is 11/21/15. This inserts a record into pa_cpnt_evthst for the latest item only (11/21/15) and not for the old item.

But when compliance data is recorded, because both the items are marked as Required, the system is trying to insert two rows into the compliance table: one for old item and one for new item.
But for the item with old revision date there is no matching record in pa_cpnt_evthst to satisfy the foreign key constraint. And so, an exception is thrown.

Resolution

As discussed with Engineering team enhancement has been created to fix the issue: LRN-11181 (no target version for the fix)

But to fix the issue we can suggest any one of the below workarounds:

Option 1:
Remove the item with old revision date which is marked as Required from the user's learning plan (from the user record in admin side > assigned items).

Option 2:
If the customer does not want to remove the item then marking the old revised item as not required will also solve the problem.

To change the assignment type:

  1. From the User record> Assigned items
  2. Click on the drop down next to "Assignment type" and change to Optional or blank
  3. Save your changes

assignment_type.png

 

Option 3 and o avoid future occurences:

  • When Admin revise any item and deactivating earlier item revision, the older revision should be removed from the users learning plan.
  • The Automatic Process "Curriculum/Program Clean-up" does this job.
  • The APM should be scheduled and the checkbox "Include free-floating Item assignments:"  should be checked so that older revisions of the item will be removed from all the users learning plan by this APM.
  • After successful run of APM, the Record Learning - Multiple will record Completion of the item for users without any issues.

Keywords

LRN-11181, parent key not found, FK_CPNT_CD__EVTHST_STUD, Record Learning failure, ORA-02291, integrity constraint, ORA-02291: integrity constraint (CustomerSchema_.FK_CPNT_CD__EVTHST_STUD) violated - parent key not found, ORA-06512, record learning error , KBA , LOD-SF-LMS-ADM , Admin Tools , LOD-SF-LMS-COR , LMS Core - Items, Catalog, Curricula , Product Enhancement

Product

SAP SuccessFactors Learning 1511 ; SAP SuccessFactors Learning 1602 ; SuccessFactors Learning 1207 ; SuccessFactors Learning 1210 ; SuccessFactors Learning 1302 ; SuccessFactors Learning 1305 ; SuccessFactors Learning 1308 ; SuccessFactors Learning 1311 ; SuccessFactors Learning 1405 ; SuccessFactors Learning 1408 ; SuccessFactors Learning 1508