<?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: Comparison string with conditional statement in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/comparison-string-with-conditional-statement/m-p/11879421#M1960490</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ujjwal,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can not use CS , CA ... with When inside CASE statement..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;forget CASE satatement instead use IF..&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;vinay..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 21 Sep 2016 07:14:24 GMT</pubDate>
    <dc:creator>former_member185116</dc:creator>
    <dc:date>2016-09-21T07:14:24Z</dc:date>
    <item>
      <title>Comparison string with conditional statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/comparison-string-with-conditional-statement/m-p/11879416#M1960485</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance for you help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i want to write a code using comparison string (CS, CA,NA,NS etc) with using case statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for ex- there is a filed lv_string which is having descriptions. so i want to validate some words in descriptions and want write code using CASE instead of IF- ELSE . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;case lv_string.&lt;/P&gt;&lt;P&gt;when contains the letter 'text' or 'word'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so how can i validate or write the code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Sep 2016 14:59:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/comparison-string-with-conditional-statement/m-p/11879416#M1960485</guid>
      <dc:creator>Private_Member_205888</dc:creator>
      <dc:date>2016-09-20T14:59:22Z</dc:date>
    </item>
    <item>
      <title>Re: Comparison string with conditional statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/comparison-string-with-conditional-statement/m-p/11879417#M1960486</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ujjwal, Any specific reason you want to use "CASE".?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Sep 2016 04:50:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/comparison-string-with-conditional-statement/m-p/11879417#M1960486</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-09-21T04:50:15Z</dc:date>
    </item>
    <item>
      <title>Re: Comparison string with conditional statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/comparison-string-with-conditional-statement/m-p/11879418#M1960487</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;Try &lt;/P&gt;&lt;P&gt;Declare&amp;nbsp;&amp;nbsp; the Ranges.&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;Ramesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Sep 2016 05:14:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/comparison-string-with-conditional-statement/m-p/11879418#M1960487</guid>
      <dc:creator>VenkatRamesh_V</dc:creator>
      <dc:date>2016-09-21T05:14:45Z</dc:date>
    </item>
    <item>
      <title>Re: Comparison string with conditional statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/comparison-string-with-conditional-statement/m-p/11879419#M1960488</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Saransh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The reason behind using CASE is we can reduce no. of lines code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please let me know if you any other efficient way to do it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Ujjwal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Sep 2016 05:53:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/comparison-string-with-conditional-statement/m-p/11879419#M1960488</guid>
      <dc:creator>Private_Member_205888</dc:creator>
      <dc:date>2016-09-21T05:53:56Z</dc:date>
    </item>
    <item>
      <title>Re: Comparison string with conditional statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/comparison-string-with-conditional-statement/m-p/11879420#M1960489</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;I dont think you can make use of case statement when you are comparing string as your dont know what other words will come in LV_STRING along with the words which you want to compare using case statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ABAP provide statements and classes for regular expression operation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ABAP statement – REGEX ABAP statements&lt;/P&gt;&lt;P&gt;FIND and REPLACE support the use of regular expression with additional clause REGEX.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FIND statement searches the given text for a match with a regular expression, as shown below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FIND REGEX 'text*word' IN LV_STRING.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FIND ALL OCCURRENCES OF REGEX pattern IN text&lt;/P&gt;&lt;P&gt;RESULTS match_result. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All the matching expression will be stored in match_result variables with type MATCH_RESULT_TAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Sep 2016 06:07:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/comparison-string-with-conditional-statement/m-p/11879420#M1960489</guid>
      <dc:creator>Chintu6august</dc:creator>
      <dc:date>2016-09-21T06:07:14Z</dc:date>
    </item>
    <item>
      <title>Re: Comparison string with conditional statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/comparison-string-with-conditional-statement/m-p/11879421#M1960490</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ujjwal,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can not use CS , CA ... with When inside CASE statement..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;forget CASE satatement instead use IF..&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;vinay..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Sep 2016 07:14:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/comparison-string-with-conditional-statement/m-p/11879421#M1960490</guid>
      <dc:creator>former_member185116</dc:creator>
      <dc:date>2016-09-21T07:14:24Z</dc:date>
    </item>
    <item>
      <title>Re: Comparison string with conditional statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/comparison-string-with-conditional-statement/m-p/11879422#M1960491</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ujjwal,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CASE is better then IF-ELSE if there are 5 or more conditions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But we cannot use (&lt;SPAN style="color: #333333; font-size: 12px;"&gt;CS, CA,NA,NS&lt;/SPAN&gt;) with CASE. If the words you want to validate are always at the fixed offset then you can always fetch those words (lv_string+x(y)) and then use CASE on that new word.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Saransh Walia.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Sep 2016 07:16:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/comparison-string-with-conditional-statement/m-p/11879422#M1960491</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-09-21T07:16:54Z</dc:date>
    </item>
    <item>
      <title>Re: Comparison string with conditional statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/comparison-string-with-conditional-statement/m-p/11879423#M1960492</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;Just to elaborate on the answer given by VenkatRamesh V.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Define ranges and get all the words that you want to compare in the low value of the range.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at range.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if range-low cs lv_string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*** Do your coding***&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Sep 2016 08:58:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/comparison-string-with-conditional-statement/m-p/11879423#M1960492</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-09-21T08:58:45Z</dc:date>
    </item>
  </channel>
</rss>

