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: 

Rounding Packed decimals...

Former Member
0 Kudos

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

former_member583013
Active Contributor
0 Kudos

Do this...


data: test type p.

test = '2999.97'.

test = ceil( test ).

write test.

Greetings,

Blag.

4 REPLIES 4

JozsefSzikszai
Active Contributor
0 Kudos

hi Sapsudha,

use the FM ROUND.

ec

Former Member
0 Kudos

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

former_member583013
Active Contributor
0 Kudos

Do this...


data: test type p.

test = '2999.97'.

test = ceil( test ).

write test.

Greetings,

Blag.

Former Member