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

Update was terminated SAPSQL_ARRAY_INSERT_DUPREC

stefan_kolev4
Participant
0 Likes
1,230

Hi,

We are trying to make our custom calculations in VA01, VA02 and because of this we need to update VBUP table. We updated the fields of xvbup and yvbup, but we receive an error "Update was terminated SAPSQL_ARRAY_INSERT_DUPREC".How

13 REPLIES 13
Read only

Former Member
0 Likes
1,113

Hi

This error indicates that you are trying to insert a duplicate record in the database.

primary key violation ..

regards

Renu

Edited by: Renu Gusain on Jun 16, 2009 7:52 AM

Read only

former_member222860
Active Contributor
0 Likes
1,113

You are trying to insert duplicate entries, pl check the constraints on the table like any primery keys

Read only

Former Member
0 Likes
1,113

Do you change global data fields in standard program or update standard DB tables directly? Describe the situation in details...

Edited by: Arthur K on Jun 16, 2009 8:30 AM

Read only

0 Likes
1,113

We have our custom calculations in screen 8459, which should update quantity in VA02.In User exit SAVE_DOCUMENT in MV45AFZZ we update some tables including xvbup and yvbup.After SAVE we receive an error message Update was terminated SAPSQL_ARRAY_INSERT_DUPREC.Probably the problem is in updating xvbup ???

Regards,

Stefan

Read only

0 Likes
1,113

HI,

Please check in your internal tables XVBUP if there are any duplicate records and also check the values in the update indicator field UPDKZ.

Probably there are duplicate entries in your internal tables.

Regards,

Ankur Parab

Read only

0 Likes
1,113

Hi,

No I don't have duplicate records and update flag is 'U'.

Stefan

Read only

0 Likes
1,113

Hi,

Check in SM13.

The update termination will be shown. Put a break point at that step and in update debugging check the entries which are being populated in your internal tables.

The issue might be that there is already and entry in the database table and someone is passign value in XVBUP with update indicator as 'I'

If XVBUP is correct then check if someone has wrongly modified YVBUP.

We had faced a similar problem and in that case the culprit was wrong entries in YVBAP internal table.

Regards,

Ankur Parab

Read only

0 Likes
1,113

Stefan...cross check the entries in XVBUP and YVBUP...in debug mode

may be the entry in YVBUP were different...and hence it might have taken the entry in XVBUP as insert...while the entry in YVBUP as delete...

So...while inserting it might have given this error..

Read only

0 Likes
1,113

Hi,

What is culprit ?

Read only

0 Likes
1,113

Hi,

Hey I meant that in our case the problem was that someone was updating YVBAP incorrectly. So that resulted in the DUPREC dump.

So i said that it our case the culprit of the problem was 'YVBAP'.

Regards,

Ankur Parab

Read only

0 Likes
1,113

Thanks. I think I understood where is the problem.Probably YVBEP is not updated correctly.Please tell me in which user exit VBEP should be updated.

Stefan

Read only

stefan_kolev4
Participant
0 Likes
1,113

Solved

Read only

0 Likes
1,113

Hello Stefan,

I have the same issue. How did you solve?

Thank you.