46 Foreign Key and Table Types in SAP ABAP

Опубликовано: 08 Июль 2026
на канале: SAP Full Stack Custom Development
40
1

In the ABAP Dictionary (DDIC), a foreign key establishes a relationship between two database tables to ensure referential data integrity. It validates that a value entered into a field of one table exists as a primary key in another referenced table.

Key Concepts & Terminology
------------------------------
Foreign Key Table (Dependent Table): The table containing the field being validated.

Check Field: The specific field in the foreign key table for which the relationship is maintained.

Check Table (Referenced Table): The independent "master" table used to validate the input data. The target field in this table must be a primary key.

Value Table: Defined at the Domain level, it acts as a blueprint or default proposal for a check table when that domain is used across different fields

TABLE TYPES

In SAP ABAP, the phrase "table types" can refer to two completely different concepts depending on whether you mean Database Table Categories (data objects stored physically in the database) or Data Dictionary Table Types (global reusable types used to define internal tables in memory)

Data Dictionary Table Types (Memory Structure)

A Global Table Type is an object created in the ABAP Dictionary (SE11) that acts as a blueprint to define the attributes, access methods, and keys of an internal table used in ABAP memory.

Whenever you define a global table type, you must configure three core properties:

A. Row / Line Type
This defines the structural layout of a single row in the table. It can point to an existing ABAP structure, a database table field, a data element, or even another table type (creating a nested/deep structure).

B. Access Mode (Table Category)
This determines how the system manages and retrieves records inside the temporary memory

C. Key Definition
This dictates how rows are uniquely identified. You can configure it as a standard default key, select specific structural components, or opt for a "not specified" layout to let developers specify the key details at runtime.