Application Development Blog Posts
Learn and share on deeper, cross technology development topics such as integration and connectivity, automation, cloud extensibility, developing at scale, and security.
cancel
Showing results for 
Search instead for 
Did you mean: 
sreeramkumar_madisetty
Active Contributor
0 Kudos
We used to get the below issue frequently in Vistex whenever deals with Master / Transactional data

DUPLICATE ENTRIES ISSUE:-

  • ABAP Runtime Error Text: The ABAP/4 Open SQL array insert results in duplicate


database records.

  • Occurring Program - /IRM/SAPLEPPDU

  • ABAP Runtime Error - SAPSQL_ARRAY_INSERT_DUPREC

  • Possible Cause of the Issue – Whenever User updates Material attributes and while saving user actions i.e while updating the Database Table - /IRM/EPPDATV we encounter this issue very uncommonly and rarely.


Resolution Steps –

View the Dump in an elaborated way and tried to find out the Key with search term – VBHDR.

We are able to get the Key with the search Term – VBHDR as below.

VBHDR

56715500A1FA2AC6E100000000A08AF61CLIENTNUMBERUSERNAME

Now go to table VBHDR and search table entries by putting the above find Key at VBKEY value.

Once we get the Table data from VBHDR table

Now go to table VBDATA and search table entries by putting the above find Key at VBKEY value.

Once got the VBDATA table entries, note down the VBKEY and VBMODCNT values which are every important and will be input parameters for the below function Module.

Use the Function Module - TH_DISPLAY_UPDATE_DATA_ALV

Pass the above captured VBKEY and VBMODCNT as Input Keys for this FM and execute the Function Module.

The above Function Module will result IN TABLES.

Now focus on Table: /IRM/EPPD_UPDATE_DB data especially IT_INS_PDATV Parameter values

Check the Table - - /IRM/EPPDATV with the above IT_INS_PDATV values, if the entry already existed then user tries to create/update with duplicate record hence we got the ABAP Runtime Error.

This is we can quickly be able to capture the PDNUM (Material Number / Vendor number) which causing the issue.

This confirms that entry already existed then user tries to create/update with duplicate record hence we got the ABAP Runtime Error.

Inform Concerned teams which is the Duplicate entry and with help of those teams delete that duplicate entry so that problem will be resolved.

 

Above one is purely based on my experience as I got couple of P1 Tickets where time is very critical to resolve in my Previous projects and by following the above mechanism able to resolve those issue in a very quick turnaround time, I believe this will be helpful for others who are facing similar issues hence though to share my experience by posting this blog

 

Please let me know to explain in pictures if required.

Thanks, Sreeram
2 Comments
InvalidUsername
Participant

When you get SAPSQL_ARRAY_INSERT_DUPREC error then something is wrong in your code, not with what the user is doing.

BTW: You must not delete anything in SAP. Otherwise the system can not be audited anymore. Both from financial auditing and QS System auditing which in some cases can put companies in deep trouble.

Jelena
Active Contributor
I get it that you're sharing in the spirit of "I solved an issue and am sharing to help others" but please don't continue doing this. It's really not a good idea.

Short dumps like this indicate an issue that most likely requires a code correction. I'm assuming you're using properly licensed Vistex solution. This means you're entitled to support from the software vendor. I'm not sure if you have a designated support contact with Vistex directly but if not, I'd open a ticket with SAP Support and maybe they can route it correctly. I'm not seeing any information about support on Vistex website, so assuming if SAP bundles and sells their add-on, then the regular SAP Support is probably the right channel for issues like this.

To put this in simple terms anyone can understand, what you're sharing is like a bandage but there is still an infection that needs to be treated. Please get some professional help with this.