10-06-2008 3:37 PM
Hi All,
I have a scenario...
where I have three key fields in my table: zgrp, zrole and zdate and two non key fields zdatum and zpur
Now I want to enter the following records:
zgrp - > 1
zrole-> xyz
zdate->12/12/2008
zdatum->12/11/2007
zpur->1
zgrp - > 1
zrole-> xyz
zdate->12/12/2008
zdatum->12/11/2006
zpur->2
zgrp - > 1
zrole-> xyz
zdate->12/12/2008
zdatum->12/11/2007
zpur->3
zgrp - > 2
zrole-> abc
zdate->12/12/2008
zdatum->12/11/2007
zpur->1
zgrp - > 2
zrole-> abc
zdate->12/12/2008
zdatum->12/11/2007
zpur->2
but I am not being able to insert these records, as soon as I enter the first record it gives me the follwoing error:
"An entry already exists with the same key"
Thanks,
Rajeev
10-06-2008 3:44 PM
Hello ,
The first 3 entries that you want to add to you table all have exactly the same values for the key field. That is why you are getting the error.
You will need to rethink the keys that are needed for you table. You may need to add another key field to make the entries in you table unique by those key values.
Regards
Greg Kern
10-06-2008 3:41 PM
How about looking in the table with SE16 to see what's already in there?
edit.
By the way: even if you manage to insert the first one, other's will go wrong. Given your examples: your primary key is not unique.
10-06-2008 3:42 PM
10-06-2008 3:44 PM
Hello ,
The first 3 entries that you want to add to you table all have exactly the same values for the key field. That is why you are getting the error.
You will need to rethink the keys that are needed for you table. You may need to add another key field to make the entries in you table unique by those key values.
Regards
Greg Kern
10-06-2008 3:48 PM
you need one more key field to build an unique key: i.e. zcount type numc4 so you could add from 1 to 9999 records with eaqual keys.
you can not add a second record with key
zgrp - > 1
zrole-> xyz
zdate->12/12/2008