<?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: replacing stings within strings. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/replacing-stings-within-strings/m-p/5751867#M1303395</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Welcome&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 29 May 2009 11:42:22 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-05-29T11:42:22Z</dc:date>
    <item>
      <title>replacing stings within strings.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replacing-stings-within-strings/m-p/5751854#M1303382</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 want to convert all  all commas with in quotes in a string to a different symbol, say a hash. I cannot arrive at the code to do the same. Can anyone help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Eg : input = ' 5646," Name1, Name2 ", 234324 ," comp name , city " , 435345 '.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Output should be ' 5646," Name1# Name2 ", 234324 ," comp name # city " , 435345 '.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this possible ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 May 2009 10:35:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replacing-stings-within-strings/m-p/5751854#M1303382</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-29T10:35:06Z</dc:date>
    </item>
    <item>
      <title>Re: replacing stings within strings.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replacing-stings-within-strings/m-p/5751855#M1303383</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 REPLACE ALL OCCURANCES OF &amp;lt;str1&amp;gt; WITH &amp;lt;str2.&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 May 2009 10:36:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replacing-stings-within-strings/m-p/5751855#M1303383</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-29T10:36:08Z</dc:date>
    </item>
    <item>
      <title>Re: replacing stings within strings.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replacing-stings-within-strings/m-p/5751856#M1303384</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;PRE&gt;&lt;CODE&gt;REPLACE ALL OCCURRENCES OF ',' IN P_STRING WITH '#'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 May 2009 10:37:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replacing-stings-within-strings/m-p/5751856#M1303384</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-29T10:37:53Z</dc:date>
    </item>
    <item>
      <title>Re: replacing stings within strings.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replacing-stings-within-strings/m-p/5751857#M1303385</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can .. must break ur head &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 May 2009 10:38:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replacing-stings-within-strings/m-p/5751857#M1303385</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2009-05-29T10:38:07Z</dc:date>
    </item>
    <item>
      <title>Re: replacing stings within strings.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replacing-stings-within-strings/m-p/5751858#M1303386</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;how can i use all occurrences, i tried it initially and it doesn give the output. plz note the string doesnot have a definite pattern, i just want to replace all commas within quotes.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 May 2009 10:38:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replacing-stings-within-strings/m-p/5751858#M1303386</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-29T10:38:13Z</dc:date>
    </item>
    <item>
      <title>Re: replacing stings within strings.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replacing-stings-within-strings/m-p/5751859#M1303387</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 logic,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;loop at itab.

if itab-field CO '+-*/$@^&amp;amp;()&amp;lt;&amp;gt;&amp;amp;~.!,' .
replace all occurrences of ',' in itab-field with '#'.

write: / itab-field.
endif.
endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nikhil.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Nikhil Kanegaonkar on May 29, 2009 12:40 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Nikhil Kanegaonkar on May 29, 2009 12:41 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 May 2009 10:39:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replacing-stings-within-strings/m-p/5751859#M1303387</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-29T10:39:20Z</dc:date>
    </item>
    <item>
      <title>Re: replacing stings within strings.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replacing-stings-within-strings/m-p/5751860#M1303388</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;PRE&gt;&lt;CODE&gt;DATA:in_put TYPE string.

in_put = '5646," Name1, Name2 ", 234324 ," comp name , city " , 435345'.

REPLACE ALL OCCURRENCES OF ',' IN in_put WITH '#'.

WRITE:in_put.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 May 2009 10:39:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replacing-stings-within-strings/m-p/5751860#M1303388</guid>
      <dc:creator>former_member188829</dc:creator>
      <dc:date>2009-05-29T10:39:37Z</dc:date>
    </item>
    <item>
      <title>Re: replacing stings within strings.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replacing-stings-within-strings/m-p/5751861#M1303389</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;do u know the specific number of quotes u will get in the string?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if yes..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then split the string at  &lt;U&gt;&lt;STRONG&gt;"&lt;/STRONG&gt;&lt;/U&gt;  &lt;/P&gt;&lt;P&gt;then replace use replace all occurrences of ',' with  '#' on those parts u need.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then concatenate again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 May 2009 10:43:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replacing-stings-within-strings/m-p/5751861#M1303389</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-29T10:43:30Z</dc:date>
    </item>
    <item>
      <title>Re: replacing stings within strings.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replacing-stings-within-strings/m-p/5751862#M1303390</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi vishnu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The comma between doble quotes has to be replaced&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 May 2009 10:47:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replacing-stings-within-strings/m-p/5751862#M1303390</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2009-05-29T10:47:37Z</dc:date>
    </item>
    <item>
      <title>Re: replacing stings within strings.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replacing-stings-within-strings/m-p/5751863#M1303391</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry.It was my mistake.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 May 2009 10:50:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replacing-stings-within-strings/m-p/5751863#M1303391</guid>
      <dc:creator>former_member188829</dc:creator>
      <dc:date>2009-05-29T10:50:56Z</dc:date>
    </item>
    <item>
      <title>Re: replacing stings within strings.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replacing-stings-within-strings/m-p/5751864#M1303392</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;same as some of our friend told...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

