Symptom
You are creating / updating Employee Central job information of an employee using ODATA API upsert operation.
When upserting to the EmpJob entity, the creation / update fails with either or both of the below error messages:
-
XXXXXX is an invalid external code for Cost Center
-
XXXXXX is an invalid external code for Position
Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental.
Environment
- SuccessFactors BizX
- EC ODATA API
Reproducing the Issue
This issue can be quickly reproduced by performing the below steps:
- Navigate to Manage Data
- Create a new Cost Center and / or Position (Code: validationTest & Effective As Of: 01/01/2020)
- Hire an employee via ODATA API (costCenter: validationTest & start Date: 01/01/2019)
- The upsert will fail with error: "validationTest is an invalid external code for Cost Center"
Cause
The same data issue is occurring for both the Cost Center & Position fields located in the Job Information (EmpJob)
- The startDate value provided in the EmpJob upsert is outside the effective period of the Cost Center / Position
i.e. The Cost Center / Position is not effective (does not exist) on the provided startDate
- The startDate value provided in the EmpJob upsert is outside the effective period of the Cost Center / Position
i.e. The Cost Center / Position is not effective (does not exist) on the provided startDate
Resolution
To resolve this issue, we must ensure that that the startDate of the job information upsert, is within the effective periods of both the Cost Center / Position
- Navigate to Manage Data > Cost Center (or Position)
- Select the Cost Center / Position which is having issues
- Check the Effective as of value for this Cost Center
- Ensure that the startDate of the EmpJob Upsert is after the Effective as of value of the Cost Center / Position
Assuming the Cost Center / Position is currently Active, the above steps should clear the validation error displayed in the 'Symptoms' section
See Also
For further information on the EC ODATA APIs, See: Employee Central OData API Reference Guide
Keywords
Invalid, externalCode, costCenter, Cost Center, Positoon, job information, EmpJob, upsert, startDate, effective as of, data issue, validation , KBA , LOD-SF-INT-EC , Employee Central SFAPI & OData Entities , LOD-SF-INT , Integrations , LOD-SF-INT-ODATA , OData API Framework , Problem