<?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: Performance : if-endif vs case-endcase. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-if-endif-vs-case-endcase/m-p/3435637#M825073</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is always advisable to use &lt;STRONG&gt;case &amp;#133; endcase as far as possible&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When testing fields "equal to" something, one can use either the nested IF or the CASE statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;STRONG&gt;The CASE is better for two reasons&lt;/STRONG&gt;. It is easier to read and after about five nested IFs the performance of the CASE is more efficient.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 09 Feb 2008 01:14:52 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-02-09T01:14:52Z</dc:date>
    <item>
      <title>Performance : if-endif vs case-endcase.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-if-endif-vs-case-endcase/m-p/3435636#M825072</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Which is better in performance ? if endif or case endcase?&lt;/P&gt;&lt;P&gt;I have an if endif condition in which i am checking 20 values like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if wa-var1 = '1' OR wa-var = '2' OR&lt;/P&gt;&lt;P&gt;  ............................................&lt;/P&gt;&lt;P&gt;   ...........................................&lt;/P&gt;&lt;P&gt; wa-var1 = '19' OR wa-var = '20'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;molga = '26'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This code is in a userexit and the std application is taking a lot of time to complete. &lt;/P&gt;&lt;P&gt;Would a case endcase help ?&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Pranati.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 09 Feb 2008 00:30:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-if-endif-vs-case-endcase/m-p/3435636#M825072</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-09T00:30:06Z</dc:date>
    </item>
    <item>
      <title>Re: Performance : if-endif vs case-endcase.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-if-endif-vs-case-endcase/m-p/3435637#M825073</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is always advisable to use &lt;STRONG&gt;case &amp;#133; endcase as far as possible&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When testing fields "equal to" something, one can use either the nested IF or the CASE statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;STRONG&gt;The CASE is better for two reasons&lt;/STRONG&gt;. It is easier to read and after about five nested IFs the performance of the CASE is more efficient.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 09 Feb 2008 01:14:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-if-endif-vs-case-endcase/m-p/3435637#M825073</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-09T01:14:52Z</dc:date>
    </item>
    <item>
      <title>Re: Performance : if-endif vs case-endcase.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-if-endif-vs-case-endcase/m-p/3435638#M825074</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using CASE will not help. When there are only two alternatives (as here) it might take longer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This statement cannot possibly be the source of the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 10 Feb 2008 21:27:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-if-endif-vs-case-endcase/m-p/3435638#M825074</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-10T21:27:34Z</dc:date>
    </item>
  </channel>
</rss>

