09-12-2008 4:20 AM
Friends,
There are two fields in the ztable: one field that is the primary key and one more field.
I am entering value for the primary key field and I get the error:
The ABAP/4 Open SQL array insert results in duplicate database records. records in the data base.
Please let me know what is missing.
Thanks and Regards.
09-12-2008 4:25 AM
this is self-explanatory problem. you're trying to insert with the same data in your primary key. put a checking in your prorgram if data exist dont update.,
09-12-2008 4:25 AM
this is self-explanatory problem. you're trying to insert with the same data in your primary key. put a checking in your prorgram if data exist dont update.,
09-12-2008 5:03 AM
hi,
As you know primary key is to avoid duplicate entries in the table,
I think you are entering records with same primary key.
I think its better to change your primary key, or take care duplicate entries are not inserted
regards
prasanth
09-12-2008 5:25 AM
Hi,
The error is because there is already a similar record existing in the database.
Check if sy-subrc = 0 just after the select statement, which will indicate that the record already exists.
You will have to give different name (primary key) for inserting a new record.
Hope this solves the problem.
Regards,
Darpana.