SAP Knowledge Base Article - Public

2674596 - Query of Position Data not returning all information - OData API

Symptom

Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental.

In this document we will review issues in the context of the Position Entity and OData API. The Position Entity is an MDF Object.

Occasionally, when running OData API Queries on the Position entity, the expected information is not returned or is missing. Position Replication can be seen in the folowing Replication Packages:

  • EC to ERP Employee Data and Org Assignment Replication 
  • EC to ERP Generic Object Replication 

Environment

  • BizX
  • SuccessFactors

Reproducing the Issue

1. Create Query:

  *Note: for demonstrative purposes we are using the client Postman*

   Position Query set up as below (this is an example):

   REQUEST:

   https://api12preview.sapsf.eu/odata/v2/Position?$filter=lastModifiedDateTime%20gt%20datetimeoffset%XXXX-XX-XXTXX:XX:XZ

2. View Results:

   The majority of the employees data is missing. A sample of the response returned from our Sales Demo below:

   RESPONSE:
   <title type="text">Position</title>
   <id>https://api12preview.sapsf.eu/odata/v2/Position</id>
   <updated>XXXX-XX-XXTXX:XX:XXZ</updated>
   <link rel="self" title="Position" href="Position"></link>
   </feed>

   As you can see from above, there is no Position information being returned e.g. employee ID

Cause

  • This is due to a missing permissions issue.
  • The API User running the query does not have the correct permissions.

Resolution

1) Enable the permission 'Admin access to MDF OData API':

   Admin Center --> Manage Permission Roles --> Select API User Group (may be differently named in customer instances) --> Permission
   --> Select Metadata Framework --> Enable Admin access to MDF OData API:

   EnableMDF_Edit.PNG

See Also

2547241 - Custom MDF: Cannot query data for pending records via API

Keywords

OData, MDF, Position, OData API, Position Entity , KBA , LOD-SF-INT-ODATA , OData API Framework , LOD-SF-INT , Integrations , LOD-SF-INT-MDF , Metadata Framework API (MDF) , Problem

Product

SAP SuccessFactors HCM Suite all versions