<?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: ABAP search and replace possible ? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-search-and-replace-possible/m-p/2843650#M666073</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 the statemnet&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;replace all occurrences &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nagaraj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 19 Sep 2007 07:13:42 GMT</pubDate>
    <dc:creator>former_member404244</dc:creator>
    <dc:date>2007-09-19T07:13:42Z</dc:date>
    <item>
      <title>ABAP search and replace possible ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-search-and-replace-possible/m-p/2843648#M666071</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 have 2 Strings.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;String1= "this is a test 12345 and i need this"&lt;/P&gt;&lt;P&gt;String2= "12345"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a function or SAP module which search/replaces ?&lt;/P&gt;&lt;P&gt;I want to search in String1 for String2 and replace it/delete it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ideas?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Sep 2007 07:07:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-search-and-replace-possible/m-p/2843648#M666071</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-19T07:07:17Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP search and replace possible ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-search-and-replace-possible/m-p/2843649#M666072</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;replace all occurrences of string2 in string1 with ''.&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Sep 2007 07:08:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-search-and-replace-possible/m-p/2843649#M666072</guid>
      <dc:creator>former_member189059</dc:creator>
      <dc:date>2007-09-19T07:08:34Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP search and replace possible ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-search-and-replace-possible/m-p/2843650#M666073</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 the statemnet&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;replace all occurrences &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nagaraj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Sep 2007 07:13:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-search-and-replace-possible/m-p/2843650#M666073</guid>
      <dc:creator>former_member404244</dc:creator>
      <dc:date>2007-09-19T07:13:42Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP search and replace possible ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-search-and-replace-possible/m-p/2843651#M666074</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;To search a character field for a particular pattern, use the SEARCH statement as follows:&lt;/P&gt;&lt;P&gt;SEARCH &amp;lt;c&amp;gt; FOR &amp;lt;str&amp;gt; &amp;lt;options&amp;gt;.&lt;/P&gt;&lt;P&gt;The statement searches the field &amp;lt;c&amp;gt; for &amp;lt;str&amp;gt; starting at position &amp;lt;n1&amp;gt;. If successful, the return code value of SY-SUBRC is set to 0 and SY-FDPOS is set to the offset of the string in the field &amp;lt;c&amp;gt;. Otherwise, SY-SUBRC is set to 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The search string &amp;lt;str&amp;gt; can have one of the following forms:&lt;/P&gt;&lt;P&gt;&amp;lt;str&amp;gt; -  Function&lt;/P&gt;&lt;P&gt;&amp;lt;pattern&amp;gt;  -  Searches for &amp;lt;pattern&amp;gt; (any sequence of characters). Trailing blanks are ignored.&lt;/P&gt;&lt;P&gt;.&amp;lt;pattern&amp;gt;.  -  Searches for &amp;lt;pattern&amp;gt;. Trailing blanks are not ignored.&lt;/P&gt;&lt;P&gt;*&amp;lt;pattern&amp;gt;  -  A word ending with &amp;lt;pattern&amp;gt; is sought.&lt;/P&gt;&lt;P&gt;&amp;lt;pattern&amp;gt;*  -  Searches for a word starting with &amp;lt;pattern&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Words are separated by blanks, commas, periods, semicolons, colons, question marks, exclamation marks, parentheses, slashes, plus signs, and equal signs.&lt;/P&gt;&lt;P&gt;&amp;lt;option&amp;gt; in the SEARCH FOR statement can be any of the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ABBREVIATED&lt;/P&gt;&lt;P&gt;Searches the field &amp;lt;c&amp;gt; for a word containing the string in &amp;lt;str&amp;gt;. The characters can be separated by other characters. The first letter of the word and the string &amp;lt;str&amp;gt; must be the same.&lt;/P&gt;&lt;P&gt;  STARTING AT &amp;lt;n1&amp;gt;&lt;/P&gt;&lt;P&gt;Searches the field &amp;lt;c&amp;gt; for &amp;lt;str&amp;gt; starting at position &amp;lt;n1&amp;gt;. The result SY-FDPOS refers to the offset relative to &amp;lt;n1&amp;gt; and not to the start of the field.&lt;/P&gt;&lt;P&gt;  ENDING AT &amp;lt;n2&amp;gt;&lt;/P&gt;&lt;P&gt;Searches the field &amp;lt;c&amp;gt; for &amp;lt;str&amp;gt; up to position &amp;lt;n2&amp;gt;.&lt;/P&gt;&lt;P&gt;  AND MARK&lt;/P&gt;&lt;P&gt;If the search string is found, all the characters in the search string (and all the characters in between when using ABBREVIATED) are converted to upper case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ex.&lt;/P&gt;&lt;P&gt;DATA STRING(30) VALUE 'This is a little sentence.'.&lt;/P&gt;&lt;P&gt;WRITE: / 'Searched', 'SY-SUBRC', 'SY-FDPOS'.&lt;/P&gt;&lt;P&gt;ULINE /1(26).&lt;/P&gt;&lt;P&gt;SEARCH STRING FOR 'X'.&lt;/P&gt;&lt;P&gt;WRITE: / 'X', SY-SUBRC UNDER 'SY-SUBRC',&lt;/P&gt;&lt;P&gt;SY-FDPOS UNDER 'SY-FDPOS'&lt;/P&gt;&lt;P&gt;SEARCH STRING FOR 'itt '.&lt;/P&gt;&lt;P&gt;WRITE: / 'itt ', SY-SUBRC UNDER 'SY-SUBRC',&lt;/P&gt;&lt;P&gt;SY-FDPOS UNDER 'SY-FDPOS'.&lt;/P&gt;&lt;P&gt;SEARCH STRING FOR '.e .'.&lt;/P&gt;&lt;P&gt;WRITE: / '.e .', SY-SUBRC UNDER 'SY-SUBRC',&lt;/P&gt;&lt;P&gt;SY-FDPOS UNDER 'SY-FDPOS'.&lt;/P&gt;&lt;P&gt;SEARCH STRING FOR '*e'.&lt;/P&gt;&lt;P&gt;WRITE: / '*e ', SY-SUBRC UNDER 'SY-SUBRC',&lt;/P&gt;&lt;P&gt;SY-FDPOS UNDER 'SY-FDPOS'.&lt;/P&gt;&lt;P&gt;SEARCH STRING FOR 's*'.&lt;/P&gt;&lt;P&gt;WRITE: / 's* ', SY-SUBRC UNDER 'SY-SUBRC',&lt;/P&gt;&lt;P&gt;SY-FDPOS UNDER 'SY-FDPOS'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Bhaskar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Sep 2007 07:19:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-search-and-replace-possible/m-p/2843651#M666074</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-19T07:19:08Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP search and replace possible ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-search-and-replace-possible/m-p/2843652#M666075</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;cONSIDER THE CODE BELOW, I hope it serves your purpose&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: string1(36),string2(5).&lt;/P&gt;&lt;P&gt;String1 = 'this is a test 12345 and i need this'.&lt;/P&gt;&lt;P&gt;String2 = '12345'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*To replace '12345' with 'ABCDE'&lt;/P&gt;&lt;P&gt;replace all occurrences of string2 in string1 with 'ABCDE'.&lt;/P&gt;&lt;P&gt;WRITE:/ sTRING1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*To delete 'ABCDE'&lt;/P&gt;&lt;P&gt;String2 = 'ABCDE'.&lt;/P&gt;&lt;P&gt;replace all occurrences of string2 in string1 with ''.&lt;/P&gt;&lt;P&gt;WRITE:/ sTRING1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if useful, get back in case of query...&lt;/P&gt;&lt;P&gt;Cheers!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Sep 2007 07:33:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-search-and-replace-possible/m-p/2843652#M666075</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-19T07:33:09Z</dc:date>
    </item>
  </channel>
</rss>

