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: 

Type X error in Unicode conversion?

Former Member
0 Kudos

Hi anybody

DATA: hex1(1) TYPE x VALUE '0D',

hex2(1) TYPE x VALUE '20'.

How to change into unicode.

3 REPLIES 3

Former Member
0 Kudos

Data Type X is not allowed in Unicode System. You need to convert them to character.

Check class: CL_ABAP_CHAR_UTILITIES, you have few pre-defined characters.

Taking example for TAB:

We define it as below

>data: l_tab(1) type c value cl_abap_char_utilities=>horizontal_tab.

Regards

Eswar

Former Member
0 Kudos

Hi

Hope it will help you.

pls reward if help.

Have a look at the methods of class CL_ABAP_CONTAINER_UTILITIES:

codeFILL_CONTAINER_C Fill Container of Type C or STRING with Content

READ_CONTAINER_C Read Container of Type C or STRING[/code]

These static methods should be used to convert structured data to unstructured and vice versa in a Unicode system.

Former Member
0 Kudos

Hi

hope it will help you.

Pls reward if help.

The remaining non-numeric type - X - always interprets individual bytes in memory. One byte is represented by a two-digit hexadecimal display. The fields with this type are called hexadecimal fields. In hexadecimal fields, you can process single bits.