Application Development and Automation 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: 
Read only

how to modify table to accept duplicate values.

aris_hidalgo
Contributor
0 Likes
1,580

Hello experts,

I recently created a table that has fields mandt, plant, storage_location and description. Now, when I try to enter values in SM30 at columns plant and storage_location it says that an entry exists with same key. I checked my custom table via se11 and I checked that the only key field is mandt. How can I modify my table so it will accept same values? thanks a lot guys!

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
949

Hi,

If you have declared MANDT as the only key column obviously its the same the value that is being entered into that column.

100 column1 column2.

100 column1 column2

That means if you look at the MANDT, the values are being duplicated.

What you can do is.

1. Have a unique column, probably have serial number, so that you have a proper key.

2. Take out the KEY attribute of the MANDT as well.

Regards,

Ravi

Note : Please mark the helpful answers

Hello experts,

I recently created a table that has fields mandt, plant, storage_location and description. Now, when I try to enter values in SM30 at columns plant and storage_location it says that an entry exists with same key. I checked my custom table via se11 and I checked that the only key field is mandt. How can I modify my table so it will accept same values? thanks a lot guys!

3 REPLIES 3
Read only

Former Member
0 Likes
949

Hi Viraylab,

You may want to add plant and storage location as key fields. Then regenerate table maintenance. It does not make sense only mandt (I could be wrong).

Hope this will help.

Regards,

Ferry Lianto

Read only

Former Member
0 Likes
950

Hi,

If you have declared MANDT as the only key column obviously its the same the value that is being entered into that column.

100 column1 column2.

100 column1 column2

That means if you look at the MANDT, the values are being duplicated.

What you can do is.

1. Have a unique column, probably have serial number, so that you have a proper key.

2. Take out the KEY attribute of the MANDT as well.

Regards,

Ravi

Note : Please mark the helpful answers

Read only

Former Member
0 Likes
949

Hello,

Your problem seems to be a bit unique.

But what you could do is make all of your fields as keys and add another field, a counter perhaps that is not a key.

Try to add an event "on save" to increment the counter.

Hope this help