‎2007 Feb 12 8:32 PM
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
‎2007 Feb 13 6:08 AM
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 ?
‎2007 Feb 12 8:39 PM
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
‎2007 Feb 12 8:49 PM
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.
‎2007 Feb 13 6:08 AM
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 ?