‎2008 May 15 2:59 PM
hi,
i'm having a record with value 12345.6 This shall be rounded to 12345 and not to 12346 in output.
is there any function module for this.
pls suggest..
thank u
‎2008 May 15 3:09 PM
There's the ABAP function trunc
DATA: a type p decimals 3,
b type p decimals 3.
p = '1.123'.
a = trunc( p ).a will have value '1.000'.
matt
‎2008 May 15 3:09 PM
There's the ABAP function trunc
DATA: a type p decimals 3,
b type p decimals 3.
p = '1.123'.
a = trunc( p ).a will have value '1.000'.
matt
‎2008 May 15 3:13 PM
thank u for ur reply..
but in output i don't need any decimals again.
can u tel me the solution.
thanks.
‎2008 May 15 3:22 PM
Hi sunny,
Just change the type of the variable 'a' to integer.
DATA: A TYPE I,
B TYPE P DECIMALS 3.
B = '1.742'.
A = TRUNC( B ).
WRITE: A.Regards,
Isaac Melendez
‎2008 May 15 3:25 PM