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: 

convert string to integr

sreeharirj
Explorer
0 Kudos

error : Unable to interpret " 1 400.000 " as a number.

How can i convert a string like '1400.000' in to a number format.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hello

FM 'MOVE_CHAR_TO_NUM'

6 REPLIES 6

Former Member
0 Kudos

Hi,

Try using this FM 'AMOUNT_STRING_CONVERT'

Former Member
0 Kudos

Hello

FM 'MOVE_CHAR_TO_NUM'

0 Kudos

Thanx it is working in case of 11,074.00 ,

but i want to convert string 11,074.10 to integr.

0 Kudos

In that case you will lose the decimal part which .10

You can simpy use move function to do this.

For example, say two variables x and z. Check the below example and see if this what you are expecting to have?

Data : x type c length 8 value '11074.10 ',
                     z type i.

move x to z.

Write : z.

Thanks,

Babu Kilari

0 Kudos

Hi Sreehari R J,

after convert the string with FM 'MOVE_CHAR_TO_NUM' move the result number to an integer data.

Regard,

Davide

babu_kilari4
Active Contributor
0 Kudos

Have you searched in SDN before with the same error message. Definitely you would have gotten some help.

Please do that before posting.

Thanks,

Babu Kilari