R12: Unique Constraint Error when purging and archive due to duplicate invoice numbers

(Doc ID 2101318.1)

Last updated on FEBRUARY 28, 2016

Applies to:

Oracle Payables - Version 12.1.3 and later
Information in this document applies to any platform.


On : 12.1.3 version
When attempting to purge and archive invoice data, the following error is occurring due to duplicate invoice number for same vendor.

ORA-00001: unique constraint (AP.AP_HISTORY_INVOICES_U2) violated

The issue can be reproduced at will with the following steps:
1. Connect SQL*PLUS as apps user
2. Run insert statement into ap_history_invoices_all table to archive data.


 Duplicated invoice numbers for same vendor is allowed in R12.
 The enhancement functionality is introduced in Same Invoice Number For Same Supplier Created Due To Missing Unique Index (Doc ID 1377959.1).



Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms