<?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 Initial Values in Table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/initial-values-in-table/m-p/1209400#M133071</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am confused as to the purpose of the Initial Values flag when creating a table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you create a table, according to the documentation, all fields are set to be NOT NULL.  It is only when fields are added are they NULLable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yet the Initial values flag is only checked for primary key fields, from the tables that I've looked at.  And primary keys, by definition, are NOT NULL, anyway.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Therefore it leads me to wonder why have this flag at all?  It doesn't tell you anything about the underlying fields in the database.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 10 Apr 2006 13:03:19 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-04-10T13:03:19Z</dc:date>
    <item>
      <title>Initial Values in Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/initial-values-in-table/m-p/1209400#M133071</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am confused as to the purpose of the Initial Values flag when creating a table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you create a table, according to the documentation, all fields are set to be NOT NULL.  It is only when fields are added are they NULLable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yet the Initial values flag is only checked for primary key fields, from the tables that I've looked at.  And primary keys, by definition, are NOT NULL, anyway.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Therefore it leads me to wonder why have this flag at all?  It doesn't tell you anything about the underlying fields in the database.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Apr 2006 13:03:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/initial-values-in-table/m-p/1209400#M133071</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-10T13:03:19Z</dc:date>
    </item>
    <item>
      <title>Re: Initial Values in Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/initial-values-in-table/m-p/1209401#M133072</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jerry,&lt;/P&gt;&lt;P&gt;   "When you create a table, according to the documentation, all fields are set to be NOT NULL." Are you sure about it??&lt;/P&gt;&lt;P&gt;The actual purpose of that indicator is to set default values to that field so that even if you forget to update that particular field in your updating program, you can create a new entry in the database with a unique key.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Apr 2006 13:12:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/initial-values-in-table/m-p/1209401#M133072</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-10T13:12:08Z</dc:date>
    </item>
    <item>
      <title>Re: Initial Values in Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/initial-values-in-table/m-p/1209402#M133073</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;  In ABAP&lt;/P&gt;&lt;P&gt; Intial Values are as follows&lt;/P&gt;&lt;P&gt;1) DATE 00000000&lt;/P&gt;&lt;P&gt;2) time 000000&lt;/P&gt;&lt;P&gt;3) Integer 0&lt;/P&gt;&lt;P&gt;4) Char    space&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When u specify initial flag&lt;/P&gt;&lt;P&gt;these values are updated in the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Compare to key they can occurs only once&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    This is what i know so far; Please correct me if am wrong. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Manoj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Apr 2006 13:13:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/initial-values-in-table/m-p/1209402#M133073</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-10T13:13:06Z</dc:date>
    </item>
    <item>
      <title>Re: Initial Values in Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/initial-values-in-table/m-p/1209403#M133074</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ravi.  Here is the SAP Help page where I found this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ebf0446011d189700000e8322d00/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ebf0446011d189700000e8322d00/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The statement in question is towards the bottom.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Apr 2006 13:16:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/initial-values-in-table/m-p/1209403#M133074</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-10T13:16:20Z</dc:date>
    </item>
    <item>
      <title>Re: Initial Values in Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/initial-values-in-table/m-p/1209404#M133075</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In native SQL, when fields are added to a table using the ALTER TABLE command the field is created with a NULL property unless a default value is specified.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A NULL database value != Initial ABAP value&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Setting the initial values flag forces a default value to be used instead (a default value of the initial value of that ABAP datatype).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is valuable as it ensures consistency when reading database tables through ABAP programs. Especially for date fields (stored as chars on database) since the code below works in all scenarios, irrespective of when the fields were added to the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;constants c_zzrepdate  type mara-zzrepdate value is initial&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select matnr&lt;/P&gt;&lt;P&gt;into table l_it_matnr&lt;/P&gt;&lt;P&gt;from mara&lt;/P&gt;&lt;P&gt;where zzrepdate eq c_zzrepdate&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Apr 2006 15:55:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/initial-values-in-table/m-p/1209404#M133075</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-10T15:55:11Z</dc:date>
    </item>
    <item>
      <title>Re: Initial Values in Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/initial-values-in-table/m-p/1209405#M133076</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chris.  As an Oracle DBA in a past life, I completely understand that.  What I still don't understand though, is that when I look at a table in SE11, the flag is pretty meaningless.  It doesn't tell you anything about whether a column is NOT NULL or NULLable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In order to really get the true story about a table, I have to do a describe, or use "Utilities-&amp;gt;Database Utilities" in order to see a field's NULL status.  The flag doesn't seem to correlate (except with the PK) to the underlying table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Apr 2006 16:59:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/initial-values-in-table/m-p/1209405#M133076</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-10T16:59:35Z</dc:date>
    </item>
    <item>
      <title>Re: Initial Values in Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/initial-values-in-table/m-p/1209406#M133077</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi2all&lt;/P&gt;&lt;P&gt;I'm very iteresting in this question too. Is anybody knows the answer?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 May 2006 15:43:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/initial-values-in-table/m-p/1209406#M133077</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-04T15:43:15Z</dc:date>
    </item>
    <item>
      <title>Re: Initial Values in Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/initial-values-in-table/m-p/1209407#M133078</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi jerry,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Yes, you are absolutely right !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. But if you notice,&lt;/P&gt;&lt;P&gt;   that when we create a new  z table,&lt;/P&gt;&lt;P&gt;   and in primary keys&lt;/P&gt;&lt;P&gt;   we check ONLY KEY (and not the initial values check box)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. After that, when we activate the table, &lt;/P&gt;&lt;P&gt;    these primary fields, will automatically&lt;/P&gt;&lt;P&gt;    have the INITIAL VALUES CHECK BOX TICKED.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. If we read the help, we can figure out&lt;/P&gt;&lt;P&gt;   :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you create a table, all fields of the table can be defined as NOT NULL and filled with an initial value. The same applies when converting the table. &lt;/P&gt;&lt;P&gt;Only when new fields are added or inserted, are these filled with initial values. &lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;An exception is key fields. These are always filled automatically with initial values.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;amit m.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 May 2006 11:15:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/initial-values-in-table/m-p/1209407#M133078</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-05T11:15:12Z</dc:date>
    </item>
  </channel>
</rss>

