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

SAPSQL_ARRAY_INSERT_DUPREC

Former Member
0 Likes
940

Would someone tell me what is this "ABAP/4 processor: SAPSQL_ARRAY_INSERT_DUPREC"?

(Message no: 671; Message Type: A)

The job cancelled by this message. It is happened in

"BAPI_INCOMINGINVOICE_CREATE".

How to fix this message?

Thanks,

Helen

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
827

Have a look at OSS note 661864. the correction there might fix your problem.

This is a relatively recent note that talks about this problem for this BAPI.

Rob

Message was edited by: Rob Burbank

5 REPLIES 5
Read only

Former Member
0 Likes
827

Helen,

The function is trying to insert a duplicate record in some database table. IF this is happening from the standard function module, check for OSS notes on the same.

You can try executing the same in the foreground, place a breakpoint at the message statement and find out which table is causing the issue

Regards,

Ravi

Note :Please mark the helpful answers

Read only

Former Member
0 Likes
827

Use an ABAP/4 Open SQL array insert only if you are sure that none of

the records passed already exists in the database.

The ABAP/4 Open SQL array insert results in duplicate database records.

records in the data base.

If you use an ABAP/4 Open SQL array insert to insert a record in

the database and that record already exists with the same key,

this results in a termination.

(With an ABAP/4 Open SQL single record insert in the same error

situation, processing does not terminate, but SY-SUBRC is set to 4.)

Regards,

ravi

Read only

Manohar2u
Active Contributor
0 Likes
827

Helen

Program is trying to insert duplicate entries into database table.

You can able to know the table name from update / system log SM13 / SM21 Tocdes.

Regds

Manohar

Read only

Former Member
0 Likes
828

Have a look at OSS note 661864. the correction there might fix your problem.

This is a relatively recent note that talks about this problem for this BAPI.

Rob

Message was edited by: Rob Burbank

Read only

Former Member
0 Likes
827

This should not happen with standard tables as SAP takes care of it normally. But if your incoming invoices use external number range and if you used the same number twice, may be that is one reason. Also you will know where you are getting duplicate record by going to ST22 and look for the dump analysis. If possible let us know the table on which you get this dump.

Once in a while updates fail while in update task due to very rare system hiccups(like database full etc). In such cases, it is possible to have this error.

Also, check if you are updating any custom tables(Z tables) in some user exit that may be causing this issue.