DATA:in_put TYPE string.

in_put = '5646," Name1, Name2 ", 234324 ," comp name , city " , 435345'.
write : / in_put.
REPLACE ALL OCCURRENCES OF ',' IN in_put WITH '#'.

WRITE: / in_put.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;even though if u are not satisfied......  U need to loop at the string  "in_put "...&lt;/P&gt;&lt;P&gt;its like...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data: b type int4.
b = strlen( a ).
do b times.

 if a+k(1) = '"'.
   x+k(1) = '!'.

so on...
enddo.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 May 2009 10:51:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replacing-stings-within-strings/m-p/5751864#M1303392</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-29T10:51:38Z</dc:date>
    </item>
    <item>
      <title>Re: replacing stings within strings.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replacing-stings-within-strings/m-p/5751865#M1303393</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;PRE&gt;&lt;CODE&gt;DATA:in_put TYPE string,
     var1 TYPE string,
     var2 TYPE string,
     var3 TYPE string,
     var4 TYPE string,
     var5 TYPE string,
     out_put TYPE string.

DATA:len1 TYPE i.

in_put = '5646," Name1, Name2 ",234324 ," comp name , city ",435345'.

SPLIT in_put AT '"' INTO var1 var2 var3 var4 var5.

len1 = strlen( var1 ).
len1 = len1 - 1.
IF var1+len1(1) NE ',' AND var1+0(1) NE ','.
  REPLACE ALL OCCURRENCES OF ',' IN var1 WITH '#'.
ENDIF.

len1 = strlen( var2 ).
len1 = len1 - 1.
IF var2+len1(1) NE ',' AND var2+0(1) NE ','.
  REPLACE ALL OCCURRENCES OF ',' IN var2 WITH '#'.
ENDIF.

len1 = strlen( var3 ).
len1 = len1 - 1.
IF var3+len1(1) NE ',' AND var3+0(1) NE ','.
  REPLACE ALL OCCURRENCES OF ',' IN var3 WITH '#'.
ENDIF.

len1 = strlen( var4 ).
len1 = len1 - 1.
IF var4+len1(1) NE ',' AND var4+0(1) NE ','.
  REPLACE ALL OCCURRENCES OF ',' IN var4 WITH '#'.
ENDIF.

len1 = strlen( var5 ).
len1 = len1 - 1.
IF var5+len1(1) NE ',' AND var5+0(1) NE ','.
  REPLACE ALL OCCURRENCES OF ',' IN var5 WITH '#'.
ENDIF.

CONCATENATE var1 '"' var2 '"' var3 '"' var4 '"' var5 INTO out_put.

WRITE: out_put.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 May 2009 11:34:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replacing-stings-within-strings/m-p/5751865#M1303393</guid>
      <dc:creator>former_member188829</dc:creator>
      <dc:date>2009-05-29T11:34:48Z</dc:date>
    </item>
    <item>
      <title>Re: replacing stings within strings.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replacing-stings-within-strings/m-p/5751866#M1303394</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Kiran,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tedious but the best option is this one.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

itab-rec = ' 5646," Name1, Name2 ", 234324 ," comp name , city " , 435345 '.
append itab.


loop at itab.

  length = strlen( itab-rec ).

  do length times.

    if itab-rec+i(1) = '"'.
      flag = flag + 1.
    endif.

    if itab-rec+i(1) = ','.

      flag2 = flag mod 2.

      if flag2 &amp;lt;&amp;gt; 0.
        itab-rec+i(1) = '#'.
        modify itab transporting rec.
      endif.

    endif.

    i = i + 1.

  enddo.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 May 2009 11:38:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replacing-stings-within-strings/m-p/5751866#M1303394</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-29T11:38:01Z</dc:date>
    </item>
    <item>
      <title>Re: replacing stings within strings.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replacing-stings-within-strings/m-p/5751867#M1303395</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Welcome&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 May 2009 11:42:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replacing-stings-within-strings/m-p/5751867#M1303395</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-29T11:42:22Z</dc:date>
    </item>
    <item>
      <title>Re: replacing stings within strings.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replacing-stings-within-strings/m-p/5751868#M1303396</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Done &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 May 2009 11:43:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replacing-stings-within-strings/m-p/5751868#M1303396</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2009-05-29T11:43:36Z</dc:date>
    </item>
  </channel>
</rss>

