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

Cascade delete and update of Foreign table records corre. to Primary table

Former Member
0 Kudos

Hi Experts,

I ahve created a table which has a foreign key field pointing to one of the field in teh primary table.

If i delete an entry from the primary table, deletion is successful without any warning message even though there is a dependent

row in the fireign table.

I want it to perform the cascade delete, means when i delete a record form the primary table, it should delete all the dependent records from the foreign table.

Please sugest me in achieving this.

Thanks in advance.

Thanks,

Shilpa

4 REPLIES 4

Former Member
0 Kudos

How are you deleting the records

a) Manually

b) Progrmatically

if option a then its not possible and if option b then you can delete..

Regards

Kumar

0 Kudos

Hi Kumar,

Thanks for your reply.

I have created a maintainance view using table maintainance generator for primary table. I am deleting primary table records form the maintainance view. Even then it is not deleting the dependent records in teh foreign table.

Is this how it works generally or some configuration is missing in our system?

Please reply.

Thanks,

Shilpa

Former Member
0 Kudos

Hi,

Check this

[http://help.sap.com/saphelp_nw70/helpdata/en/34/ee7fbd293911d3a97d00a0c9449261/content.htm]

Subhankar
Active Contributor
0 Kudos

Hi Shilpa,

Create an event in the TMG. Inside the code delete foreign key table data.