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

Deleting foreign key dependent data.

ashok_mohan
Participant
0 Likes
1,766

I have 2 tables - zcar and zcolor. Zcolor key field is color number and zcar key field is engine number. The check table for zcar is zcolor table with color number as the key. So a car should be added to zcar if the corresponding color exists in zcolor table. Its working properly. But when i delete a particular color from the zcolor table, the corresponding car with that color is not deleted. Pls suggest a solution.

I have 2 tables - zcar and zcolor. Zcolor key field is color number and zcar key field is engine number. The check table for zcar is zcolor table with color number as the key. So a car should be added to zcar if the corresponding color exists in zcolor table. Its working properly. But when i delete a particular color from the zcolor table, the corresponding car with that color is not deleted. Pls suggest a solution.

2 REPLIES 2
Read only

Former Member
0 Likes
896

Hello,

you must delete the zcar entries manually when you're deleting the zcolor entry.

Only other option would be to configure your database tables on database level as key dependent but then you need direct access to the databse (not from inside SAP).

Regards Nico

Read only

0 Likes
896

Thanks