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


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

<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.


  • SAP SuccessFactors HXM Suite
    • Compound Employee API


Currently there are four possible 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
  4. The employee affected has an invalid/corrupted picklist value saved


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


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


  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.

For cause 4:

If you go to the employee's profile, check the history of the specific session (Job Info, Personal Info, etc) you'll notice that when you are just displaying the data the picklist field seems to be working as expected, however as soon as you click in edit, the same field will appear as empty, this means that the value that once was stored in that field has changed (either external code, or option ID) and hence the field lost its reference to the picklist in the database.

To fix this issue there are two possible approaches:

  1. If this is just for a few records you may manualy update the field which will be faster then exporting and formating a CSV file to import;
  2. If you need to fix several employees and effective dated records, then the best option is to perform a full purge import for the affected employees and entities;


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


SAP SuccessFactors HCM suite all versions