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

Reducing decimal digits

Former Member
0 Likes
410

Hi Experts!!

I have simple doubt.

I have a variable having 4 digits after decimals..

I want it to store it in a variable with 2 decimal digits only.

How can I do this without much numerical manipulation.

Thanks in advance..

Prabhas

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
388

Hi,

You can do as below :


Data : var1 type p decimals 4 value '10.0000',
          var2 type p decimals 2.

var2 = var1.

write : / var2.

Thanks,

Sriram Ponna.

2 REPLIES 2
Read only

Former Member
0 Likes
388

Hi,

declare a variable

data temp type p decimals 2.

temp = variable "(ur var with 4 deci places).

write temp.

rounding ll also be done automatically

Cheers,

Will.

Read only

Former Member
0 Likes
389

Hi,

You can do as below :


Data : var1 type p decimals 4 value '10.0000',
          var2 type p decimals 2.

var2 = var1.

write : / var2.

Thanks,

Sriram Ponna.