<?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...elseif statement... in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/if-elseif-statement/m-p/4780234#M1119862</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Kheshu's right ... simplest and most effective&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if p_wgt = 'X'.&lt;/P&gt;&lt;P&gt;*logic when checkbox1 is selected&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if p_ippc = 'X'.&lt;/P&gt;&lt;P&gt;*logic when checkbox1 is selected&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if p_dimen = 'X'.&lt;/P&gt;&lt;P&gt;*logic when checkbox1 is selected&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and use combinations if different logic for various combinations of checkboxes is required.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 24 Nov 2008 05:12:55 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-11-24T05:12:55Z</dc:date>
    <item>
      <title>If...elseif statement...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/if-elseif-statement/m-p/4780227#M1119855</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 am selecting the data to an itab gi_output.I have 3 checkboxes in my selection screen(p_wgt and p_wgt and p_dimen).so according to the checkboxes selected the data should be deleted from gi_output.&lt;/P&gt;&lt;P&gt;if p_wgt = 'X'.&lt;/P&gt;&lt;P&gt;  delete gi_output where tarag NE '0.000' and magew NE '0.000'&lt;/P&gt;&lt;P&gt;                      and ntgew NE '0.000' and brgew NE '0.000'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;elseif p_ippc = 'X'.&lt;/P&gt;&lt;P&gt;  delete gi_output where vegr1 NE ' '.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; elseif p_dimen = 'X'.&lt;/P&gt;&lt;P&gt;   delete gi_output where laeng NE '0.000'&lt;/P&gt;&lt;P&gt;                       and breit NE '0.000'&lt;/P&gt;&lt;P&gt;                       and hoehe NE '0.000'.&lt;/P&gt;&lt;P&gt;elseif p_wgt = 'X' and P_ippc = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  delete gi_output where tarag NE '0.000' and magew NE '0.000'&lt;/P&gt;&lt;P&gt;                     and ntgew NE '0.000' and brgew NE '0.000'&lt;/P&gt;&lt;P&gt;                     or vegr1 NE ' '.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when 1 checkbox is selected..my coding is working fine..but when 2 checkboxes are selected (suppose p_wgt and P_ippc),the control is checking 1st if statement(P_wgt = 'X')than after that it is coming out of if statement block....any idea..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Nov 2008 04:42:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/if-elseif-statement/m-p/4780227#M1119855</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-24T04:42:42Z</dc:date>
    </item>
    <item>
      <title>Re: If...elseif statement...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/if-elseif-statement/m-p/4780228#M1119856</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Priya,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please understand the key words properly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF statements executes for the first logical expression where it satisfied the condions mentiond and skips other else conditions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is the NATURE of IF statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you want all the three to be checked.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you need to write combinations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if f_chek is 'X' AND &lt;/P&gt;&lt;P&gt;  S_CHEK IS 'X' AND&lt;/P&gt;&lt;P&gt;  T_CHEK IS 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ELSEIF &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ELSEIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or use anyother logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for further help please go throught the key word documentaion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Ramchander Rao.K&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Nov 2008 04:49:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/if-elseif-statement/m-p/4780228#M1119856</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-24T04:49:24Z</dc:date>
    </item>
    <item>
      <title>Re: If...elseif statement...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/if-elseif-statement/m-p/4780229#M1119857</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;so,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what can i use for multiple checkbox selection.?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Nov 2008 04:56:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/if-elseif-statement/m-p/4780229#M1119857</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-24T04:56:46Z</dc:date>
    </item>
    <item>
      <title>Re: If...elseif statement...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/if-elseif-statement/m-p/4780230#M1119858</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need to write all possible combination for check boxes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if p_wgt = 'X' AND p_ippc = 'X' AND p_dimen = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;your deletion code&amp;gt;&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;if p_wgt = 'X' AND p_ippc = 'X' .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;your deletion code&amp;gt;&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;if p_ippc = 'X' AND p_dimen = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;your deletion code&amp;gt;&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;if p_wgt = 'X' AND  p_dimen = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;your deletion code&amp;gt;&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;&lt;/P&gt;&lt;P&gt;if p_wgt = 'X' .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;your deletion code&amp;gt;&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;if p_ippc = 'X' .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;your deletion code&amp;gt;&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;if p_dimen = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;your deletion code&amp;gt;&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;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Arindam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Nov 2008 04:59:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/if-elseif-statement/m-p/4780230#M1119858</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-24T04:59:49Z</dc:date>
    </item>
    <item>
      <title>Re: If...elseif statement...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/if-elseif-statement/m-p/4780231#M1119859</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;easy to work it out...HMmmm&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if p_wgt = 'X'.&lt;/P&gt;&lt;P&gt;delete gi_output where tarag NE '0.000' and magew NE '0.000'&lt;/P&gt;&lt;P&gt;and ntgew NE '0.000' and brgew NE '0.000'.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if p_ippc = 'X'.&lt;/P&gt;&lt;P&gt;delete gi_output where vegr1 NE ' '.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if p_dimen = 'X'.&lt;/P&gt;&lt;P&gt;delete gi_output where laeng NE '0.000'&lt;/P&gt;&lt;P&gt;and breit NE '0.000'&lt;/P&gt;&lt;P&gt;and hoehe NE '0.000'.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if p_wgt = 'X' and P_ippc = 'X'.&lt;/P&gt;&lt;P&gt;delete gi_output where tarag NE '0.000' and magew NE '0.000'&lt;/P&gt;&lt;P&gt;and ntgew NE '0.000' and brgew NE '0.000'&lt;/P&gt;&lt;P&gt;or vegr1 NE ' '.&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;this will work&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Nov 2008 04:59:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/if-elseif-statement/m-p/4780231#M1119859</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2008-11-24T04:59:58Z</dc:date>
    </item>
    <item>
      <title>Re: If...elseif statement...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/if-elseif-statement/m-p/4780232#M1119860</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Priya,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For this specific scenario i.e. if you do not have any other requirements as far as logic behind these 3 checkboxes are concerned, you could write it like this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
IF p_wgt = 'X' AND p_ippc = 'X'.
* your logic
ELSEIF p_ippc = 'X'.
* your logic
ELSEIF p_dimen = 'X'.
* your logic
ELSE.
 delete gi_output where tarag NE '0.000' and magew NE '0.000' 
 and ntgew NE '0.000' and brgew NE '0.000'.
ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this solves the issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Sougata.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Nov 2008 05:01:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/if-elseif-statement/m-p/4780232#M1119860</guid>
      <dc:creator>Sougata</dc:creator>
      <dc:date>2008-11-24T05:01:08Z</dc:date>
    </item>
    <item>
      <title>Re: If...elseif statement...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/if-elseif-statement/m-p/4780233#M1119861</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;use case endcase .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Nov 2008 05:02:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/if-elseif-statement/m-p/4780233#M1119861</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-24T05:02:11Z</dc:date>
    </item>
    <item>
      <title>Re: If...elseif statement...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/if-elseif-statement/m-p/4780234#M1119862</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Kheshu's right ... simplest and most effective&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if p_wgt = 'X'.&lt;/P&gt;&lt;P&gt;*logic when checkbox1 is selected&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if p_ippc = 'X'.&lt;/P&gt;&lt;P&gt;*logic when checkbox1 is selected&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if p_dimen = 'X'.&lt;/P&gt;&lt;P&gt;*logic when checkbox1 is selected&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and use combinations if different logic for various combinations of checkboxes is required.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Nov 2008 05:12:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/if-elseif-statement/m-p/4780234#M1119862</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-24T05:12:55Z</dc:date>
    </item>
    <item>
      <title>Re: If...elseif statement...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/if-elseif-statement/m-p/4780235#M1119863</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Priya,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check boxes are viable to select more than one among hence you need to handle it for each check box selected. The best way to handle check boxes are to have independent IF...ENDIF condition for each.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF..ELSEIF...statement is more suitable for 'Radiobuttons' as you will always select one among the group. So have indepedent IF...ENDIF condition for each check box.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you will still wants to do only with IF...ELSEIF statements then you need to take care of coding for cominational conditions. Always have most feasible conidtion on TOP. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check the below code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if p_wgt = 'X' and P_ippc = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;delete gi_output where tarag NE '0.000' and magew NE '0.000'&lt;/P&gt;&lt;P&gt;and ntgew NE '0.000' and brgew NE '0.000'&lt;/P&gt;&lt;P&gt;or vegr1 NE ' '.&lt;/P&gt;&lt;P&gt;elesif p_wgt = 'X'.&lt;/P&gt;&lt;P&gt;delete gi_output where tarag NE '0.000' and magew NE '0.000'&lt;/P&gt;&lt;P&gt;and ntgew NE '0.000' and brgew NE '0.000'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;elseif p_ippc = 'X'.&lt;/P&gt;&lt;P&gt;delete gi_output where vegr1 NE ' '.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;elseif p_dimen = 'X'.&lt;/P&gt;&lt;P&gt;delete gi_output where laeng NE '0.000'&lt;/P&gt;&lt;P&gt;and breit NE '0.000'&lt;/P&gt;&lt;P&gt;and hoehe NE '0.000'.&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;Vinay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Nov 2008 05:17:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/if-elseif-statement/m-p/4780235#M1119863</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-24T05:17:38Z</dc:date>
    </item>
  </channel>
</rss>

