cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Foreign Key of MANDT

Zhou_Zhihao
Advisor
Advisor
0 Kudos
2,028

Hello Everyone!

I have a basic question I would like to ask you, as I couldn't find much information about it on the internet.


In what situations does the MANDT field in a database table need to use a foreign key relationship with table T000? Why is this used?  What are the benefits?

(I knew that MANDT represents the system Client, and that table T000 maintains data related to the Client.)

View Entire Topic
Lakshmipathi
SAP Champion
SAP Champion

Let me try to explain with an example. In KNA1 which stores Customer General Data, you can see the field MANDT as a part of Primary Key. Here the Foreign Key relationship is KNA1-MANDT to TOOO-MANDT. This ensures that any customer record in KNA1 is tied to a valid client defined in T000.

Why it matters is if your SAP system has clients 100, 200, and 800, each client will have its own set of customer data in KNA1. The foreign key ensures that only valid client IDs (from T000) can be used when inserting or maintaining records in KNA1

Zhou_Zhihao
Advisor
Advisor
0 Kudos
Thank you for your explanation, it was very clear. However, I still have a question. While working on some projects, I noticed that some of the master data tables are linked to the T000 table via foreign keys, while others are not. Do you think this is standard practice? Or rather, what is your opinion on this situation?