<?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: cl_xml_document and type RAW on Unicode systems? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/cl-xml-document-and-type-raw-on-unicode-systems/m-p/3409013#M818698</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, thx for the code, I'll try it ASAP and it looks like a good workaround. Still, I actually consider this behaviour a bug, but using a workaround is usually more effective than opening a case in SDN... &lt;SPAN __jive_emoticon_name="wink"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 19 Feb 2008 10:39:10 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-02-19T10:39:10Z</dc:date>
    <item>
      <title>cl_xml_document and type RAW on Unicode systems?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cl-xml-document-and-type-raw-on-unicode-systems/m-p/3409010#M818695</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Cheers guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using a cl_xml_document for exporting data from but000 to an XML file. Works fine, except for the PARTNER_GUID which seems to be interpreted as chars (it's raw bytes), eg. the GUID "0E1E1FFCF746D14CADEF2D3EBEAEB21B" becomes "Dh4f/PdG0Uyt7y0+vq6yGw==". This is a very serious prob for us because it also occurs with other fields/tables and makes the whole XML thing pretty much useless.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any known workaround for this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thx in advance!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Feb 2008 15:02:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cl-xml-document-and-type-raw-on-unicode-systems/m-p/3409010#M818695</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-18T15:02:02Z</dc:date>
    </item>
    <item>
      <title>Re: cl_xml_document and type RAW on Unicode systems?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cl-xml-document-and-type-raw-on-unicode-systems/m-p/3409011#M818696</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Addition: the root of problem is the form Value_to_string (LSDIXMLF01) where RAW data gets converted to a string - this form is called from the SDIXML_DATA_TO_DOM function. I'd clearly say this is a bug (why would anyone want to apply a hex to string conversion to a GUID?), but I can't find anything about it on the OSS...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Feb 2008 16:33:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cl-xml-document-and-type-raw-on-unicode-systems/m-p/3409011#M818696</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-18T16:33:29Z</dc:date>
    </item>
    <item>
      <title>Re: cl_xml_document and type RAW on Unicode systems?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cl-xml-document-and-type-raw-on-unicode-systems/m-p/3409012#M818697</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i tried to simulate your case and the finding is that if the source field data type is RAW (type BU_PARTNER_GUID) it behaves the way as you had explained.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;however if you change the source field type(temporarily store them in a string field) to type string, it retains the format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check this sample program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data: l_xml  type ref to cl_xml_document  ,
     if_xml type ref to if_ixml_document ,
     node type ref to if_ixml_node  .
data: myguid type standard table of BU_PARTNER_GUID ,
      wa_guid type BU_PARTNER_GUID .
data: smyguid type standard table of string ,
      swa_guid type string .

data: xml_out type string ,
      xxml_out type xstring .
     wa_guid = '0E1E1FFCF746D14CADEF2D3EBEAEB21B' .
    append wa_guid to myguid .

swa_guid = '0E1E1FFCF746D14CADEF2D3EBEAEB21B' .
    append swa_guid to smyguid .

create object l_xml.
l_xml-&amp;gt;set_data(
*    NAME        = 'DATA'
*    ALIAS       = ALIAS
    dataobject  = smyguid
*    PARENT_NODE = PARENT_NODE
*    CONTROL     = CONTROL
       ).


clear xml_out .
l_xml-&amp;gt;render_2_xstring(
  EXPORTING
    PRETTY_PRINT = 'X'
  IMPORTING
*    RETCODE      = RETCODE
    STREAM       = xxml_out
*    SIZE         = SIZE
       ).

l_xml-&amp;gt;render_2_string(
  EXPORTING
    PRETTY_PRINT = 'X'
  IMPORTING
*    RETCODE      = RETCODE
    STREAM       = xml_out
*    SIZE         = SIZE
       ).

call method l_xml-&amp;gt;parse_string
  exporting
    stream = xml_out.
call method l_xml-&amp;gt;display.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Feb 2008 10:32:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cl-xml-document-and-type-raw-on-unicode-systems/m-p/3409012#M818697</guid>
      <dc:creator>athavanraja</dc:creator>
      <dc:date>2008-02-19T10:32:29Z</dc:date>
    </item>
    <item>
      <title>Re: cl_xml_document and type RAW on Unicode systems?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cl-xml-document-and-type-raw-on-unicode-systems/m-p/3409013#M818698</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, thx for the code, I'll try it ASAP and it looks like a good workaround. Still, I actually consider this behaviour a bug, but using a workaround is usually more effective than opening a case in SDN... &lt;SPAN __jive_emoticon_name="wink"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Feb 2008 10:39:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cl-xml-document-and-type-raw-on-unicode-systems/m-p/3409013#M818698</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-19T10:39:10Z</dc:date>
    </item>
  </channel>
</rss>

