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 code for a Character

Former Member
0 Likes
1,907

Hello,

I have a requirement in which I have to get the ASCII code for the input character.

How can I find the ASCII code for the character?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,162

Hi Abhijit,

use the fm:

URL_ASCII_CODE_GET

Regards,

Ravi

Hello,

I have a requirement in which I have to get the ASCII code for the input character.

How can I find the ASCII code for the character?

7 REPLIES 7
Read only

Former Member
0 Likes
1,163

Hi Abhijit,

use the fm:

URL_ASCII_CODE_GET

Regards,

Ravi

Read only

0 Likes
1,162

hi,

use FM <b>URL_ASCII_CODE_GET</b> for the same

Regards,

Santosh

Read only

0 Likes
1,162

Hello,

I am writing a Function module for calculating CheckSum for printing BarCode.

For that purpose I have to get ASCII code for each character.

i.e. HI

for this i want the barcode of H as well as I which are 40 and 41. with this I have to do some calculation.

I tried the function module which you gave but its not giving the desired output.

Read only

Former Member
0 Likes
1,162

Use function module 'URL_ASCII_CODE_GET'.

Read only

Former Member
0 Likes
1,162

Hi,

see the code below.

report asciicode.

Parameters : c1 type c.

field-symbols : <n> type x.

data : rn type i.

assign c1 to <n> casting.

move <n> to rn.

write rn.

This will give Ascii code of the input character.

regards

Rakesh

Read only

Former Member
0 Likes
1,162

n = STRLEN( text ).

i = 0.

do n times

call function URL_ASCII_CODE_GET

trans_char = text+i(1).

i = i + 1.

Perform ur logic with Char_code.

enddo.