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

insert with accepting duplicates

Former Member
0 Likes
448
insert ztable from wa_ztable

how to add code to accept duplicates as well ?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
423

INSERT ztable FROM TABLE itab ACCEPTING DUPLICATE KEYS. All this does is that if there is an entry with a duplicate key, it will simply drop the record and the SY-DBCNT will give you the number of inserted records.

2 REPLIES 2
Read only

Former Member
0 Likes
424

INSERT ztable FROM TABLE itab ACCEPTING DUPLICATE KEYS. All this does is that if there is an entry with a duplicate key, it will simply drop the record and the SY-DBCNT will give you the number of inserted records.

Read only

Former Member
0 Likes
423

Do not maintain any primary keys in your ztable.

INSERT command will insert a row if it does not find one with matching primary keys. If it finds it will not insert the row.

Thanks,

Santosh