<?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 NULL vs INITIAL in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/null-vs-initial/m-p/1786623#M338730</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is my performance dilemma.&lt;/P&gt;&lt;P&gt;Is there any difference between these two lines of code?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM /abc/def INTO TABLE lt_abc WHERE my_var IS NOT NULL.&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;SELECT * FROM /abc/def INTO TABLE lt_abc WHERE my_var NE ''.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get a performance error if NULL is used. Would second line be a good alternative?&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, 06 Dec 2006 21:40:01 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-12-06T21:40:01Z</dc:date>
    <item>
      <title>NULL vs INITIAL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/null-vs-initial/m-p/1786623#M338730</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is my performance dilemma.&lt;/P&gt;&lt;P&gt;Is there any difference between these two lines of code?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM /abc/def INTO TABLE lt_abc WHERE my_var IS NOT NULL.&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;SELECT * FROM /abc/def INTO TABLE lt_abc WHERE my_var NE ''.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get a performance error if NULL is used. Would second line be a good alternative?&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, 06 Dec 2006 21:40:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/null-vs-initial/m-p/1786623#M338730</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-06T21:40:01Z</dc:date>
    </item>
    <item>
      <title>Re: NULL vs INITIAL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/null-vs-initial/m-p/1786624#M338731</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;Second select statement is better.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ferry Lianto&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Dec 2006 21:41:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/null-vs-initial/m-p/1786624#M338731</guid>
      <dc:creator>ferry_lianto</dc:creator>
      <dc:date>2006-12-06T21:41:22Z</dc:date>
    </item>
    <item>
      <title>Re: NULL vs INITIAL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/null-vs-initial/m-p/1786625#M338732</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ferry,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is that the same though?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Dec 2006 21:44:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/null-vs-initial/m-p/1786625#M338732</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-06T21:44:52Z</dc:date>
    </item>
    <item>
      <title>Re: NULL vs INITIAL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/null-vs-initial/m-p/1786626#M338733</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;From the help:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
Variant 7 
f IS [NOT] NULL 

Effect 
The condition is true if the contents of table field f 
(does not) contain(s) the NULL value. 

Example 
Example to select all customers for whom no telephone 
number is specified: 

DATA WA_SCUSTOM TYPE SCUSTOM. 

SELECT * FROM SCUSTOM INTO WA_SCUSTOM WHERE TELEPHONE IS NULL. 
ENDSELECT. 

Note 
Performance: 

The SAP buffer does not support this variant. Therefore, 
every SELECT command on a buffered table or a view with 
fields from buffered table that contains ... WHERE f IS 
[NOT] NULL behaves as though the FROM clause contained 
the BYPASSING BUFFER addition. 
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Rob Burbank&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Dec 2006 21:46:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/null-vs-initial/m-p/1786626#M338733</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-06T21:46:56Z</dc:date>
    </item>
    <item>
      <title>Re: NULL vs INITIAL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/null-vs-initial/m-p/1786627#M338734</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;usually there are no NULL values stored for any field in any table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NULL values for a field means that physically nothing is stored. This only happend when a new table field is appended for an existing database table. If not explicitly defined as 'INITIAL' the database appends this field and the no value for any record is stored - this is NULL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For NE '' you can say NE SPACE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have to care for possible NULL values it must be WHERE my_var NE SPACE and WHERE my_var IS NOT NULL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The bad thing about NULL values is that you can not distinguish them from INITIAL values because the NULL value is converted to initial.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try once SELECT COUNT( * ) FROM /abc/def where my_var IS NULL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If any records are found, then you have to care about NULL values. Probably you won't.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Dec 2006 22:16:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/null-vs-initial/m-p/1786627#M338734</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2006-12-06T22:16:07Z</dc:date>
    </item>
  </channel>
</rss>

