Skip to Content
Former Member
Feb 16, 2009 at 01:45 PM

How to trigger a 'delete' across different related tables in ABAP?


Hello All,

I am creating database tables for storing different values of features coming under different countries. I have eight tables in my design and there are fields repeating in different tables, which i am connecting through foreign key relationship.

After entering values to all my tables, if i need to delete a particular field value which is repeating in more than two tables, is it possible to trigger a delete event by which if am deleting the field value in a particular table, all the related field values also get deleted from the respective tables?

For example, if i have a PRODUCT field in three tables, and if one of the PRODUCT is deleted from a particular table, can i trigger a delete event by which i can delete all the values related to that particular PRODUCT from all the related tables? The PRODUCT is a primary keyfield, and i have maintained proper foreign key relations also.

I have tried deleting entries using the views and using the database table itself, but only that particular table value is being deleted.

Is there any function module for triggering a delete?

Can anyone help me with some solution?Sample code will be helpful.

Thanks in Advance,