2014 Apr 26 2:27 PM
Hi,
I have created a sorted internal table with unique key as under -
DATA : ITAB TYPE SORTED TABLE OF SFLIGHT WITH UNIQUE KEY CARRID CONNID.
Now the internal table already has a record with say CARRID = 'AA' and CONNID ='0017'
However when i try to insert one more record in the internal table with same key say CARRID = 'AA' and CONNID ='0017'
it does not give me any error. Should not it give me an error as it is table with UNIQUE key and should not allow duplicates
Hi,
I have created a sorted internal table with unique key as under -
DATA : ITAB TYPE SORTED TABLE OF SFLIGHT WITH UNIQUE KEY CARRID CONNID.
Now the internal table already has a record with say CARRID = 'AA' and CONNID ='0017'
However when i try to insert one more record in the internal table with same key say CARRID = 'AA' and CONNID ='0017'
it does not give me any error. Should not it give me an error as it is table with UNIQUE key and should not allow duplicates
2014 Apr 26 2:40 PM
2014 Apr 26 2:40 PM
Hi Hema ,
You will not get a design time error but a run time error as the duplicate is not checked till we run the program.You should get this error "ITAB_DUPLICATE_KEY_IDX_OP".
Anjan
2014 Apr 26 4:10 PM
You asked this question already. You did not respond to the questions asking for further information - like the actual source code you've used. Therefore I rejected your question.
In the hope that this time you'll actually get the message. I shall now lock this thread.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |