<?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: Problem with string finding. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-string-finding/m-p/5154276#M1194162</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;Take 'i004' into one character variable.&lt;/P&gt;&lt;P&gt;Take the string into a string variable .&lt;/P&gt;&lt;P&gt;search string for 'i004' .&lt;/P&gt;&lt;P&gt;if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;write &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; 'Found ',sy-fdpos.---&amp;gt; position of the string &lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Else use abbreviated option with the above search&lt;/P&gt;&lt;P&gt;search string for 'i4' abbreviated .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This searches for i4 where ever it is in the string&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 06 Feb 2009 05:24:29 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-02-06T05:24:29Z</dc:date>
    <item>
      <title>Problem with string finding.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-string-finding/m-p/5154271#M1194157</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a string with the following values:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;B1;;2009/11 Claim: 007324;SA;20081006;20091101;I004;;1032000MAR;;750;31;500481;Michael O`Leary   &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to find the 'i001' with in this string.I can't hard find this value becuase it will come from file.It does contain any value other than this with in that postion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to find it through Find Rgex.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anybody please help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Feb 2009 16:27:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-string-finding/m-p/5154271#M1194157</guid>
      <dc:creator>tarangini_katta</dc:creator>
      <dc:date>2009-02-05T16:27:39Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with string finding.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-string-finding/m-p/5154272#M1194158</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;    Do as below,&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;p = 'B1;;2009/11 Claim:i001:uuiiooiji001'.

FIND 'i001' IN p.

IF sy-subrc = 0.
  your code
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What exactly you wan to do if it is found that value?&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;Bala Krishna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Feb 2009 16:41:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-string-finding/m-p/5154272#M1194158</guid>
      <dc:creator>former_member585060</dc:creator>
      <dc:date>2009-02-05T16:41:31Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with string finding.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-string-finding/m-p/5154273#M1194159</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try something like this way&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data: v_str     type string ,
      t_result  type match_result_tab ,
      wa_result like line of t_result,
      lt_result type match_result_tab.
v_str = 'B1;;2009/11 Claim: 007324;SA;20081006;20091101;I004;;1032000MAR;;750;31;500481;Michael O`Leary
'.
data matcher type ref to cl_abap_matcher.
matcher = cl_abap_matcher=&amp;gt;create(
  pattern = `^.* (i001) .*$`
  ignore_case = 'X'
  text = v_str ).
lt_result = matcher-&amp;gt;find_all( ).
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Feb 2009 16:53:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-string-finding/m-p/5154273#M1194159</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2009-02-05T16:53:34Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with string finding.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-string-finding/m-p/5154274#M1194160</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA:
  w_string TYPE string VALUE 'B1;;2009/11 Claim: 007324;SA;20081006;20091101;I004;;1032000MAR;;750;31;500481;Michael O`Leary',
  w_sub_string(4) TYPE c VALUE 'I004',
  w_lenght1 TYPE i,
  w_lenght2 TYPE i,
  w_offset  TYPE i,

  w_result TYPE string.

w_lenght1 = STRLEN( w_string ).
w_lenght2 = STRLEN( w_sub_string ).

IF w_string CS w_sub_string.
  w_offset = sy-fdpos.
  w_result  = w_string+w_offset(w_lenght2).
  WRITE: w_result.
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Feb 2009 17:07:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-string-finding/m-p/5154274#M1194160</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-05T17:07:03Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with string finding.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-string-finding/m-p/5154275#M1194161</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi tarangini,&lt;/P&gt;&lt;P&gt;chk if  this helps...&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data:
w_str1 type string value  'B1;;2009/11Claim:007324;SA;20081006;20091101;I004;;1032000MAR;;750;31;500481;Michael O`Leary ',

w_str2 type string value 'I004'.
 
 search w_str1 for w_str2.
 
 if sy-subrc = 0.
 write: sy-fdpos. " position of w_str2 in w_str1.
 endif.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Regards,&lt;/P&gt;&lt;P&gt;Mdi Deeba Najam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Feb 2009 05:12:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-string-finding/m-p/5154275#M1194161</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-06T05:12:27Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with string finding.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-string-finding/m-p/5154276#M1194162</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;Take 'i004' into one character variable.&lt;/P&gt;&lt;P&gt;Take the string into a string variable .&lt;/P&gt;&lt;P&gt;search string for 'i004' .&lt;/P&gt;&lt;P&gt;if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;write &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; 'Found ',sy-fdpos.---&amp;gt; position of the string &lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Else use abbreviated option with the above search&lt;/P&gt;&lt;P&gt;search string for 'i4' abbreviated .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This searches for i4 where ever it is in the string&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Feb 2009 05:24:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-string-finding/m-p/5154276#M1194162</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-06T05:24:29Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with string finding.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-string-finding/m-p/5154277#M1194163</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Hope may be helpful,&lt;/P&gt;&lt;P&gt;          data:&lt;/P&gt;&lt;P&gt;	w_string type string,&lt;/P&gt;&lt;P&gt;	w_char(10) type c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;w_string  = 'B1;;2009/11 Claim:007324;SA;20081006;20091101;I004;;1032000MAR;;750;31;500481;Michael O`Leary '.&lt;/P&gt;&lt;P&gt;w_char = 'i001'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;search w_string for w_char.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;write: / sy-fdpos.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Feb 2009 06:27:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-string-finding/m-p/5154277#M1194163</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-06T06:27:15Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with string finding.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-string-finding/m-p/5154278#M1194164</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As i specified in my question is should not hard code the the value 'i004'. i want to get this based on the Postion.I want to find the I004'.In the file in that postion it may conatin I004 or anythin else.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I dont want to hard code the value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Feb 2009 08:55:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-string-finding/m-p/5154278#M1194164</guid>
      <dc:creator>tarangini_katta</dc:creator>
      <dc:date>2009-02-06T08:55:22Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with string finding.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-string-finding/m-p/5154279#M1194165</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One-way is to use SubString function to find the string for the specified position, for this u've to use Native Sql.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check this code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA:
  v_word TYPE string VALUE
  'B1;;2009/11 Claim: 007324;SA;20081006;20091101;I004;;1032000MAR;;750;31;500481'.

  DATA: v_string type string.

parameters: pos type i,
            len type i.

exec sql.
select substr(:v_word, :pos,:len) from dual into :v_string
endexec.

write:/ v_string.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks\&lt;/P&gt;&lt;P&gt;Mahesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Feb 2009 09:57:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-string-finding/m-p/5154279#M1194165</guid>
      <dc:creator>former_member222860</dc:creator>
      <dc:date>2009-02-06T09:57:09Z</dc:date>
    </item>
  </channel>
</rss>

