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

ASCII Chr

vallamuthu_madheswaran2
Active Contributor
0 Likes
719

Hi friends,

How to see the ASCII Values.

or

i want to convert ASCII to ordinary char.

Thanks & regards,

vallamuthu

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
611

Hi,

try,

data : c value 'A'.

field-symbols : <n> type x.

data : rn type i.

assign c to <n> casting.

move <n> to rn.

write rn.

This will convert 'A' to 65.

check this link:

http://www.sap-img.com/abap/how-can-i-get-ascii-value-of-any-letter.htm

Reward if usefull.

Thanks,

Swati

3 REPLIES 3
Read only

Former Member
0 Likes
612

Hi,

try,

data : c value 'A'.

field-symbols : <n> type x.

data : rn type i.

assign c to <n> casting.

move <n> to rn.

write rn.

This will convert 'A' to 65.

check this link:

http://www.sap-img.com/abap/how-can-i-get-ascii-value-of-any-letter.htm

Reward if usefull.

Thanks,

Swati

Read only

Former Member
0 Likes
611

Hi,

*going from 66 to B

data : i type i value 66.

data : x type x.

field-symbols : <fc> type c.

move i to x.

assign x to <fc> casting type c.

move <fc> to c.

write c.

Thanks,

Swati

Read only

0 Likes
611

Hi, Swati.

I tried your method, but the compiler give me an error : The length of 'X' in bytes must be a multiple of the Unicode character(regardless of the size of the Unicode charecter).

Now I don't know how to solve this problem, can you help me?

Thanks in advance.