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 Character to Integer value

Former Member
0 Likes
571

Dear All ,

Any idea how can i convert the values 1,342,760 (in character ) to Interger value ??

Because i want to sum the value ...

THanks.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
523

Hi Olrang,

check this code.

PARAMETERS : c TYPE char10 DEFAULT '1,234,5670'.

DATA: i TYPE i.

REPLACE all occurrences of ',' IN c WITH ''.

i = c.

WRITE: i.

thanks,

Sakthi sri.

3 REPLIES 3
Read only

former_member194669
Active Contributor
0 Likes
523

Use Function module MOVE_CHAR_TO_NUM

a®

Read only

Former Member
0 Likes
523

If you able to remove ',' then

DATA ABC(10) TYPE C VALUE '1342760'.

DATA IN TYPE I.

IN = ABC.

WRITE IN.

Remember If ABC has any char other then 1234567890 , System will through dump error.

Read only

Former Member
0 Likes
524

Hi Olrang,

check this code.

PARAMETERS : c TYPE char10 DEFAULT '1,234,5670'.

DATA: i TYPE i.

REPLACE all occurrences of ',' IN c WITH ''.

i = c.

WRITE: i.

thanks,

Sakthi sri.