<?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 charachters in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/replace-charachters/m-p/4526304#M1069969</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi use the keywords REPLACE and CONDENSE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 27 Sep 2008 06:11:37 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-09-27T06:11:37Z</dc:date>
    <item>
      <title>replace charachters</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replace-charachters/m-p/4526303#M1069968</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have abcc345. i need to replace all the charachters by spaces.&lt;/P&gt;&lt;P&gt;incase i have asdfghj00001 again all charachters by spaces.&lt;/P&gt;&lt;P&gt;but number remains the same.&lt;/P&gt;&lt;P&gt;in all cases i just need to replace the charachters numbere remaining the same&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 27 Sep 2008 06:08:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replace-charachters/m-p/4526303#M1069968</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-27T06:08:51Z</dc:date>
    </item>
    <item>
      <title>Re: replace charachters</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replace-charachters/m-p/4526304#M1069969</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi use the keywords REPLACE and CONDENSE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 27 Sep 2008 06:11:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replace-charachters/m-p/4526304#M1069969</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-27T06:11:37Z</dc:date>
    </item>
    <item>
      <title>Re: replace charachters</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replace-charachters/m-p/4526305#M1069970</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;str =  abcc3345.&lt;/P&gt;&lt;P&gt;str1 = str+4(1).&lt;/P&gt;&lt;P&gt;str2 = str+4(4) = 3345. then take it in anather variable&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;same for below one with some modification&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 27 Sep 2008 06:15:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replace-charachters/m-p/4526305#M1069970</guid>
      <dc:creator>former_member329859</dc:creator>
      <dc:date>2008-09-27T06:15:59Z</dc:date>
    </item>
    <item>
      <title>Re: replace charachters</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replace-charachters/m-p/4526306#M1069971</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 this....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA : lv_field type char20 value 'asdfghj00001',
       moff type i,
       lv_strlen type i,
       lv_length type i.


find first occurrence of regex '\d' in lv_field match offset moff.

lv_strlen = strlen( lv_field ).

lv_length = lv_strlen - moff.

write : / lv_field+moff(lv_length).
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Hope it will helps&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 27 Sep 2008 07:03:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replace-charachters/m-p/4526306#M1069971</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-27T07:03:14Z</dc:date>
    </item>
    <item>
      <title>Re: replace charachters</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replace-charachters/m-p/4526307#M1069972</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;See if one variable has value like abc456.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;simply declare one variable with type N.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;example ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data:  
  w_var1(20) type c value 'ABC1101',
  w_var2(20) type N.

w_var2 = w_var1.

write : / w_var2. 
Then simply it writes ....  1101.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope u got it..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is the concept of type conversion...................&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sunil Kumar Mutyala.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 27 Sep 2008 07:28:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replace-charachters/m-p/4526307#M1069972</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-27T07:28:01Z</dc:date>
    </item>
    <item>
      <title>Re: replace charachters</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replace-charachters/m-p/4526308#M1069973</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 &lt;STRONG&gt;Replace&lt;/STRONG&gt; as follows;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA lv_text TYPE string VALUE 'ab000cdeSDFf34534gh1ASDF234ijk5abc0'.
WRITE : /,'Before Replace :',lv_text.
REPLACE ALL OCCURRENCES OF REGEX '[A-Za-z]' IN lv_text WITH ''.
WRITE : /,'After Replace :',lv_text.

Output:

Before Replace : ab000cdeSDFf34534gh1ASDF234ijk5abc0

After Replace : 00034534123450&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Remember that there is no space between the single quotes in the WITH clause of the REPLACE statement.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;KArthik D&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 27 Sep 2008 07:32:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replace-charachters/m-p/4526308#M1069973</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-27T07:32:40Z</dc:date>
    </item>
    <item>
      <title>Re: replace charachters</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replace-charachters/m-p/4526309#M1069974</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 also use;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPLACE ALL OCCURRENCES OF REGEX '[[:alpha:]]' IN lv_text WITH ''.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Karthik D&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 27 Sep 2008 07:35:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replace-charachters/m-p/4526309#M1069974</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-27T07:35:15Z</dc:date>
    </item>
  </channel>
</rss>

