Procedure documentation Defining Foreign Key Dependencies Locate the document in its SAP Library structure

Use

Foreign key dependencies (Referential Integrity) describe the dependencies between data of two database tables. Under Ref. Integrity you can define links between columns in your database table and columns in other tables.

Procedure

  1. If required, enter the name for the foreign key.
  2. Select the referencing column.
  3. Use the Drag&Drop function to select the referenced database table from the Catalog Manager and then select the column that you want to link to.
  4. Select how the referenced table is to behave if a data record in the referencing table is deleted (DELETE rule).
  5. To add a new link, choose New Foreign Key.
  6. To insert new links and at the same time copy the definition of existing links of the same table, select the required links, and choose Copy Foreign Key.
  7. To insert new links and copy the definition of existing links from existing tables, choose Import Foreign Key. A window opens, containing all links defined by the current user. Select one or more links and choose OK.
  8. To delete a link, select it and choose Remove Foreign Key.

Note

For information on the syntax of referential CONSTRAINT definitions, see the Structure linkreferential CONSTRAINT definition section of the Reference Manual: SAP DB.