Show TOC

Procedure documentationCreate Foreign Key Locate this document in the navigation structure

 

Foreign keys specify the relationship between root and child tables within a system. Assign data fields in the root table or higher-level child table, as foreign keys, to the primary keys in the child tables.

When you create multiple tables in a system, you assign foreign keys. This specifies relationships between the tables in a system. You must have defined the relationships between the various tables in a system to be able to validate the comparison object (Validate Comparison Object) (Validate Comparison Object)) and generate the function modules and SQL statements.

Prerequisites

You have created at least two tables in a system.

Procedure

  1. To create foreign keys for the first system, under Data Model for Comparison, choose Maintain Foreign Key in Source 1.

  2. Create the foreign keys by dragging the arrows on the left of the child tables, to the higher-level tables.

    Join the tables so that the arrow goes from the root table to the child table.

  3. Save your entries.

  4. To create foreign keys for the second system, choose Maintain Foreign Key in Source 2 and repeat steps 2 and 3.

  5. Save your entries.

Result

You have created the foreign keys.

Now specify the assignment between the comparison tables.