Skip to Content
avatar image
Former Member

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

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Nov 20, 2017 at 04:40 PM

    Hi,

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

    Thanks,
    Janos

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 22, 2017 at 05:14 AM

    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,

    Add comment
    10|10000 characters needed characters exceeded