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: 

Convert ascii data to hexadecimal

Former Member
0 Kudos

Hi . I have a problem.

If i have 'José' in a string

how can i search into the string, and find the 'é' character and obtain his hexadecimal and ascii code for that character

and if i have the ascii code 160 how can i know that this value means letter 'á'

Please show the abap code.

Reward points.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

To get the hex value for a character..



DATA: v_char.
FIELD-SYMBOLS: <fs> TYPE x.
DATA: v_int1 TYPE INT4.

v_char =  'é'. 

ASSIGN v_char TO <fs> CASTING TYPE X.

v_int1 = <FS>.

Write: / 'Hex value - ', v_int1.

Thanks,

Naren

1 REPLY 1

Former Member
0 Kudos

Hi,

To get the hex value for a character..



DATA: v_char.
FIELD-SYMBOLS: <fs> TYPE x.
DATA: v_int1 TYPE INT4.

v_char =  'é'. 

ASSIGN v_char TO <fs> CASTING TYPE X.

v_int1 = <FS>.

Write: / 'Hex value - ', v_int1.

Thanks,

Naren