2012 Jan 18 7:14 PM
Hello experts,
Is it possible to define a unique constraint on table fields that aren't part of the primary key?
Thank you in advance.
Hello experts,
Is it possible to define a unique constraint on table fields that aren't part of the primary key?
Thank you in advance.
2012 Jan 18 7:17 PM
2012 Jan 18 7:21 PM
Thank you Rob, how can i achieve this?
I'm trying to create an aditional constraint that doesn't allow the insertion of a record that fails this constraint.
2012 Jan 18 7:23 PM
2012 Jan 19 7:05 AM
One way is to create an index on the field and make it unique (SE11->GOTO->Indexes). Then in your programs Inserts, Appends and Updates would fail giving you a non zero SY-SUBRC when a program tries to enter a value that already exists.
Don't forget to include MANDT in the index otherwise you'll end up with uniqueness across all clients
2012 Jan 19 9:45 AM
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |