<?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 ELSE statement error in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/if-else-statement-error/m-p/3408827#M818669</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;Make the change like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
ELSEIF tbl_zmdemain_unres-kunwe = tbl_openreg-kunwe AND
( tbl_zmdemain_unres-lgort EQ   '0003' and 
  tbl_zmdemain_unres-lgort EQ   tbl_openreg-lgort).
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Vasanth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 18 Feb 2008 14:58:28 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-02-18T14:58:28Z</dc:date>
    <item>
      <title>IF ELSE statement error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/if-else-statement-error/m-p/3408826#M818668</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am writting an IF ESLE statement. But getting an error in the following statement.&lt;/P&gt;&lt;P&gt; ELSEIF tbl_zmdemain_unres-kunwe =  tbl_openreg-kunwe AND&lt;/P&gt;&lt;P&gt;        tbl_zmdemain_unres-lgort &amp;lt;&amp;gt; ('0003' and tbl_openreg-lgort).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please suggest how to write the above statement in correct fashion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;AP&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Feb 2008 14:54:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/if-else-statement-error/m-p/3408826#M818668</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-18T14:54:50Z</dc:date>
    </item>
    <item>
      <title>Re: IF ELSE statement error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/if-else-statement-error/m-p/3408827#M818669</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;Make the change like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
ELSEIF tbl_zmdemain_unres-kunwe = tbl_openreg-kunwe AND
( tbl_zmdemain_unres-lgort EQ   '0003' and 
  tbl_zmdemain_unres-lgort EQ   tbl_openreg-lgort).
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Vasanth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Feb 2008 14:58:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/if-else-statement-error/m-p/3408827#M818669</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-18T14:58:28Z</dc:date>
    </item>
    <item>
      <title>Re: IF ELSE statement error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/if-else-statement-error/m-p/3408828#M818670</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi AP,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do you mean tbl_zmdemain_unres-lgort should be 0003 OR tbl_openreg-lgort?&lt;/P&gt;&lt;P&gt;then do like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ELSEIF tbl_zmdemain_unres-kunwe = tbl_openreg-kunwe AND&lt;/P&gt;&lt;P&gt;( tbl_zmdemain_unres-lgort EQ '0003' OR&lt;/P&gt;&lt;P&gt;tbl_zmdemain_unres-lgort EQ tbl_openreg-lgort).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps&lt;/P&gt;&lt;P&gt;ec&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Feb 2008 14:59:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/if-else-statement-error/m-p/3408828#M818670</guid>
      <dc:creator>JozsefSzikszai</dc:creator>
      <dc:date>2008-02-18T14:59:59Z</dc:date>
    </item>
    <item>
      <title>Re: IF ELSE statement error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/if-else-statement-error/m-p/3408829#M818671</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ELSEIF tbl_zmdemain_unres-kunwe = tbl_openreg-kunwe AND&lt;/P&gt;&lt;P&gt;( tbl_zmdemain_unres-lgort  EQ '0003' OR &lt;/P&gt;&lt;P&gt;tbl_zmdemain_unres-lgort EQ tbl_openreg-lgort).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers!!&lt;/P&gt;&lt;P&gt;Lokesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Feb 2008 15:01:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/if-else-statement-error/m-p/3408829#M818671</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-18T15:01:33Z</dc:date>
    </item>
    <item>
      <title>Re: IF ELSE statement error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/if-else-statement-error/m-p/3408830#M818672</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;Your statemet:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*ELSEIF tbl_zmdemain_unres-kunwe = tbl_openreg-kunwe AND&lt;/P&gt;&lt;P&gt;tbl_zmdemain_unres-lgort ('0003' and tbl_openreg-lgort).*&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not sure of what logic you want to achieve, but based on my understanding, find below a suggestion&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ELSEIF tbl_zmdemain_unres-kunwe = tbl_openreg-kunwe AND tbl_zmdemain_unres-lgort EQ '0003' AND tbl_zmdemain_unres-lgort EQ tbl_openreg-lgort.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;lt;REMOVED BY MODERATOR&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vivek&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Alvaro Tejada Galindo on Feb 18, 2008 10:53 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Feb 2008 15:03:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/if-else-statement-error/m-p/3408830#M818672</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-18T15:03:23Z</dc:date>
    </item>
    <item>
      <title>Re: IF ELSE statement error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/if-else-statement-error/m-p/3408831#M818673</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Eric,&lt;/P&gt;&lt;P&gt;I mean tbl_zmdemain_unres-lgort should NOT BE 0003 OR tbl_openreg-lgort?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;AP&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Feb 2008 15:05:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/if-else-statement-error/m-p/3408831#M818673</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-18T15:05:52Z</dc:date>
    </item>
    <item>
      <title>Re: IF ELSE statement error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/if-else-statement-error/m-p/3408832#M818674</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello AP,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you don't want the LGORT as 0003, then this is the easy way.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data: ra_lgort type range of lgort_d with header line.

ra_lgort-sign = 'E'.
ra_lgort-option = 'I'.
ra_lgort-low = '0003'.
append ra_lgort.
ra_lgort-low = tbl_openreg-lgort.
append ra_lgort.

" In the if statement.

ELSEIF tbl_zmdemain_unres-kunwe = tbl_openreg-kunwe AND
 tbl_zmdemain_unres-lgort IN RA_LGORT.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Vasanth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Feb 2008 15:11:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/if-else-statement-error/m-p/3408832#M818674</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-18T15:11:42Z</dc:date>
    </item>
    <item>
      <title>Re: IF ELSE statement error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/if-else-statement-error/m-p/3408833#M818675</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Vasanth-&lt;/P&gt;&lt;P&gt; It is not working. It is not going in?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;AP&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Feb 2008 15:22:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/if-else-statement-error/m-p/3408833#M818675</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-18T15:22:22Z</dc:date>
    </item>
    <item>
      <title>Re: IF ELSE statement error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/if-else-statement-error/m-p/3408834#M818676</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;change like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ELSEIF tbl_zmdemain_unres-kunwe = tbl_openreg-kunwe AND&lt;/P&gt;&lt;P&gt;( tbl_zmdemain_unres-lgort NE '0003' AND&lt;/P&gt;&lt;P&gt;tbl_zmdemain_unres-lgort NE tbl_openreg-lgort).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Feb 2008 15:26:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/if-else-statement-error/m-p/3408834#M818676</guid>
      <dc:creator>JozsefSzikszai</dc:creator>
      <dc:date>2008-02-18T15:26:00Z</dc:date>
    </item>
    <item>
      <title>Re: IF ELSE statement error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/if-else-statement-error/m-p/3408835#M818677</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Change the logic a bit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

* Your ELSEIF condition.
case  tbl_zmdemain_unres-lgort .
  WHEN '0003'
  WHEN OTHERS.
     IF tbl_zmdemain_unres-kunwe = tbl_openreg-kunwe 
       AND tbl_zmdemain_unres-lgort NE tbl_openreg-lgort.
*      rest of your logic for this condition..............
    endif.
endcase.

* rest of your code.
endif.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think this is easier to read in any case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;jimbo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Feb 2008 15:40:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/if-else-statement-error/m-p/3408835#M818677</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-18T15:40:33Z</dc:date>
    </item>
  </channel>
</rss>

