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

how to convert character string into numeric string

Former Member
0 Likes
805

hai gurus can any one tell me the funciton modules to convert the character string into numeric string

regards

afzal

6 REPLIES 6
Read only

Former Member
0 Likes
751

Hi afzal,

Declare a variable of type N.

Assign the values of character string to this new variable

Regards

Arun

Read only

Former Member
0 Likes
751

i think it is not possiable.

manually write codeing.

Read only

sukhbold_altanbat
Active Participant
0 Likes
751

Hi Mohammad,

Try this function module: CATS_ITS_MAKE_STRING_NUMERICAL

Regards,

Sukhee

Read only

Former Member
0 Likes
751

Hii Afzal,

Try this code..

<b>CATCH SYSTEM-EXCEPTIONS conversion_errors = 1.

MOVE text TO amount.

ENDCATCH.

IF sy-subrc EQ 1.

*not numeric</b>

Or use this FM

<b>NUMERIC_CHECK</b>

It returns a char data type for values other than numeric

and a numc data type for numeric values.

Hope it helps you...

Regards,

Ashish

Read only

Former Member
0 Likes
751

hi check with the following code,,,declare a variable of type string, and a number.

assign a numeric value to the string type variable and then perform any operation.

data: str type string,

num type i.

str = '10'.

num = str.

num = num * 5.

write: num.

Answer is 50....does that solve ur problem

also check with FM CONVERT_STRING_TO_INTEGER

reward if useful

regards

dinesh

Read only

Former Member
0 Likes
751

you can check this fm

C14W_CHAR_NUMBER_CONVERSION

or

MOVE_CHAR_TO_NUM

regards

shiba dutta