‎2008 Sep 05 1:04 AM
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
‎2008 Sep 05 2:34 AM
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
‎2008 Sep 05 2:34 AM
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
‎2008 Sep 09 3:21 PM
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