Application Development and Automation 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: 
Read only

Multiply without ROUNDING

Former Member
0 Likes
724

Hi,

I have a value coming in on an IDoc e.g. 100.12355. Due to factoring this is divided by 10 to 10.01236 (standard rounding has the 6 at the end as it's a 5 decimal field).

How can I do this without rounding i.e. I need da value of 10.01235 to appear? Do i move it to a float field, then divide, and move back? Thanks

Colm

3 REPLIES 3
Read only

former_member191735
Active Contributor
0 Likes
554

Did you ever try doing the same thing that you said (moving to float and devide)

Read only

former_member156446
Active Contributor
0 Likes
554

if its a custom code in the attributes of the program , there is a check box "fix point arithmetic" if you uncheck that will not round the values... its just an option it might break some other calculation.

Read only

0 Likes
554

We've decided to catch this at the earliest point and not round at the start of the program so that we have the correct figure before doing any calculations later on....still a problem though with the following;

e1bp1093_0 LIKE e1bp1093_0,

exchrate_list LIKE bapi1093_0 OCCURS 0 WITH HEADER LINE.

we're moving e1bp1093_0-exch_rate to exchrate_list-EXCH_RATE.

So the IDoc has 6 digits coming in e.g. 5.435818 and we're moving to a 5 digit currency field so it goes to 5.43520 with standard rounding. Is there anyway to get it to be 5.43581 (i.e. just chop off any additional digits past 5)? Thanks in advance