<?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: Find and replace with space in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/find-and-replace-with-space/m-p/4339983#M1033798</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi I would reccomend use of below syntax.&lt;/P&gt;&lt;P&gt;Data str1 type string&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;str1 = 'PACIFIC STAR (HOTEL) '.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPLACE ALL OCCURRENCES OF ')' IN str1 WITH ' '.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPLACE ALL OCCURRENCES OF ')' IN str1 WITH space.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rgds&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rajesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 21 Aug 2008 04:51:57 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-08-21T04:51:57Z</dc:date>
    <item>
      <title>Find and replace with space</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/find-and-replace-with-space/m-p/4339975#M1033790</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello ABAPers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to find the '(' starting on that need to replace it with space until the end of the string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for example : PACIFIC STAR (HOTEL) , so from '(' omit it , also the hotel word and the last ')'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can i do that? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help.&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;aVaDuDz&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Aug 2008 03:54:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/find-and-replace-with-space/m-p/4339975#M1033790</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-21T03:54:55Z</dc:date>
    </item>
    <item>
      <title>Re: Find and replace with space</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/find-and-replace-with-space/m-p/4339976#M1033791</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
REPLACE ALL OCCURENCES OF
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OR&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
TRANSLATE
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Search the forum for examples.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Oops. Ignore above answer. Didnt get your question right.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it is always at the end of the string you can do something like this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
FIND '(' IN string.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will give you the position of the the ( in sy-fdpos. then you can use offsets to just get you required string +0(sy-fdpos)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Aparna Shekhar on Aug 20, 2008 11:05 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Aug 2008 03:56:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/find-and-replace-with-space/m-p/4339976#M1033791</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-21T03:56:42Z</dc:date>
    </item>
    <item>
      <title>Re: Find and replace with space</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/find-and-replace-with-space/m-p/4339977#M1033792</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;Try this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wf_field = 'PACIFIC STAR (HOTEL)' .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPLACE '(' WITH space INTO wf_field .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sachin M M&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Aug 2008 04:01:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/find-and-replace-with-space/m-p/4339977#M1033792</guid>
      <dc:creator>sachin_mathapati</dc:creator>
      <dc:date>2008-08-21T04:01:36Z</dc:date>
    </item>
    <item>
      <title>Re: Find and replace with space</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/find-and-replace-with-space/m-p/4339978#M1033793</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;Use TRANSLATE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Eg: Translate a with '( ' .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Aug 2008 04:07:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/find-and-replace-with-space/m-p/4339978#M1033793</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-21T04:07:05Z</dc:date>
    </item>
    <item>
      <title>Re: Find and replace with space</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/find-and-replace-with-space/m-p/4339979#M1033794</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;Now it is...&lt;/P&gt;&lt;P&gt;&amp;gt;  PACIFIC STAR (HOTEL)&lt;/P&gt;&lt;P&gt;You want  to change it as...&lt;/P&gt;&lt;P&gt;&amp;gt;  PACIFIC STAR &lt;/P&gt;&lt;P&gt;Am i correct?&lt;/P&gt;&lt;P&gt;So...&lt;/P&gt;&lt;P&gt;You want to replace that in runtime or to modify the code?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you plz get once again?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naveen.I&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Aug 2008 04:12:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/find-and-replace-with-space/m-p/4339979#M1033794</guid>
      <dc:creator>naveen_inuganti2</dc:creator>
      <dc:date>2008-08-21T04:12:24Z</dc:date>
    </item>
    <item>
      <title>Re: Find and replace with space</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/find-and-replace-with-space/m-p/4339980#M1033795</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;data: string(40),&lt;/P&gt;&lt;P&gt;      string1(40).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;string = 'PACIFIC STAR (HOTEL)'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;split string at '(' into string string1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write:/ string.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Aug 2008 04:17:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/find-and-replace-with-space/m-p/4339980#M1033795</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-21T04:17:11Z</dc:date>
    </item>
    <item>
      <title>Re: Find and replace with space</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/find-and-replace-with-space/m-p/4339981#M1033796</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;for this we can use REPLACE , SPLIT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: c TYPE string,
      a type string.

c = 'PACIFIC STAR (HOTEL)'.
a = '(HOTEL)'.
REPLACE ALL OCCURRENCES OF a IN c WITH ' '.

write: c.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: l_str1 type string,
      l_str2 type string,
      l_str type string,
      l_replacestr type string.

l_str = 'PACIFIC STAR (HOTEL)'.

l_replacestr = '(HOTEL)'.

split l_str at l_replacestr into l_str1 l_str2.

write: l_str1.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanx,&lt;/P&gt;&lt;P&gt;dhanashri.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Dhanashri Pawar on Aug 21, 2008 6:32 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Aug 2008 04:17:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/find-and-replace-with-space/m-p/4339981#M1033796</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-21T04:17:20Z</dc:date>
    </item>
    <item>
      <title>Re: Find and replace with space</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/find-and-replace-with-space/m-p/4339982#M1033797</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;You can use &lt;STRONG&gt;SPLIT&lt;/STRONG&gt; statement....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this smaple query...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data: n(8), m(8).

n = 'Hi N(RT)'.

SPLIT n at '(' into n m.

write:/ n.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;which gives output as &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; Hi N&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;Naveen.I&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Aug 2008 04:36:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/find-and-replace-with-space/m-p/4339982#M1033797</guid>
      <dc:creator>naveen_inuganti2</dc:creator>
      <dc:date>2008-08-21T04:36:52Z</dc:date>
    </item>
    <item>
      <title>Re: Find and replace with space</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/find-and-replace-with-space/m-p/4339983#M1033798</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi I would reccomend use of below syntax.&lt;/P&gt;&lt;P&gt;Data str1 type string&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;str1 = 'PACIFIC STAR (HOTEL) '.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPLACE ALL OCCURRENCES OF ')' IN str1 WITH ' '.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPLACE ALL OCCURRENCES OF ')' IN str1 WITH space.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rgds&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rajesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Aug 2008 04:51:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/find-and-replace-with-space/m-p/4339983#M1033798</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-21T04:51:57Z</dc:date>
    </item>
  </channel>
</rss>

