on 2024 May 27 12:09 AM
Hello Folks,
I am calling on-premise ODATA in SAP CAP ( via destination) and got the issues while using filter on Edm.DateTimeOffset property
Following are steps I have done
1 Imported the edmx via cds import
2 Created the wrapper Entity set in the SAP CAP service
3 In on handler call the function cds.connect.to to read data
I tried following URL but got error
URL | Issue |
EntitySet?fitler=someProperty eq '00206566' and (startDate gt datetime 2021-11-25T00:00:00 and endDate lt datetime 2021-11-26T00:00:00 ) | Property 'datetime' does not exist in type |
$filter=someProperty eq '00204966' and (startDate ge 2021-11-25T00:00:00 and endDate le 2021-11-25T00:00:00) | The type 'Edm.DateTimeOffset' is not compatible to 'Edm.Date' |
In on-premise system following URL works perfectly
EntitySet?$filter=someProperty eq '00204966'and startDate ge datetime'2021-11-25T00:00:00' and endDate le datetime'2021-11-25T00:00:00' & $format=json
Kindly let me know
Thanks in advance
P.S Please make a note that am using odata v4 in SAP CAP and on-premise ODATA is v2. Also data type of date field is Edm.Date with precision 7 in on-premise odata but it is Edm.DateTimeOffset in SAP CAP odata metadata
seems you are missing ' in your odata url startDate gt datetime 2021-11-25T00:00:00
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
66 | |
10 | |
10 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.