Hi
In this Blog I tried to explain how to dealt with SAP Vistex ABAP Runtime Error - Duplicate Entries.
There could be multiple ways to identify & resolve the above issue and I would like to demonstrate 1 quick way to identify & fix.
I'm not sure whether it was already covered or not ? But for sure this is not any copied version and I'm demonstrating based on my personal experience only.
Please share your views / thoughts after review.
Thanks,
Sreeram
Blog Content -
In many of the cases we may experience the below error while updating the attributes using SAP Vistex transaction like /IRM/EPPDM etc.
Error - The ABAP/4 Open SQL array insert results in duplicate database records.
Source ABAP Program for the Error - /IRM/SAPLEPPDU
Exception - CX_SY_OPEN_SQL_DB
Runtime Error - SAPSQL_ARRAY_INSERT_DUPREC
There could be multiple ways to identify & resolve the above issue and I would like to demonstrate 1 quick way to identify & fix.
Whenever we got the ABAP Runtime Error with error description “The ABAP/4 Open SQL array insert results in duplicate database records” and the Runtime error is - SAPSQL_ARRAY_INSERT_DUPREC,
Please follow below steps for issue fix.
Step1:-
Go to transaction ST22 and look for detailed error.
From above screen search with search term ‘VBHDR’.
You were able to find the VBHDR value as above.
Once you get the VBHDR value
Step2:- Go to table VBHDR (Update header) search for table records with the above key term value, you were able to find the record as below.
Step3:- Go to table VBDATA (Update data) search with the above key term value, you were able to find the record as below.
Once you got the VBDATA records in step3, perform step 4.
Step4:- Go to transaction SE 37, Run the Function Module TH_DISPLAY_UPDATE_DATA_ALV –
Will get the below screen
For the Import Parameter VB_CNT, pass the VBMODCNT value captured from VBDATA table.
For the Import Parameter VB_KEY, pass the VBKEY value captured from VBDATA table.
For the Import Parameter VB_NAME, pass the value ‘’/IRM/EPPD_UPDATE_DB”.
So above screen will be populated as below.
Execute the FM after inputting the data.
Will get the below Output as below -
From the above screen, double click on the highlighted table – IT_INS_PDATV.
Step 5 –
Now go to table - /IRM/EPPDATV and search for the table entries with above key (PDNUM, ATINN, AMLVL, MLKEY, ATZHL combination),
If able to find any entries, treat those records as Duplicate entries
If able to find any entries, treat those records as Duplicate entries.
Delete those duplicate entries from the table and try to re-update the attributes from attribute maintenance screen.
Issue should be resolved and able to update the attribute values by now.