on 01-23-2018 2:14 AM
Hey All,
Is there a way to connect to an SF EC using an odatav4 adapter?
I need to retrieve data, apply filter conditions and expand on multiple entities using odata apis. Using odatav2 this is really tedious since odatav2 does not support filtering on child elements. Odatav4, however, supports filtering on child entities and navigational entities along with lamda operation support like 'And' and 'All'.
All said and done, how do we actually use odatav4 to retrieve data from SF EC?
What will the url be? I am sure it's not - https://host-url.sapsf.com/odata/v2
Any help will be highly appreciated. Thank you.
Kriba
I have only seen SuccessFactors Employee Central having OData v2. If the server only has V2, I don't think you can simply use a V4 adapter with it.
Regarding filtering on child element, you can achieve it on OData v2 too by using following filter format, it is not specific to only V4:-
$filter=childElement/childField eq 'value'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Oh! I was under the impression that when you are querying a parent entity and then you navigate from the parent entity to a child entity and query few parameters on the child entity using filter conditions, it doesn't work.
For example-
So in this case I am querying the Parent entity and navigating towards the child entity and the filter condition is on the child entity. I have tried a couple of time with this and it doesn't work. It fetches all the records irrespective of the filter condition.
Hi Kriba
Not sure why it doesn't work for you, but such filtering on child entity fields work perfectly fine for me. Here are some screenshots from Postman:-
This is a query on parent entity WfRequest, with a filter on child entity's status field
https://<host>:443/odata/v2/WfRequest?$filter= wfRequestStepNav/status eq 'PENDING'&$expand=empWfRequestNav,wfRequestStepNav,empWfRequestNav/wfConfigNav
With status as PENDING, there are results returned.
When I change the value of the query field for status to a random value, the result set is empty.
This indicates the the filter condition on the child entity is being evaluated in the query call.
Hi Kriba
I had a further check on this with other entities, and for the SF EC OData APIs which is on V2, it only works when the navigation is to a single entity instead of a collection. In other words, if the relationship is 1:1, then it works, if it is 1:N, then it does not.
Regards
Eng Swee
Hi Eng/Kriba,
And another (not so good) way to make it work is to expose the same property at the header level as well, provided the data model permits the same.
BR.
Hey Eng,
Ah yes. That makes sense. And that's why it wasn't working before. I was using a top down approach to navigate from PerPerson to PerEmail or EmpEmployment. Now, the problem with that is that the top down approach always gives you a 1:N cardinality and hence it didn't work. For example - one person having multiple Email or multiple Employment records.
I recently changed all the odata calls to use the Bottom up approach navigating from EmpJob or EmpEmployment to PerPerson. This is always a 1:1 cardinality and the odata filtering worked like a charm!!
Thank you Eng and Ankit for your valuable comments
Kriba
you should check these doc :
https://help.sap.com/doc/2d1d6fcc4eae4db8b9bbd3103baee1c7/2205/en-US/HXMSuiteODataAPIRefGuideV4.pdf
it's specific to ODATA V4 and it contains URLs for each datacenter
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Kriba and @engswee.yeoh,
I am new to ODATA and SFSF adapter. Could you please guide me (on useful materials your suggestions etc) on how I can extract delta changes to an employee from Successfactors using SfSF adapter or ODATA adapter and send to an external partner. I see many blogs asking to use operations modeler but blogs only talks about querying single entity. Will operations modeler allow me to formulate a query to extract data based on filters on multiple entities and can the same query be posted into SAP PO Query string in the adapters ?
Thanks for your suggestions.
Anu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.