Entering content frameProcedure documentation Creating Foreign Keys Locate the document in its SAP Library structure

Procedure

  1. In the field maintenance screen of the table, select the check field and choose This graphic is explained in the accompanying text
  2. If the Structure link domain of the check field has a Structure link value table, you can have the system create a proposal with the value table as check table. In this case a proposal will be made for the field assignment in the foreign key.

    If the domain does not have a value table or if you reject the proposal, the screen for foreign key maintenance appears without proposals. In this case, enter the check table and save your entries. The check table must have a key field to which the domain of the check field is assigned.

    You can then let the system make a proposal for assigning of the foreign key fields to the key fields of the check fields. The system attempts to assign the key fields of the check table to fields of the table with the same domain. If you do not want a proposal, the key fields of the check table are listed and you must assign them to suitable fields of the foreign key table.

  3. Enter an explanatory short text in the field Short text.
  4. The short text provides a technical documentation of the meaning of the foreign key.

  5. Choose This graphic is explained in the accompanying textCopy. The foreign key is saved and you return to the maintenance screen for the table.

Other Options

Select Generic to remove a field from the check against the key fields of the check table. If you want to assign a constant to a foreign key field, you must enter it in the Constant field enclosed in apostrophes (for example ‘Constant ). In both cases you must remove the entries in fields For. key table and Foreign key field.

Note

If the foreign key is derived from a field of an included table or structure (see Includes), the Inherited from the include flag is also displayed. Foreign key definitions are usually inherited from the included table or structure to the including table or structure, so that the foreign key depends on the definition in the included table.

The flag is normally set. If you cancel the selection, the link between the foreign key and the included table or structure is canceled. The foreign key no longer adjusts itself when its definition in the included table or structure changes.

See also:

Foreign Keys

Leaving content frame