<?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: FM for String Comparision in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm-for-string-comparision/m-p/12214004#M1983108</link>
    <description>&lt;P&gt;Thank you for the short clarification on your requirements. Its still not a 100% clear on what the use-case is and what the input paramaters can be, but for now, see my answer above.&lt;/P&gt;&lt;P&gt;As a side note: Please use the comment function for comments to a specific thread, not the answer function to the question itself.&lt;/P&gt;</description>
    <pubDate>Wed, 18 Mar 2020 03:26:13 GMT</pubDate>
    <dc:creator>michael_piesche</dc:creator>
    <dc:date>2020-03-18T03:26:13Z</dc:date>
    <item>
      <title>FM for String Comparision</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm-for-string-comparision/m-p/12213990#M1983094</link>
      <description>&lt;P&gt;I have two variables like ABC and CDS and have text in those. Just I wanted to compare whether both are having same text or different text. If some characters are match then want to display those match characters...&lt;/P&gt;
  &lt;P&gt;Let me know any FM...&lt;/P&gt;</description>
      <pubDate>Tue, 17 Mar 2020 12:34:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fm-for-string-comparision/m-p/12213990#M1983094</guid>
      <dc:creator>former_member666129</dc:creator>
      <dc:date>2020-03-17T12:34:03Z</dc:date>
    </item>
    <item>
      <title>Re: FM for String Comparision</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm-for-string-comparision/m-p/12213991#M1983095</link>
      <description>&lt;P&gt;You can use CS operation&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.sap.com/doc/saphelp_470/4.7/en-US/fc/eb3516358411d1829f0000e829fbfe/content.htm?no_cache=true" target="_blank"&gt;string compare&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Mar 2020 12:38:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fm-for-string-comparision/m-p/12213991#M1983095</guid>
      <dc:creator>former_member532216</dc:creator>
      <dc:date>2020-03-17T12:38:53Z</dc:date>
    </item>
    <item>
      <title>Re: FM for String Comparision</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm-for-string-comparision/m-p/12213992#M1983096</link>
      <description>&lt;P&gt;CO is not Contain Only ?&lt;/P&gt;</description>
      <pubDate>Tue, 17 Mar 2020 12:53:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fm-for-string-comparision/m-p/12213992#M1983096</guid>
      <dc:creator>FredericGirod</dc:creator>
      <dc:date>2020-03-17T12:53:53Z</dc:date>
    </item>
    <item>
      <title>Re: FM for String Comparision</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm-for-string-comparision/m-p/12213993#M1983097</link>
      <description>&lt;P&gt;Dear Hasan&lt;/P&gt;&lt;P&gt;There are string operations &lt;/P&gt;&lt;P&gt;You can refer to this link&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.sap.com/doc/saphelp_46c/4.6C/en-US/fc/eb3516358411d1829f0000e829fbfe/content.htm?no_cache=true"&gt;https://help.sap.com/doc/saphelp_46c/4.6C/en-US/fc/eb3516358411d1829f0000e829fbfe/content.htm?no_cache=true&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Mar 2020 12:56:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fm-for-string-comparision/m-p/12213993#M1983097</guid>
      <dc:creator>venkateswaran_k</dc:creator>
      <dc:date>2020-03-17T12:56:51Z</dc:date>
    </item>
    <item>
      <title>Re: FM for String Comparision</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm-for-string-comparision/m-p/12213994#M1983098</link>
      <description>&lt;P&gt;I did not check my url link.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Mar 2020 13:04:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fm-for-string-comparision/m-p/12213994#M1983098</guid>
      <dc:creator>former_member532216</dc:creator>
      <dc:date>2020-03-17T13:04:55Z</dc:date>
    </item>
    <item>
      <title>Re: FM for String Comparision</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm-for-string-comparision/m-p/12213995#M1983099</link>
      <description>&lt;P&gt;Sorry, I did not get you. &lt;/P&gt;&lt;P&gt;you are not able to open the link?&lt;/P&gt;</description>
      <pubDate>Tue, 17 Mar 2020 13:06:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fm-for-string-comparision/m-p/12213995#M1983099</guid>
      <dc:creator>venkateswaran_k</dc:creator>
      <dc:date>2020-03-17T13:06:55Z</dc:date>
    </item>
    <item>
      <title>Re: FM for String Comparision</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm-for-string-comparision/m-p/12213996#M1983100</link>
      <description>&lt;P&gt;I Think CS we can only get contain string.. if exist then true.. but we did not get which string is matched....&lt;/P&gt;</description>
      <pubDate>Tue, 17 Mar 2020 14:02:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fm-for-string-comparision/m-p/12213996#M1983100</guid>
      <dc:creator>former_member666129</dc:creator>
      <dc:date>2020-03-17T14:02:09Z</dc:date>
    </item>
    <item>
      <title>Re: FM for String Comparision</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm-for-string-comparision/m-p/12213997#M1983101</link>
      <description>&lt;P&gt;Checking whether they are same or different should be easy, right ?&lt;/P&gt;&lt;P&gt;But what are your requirements on checking for matches? You need to be more specific what kind of matches your are looking for and what the output should be? Because there can be more than 1 match.&lt;/P&gt;&lt;P&gt;ABC = 'ABKLBYZ'.&lt;BR /&gt;CDS = 'ABLKAYZ'.&lt;/P&gt;&lt;P&gt;I 'find' the following matches for above example:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;AB&lt;/LI&gt;&lt;LI&gt;K&lt;/LI&gt;&lt;LI&gt;L&lt;/LI&gt;&lt;LI&gt;A&lt;/LI&gt;&lt;LI&gt;B&lt;/LI&gt;&lt;LI&gt;YZ&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;=&amp;gt; What 'matches' are you looking for? Are you just looking for matching prefixes of your variable, which should also be fairly easy, right?&lt;/P&gt;</description>
      <pubDate>Tue, 17 Mar 2020 14:05:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fm-for-string-comparision/m-p/12213997#M1983101</guid>
      <dc:creator>michael_piesche</dc:creator>
      <dc:date>2020-03-17T14:05:11Z</dc:date>
    </item>
    <item>
      <title>Re: FM for String Comparision</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm-for-string-comparision/m-p/12213998#M1983102</link>
      <description>&lt;P&gt;Hi Himanshu&lt;/P&gt;&lt;P&gt;You may check the following  - example&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;split string2 at space into table data(wordlist).
