<?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 Translate string using hex(0020) in Unicode system. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/translate-string-using-hex-0020-in-unicode-system/m-p/4181558#M999553</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We are facing a problem of the "translate" statement in the Unicode system.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The original statement goes as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TRANSLATE BULOG USING WS_STRING1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here  BULOG is a structure and ws_string1 is declared as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : ws_string1(2) type x value '0020'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On compilation in the new system which is Unicode enabled, the above mentioned statement removes all the '#' placed in the structure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We tried the following statement instead of the original TRANSLATE statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TRANSLATE BULOG USING SPACE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But this statement leaves the '#' unchanged.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have already REPLACE statement after converting the structure contents into a string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have also tried the convert methods of the classes CL_ABAP_CONV_IN_CE and CL_ABAP_CONV_OUT_CE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hoping to receive a fast response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Zankruti.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 16 Jul 2008 06:25:59 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-07-16T06:25:59Z</dc:date>
    <item>
      <title>Translate string using hex(0020) in Unicode system.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/translate-string-using-hex-0020-in-unicode-system/m-p/4181558#M999553</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We are facing a problem of the "translate" statement in the Unicode system.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The original statement goes as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TRANSLATE BULOG USING WS_STRING1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here  BULOG is a structure and ws_string1 is declared as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : ws_string1(2) type x value '0020'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On compilation in the new system which is Unicode enabled, the above mentioned statement removes all the '#' placed in the structure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We tried the following statement instead of the original TRANSLATE statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TRANSLATE BULOG USING SPACE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But this statement leaves the '#' unchanged.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have already REPLACE statement after converting the structure contents into a string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have also tried the convert methods of the classes CL_ABAP_CONV_IN_CE and CL_ABAP_CONV_OUT_CE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hoping to receive a fast response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Zankruti.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jul 2008 06:25:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/translate-string-using-hex-0020-in-unicode-system/m-p/4181558#M999553</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-16T06:25:59Z</dc:date>
    </item>
    <item>
      <title>Re: Translate string using hex(0020) in Unicode system.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/translate-string-using-hex-0020-in-unicode-system/m-p/4181559#M999554</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You might want to read ABAP Help on TRANSLATE:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Addition 2 
... USING  pattern 

Effect 
If you specify USING, the characters in text are converted according to the rule specified in pattern. 
pattern must be a character-type data object whose contents are interpreted as a sequence of 
character pairs.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your option 1 is not working because type X is "Byte field", technically it's not a character-type. Your option 2 is not working because &amp;lt;pattern&amp;gt; must be a sequence of character pairs (you had just SPACE).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In Option 1 just change the definition from X to C or STRING.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jul 2008 22:03:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/translate-string-using-hex-0020-in-unicode-system/m-p/4181559#M999554</guid>
      <dc:creator>Jelena_Perfiljeva</dc:creator>
      <dc:date>2008-07-16T22:03:39Z</dc:date>
    </item>
  </channel>
</rss>

