2007 Mar 27 8:26 PM
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
If i am using Native SQL commands then whether it will get delete?
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
If i am using Native SQL commands then whether it will get delete?
Any info on this.
Thanks
aRs
2007 Mar 28 5:02 AM
HI,
I have question for you,
How are you defining a foreign key relation in an SAP table ?
As far as I know you can only define entry help / check for the fields. This does not create a foreign key relationship. It only helps for value help and validation for entries in this field. And it does not create any relationships between the tables even in the backend database.
So when you delete entries from the (Parent) table it does not complain. Even if you use Native SQL noting is going to change becase no foreign key relationship exists.
Tell me if you find something different.
-Kalyan
2007 Mar 28 6:07 AM
Kalyan,
Please go thru this link, you get info releated to foreign key table i mentioned in may question.
http://help.sap.com/saphelp_nw2004s/helpdata/en/cf/21ea9e446011d189700000e8322d00/frameset.htm
aRs
2007 Mar 28 6:31 AM
Hi,
First you have to delete that relationship from the CHILD table(delete Parent table for the field TCTR and SPRAS), then you can easily delete the entries.
Generally when your you try to delete entries fron one table, SAP checks for all dependencies such as Foreign key relationship and won't allow to delete .
regards,
Anji
2007 Mar 28 2:27 PM
Hi,
If i am try to delete entries from parent table without deleting from child table first also system deleting entries from the parent table.
What i am doing wrong?
Whether SAP is not considering the RDBMS rule.
<b>
Help Please....
</b>
aRs
2007 Mar 28 6:55 PM
Hi,
I tried this out with a table that has foreign key relationship with a parent table .
I inserted a new record in a table which has a foreign key relation with value that the parent table does not have. it let me insert.
It look like even if you define a foreign key in the DDIC it does not create the relation in the database level. I think this is only used for checks in SAP. It does not follow the RDBMS rules.
- Kalyan
2007 Mar 29 6:54 PM
Anybody have a solution for this issue.
Please help..
Thanks
aRs
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |