Application Development 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: 

Foriegn Key Checks

Former Member
0 Kudos
209

Hi,

When we define foreign keys, they are checked by user interface only and they do not exist in database.

But if we r to update some z tables, without user interface, how one can be assured that foreign key constraints are also checked ?

Regards,

Nitin

6 REPLIES 6

Former Member
0 Kudos
87

Hi Nitin,

If you update the tables without a user-interface (a screen, in particualr), then the ckecks will not take place. That is the reason you are strongly advised not to update the database tables directly.

Regards,

Anand Mandalika.

0 Kudos
87

I am not updating standard tables. I am developing a zee system where some tables are interlinked.

Hence I was thinking that one should get error while inserting the data in a table if foreign key constraints are violated.

Is it that no solution exists at all ?

0 Kudos
87

Hi,

Generate Table Maintenance and do the necessary coding in PBO and PAI.

Hope it helps.

0 Kudos
87

Hi Nitin,

It doesn't matter whether you're updating a z-table or a standard table. the foreign-key checks can only be done if there's a screen.

<a href="http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3a60358411d1829f0000e829fbfe/frameset.htm">This link</a> from the online documentation tells you that.

There are some other places in the documentation where this is stressed, if you want I can find that out.

Regards,

Anand Mandalika.

Former Member
0 Kudos
87

Hey,

Better create a table maintenence for that Z table.

If you need the procedure to create a table maintenance and how to hanlde the login in PAI/PBO will help you.

Regs,

Venkat

Former Member
0 Kudos
87

Hi Nitin,

You have chosen the option "Solved it on my own". And you haven't rewarded any points to any of the answers give. So do we take it that you have found <i>none</i> of the responses useful ? Also, if you have solved it on your own, then can you share the answer that you have found ?

Regards,

Anand Mandalika.