cancel
Showing results for 
Search instead for 
Did you mean: 

C4C odata filter date range

dmonta
Explorer
0 Kudos
402

Hello @C4C community,

I'm not understanding what's the issue rith this odata call on the ticket object:

https://myXXXXXX.crm.ondemand.com/sap/c4c/odata/v1/c4codataapi/ServiceRequestCollection?$filter=Crea... ge datetimeoffset'2024-01-01T00:00:00Z' and CreationDateTime le datetimeoffset'2024-12-31T00:00:00Z' and CHIUS_INT_KUT ge datetimeoffset'2024-01-01T13:30:00Z' and CHIUS_INT_KUT le datetimeoffset'2024-12-31T00:00:00Z'

response payload: 500 internal server error

<?xml version="1.0" encoding="utf-8"?>
    <code>ERROR</code>
    <message xml:lang="en">Error in filter System Query, Operation failed::Expression can not converted into ABAP select options</message>
</error>

The following ones are working correctly:

https://myXXXXXX.crm.ondemand.com/sap/c4c/odata/v1/c4codataapi/ServiceRequestCollection?$filter=Crea... ge datetimeoffset'2024-01-01T00:00:00Z' and CreationDateTime le datetimeoffset'2024-12-31T00:00:00Z'

 

https://myXXXXXX.crm.ondemand.com/sap/c4c/odata/v1/c4codataapi/ServiceRequestCollection?$filter= CHIUS_INT_KUT ge datetimeoffset'2024-01-01T13:30:00Z' and CHIUS_INT_KUT le datetimeoffset'2024-12-31T00:00:00Z'

Both field are datetime: CreationDateTime is a standard field, while the other one is a custom field created with adaptation mode.

Any advice will be appreciated.

Best regards,

DM

dmonta
Explorer
0 Kudos

https://myXXXXXX.crm.ondemand.com/sap/c4c/odata/v1/c4codataapi/ServiceRequestCollection?$filter=(Cre... ge datetimeoffset'2024-01-01T00:00:00Z' and CreationDateTime le datetimeoffset'2024-12-31T00:00:00Z') and (CHIUS_INT_KUT ge datetimeoffset'2024-01-01T00:00:00Z' and CHIUS_INT_KUT le datetimeoffset'2024-12-31T00:00:00Z')

Brackets were mandatory...

Accepted Solutions (0)

Answers (0)