Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

foreign key enforcement

Former Member
0 Likes
529

hi expects,

what is foreign key enforcement?

hi expects,

what is foreign key enforcement?

2 REPLIES 2
Read only

Former Member
0 Likes
488

Hi Rohit

It is a concept where if a table field is assigned a foreign key table, then this field can only accept values which are already present in the Foreign key table.

For example, you are trying to create an entry in table SPFI from SE11 transaction. Here you have entered CARRID as 'XX'. Here the field SPFLI-CARRID is assigned the foreign key field SCARR-CARRID (Master table for CARRIDs). Now, lets say table SCARR does not have entry 'XX'. In this case the system will prompt an Error message. So here we are enforcing the user to enter a CARRID which already exists in the Master Table (SCARR). I think this explains Foreign Key enforcement.

Read only

0 Likes
488

Hi Guys,

But does this enforcement work when you write to the table via an 'INSERT' statement?

Thanks

Sanjay