Symptom
OData API for PaymentInformationDetailsV3 query returning all records including historical by default
• OData API for PaymentInformationDetailsV3 query returns all records, including historical records, by default.
• This behaviour occurs even when using time-specific filters such as asofDate.
Environment
- SAP SuccessFactors HCM Suite
- OData MDF
Reproducing the Issue
You can do a generic query on PaymentInformationDetailsV3 with asofDate Odata filter
Cause
This occurs because the query retrieves all parent time slice records by default.
Resolution
1. Add a new parameter - filterParentDate=true in the query.
2. The current effective record is fetched, but there is a chance that the last modified date of that record does not match the filter because the modified date is checked for all time slices.
3. For example, consider the following time slices:
• EffectiveStartDate: 2017-06-05, LastModifiedDate: 2017-09-28T11:56:32Z
• EffectiveStartDate: 2017-09-21, LastModifiedDate: 2017-09-21T16:14:37Z
• EffectiveStartDate: 2017-09-26, LastModifiedDate: 2017-09-26T12:11:19Z (current effective record)
4. With the restriction of the current effective record, the record with EffectiveStartDate 2017-09-26 is returned.
5. If the filterParentDate parameter is not included, all records of this worker are fetched.
6. A new custom option (filterParentDate) is introduced to filter. Without this option, the behavior remains the same.
7. Example query: /odata/v2/PaymentInformationDetailsV3?filterParentDate=true
Keywords
OData filter, current effective record, historical records, query parameter, time slice, data filtering, API query behavior, metadata framework, SuccessFactors, effective date, record retrieval, parent record, modified date, filterParentDate, data query , KBA , ss_anonymizedkba , LOD-SF-INT-MDF , Metadata Framework API (MDF) , LOD-SF-INT , Integrations , LOD-SF-INT-API , API & Adhoc API Framework , Problem
SAP Knowledge Base Article - Public