cancel
Showing results for 
Search instead for 
Did you mean: 

ITAB_DUPLICATE_KEY runtime error during MIRO posting

0 Kudos

During manual miro posting we get a runtime termination error. The error analysis in ST22 says below.

"You tried to insert an entry into table "\FUNCTION-POOL=EINS\FORM=XMCEKPO_CUT_LIS\DATA=AUX_XMCEKPO". However, updating the unique table key "PRIMARY_KEY" resulted in a duplicate entry. The key concerned may be either the primary key or a secondary key."

Error happens at below source code.

FORM XMCEKPO_CUT_LIS

aux_xmcekpo[] = xmcekpo[] "615786.

The xmcekpo[] internal table somehow gets duplicate entry for the line item. There is no custom code or badi or exits that is contributing to this.

This error is something to do with LIS update as it does not happen for all POs. There is some variable called LIS in standard code and i could notice that only when a PO is LIS relevant this error happens. I suspect it has something to do with PO statistical update. I checked some existing notes and threads but those are not relevant to this issue.

Hence posting here to see if anyone has come across similar issue and can provide some light.

Thanks

View Entire Topic
abo
Active Contributor

If you are 100% sure there is no custom code at this stage or before, then I suggest that you look for corrective notes on the SAP Support Portal. EDIT: forget that, saw later that you've already done it.

Failing that, you can ask your SAP Partner to open an incident and ask for SAP to come in and check the system.

Anyhow, have you checked how the PO lines look like directly in the EKPO table? It might be that the incorrect situation has already been generated and it is simply waiting to trigger.

former_member182371
Active Contributor
0 Kudos

Hi, have you checked the OSS related notes?

e.g.

750440 - BAPI_PO_CREATE1/BAPI_PO_CHANGE: Dump ITAB_DUPLICATE_KEY

Best regards,

Pablo

Thanks for trying to help. The EKPO table looks fine. The PO has only a single item. However the

xmcekpo[] is getting a duplicate entry.

And i have seen the notes related to bapi and those are already in our system. The statistical tables are refreshed after PO creation.

Incidentally i found the exact issue posted by someone here in 2013 with more details. Unfortunately no answer provided. Please find the link below

https://answers.sap.com/questions/10483267/abap-programming-error-itabduplicatekey-sapleins.html

I have suggested to raise an incident to SAP.

This error was fixed by a code modification in the function module ME_STATISTICS_EKBE_LIS via a pilot release note. So if anyone faces this same issue please reach out to SAP for solution. Closing the thread.