07-09-2009 4:20 PM
Hi Experts,
I need to convert a number into integer.
The number could be of the format 253.235,000 or 253,235.000.
Are there any standard procedures to do the same ?
Regards,
Kris.
07-09-2009 4:24 PM
Hi ,
try this way..
data : number type int4.
w_number = ceil ( 253,235.000 ).
"now the w_number contains integer part..--253,235
see the below statements..
sign ---Plus/minus sign of the argument arg: -1, if the value of arg is negative; 0 if the value of arg is 0; 1 if the value of
arg is positive.
ceil --- Smallest integer number that is not smaller than the value of the argument arg.
floor -
Largest integer number that is not larger than the value of the argument arg.
trunc ---Value of the integer part of the argument arg
frac ---Value of the decimal places of the argument arg
Prabhudas
07-09-2009 4:25 PM
Hi
i think that u can use the function ROUND, have a look
data: a type p value '100.635' decimals 3,
b type i.
CALL FUNCTION 'ROUND'
EXPORTING
DECIMALS = '0'
input = a
IMPORTING
OUTPUT = b
doing ur problem is solved
Regards
08-05-2009 1:15 PM