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

Type P Decimals 4 Wrong value

former_member194669
Active Contributor
0 Likes
1,237

Here is following code i have in pricing routine. But after division values coming wrongly in type P variable


data: v_p type p decimals 4.
data: v_c(20) type c value '72.50'.
v_p = v_c / 1000.

After this I am getting V_P as 0.0007

I am expecting the value of V_P is 0.0725

Any Info

3 REPLIES 3
Read only

Former Member
0 Likes
764

Hi,

Check "fixed Point arithmetic" property in program attributes.

Regards

Vinod

Read only

former_member194669
Active Contributor
0 Likes
764

Its already in checked mode

Read only

0 Likes
764
REPORT  Z_MAT_PROGRAM.

data: v_p type p decimals 4.
data: v_c(20) type c value '72.50'.
v_p = v_c / 1000.

write : v_p

I just copy pasted this code....I get the result as 0.0725. But when i unchecked the "Fixed Point Arithematic" in program attributes the value displays as 0.0007

Edited by: Mishra.Manas on May 5, 2010 7:08 AM