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: 
Read only

Deletion from a check table - Foreign Key Problem

Former Member
0 Likes
708

Hi,

I have created two tables (A and B) and defined a foreign key (1:N) relation between them. I want the entries in table B to reference a record from table A. I have succeeded in entering values to the tables.

The problem arised when I tried to delete a record from the referenced table. Although there are records in table B referencing the record in table A, I could delete the record from table A. I don't want the referenced records to be deleted from table A when there is at least one referencing record in table B.

what is wrong with my table definiton?

thanks,

- ferudun

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
614

Hi,

May i know to which table (either A or B) you attached the checktable ? and what is the relationship you defined between A and B. is it the foregin key relationship or is it the checktable definition at the domain level of B ? can you please explain your question clearly ?

3 REPLIES 3
Read only

Former Member
0 Likes
614

Hi,

How are you deleting the records from the table A..

If you deleting the records from a custom program..You have to make sure there is no records in the table B.

Thanks,

Naren

Read only

0 Likes
614

I have deleted using tcode se16 but I will delete them from a custom program. I have just tried whether it works from se16. I want an error to be raised when deleting records from the referenced table.

Read only

Former Member
0 Likes
615

Hi,

May i know to which table (either A or B) you attached the checktable ? and what is the relationship you defined between A and B. is it the foregin key relationship or is it the checktable definition at the domain level of B ? can you please explain your question clearly ?