Skip to Content
0

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

Jan 27, 2017 at 09:57 AM

66

avatar image

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)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Best Answer
Raymond Giuseppi
Jan 27, 2017 at 10:29 AM
2

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

Share
10 |10000 characters needed characters left characters exceeded
Horst Keller
Jan 27, 2017 at 12:59 PM
2

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

Share
10 |10000 characters needed characters left characters exceeded
Kali Charan Jan 27, 2017 at 02:08 PM
0

Ok I will check it.

Share
10 |10000 characters needed characters left characters exceeded