‎2008 May 16 7:07 AM
hi gurus,
is there any data type which rounds to the next integer.
ie.. a type i,
a = 23/11.
now the result stored in a = 2.
but i want the result to be rounded of to a = 3.
how can i acheive it.
thanks in advance,
chaitu
‎2008 May 16 7:10 AM
Hi,
you can work with mod.
data: b type p decimals 2.
a = 23/11.
b = mod 23/11.
if b > 0.
add 1 to a.
endif.
Regards
Nicole
‎2008 May 16 7:10 AM
Hi,
you can work with mod.
data: b type p decimals 2.
a = 23/11.
b = mod 23/11.
if b > 0.
add 1 to a.
endif.
Regards
Nicole
‎2008 May 16 7:20 AM
Hi,
U can declare that variable as TYPE P (Packed number) which will round the number.
Try this.......
‎2008 Jul 09 6:41 AM