Quantcast
Channel: SCN : Document List - ABAP Development
Viewing all articles
Browse latest Browse all 935

Initial value check in SE11 table

$
0
0

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.


Viewing all articles
Browse latest Browse all 935

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>