<?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: Database fields with no values in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/database-fields-with-no-values/m-p/6262084#M1385209</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dimath,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you create a new field for an existing table, you must check the initial values flag for the new field. Then the new field gets its initial value for all existing records, otherwise you have NULL values. They are only selected if selected WHERE field IS NULL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The reason is that the database does not use table space before the field is populated. This was very useful in the 50ies and sixties &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind 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>Tue, 20 Oct 2009 07:08:48 GMT</pubDate>
    <dc:creator>Clemenss</dc:creator>
    <dc:date>2009-10-20T07:08:48Z</dc:date>
    <item>
      <title>Database fields with no values</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/database-fields-with-no-values/m-p/6262081#M1385206</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Gurus ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a strange problem . I insert in a Z database table(that already exist)  a new field that is char 10.This field isn't key .&lt;/P&gt;&lt;P&gt;The problem is the following .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Assume that the total records are 2000 .&lt;/P&gt;&lt;P&gt;The records that have value in the new field  are 20 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When i go in a  program with select i don't get the right results !!!!!&lt;/P&gt;&lt;P&gt;Also in se16 i don't take the right results !!!!&lt;/P&gt;&lt;P&gt;Look  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT AAAA.

TABLES : ZAAHEADMET.
DATA: AA TYPE I.
DATA : BB(10) TYPE C.
DATA : CCC TYPE I.

CLEAR ZAAHEADMET.
SELECT * FROM ZAAHEADMET WHERE YREFERENCE &amp;lt;&amp;gt; ' ' .
  MOVE ZAAHEADMET-YREFERENCE TO BB.
  AA = STRLEN( BB ).
  IF AA &amp;gt; 1.
    WRITE:/ ZAAHEADMET-VBELN, AA .
    CCC = CCC + 1.
  ENDIF.
ENDSELECT.
WRITE :/ CCC.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why this happen ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Oct 2009 06:44:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/database-fields-with-no-values/m-p/6262081#M1385206</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-20T06:44:44Z</dc:date>
    </item>
    <item>
      <title>Re: Database fields with no values</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/database-fields-with-no-values/m-p/6262082#M1385207</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;After changing the table, did you activate it with database utility (transaction SE14)? Otherwise try this first and then have a look at SE16 again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Oct 2009 06:52:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/database-fields-with-no-values/m-p/6262082#M1385207</guid>
      <dc:creator>Sm1tje</dc:creator>
      <dc:date>2009-10-20T06:52:04Z</dc:date>
    </item>
    <item>
      <title>Re: Database fields with no values</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/database-fields-with-no-values/m-p/6262083#M1385208</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;REPORT AAAA.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;TABLES : ZAAHEADMET.&lt;/P&gt;&lt;P&gt;DATA: AA TYPE I.&lt;/P&gt;&lt;P&gt;DATA : BB(10) TYPE C.&lt;/P&gt;&lt;P&gt;DATA : CCC TYPE I.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;CLEAR ZAAHEADMET.&lt;/P&gt;&lt;P&gt;SELECT * FROM ZAAHEADMET WHERE YREFERENCE  ' ' .&lt;/P&gt;&lt;P&gt;  MOVE ZAAHEADMET-YREFERENCE TO BB.&lt;/P&gt;&lt;P&gt;  AA = STRLEN( BB ).&lt;/P&gt;&lt;P&gt;  IF AA &amp;gt; 1.&lt;/P&gt;&lt;P&gt;    WRITE:/ ZAAHEADMET-VBELN, AA .&lt;/P&gt;&lt;P&gt;    CCC = CCC + 1.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;ENDSELECT.&lt;/P&gt;&lt;P&gt;WRITE &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; CCC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.SELECT * FROM ZAAHEADMET WHERE YREFERENCE  ' ' .&lt;/P&gt;&lt;P&gt;According to me the above select query should be SELECT * FROM ZAAHEADMET  INTO ITAB WHERE YREFERENCE  &lt;STRONG&gt;=&lt;/STRONG&gt; ' ' .&lt;/P&gt;&lt;P&gt;The internal table ITAB is of type ZAAHEADMET .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.  MOVE ZAAHEADMET-YREFERENCE TO BB.&lt;/P&gt;&lt;P&gt;In this the query will select the field YREFERENCE is NIL; so what is the point in moving it to BB field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Oct 2009 06:57:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/database-fields-with-no-values/m-p/6262083#M1385208</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-20T06:57:00Z</dc:date>
    </item>
    <item>
      <title>Re: Database fields with no values</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/database-fields-with-no-values/m-p/6262084#M1385209</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dimath,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you create a new field for an existing table, you must check the initial values flag for the new field. Then the new field gets its initial value for all existing records, otherwise you have NULL values. They are only selected if selected WHERE field IS NULL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The reason is that the database does not use table space before the field is populated. This was very useful in the 50ies and sixties &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind 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>Tue, 20 Oct 2009 07:08:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/database-fields-with-no-values/m-p/6262084#M1385209</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2009-10-20T07:08:48Z</dc:date>
    </item>
  </channel>
</rss>

