2007 May 08 12:36 PM
Hi All,
Could anyone help me out in this issue.i'm facing problem while giving a check table relationship in 4.7 version.
I had two tables ZTERM_k and ZTERM_P
ZTERM_K has fields MANDT and TERMDESC(terminal name) both the fields are marked as primary keys.
ZTERM_P has fields MANDT , TERMDESC and PRDHA. here only MANDT is marked as primay.
Table one has a unique key. This table will be used in the select option of the report to present the available options (similar to value keys).
i.e. 040 ALTURA
040 ITVM
040 SST
040 All SSP
Table two has a non unique key. In this table there will be a row for each product and the associated relationship. This table will be used to build the select option range that the program logic relies upon to read the database. In some cases the relationship of product is 1 for 1. In other cases, the table will contain 1 to many relationships (i.e ALTURA associated with product hierarchy codes ALT, ALT2, ALT4).
i.e. 040 ALTURA ALT
040 ALTURA ALT2
040 ALTURA ALT4
040 ITMV EDS
040 ITVM EDSQ
040 ITVM GG
040 SST SST
This is how we have the input in both the tables. i created the firs table ZTERM_K and added entries to it.the same way i created the table ZTERM_P
and selected the field TERMDESC and clicked on foreignkey tab gave the table name ZTERM_K and activated.
TERMDESC gives the values of ZTERM_K only.
TERMDESC key has several combinations of PRDHA in 2nd table.
now when i create the entries i'm able to enter only one entry.and not able to enter any entrys's with any combinations. it is displaying a message "A data record with specified key already exits".
waiting for your response.
Thanks & Regards,
Rayudu
Hi All,
Could anyone help me out in this issue.i'm facing problem while giving a check table relationship in 4.7 version.
I had two tables ZTERM_k and ZTERM_P
ZTERM_K has fields MANDT and TERMDESC(terminal name) both the fields are marked as primary keys.
ZTERM_P has fields MANDT , TERMDESC and PRDHA. here only MANDT is marked as primay.
Table one has a unique key. This table will be used in the select option of the report to present the available options (similar to value keys).
i.e. 040 ALTURA
040 ITVM
040 SST
040 All SSP
Table two has a non unique key. In this table there will be a row for each product and the associated relationship. This table will be used to build the select option range that the program logic relies upon to read the database. In some cases the relationship of product is 1 for 1. In other cases, the table will contain 1 to many relationships (i.e ALTURA associated with product hierarchy codes ALT, ALT2, ALT4).
i.e. 040 ALTURA ALT
040 ALTURA ALT2
040 ALTURA ALT4
040 ITMV EDS
040 ITVM EDSQ
040 ITVM GG
040 SST SST
This is how we have the input in both the tables. i created the firs table ZTERM_K and added entries to it.the same way i created the table ZTERM_P
and selected the field TERMDESC and clicked on foreignkey tab gave the table name ZTERM_K and activated.
TERMDESC gives the values of ZTERM_K only.
TERMDESC key has several combinations of PRDHA in 2nd table.
now when i create the entries i'm able to enter only one entry.and not able to enter any entrys's with any combinations. it is displaying a message "A data record with specified key already exits".
waiting for your response.
Thanks & Regards,
Rayudu
2007 May 08 12:54 PM
Hi,
While giviign check table relation ship . u check it properly.
I am suggesting:
activate zterm_k.
go to zterm_p
select terdesc field ...
goto forein field
then select field relationship...
And set CARDINALITY, i think here u r missing something .. u give proper cardinality and hope it will work. (combination of C, N, 1)
2007 May 08 1:25 PM
Hi jogdand,
Thanks for your reply,I checked but it did not work.
Rayudu.
2007 May 08 2:23 PM
Do the following :
Create the foreign Key as :
ZTERM_K - check table
TERMDESC - check table fld
ZTERM_P - Foreign table
TERMDESC - Foreign key field
Semantic attributes :
Foreign Key field type : Key fields / candidates
Cardinality 1 : CN
This should ensure that insertion of new records is allowed
2007 May 08 2:26 PM
do this way...
Create foreign Key
ZTERM_K - check table
TERMDESC - check table field
ZTERM_P - Foreign table
TERMDESC - Foreign key field
Semantic attributes :
Foreign Key field type : Key fields / candidates
Cardinality 1 : CN
2007 May 09 5:17 AM
While giving the foriegn i think u have check the checkbox named check table.This will only make a check while u entering a value in secondary table where the primary key field of primary table is used..
Otherwise give a primary key field newly other than MANDT.
Reward if useful
2007 May 09 9:39 AM
Hi All,
Thanks for your Support and suggestions, I solved the problem on my own.
The problem is in table ZTERM_P termdesc and Prdha fields should be marked as
primary. it is a combination of keys.
Appreciate your help and request you to continue.
Thanks & Regards,
Rayudu
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |