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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
4 | |
2 | |
2 | |
2 | |
2 | |
2 | |
1 | |
1 | |
1 | |
1 |