on ‎2022 Apr 06 12:38 PM
We've created a CDS that is being exposed throw oData (@OData.publish: true) as an analytical query for a Fiori Analytical application.
One of the fields exposed is an INT4 data type value as it is the result of the DATS_DAYS_BETWEEN built-in function.
However, when running the Analytical App and adding this field to the results, we are having a frontend error stating "Negative values not allowed for integer fields"

Same happened when running the query on RSRT
Have you ever faced this issue? As a workaround I'm thinking on using some sort of casting on the INT4 returned by the function, but turning this into a decimal does not sounds as the best solution.

Any ideas?
Thanks in advance
Request clarification before answering.
As a workaround, I've been able to cast to a CHAR datatype, as the field is going to be used as a dimension, not a measurement, and it is working fine in that way.
Only issue is on sorting, as data will be sorted by a CHAR basis, not a numeric. But at least its something.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I also faced the same problem. I did a cast to quan. That did the trick for me:
cast (DATS_DAYS_BETWEEN( coalesce( Versand.CreationDate, SDIA.CreationDate ), SDIA.CreationDate) as abap.quan(10, 0 ) )
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 30 | |
| 27 | |
| 21 | |
| 4 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.