Skip to Content
author's profile photo Former Member
Former Member

Type X error in Unicode conversion?

Hi anybody

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

hex2(1) TYPE x VALUE '20'.

How to change into unicode.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Feb 01, 2008 at 05:05 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 01, 2008 at 05:08 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 01, 2008 at 05:11 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.