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

Rounding Packed decimals...

Former Member
0 Likes
856

Hi All,

I've two fields (type P) with values 3000.00 & 2999.97

While comparing these two fields I want to round the second field..... any ideas please.....

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
798

Do this...


data: test type p.

test = '2999.97'.

test = ceil( test ).

write test.

Greetings,

Blag.

Hi All,

I've two fields (type P) with values 3000.00 & 2999.97

While comparing these two fields I want to round the second field..... any ideas please.....

4 REPLIES 4
Read only

JozsefSzikszai
Active Contributor
0 Likes
798

hi Sapsudha,

use the FM ROUND.

ec

Read only

Former Member
0 Likes
798

Hi,

do like this

data: v1(10) type p decimals 2 value '101.59',
      v2 type i.

v2 = v1.

write v2.

<b>Reward points for helpful answers</b>

Satish

Read only

Former Member
0 Likes
799

Do this...


data: test type p.

test = '2999.97'.

test = ceil( test ).

write test.

Greetings,

Blag.

Read only

Former Member
0 Likes
798