Skip to Content
avatar image
Former Member

how to associate string (which already contains the RAW data type) to a variable type of RAW?

Webservice sends me the file content in the form of RAW strings. How to assign values of these raw strings to a variable of type raw?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Nov 15, 2016 at 07:19 AM

    the question is closed.

    I receive hexadecimal characters letters in lower case, you need only bring them to uppercase and it will work))

    Add comment
    10|10000 characters needed characters exceeded

    • please mark your answer as best reply

  • avatar image
    Former Member
    Nov 15, 2016 at 06:38 AM

    for example:

    String is like this:

    string_rav = 4462d38d22(...)6d6c6e733d226

    i need lv_raw = 4462d38d22(...)6d6c6e733d226

    if I do so:

    data: string_raw type string value '4462d38d22(...)6d6c6e733d226',

    raw1022(1022) type x.

    raw1022 = string_raw.

    raw contains 4462000000(...)000000000

    what is the problem?

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 15, 2016 at 07:12 AM

    Problem is that ABAP type X works same like ABAP type C. It has length 1 character (C) or one byte (X) if you do not specify length.

    I suggest to use xstring type :-)

    EDIT: I did not notice length inside brackets... nevermind

    Add comment
    10|10000 characters needed characters exceeded