SAP Knowledge Base Article - Public

2795205 - OData API: The behavior of the SuccessorNav field and filtering

Symptom

In this document we shall discuss the successorNav field, from the Position Entity, in the context of an OData API GET Request. 

OData APIs from Succession enable customers to build custom extensions on standard SuccessFactors application Succession Planning. The most common need for customers is the ability to create alternate visualizations on top of the succession data.

In certain use-cases, customers may wish to apply a filter on the successorNav field - e.g. successorNav/status eq 1. The requirement is to just return the status 1 employees. However, this is returning employees with status equal to 3.

Environment

  • BizX
  • Integration Center
  • Postman

Reproducing the Issue

  1.  Enter a sample GET query in Postman or Integration Center:

    https://apisalesdemoXX.successfactors.com/odata/v2/Position?$select=code,effectiveStartDate,company,createdDate,successorNav/status&$expand=successorNav&$filter=successorNav/status eq 1&$orderby=code,effectiveStartDate 
       
  2. View the result - employees with status not equal to 1 are being returned:

    <entry>
    <id>https://apisalesdemoXX.successfactors.com:443/odata/v2/Successor(XXXX)</id>
    <title type="text"></title>
    <updated>2019-05-01T14:22:53Z</updated>
    <author>
    <name></name>
    </author>
    <link rel="edit" title="Successor" href="Successor(XXXX)"></link>
    <category term="SFOData.Successor" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"></category>
    <content type="application/xml">
    <m:properties>
    <d:status m:type="Edm.Int32">3</d:status>
    </m:properties>
    </content>
    </entry>

Cause

  • This behavior is as designed, $filter cannot filter the value in the expand navigation.
  • In this case, there are statuses equal to 1 and 3 in the expand Nav, all successor will be returned not only status eq 1.

Resolution

  1. Expected Behavior:
        
       In Odata v2 service the filter option works only at root entity level. It does not work on expanded entities

  2. Raise an Enhancement Request:

       If having this feature is important for your company, we kindly ask you submit an Enhancement Request on the community.
       We welcome inputs from customers to improve the functionality of our products.
       All enhancement requests are reviewed by our Product Management team and, if successful, are developed and implemented in a future product release.

       Details on this here:
       2281168 - How to create Enhancement Request for Successfactors Integrations

See Also

2633494 - odata v2 version is not supporting filter option on the expanded entities

2281168 - How to create Enhancement Request for Successfactors Integrations

Keywords

  • OData
  • successorNav
  • successorNav/status
  • Position
, KBA , LOD-SF-INT-ODATA , OData API Framework , LOD-SF-INT , SF Integrations - EC Payroll, Boomi/ HCI, API , LOD-SF-SCM-API , Webservices & API's , Problem

Product

SAP SuccessFactors HCM Core all versions