If the component has a foreign key relationship, the following foreign key annotations can be added:
@AbapCatalog.foreignKey.label: 'literal_string'
The short text is used as an explanatory text for a foreign key relationship.
@AbapCatalog.foreignKey.keyType : #KEY | #NON_KEY | #TEXT_KEY
The foreign key field type of a foreign key describes the meaning of the foreign key fields in the foreign key table. In structures, this information is used for documentation purposes only.
You can assign the following values of foreign key types to a component:
Values in ADT | Description |
---|---|
#NON_KEY | No key fields / key candidates: The foreign key fields are not primary key fields of the foreign key table and do not uniquely identify a record of the foreign key table. |
#KEY | Key fields / key candidates: The foreign key fields are either primary key fields of the foreign key table or they uniquely identify a record of the foreign key table as a key candidate. |
#TEXT_KEY | Key fields of a text table: If this type of foreign key field is defined, the foreign key table is handled as a text table of the check table. The primary key of the foreign key table must match the check table, plus a language key field with the LANG type. There can be only one text table for each check table. Otherwise, an activation warning occurs. The texts in a text table are used, for example, to explain input helps on dynpros and Web Dynpros. |
@AbapCatalog.foreignKey.screenCheck : true | false
The input value check on dynpros and Web Dynpros tests whether the check table contains a record with the key given by the values in the foreign key fields.
You can define the values true (for activation) and false (for deactivation).
@AbapCatalog.foreignKey.messageClass : 'message_class_name' @AbapCatalog.foreignKey.messageNumber : 'message_number'
If an input value check on a dynpro or Web Dynpro fails, a standard message is displayed. This standard message can be replaced with any message in the definition of the foreign key. To define this, you can set a message class and message number through its annotation.
You should only add a message class if the screenCheck annotation is set on true.