2006 Nov 07 5:49 AM
Few fields of my table has to be maintaied a foreign key relation.
Can some one help me how to do this?
Please give me step-by-step procedure.
Thanks in advance
Regds
kiran
2006 Nov 07 7:02 AM
i ve deleted the foreign key flds and took enter. it pop-ups a msg to maintain the foreign key flds..
regds
kiran
2006 Nov 07 5:53 AM
Hi,
Check the sap help on Foregin key and Check table
http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ea77446011d189700000e8322d00/content.htm
regards
Anver
2006 Nov 07 5:56 AM
Hi kiran,
There is no specific rule to determine which are the foreign key fields in a table.U can apply simple logic as what all fields determine the relation between the tables and make them as foreign keys.
regards
Sandeep
2006 Nov 07 6:03 AM
Hi Kiran,
In order to have a foreign Key relationship.. Both the fields of the 2 tables should have same domain names and also One of the Field should be a primary key. Ok.
Then After Having all this things click on the button (Key) to establish relation. After Clicking on it then a separate screen is opened asking for a proposed table. then provide the second table name and Click on GEnerate Proposal. The Automatically the fields in that particular table are displayed Then Click on "copy" to get all the fields related. If u want only that particular field to have relation. Just check the "Generic" Check box and Then Clear the Contents in the Fields Foreign Key Fields in that screen which foreign key is not required. Then Click on " Copy" Foreign Key relation is maintain.
Bye
Murthy
2006 Nov 07 6:18 AM
hi murthy,
tx for the instant reply.
i have 3 fld in chek table. n when i say generate proposal, it fetches 2flds in which 1 fld is grayed out. screen shot shown here.i want only that grayed out field. i dont want the other field. so it doesnt allow me 2 clik generic.
how can i do this...
kiran
2006 Nov 07 6:24 AM
Hi Kiran,
Did u check the Check box and and did u clear the Foreign Key Fields Do this both Then it will allow to cerate a foreign key relation and u will get only the greyed out field.
try and see if u have any problem. MAil me back .
Bye
Murthy
2006 Nov 07 7:02 AM
i ve deleted the foreign key flds and took enter. it pop-ups a msg to maintain the foreign key flds..
regds
kiran
2006 Nov 07 7:04 AM
Kiran See Did u clear the field "For.Key Table" and "Foreign Key Field" for the field to which u don't want to create a foreign key relationship. After Clearing them Check the checkbox "Generic" to the Fields to which u don't want to have Foreign Key relation. and then Clik on Copy. It will Work. Do the Above for the Fields to Which u don't want to Create a Foreign Key Relation
Bye
Murthy
2006 Nov 07 7:27 AM
tx murthy, its working fine now.
tx for the help.
awarding points 2 u and others also.
regds
kiran
2006 Nov 07 8:38 AM
hi,
please make sure that the foreign field in the check table and actual table must have same domail ( not data type but data element ).
bye