Skip to Content

Why Build in function Ceil is not working In Some Areas?

Hi,
I Seen one problem, Ie. Ceil i am using I need to round of some value.
if value is 3001.02 So, value has to be 3002.00 For this i used like below.
total_po_value = ceil( total_po_value ).

I dont want to move variable to Integer.total_po_value is like bseg-dmbtr.

above code is working in Normal program and Standard Include , But I was Enhancement spot. Here it is not working. Can any one suggest me why it is not working.

ceil.png (133.4 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Jan 27, 2017 at 10:29 AM

    Check the main program (SAPMF05A) attributes, is Fixed point arithmetic set, it shouldn't. If no the field is consider an integer and ceil is not very useful...

    (You could build a small report, input an amount, ceil and write, execute with fixed point arithmetic on/off, results will change.)

    You could consider using a general purpose class to execute the rounding, with the attribute set.

    Regards,
    Raymond

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 27, 2017 at 12:59 PM

    Check, if the built-in function round does not serve your purpose better (you can round up and down with it).

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 27, 2017 at 02:08 PM

    Ok I will check it.

    Add comment
    10|10000 characters needed characters exceeded