Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

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

former_member196331
Active Contributor
0 Kudos

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.

1 ACCEPTED SOLUTION

raymond_giuseppi
Active Contributor

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

3 REPLIES 3

raymond_giuseppi
Active Contributor

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

horst_keller
Product and Topic Expert
Product and Topic Expert

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

former_member196331
Active Contributor
0 Kudos

Ok I will check it.