Show TOC

 Multi-Structured Foreign KeysLocate this document in the navigation structure

Use

You use multi-structured foreign keys when you want to assign a field of the work area that is not contained in the foreign key table to a check table (for example, a field of another table). This is possible for all fields except for the check field.

Example

Table T2 is the check table of foreign key table T1. Field F of the work area is assigned to key field Field6 of check table T2.You can see this in the detailed figure below.

The corresponding SELECT statement for the input check is then:

SELECT * FROM T2 WHERE T2-FIELD5 = T1-FIELD2 AND T2-FIELD6 = F

Note

This SQL statement is a pseudo code that explains the corresponding functionality. The syntax of this statement is not the same in ABAP.

If an entry is made in field T1-Field2 (check field), this SELECT statement is submitted. If the system finds a corresponding record, the entry is valid; otherwise the system rejects it.

Caution

If a field that is not contained in the foreign key table is assigned to a field of the check table, this field must be filled at the time of the input check. Otherwise the check always fails, and no values can be entered in the check field.