cancel
Showing results for 
Search instead for 
Did you mean: 

SAPSQL_ARRAY_INSERT_DUPREC Runtime error

Former Member
0 Kudos

I am getting following error what could be the error please suggest me.

Runtime Errors SAPSQL_ARRAY_INSERT_DUPREC

Exception CX_SY_OPEN_SQL_DB

Date and Time 18.08.2010 20:39:30

-


-


Short text

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

-


-


What happened?

Error in the ABAP Application Program

The current ABAP program "/SAPAPO/SAPLDM_MATERIAL" had to be terminated because

it has

come across a statement that unfortunately cannot be executed.

-


-


What can you do?

Note down which actions and inputs caused the error.

To process the problem further, contact you SAP system

administrator.

Using Transaction ST22 for ABAP Dump Analysis, you can look

at and manage termination messages, and you can also

keep them for a long time.

-


-


Error analysis

An exception occurred that is explained in detail below.

The exception, which is assigned to class 'CX_SY_OPEN_SQL_DB', was not caught

in

procedure "/SAPAPO/DM_PRODUCTS_POST" "(FUNCTION)", nor was it propagated by a

RAISING clause.

Since the caller of the procedure could not have anticipated that the

exception would occur, the current program is terminated.

The reason for the exception is:

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.)

-


-


How to correct the error

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

the records passed already exists in the database.

If the error occures in a non-modified SAP program, you may be able to

find an interim solution in an SAP Note.

If you have access to SAP Notes, carry out a search with the following

keywords:

"SAPSQL_ARRAY_INSERT_DUPREC" "CX_SY_OPEN_SQL_DB"

"/SAPAPO/SAPLDM_MATERIAL" or "/SAPAPO/LDM_MATERIALU46"

"/SAPAPO/DM_PRODUCTS_POST"

|

Accepted Solutions (0)

Answers (2)

Answers (2)

tibor_nagy
Contributor
0 Kudos

Dear

this dump can have several reasons.

If you are on SCM7.0 and you have implemented the BADI solution of note 918542 , this can be the rootcause of the problem. The solution is covered in the standard on SCM7.0 and not neccessary anymore for this SCM release.

Due to the BADI, the system tries to create the products twice (in BADI and in standard) which leads to the SQL error. If this is you case could you please deimplement the BADI solution? You can process the queue afterwards which should go through without any error.

The problem can also happen due to a user exit e.g. EXIT_SAPLCMAT_001.

Regards,

Tibor

Former Member
0 Kudos

I have checked it I am using SCM5.0 and also I checked user exit but problem not solved . could any body suggest me the solutiion.

Former Member
0 Kudos

Hi,

Can you give us more details on when exactly you are getting this error? Exactly at which function ...?

This is one very common dump across APO modules. In my previous project we have got this for Material master trasfer ....in another project got while CIFing quotation to APO, reason being incorrect batch characterstics on Quotation...

So can you be specific on which situation you are getting this error ?

Please check on data for which you are getting this error. Is it happening only for few (with any similar pattern or commanality among those) or happening randomly w/o any clue.

Best Regards,

Deepthi

Former Member
0 Kudos

when dump occur in the production system automatic alarm will raise a support request and help desk people are assigning it to support team . But we do not have any contact person to give details about this dump which transaction it is running . I am just analysing through dump occured in st22. so could you please suggest your analysys on this to solve the problem.

Former Member
0 Kudos

Avenkatrao,

??

ST22 contains the userid and the transaction or program executed. I can't imagine trying to solve such a problem without getting feedback from the user. Surely your organization has a way for you to establish contact with the user...?

Regards,

DB49

Former Member
0 Kudos

Hi,

1) As DB49 suggested get User ID & transaction or program details. You will get these from dump log ST22 under 'System environment'.

2) Check for any queue blocks with the same error message ..(in my previous examples we had queue blocks).

3) Check the above program is executed for which data in Production with what variant.

4) Try to replicate in DEV by creating same set of data as in production and execute program with same variants as in production.

Best Regards,

Deepthi Naidu

Former Member
0 Kudos

Avenkatrao,

It pretty much is self explanatory, the program tried to create a record in a keyed table, using a key that already exists in the table, and the table is configured not to allow duplicates.

I will assume that you followed the instructions diligently, searched for appropriate notes, and have already reviewed and excluded the OSS notes that are relevant (such as [https://service.sap.com/sap/support/notes/668466])

You will probably need to take this to your ABAPer for troubleshooting.

Regards,

DB49