<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic GUI_DOWNLOAD and codepage problem in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/gui-download-and-codepage-problem/m-p/6602210#M1437485</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to download XML data using this function module to a local PC file. It contains finnish characters such as Ä.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I open the XML file with an XML editor, it tells me that "Byte 0xFF found in file ... is invalid for encoding utf-8'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think I need to save the file  with ISO-8859-9 encoding, but I tried to use a codepage for that in the function module, and that also didn't work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anybody suggest what I may be doing wrong?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
      filename                = l_filename
      filetype                = 'BIN'
      write_lf                = ' '
*     codepage                = '1611'
    TABLES
      data_tab                = lt_table.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 17 Feb 2010 15:12:03 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-02-17T15:12:03Z</dc:date>
    <item>
      <title>GUI_DOWNLOAD and codepage problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/gui-download-and-codepage-problem/m-p/6602210#M1437485</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to download XML data using this function module to a local PC file. It contains finnish characters such as Ä.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I open the XML file with an XML editor, it tells me that "Byte 0xFF found in file ... is invalid for encoding utf-8'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think I need to save the file  with ISO-8859-9 encoding, but I tried to use a codepage for that in the function module, and that also didn't work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anybody suggest what I may be doing wrong?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
      filename                = l_filename
      filetype                = 'BIN'
      write_lf                = ' '
*     codepage                = '1611'
    TABLES
      data_tab                = lt_table.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Feb 2010 15:12:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/gui-download-and-codepage-problem/m-p/6602210#M1437485</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-17T15:12:03Z</dc:date>
    </item>
    <item>
      <title>Re: GUI_DOWNLOAD and codepage problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/gui-download-and-codepage-problem/m-p/6602211#M1437486</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try using the following method:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TRY.&lt;/P&gt;&lt;P&gt;      cl_bcs_convert=&amp;gt;string_to_solix(&lt;/P&gt;&lt;P&gt;        EXPORTING&lt;/P&gt;&lt;P&gt;          iv_string   = lv_string&lt;/P&gt;&lt;P&gt;          iv_codepage = '1611'&lt;/P&gt;&lt;P&gt;          iv_add_bom  = 'X'&lt;/P&gt;&lt;P&gt;        IMPORTING&lt;/P&gt;&lt;P&gt;          et_solix  = binary_content&lt;/P&gt;&lt;P&gt;          ev_size   = size ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CATCH cx_bcs.&lt;/P&gt;&lt;P&gt;      MESSAGE e445(so).&lt;/P&gt;&lt;P&gt;  ENDTRY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For your table run it for every line and append the lines of the 'binary_content' into a collecting table (binary_content_all or something). Play with the BOM (Byte order mark) to see if you need it or not. After the table has been processed you can download the binary_content_all with your function module but I recommend using:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL METHOD cl_gui_frontend_services=&amp;gt;gui_download&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      filename                  = l_filename&lt;/P&gt;&lt;P&gt;      filetype                  = 'BIN'&lt;/P&gt;&lt;P&gt;    CHANGING&lt;/P&gt;&lt;P&gt;      data_tab                  = binary_content&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know if this was helpful!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Roel van den Berge&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Feb 2010 15:34:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/gui-download-and-codepage-problem/m-p/6602211#M1437486</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-17T15:34:06Z</dc:date>
    </item>
    <item>
      <title>Re: GUI_DOWNLOAD and codepage problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/gui-download-and-codepage-problem/m-p/6602212#M1437487</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try with file type as ASC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Feb 2010 16:22:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/gui-download-and-codepage-problem/m-p/6602212#M1437487</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-17T16:22:00Z</dc:date>
    </item>
    <item>
      <title>Re: GUI_DOWNLOAD and codepage problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/gui-download-and-codepage-problem/m-p/6602213#M1437488</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I did, it created other problems.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Feb 2010 16:23:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/gui-download-and-codepage-problem/m-p/6602213#M1437488</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-17T16:23:31Z</dc:date>
    </item>
  </channel>
</rss>

