Skip to Content
avatar image
Former Member

Looking for Ceiling method

Hello Expert,

Is there a Ceiling method that I can get the smallest whole number greater than or equal to the specified number.

For Example,

I have number 1.2 and 1.9

I want to get the result of 2 for both.

Thanks,

Lena

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Nov 05, 2007 at 03:57 AM

    Hi,

    You can use the CEIL function..

    Ex..

    DATA: V_INPUT TYPE NETPR VALUE '1.2'.

    DATA: V_OUTPUT TYPE I.

    v_ouput = CEIL( v_input ).

    write: / v_output.

    Thanks

    Naren

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 05, 2007 at 03:59 AM

    check this

    DATA: I TYPE I,

    P TYPE P DECIMALS 2,

    P = '3.4'.

    I = CEIL( P ). " 4 - next largest whole number

    regards

    shiba dutta

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 05, 2007 at 04:03 AM

    Hi,

    Try to use the following command,

    CEIL(a)

    Add comment
    10|10000 characters needed characters exceeded