cancel
Showing results for 
Search instead for 
Did you mean: 

ECC 6. was able to delete records even though it has dependent records ....

Former Member
0 Kudos

Hi Guyz,

Was able to delete entries from master table even though I have entries in detail table. I defined foreign key in detail table field refering to master table field. I am working on ECC6.0. Does any body got same problem ?

Regards,

Venkat.

Accepted Solutions (0)

Answers (2)

Answers (2)

jj
Active Contributor
0 Kudos

You have a master table : For eg: Code Type

with some values

like

Fields:CODE_TYPE(Primary key *) CODE_DESC

ENCL Enclosure

NACO Nature of concern

PORT Port code

Another detail table with

Fields:

CODTYP(#) CODE () CODDESC

ENCL 2 Insurance Certificate

ENCL 3 Quality Certificate

ENCL 4 SAARC Preferential Trade Agreement

Fields CODTYP also has foreign key(#) reference

to first table Code type(Check table)

You deleted CODE_TYPE: ENCL from the first table: Code Type

The system will allow this type of deletion.

But when you try to add a new entry with codtyp = 'ENCL'

Next time it will raise error message saying that value doesnot exit in check table.

If you want to have a check whether its used in details table at master table entry deletion time, you may have to write some extra form in deletion event in TMG.

Former Member
0 Kudos

One test that you can perform to check whether you have created correct foreign key is to try and make an entry in the detail table for some entry which is not existing in your main/master table.

If this is getting created, then your foreign key assignment in not working.

You should recreate it and activate the tables.

Hope this helps

Regards

Nishant