<?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: is both value initial is considered equal? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/is-both-value-initial-is-considered-equal/m-p/12337586#M1991945</link>
    <description>&lt;P&gt;What I recommend is that you set the option "not null", otherwise people will often make errors. I would consider not setting the option "not null" as being "error prone".&lt;/P&gt;&lt;P&gt;If not, your program will look like a mess. In case a line has ZPLP1 equal to null, not initial (I don't know its type so I can't say space or zero or all zeroes...), you would use this complex code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;IF wmbew-zplp1 IS NOT INITIAL.
  SELECT ...
      WHERE ( zplp1 = wmbew-zplp1 ) ...
ELSE.
  SELECT ...
      WHERE ( zplp1 = wmbew-zplp1 OR zplp1 IS NULL ) ...
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 25 Mar 2021 06:39:09 GMT</pubDate>
    <dc:creator>Sandra_Rossi</dc:creator>
    <dc:date>2021-03-25T06:39:09Z</dc:date>
    <item>
      <title>is both value initial is considered equal?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/is-both-value-initial-is-considered-equal/m-p/12337582#M1991941</link>
      <description>&lt;P&gt;I wrote below code tocheck changes in zplp1.&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;SELECT COUNT(*) FROM mbew WHERE matnr = wmbew-matnr AND bwkey = wmbew-bwkey
      AND zplp1 = wmbew-zplp1 AND zpld1 = wmbew-zpld1
      AND zplp2 = wmbew-zplp2 AND zpld2 = wmbew-zpld2.
IF sy-subrc &amp;lt;&amp;gt; 0.
        MESSAGE e006(zfico).
ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;And if the values of zplp1/p2/d1/d2 are initial it doesn't work. To solve this I think I can first query the orignial values from db and compare to new one like below.&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt; SELECT single *  FROM mbew WHERE matnr = wmbew-matnr AND bwkey = wmbew-bwkey
  into @data(mbew_o)    .
IF sy-subrc = 0.
       if ((mbew_o-zplp1 = wmbew-zplp1 ) or (mbew_o-zplp1 is initial and wmbew-zplp1 is initial)).
           else . 
                MESSAGE e006(zfico).
           ENDIF.
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;Is there a simpler way to do it? Thx.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Mar 2021 09:16:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/is-both-value-initial-is-considered-equal/m-p/12337582#M1991941</guid>
      <dc:creator>former_member625844</dc:creator>
      <dc:date>2021-03-24T09:16:59Z</dc:date>
    </item>
    <item>
      <title>Re: is both value initial is considered equal?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/is-both-value-initial-is-considered-equal/m-p/12337583#M1991942</link>
      <description>&lt;P&gt;&lt;SPAN class="mention-scrubbed"&gt;loki_luo15&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;Your Question does not have all the necessary details to get an answer:&lt;/P&gt;&lt;P&gt;1) What is &lt;STRONG&gt;WMBEW &lt;/STRONG&gt;here&lt;STRONG&gt;?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;2) What is your expectation here?&lt;/P&gt;&lt;P&gt;3) Your select statement has AND operator and Conditional Statement has OR operator. &lt;/P&gt;&lt;P&gt;Can you explain your question better?&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;</description>
      <pubDate>Wed, 24 Mar 2021 10:01:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/is-both-value-initial-is-considered-equal/m-p/12337583#M1991942</guid>
      <dc:creator>former_member1716</dc:creator>
      <dc:date>2021-03-24T10:01:55Z</dc:date>
    </item>
    <item>
      <title>Re: is both value initial is considered equal?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/is-both-value-initial-is-considered-equal/m-p/12337584#M1991943</link>
      <description>&lt;P&gt;I guess you didn't check the option "not null" of the Z columns, so all existing rows have Z columns with value "null" and the comparison fails because ABAP "initial" &amp;lt;&amp;gt; database "null".&lt;/P&gt;&lt;P&gt;If you check the option "not null", there will be a table adjustment to set initial values where values were previously null.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Mar 2021 15:14:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/is-both-value-initial-is-considered-equal/m-p/12337584#M1991943</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2021-03-24T15:14:33Z</dc:date>
    </item>
    <item>
      <title>Re: is both value initial is considered equal?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/is-both-value-initial-is-considered-equal/m-p/12337585#M1991944</link>
      <description>&lt;P&gt; @&lt;SPAN class="mention-scrubbed"&gt;sandra.rossi&lt;/SPAN&gt;.Thx. So if I want to check zplp1 changed or zplp1 is null I should write like below, is it?&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;where ( zplp1 = wmbew-zplp1 or zplp1 is initial )&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 25 Mar 2021 01:21:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/is-both-value-initial-is-considered-equal/m-p/12337585#M1991944</guid>
      <dc:creator>former_member625844</dc:creator>
      <dc:date>2021-03-25T01:21:08Z</dc:date>
    </item>
    <item>
      <title>Re: is both value initial is considered equal?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/is-both-value-initial-is-considered-equal/m-p/12337586#M1991945</link>
      <description>&lt;P&gt;What I recommend is that you set the option "not null", otherwise people will often make errors. I would consider not setting the option "not null" as being "error prone".&lt;/P&gt;&lt;P&gt;If not, your program will look like a mess. In case a line has ZPLP1 equal to null, not initial (I don't know its type so I can't say space or zero or all zeroes...), you would use this complex code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;IF wmbew-zplp1 IS NOT INITIAL.
  SELECT ...
      WHERE ( zplp1 = wmbew-zplp1 ) ...
ELSE.
  SELECT ...
      WHERE ( zplp1 = wmbew-zplp1 OR zplp1 IS NULL ) ...
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 25 Mar 2021 06:39:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/is-both-value-initial-is-considered-equal/m-p/12337586#M1991945</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2021-03-25T06:39:09Z</dc:date>
    </item>
  </channel>
</rss>

