Skip to Content

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

GUI_DOWNLOAD not writing BOM for UTF-8

We are using the following code to produce an Excel Spreadsheet. But the parameter WRITE_BOM is not working - SAP does not write a byte-order mark to the file. The result is that Excel does not open the file correctly. When we add the BOM manually in UltraEdit the file opens correctly.

      filename              = 'C:\export.xls'
      filetype              = 'DAT'
      trunc_trailing_blanks = 'X'
      write_field_separator = 'X'
      codepage              = '4310'
      write_bom             = 'X'
      data_tab              = gt_textsi

Former Member

Please check the function help:

Short Text

     If set, writes a Unicode byte order mark


     If data is written in a Unicode codepage, at the top of the file the
     respective byte order mark (BOM) is included.

     Unicode - Little Endian codepage 4103, binary values 'FFFE'

     Unicode - Big Endian codepage 4102, binary values 'FEFF'

     UTF-8 codepage 4110, binary values 'EFBBBF'

     Note: Microsoft Excel supports Unicode data only if they have been
     written in Unicode - Little Endian format.

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