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

Type X error in Unicode conversion?

Former Member
0 Likes
1,068

Hi anybody

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

hex2(1) TYPE x VALUE '20'.

How to change into unicode.

3 REPLIES 3
Read only

Former Member
0 Likes
751

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

Read only

Former Member
0 Likes
751

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.

Read only

Former Member
0 Likes
751

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.