Application Development 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: 

Table taht store SAP tables relationship

Former Member
0 Kudos

Hi,

I am wondering if anyone can tell me which table in SAP that stores constraint relationship between SAP tables for example, the primary key and foreign keys in related tables. I would appreciate if anyone can help me with this.

Sunny

5 REPLIES 5

Former Member
0 Kudos

Hi ,

Check DD05S. Here you will find the foreign key realationships.

Cheers.

0 Kudos

Thank you for your help. However, when I fetch data from DD05S, it

appears that TABNAME and FORTABLE have the same name most of the time.

This doesn't make sense.

For example, for the following query:

SELECT TABNAME, FIELDNAME, FORTABLE, FORKEY FROM DD05S WHERE DD05S.TABNAME = 'MARA'

the data I get is:

MARA STOFF *

MARA TAKLV *

MARA BEHVO MARA MANDT

MARA BEHVO MARA BEHVO

MARA BMATN MARA BMATN

MARA BSTME MARA MANDT

MARA BSTME MARA BSTME

MARA BWSCL MARA BWSCL

MARA COMPL MARA MANDT

MARA COMPL MARA COMPL

MARA EKWSL MARA MANDT

MARA EKWSL MARA EKWSL

MARA ERGEI MARA MANDT

MARA ERGEI MARA ERGEI

MARA ERVOE MARA MANDT

MARA ERVOE MARA ERVOE

MARA ETIAG MARA ETIAG

MARA ETIAR MARA MANDT

MARA ETIAR MARA ETIAR

MARA ETIFO MARA MANDT

MARA ETIFO MARA ETIFO

MARA EXTWG MARA MANDT

MARA EXTWG MARA EXTWG

MARA GENNR MARA GENNR

MARA GEWEI MARA MANDT

MARA GEWEI MARA GEWEI

MARA INHME MARA INHME

MARA KOSCH MARA KOSCH

MARA KUNNR MARA MANDT

MARA KUNNR MARA KUNNR

MARA LABOR MARA MANDT

MARA LABOR MARA LABOR

MARA MAGRV MARA MAGRV

MARA MANDT MARA MANDT

MARA MATKL MARA MANDT

MARA MATKL MARA MATKL

MARA MBRSH MARA MANDT

MARA MBRSH MARA MBRSH

MARA MEABM MARA MANDT

MARA MEABM MARA MEABM

MARA MEINS MARA MANDT

MARA MEINS MARA MEINS

MARA MFRNR MARA MFRNR

MARA MPROF MARA MPROF

MARA MSTAE MARA MSTAE

MARA MSTAV MARA MSTAV

MARA MTART MARA MANDT

MARA MTART MARA MTART

MARA MTPOS_MARA MARA MTPOS_MARA

MARA NUMTP MARA MANDT

MARA NUMTP MARA NUMTP

MARA PLGTP MARA PLGTP

MARA PMATA MARA PMATA

MARA PRDHA MARA MANDT

MARA PRDHA MARA PRDHA

MARA PROFL MARA PROFL

MARA RAUBE MARA MANDT

MARA RAUBE MARA RAUBE

MARA RBNRM MARA RBNRM

MARA RMATP MARA RMATP

MARA SAISO MARA MANDT

MARA SAISO MARA SAISO

MARA SAITY MARA SAITY

MARA SATNR MARA SATNR

MARA SPART MARA MANDT

MARA SPART MARA SPART

MARA STOFF MARA STOFF

MARA TAKLV MARA TAKLV

MARA TEMPB MARA MANDT

MARA TEMPB MARA TEMPB

MARA TRAGR MARA MANDT

MARA TRAGR MARA TRAGR

MARA VHART MARA VHART

MARA VOLEH MARA MANDT

MARA VOLEH MARA VOLEH

MARA WRKST MARA WRKST

MARA BWSCL SY MANDT

MARA ETIAG SY MANDT

MARA INHME SY MANDT

MARA MSTAE SY MANDT

MARA MSTAV SY MANDT

MARA PLGTP SY MANDT

MARA PMATA SY MANDT

MARA RBNRM SY MANDT

MARA SATNR SY MANDT

MARA STOFF SY MANDT

MARA TAKLV SY MANDT

MARA BMATN SYST MANDT

MARA GENNR SYST MANDT

MARA KOSCH SYST MANDT

MARA MAGRV SYST MANDT

MARA MFRNR SYST MANDT

MARA MPROF SYST MANDT

MARA MTPOS_MARA SYST MANDT

MARA PROFL SYST MANDT

MARA RMATP SYST MANDT

MARA SAITY SYST MANDT

MARA VHART SYST MANDT

MARA WRKST SYST MANDT

I expect MARA must have join information with many other M* tables such as MAKT, etc. However, I don't see

this information.

Is there a different table I must be looking at?

Thank you in advance for your help.

0 Kudos

You are not clear on the requirement. If you want to see check table then goto table DD02L . This table gives table fields and there is a field DD02L-CHECKTABLE which will give the check table of a field. First see data in SE16 this table and then write your select statement.

If you want all check tables for MARA you will have to write

Select * FROM DD02L where TABNAME = MARA

and CHECKTABLE NE SPACE.

This is beacuse all fields may not have a foreign key relationship. Table DD05S gives more info on foreign keys . Check in SE16 and see what data you want before writing your select.

Cheers

0 Kudos

I cannot find a field called CHECKTABLE in DD02L.

Binoo

0 Kudos

Hi,

i think Sanjay means table dd03l

regards Andreas