Application Development Blog Posts
Learn and share on deeper, cross technology development topics such as integration and connectivity, automation, cloud extensibility, developing at scale, and security.
cancel
Showing results for 
Search instead for 
Did you mean: 
jj
Active Contributor

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

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.

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.

8 Comments
Labels in this area