Application Development 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: 

Error SAPSQL_ARRAY_INSERT_DUPREC

Former Member
0 Kudos
376

Hi,

Hi am writing some code in an exit. During execution after the execution of the exit, I am getting dump issue at the line like this:

INSERT afru FROM TABLE afru_i.

and dump showing as SAPSQL_ARRAY_INSERT_DUPREC.

How this can be avoided.

Regards,

Jeetu

1 ACCEPTED SOLUTION

Former Member
0 Kudos
150

hai,

waiting for ur reply.

shan.

Edited by: shan palani on Sep 24, 2008 10:04 AM

9 REPLIES 9

former_member188685
Active Contributor
0 Kudos
150

use modify instead of Insert.

0 Kudos
150

Insert code by the system not custonized code.

0 Kudos
150

Jeetu,

You are trying to insert a record with duplicate entry. Either modify the existing entry if your key fields are right. Or change the key fields so that insertion is not duplicate while considering the key fields

Regards

Farzan

Former Member
0 Kudos
150

Hi

are you appending records to internal table afru_i in the USER EXIT

Regards

MD

0 Kudos
150

No I am not appending to the table.

Former Member
0 Kudos
150

Hi,

This error means that ayou are attempting to commit

information to the database that would result in a duplicate entry in a table with primary key.

Regards,

Surinder

Former Member
0 Kudos
150

Inserting records to a standard SAP table is very dangerous. There could well be data integrity and synchronization issues.

Rob

Former Member
0 Kudos
150

hai,

check the internal table,

---it should be like that of database table

---check weather it is having any duplicate entries, if duplicate entries is there then use addition statement ACCEPTING DUPLICATE KEYS should be provided.

Former Member
0 Kudos
151

hai,

waiting for ur reply.

shan.

Edited by: shan palani on Sep 24, 2008 10:04 AM