then loop at wordlist
         match( val = &amp;lt;your_searchable_string&amp;gt; regex = &amp;lt;wordlist-word&amp;gt; occ = 1 )
     endloop&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;may need to correct for syntax&lt;/P&gt;</description>
      <pubDate>Tue, 17 Mar 2020 14:16:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fm-for-string-comparision/m-p/12213998#M1983102</guid>
      <dc:creator>venkateswaran_k</dc:creator>
      <dc:date>2020-03-17T14:16:57Z</dc:date>
    </item>
    <item>
      <title>Re: FM for String Comparision</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm-for-string-comparision/m-p/12213999#M1983103</link>
      <description>&lt;P&gt;You mean a "diff" of strings? Eventually look at this &lt;A href="https://answers.sap.com/questions/651427/algorithm-longest-common-subsequence-problem-in-ab.html"&gt;other question&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Mar 2020 15:04:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fm-for-string-comparision/m-p/12213999#M1983103</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2020-03-17T15:04:48Z</dc:date>
    </item>
    <item>
      <title>Re: FM for String Comparision</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm-for-string-comparision/m-p/12214000#M1983104</link>
      <description>&lt;P&gt;Hi &lt;SPAN class="mention-scrubbed"&gt;michael.piesche&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;as per your example.. i am looking for only AB.....&lt;/P&gt;</description>
      <pubDate>Tue, 17 Mar 2020 15:10:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fm-for-string-comparision/m-p/12214000#M1983104</guid>
      <dc:creator>former_member666129</dc:creator>
      <dc:date>2020-03-17T15:10:43Z</dc:date>
    </item>
    <item>
      <title>Re: FM for String Comparision</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm-for-string-comparision/m-p/12214001#M1983105</link>
      <description>&lt;SPAN class="mention-scrubbed"&gt;himanshukawatra.02&lt;/SPAN&gt;&lt;P&gt;, so, you are only interested in a full match or a matching prefix, correct?In that case, the following coding would be simple and totally sufficient, but might have to tested and definitly be adapted in case your variables abc and cds are are either different length or strings to avoid shortdumps when one variables content is longer than the other. (eg use strlen( var ) to check the length of the content of your variable and only compare against partial prefixes of your variables abs and cds, when the prefix is shorter than the length of the content of your variable).&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA match LIKE abc.  " matching prefix
