Ansicht
Dokumentation
ABENDDICDDL_DEFINE_TABLE_FORKEY - DDICDDL DEFINE TABLE FORKEY
PERFORM Short Reference rdisp/max_wprun_time - Maximum work process run timeThis documentation is copyright by SAP AG.
- DEFINE TABLE, foreign_key
... WITH FOREIGN KEY $[[n,m]$] check_table
WHERE check_field1 = dbtab.field1
$[AND check_field2 = dbtab.field2 ...$] ...
Effect
Assigns a check table to a table field whose data type is defined by a data element in the definition of a DDIC database table using the Dictionary DDL statement DEFINE TABLE. Here, check_table is an existing DDIC database table in the ABAP Dictionary. This statement turns check_table into a check table and turns the current DDIC database table into a foreign key table. The current table field is turned into a foreign key field of the foreign key of the current table.
- The associated fields of the check table must be assigned to the foreign key fields of the foreign key table after WHERE.
- [n,m] can be used to define the cardinality of the foreign key.
Further properties of the foreign key can be specified using foreign_key_annos.
Note
The addition WITH FOREIGN KEY can be used, with the same meaning, in the definition of a structure using DEFINE STRUCTURE.
Example
Dictionary DDL for specifying the check table SCARR of the foreign key field CARRID of the foreign key table SPFLI.
...
define table spfli {
...
@AbapCatalog.foreignKey.label : 'Check Against Airline'
@AbapCatalog.foreignKey.keyType : #KEY
@AbapCatalog.foreignKey.screenCheck : true
key carrid : s_carr_id not null
with foreign key [0..*,1] scarr
where mandt = spfli.mandt
and carrid = spfli.carrid;
...
}
Addresses (Business Address Services) Fill RESBD Structure from EBP Component Structure
This documentation is copyright by SAP AG.
Length: 5085 Date: 20240329 Time: 163019 sap01-206 ( 49 ms )