SAP Knowledge Base Article - Public

3702262 - Error "exception caught when loading user with index 0" during employee profile creation via odata api

Symptom

  • An error occurs while attempting to create a new employee profile via API using the sequence of five API calls.
  • The error message displayed is: "Exception caught when loading user xxxxx. with the index 0."
  • The issue is specific to a particular ID used as personIdExternal and userId.
  • Required permissions were granted to the API user, and the API calls were functioning correctly until the day before the issue occurred.

Environment

Successfactors 
Odata V2

Reproducing the Issue

  1. Initiate the creation of a new employee profile via API using a sequence of five API calls.
  2. Use the specific ID xxxxx as personIdExternal and userId.
  3. Observe the error message: "Exception caught when loading user xxxxx. with the index 0."

Cause

The value xxxxx has already been used as ASSIGNMENT_ID_EXTERNAL by userID xxxxx.

Resolution

You can use the convertAssignmentIdExternal function import to change the assignment ID of a user.

An assignment ID is an identifier assigned to the work relationship between a person and the company. The relationship could be an employment relationship, contingent relationship, pensioner relationship, intern, global assignment, or others.

This example shows how to change the assignment ID of a single user.

https://<API-Server>/odata/v2/convertAssignmentIdExternal? oldAssignmentIdExternal='abc123'&newAssignmentIdExternal='xyz456'

GUIDE: convertAssignmentIdExternal function import

Keywords

odata api, employee profile creation, exception caught, index 0, assignment_id_external, userId, personIdExternal, API error, SAP SuccessFactors, integration, troubleshooting, error message, database check, check tool, API sequence, convertAssignmentIdExternal , KBA , LOD-SF-INT-ODATA , OData API Framework , Problem

Product

SAP SuccessFactors HCM Suite 2511