Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

decimal/comma format Conversion to integer

Former Member
0 Kudos

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.

3 REPLIES 3

Former Member
0 Kudos

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

former_member203305
Active Contributor
0 Kudos

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

Former Member
0 Kudos

NA