SAP Knowledge Base Article - Public

3774633 - Unable to fetch all pending workflow positions from position entity - OData API SuccessFactors

Symptom

  • OData query to Position entity with recordStatus=pending and $expand=wfRequestNav does not return all positions that are pending for workflow approval.
  • Some positions known to be in pending workflow status are missing from the API response.

Environment

SAP SuccessFactors HCM Suite

Reproducing the Issue

  1. Run an OData GET on the Position entity with parameters similar to: $select=code,wfRequestNav/status,wfRequestNav/createdBy,wfRequestNav/wfRequestId&$expand=wfRequestNav&recordStatus=pending
  2. Review the response and observe that only a subset of pending workflow positions is returned, while others expected to be pending are missing.

Cause

If the OData request date is not between a position record’s effective start date and effective end date, that position record is filtered out by effective dating and will not be returned.

Resolution

  1. Verify the effective start date and effective end date of the target position records in the application.
  2. Re-run the Position OData query using the $asOfDate parameter set to a date that falls within the effective range of the records you want returned (for example: add &$asOfDate=YYYY-MM-DD to the request).
  3. If positions are returned only when $asOfDate matches their effective interval, adjust your integration to dynamically set $asOfDate (for example, to the intended business date) so that effective-dated records are included as expected.
  4. For reference on using $asOfDate with MDF/effective-dated entities, refer to: asOfDate for MDF and effective-dated entities.

See Also

SAP Help Portal - asOfDate for MDF and effective-dated entities

Keywords

odata, position, wfrequestnav, pending, recordstatus=pending, effective dating, effective start date, effective end date, asofdate, missing positions, workflow, employee central, mdf, api query, expand , KBA , LOD-SF-INT-EC , Employee Central SFAPI & OData Entities , Problem

Product

SAP SuccessFactors HCM Suite all versions