<?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: Contains String in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/contains-string/m-p/7806926#M1587683</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi showthousand,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;format code as code, give us the values you use and explaion what works and what does not work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 19 Mar 2011 20:04:44 GMT</pubDate>
    <dc:creator>Clemenss</dc:creator>
    <dc:date>2011-03-19T20:04:44Z</dc:date>
    <item>
      <title>Contains String</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/contains-string/m-p/7806921#M1587678</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a problem where value 1 contains 'ABCDEDFEGH' and valu2 contanis 'ABCDE'.  I am using the CS operator but its not working.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      IF value1 CS value2.&lt;/P&gt;&lt;P&gt;          THEN do processing&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am actually looking for a string BESPAK in a string containg 'BESPAK PLC / KINGS' - but it doesn't work see the below exmaples&lt;/P&gt;&lt;P&gt;        lv_len = STRLEN( ls_cust-customer ).&lt;/P&gt;&lt;P&gt;        lv_string = ls_cust-customer(lv_len).&lt;/P&gt;&lt;P&gt;        lv_string2 = gs_cust-customer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;THIS FAILS?????&lt;/P&gt;&lt;P&gt;        IF lv_string2 CS lv_string.&lt;/P&gt;&lt;P&gt;          gs_cust-customer = ls_cust-customer.&lt;/P&gt;&lt;P&gt;          COLLECT gs_cust INTO gt_cust.&lt;/P&gt;&lt;P&gt;        ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;THIS WORKS&lt;/P&gt;&lt;P&gt;        IF 'BESPAK PLC' CS 'BESPAK'..&lt;/P&gt;&lt;P&gt;          WRITE: 'Yeah'.&lt;/P&gt;&lt;P&gt;        ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;THIS WORKS&lt;/P&gt;&lt;P&gt;        IF gs_cust-customer CS 'BESPAK'.&lt;/P&gt;&lt;P&gt;          COLLECT gs_cust INTO gt_cust.&lt;/P&gt;&lt;P&gt;        ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: showthousand on Mar 16, 2011 6:23 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Mar 2011 22:04:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/contains-string/m-p/7806921#M1587678</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-03-16T22:04:29Z</dc:date>
    </item>
    <item>
      <title>Re: Contains String</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/contains-string/m-p/7806922#M1587679</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;Please check in debugg the values of lv_string2 and lv_string. &lt;/P&gt;&lt;P&gt;You  must have the values lv_string2 = 'BESPAK' and lv_string = 'BESPAK PLC'. That means it is working fine since lv_string2 does not have whole string 'BESPAK PLC' .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reverse your condition it will work.&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;Sachin&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: sachin G patil on Mar 17, 2011 8:49 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Mar 2011 03:09:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/contains-string/m-p/7806922#M1587679</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-03-17T03:09:18Z</dc:date>
    </item>
    <item>
      <title>Re: Contains String</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/contains-string/m-p/7806923#M1587680</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;change your statement like this, it will definitely work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF lv_string CS lv_string2 .&lt;/P&gt;&lt;P&gt;gs_cust-customer = ls_cust-customer.&lt;/P&gt;&lt;P&gt;COLLECT gs_cust INTO gt_cust.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Mar 2011 04:20:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/contains-string/m-p/7806923#M1587680</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-03-17T04:20:21Z</dc:date>
    </item>
    <item>
      <title>Re: Contains String</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/contains-string/m-p/7806924#M1587681</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Reverse your condition.&lt;/P&gt;&lt;P&gt;because lv_string2 is smaller than lv_string.&lt;/P&gt;&lt;P&gt;hence lv_string2 is a part of lv_string.&lt;/P&gt;&lt;P&gt;we need to check whether lv_string contains the values similar to lv_string2.&lt;/P&gt;&lt;P&gt;so your statement should be like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if lv_string CS lv_string2.&lt;/P&gt;&lt;P&gt;do processing.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;LG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Mar 2011 07:27:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/contains-string/m-p/7806924#M1587681</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-03-17T07:27:59Z</dc:date>
    </item>
    <item>
      <title>Re: Contains String</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/contains-string/m-p/7806925#M1587682</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are your variables typed the same or is one STRING and the other C&amp;lt;nn&amp;gt;? This can cause subtle errors especially with the logic of trailing blanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Mar 2011 20:57:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/contains-string/m-p/7806925#M1587682</guid>
      <dc:creator>former_member183804</dc:creator>
      <dc:date>2011-03-18T20:57:05Z</dc:date>
    </item>
    <item>
      <title>Re: Contains String</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/contains-string/m-p/7806926#M1587683</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi showthousand,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;format code as code, give us the values you use and explaion what works and what does not work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 Mar 2011 20:04:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/contains-string/m-p/7806926#M1587683</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2011-03-19T20:04:44Z</dc:date>
    </item>
  </channel>
</rss>

