<?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 Re: OPEN DATASET for XML utf-8 in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-for-xml-utf-8/m-p/7820740#M1588962</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry for taking so long to answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using Abap 710.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What do you mean with valid XML?&lt;/P&gt;&lt;P&gt;I can have a valid one in my pc (frontend) using method  "CALL METHOD cl_gui_frontend_services=&amp;gt;gui_download",&lt;/P&gt;&lt;P&gt;but if I try to download it to the server using "OPEN DATASET lv_temp_unix_filen in BINARY MODE for OUTPUT." it gives me the error I described on my first post.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to add in the simple transformation the enconding? Then I could load that transformed data to a STRING as UTF-8. Because right now from the simple transformation I get it as UTF-16. That's why I am reading it to a XSTRING to be UTF-8 (I read it in another topic from this forum).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone have a solution?&lt;/P&gt;&lt;P&gt;Thanks for helping me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 Apr 2011 12:30:36 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-04-26T12:30:36Z</dc:date>
    <item>
      <title>OPEN DATASET for XML utf-8</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-for-xml-utf-8/m-p/7820735#M1588957</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to read data from SAP 710 and save it in the server as a XML utf-8 file. Then this file is going to be read in a non SAP system.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am reading data in a simple transformation to a STRING, but it come as UTF-16.&lt;/P&gt;&lt;P&gt;Then I call method CL_RSWAD_CONVERT=&amp;gt;STRING_TO_TABLE where I Import a binary table TYPE STANDARD TABLE OF char255.&lt;/P&gt;&lt;P&gt;So when I do 'OPEN DATASET lv_temp_unix_filen in BINARY MODE for OUTPUT.' the file is in UTF-16 format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to replace UTF-16 for UTF-8 (using: REPLACE FIRST OCCURRENCE OF 'utf-16' in lv_xml_string with 'utf-8'.)&lt;/P&gt;&lt;P&gt;but then the NON SAP system doesn't recognize the file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also tried to read the simple transformation data into a XSTRING.&lt;/P&gt;&lt;P&gt;Then I used CL_RSWAD_CONVERT=&amp;gt;XSTRING_TO_TABLE where I get the content in a binary table TYPE SOLIX_TAB.&lt;/P&gt;&lt;P&gt;If I use method cl_gui_frontend_services=&amp;gt;gui_download this works fine, but for the server, the file shows an error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;"The XML page cannot be displayed&lt;/EM&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;EM&gt;Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;----&lt;/EM&gt;&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Invalid at the top level of the document. Error processing resource 'file:///C:/test.xml'. "&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone help me?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Kind regards!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Apr 2011 00:07:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-for-xml-utf-8/m-p/7820735#M1588957</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-04-19T00:07:29Z</dc:date>
    </item>
    <item>
      <title>Re: OPEN DATASET for XML utf-8</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-for-xml-utf-8/m-p/7820736#M1588958</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can use FM SCMS_STRING_TO_XSTRING which takes a string and returns a string of bytes in encoding defined in paramter ENCODING. For UTF-8 you need to enter 4110. You should also check what encoding is mentioned in XML file. If it's UTF-16 you need to change it to UTF-8.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Apr 2011 01:06:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-for-xml-utf-8/m-p/7820736#M1588958</guid>
      <dc:creator>mvoros</dc:creator>
      <dc:date>2011-04-19T01:06:12Z</dc:date>
    </item>
    <item>
      <title>Re: OPEN DATASET for XML utf-8</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-for-xml-utf-8/m-p/7820737#M1588959</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Martin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, after I have all the date in a XSTRING as utf-8, how can I create a file in the server?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do it like this:&lt;/P&gt;&lt;P&gt;OPEN DATASET lv_temp_unix_filen in BINARY MODE for OUTPUT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the output file has at the end the error described in last post.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Apr 2011 22:12:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-for-xml-utf-8/m-p/7820737#M1588959</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-04-19T22:12:34Z</dc:date>
    </item>
    <item>
      <title>Re: OPEN DATASET for XML utf-8</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-for-xml-utf-8/m-p/7820738#M1588960</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Luis,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Which release of ABAP are you using? You can use the addition [ENCODING UTF-8|http://help.sap.com/abapdocu_702/en/abapopen_dataset_encoding.htm#!ABAP_ALTERNATIVE_2@2@] provided you open the file in [TEXT MODE|http://help.sap.com/abapdocu_702/en/abapopen_dataset_mode.htm#!ABAP_ALTERNATIVE_2@2@].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you're opening the file in BINARY MODE, you don't have to worry about the encoding!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Apr 2011 04:54:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-for-xml-utf-8/m-p/7820738#M1588960</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2011-04-20T04:54:50Z</dc:date>
    </item>
    <item>
      <title>Re: OPEN DATASET for XML utf-8</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-for-xml-utf-8/m-p/7820739#M1588961</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;are you sure that XML is valid. Have you tried to open that file in text editor and check if that XML is valid. For example what encoding is set there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Apr 2011 06:18:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-for-xml-utf-8/m-p/7820739#M1588961</guid>
      <dc:creator>mvoros</dc:creator>
      <dc:date>2011-04-20T06:18:53Z</dc:date>
    </item>
    <item>
      <title>Re: OPEN DATASET for XML utf-8</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-for-xml-utf-8/m-p/7820740#M1588962</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry for taking so long to answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using Abap 710.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What do you mean with valid XML?&lt;/P&gt;&lt;P&gt;I can have a valid one in my pc (frontend) using method  "CALL METHOD cl_gui_frontend_services=&amp;gt;gui_download",&lt;/P&gt;&lt;P&gt;but if I try to download it to the server using "OPEN DATASET lv_temp_unix_filen in BINARY MODE for OUTPUT." it gives me the error I described on my first post.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to add in the simple transformation the enconding? Then I could load that transformed data to a STRING as UTF-8. Because right now from the simple transformation I get it as UTF-16. That's why I am reading it to a XSTRING to be UTF-8 (I read it in another topic from this forum).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone have a solution?&lt;/P&gt;&lt;P&gt;Thanks for helping me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Apr 2011 12:30:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-for-xml-utf-8/m-p/7820740#M1588962</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-04-26T12:30:36Z</dc:date>
    </item>
    <item>
      <title>Re: OPEN DATASET for XML utf-8</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-for-xml-utf-8/m-p/7820741#M1588963</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I solved my problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For unix I used an approach similar to the one posted on:&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="1631563"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For frontend file I read the simple transformation to a xstring, then I convert it to binary table and I call method cl_gui_frontend_services=&amp;gt;gui_download.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for helping.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Apr 2011 10:59:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-for-xml-utf-8/m-p/7820741#M1588963</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-04-28T10:59:22Z</dc:date>
    </item>
  </channel>
</rss>

