<?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: Operators: Or/And in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/operators-or-and/m-p/3360402#M806331</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;OR:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can be used to check whether any of the conditions are true.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ie.,&lt;/P&gt;&lt;P&gt;... log_exp1 OR log_exp2 OR log_exp3 ... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;If you link multiple logical expressions log_exp with OR, then a new logical expression is created which is true if at least one of the logical expressions log_exp is true. Only if all logical expressions are false, then the link is false as well. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AND:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can be used to check whether all the conditons are satisfied.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;... log_exp1 AND log_exp2 AND log_exp3 ... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;The linking of several logical expressions log_exp with AND forms a new logical expression that is true when all logical expressions log_exp are true. If one of the logical expressions is false, then the link is also false. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;You have used the right logic&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Renjith Michael.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 31 Jan 2008 04:35:44 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-01-31T04:35:44Z</dc:date>
    <item>
      <title>Operators: Or/And</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/operators-or-and/m-p/3360400#M806329</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In my logic I do not want to send a message out when the doc types DO NOT EQUAL either 'AB' 'AN' 'ICLP' 'LU'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I always get confused betweeen 'OR' and 'AND'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My logic: Is it right? Is there a better way to write the code?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if i_ekko-bsart NE 'AB'   or&lt;/P&gt;&lt;P&gt;   i_ekko-bsart NE 'AN'   or&lt;/P&gt;&lt;P&gt;   i_ekko-bsart NE 'ICLP' or&lt;/P&gt;&lt;P&gt;   i_ekko-bsart NE 'LU'.&lt;/P&gt;&lt;P&gt;          MESSAGE E054(ZS) WITH 'Message out here'&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;Thank-You&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jan 2008 21:32:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/operators-or-and/m-p/3360400#M806329</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-30T21:32:25Z</dc:date>
    </item>
    <item>
      <title>Re: Operators: Or/And</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/operators-or-and/m-p/3360401#M806330</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Tom&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get confused, too, if the conditions become too complex. Therefore I try to convert the logic and get rid of NOT conditions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your case the condition is: &lt;EM&gt;"If the doc type equals either of the following types:... then send a message."&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  IF ( i_ekko-bsart = 'AB'     OR
        i_ekko-bsart = 'AN'   OR
        i_ekko-bsart = 'ICLP'    OR
        i_ekko-bsart = 'LU' ).
    MESSAGE E054(zs) WITH 'Wrong doc type' .
 ELSE.
...
 ENDIF.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;  Uwe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jan 2008 23:16:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/operators-or-and/m-p/3360401#M806330</guid>
      <dc:creator>uwe_schieferstein</dc:creator>
      <dc:date>2008-01-30T23:16:50Z</dc:date>
    </item>
    <item>
      <title>Re: Operators: Or/And</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/operators-or-and/m-p/3360402#M806331</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;OR:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can be used to check whether any of the conditions are true.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ie.,&lt;/P&gt;&lt;P&gt;... log_exp1 OR log_exp2 OR log_exp3 ... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;If you link multiple logical expressions log_exp with OR, then a new logical expression is created which is true if at least one of the logical expressions log_exp is true. Only if all logical expressions are false, then the link is false as well. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AND:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can be used to check whether all the conditons are satisfied.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;... log_exp1 AND log_exp2 AND log_exp3 ... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;The linking of several logical expressions log_exp with AND forms a new logical expression that is true when all logical expressions log_exp are true. If one of the logical expressions is false, then the link is also false. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;You have used the right logic&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Renjith Michael.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Jan 2008 04:35:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/operators-or-and/m-p/3360402#M806331</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-31T04:35:44Z</dc:date>
    </item>
  </channel>
</rss>

