Update: the numeric functions documentation is correct.
The code floor(fieldname)
will convert a DEC(X,Y)
(where Y > 0
) into a DEC(X,0)
. Essentially, floor
strips the decimal places from the field without changing its type.
On the other hand, ceil(fieldname)
will round up to the nearest integer and convert a DEC
to an INT
If you want to get an integer from the floor
function, then you must call ceil(floor(fieldname))
On a NetWeaver system, you should be able to find the CDS View demo_cds_sql_functions_num
and program/report demo_cds_sql_functions_num
that help demonstrate these concepts. You can use the debugger to view the report's variable result
and confirm my findings.