Quantcast
Channel: SCN : Blog List - ABAP Development
Viewing all articles
Browse latest Browse all 943

Dealing with ‘DUPLICATE ENTRIES’ ABAP runtime error with reference to SAP Vistex

$
0
0

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


screen1.png

 

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.


screen2.png

From above screen search with search term ‘VBHDR’.


screen3.png

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.


screen4.png

Step3:- Go to table VBDATA (Update data) search with the above key term value, you were able to find the record as below.


screen5.png

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


screen6.png

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.



screen7.png

Execute the FM after inputting the data.

Will get the below Output  as below -


screen8.png


From the above screen, double click on the highlighted table – IT_INS_PDATV.


screen9.png


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


screen10.png

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.



Viewing all articles
Browse latest Browse all 943

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>