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

database table relationships ??

Former Member
0 Likes
1,129

Hi,

i want to konw how to check the relationships among database tables, based on foreign key, for example, relations among "SCARR, SPFLI, SGEOCITY, SCOUNTER....."

better there's a diagram description .

thanks!

1 ACCEPTED SOLUTION
Read only

SantoshKallem
Active Contributor
0 Likes
832

check it in tcode sqvi (quick viewer)

give the table names in table join method.

6 REPLIES 6
Read only

Former Member
0 Likes
832

zhang ,

give your mail id i will send docs.

Read only

0 Likes
832

hi, kaipha,

my mail is zhangkun167@163.com

thanks!

Read only

SantoshKallem
Active Contributor
0 Likes
833

check it in tcode sqvi (quick viewer)

give the table names in table join method.

Read only

Former Member
0 Likes
832

Hi

In the tables SPFLi and SCOUNTER check against the field CARRID the foreign key check table is SCARR

so the link between these tables are SCARR-CARRID = SPFLI-CARRID.

and SCARR-CARRID = SCOUNTER-CARRID

other table SGEOCITYdoesn't have any foreign key relationship with those above tables SCARR and SPFLI

but you can link with the CITY and COUNTRY fields of this table SGEOCITY with the CITYFROm and COUNTRY FROm or CITY TO or COUNTRY TO fields as per the requirement

reward if useful

regards

Anji

Read only

0 Likes
832

yes, Anji,

but how to know whether there's a foreign key or not ?

i know SCARR-MANDT restricted by T000, and SCOUNTER-CARRID by SCARR, and SPFLI-CITYTO restricted by SGEOCITY, etc.

i just want to know if i key in "SPFLI " in some place, whether the system can show me the table name "T000, SCARR, SGEPCOTY", for example, and how these table relate with SPFLI.

Read only

Former Member
0 Likes
832

Hi,

Goto SQVI,

create new query

goto layout mode

add tables one by one

u will find (foreign) relationship automatically

this is common for all SAP table ...

Hope it will help u.

Jogdand M B