‎2007 Nov 02 9:40 AM
hi all,
Please help me in this issue i am having a value of some 398.98 it should be rounded off to 390and should be sent to Write statement. please suggest on the same
Regards
reddy
‎2007 Nov 02 9:49 AM
Hi,
Use ceil( ) function.
Ex. a = ceil ( 398.98).
wreite:/ a.
Regards,
Subha.
‎2007 Nov 02 9:43 AM
Hi try like this..
var = ceil ( var ).
WRITE 😕 var DECIMALS 0.
Message was edited by:
Perez C
‎2007 Nov 02 9:44 AM
Hi,
Just read last 2 digits of your value using offset, then check if it is greater than 50 then add 1 to your variable otherwise do nothing.
Regards,
Prashant
‎2007 Nov 02 9:48 AM
HI
Either use CEIl or TRUNC for the nuemric field it will remove the decimal place
otherwise use split to get the value
Regards
Shiva
‎2007 Nov 02 9:49 AM
Hi,
Use ceil( ) function.
Ex. a = ceil ( 398.98).
wreite:/ a.
Regards,
Subha.
‎2007 Nov 02 9:51 AM
use
ceil function
for example,
data: pd(5) type p decimals 2 value '5.10'.
pd = ceil( pd ).
write pd.
‎2007 Nov 02 10:04 AM
Hi Reddy ,
You can use the Fm "ROUND".
or
use the ceil function.
DATA: I TYPE I,
P TYPE P DECIMALS 2,
P = 3.6.
I = CEIL( P ). " 4 - next largest whole number
I = CEIL( M ). " 3
Reward If useful.
Regards,
Chitra