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

Former Member
0 Likes
903

Hi All,

I have created 2 tables and made primary key of one table as a foreign key for 2nd table but it is accepting the other values which are not there in foreign key table. i have followed the nor mal procedure like going to foreign key and giving the check table and accepting the proposal.

Can anyone please guide me what can be the problem.

thanks

Ritika

7 REPLIES 7
Read only

Former Member
0 Likes
866

Hi,

can you tell something more about primary keys of those tables? How many key fields consist those tables?

Are you sure you entered foreign key for all key fields? Is the requirement of the domain equality fulfilled?

Regards

Read only

Sandra_Rossi
Active Contributor
0 Likes
866

There is a checkbox "Check required" in the foreign key.

Read only

Former Member
0 Likes
866

Please refer to [Foreign Keys|http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ea77446011d189700000e8322d00/frameset.htm]

Hope this helps.

Read only

Former Member
0 Likes
866

Hi ritika,

there are two things....

one is check field and other is check table.

the table in which you befine the foreign key is the check field and the foreign table is the check table.

now if check table have many primary key then you have to define all the keys with foreign key.....

you can also define keys of check table as generic key or with constant key....

in generic key you need not to check that field with any field

in constant key you have to check it with constant.....

hope this helps,

Thanks,

Tanmaya

Read only

Former Member
0 Likes
866

Can you please tell me what cardinality you have specified while creating a foreign key??

It should be 1:N.

Read only

0 Likes
866

thank you every one for the response.....i checked in the example table actually in 4.7 it is a bug.... it does not validate the input it saves the record any way.

in another versions my process works fine.

Read only