SAP Knowledge Base Article - Public

3628057 - OData API Upsert Behavior for Country-Specific Picklist Configuration

Symptom

When performing an OData API upsert on the EmpCompensation entity, the following error is encountered:

"The given value XXXXX for option YYYYY is invalid"

This occurs when updating a field (e.g., customString2) that is configured with different picklists for different countries or regions.

Environment

  • SAP SuccessFactors HCM Suite
    • OData API

Reproducing the Issue

  1. Configure customString2 in EmpCompensation with different picklists for different countries:
    • For compInfo_COUNTRY1, map customString2 to COUNTRY1_EmployeeType.
    • For compInfo_COUNTRY2, map customString2 to COUNTRY2_EmployeeType.
  2. Perform an OData API upsert using a picklist value label that:
    • Exists in both picklists as an optionId.
    • Is a pure number (e.g., "200100").
  3. Observe the error during the upsert operation.

Cause

The EmpCompensation entity has only one version of the customString2 field in the OData API metadata. This means:

  • Only one picklist (e.g., COUNTRY1_EmployeeType) is recognized in the metadata.
  • The API cannot distinguish between country-specific picklists at runtime.
  • If a value label is numeric and overlaps with an optionId from another picklist, the API may misinterpret it, resulting in a validation error.

This limitation also applies to other entities like EmpJob and EmpEmployment, which do not have separate metadata configurations per country.

Resolution

If a field is associated with different picklists for different countries or regions, you cannot upsert a picklist value using the picklist option ID.
As a workaround, you can use the picklist option's label in your upsert when the following conditions are met:

  • The label should be the one from API caller's locale.
    You can also add the URL parameter fileLocale=en_US so that it always uses the label in en_US.
  • The label should not be a pure number, else the backend will regard it as an option ID to process.

See Also

Country/Region-Specific Logic for EmpJob, EmpEmployment, and EmpCompensation | SAP Help Portal

2870865 - Picklist Error: "XXXX is an invalid picklist value in import file or database for null" - OData API - SAP for Me

Keywords

OData API, picklist upsert, country-specific picklist upsert, country specific picklist upsert, EmpCompensation, picklist error, upsert error, invalid option ID, picklist label, custom field, metadata limitation, SuccessFactors API, fileLocale, pure number label, picklist workaround, API payload, EmpJob, EmpEmployment, picklist configuration, label vs option ID , KBA , LOD-SF-INT-EC , Employee Central SFAPI & OData Entities , Problem

Product

SAP SuccessFactors HCM Core 2505