SAP Knowledge Base Article - Public

3399073 - SF OData API $filter can't read the audit table in the Position entity when lastModifiedDateTime is on the left side

Symptom

SF OData API $filter can't read the audit table in the Position entity when lastModifiedDateTime is on the left side.

“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 HCM suite

  • Position OData API entity

Reproducing the Issue

1. There are multiple records in one Position, and deleting one record of this Position.

2. The other records of the Position cannot be filtered out by the parameters lastModifiedDateTime and $filter.
Request Example: https://<hostname>/odata/v2/Position?$filter=lastModifiedDateTime gt datetimeoffset'2023-11-14T00:00:00Z'

Cause

The "MDF Version History" of the "Position" entity is selected as "No".

Resolution

Please change the 'MDF Version History' of the 'Position' entity from 'No' to 'Complete History' from Configure Object Definition.

Possible values are:

    • No: If this option is selected, or no selection is made, history records aren’t stored for any operation and no audit records are generated.
    • Delete History: If this option is selected, only the audit records from the delete operation of that object type are generated. The data deleted by a full purge import and translatable fields are also included.
    • Complete History: If this option is selected, every update or delete operation generates a copy of the current record and stores it as audit information. The data deleted by a full purge import and translatable fields are also included.

    lastModifiedDateTime Behavior in OData API:

    When lastModifiedDateTime is on the left, including when a Position record is updated or deleted, the $filter should read the audit table in the post entity.

    Position of lastModifiedDateTimeSearch Scope
    LeftBoth entity records and audit log
    RightOnly entity records

    Help portal please check: lastModifiedDateTime and $filter

    See Also

    lastModifiedDateTime and $filter

    Basic Configurations in Object Definition

    Keywords

    $filter, audit table, Position, lastModifiedDateTime, left,  , KBA , LOD-SF-INT-ODATA , OData API Framework , LOD-SF-INT-EC , Employee Central SFAPI & OData Entities , Problem

    Product

    SAP SuccessFactors HXM Core 2305