cancel
Showing results for 
Search instead for 
Did you mean: 

Future Dated record is not working with other query

0 Kudos

Hi,

I'm working on a scneario, where I'm extracting the data from Empjob->Empemployment-->User with below filter " &$filter=userNav/lastModifiedDateTime ge datetimeoffset'${property.modifieddate}' and emplStatusNav/picklistLabels/label eq 'Active' or emplStatusNav/picklistLabels/label eq 'Terminated' or emplStatusNav/picklistLabels/label eq 'Paid Leave' or emplStatusNav/picklistLabels/label eq 'Unpaid Leave' "

This query will extract the only the latest records, though if there is multiple changes to same userid(this is my requirement as well)

Now I need to add additional changes i.e. to include future dated records as well (for new employees as well)

I tried with query "&$filter=emplStatusNav/picklistLabels/label eq 'Active' or emplStatusNav/picklistLabels/label eq 'Terminated' or emplStatusNav/picklistLabels/label eq 'Paid Leave' or emplStatusNav/picklistLabels/label eq 'Unpaid Leave' and userNav/lastModifiedDateTime gt datetimeoffset'2020-09-05T00:00:00.000'&toDate=9999-12-31&toDate=9999-12-31"

this is giving me all the historical records as well future dated, but i need only the last modified records for an employee. please help me with this query.

I also tried in the custom query option as well but no luck.

Accepted Solutions (0)

Answers (1)

Answers (1)

Sriprasadsbhat
Active Contributor
0 Kudos

hello sethu,

Please refer below note and i think fromdate and to date works only on parent entity and not on child entity. Refer #5 in second note.

https://apps.support.sap.com/sap/support/knowledge/en/2148752

https://apps.support.sap.com/sap/support/knowledge/en/2853045

Regards,

Sriprasad shivaram Bhat

0 Kudos

Thanks Sri, even I tried with parent entity but still I'm getting multiple records for each userid.

but i need only the latest record for an employee.

I used below query

"&$filter=emplStatusNav/picklistLabels/label eq 'Active' or emplStatusNav/picklistLabels/label eq 'Terminated' or emplStatusNav/picklistLabels/label eq 'Paid Leave' or emplStatusNav/picklistLabels/label eq 'Unpaid Leave' and lastModifiedDateTime gt datetimeoffset'2020-09-05T00:00:00.000'&fromDate=2020-09-01&toDate=9999-12-31"

any thoughts on this please?