Show TOC

Procedure documentationCreating Foreign Keys

 

When you create multiple tables in a system, you assign foreign keys. This specifies relationships between the tables in a system. You must define the relationships between the various tables in a system before you can validate the parameters and the data model, and generate the function modules and SQL statements.

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

Prerequisites

You have created at least two tables in a system (see Creating Data Models).

Procedure

  1. To create foreign keys for the first system, under Data Model for Comparison, choose Propose Foreign Key Relation.

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

    The system shows the foreign key as an arrow pointing from the root table to the child table.

  3. Save your entries.

Result

You have created the foreign keys.

Now map the tables and fields to one another.