Skip to Content
0
Former Member
Jul 04, 2007 at 07:26 AM

Foreign Key Problem.. plz help urgently

16 Views

I have a Z table having these fields....

MANDT MANDT

GSBER GSBER (primary key also)

HBKID HBKID

Foreign key is defined for GSBER (taken from TGSB table)

Check table is defined both for GSBER and HBKID..

i have created a table maintainence generator also..

my Requirement is that... When i am entering value in the table...

for One value of GSBER there can be only one value of HBKID

basically a 1 is to 1 relationship...

i wil give an example..

GSBER HBKID

120 555 ( Right)

120 545 (not Allowed)

343 555 (not allowed)

ps: I have tried making the HBKID also as primary key... but then it is accepting values which are null. so i dont think thts right...

How can i use cardinality in this case.... If that is the solution?

thanks

Ankit