<?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: Work with strings in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/work-with-strings/m-p/12102420#M1972799</link>
    <description>&lt;P&gt;Or eventually this one: &lt;A href="https://answers.sap.com/questions/651427/algorithm-longest-common-subsequence-problem-in-ab.html"&gt;https://answers.sap.com/questions/651427/algorithm-longest-common-subsequence-problem-in-ab.html&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 06 Oct 2019 14:14:11 GMT</pubDate>
    <dc:creator>Sandra_Rossi</dc:creator>
    <dc:date>2019-10-06T14:14:11Z</dc:date>
    <item>
      <title>Work with strings</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/work-with-strings/m-p/12102418#M1972797</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;
  &lt;P&gt;How to find common characters in two strings, when the user enters strings himself?&lt;/P&gt;</description>
      <pubDate>Sun, 06 Oct 2019 10:46:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/work-with-strings/m-p/12102418#M1972797</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2019-10-06T10:46:32Z</dc:date>
    </item>
    <item>
      <title>Re: Work with strings</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/work-with-strings/m-p/12102419#M1972798</link>
      <description>&lt;P&gt;Linda - I recommend searching&lt;/P&gt;&lt;P&gt;I searched a found some suggestions here: &lt;A href="https://answers.sap.com/questions/3228489/hw-to-compare-two-strings.html"&gt;https://answers.sap.com/questions/3228489/hw-to-compare-two-strings.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Along with a wiki: &lt;A href="https://wiki.scn.sap.com/wiki/display/ABAP/String+Processing"&gt;https://wiki.scn.sap.com/wiki/display/ABAP/String+Processing&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 06 Oct 2019 12:21:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/work-with-strings/m-p/12102419#M1972798</guid>
      <dc:creator>TammyPowlas</dc:creator>
      <dc:date>2019-10-06T12:21:49Z</dc:date>
    </item>
    <item>
      <title>Re: Work with strings</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/work-with-strings/m-p/12102420#M1972799</link>
      <description>&lt;P&gt;Or eventually this one: &lt;A href="https://answers.sap.com/questions/651427/algorithm-longest-common-subsequence-problem-in-ab.html"&gt;https://answers.sap.com/questions/651427/algorithm-longest-common-subsequence-problem-in-ab.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 06 Oct 2019 14:14:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/work-with-strings/m-p/12102420#M1972799</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2019-10-06T14:14:11Z</dc:date>
    </item>
    <item>
      <title>Re: Work with strings</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/work-with-strings/m-p/12102421#M1972800</link>
      <description>&lt;P&gt;&lt;A href="https://answers.sap.com/users/880451/dgu1125.html"&gt;Linda Yan&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;Below is the code for you. I Have defined two Parameters, You can enter any Value in the two Parameters and it will write the common Characters for you. &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;PARAMETERS: p_str1 TYPE string DEFAULT 'TEXT1234',
            p_str2 TYPE string DEFAULT 'TEXT'.

DATA: lv_tmp TYPE string.

lv_tmp = p_str1.
CONCATENATE '[' p_str2 ']' INTO p_str2.
REPLACE ALL OCCURRENCES OF REGEX p_str2 IN p_str1 WITH `` .
CONCATENATE '[' p_str1 ']' INTO p_str1.
REPLACE ALL OCCURRENCES OF REGEX p_str1 IN lv_tmp WITH ''.
WRITE lv_tmp.
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 06 Oct 2019 16:48:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/work-with-strings/m-p/12102421#M1972800</guid>
      <dc:creator>former_member1716</dc:creator>
      <dc:date>2019-10-06T16:48:47Z</dc:date>
    </item>
    <item>
      <title>Re: Work with strings</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/work-with-strings/m-p/12102422#M1972801</link>
      <description>&lt;P&gt;Your code is complex to understand because you change the input variables, so you could use supplementary variables.&lt;/P&gt;&lt;P&gt;So, you mean the result will be TEXT1234 - TEXT = 1234.&lt;/P&gt;&lt;P&gt;EDIT (thanks for correcting me): you mean the result will be TEXT1234  ∩  TEXT  =  TEXT&lt;/P&gt;&lt;P&gt;Note that your code doesn't take into account special characters like -, [, ], etc. You might insert \ before each character to avoid issues.&lt;/P&gt;</description>
      <pubDate>Sun, 06 Oct 2019 17:29:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/work-with-strings/m-p/12102422#M1972801</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2019-10-06T17:29:07Z</dc:date>
    </item>
    <item>
      <title>Re: Work with strings</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/work-with-strings/m-p/12102423#M1972802</link>
      <description>&lt;P&gt;Check this code. str1 and str2 are string entered by  user. &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data: it type i value 0.
data: c(1) type char.

len1 = strlen( str1 ). "find length of first string

loop.
if (it &amp;gt;= len1 - 1).    " check if we are not excedding length of str1
exit.
else.
c = str1 + it(1) .    " find each character of str1
if str2 CS c.          " CS - contains, check if str2 contains c 
write:/ 'matching character' c 'at index' it .    " if contains do something here 
endif. 
endif.
it = it + 1.
endloop.&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 06 Oct 2019 17:53:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/work-with-strings/m-p/12102423#M1972802</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2019-10-06T17:53:45Z</dc:date>
    </item>
    <item>
      <title>Re: Work with strings</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/work-with-strings/m-p/12102424#M1972803</link>
      <description>&lt;A href="https://answers.sap.com/users/1091/sandrarossi.html"&gt;Sandra Rossi&lt;/A&gt;,This Code will Display TEXT as the result and not 1234, since only TEXT is the common character between the both. Yes you are right, we may not be able to compare Special Characters with this code.&lt;P&gt;&lt;A href="https://answers.sap.com/users/880451/dgu1125.html"&gt;Linda Yan&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;You could try the below FM as well, this will handle special characters as well.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;HR_GB_XML_PATTERN_CHECK&lt;/STRONG&gt;&lt;/P&gt;Regards</description>
      <pubDate>Mon, 07 Oct 2019 05:42:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/work-with-strings/m-p/12102424#M1972803</guid>
      <dc:creator>former_member1716</dc:creator>
      <dc:date>2019-10-07T05:42:46Z</dc:date>
    </item>
    <item>
      <title>Re: Work with strings</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/work-with-strings/m-p/12102425#M1972804</link>
      <description>&lt;P&gt;LOOP alone? Do you mean DO...ENDDO?&lt;/P&gt;</description>
      <pubDate>Mon, 07 Oct 2019 06:26:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/work-with-strings/m-p/12102425#M1972804</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2019-10-07T06:26:35Z</dc:date>
    </item>
    <item>
      <title>Re: Work with strings</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/work-with-strings/m-p/12102426#M1972805</link>
      <description>&lt;A href="https://answers.sap.com/users/880451/dgu1125.html"&gt;Linda Yan&lt;/A&gt; As per the &lt;A href="https://community.sap.com/resources/rules-of-engagement"&gt;SAP rules of engagement of SAP Community&lt;/A&gt; (forum), private information is considered as "unacceptable content" (no email, no confidential data, etc.)</description>
      <pubDate>Tue, 08 Oct 2019 22:11:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/work-with-strings/m-p/12102426#M1972805</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2019-10-08T22:11:56Z</dc:date>
    </item>
  </channel>
</rss>

