cancel
Showing results for 
Search instead for 
Did you mean: 

OData: Datetime filter to select option (high and low)

Former Member
0 Kudos

Hi All,

I am trying to fetch values in between the specified range. In the query if I pass as LT and GT then I am unable to fetch the range since only the initial parameter is being selected to fetch the records.

I have googled alot but couldnt find solution for this.

Since this is a standard component where I am trying to pass the value and since I cannot edit the values, I am posting the question here.

My service: Accounts(AccountID='0100000342')/PaymentDocuments?$filter=(ExecutionDate gt (datetime'2016-10-01T00:00:00') or ExecutionDate lt (datetime'2016-12-01T00:00:00'))

Please guide.

Thanks,

Srihari.

Accepted Solutions (0)

Answers (2)

Answers (2)

Joseph_BERTHE
Active Contributor
0 Kudos

hello,

In addition of janos.dezsi remove ( and ) from your query :

Accounts(AccountID='0100000342')/PaymentDocuments?$filter=ExecutionDate gt (datetime'2016-10-01T00:00:00') or ExecutionDate lt (datetime'2016-12-01T00:00:00')

Reagrds,

janosdezsi
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

Please check KBA 2370618 - SAP Gateway $filter value not handed over correctly to the backend

Thanks,
Janos