Oracle EBS INV Create Intercompany AP Invoices报错处理

Oracle EBS版本:R12.1.3
Path: INV SuperUser>View>Request>Create Intercompany AP Invoices
用户提交“Create Intercompany AP Invoices”并发请求报错如下:

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

解决方法:
1. 将使用如下SQL对税相关数据进行数据修复

--备份数据
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.重新提交请求“Create Intercompany AP Invoices”,可以正常运行。
 

猜你喜欢

转载自blog.csdn.net/chenxianping/article/details/89044342
今日推荐