<?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 # in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/replace/m-p/1794258#M341416</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;the example is working fine stand alone, but when I try to use it in my code it is not working. It seems to be some kind cast issue. Anyone who knows how I can cast the variable in order to make this work?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/Elvez&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 28 Dec 2006 15:41:09 GMT</pubDate>
    <dc:creator>bjorn-henrik_zink</dc:creator>
    <dc:date>2006-12-28T15:41:09Z</dc:date>
    <item>
      <title>Replace #</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replace/m-p/1794252#M341410</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 need some string operations help. I have a field symbol containing &amp;lt;b&amp;gt;a#b#c#&amp;lt;/b&amp;gt;. In order to make it work nicely with excel download I would like to replace the # with excel line feeds. The # originates from BSP textedit line feeds. I have tried with &amp;lt;b&amp;gt;replace&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;translate&amp;lt;/b&amp;gt;, but these commands do not find the #s. What should I do?&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;/Elvez&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Dec 2006 15:13:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replace/m-p/1794252#M341410</guid>
      <dc:creator>bjorn-henrik_zink</dc:creator>
      <dc:date>2006-12-28T15:13:10Z</dc:date>
    </item>
    <item>
      <title>Re: Replace #</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replace/m-p/1794253#M341411</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Elvez,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI level="1" type="ol"&gt;&lt;P&gt;repsents horizontal tab.&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use CL_ABAP_CHAR_UTILITIES=&amp;gt;HORIZONTAL_TAB instead of #s in your replace statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vinay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Dec 2006 15:23:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replace/m-p/1794253#M341411</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-28T15:23:03Z</dc:date>
    </item>
    <item>
      <title>Re: Replace #</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replace/m-p/1794254#M341412</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vinaykumar G,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here is my code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: s(256) type c.

s = l_page-&amp;gt;if_bsp_page~to_string( value = &amp;lt;f&amp;gt; ).

REPLACE ALL OCCURRENCES OF cl_abap_char_utilities=&amp;gt;horizontal_tab IN s WITH cl_abap_char_utilities=&amp;gt;cr_lf.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It still does not work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/Elvez&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Dec 2006 15:26:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replace/m-p/1794254#M341412</guid>
      <dc:creator>bjorn-henrik_zink</dc:creator>
      <dc:date>2006-12-28T15:26:44Z</dc:date>
    </item>
    <item>
      <title>Re: Replace #</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replace/m-p/1794255#M341413</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just an example donno if this works for you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: lv_var(6) type c value 'a#b#c#',&lt;/P&gt;&lt;P&gt;      lv_hash type c value '#'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;search lv_var for lv_hash.&lt;/P&gt;&lt;P&gt;if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;  do your processing.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Santosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Dec 2006 15:29:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replace/m-p/1794255#M341413</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-28T15:29:25Z</dc:date>
    </item>
    <item>
      <title>Re: Replace #</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replace/m-p/1794256#M341414</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;Here is a sample I wrote in 46C. I am able to use both TRANSLATE and REPLACE successfully to change the characters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[code]&lt;/P&gt;&lt;P&gt;PARAMETERS: p_string TYPE char20.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: w_string TYPE char20 VALUE '#$'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE: / 'String before Conversion:', p_string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TRANSLATE p_string USING w_string.&lt;/P&gt;&lt;P&gt;WRITE: / 'String after  TRANSLATE :', p_string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DO.&lt;/P&gt;&lt;P&gt;  REPLACE '$' WITH '@&amp;amp;' INTO p_string.&lt;/P&gt;&lt;P&gt;  IF sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;    EXIT.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;ENDDO.&lt;/P&gt;&lt;P&gt;WRITE: / 'String after  REPLACE   :', p_string.&lt;/P&gt;&lt;P&gt;[/code]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;Sumant.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Dec 2006 15:29:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replace/m-p/1794256#M341414</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-28T15:29:35Z</dc:date>
    </item>
    <item>
      <title>Re: Replace #</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replace/m-p/1794257#M341415</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;this is working in my system , may be some unicode problems in ur system&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT ychatest LINE-SIZE 350.

DATA : v_char(10) VALUE 'a#b#c'.

REPLACE all occurrences of '#' IN v_char WITH space .

CONDENSE v_char.

WRITE : v_char.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check the attributes in the class  CL_ABAP_CHAR_UTILITIES and try with some of them&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Dec 2006 15:32:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replace/m-p/1794257#M341415</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-28T15:32:46Z</dc:date>
    </item>
    <item>
      <title>Re: Replace #</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replace/m-p/1794258#M341416</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;the example is working fine stand alone, but when I try to use it in my code it is not working. It seems to be some kind cast issue. Anyone who knows how I can cast the variable in order to make this work?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/Elvez&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Dec 2006 15:41:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replace/m-p/1794258#M341416</guid>
      <dc:creator>bjorn-henrik_zink</dc:creator>
      <dc:date>2006-12-28T15:41:09Z</dc:date>
    </item>
    <item>
      <title>Re: Replace #</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replace/m-p/1794259#M341417</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I solved the problem by using CL_ABAP_CHAR_UTILITIES=&amp;gt;NEWLINE instead of #s in my replace statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/Elvez&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Dec 2006 16:47:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replace/m-p/1794259#M341417</guid>
      <dc:creator>bjorn-henrik_zink</dc:creator>
      <dc:date>2006-12-28T16:47:16Z</dc:date>
    </item>
  </channel>
</rss>

