<?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: Remove unwanted chars from a string in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/remove-unwanted-chars-from-a-string/m-p/2086599#M433385</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Clemens,&lt;/P&gt;&lt;P&gt;  if u only want the data enclosed in the parentheses[] along with the parentheses then this program will work fine for you.  Check the same and get back to us. If u can elaborate ur reqmt then we can help in a better way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  zyh284_test2.&lt;/P&gt;&lt;P&gt;DATA:&lt;/P&gt;&lt;P&gt; w_string TYPE string VALUE 'Jose[12] M[36]ller',&lt;/P&gt;&lt;P&gt; w_sub_string TYPE string,&lt;/P&gt;&lt;P&gt; w_int TYPE i,&lt;/P&gt;&lt;P&gt; w_char,&lt;/P&gt;&lt;P&gt; w_counter TYPE i,&lt;/P&gt;&lt;P&gt; fl_flag.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;w_int = STRLEN( w_string ).&lt;/P&gt;&lt;P&gt;w_counter = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DO w_int TIMES.&lt;/P&gt;&lt;P&gt;  w_char = w_string+w_counter(1).&lt;/P&gt;&lt;P&gt;  IF w_char EQ '['.&lt;/P&gt;&lt;P&gt;    fl_flag = 'X'.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF fl_flag = 'X'.&lt;/P&gt;&lt;P&gt;    CONCATENATE  w_sub_string w_char INTO w_sub_string.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF w_char EQ ']'.&lt;/P&gt;&lt;P&gt;    CLEAR fl_flag.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;  w_counter = w_counter  + 1.&lt;/P&gt;&lt;P&gt;ENDDO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE:w_sub_string.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 17 Apr 2007 12:53:10 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-04-17T12:53:10Z</dc:date>
    <item>
      <title>Remove unwanted chars from a string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/remove-unwanted-chars-from-a-string/m-p/2086597#M433383</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;mi special requirement is this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have a string containing:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"Jose[12] M[36]ller" and i only want to see [12][36] afterwards, so how could i remove the remaining characters ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Apr 2007 11:59:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/remove-unwanted-chars-from-a-string/m-p/2086597#M433383</guid>
      <dc:creator>former_member5350</dc:creator>
      <dc:date>2007-04-17T11:59:57Z</dc:date>
    </item>
    <item>
      <title>Re: Remove unwanted chars from a string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/remove-unwanted-chars-from-a-string/m-p/2086598#M433384</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;Just paste the following code, I hope this solves your Query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data :&lt;/P&gt;&lt;P&gt;  w_char(30) value 'Jose[12] M[36]ller',&lt;/P&gt;&lt;P&gt;  w_copy like w_char,&lt;/P&gt;&lt;P&gt;  w_off type i,&lt;/P&gt;&lt;P&gt;  w_length type i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;w_length = strlen( w_char ).&lt;/P&gt;&lt;P&gt;do w_length times.&lt;/P&gt;&lt;P&gt;if w_char+w_off(1) CN sy-abcde&lt;/P&gt;&lt;P&gt;                   and w_char+w_off(1) CN 'abcdefghijklmnopqrstuvwxyz'.&lt;/P&gt;&lt;P&gt;concatenate w_copy w_char+w_off(1) into w_copy.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;add 1 to w_off.&lt;/P&gt;&lt;P&gt;enddo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write w_copy.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;sandhya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Apr 2007 12:34:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/remove-unwanted-chars-from-a-string/m-p/2086598#M433384</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-17T12:34:29Z</dc:date>
    </item>
    <item>
      <title>Re: Remove unwanted chars from a string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/remove-unwanted-chars-from-a-string/m-p/2086599#M433385</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Clemens,&lt;/P&gt;&lt;P&gt;  if u only want the data enclosed in the parentheses[] along with the parentheses then this program will work fine for you.  Check the same and get back to us. If u can elaborate ur reqmt then we can help in a better way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  zyh284_test2.&lt;/P&gt;&lt;P&gt;DATA:&lt;/P&gt;&lt;P&gt; w_string TYPE string VALUE 'Jose[12] M[36]ller',&lt;/P&gt;&lt;P&gt; w_sub_string TYPE string,&lt;/P&gt;&lt;P&gt; w_int TYPE i,&lt;/P&gt;&lt;P&gt; w_char,&lt;/P&gt;&lt;P&gt; w_counter TYPE i,&lt;/P&gt;&lt;P&gt; fl_flag.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;w_int = STRLEN( w_string ).&lt;/P&gt;&lt;P&gt;w_counter = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DO w_int TIMES.&lt;/P&gt;&lt;P&gt;  w_char = w_string+w_counter(1).&lt;/P&gt;&lt;P&gt;  IF w_char EQ '['.&lt;/P&gt;&lt;P&gt;    fl_flag = 'X'.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF fl_flag = 'X'.&lt;/P&gt;&lt;P&gt;    CONCATENATE  w_sub_string w_char INTO w_sub_string.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF w_char EQ ']'.&lt;/P&gt;&lt;P&gt;    CLEAR fl_flag.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;  w_counter = w_counter  + 1.&lt;/P&gt;&lt;P&gt;ENDDO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE:w_sub_string.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Apr 2007 12:53:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/remove-unwanted-chars-from-a-string/m-p/2086599#M433385</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-17T12:53:10Z</dc:date>
    </item>
    <item>
      <title>Re: Remove unwanted chars from a string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/remove-unwanted-chars-from-a-string/m-p/2086600#M433386</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, this is just great and does as by my requirement!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Apr 2007 13:04:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/remove-unwanted-chars-from-a-string/m-p/2086600#M433386</guid>
      <dc:creator>former_member5350</dc:creator>
      <dc:date>2007-04-17T13:04:17Z</dc:date>
    </item>
  </channel>
</rss>

