cancel
Showing results for 
Search instead for 
Did you mean: 

Charaacter encoding

former_member186783
Participant
0 Kudos

Hi experts,

I'd like to download a table to excel format:


loop at LT_ERRORS into LS_ERRORS.
    concatenate LV_TEXT LS_ERRORS-TSZ
                LS_ERRORS-TEXT
                CL_ABAP_CHAR_UTILITIES=>NEWLINE into LV_TEXT separated by
                CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB.
endloop.

 call function 'SCMS_STRING_TO_XSTRING'
    exporting
      TEXT   = LV_TEXT
"      ENCODING = lv_encode
    importing
      BUFFER = LV_XTEXT.

 WDR_TASK=>CLIENT_WINDOW->CLIENT->ATTACH_FILE_TO_RESPONSE(
    I_FILENAME = 'ERRORS.xls'
    I_CONTENT =  LV_XTEXT
    I_MIME_TYPE = 'EXCEL' ).

The problem is that, if I use the STRING XSTRING conversion without the encoding parameter, then the result is "unreadable" because some special characters like éáűőúöüó displayed incorrectly

If I use the encoding paramtere with '1140' ( ISO-8859-1 ) The all of the fields are correct, but the the excel is only one line, becasue the CL_ABAP_CHAR_UTILITIES=>NEWLINE and the CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB converted wrongly to this codepage.

Can someone help me to find the solution? (to have the special characters and the EXCEL separators correctly)

Thanks

N.

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member186783
Participant
0 Kudos

The solution was codepage 1181 "SAp internal like 8859-1 but with additional Euro"