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

Runtime Errors: SAPSQL_ARRAY_INSERT_DUPREC in TCODE VL01n

Former Member
0 Likes
2,056

Hi ,

I got runtime error in VL01n. Plz Help me to solve this issue.

What happened?

Error in the ABAP Application Program

The current ABAP program "SAPLV50U" had to be terminated because it has

come across a statement that unfortunately cannot be executed.

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 "LIPS_VERBUCHEN" "(FORM)", 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.)

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,561

Hi

The dump is clear, there are some records duplicted (that means they have the same key), now you need to undestand why and where some records were duplicated.

The first place where u can check is the user-exit, if there's no developed exit, you should search some notes in Oss

Max

10 REPLIES 10
Read only

JoffyJohn
Active Contributor
0 Likes
1,561

insert to some database table is failing due to the data with same key already exisiting in the table

check the code .

Read only

Former Member
0 Likes
1,561

Thanks for reply,

But it is Standard Program.

Read only

Former Member
0 Likes
1,561

Hi,

The Error you got occurs when program tries to commit database that would result in a duplicate entry in a table with primary key and hence the update failes and it raises an error. As max has suggested this may have been happened because of

some enhancement done to standard code.

Is this dump coming in update task? if yes then go to SM13 transaction to get the detailed error information of update error,which program/function module caused error in update task. You can also execute your code in bebugging mode.

Regards,

Pawan

Read only

Former Member
0 Likes
1,562

Hi

The dump is clear, there are some records duplicted (that means they have the same key), now you need to undestand why and where some records were duplicated.

The first place where u can check is the user-exit, if there's no developed exit, you should search some notes in Oss

Max

Read only

brad_bohn
Active Contributor
0 Likes
1,561

In addition to what Max suggested, is this a copied client? If this is indeed a totally standard solution without userexit interference, check your number range settings. If this is a copied client and you haven't synchronized the number ranges, you will receive dumps on duplicate insert attempts.

Read only

Clemenss
Active Contributor
0 Likes
1,561

Hi Namdev,

is it possible that your system is the one-and-only long-time-searched for SAP system without any userexits in Sales & distribution?

Please check includes

MV43AFZZ

MV45AFZZ

MV45AIZZ

MV45AOZZ

MV45ATZZ

MV50AFZZ

MV50ATZZ

MV52EFZZ

MV56AFZZ

MV56AIZZ

MV56AOZZ

MV56ATZZ

MV86EFZZ

MV86EMZZ

MV90VFZZ

for version history. If the last modification is not done by SAP, then you probably have active userexits.

Also, in the dump, check which tables causes the dump, check existing entries.

Usually, a dump in VL01n will not happen without irresponsible customer action.

Regards,

Clemens

Read only

Former Member
0 Likes
1,561

Hi,

Thanks to all of you.

Read only

0 Likes
1,561

Hi Namdev,

it is a good habit (not only but at least in SDN) to share the solution. Please let us know if you found it.

Regards,

Clemens

Read only

0 Likes
1,561

Hi....

Can you explain the root cause and what is the solution for this problem?

I have a same problem with this and I need the solution...

Should we apply the notes?

Many thanks.

Best Regards,

Lia

Read only

Former Member
0 Likes
1,561

Yes, please. I´m facing the same issue. In my case, when working in background, the program gets a duprec dump. Manually using the VL06G, it works. I think there is a relation.

If someone has solved that issue, please, share the information.

Thanks!