SAP Knowledge Base Article - Public

3774533 - Duplicate invoice error when re-uploading invoices after credit memo cancellation in SAP S/4 HANA Cloud Public Edition

Symptom

When using the Import Supplier Invoices app (Excel mass upload) to re-upload corrected invoices after the originals have been cancelled via credit memos, May observe one or more of the following:

  • The new invoices are rejected with a duplicate invoice error, even though the invoice amount differs from the cancelled documents.
  • The upload completes without posting — the system prevents the new invoice documents from being saved.
  • The following additional error may appear alongside the duplicate check message:
  • "User [username] already processing Purchase order [PO number]."
  • The duplicate error persists even when the new invoice carries a different amount, because the duplicate invoice check does not include amount as a key field by default.

Environment

SAP S/4HANA Cloud Public Edition

Reproducing the Issue

  1. Log in to SAP S/4HANA Cloud Public Edition and open the Import Supplier Invoices app.
  2. Upload a batch of supplier invoices via the Excel mass upload template.
  3. Confirm that the invoices are posted successfully.
  4. Cancel the posted invoices by issuing credit memos — also via mass upload in the Import Supplier Invoices app.
  5. Prepare a corrected invoice upload file using the same reference number as the cancelled invoices but with a different invoice amount.
  6. Upload the corrected invoices via the Import Supplier Invoices app.
  7. Observe that the system rejects the upload with a duplicate invoice error.

Cause

When an invoice is cancelled by issuing a credit memo, the original invoice document is not deleted from the system. It remains as a reversed document. The SAP duplicate invoice check compares incoming invoices against all existing documents, including reversed and cancelled ones, using the following standard key fields:

  • Company Code
  • Vendor
  • Reference Number (invoice reference field BKPF-XBLNR)
  • Invoice Date
  • Currency

Amount is not part of the standard duplicate check key fields — this is by design (see SAP Notes 2036775 and 2646346). Consequently, a new invoice that shares the same reference number, company code, vendor, invoice date, and currency as an existing reversed document is flagged as a duplicate regardless of the invoice amount.

The secondary error "User [username] already processing Purchase order [PO number]." is unrelated to the duplicate check. It indicates that the affected Purchase Order is locked by another active user session. The PO lock and the duplicate check error are independent issues that may appear together during a mass re-upload.

Resolution

Three options are available, depending on business requirements and system scope.

Option 1. Use a different reference number (recommended)

Upload the corrected invoices with a new or modified reference number. For example, append a suffix such as -CORR or -2 to the original reference value. Because the duplicate check key changes, the system treats the new upload as a distinct document and posts it without error. This approach requires no configuration change and has no system-wide impact.

Option 2. Add amount to the duplicate invoice check configuration

In SAP S/4HANA Cloud Public Edition, review the duplicate invoice check settings via Manage Your Solution → Configure Your Solution (OMRDC-equivalent SSCUI). If the Amount field is added as a mandatory matching criterion, the system will only flag duplicates when all key fields including amount match. This allows a new invoice with a different amount — but the same reference number — to post without error.

Important: this configuration change affects all invoice postings system-wide, including manual and automated channels. Evaluate the impact carefully before activating in a production system.

Option 3. Post via override if the check generates a warning only

If the duplicate invoice check is configured to produce a warning rather than a hard error, the Import Supplier Invoices app may allow the upload to proceed after the warning is acknowledged. Check whether the upload template supports the field DuplicateInvoiceCheckStatus as an override indicator. If available, populating this field instructs the system to bypass the duplicate warning for the affected rows.

Resolving the Purchase Order lock error:

If the error "User [username] already processing Purchase order [PO number]." appears, the Purchase Order is locked by another active user session. To resolve:

  1. Identify the user listed in the error message and ask them to save or exit the transaction currently holding the lock.
  2. If the locking session cannot be identified or the user is unavailable, wait for the session to time out automatically according to the system session timeout setting, then retry the upload.
  3. Do not force-terminate active sessions unless authorised to do so and the business impact has been assessed.

See Also

  • KBA 2646346 - Check for duplicate Invoices in App ID F3041 and Advanced App ID MIRO - SAP S/4HANA Cloud Public Edition
  • KBA 2036775 - Duplicate Invoice Check - SAP ERP & SAP S/4HANA

Keywords

import supplier invoices, upload supplier invoices, duplicate invoice, duplicate check, invoice reference, reversed invoice, credit memo, excel mass upload, document lock, purchase order lock, invoice date, currency, company code, vendor, fiori invoice verification , KBA , MM-FIO-IV-2CL , Fiori UI for Invoice Verification (Public Cloud) , Problem

Product

SAP S/4HANA Cloud Public Edition all versions