‎2006 Jul 11 2:30 PM
Hi friends,
I need to write the quantity field without decimal place. for example the below code result is 5.000 , but I need to the result as 5.
data labst like mard-labst.
labst = 5.
write labst.
Pls give me a solution
‎2006 Jul 11 2:31 PM
‎2006 Jul 11 2:31 PM
DATA labst LIKE mard-labst.
labst = 5.
WRITE labst DECIMALS 0.
-Kiran
‎2006 Jul 11 2:32 PM
Hello,
U can try like this.
data labst like mard-labst.
labst = 5,000.
write labst no-decimals.
If useful plz reward points.
Rgerads,
Vasanth
‎2006 Jul 11 2:32 PM
‎2006 Jul 11 2:34 PM
‎2006 Jul 11 3:05 PM
hi Karthik,
Just move that variable to an integer variable ...
i.e,
data : v_value type p decimals 3 value '34.000',
v_res type i.
v_res = v_value.
‎2006 Jul 11 2:35 PM
hi Kalimuthu,
You can write in two ways.
write amount no-decimals.
or declare a variable of type p with decimals as 0, assign the amount to this variable and write this variable. it will be written without decimal places.
data: var1 type p decimals 3.
var1 = amount.
write:/ var1.
Hope this is useful.
Regards,
Richa
‎2006 Jul 11 3:15 PM
Hi,
Check this code..
REPORT ZTEST .
data: float type p decimals 3,
int type i.
float = '5.000'.
int = floor( float ) .
write int.Regards
vijay