SAP Knowledge Base Article - Preview

1862969 - Error during database insert in tables EDIDC or EDID4 or EDIDS

Symptom

  • Error during database insert in table EDIDC reported in transaction SM58
  • SM58 shows 'Open SQL array insert produces duplicate records in the database' from Function module IDOC_INBOUND_ASYNCHRONOUS
  • Error during database insert in table EDID4
  • Error during database insert in table EDIDS
  • Error E0 371
  • SAPSQL_ARRAY_INSERT_DUPREC or DBSQL_DUPLICATE_KEY_ERROR short dump in ST22 with function module F09_IDOC_INSERT_WITH_NUMBER
  • SM21 reports Run-time error "SAPSQL_ARRAY_INSERT_DUPREC" occurred
  • DBSQL_DUPLICATE_KEY_ERROR short dump with exception CX_SY_OPEN_SQL_DB, the error line is "INSERT EDID4 FROM TABLE LIST_CONTAINER_CREATE."

SM58:

EDIDC.png

 
ST22:

Runtime Errors         SAPSQL_ARRAY_INSERT_DUPREC
Exception              CX_SY_OPEN_SQL_DB
Short text
The ABAP/4 Open SQL array insert results in duplicate database records.
What happened?

Error in the ABAP Application Program

The current ABAP program "SAPLEDI1" had to be terminated because it has
come across a statement that unfortunately cannot be executed.

Error Analysis

An exception occurred that is explained in detail below.
The exception, which is assigned to class 'CX_SY_OPEN_SQL_DB', was not caught
in procedure "F09_IDOC_INSERT_WITH_NUMBER" "(FORM)", nor was it propageted by  a
RAISING clause.
Since the caller of the procedure could not have anticipated that the exception
would occur, the current program terminated.
If you use an ABAP/4 Open SQL array insert to insert a record in the database
and that record already exists with the same key, this results in termination.
(With an ABAP/4 Open SQL single record insert in the same error situation,
processing does not terminate, but SY-SUBRC is set to 4.)


Read more...

Environment

  • SAP Basis ALE
  • SAP NetWeaver
  • SAP Web Application Server for SAP S/4 HANA
  • ABAP PLATFORM - Application Server ABAP

Product

ABAP platform all versions ; SAP NetWeaver all versions ; SAP Web Application Server for SAP S/4HANA all versions

Keywords

BASIS_ALE, DBSQL_DUPLICATE_KEY_ERROR; F09_IDOC_INSERT_WITH_NUMBER, "record with the same key already exists", "SY-SUBRC is set to 4 instead", CX_SY_OPEN_SQL_DB, "INSERT EDID4 FROM TABLE LIST_CONTAINER_CREATE." , KBA , results in duplicate database records.  , the abap/4 open sql array insert , sapledi1 , cx_sy_open_sql_db , BC-MID-ALE , Integration Technology ALE , BC-SRV-NUM , Number Range Management , Problem

About this page

This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP for Me (Login required).

Search for additional results

Visit SAP Support Portal's SAP Notes and KBA Search.