SAP Knowledge Base Article - Public

3314759 - How to retrieve different Picklist versions via OData API


You are performing the below query to retrieve the values from a picklist, but this query is bringing values from different picklists versions that have the same ID. Now you are wondering how to retrieve different picklist values via OData API.

Query: /odata/v2/PickListValueV2?$filter= PickListV2_id eq 'testPicklist'


SAP SuccessFactors HXM Suite


The query presented in the "Symptom" part will only filter the picklist by it's ID. When you create a new version of a picklist the ID will be the same as the older version, only the Effective Start Date will be different.


To retrieve values from a specific picklist version you must add a effectiveStartDate filter, such as in the following example: https://<API-server>/odata/v2/PickListValueV2(PickListV2_effectiveStartDate=datetime'1900-01-01T00:00:00',PickListV2_id='OccupCode_PER',externalCode='751013').

This query will filter the picklists by it's IDs, but also by it's effectiveStartDate, which will allow OData API to differentiate different versions already created for this picklist.

This is explained in page 92 of SAP SuccessFactors HXM Suite OData API: Reference Guide (V2)


picklistvalue, picklist versions, effectiveStartDate , KBA , LOD-SF-INT-ODATA , OData API Framework , How To


SAP SuccessFactors HCM suite all versions