Application Development and Automation 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: 
Read only

convert string to integr

sreeharirj
Explorer
0 Likes
998

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
Read only

Former Member
0 Likes
958

Hello

FM 'MOVE_CHAR_TO_NUM'

6 REPLIES 6
Read only

Former Member
0 Likes
958

Hi,

Try using this FM 'AMOUNT_STRING_CONVERT'

Read only

Former Member
0 Likes
959

Hello

FM 'MOVE_CHAR_TO_NUM'

Read only

0 Likes
958

Thanx it is working in case of 11,074.00 ,

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

Read only

0 Likes
958

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

Read only

0 Likes
958

Hi Sreehari R J,

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

Regard,

Davide

Read only

Former Member
0 Likes
958

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