Start of Content Area

Background documentation  Error Message in the Foreign Key Check  Locate the document in its SAP Library structure

The foreign key check tests if the check table contains a record with the key given by the values in the foreign key fields. If this check fails, a standard message is output. This standard message can be replaced with any message in the definition of the foreign key.

Up to four placeholders can be used when defining this message. The system automatically fills the placeholders with the contents of the foreign key fields and the name of the check table.

The first three placeholders are filled with the contents of the foreign key fields assigned to the first three key fields of the check table (the client field is assumed). The name of the check table is placed in the fourth placeholder.

Example

A foreign key between foreign key table FK and check table CT is defined with the following field assignment:

Check table CT

Foreign key table FK

Client

Client

FIELD_A

FIELD_1

FIELD_B

FIELD_2

FIELD_C

FIELD_3

FIELD_D

FIELD_4

 

The error message TEST 001 with the text

Entry &1 &2 &3 does not exist in table &4

i s entered i n the foreign key. If the foreign key check for the values FIELD_1 = 'Value1', FIELD_2 = 'Value2', FIELD_3 = Value3' and FIELD_4 = 'Value4' fails, the following message text is output:

Entry Value1 Value2 Value3 does not exist in table CT.

If the check table only has two more key fields in addition to the client, the contents of the assigned foreign key fields are placed in placeholders &1 an &2 and the third placeholder contains the name of the check table.