‎2007 Oct 24 12:06 PM
Hi,
How do I truncate the decimal part of a netprice whose domain is wert11 with length 11 and decimal places 2.
say I want to convert the value from 10000.00 to 10000.
I don't want the decimal part..1000.00 should be just 1000.
‎2007 Oct 24 12:09 PM
Hi,
define variable like this.
DATA:num TYPE p decimals 0 VALUE '1000.00'.
write:/ num.
DATA:num TYPE p decimals 0 VALUE '1000.76'.
write:/ num.
rgds,
bharat.
‎2007 Oct 24 12:10 PM
data: tvalue type i,
pvalue(6) type p decimal 2 value '100.00'.
tvalue = pvalue.
‎2007 Oct 24 12:15 PM
Hi Abhishek,
do like this
data: v1(5) type p decimals 2 value '10.00',
v2 type i.
v2 = v1.
write v2.<b>Reward for helpful answers</b>
Satish
‎2007 Oct 24 12:15 PM
Hi,
Use below to code to resolve your issue :
data : num1 type p DECIMALS 2 value '100.00'.
data : num2 type i.
num2 = num1.
write num2.Thanks,
Sriram Ponna.
‎2007 Oct 24 12:24 PM
hi,
there'S a special command :
REPORT ztrunc01.
PARAMETERS z(6) TYPE p DECIMALS 2 DEFAULT '10000.00'.
DATA : i(11), d(2).
i = trunc( z ).
d = frac( z ).
WRITE: / z, / i, d.
A.
Message was edited by:
Andreas Mann