cancel
Showing results for 
Search instead for 
Did you mean: 

Why CEIL and FLOOR inbuilt function is not working in OPEN SQL??

Pankaj-Kumar
Participant
0 Kudos
1,754

Hello Expert,

Why CIEL/Floor Function is not working . Other is working as expected but these two is creatinng the problem.

Could you please help me here.

Below is my Code -

SELECT  abs( num1 ) AS abs_value,  div(  500, 100 ) AS div_value,
        mod( 500 , 2 ) AS rem_value, round( num2, 2 ) AS round_value,
        ceil( 8.9 ) AS ceil_value
        FLOOR( 2.7 ) as floor_value 
FROM demo_expressions INTO TABLE @DATA(maths_tab).

Below is snap shot of the error -

View Entire Topic
Sandra_Rossi
Active Contributor
0 Kudos

There are so many ABAP rules. The only queries I can make work around numeric literals with decimal places (ABAP 7.52):

CONSTANTS decnum TYPE decfloat34 VALUE '7.4'.
CONSTANTS decnum2 TYPE p DECIMALS 1 VALUE '7.4'.


SELECT @decnum AS decnum
    FROM t000
    INTO TABLE @DATA(decnum_tab1).

SELECT @( CONV decfloat34( '7.4' ) ) AS decnum
    FROM t000
    INTO TABLE @DATA(decnum_tab).

SELECT price, ceil( price + division( 74, 10, 1 ) ) AS ceil_value
    FROM sflight
    INTO TABLE @DATA(ceil_tab).

SELECT price, ceil( price + @decnum2 ) AS ceil_value
    FROM sflight
    INTO TABLE @DATA(ceil_tab2).