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

ztable entries and check table

former_member632991
Active Contributor
0 Kudos
523

Hi,

I have a Z table and one of its fields has standard table as check table.

When any entry is deleted from the check table , then how will it get deleted from the Ztable also. it should not be in ztable if it is not in the check table.

Regards,

Sonika

6 REPLIES 6

Former Member
0 Kudos
264

For the best of my knowledge, Primary/Foreign key relationship will check dependencies only while Inserting/Updating data in the table.

It will consider the dependencies when deleting entries from the tables.

U have to explicitly use logic to meet your requirement.

0 Kudos
264

sorry

It will not consider dependencies while deleting the entries from tables.

0 Kudos
264

It will not allow you to delete the entry in the check table until you go and delete the entry in ur z table. I am not sure about this. I think i had read this while learning concept of foreign key in oracle.

Former Member
0 Kudos
264

If you delete entry in check table then it will always check its dependencies and if that entry is found in any of the dependent table, it won't allow its deletion.

G@urav.

former_member632991
Active Contributor
0 Kudos
264

.

Pawan_Kesari
Active Contributor
0 Kudos
264

As far as I know Foreign key defined will not prevent deleting entry from check table. You have to explicitly build this logic.

If using table maintenance generator you can use events to put your code in which will check if dependencies exists and stop user from deleting.

In table maintenance generator screen go to menu Environment, Modification, Event and use one of the appropriate event to put your logic in.

Regards,

Pawan.