Skip to Content
Author's profile photo Joffy John

Initial value check in SE11 table

While designing new table, we often enable the initial value check to set the initial value for the field based on the datatype.

test.JPG

A field can also be created in the database as NOT NULL if the initial flag is not set in the ABAP Dictionary.

To see  the default value of each field check

Utilities -> Database object -> Display in the maintenance screen of the corresponding table.

test.JPG

But in select query there are some impact

NULL means that physically nothing is stored in the database. If a database field is defined as CHAR with, say, 80 characters, the NULL value will not waste that space.

When NULL values are transfered from the database, they are converted to the ABAP initial value. But if existing database tables are extended appending new field(s), those fields get stored as NULL values for the existing database records. A WHERE <field> = SPACE will not retrieve the recors with NULL values for the field.

If such a null field is used in WHERE clause, no problem if specifying any values except initial.
If selection of records with initial fields is required  and  you do not know if NULL values exist, select

WHERE ( <field> = space or <field> is NULL ).

So we have to check this aspect of table while doing programming.

Assigned Tags

      8 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      There is another, probably more severe consequence of setting this field: If you add a field to an existing table that has this flag set, you will force the database not only to ALTER the table, but also to UPDATE every row. This happens e. g. when importing the transport request into the target system. If the table is sufficiently large and used by many users throughout the entire system, this can lead to a rather large and unexpected outage...

      Author's profile photo Frederic Girod
      Frederic Girod

      I like to experience basic options after working so many times on this screen 🙂

      thanks for sharing your knowledge !

      Fred

      Author's profile photo Former Member
      Former Member

      Hello,

      Thanks for discussing this topic in detail; a very basic one but not many people (includes me as well) pay too much attention to it 😏

      BR,

      Suhas

      PS - I was surprised to see the F1 help give a detailed explanation. Generally don't expect SAP documentation to be so detailed 😛

      Author's profile photo Former Member
      Former Member

      Thank U very much for the post,its really helped ..thanks a ton...after a lot of search I foud it ..... 😀

      Author's profile photo Former Member
      Former Member

      There is an option to convert all the null values to their respective initial values in transaction SE14. The 'Force Conversion' option available in Menu option 'Extras' will adjust the table replacing NULL will the initial values. Just thought of sharing it here 🙂

      Regards,

      ~Athreya

      Author's profile photo Former Member
      Former Member

      Thanks ,

         Very nice and helpful ..... Simply Great 🙂   

      Author's profile photo Harish R
      Harish R

      Thank you for this!

      A few days back I had to query a table on a field which was not having any value. I tried WHERE <field> IS NOT NULL and WHERE <field> is INITIAL. Both did not work. I changed it to WHERE <field> is SPACE and the required row was fetched. I did not understand why back then. But now I do. Thank you again.

      I have a corollary question for this. If the NOT_NULL is set for the field then will SPACE be filled for the column? Does this mean some space wastage for each row/field where a SPACE is simply filled? Or does ABAP handle this intelligently?

      Author's profile photo Former Member
      Former Member

      Thanks for your document.

      Very much helpful to find out Initial value of field. 🙂