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

Identify the Duplicate record

rohit_trivedi
Product and Topic Expert
Product and Topic Expert
0 Likes
1,841

Hi Guys,

I'm receiveing a short dump: SAPSQL_ARRAY_INSERT_DUPREC on INSERT operation on a table.

I want to know which record is causing the dump.

Is there a transaction where i can retrieve the contents of internal table which caused the dump?

I could not find it in ST22.

Thanks for your help!

Regards,

Rohit.

5 REPLIES 5
Read only

Former Member
0 Likes
1,373

Hello,

I dont think there are many options available other than debugging and comparing the internal table data with that of the DB table to find the duplicate. Else you could write a small logic before the update statement to identify the duplicate records and delete them in the internal table.

Vikranth

Read only

former_member209217
Active Contributor
0 Likes
1,373

Hi,

Put a break point at the place of INSERT statement in your program.You will be able to debug the program and can find which record is causing the dump. Else,on the dump screen you will be having a button Debugger .Press that button and it will take you to the statement which is causing the dump.

Instead of doing all these put a statement DELETE ADJACENT DUPLICATES Before insert statement

Regards,

Lakshman.

Read only

Former Member
0 Likes
1,373

Hi Rohit

This dump maybe because of either of the two reasons.

1) The table to which the records are being inserted, already has the record you are inserting.

2) The records which you are inserting has some record repeated.

If it is the first case then you will have to have a code which checks wether the record already exists in the table or not. If this record is in the table then drop that and insert the others.

If it is the second scenario, then make use of DELETE ADJECENT DUPLICATE on the sorted internal table before the insert statement.

Hope this helps you.

Regards

Gaurav

Read only

Former Member
0 Likes
1,373

Hi,

Try using transaction code: SM13.

Hope it helps you,

Regards,

Abhijit G. Borkar

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
1,373

Use modify command ... it updates the duplicate record and inserts the new record.

see the f1 help of modify statement