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

Foreign Key Table Delete not working

former_member194669
Active Contributor
0 Likes
2,160

Hi,

This is regarding my previous question

I am more details on this->


Parent Table fields

MANDT	CLNT	3        
TCTR	CHAR	6

Child Table fields

MANDT	CLNT	3
SPRAS	LANG	1
TCTR	CHAR	6
TRDESC	CHAR	40

Here SPRAS has given fireign key relation to T002-SPRAS and TCTR foreign key relationship to Parent table TCTR.

If i am trying to delete entries from parent table system not deleting entries in child table

Any info on this

Thanks

aRs

Hi,

This is regarding my previous question

I am more details on this->


Parent Table fields

MANDT	CLNT	3        
TCTR	CHAR	6

Child Table fields

MANDT	CLNT	3
SPRAS	LANG	1
TCTR	CHAR	6
TRDESC	CHAR	40

Here SPRAS has given fireign key relation to T002-SPRAS and TCTR foreign key relationship to Parent table TCTR.

If i am trying to delete entries from parent table system not deleting entries in child table

Any info on this

Thanks

aRs

4 REPLIES 4
Read only

Former Member
0 Likes
1,055

initially, u need to delete the entries from the child table...then only u can delete data from master table....as there is a foreign key relation, the foreign key data needs to be deleted first...

Read only

Former Member
0 Likes
1,055

Hi!

There is no automatic deletion in SAP, you have to delete yourself everything. First of course the child entries and then the parent entries.

If you forget to delete child entries, there may remain inconsistencies in the system which makes it unstable.

Regards

Tamá

Read only

Former Member
0 Likes
1,055

Hi,

First u delete entries from the child table and then try to delete the entries from parent tale.

U can't delete the entries from the parent tale if those entries are there in child table.

Regards,

Sruthi

Read only

former_member194669
Active Contributor
0 Likes
1,055

Hi All,

I am still not clear about this RDBMS rule

As per RDBMS rule If the primary key is updated, all referencing foreign keys are updated to the same value. If the primary key is deleted, all referencing foreign key rows are deleted. This effect works for all cases of cross-referencing and self-referencing

How to enable this rule related to parent and child table using foreign key relationship.

Thanks

aRs