Application Development 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: 

ASCII code for a Character

Former Member
0 Kudos

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

former_member181962
Active Contributor
0 Kudos

Hi Abhijit,

use the fm:

URL_ASCII_CODE_GET

Regards,

Ravi

7 REPLIES 7

former_member181962
Active Contributor
0 Kudos

Hi Abhijit,

use the fm:

URL_ASCII_CODE_GET

Regards,

Ravi

0 Kudos

hi,

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

Regards,

Santosh

0 Kudos

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.

Former Member
0 Kudos

Use function module 'URL_ASCII_CODE_GET'.

Former Member
0 Kudos

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

Former Member
0 Kudos

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.