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

accepting duplicate keys

Former Member
0 Likes
2,586

iNSERT itab FROM wa_structure .

why it won't put me on "accepting duplicate keys" ?

how do I hang the data to the table without deleting the already present ones and accepting the duplicates?

iNSERT itab FROM wa_structure .

why it won't put me on "accepting duplicate keys" ?

how do I hang the data to the table without deleting the already present ones and accepting the duplicates?

6 REPLIES 6
Read only

Sandra_Rossi
Active Contributor
2,326

Because it's only for INSERT ... FROM TABLE ... ACCEPTING DUPLICATE KEYS, as explained in the documentation.

Hang?

Read only

Former Member
0 Likes
2,326

so what instruction should I use to be able to add data to the custom database by accepting duplicate keys?

Read only

Sandra_Rossi
Active Contributor
2,326

Don't you think that inserting a structure and inserting an internal table of one line is the same thing?

Note that INSERT itab FROM wa_structure will return SY-SUBRC = 4 if the line already exists (considering the primary key only).

I'm not sure what you want to achieve, and if you understand exactly what means the option "ACCEPTING DUPLICATE KEYS".

What means "hang" in the context of database updates?

Read only

Sathya_Gunasekaran
Contributor
2,326

Use MODIFY. The table can't have duplicate keys!

Read only

gayathri_jayajeevan2
Participant
2,326

Hi,

You can not insert a duplicate key in the table.

Please go through the concept of "Primary Key" which should accept only "unique & not null" values.

you can have duplicate entries only when there is no key fields defined.

Read only

Former Member
0 Likes
2,326

Change internal table and workarea definitions, to add a new field (column) to each, which will make each row unique (no duplicate keys), such as POSNR or so.