DATA fullmatchfound   TYPE boole_d.
DATA prefixmatchfound TYPE boole_d.

IF abc = cds.
 match = abc.
 fullmatchfound = abap_true.
ELSE.
  sy-subrc = 0.
  WHILE sy-subrc = 0.
    IF abc(sy-index) = cds(sy-index).
      match = abc(sy-index).
      prefixmatchfound = abap_true.
    ELSE.
      sy-subrc = 8.
    ENDIF.
  ENDWHILE.
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Let me know if that helps. (I didnt test it, so let me know if it doesnt compile or whether it throws an unexpected dump)&lt;/P&gt;</description>
      <pubDate>Tue, 17 Mar 2020 15:38:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fm-for-string-comparision/m-p/12214001#M1983105</guid>
      <dc:creator>michael_piesche</dc:creator>
      <dc:date>2020-03-17T15:38:05Z</dc:date>
    </item>
    <item>
      <title>Re: FM for String Comparision</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm-for-string-comparision/m-p/12214002#M1983106</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;DATA: lv_abc TYPE c LENGTH 10 VALUE 'ABCDEF',
      lv_def TYPE c LENGTH 10 VALUE 'ABCDEFG'.
  IF lv_abc CS lv_def AND strlen( lv_abc ) EQ strlen( lv_def ).
    WRITE : 'Same string'.
  ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 17 Mar 2020 17:57:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fm-for-string-comparision/m-p/12214002#M1983106</guid>
      <dc:creator>former_member532216</dc:creator>
      <dc:date>2020-03-17T17:57:03Z</dc:date>
    </item>
    <item>
      <title>Re: FM for String Comparision</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm-for-string-comparision/m-p/12214003#M1983107</link>
      <description>&lt;P&gt;I created a code that show all the intersection.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;types: begin of t_texto,&lt;BR /&gt;
 texto type char10,&lt;BR /&gt;
 end of t_texto.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
DATA : x type char10 value 'ABCD',&lt;BR /&gt;
 y TYPE char10 value 'XBCYZ',&lt;BR /&gt;
 z type char10,&lt;BR /&gt;
 n type int2,&lt;BR /&gt;
 n1 type int2,&lt;BR /&gt;
 n2 type int2,&lt;BR /&gt;
 n3 type int2,&lt;BR /&gt;
&lt;BR /&gt;
 t1 type STANDARD TABLE OF t_texto,&lt;BR /&gt;
 r2 type RANGE OF t_texto,&lt;BR /&gt;
 sr like line of r2,&lt;BR /&gt;
 t3 TYPE STANDARD TABLE OF t_texto.&lt;BR /&gt;
