Oracle EBS INV Create Intercompany AP Invoices error handling

Oracle EBS version: R12.1.3
Path: INV SuperUser>View>Request>Create Intercompany AP Invoices The
user submits "Create Intercompany AP Invoices" and sends the request error as follows:

APP-FND-01564: ORACLE error 1 in inapcih()

Cause: inapcih() failed due to ORA-00001: unique constraint (AP.AP_INVOICES_INTERFACE_U1) violated
.

The SQL statement being executed at the time of the error was:  and was executed from the file .
Function inapcih() returned failure.End of Processing Invoice ID: 1547983 

Transaction ID: 1547983 Status: FAILURE

============================== End of Transaction ==================================
ORA-00001: unique constraint (AP.AP_INVOICES_INTERFACE_U1) violated

Solution:
1. The following SQL will be used to repair tax-related data

--备份数据
CREATE TABLE ZX_IC_TAX_INV_NUM_18807813 AS
SELECT Tax_Invoice_Number
      ,Last_Update_Date
      ,Object_Version_Number
      ,Application_Id
      ,Event_Class_Code
      ,Entity_Code
      ,Trx_Id
      ,Trx_Line_Id
      ,Trx_Level_Type
      ,Icx_Session_Id
  FROM Zx_Lines_Det_Factors Zldf
 WHERE Application_Id = 222
   AND Entity_Code = 'TRANSACTIONS'
   AND Tax_Invoice_Number IS NULL
   And TRX_ID = &P_TRX_ID --AR事处理处ID
   AND EXISTS
 (SELECT 1
          FROM Zx_Lines_Det_Factors Df
         WHERE Zldf.Application_Id = Df.Application_Id
           AND Zldf.Entity_Code = Df.Entity_Code
           AND Zldf.Event_Class_Code =
               Df.Event_Class_Code
           AND Zldf.Trx_Id = Df.Trx_Id
           AND Df.Tax_Invoice_Number IS NOT NULL);
--Datafix
UPDATE Zx_Lines_Det_Factors
   SET Tax_Invoice_Number    = 0
      ,Last_Update_Date      = SYSDATE
      ,Object_Version_Number = 1880781300
 WHERE Application_Id = 222
   AND Entity_Code = 'TRANSACTIONS'
   And TRX_ID = &P_TRX_ID --AR事处理处ID

2. Resubmit the request "Create Intercompany AP Invoices" and it will work normally.
 

Guess you like

Origin blog.csdn.net/chenxianping/article/details/89044342