Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Split/concatenate with a delimiter within Unicode

Hi,

I've got the following coding in a Non-Unicode system which should be converted to a Unicode compatible coding:

DATA: delimiter(1) TYPE x VALUE '02'.
CONCATENATE anz_pos l_zaehler INTO text-line SEPARATED BY delimiter.
...
 SPLIT l_object_content-line AT delimiter INTO l_object l_adress.

Transaction UCCHECK complaints about the line CONCATENATE and SPLIT.

So what's the best way to retain the Hex value of '02' (this is requirement since there are old files archived, containing this delimiter, and which are still be processed) and split or concatenate the field values in an Unicode enabled Abap?

Former Member replied

Hi,

Try this ..

DATA: l_lowval(5) TYPE c .                   
 DATA: c_lowval(5) TYPE c value '\X\02' .        ---> Hexadecimal

" Convert hexadecimal value to char
    CALL FUNCTION 'STPU1_HEX_TO_CHAR'
      EXPORTING
                hex_string        = c_lowval
     IMPORTING
              CHAR_STRING       = l_lowval.
DATA: delimiter(1) TYPE C.
delimiter =  l_lowval.

CONCATENATE anz_pos l_zaehler INTO text-line SEPARATED BY delimiter.
...
 SPLIT l_object_content-line AT delimiter INTO l_object l_adress.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question