SAP Knowledge Base Article - Public

3354249 - NominationTarget Odata Entity is returning different result count and count operation returns a number greater than 0

Symptom

Customer have performed below query and count operation returns a number greater than 0 

https://apixxpreview.sapsf.com/odata/v2/NominationTarget/$count

But when we fetch the data from below API they get different or less count

https://apiXXpreview.sapsf.com/odata/v2/NominationTarget?$format=json

 

 

Environment

  • SAP SuccessFactors HXM suite
    • Integrations 
      • OData API

Cause

We can not use count with entity NominationTarget,  This is expected behavioral from system.

Resolution

You can use IC job to get the exact count with NominationTarget

To fetch Nomination Target entity data, you need to form a query like below and you will then be able to retrieve all the valid data-

https://apiXXpreview.sapsf.com/odata/v2/User?$format=json&$select=nominationNav&$expand=nominationNav

You can use $inlinecount that will give count.

$inlinecount- This will return the total number of records as part of the response payload. We can extract the number from the field <count></count>. If you execute the given example, in the payload you will find that in the field <count>, the value is returned as 2, meaning there are total 2 Suppliers as part of the service.


https://apiXXpreview.sapsf.com/odata/v2/NominationTarget?$inlinecount=allpages  

See Also

NominationTarget

Keywords

NominationTarget, count, no records, blank results, Succession, oData, Integration, Center, API, Reference, Guide, Dictionary, MDF, Nomination, successorNav, nominationId, nominationType, nomineeHistory, incumbent  , KBA , LOD-SF-INT-ODATA , OData API Framework , LOD-SF-INT-EC , Employee Central SFAPI & OData Entities , Problem

Product

SAP SuccessFactors HXM Core 2305 ; SAP SuccessFactors HXM Suite 2305