Skip to Content
avatar image
Former Member

Need Help for Rounding the number from 23.9080 to 23 in OO abap

Hi,

In webdynrpo method WDDOINIT method i want to compute the calculation for the two or three field values by multiply and subtract and finally i have to round of the value 23.980 to 23.

how to write a code. i tried with round it is not accepting pl help to how to write in OO abap.

Thanks in advance.

sri

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    May 14, 2008 at 05:21 PM

    Hello,

    Try using the TRUNC function like this:

    data:
      lv_test type p decimals 9 value '23.9080',
      lv_round type i.
    
      lv_round = trunc( lv_test ).
    

    Regards,

    Add comment
    10|10000 characters needed characters exceeded