Application Development 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: 

the two record with the same key

Former Member
0 Kudos

Dear abapers:

I have a add-on table that has 8 keys.I found that I can make the two record with the same key in this table.

But why does the two same key's record exist in the add-on

table? And how?

Who can explain this?

Thanks a lot!

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Perhaps you have not declare any key field in this add on table.

Try to declare one or multiple keys as your primary key depending on your requirement..

after this you cannt insert two records with same key in your table.

Hope, this helps you.

Regards,

Tarun

7 REPLIES 7

Former Member
0 Kudos

Perhaps you have not declare any key field in this add on table.

Try to declare one or multiple keys as your primary key depending on your requirement..

after this you cannt insert two records with same key in your table.

Hope, this helps you.

Regards,

Tarun

0 Kudos

Thank for answering.

But I am sure that there are 8 primary keys in this add-on table.

0 Kudos

Hi alex,

Do you mean that the table has entries have repeating entries for primary key.

IF a table has 8 primary keys then it can accept records where atleast one of them have a different value.

Just consider a sample table with FIELD1 FIELD2 FIELD3 as primary key.

Then,


FIELD1 FIELD2 FIELD3
a      b      c
a      b      d
a      b      e

are all valid entries.

Regards,

Wenceslaus.

0 Kudos

Yes, database will not allow to insert records with duplicate primary keys in table.

If you are saying that there are 2 records with same keys, check the field values - probably if there are character fields, there can be difference in case - some characters are caps and same are in small caps in second record.

Else pls paste data and keys here to have a look upon.

0 Kudos

I'm sure that I can create two record that all of the primary keys are the same value.

It is funy that when I delete one of the records has the same primary keys, all of them are deleted.

Later maybe I can paste the copy

0 Kudos

Alex,

If you have declared the keys of the table properly in SE11, then it is not possible to have two records having the same exact keys.

Can you paste the table definition and the two records here?

Regards,

Ravi

Former Member
0 Kudos

hi alex,

I am also facing this problem of two records with same primary keys. Did u find solution to this problem? Please help. Its urgent

Thanks,

satya