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

Problems with Unicode

denis_nakamoto
Participant
0 Likes
432

Hello people!

I have a dump described uc_objects_not_charlike. What does it mean?

This code is inside in a include...

Can you help me please???

Follow the code that have a dump:

FORM NEW_LINE_FORMAT TABLES XDOWNTABLE1 XDOWNTABLE2.

DATA: WSTR1 TYPE STRING,

WSTR2 TYPE STRING.

FIELD-SYMBOLS: <F> TYPE ANY.

DATA: LEN TYPE P,

LEN2 TYPE P,

LEN3 TYPE P.

DATA: C_NEWLINE(2) TYPE X VALUE '0D0A'.

CLEAR XDOWNTABLE2.

LOOP AT XDOWNTABLE1.

IF SY-TABIX EQ 1.

ASSIGN XDOWNTABLE1 TO <F> TYPE 'X'.

XDOWNTABLE2 = XDOWNTABLE1.

ELSE.

*add line feed

SHIFT <F> RIGHT BY 2 PLACES. "<<<<<This line

<F>+0(2) = C_NEWLINE.

WSTR1 = XDOWNTABLE1.

LEN = STRLEN( WSTR1 ).

WSTR2 = XDOWNTABLE2.

LEN2 = STRLEN( WSTR2 ).

LEN3 = LEN2 + LEN.

IF LEN3 LE 512.

CONCATENATE WSTR2 WSTR1 INTO WSTR2.

XDOWNTABLE2 = WSTR2.

ELSE.

LEN3 = 512 - LEN2.

CONCATENATE WSTR2 WSTR1(LEN3) INTO WSTR2.

XDOWNTABLE2 = WSTR2.

APPEND XDOWNTABLE2.

CLEAR XDOWNTABLE2.

XDOWNTABLE2 = WSTR1+LEN3.

ENDIF.

ENDIF.

AT LAST.

APPEND XDOWNTABLE2.

ENDAT.

ENDLOOP.

ENDFORM." new_line_format

Best regards,

Denis

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
398

Your error is coming from using type X variables I believe.

try re-writing the code to use character variables type C.

for the CR/LF, define a field of length 2 type C then fill it with

Field = CL_ABAP_CHAR_UTILITIES=>CR_LF.

then just concatenate this to the other fields (string or char types)

hope this helps

Andrew

2 REPLIES 2
Read only

Former Member
0 Likes
399

Your error is coming from using type X variables I believe.

try re-writing the code to use character variables type C.

for the CR/LF, define a field of length 2 type C then fill it with

Field = CL_ABAP_CHAR_UTILITIES=>CR_LF.

then just concatenate this to the other fields (string or char types)

hope this helps

Andrew

Read only

0 Likes
398

Hi,

I realized that is the problem. I checked my friend's problem and I saw that there isn't any problem,.

Thanks for your support.

Best Regards,

Denis