Skip to Content
avatar image
Former Member

How to query on field of composite child entity from SAP PO to Successfactors

Dear All PO Gurus,

I have a scenario where PO pulls the data from Successfactors system through OData protocol but I am not able to pull Delta data as two entities are involved having parent-child relationship. I need to pull few fields from Parent entity("TimeAccount") as well as few fields from Child entity("TimeAccountDetails"). Whenever SAP PO pulls the data every time it returns all the data as it happens for Full Transmission. This is happening because whenever any detail of the child entity gets updated the parent Entity’s lastModifiedDate field also gets updated and it returns all data if we include only lastModifiedDate field of parent in the query.

I tried to include lastModifiedDate field of TimeAccountDetails entity in the query as provided below but its throwing error as “Invalid filter expression: 'timeAccountDetails/lastModifiedDate ge datetime'2018-01-10T15:00:00' and userId eq '17032' ”

Error Query:(Here I want to fetch data only from 1st Jan 2018)$select=userId,startDate,lastModifiedDate,lastModifiedDateTime,endDate,accountType,timeAccountDetails/externalCode,timeAccountDetails/lastModifiedDate,timeAccountDetails/bookingType,timeAccountDetails/bookingDate,timeAccountDetails/bookingAmount,timeAccountDetails/TimeAccount_externalCode&$filter=lastModifiedDate gt datetime'2018-01-01T00:00:00' and timeAccountDetails/lastModifiedDate gt datetime'2018-01-01T00:00:00' and userId eq '17032' &$expand=timeAccountDetails

Working Query: (All data is getting fetched)$select=userId,startDate,lastModifiedDate,lastModifiedDateTime,endDate,accountType,timeAccountDetails/externalCode,timeAccountDetails/lastModifiedDate,timeAccountDetails/bookingType,timeAccountDetails/bookingDate,timeAccountDetails/bookingAmount,timeAccountDetails/TimeAccount_externalCode&$filter=lastModifiedDate gt datetime'2017-11-01T00:00:00' and userId eq '17032' &$expand=timeAccountDetails

Below are some sample data of TimeAccount and TimeAccountDetailsEntity




If anyone has faced similar kind of situation and resolved it please lend a helping hand to resolve the issue. Any help is greatly appreciated.

Thanks in Advance.



Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers