SAP Knowledge Base Article - Public

2966355 - Unable to fetch data on EmpTimeAccountBalance - OData API

Symptom

You are querying EmpTimeAccountBalance, however you face one of these issues below:

  1. Error below is returned in the response:
    "must provide userId and timeAccountType in $filter"

  2. No data at all is returned in the response.

Environment

  • SAP SuccessFactors HXM Suite
    • OData API

Resolution

For error 1, you always need to include a filter for "userId" and "timeAccountType" in the API request. As stated in Employee Central OData API: Reference Guide, "when you are using this entity in middleware or integration center, bulk data abstraction is not possible because UserID is a mandatory field and giving all UserID in the filter criteria will lead to a large query that would result in a failure.".

For error 2, please check the RBP of the API user performing the queries. It is mandatory for the API user to have the permission below in order to properly obtain data from EmpTimeAccountBalance:

  • Employee Central API > Employee Central HRIS OData API (read-only)

If your API user only have "User Mode (Query Only)" API permissions, then no data will return from EmpTimeAccountBalance as an expected behavior.

See Also

SAP SuccessFactors Employee Central OData API: Reference Guide

Keywords

EmpTimeAccountBalance, time account balance, balance, api, odata, query, call, request, successfactors, success factors, time account, TimeAccount, sf, blank, null, empty, response, payload, filter, selection , KBA , LOD-SF-INT-EC , Employee Central SFAPI & OData Entities , Problem

Product

SAP SuccessFactors HCM Suite all versions