Symptom
While querying effective-dated entity using asOfDate keyword, system is also fetching records which are effective after asOfDate value.
Environment
SAP SuccessFactors OData API
Resolution
The following keywords are used for querying effective-dated entities (such as most Employee central entities and those MDF entities that are created effective-dated):
1. asOfDate
2. fromDate/toDate
The following rules are followed when an effective dated entity is queried:
1. If both the base entity and the navigation entity are effective-dated, then when expanding the navigation entity, the effectiveStartDate of the base entity is used as the asOfDate of the navigation entity.
2. If the base entity is non-effective dated, TODAY is used as asOfDate when expanding the navigation entity.
3. For a Picklist field, the navigation entity is PicklistValue. When expanding a Picklist field, the effectiveStartDate/ effectiveEndDate of the Picklist entity are used because PicklistValue itself is not effective-dated.
4. If you specify asOfDate as a query option, all entities in all levels of the query use this date as asOfDate.
5. If you specify fromDate and toDate as query options, then only the top level entity is filtered by the fromDate and toDate, all lower level entities follow rules 1, 2, and 3.
6. You can use either AsOfDate or fromDate/endDate in a query request, not both.
Keywords
asOfDate, fromDate, toDate, effective-dated, Employee Central, MDF , KBA , LOD-SF-INT-ODATA , OData API Framework , LOD-SF-INT , Integrations , How To