cancel
Showing results for 
Search instead for 
Did you mean: 

foreign key

Former Member
0 Kudos
102

Hi Abapers,

I have created a foreign key table as well as check table and linked via foreign key relationship.But while entering a value into the foreign key table the validation is not happening with the check table values (I can enter any value which is not in the check table).

Here the validation should be done know?

can u tell me where I had done mistake?

please explain me in detail abt this foreign key relationship.

.

I am using 4.7 enterprise version.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

if we maintain check table and generated a table maintanance program then it will chek for the entries existing in the chek table or not. if we main tain foreign key table then it won't check for the existance of the entries in the master table.

if we write our own program then we have to handle the check condition. it won't check for the entries.

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi,

I think while creating the foreign key relationship, give the cardinality 1:CN or 1:C based on your relationship type and also specify the foreign key field type ( i.e. whether key fields/candidates etc). Also tick the check required check box.

Hope this may clear your problem.

Regards,

Harish.

Former Member
0 Kudos

Hi,

First create table1. Create table maintenance generator for that and enter data. create another table table2. For table2 take a field(which is common to both table1 and table2)create foreign key relation with the table 1. create a table maintenance generator for table2.

If you enter data for that field, If will not accept the data other than table1-field.

regards,

kamala.

Former Member
0 Kudos

Thanks..its working

Former Member
0 Kudos

Hi Friend,

A foreign key provides a link between two tables, for eg.,T1 and T2 by including a reference in table T1 to the primary key of table T2. For this purpose, Foreign key fields assigned to the primary key fields of T2 are included in T1. Table T1, which is the one being checked, is called a foreign key table, and table T2 is called a check table. The terms dependent (foreign key) table and referenced (check) table are also used.

After creating foreign key relationship, you have to activate your table then only it will allow you to do checking.

Thanks,

Best Regards,

NanBhava

Former Member
0 Kudos

Hi friend,

I have activated the table after creating the foreign key...but still its not validating.

please clarify my doubt

Former Member
0 Kudos

Hi,

Subash check table will only provide search help for that field on screen by pressing F4 until and unless on screen program or report where u using foreign table u not validate the field against that check table .

Thanks

Reward points