SAP Knowledge Base Article - Public

2166531 - Error: Please make sure that the external code for picklist "x" with option ID "x" is valid - Compound Employee API

Symptom

Compound Employee API call fails with following error which can be seen in its response:

<node_name>job_information</node_name>
<field_name>custom_string2</field_name>
<xpath>//sfobject[1]/person/employment_information[1]/job_information[1]</xpath>
<code>COMPOUND_EMPLOYEE/PICKLIST_INVALID</code>
<severity>WARNING</severity>
<message_text>Field "custom_string2" can't be returned: Please make sure that the external code for picklist "empJobTest" with option ID "667569" is valid. If this is a migrated picklist, please maintain missing non-unique external codes for this picklist.</message_text>

In this example above, "empJobTest" is the picklist name and the picklist value with option ID "667569" is the one failing.

Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental.

Environment

  • SAP SuccessFactors HXM Suite
    • Compound Employee API

Cause

Currently there are three causes to this error:

  1. There is no "Non-unique External Code" value maintained in Picklist Center if this is a migrated picklist
  2. There is no "external_code" value maintained in the picklist configuration if this is a non-migrated picklist
  3. At some moment in the past the picklist Option ID was different than the one that it is configured at the moment

Resolution

For cause 1:

  1. Go to Picklist Center
  2. Open the picklist and the picklist value that is failing
  3. Set a value under "Non-unique External Code" field and save

    nonUnique.jpg

For cause 2:

  1. Go to Admin Tools > Picklist Management > Picklists
  2. Select "Export all picklists" > Click on Submit > Download and open the CSV file
  3. Search for the picklist option ID suggested in the error
  4. Maintain an "external_code" value for all the Option ID present for the corresponding picklist ID

    Picklist_Example.png

  5. Save changes to the picklist file
  6. Select "Import Picklist" and import the csv file.

For cause 3:

When you set a picklist value to an employee record it will save a snapshot of this employee record in the database that Compound Employee fetches data. This means that at the time that the employee record was saved, the picklist option ID was different then it is right now. As Compound Employee is still trying to fetch data with the option ID from the past due to this snapshot that is saved in database, it won't find the picklist data because the picklist has a different option ID now.

In order to solve this, you can do a dummy change in the employee profile portlet that has data for that picklist - this will make the most recent option ID of the picklist be saved in the database, solving the issue in Compound Employee API.

Keywords

externalcode, picklist, option ID, Boomi, SAP PI, Compound Employee, ce, Please make sure that the external code for picklist, with option ID, is valid, COMPOUND_EMPLOYEE/PICKLIST_INVALID, option id, Non-unique External Code, picklist center, migrated, mdf, non-migrated, , KBA , LOD-SF-INT-CE , Compound Employee API , LOD-SF-INT , Integrations , LOD-SF-INT-EC , Employee Central SFAPI & OData Entities , LOD-SF-INT-BOM , Standard SF to 3rd Party Boomi Content , Problem

Product

SAP SuccessFactors HXM Suite all versions