Quantcast
Channel: SCN : Popular Discussions - Code Exchange
Viewing all articles
Browse latest Browse all 1399

Problem with German Umlauts

$
0
0

Hello Community,

 

two days ago i've installad the abap2xlsx-tool and i have tested some demo-reports.

The Tool is great and I want to use it for some problems with my own zreports.

 

My mainproblem at the moment:

 

I can't use the generated CSV-File with customer data because the german umlauts looks horrible.

113;"SAP";"GLÜCK & HERZOG GBR";"GLÜCK+HERZ";"CFR";........& Herzog GbR";"Montageservice";"";"D";"Odenwaldstraße.....


I've used the code from ZDEMO_EXCEL28.

 

Create the Excel-Object and used the methods from zcl_excel_writer_csv

 

In my opinion the FM SCMS_XSTRING_TO_BINARY is the problem.

 

" Convert to binary
     CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
       EXPORTING
         buffer        = lv_file
       IMPORTING
         output_length = lv_bytecount
       TABLES
         binary_tab    = lt_file_tab.

     lv_full_path = ifile.

*    " Save the file
     CALL METHOD cl_gui_frontend_services=>gui_download
       EXPORTING
         bin_filesize              = lv_bytecount
         filename                  = lv_full_path
         filetype                  = 'BIN'
*    append                    = SPACE
*    write_field_separator     = SPACE
*    header                    = '00'
*    trunc_trailing_blanks     = SPACE
*    write_lf                  = 'X'
*    col_select                = SPACE
*    col_select_mask           = SPACE
*    dat_mode                  = SPACE
*    confirm_overwrite         = SPACE
*    no_auth_check             = SPACE
         codepage                  = '4110'               "UTF-8
*    ignore_cerr               = ABAP_TRUE
*    replacement               = '#'
*    write_bom                 = SPACE
*    trunc_trailing_blanks_eol = 'X'
*    wk1_n_format              = SPACE
*    wk1_n_size                = SPACE
*    wk1_t_format              = SPACE
*    wk1_t_size                = SPACE
*    show_transfer_status      = 'X'
*    fieldnames                =
*    write_lf_after_last_line  = 'X'
*    virus_scan_profile        = '/SCET/GUI_DOWNLOAD'
*  IMPORTING
*    filelength                =
       CHANGING
         data_tab                  = lt_file_tab
       EXCEPTIONS
         file_write_error          = 1
         no_batch                  = 2


Codepage-Statemant won't change anything in my resultfile.


In my old program i create a string table and call ....GUI_DOWNLOAD with filetype 'ASC' and it looks fine.


CALL METHOD cl_gui_frontend_services=>gui_download
       EXPORTING
*      bin_filesize              =
          filename                  = ifile
          filetype                  = 'ASC'
*      append                    = SPACE
          write_field_separator     = space
*      header                    = '00'
*      trunc_trailing_blanks     = SPACE
          write_lf                  = 'X'
*      col_select                = SPACE
*      col_select_mask           = SPACE
*      dat_mode                  = SPACE
          confirm_overwrite         = space
*      no_auth_check             = SPACE
*       codepage                  = '1160'
*      ignore_cerr               = ABAP_TRUE
*      replacement               = '#'
*      write_bom                 = SPACE
*      trunc_trailing_blanks_eol = 'X'
*      wk1_n_format              = SPACE
*      wk1_n_size                = SPACE
*      wk1_t_format              = SPACE
*      wk1_t_size                = SPACE
*      show_transfer_status      = 'X'
*    IMPORTING
*      filelength                =
       CHANGING
         data_tab                  = ithsexp


Can anybody help me with my problem or is it not possible to do it with the functions from ABAP2XLSX.


Thanks.



Viewing all articles
Browse latest Browse all 1399

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>