cancel
Showing results for 
Search instead for 
Did you mean: 

Compound Employee-How to retrieve records modified within a date range

former_member143005
Discoverer
0 Kudos

Hi All,

I have a scenario where i need to retrieve employee records from 2 months back. I tried passing the date in last modified on condition like last_modified_on > to_datetime('2023-03-01T00:29:53Z') but i am getting below error.

So i am trying to divide the payload by passing date ranges. I also tried passing fromDate and toDate like below but it was not working.

last_modified_on > to_datetime('2023-03-01T00:29:53Z') and fromDate = to_date('2023-03-01','yyyy-MM-dd') and toDate = to_date('2023-03-15','yyyy-MM-dd')

Please suggest how i can handle this scenario.

Regards

Accepted Solutions (0)

Answers (2)

Answers (2)

S0016260963
Participant

Hi there,

If you're using fromDate and toDate along with last_modified_on, you need to set queryMode=periodDelta for CompoundEmployee.

https://userapps.support.sap.com/sap/support/knowledge/en/2649847

periodDelta will return:

· Changes on effective-dated entities with a validity in the past or with a validity overlapping with the given period and that have happened since the last export

· Changes on effective-dated entities done in the past and where the start date falls into the given period

· Changes on non-effective-dated entities that happened since the last export

So it excludes future-dated records that were input in the past until they become effective in the “current” period (i.e. between fromDate and toDate) – conveniently (and correctly) ignoring the last_modified_on for these records - because entries for the current period could have been input months ago, before the specified last_modified_on date.

Hope this helps.

Cheers,

Alan

mawalker
Discoverer
0 Kudos
This is a fantastic description of the periodDelta query mode. Well done!
daviddasilva
Active Contributor
0 Kudos

Hi,

This SAP help page might help.

It seems like you get this error due to some large dataset being retrieved, or there is some other error happening there.

If the above link does help apply the filters properly, then hopefully that will correct your error.

Kind regards,

David