<?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: String to XString Conversion in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-to-xstring-conversion/m-p/3907230#M936982</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;Try this fm:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
*Convert STRING to XSTRING
  CALL FUNCTION 'SCMS_STRING_TO_XSTRING'
    EXPORTING
      text           = iv_content
*     MIMETYPE       = ' '
*     ENCODING       =
   IMPORTING
     buffer         = ev_xstring
   EXCEPTIONS
     failed         = 1
     OTHERS         = 2.

  IF sy-subrc &amp;lt;&amp;gt; 0.
    ev_subrc = 4.
  ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 29 May 2008 18:40:08 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-05-29T18:40:08Z</dc:date>
    <item>
      <title>String to XString Conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-to-xstring-conversion/m-p/3907229#M936981</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;I want to convert XML file into XString.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The XML file is in itab and this itab is converted into a String using CONVERT_TABLE_TO_STRING funciotn module. This XML file into String conversion is done correctly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I tried String to XString conversion using TREX_TEXT_TO_XSTRING, the xstring variable results with many special characters (in some other langauage).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or, when I tried converting itab to xstring using itab_to_xstring, xstring results with many extra characters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Encoding style in xml is UTF-8.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know the correct way to convert xml to xstring.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Uma&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 May 2008 18:38:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-to-xstring-conversion/m-p/3907229#M936981</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-29T18:38:02Z</dc:date>
    </item>
    <item>
      <title>Re: String to XString Conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-to-xstring-conversion/m-p/3907230#M936982</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;Try this fm:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
*Convert STRING to XSTRING
  CALL FUNCTION 'SCMS_STRING_TO_XSTRING'
    EXPORTING
      text           = iv_content
*     MIMETYPE       = ' '
*     ENCODING       =
   IMPORTING
     buffer         = ev_xstring
   EXCEPTIONS
     failed         = 1
     OTHERS         = 2.

  IF sy-subrc &amp;lt;&amp;gt; 0.
    ev_subrc = 4.
  ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 May 2008 18:40:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-to-xstring-conversion/m-p/3907230#M936982</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-29T18:40:08Z</dc:date>
    </item>
    <item>
      <title>Re: String to XString Conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-to-xstring-conversion/m-p/3907231#M936983</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi David,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;I tried this function module also. XString return with special characters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Uma&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 May 2008 18:46:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-to-xstring-conversion/m-p/3907231#M936983</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-29T18:46:21Z</dc:date>
    </item>
    <item>
      <title>Re: String to XString Conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-to-xstring-conversion/m-p/3907232#M936984</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check out this [/people/thomas.jung3/blog/2004/08/09/bsp-download-to-excel-in-unicode-format]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This weblog talks about excel but applies to your case as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 May 2008 18:59:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-to-xstring-conversion/m-p/3907232#M936984</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-29T18:59:09Z</dc:date>
    </item>
    <item>
      <title>Re: String to XString Conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-to-xstring-conversion/m-p/3907233#M936985</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks David.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I changed my code as below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data:
    bdata           type xstring,
    G_STR         type STRING,
    APP_TYPE   type char30.

clear bdata.
APP_TYPE = 'text/unicode; charset=utf-16le'.

CALL FUNCTION 'SCMS_STRING_TO_XSTRING'
  EXPORTING
    TEXT           = G_STR
    MIMETYPE       = APP_TYPE
*   ENCODING       =
  IMPORTING
    BUFFER         = bdata
* EXCEPTIONS
*   FAILED         = 1
*   OTHERS         = 2
          .&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the xstring bdata results with "square box" character after each character.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Uma&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 May 2008 19:45:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-to-xstring-conversion/m-p/3907233#M936985</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-29T19:45:41Z</dc:date>
    </item>
    <item>
      <title>Re: String to XString Conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-to-xstring-conversion/m-p/3907234#M936986</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;are you viewing the xstring in debug mode? if yes this may happen. the correct way to test is to view it in the right viewer. for example if its a xml file, would suggest downloading to local file and viewing in browser or some other xml tools&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 31 May 2008 08:14:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-to-xstring-conversion/m-p/3907234#M936986</guid>
      <dc:creator>athavanraja</dc:creator>
      <dc:date>2008-05-31T08:14:32Z</dc:date>
    </item>
  </channel>
</rss>

