2012 Dec 31 11:44 AM
Hi experts,
Is it possible to have duplicate records in foreign key table for a corresponding record from check table ?
For eg :if i am having check table in which i am storing customer numbers and a foreign key table in which i am storing customer relevant data(name,address etc...) and now i want to have multiple records in the foreign key table for same customer number in check table .Is it possible..?
I mean what should be the cardinality (N:M) for this scenario ? and also what setting i have to choose in "foreign key field type" while making the foreign key relationship ? Also it will be helpful to me ,if u throw some light on the cardinality concept (n:m).
2012 Dec 31 11:56 AM
Hi, you can store multiple same values as long as the key is different and you have that value in check table.
check table value : foreign table value = 1:N.
2012 Dec 31 12:09 PM
Ok. I get that.Thanks.But can't we have a case where we can have same key and multiple records in foreign key table ? Is that possible by choosing different cardinality ratio ..?
2012 Dec 31 12:23 PM
Hi,
EX: table1 is your check table and field1 is the field for checking the value. Suppose you have a value 123 in field1. table2 is a foreign table having field2 for which you want foreign key relationship.
Now field2 can have value 123 as many times as it can(depending on the cardinality you specify). But you have to make sure the key value of the foreign key table is unique.
go through here.
http://help.sap.com/saphelp_nw04s/helpdata/en/cf/21ea77446011d189700000e8322d00/content.htm
and here of how to create foreign keys.
http://help.sap.com/saphelp_nw04s/helpdata/en/cf/21eb95446011d189700000e8322d00/content.htm
for cardinality go through here.
http://help.sap.com/saphelp_nw04s/helpdata/en/b2/fbb859c64611d295dd00a0c929b3c3/content.htm
thanks.
Message was edited by: Aswatha Narayana SA