Skip to Content
author's profile photo Former Member
Former Member

Round off the decimal value

hi,

I need decimal value round off to upper limit

input is 15.67 the output should be 16.

Regards,

deepthi.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • Best Answer
    Posted on Sep 19, 2008 at 11:44 AM
    DATA :
    wa_test(10) TYPE p DECIMALS 2.
    wa_test = '15.67'.
    wa_test = CEIL( wa_test ).
    
    DATA :
    wa_test1(10) TYPE p DECIMALS 2.
    wa_test1 = '15.67'.
    wa_test1 = FLOOR( wa_test1 ).
    
    WRITE: wa_test , wa_test1.
    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 19, 2008 at 11:35 AM

    Use FM

    ROUND

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 19, 2008 at 11:41 AM

    hii

    Fm

    ROUND

    CO_R0_FLOAT_ROUND_RESULT

    you can use following code

    data : wa_val type p decimals 2,
               wa_ans type i.
    
               
             wa_val = '32.22'.
             wa_ans = abs( wa_val ).
             write : / wa_ans.
             wa_val = ceil ( wa_val ).
             write:/ wa_val.

    regards

    twinkal

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 19, 2008 at 11:43 AM

    Round fm will do it

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 19, 2008 at 11:49 AM

    Use this code

    DATA pack TYPE p VALUE '15.67'.

    WRITE pack NO-GROUPING DECIMALS 0.

    This will help

    Regards,

    Prashant

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.