‎2007 May 03 11:17 AM
Hi All,
If decimal part is between 00 and 49, the integer part remains unchanged
(e.g.: 125,49 becomes 125)
If decimal part is greater than 49, the integer part is rounded up
(e.g. 125,50 becomes 126)
How to implement technically in program and Is there is any function for this,
Plz help me with samle code or Guidence
Award points for helpful answers
Thanks
SEK
‎2007 May 03 11:25 AM
Hi raja,
1. simple
2. just copy paste
3.
report abc.
data : p1 type p decimals 2.
data : num type i.
p1 = '125.50'.
<b>CALL FUNCTION 'ROUND'</b>
EXPORTING
DECIMALS = 0
INPUT = p1
SIGN = '+'
IMPORTING
OUTPUT = num
EXCEPTIONS
INPUT_INVALID = 1
OVERFLOW = 2
TYPE_INVALID = 3
OTHERS = 4
.
write num.
regards,
amit m.
‎2007 May 03 11:27 AM
Hi..
Just move it to <b>type Integer</b>.
<b>data:</b>
w_1 type p decimals 2,
w_int type i.
w_1 = '125.49'.
w_int = w_1.
<b>write: w_int.</b>
w_1 = '125.59'.
w_int = w_1.
<b>write: / w_int.</b>
Message was edited by:
Rammohan Nagam
‎2007 May 03 11:31 AM
hi..
move the field to integer.
see this
data :
w_pack type p decimals 2 value '12.50',
w_int type i.
move w_pack to w_int.
write w_int.
regards,
veeresh
‎2007 May 03 11:31 AM