<?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: Replace Statement on Unicode system in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/replace-statement-on-unicode-system/m-p/1455580#M215381</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Usman,&lt;/P&gt;&lt;P&gt;  Use &amp;lt;b&amp;gt;SPLIT&amp;lt;/b&amp;gt; Statement instead of replace this defintely works as it worked for me...&lt;/P&gt;&lt;P&gt;i.e, Split at '#'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if it helps.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Santosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 15 Jun 2006 22:22:14 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-06-15T22:22:14Z</dc:date>
    <item>
      <title>Replace Statement on Unicode system</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replace-statement-on-unicode-system/m-p/1455578#M215379</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;/P&gt;&lt;P&gt;I am on Unicode system . I am reading a file from application server. i am doing like this &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data:char  TYPE C,&lt;/P&gt;&lt;P&gt;     test(2000).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ DATASET DATASET INTO test.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     IF SY-SUBRC &amp;lt;&amp;gt; 0. EXIT. ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in test i am getting data like 'KK#hh#jkjkjkjk#jkjlk hjkjh hkjh 4354#&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;I try these both statment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     REPLACE all occurences of CHAR  in test WITH space.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     REPLACE   CHAR WITH ' ' INTO  test.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But it&amp;#146;s just replacing the '#' in last  occurrence  "KK#hh#jkjkjkjk#jkjlk hjkjh hkjh 4354&amp;lt;b&amp;gt;#&amp;lt;/b&amp;gt;"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why its not replacing all with space?&lt;/P&gt;&lt;P&gt;&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;Usman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Jun 2006 22:15:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replace-statement-on-unicode-system/m-p/1455578#M215379</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-15T22:15:57Z</dc:date>
    </item>
    <item>
      <title>Re: Replace Statement on Unicode system</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replace-statement-on-unicode-system/m-p/1455579#M215380</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi &lt;/P&gt;&lt;P&gt;try the below example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;data rule(2) type c value '# '.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;translate test using rule.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Abdul Hakim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Jun 2006 22:20:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replace-statement-on-unicode-system/m-p/1455579#M215380</guid>
      <dc:creator>abdul_hakim</dc:creator>
      <dc:date>2006-06-15T22:20:01Z</dc:date>
    </item>
    <item>
      <title>Re: Replace Statement on Unicode system</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replace-statement-on-unicode-system/m-p/1455580#M215381</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Usman,&lt;/P&gt;&lt;P&gt;  Use &amp;lt;b&amp;gt;SPLIT&amp;lt;/b&amp;gt; Statement instead of replace this defintely works as it worked for me...&lt;/P&gt;&lt;P&gt;i.e, Split at '#'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if it helps.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Santosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Jun 2006 22:22:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replace-statement-on-unicode-system/m-p/1455580#M215381</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-15T22:22:14Z</dc:date>
    </item>
    <item>
      <title>Re: Replace Statement on Unicode system</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replace-statement-on-unicode-system/m-p/1455581#M215382</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you trying to replace th # with space.  If so, the # is not probably not a # but a tab.  THe # is an internal representation of tab.  You can do this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

REPLACE all occurences of 
       &amp;lt;b&amp;gt;cl_abap_char_utilities=&amp;gt;horizontal_tab&amp;lt;/b&amp;gt; in test WITH space.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REgards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Jun 2006 22:24:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replace-statement-on-unicode-system/m-p/1455581#M215382</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-06-15T22:24:23Z</dc:date>
    </item>
    <item>
      <title>Re: Replace Statement on Unicode system</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replace-statement-on-unicode-system/m-p/1455582#M215383</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot Rich . &lt;/P&gt;&lt;P&gt;Its removing '#' but not giving spaces ? Why &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Its also leaving '#' sign at the end of string &lt;/P&gt;&lt;P&gt;e,g&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'KK#hh#jkjkjkjk#jkjlk hjkjh hkjh 4354#&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;u&amp;gt;&amp;lt;b&amp;gt;after code &amp;lt;/b&amp;gt;&amp;lt;/u&amp;gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'KKhhjkjkjkjkjkjlk hjkjh hkjh 4354&amp;lt;b&amp;gt;#&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Usman&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Usman Akram&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Jun 2006 22:27:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replace-statement-on-unicode-system/m-p/1455582#M215383</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-15T22:27:03Z</dc:date>
    </item>
    <item>
      <title>Re: Replace Statement on Unicode system</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replace-statement-on-unicode-system/m-p/1455583#M215384</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure why it is not leaving space.  That is strange.  The last # must not be a tab, but a CR_LF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After the REPLACE statement, do it again, this time with.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; cl_abap_char_utilities=&amp;gt;cr_lf&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hopefully it will get rid of the # at the end.  If not, then do another REPLACE with the '#' sign.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Jun 2006 23:08:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replace-statement-on-unicode-system/m-p/1455583#M215384</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-06-15T23:08:32Z</dc:date>
    </item>
    <item>
      <title>Re: Replace Statement on Unicode system</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replace-statement-on-unicode-system/m-p/1455584#M215385</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Wow, that is weird.  I'm seeing the same with it not leaving the space.  Anyway.  Here is a work around.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

report zrich_0006.

data: d1 type localfile value '/usr/sap/nsp/test.txt'.
data: str type string.

open dataset d1 for input in text mode encoding default.

do.

  read dataset d1 into str.
  if sy-subrc &amp;lt;&amp;gt; 0 .
    exit.
  endif.
&amp;lt;b&amp;gt;  replace all occurrences of
              cl_abap_char_utilities=&amp;gt;horizontal_tab
                          in str with '%'.&amp;lt;/b&amp;gt;
&amp;lt;b&amp;gt;  translate str using '% '.&amp;lt;/b&amp;gt;

  write:/ str.

enddo.

close dataset d1.


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REgards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Jun 2006 23:16:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replace-statement-on-unicode-system/m-p/1455584#M215385</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-06-15T23:16:53Z</dc:date>
    </item>
    <item>
      <title>Re: Replace Statement on Unicode system</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replace-statement-on-unicode-system/m-p/1455585#M215386</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, I dont why its not creating spaces but this work&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;replace all occurrences of&lt;/P&gt;&lt;P&gt;              cl_abap_char_utilities=&amp;gt;horizontal_tab&lt;/P&gt;&lt;P&gt;                          in str with '%'.&lt;/P&gt;&lt;P&gt;  translate str using '% '.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Usman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jun 2006 14:38:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replace-statement-on-unicode-system/m-p/1455585#M215386</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-16T14:38:19Z</dc:date>
    </item>
  </channel>
</rss>

