SAP Knowledge Base Article - Public

3626972 - The runtime error "DBSQL_DUPLICATE_KEY_ERROR" occurs when saving a billing document -SAP S/4HANA Cloud Public Edition

Symptom

When trying to saving a billing document in VF01, a dump occurs:

Category               ABAP Programming Error                                                       
Runtime Errors         DBSQL_DUPLICATE_KEY_ERROR                                                    
Except.                CX_SY_OPEN_SQL_DB                                                            
ABAP Program           SAPLV60U 

When checking the details of the dump, the error message:

"Open SQL array insert produces duplicate records in the database."

can be found.

Environment

SAP S/4HANA Cloud Public Edition

Reproducing the Issue

  1. In the app VF01, enter the necessary information and click the "Save" button.
  2. The dump occurs.
  3. Check the details of the dump.

Cause

The Flexible Billing Document Numbering is implemented in system.

However, for the target billing documents, all of numbers in the assigned number range have already been used.

Resolution

Modify the number range determination and the number range interval so that the correct document number can be assigned successfully.

Some details on the configuration can be found from the documentation below:

Using Configurable Parameters and Formulas (CPF) to Implement Flexible Billing Document Numbering | SAP Help Portal

See Also

Using Configurable Parameters and Formulas (CPF) to Implement Flexible Billing Document Numbering | SAP Help Portal

Keywords

DBSQL_DUPLICATE_KEY_ERROR, CX_SY_OPEN_SQL_DB, SAPLV60U, Number Range Interval, Flexible Billing Document Numbering, SAP S/4HANA Cloud Public Edition. , KBA , SD-BIL-IV-2CL , Processing Billing Documents (Public Cloud) , Problem

Product

SAP S/4HANA Cloud Public Edition all versions