‎2009 Jun 04 10:35 AM
i have the number type p decimals 2
I want that when tnat for 2 I make a commercial rounding.
es. 1,99 ---> 2 .
there is an istraction.
‎2009 Jun 04 10:42 AM
hi
try to use
'CEIL'(Smallest integer value ) 'FLOOR'(Largest integer value) and 'TRUNC'(Integer part of argument )
like
data: t1 type p decimals 2 value '1.99',
t2 type i..
t2 = ceil(t1).
t2 = floor(t1).....
try this link - http://help.sap.com/saphelp_nw70/helpdata/en/fc/eb3316358411d1829f0000e829fbfe/frameset.htm
Edited by: mayank jain on Jun 4, 2009 11:43 AM
Edited by: mayank jain on Jun 4, 2009 11:47 AM
Edited by: mayank jain on Jun 4, 2009 11:53 AM
‎2009 Jun 04 10:37 AM
Hi
Please try ROUND_UP for rounding to next integer and ROUND_DOWN to round to previous integer.
Regards
Gaurav.
‎2009 Jun 04 10:37 AM
Use CEIL() function
data: f1 type p decimals 2 value '1.99'.
f1 = ceil( f1 ).
write:/ f1.Pl. search , you'll find lot of threads on this
‎2009 Jun 04 10:42 AM
hi
try to use
'CEIL'(Smallest integer value ) 'FLOOR'(Largest integer value) and 'TRUNC'(Integer part of argument )
like
data: t1 type p decimals 2 value '1.99',
t2 type i..
t2 = ceil(t1).
t2 = floor(t1).....
try this link - http://help.sap.com/saphelp_nw70/helpdata/en/fc/eb3316358411d1829f0000e829fbfe/frameset.htm
Edited by: mayank jain on Jun 4, 2009 11:43 AM
Edited by: mayank jain on Jun 4, 2009 11:47 AM
Edited by: mayank jain on Jun 4, 2009 11:53 AM
‎2009 Jun 04 10:46 AM
DATA : INT TYPE I,
DEC TYPE P Decimals 2.
DEC = '1.99'.
INT = DEC.
WRITE:/ DEC,INT.
DEC = '1.49'.
INT = DEC.
WRITE:/ DEC, INT.
‎2009 Jun 04 11:13 AM
DATA: I TYPE P,
J TYPE P.
I = '12.712324'.
WRITE: / I ROUND 0 DECIMALS 4.
J = '12.336216'.
WRITE: / j ROUND 0 DECIMALS 4.