<?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 matching string in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/matching-string/m-p/5137908#M1190824</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hii,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i want to match a field's substring&lt;/P&gt;&lt;P&gt;like&lt;/P&gt;&lt;P&gt;field  &lt;/P&gt;&lt;P&gt;ABC,&lt;/P&gt;&lt;P&gt;ABD,&lt;/P&gt;&lt;P&gt;ABE&lt;/P&gt;&lt;P&gt;here first two char r constant.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 10 Feb 2009 05:19:36 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-02-10T05:19:36Z</dc:date>
    <item>
      <title>matching string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/matching-string/m-p/5137908#M1190824</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hii,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i want to match a field's substring&lt;/P&gt;&lt;P&gt;like&lt;/P&gt;&lt;P&gt;field  &lt;/P&gt;&lt;P&gt;ABC,&lt;/P&gt;&lt;P&gt;ABD,&lt;/P&gt;&lt;P&gt;ABE&lt;/P&gt;&lt;P&gt;here first two char r constant.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Feb 2009 05:19:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/matching-string/m-p/5137908#M1190824</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-10T05:19:36Z</dc:date>
    </item>
    <item>
      <title>Re: matching string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/matching-string/m-p/5137909#M1190825</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Akshaya,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Welcome to Our Forum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you explain your requirement briefly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Feb 2009 05:21:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/matching-string/m-p/5137909#M1190825</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-10T05:21:54Z</dc:date>
    </item>
    <item>
      <title>Re: matching string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/matching-string/m-p/5137910#M1190826</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;Check this..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

DATA: str1 TYPE string, 
          str2 TYPE string. 

str1 = 'ABCDEFGH'. 
str2 = '*ABC'. 

IF str1 CS str2. 
  WRITE : str1, 'Conatins', str2.
ENDIF. 

Contains String: True if the content of operand2 is contained in operand1. Upper/lower case is not taken
into account, trailing blanks of the left operand are taken into account. If operand1 is of type string and 
initial, or of type c and contains only blank characters, the logical expression is false, unless operand2 
is also of type string and initial, or of type c and only contains blank characters. In this case the logical 
expression is always true. If the result of the comparison is true, sy-fdpos contains the offset of 
operand2 in operand1. If the result of the comparison is negative, sy-fdpos contains the length of 
operand1.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Avinash Kodarapu on Feb 10, 2009 10:52 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Feb 2009 05:22:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/matching-string/m-p/5137910#M1190826</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-10T05:22:22Z</dc:date>
    </item>
    <item>
      <title>Re: matching string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/matching-string/m-p/5137911#M1190827</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Akshaya&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lv_a = ABC.&lt;/P&gt;&lt;P&gt;lv_b = ABD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then we can compare them like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF lv_a(2) = lv_b(2).        "lv_a(2) = 'AB' = lv_b(2)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pushpraj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Feb 2009 05:23:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/matching-string/m-p/5137911#M1190827</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-10T05:23:12Z</dc:date>
    </item>
    <item>
      <title>Re: matching string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/matching-string/m-p/5137912#M1190828</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;   Welcome to SDN&lt;/P&gt;&lt;P&gt;  you can use offsets and compare them &lt;/P&gt;&lt;P&gt;  Thanks&lt;/P&gt;&lt;P&gt;  Viquar Iqbal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Feb 2009 05:24:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/matching-string/m-p/5137912#M1190828</guid>
      <dc:creator>viquar_iqbal</dc:creator>
      <dc:date>2009-02-10T05:24:16Z</dc:date>
    </item>
    <item>
      <title>Re: matching string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/matching-string/m-p/5137913#M1190829</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ok..&lt;/P&gt;&lt;P&gt;wat shud i write&lt;/P&gt;&lt;P&gt;if field = 'AB?'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it shud check &lt;/P&gt;&lt;P&gt;ABC&lt;/P&gt;&lt;P&gt;ABD&lt;/P&gt;&lt;P&gt;ABE&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Feb 2009 05:24:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/matching-string/m-p/5137913#M1190829</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-10T05:24:53Z</dc:date>
    </item>
    <item>
      <title>Re: matching string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/matching-string/m-p/5137914#M1190830</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Akshaya,&lt;/P&gt;&lt;P&gt;  Try using offset because you are using Character strings.&lt;/P&gt;&lt;P&gt;like here in your case ABC and ABD are there.&lt;/P&gt;&lt;P&gt;So you can try it out like,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;w_string&lt;EM&gt;0(2) = w_string1&lt;/EM&gt;0(2).&lt;/P&gt;&lt;P&gt;or if you want the 2nd and 3rd characters you can increment your offset like .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;w_string+W_count(w_count1).&lt;/P&gt;&lt;P&gt;w_count = w+count + 1.&lt;/P&gt;&lt;P&gt;w_count1 = w_count1 + 1 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try using this logic hope it helps!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Much Regards,&lt;/P&gt;&lt;P&gt;Amuktha.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Feb 2009 05:25:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/matching-string/m-p/5137914#M1190830</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-10T05:25:37Z</dc:date>
    </item>
    <item>
      <title>Re: matching string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/matching-string/m-p/5137915#M1190831</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA:
counter TYPE i value '5',
fl_flag,
str1 TYPE char12 VALUE 'good morning',
str2 TYPE char12 VALUE 'good morning'.

DO counter TIMES.
  IF str1(sy-index) = str2(sy-index).
    fl_flag = 'X'.
  ELSE.
    EXIT.
  ENDIF.
ENDDO.
IF fl_flag = 'X'.
  WRITE:
    'letter to letter mapped'.
ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;In the counter variable mention the position till where you want to check the strings.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Sharath&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Feb 2009 05:29:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/matching-string/m-p/5137915#M1190831</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-10T05:29:38Z</dc:date>
    </item>
  </channel>
</rss>