&lt;BR /&gt;
n = strlen( x ).&lt;BR /&gt;
&lt;BR /&gt;
clear n1.&lt;BR /&gt;
&lt;BR /&gt;
do n times.&lt;BR /&gt;
 n2 = 1.&lt;BR /&gt;
 while n2 &amp;lt;= n.&lt;BR /&gt;
 z = x+n1(n2).&lt;BR /&gt;
 APPEND z to t1.&lt;BR /&gt;
 add 1 to n2.&lt;BR /&gt;
 n3 = n1 + n2.&lt;BR /&gt;
 if n3 &amp;gt; n.&lt;BR /&gt;
 exit.&lt;BR /&gt;
 ENDIF.&lt;BR /&gt;
 ENDWHILE.&lt;BR /&gt;
 add 1 to n1.&lt;BR /&gt;
ENDDO.&lt;BR /&gt;
&lt;BR /&gt;
n = STRLEN( Y ).&lt;BR /&gt;
&lt;BR /&gt;
clear n1.&lt;BR /&gt;
&lt;BR /&gt;
DO n TIMES.&lt;BR /&gt;
 n2 = 1.&lt;BR /&gt;
 WHILE n2 &amp;lt;= n.&lt;BR /&gt;
 Z = y+n1(n2).&lt;BR /&gt;
 &lt;BR /&gt;
 sr-sign = 'I'.&lt;BR /&gt;
 sr-low = z.&lt;BR /&gt;
 sr-option = 'EQ'.&lt;BR /&gt;
 &lt;BR /&gt;
 APPEND sr TO r2.&lt;BR /&gt;
 &lt;BR /&gt;
 ADD 1 TO n2.&lt;BR /&gt;
 n3 = n1 + n2.&lt;BR /&gt;
 IF n3 &amp;gt; n.&lt;BR /&gt;
 EXIT.&lt;BR /&gt;
 ENDIF.&lt;BR /&gt;
 ENDWHILE.&lt;BR /&gt;
 ADD 1 TO n1.&lt;BR /&gt;
ENDDO.&lt;BR /&gt;
&lt;BR /&gt;
delete t1 where texto not in r2.&lt;BR /&gt;
&lt;BR /&gt;
LOOP at t1 into z.&lt;BR /&gt;
 write: / z.&lt;BR /&gt;
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 17 Mar 2020 19:12:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fm-for-string-comparision/m-p/12214003#M1983107</guid>
      <dc:creator>former_member618077</dc:creator>
      <dc:date>2020-03-17T19:12:58Z</dc:date>
    </item>
    <item>
      <title>Re: FM for String Comparision</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm-for-string-comparision/m-p/12214004#M1983108</link>
      <description>&lt;P&gt;Thank you for the short clarification on your requirements. Its still not a 100% clear on what the use-case is and what the input paramaters can be, but for now, see my answer above.&lt;/P&gt;&lt;P&gt;As a side note: Please use the comment function for comments to a specific thread, not the answer function to the question itself.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Mar 2020 03:26:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fm-for-string-comparision/m-p/12214004#M1983108</guid>
      <dc:creator>michael_piesche</dc:creator>
      <dc:date>2020-03-18T03:26:13Z</dc:date>
    </item>
    <item>
      <title>Re: FM for String Comparision</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm-for-string-comparision/m-p/12214005#M1983109</link>
      <description>&lt;P&gt;&lt;SPAN class="mention-scrubbed"&gt;himanshukawatra.02&lt;/SPAN&gt;, please follow up on your open question.&lt;/P&gt;&lt;UL&gt;
&lt;LI&gt;comment answers or your question if there are still open issues.&lt;/LI&gt;&lt;LI&gt;otherwise mark an answer as accepted if it helped you solve your problem&lt;/LI&gt;&lt;LI&gt;or post an answer of yourself and accept it if you found another useful solution yourself&lt;/LI&gt;&lt;LI&gt;or redirect your question to another question that is related and was useful to solve your problem&lt;/LI&gt;&lt;LI&gt;in the end, close your question&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Wed, 13 May 2020 14:38:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fm-for-string-comparision/m-p/12214005#M1983109</guid>
      <dc:creator>michael_piesche</dc:creator>
      <dc:date>2020-05-13T14:38:15Z</dc:date>
    </item>
  </channel>
</rss>

