cancel
Showing results for 
Search instead for 
Did you mean: 

Supported odata v2 filter functions

gfuchs
Explorer
2,820

Hello friends!

After checking the odata V2 URI-Conventions (https://www.odata.org/documentation/odata-version-2-0/uri-conventions/) i was wondering which of the odata filter - functions are really supported in SAP?
I created a sample project and tried the date functions like "/TestSet?$filter=day(SampleDate) eq 1" but it seems that i don't even get past the gateway.

The error response says: Invalid parametertype used at function 'day' (Position: 1) .

Is there any SAP documentation which lists the supported functions or do i have to use the date-functions differently to get it to work?

Best regards

Accepted Solutions (1)

Accepted Solutions (1)

ChristianKloy
Explorer

Hi,

there is a SAP-Note with some limitations (https://launchpad.support.sap.com/#/notes/1574568), unfortunately not in such detail for the query-options.

There is a tool for testing your odata-service and the supported features: https://github.com/SAP/odfuzz which also contains some known limitations from SAP: https://github.com/SAP/odfuzz/blob/master/doc/restrictions.rst

My proposal would be to add a separate property SampleDateDay and filter with the normal eq, because you have to implement the filter logic by yourself. (Or use CDS-Views).

Answers (1)

Answers (1)

gfuchs
Explorer

Hi Christian

Thanks for your input - separate property seems the only way to go.

In the meantime i also found these two Sap-Notes which also contain some additional information about query-options and filters:

https://launchpad.support.sap.com/#/notes/2330688

https://launchpad.support.sap.com/#/notes/1671893/D