[component_annotations] [foreign_key_annotations] [KEY] component : [REFERENCE TO] user_defined_type | predefined_type [NOT NULL] [foreign_key_addition] [value_help_addition];
A component always consists of a name and its type information, which can be followed optionally by a foreign key or a value help assignment.
You can use the optional keywords REFERENCE TO for defining reference-like components directly in the structure. Data references can be defined by a reference to any data type in ABAP Dictionary or to the generic type DATA. Object references can be defined by a reference to classes or interfaces in the class library or to the generic type OBJECT.
You can use the optional keyword KEY in front of a component definition to define it as a key field of the structure. This is relevant for structures that are bound into database tables. Also, components of structures used as lock parameters in a lock object must be defined as KEY fields.
You can use the optional NOT NULL keywords at the end of a component definition to define that the field needs to have initial values and cannot be null in a database table. Therefore this is relevant for structures that are bound into database tables only.
The employee structure defines the following components:
DEFINE TYPE employee { name : employee_name; date_of_birth : abap.dats; address : REFERENCE TO if_address_object; ... }