Fix ABAP Runtime Error: SAPSQL_ARRAY_INSERT_DUPREC in SAP Vistex in quick way
2023-11-26 15:33:47 Author: blogs.sap.com(查看原文) 阅读量:6 收藏

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


文章来源: https://blogs.sap.com/2023/11/26/fix-abap-runtime-error-sapsql_array_insert_duprec-in-sap-vistex-in-quick-way/
如有侵权请联系:admin#unsafe.sh