2018 Dec 10 9:49 AM
Hello community,
I'm trying to set up an oData-Service and have troubles with using date fields from a table.
1. I have imported the DDIC Structure with Sdate (Datatype DATS)

2. Field Sdate is mapped to EDM.DateTime

3. Error in Gateway Client --- Format invalid when calling GET_ENTITY_SET

Obviously the date is not formatted correctly.
But why?
Best regards and many thanks in advance
Johannes Sonner
Hello community,
I'm trying to set up an oData-Service and have troubles with using date fields from a table.
1. I have imported the DDIC Structure with Sdate (Datatype DATS)

2. Field Sdate is mapped to EDM.DateTime

3. Error in Gateway Client --- Format invalid when calling GET_ENTITY_SET

Obviously the date is not formatted correctly.
But why?
Best regards and many thanks in advance
Johannes Sonner
2018 Dec 10 10:29 AM
Did you search and read a discussion such as Rules for OData datetime properties, if yes what is the content of the field (use Request/Response Daten)
2018 Dec 10 12:28 PM
Hi,
yes i checked it.
Rule 3
The nullable attribute can only be correctly evaluated if the backend date contains '00000000' as a value. ABAP date values containing spaces (this is allowed unfortunately) will not be treated as null, but also not be able to convert to an edm.datetime - you will get a runtime error from the server.
Regarding Rule 3: I dont know how I could check the request/response data because it does'nt even hit the set breaktpoint in the GET_ENTITY_SET function. In the table itself (with se16) I cannot see any spaces.
And Rule 5 is exactly what I did. The DATS Element of the table is directly used for the entity defintion.
I'm very confused because DATS is YYYYMMDD but it is shown in the error log as DD.MM.YY
Best regards
Johannes