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: 

Is there an constant for ASCII code ? for example '08'.

Former Member
0 Kudos

Because in different kind of systems, the ASCII code is represent by different ways,

for example, in single system, it is represented by '08', while on a unicode system, it is represented by '0008'.

How to do with this case?

Best regards,

Blake

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Blake,

Please try this:

DATA : d1 TYPE char1 VALUE 'A'. 
DATA : d2 TYPE i. 
FIELD-SYMBOLS : <fs> TYPE x. 

ASSIGN d1 TO <fs> CASTING. 
MOVE <fs> TO d2. 
WRITE d2.

Regards

Sabu

2 REPLIES 2

Former Member
0 Kudos

Blake,

Please try this:

DATA : d1 TYPE char1 VALUE 'A'. 
DATA : d2 TYPE i. 
FIELD-SYMBOLS : <fs> TYPE x. 

ASSIGN d1 TO <fs> CASTING. 
MOVE <fs> TO d2. 
WRITE d2.

Regards

Sabu

Former Member
0 Kudos

Hi ,

check class CL_ABAP_CHAR_UTILITIES in that chcek attributes in that the first two represents

Unicode and what it is replaced..

and also check class CL_ABAP_CONV_UC_NUMBER

Prabhu