----------------------------------------------------------------------------- 處理應付**不能創建會計分錄例子一: create table xla_events_bkp as select * from xla_events where event_id in (select event_id from xla_events e where e.application_id = 200 and e.event_status_code ='P' and not exists ( select 1 from xla_ae_headers h where e.event_id = h.event_id )); UPDATE xla_events SET event_status_code = 'U', process_status_code = 'U' WHERE event_id IN (select event_id from xla_events e where e.application_id = 200 and e.event_status_code ='P' and not exists ( select 1 from xla_ae_headers h where e.event_id = h.event_id )); 運行<<創建會計科目>>請求 ----------------------------------------------------------------------------- 處理應付**不能創建會計分錄例子二: **號200803005(已取消) 部分創建會計分錄,付款號1102000006 不能創建會計分錄 因為先有**再有付款,所以思路 1.先試圖創建**的會計分錄 SELECT invoice_num,invoice_id,doc_sequence_id,doc_sequence_value FROM ap_invoices_all WHERE invoice_num = '200803005'
select event_id,ae_header_id,a.* from xla_ae_headers a WHERE doc_sequence_id = 130 AND doc_sequence_value = '210401983'
SELECT event_id,a.* FROM xla_ae_headers a WHERE event_id IN (70300,80395) 找到那條xla_ae_headers記錄沒有創建會計分錄的event_id=70300,ae_header_id=57016
DELETE FROM xla_ae_lines WHERE ae_header_id = 57016
DELETE FROM xla_ae_headers WHERE ae_header_id = 57016
UPDATE xla_events SET event_status_code = 'U', process_status_code = 'U' WHERE event_id = 70300 運行<<創建會計科目>>請求 2.再試圖創建付款的會計分錄 SELECT * FROM xla_ae_headers WHERE DESCRIPTION LIKE '%1102000006%' AND je_category_name = 'Payments'
DELETE xla_ae_lines WHERE ae_header_id IN (101270,101271)
DELETE xla_ae_headers WHERE ae_header_id IN (101270,101271)
UPDATE xla_events SET event_status_code = 'U', process_status_code = 'U' WHERE event_id IN (70302,80394) 運行<<創建會計科目>>請求 ----------------------------------------------------------------------------- 處理應付**不能創建會計分錄例子三 ET1104應付 **號8000480849/859/862沒有創建會計分錄的原因是: 該**行1和 **行2 已放棄.
臨時處理方法: 直接在表中刪除了放棄行的**分配行和**行 CREATE TABLE AP_INVOICE_DISTRIBUTIONS_0427 AS SELECT * FROM AP_INVOICE_DISTRIBUTIONS_all WHERE invoice_id = 15761 and invoice_line_number IN (1,2)
SELECT * FROM AP_INVOICE_DISTRIBUTIONS_0427
CREATE TABLE AP_INVOICE_LINES_0427 as SELECT * FROM AP_INVOICE_LINES_all WHERE invoice_id = 15761 AND line_number IN (1,2) SELECT * FROM AP_INVOICE_LINES_0427 DELETE FROM AP_INVOICE_DISTRIBUTIONS_all WHERE invoice_id = 15761 and invoice_line_number IN (1,2)
DELETE FROM AP_INVOICE_LINES_all WHERE invoice_id = 15761 AND line_number IN (1,2) 直接在**界面創建會計分錄
最終處理方法:建議用戶提tar由oracle官方解決 ----------------------------------------------------------------------------- 處理應付**不能創建會計分錄例子四: 這張**2008030888.不能創建會計分錄的原因是 沒有錄入**的分配信息 ----------------------------------------------------------------------------- 處理應付**不能創建會計分錄例子五: 標準**核銷預付款**后,部分會計分錄不能創建。已入帳顯示:部分 措施: 先在**界面上驗證相關**,然后在**界面上創建會計分錄 ----------------------------------------------------------------------------- 處理應付**不能創建會計分錄例子六: 駱勇平員工由于EBS bug,再導入費用報表后,產生兩個駱勇平供應商,經過刪除其中一個供應商和供應商地點后 產生的出來會計分錄信息居然還有被刪除供應商的ID,供應商地點ID 措施: 找到了xla_ae_lines.party_id(這里找到有些會計分錄的創建是根據以前會計分錄記錄來創建的,比如ref_event_id,ref_ae_header_id) 于是將xla_ae_lines.party_id,xla_ae_lines.party_site_id統統改成了現在的駱勇平供應商ID和供應商地點ID 運行cux_fix_invoice_accounting_pkg.fix_invoices程序,修正數據 運行<<創建會計科目>>請求 ---------------------------------------------------------------------------- 修正數據的程序包cux_fix_invoice_accounting_pkg: CREATE OR REPLACE PACKAGE cux_fix_invoice_accounting_pkg IS PROCEDURE fix_invoices(p_invoice_id IN NUMBER); PROCEDURE fix_payments(p_payment_num IN VARCHAR2); END; / CREATE OR REPLACE PACKAGE BODY cux_fix_invoice_accounting_pkg IS PROCEDURE fix_invoices(p_invoice_id IN NUMBER) IS CURSOR cur_invoice(i_cur_invoice_id IN NUMBER) IS SELECT doc_sequence_id,doc_sequence_value FROM ap_invoices_all WHERE invoice_id = i_cur_invoice_id; CURSOR cur_xla_ae_headers(i_cur_doc_sequence_id IN NUMBER,i_cur_doc_sequence_value IN NUMBER) IS SELECT event_id,ae_header_id from xla_ae_headers WHERE doc_sequence_id = i_cur_doc_sequence_id AND doc_sequence_value = i_cur_doc_sequence_value; BEGIN FOR rec_invoice IN cur_invoice(p_invoice_id) LOOP FOR rec_xla_ae_headers IN cur_xla_ae_headers(rec_invoice.doc_sequence_id,rec_invoice.doc_sequence_value) LOOP INSERT INTO xla_ae_lines080421 SELECT * FROM xla_ae_lines WHERE ae_header_id = rec_xla_ae_headers.ae_header_id; INSERT INTO xla_ae_headers080421 SELECT * FROM xla_ae_headers WHERE ae_header_id = rec_xla_ae_headers.ae_header_id; DELETE xla_ae_lines WHERE ae_header_id = rec_xla_ae_headers.ae_header_id; DELETE xla_ae_headers WHERE ae_header_id = rec_xla_ae_headers.ae_header_id; END LOOP; END LOOP; UPDATE xla_events SET event_status_code = 'U',process_status_code = 'U' WHERE event_id IN (SELECT event_id FROM xla_events e WHERE e.application_id = 200 AND e.event_status_code ='P' AND NOT EXISTS (SELECT 1 FROM xla_ae_headers h WHERE e.event_id = h.event_id )); COMMIT; END; PROCEDURE fix_payments(p_payment_num IN VARCHAR2) IS CURSOR cur_xla_ae_headers(i_cur_payment_num IN NUMBER) IS SELECT event_id,ae_header_id from xla_ae_headers WHERE description LIKE '%'||i_cur_payment_num||'%' AND je_category_name = 'Payments'; BEGIN FOR rec_xla_ae_headers IN cur_xla_ae_headers(p_payment_num) LOOP INSERT INTO xla_ae_lines080421 SELECT * FROM xla_ae_lines WHERE ae_header_id = rec_xla_ae_headers.ae_header_id; INSERT INTO xla_ae_headers080421 SELECT * FROM xla_ae_headers WHERE ae_header_id = rec_xla_ae_headers.ae_header_id; DELETE xla_ae_lines WHERE ae_header_id = rec_xla_ae_headers.ae_header_id; DELETE xla_ae_headers WHERE ae_header_id = rec_xla_ae_headers.ae_header_id; END LOOP; UPDATE xla_events SET event_status_code = 'U',process_status_code = 'U' WHERE event_id IN (SELECT event_id FROM xla_events e WHERE e.application_id = 200 AND e.event_status_code ='P' AND NOT EXISTS (SELECT 1 FROM xla_ae_headers h WHERE e.event_id = h.event_id )); COMMIT; END; END; / --============================================================================= 處理應收事務處理不能創建會計分錄例子: 貸項通知單11040000002921不能創建會計分錄
Misses in library cache during parse: 0 Optimizer mode: ALL_ROWS Parsing user id: 44 (recursive depth: 1) *******************************************************************************
SELECT MESSAGE_TEXT, MESSAGE_NUMBER, TYPE, FND_LOG_SEVERITY, CATEGORY, SEVERITY FROM FND_NEW_MESSAGES M, FND_APPLICATION A WHERE :B3 = M.MESSAGE_NAME AND :B2 = M.LANGUAGE_CODE AND :B1 = A.APPLICATION_SHORT_NAME AND M.APPLICATION_ID = A.APPLICATION_ID
2.將AE.EVENT_STATUS_CODE,ae.process_status_code都改回'U', 檢查 xla_ae_headers,xla_ae_lines是否有數據, SELECT * FROM xla_ae_headers--no row WHERE event_id IN (162517,162518) SELECT * FROM xla_ae_lines--no row 在界面上將11040000002801創建會計分錄成功