<?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: IF and case in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/if-and-case/m-p/2294505#M500877</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Both does the same thing. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For reading case statment looks good.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;SaiRam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 23 May 2007 07:36:43 GMT</pubDate>
    <dc:creator>former_member196280</dc:creator>
    <dc:date>2007-05-23T07:36:43Z</dc:date>
    <item>
      <title>IF and case</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/if-and-case/m-p/2294499#M500871</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;                can anyone let me know the diff if and case stmts.&lt;/P&gt;&lt;P&gt;i read that performance wise case is good but how.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regads&lt;/P&gt;&lt;P&gt;alson&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 May 2007 07:18:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/if-and-case/m-p/2294499#M500871</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-23T07:18:39Z</dc:date>
    </item>
    <item>
      <title>Re: IF and case</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/if-and-case/m-p/2294500#M500872</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if u want check only the value of a variable many no. of times u can go for Case.&lt;/P&gt;&lt;P&gt;otherwise always if statement only&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think u will understand after reading the statement(that we cannot do anything else with case statement).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if useful&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sudheer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 May 2007 07:20:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/if-and-case/m-p/2294500#M500872</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-23T07:20:10Z</dc:date>
    </item>
    <item>
      <title>Re: IF and case</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/if-and-case/m-p/2294501#M500873</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Both does the same thing and have same meaning&lt;/P&gt;&lt;P&gt;but instead of writing more number of IF's  we use CASE..endcase.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if useful&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 May 2007 07:20:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/if-and-case/m-p/2294501#M500873</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-23T07:20:13Z</dc:date>
    </item>
    <item>
      <title>Re: IF and case</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/if-and-case/m-p/2294502#M500874</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;    case statement is good for performance wise because here we declare cases &lt;/P&gt;&lt;P&gt;     and according to these cases program will be executed.&lt;/P&gt;&lt;P&gt;            When we use if statement then the cursur goes to in the loop, when ever&lt;/P&gt;&lt;P&gt;     the loop is not complete till then the programme will not execute.&lt;/P&gt;&lt;P&gt;             Thats by in performance basis the case statement is good.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;****do rewards if usefull&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 May 2007 07:23:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/if-and-case/m-p/2294502#M500874</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-23T07:23:10Z</dc:date>
    </item>
    <item>
      <title>Re: IF and case</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/if-and-case/m-p/2294503#M500875</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;Let me try and explain using an example...&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;1) For IF statement...&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suppost you have a variable color..and you are checking it against color names.&lt;/P&gt;&lt;P&gt;then your code will be &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;IF COLOR == 'BLUE'.
    statements
ELSEIF COLOR == 'BLACK'.
    statements.
...and so on....
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;But if you use CASE Statement&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CASE COLOR.
when 'BLUE'.
   statements.
when 'BLACK'.
  statements.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so follows that CASE is easy to use and performance wise is also better.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;i&amp;gt;Do reward each useful answer..!&amp;lt;/i&amp;gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Tatvagna.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 May 2007 07:23:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/if-and-case/m-p/2294503#M500875</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-23T07:23:19Z</dc:date>
    </item>
    <item>
      <title>Re: IF and case</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/if-and-case/m-p/2294504#M500876</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;&lt;/P&gt;&lt;P&gt;have a look at this senario.in this if a = 4.in case of IF it should take a decition for 4 times(check a = 1 or not,check a = 2 or not,check a = 3 or not,check a = 4 or not,).where as in case of CASE always it will take decition once(check the value of a and directly goes to when 4).&lt;/P&gt;&lt;P&gt;if a = 1.&lt;/P&gt;&lt;P&gt;.....&lt;/P&gt;&lt;P&gt;elseif a = 2.&lt;/P&gt;&lt;P&gt;.......&lt;/P&gt;&lt;P&gt;elseif a = 3.&lt;/P&gt;&lt;P&gt;.......&lt;/P&gt;&lt;P&gt;elseif a = 4.&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;case a.&lt;/P&gt;&lt;P&gt;when 1.&lt;/P&gt;&lt;P&gt;........&lt;/P&gt;&lt;P&gt;when 2.&lt;/P&gt;&lt;P&gt;........&lt;/P&gt;&lt;P&gt;when 3.&lt;/P&gt;&lt;P&gt;........&lt;/P&gt;&lt;P&gt;when 4.&lt;/P&gt;&lt;P&gt;........&lt;/P&gt;&lt;P&gt;endcase.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;reward if helpful&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rgds,&lt;/P&gt;&lt;P&gt;bharat.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 May 2007 07:29:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/if-and-case/m-p/2294504#M500876</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-23T07:29:13Z</dc:date>
    </item>
    <item>
      <title>Re: IF and case</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/if-and-case/m-p/2294505#M500877</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Both does the same thing. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For reading case statment looks good.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;SaiRam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 May 2007 07:36:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/if-and-case/m-p/2294505#M500877</guid>
      <dc:creator>former_member196280</dc:creator>
      <dc:date>2007-05-23T07:36:43Z</dc:date>
    </item>
    <item>
      <title>Re: IF and case</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/if-and-case/m-p/2294506#M500878</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;for  if statement when it has no .of . conditions then control validates each n every condition n excutes the result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in case of case a particular block is executed insted of executing each n every condition n control comes out of block.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so execution time for case is less when compared to if.s&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if helpful reward some points.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with regards,&lt;/P&gt;&lt;P&gt;suresh babu aluri.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 May 2007 07:40:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/if-and-case/m-p/2294506#M500878</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-23T07:40:42Z</dc:date>
    </item>
    <item>
      <title>Re: IF and case</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/if-and-case/m-p/2294507#M500879</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hey Alson,&lt;/P&gt;&lt;P&gt;Both these are used for checking multiple conditions like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if (cond1 &lt;/P&gt;&lt;P&gt;or cond2 &lt;/P&gt;&lt;P&gt;and cond3...&lt;/P&gt;&lt;P&gt;...so on...)&lt;/P&gt;&lt;P&gt;&amp;lt;your logic&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where as case x:&lt;/P&gt;&lt;P&gt;when 'y'.&lt;/P&gt;&lt;P&gt;code...1&lt;/P&gt;&lt;P&gt;when 'z'.&lt;/P&gt;&lt;P&gt;code..2.&lt;/P&gt;&lt;P&gt;endcase.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for case, the system compares 'x' with the values followed by when and executes the logic followed by the matching when stmt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;of course by seeing it, it is clear that if is a bit lengthy and takes more time than case stmt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Praveen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 May 2007 07:41:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/if-and-case/m-p/2294507#M500879</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-23T07:41:10Z</dc:date>
    </item>
    <item>
      <title>Re: IF and case</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/if-and-case/m-p/2294508#M500880</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi alson&lt;/P&gt;&lt;P&gt;         Yes you are right performance wise CASE is best,because CASE statement is useful when we are having multiple options for the same variable but when we have to use mutiple conditions simultaneously then it would be better to use if else.&lt;/P&gt;&lt;P&gt;1)CASE XXX.&lt;/P&gt;&lt;P&gt;when 'XXX1'.&lt;/P&gt;&lt;P&gt;    Stmts.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2)If XXX.&lt;/P&gt;&lt;P&gt;then stmts.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REWARD IF USEFUL......!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 May 2007 08:33:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/if-and-case/m-p/2294508#M500880</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-23T08:33:44Z</dc:date>
    </item>
  </channel>
</rss>

