2011年9月30日 星期五

[OM] 未拋 AR Interface (Awaiting invoice interface - Pending Complete Delivery)

Oracle ERP R12.0

User 反應 Invoice# 46285 未拋到 AR。




Step 1. 原本以為資料卡在 RA_INTERFACE_LINES_ALL,結果用 Delivery Number 去查,找不到。也就是說,OM 根本未將資料拋轉 AR Interface。

Step 2. 查看Shipping Transactions,整張 Delivery 的 Line,Status 都是 Interfaced,代表庫房作業確實已經完成(檢查 Material Transactions 也可以查到交易紀錄)。

Step 3. 抽查該 Delivery 中的某一個 SO Line,發現 Status 是 "Awaiting invoice interface - Pending Complete Delivery"。Metalink 查不到什麼有用的資訊,不過這個狀態的意思是說 Invoice Interface 還沒有處理完成。

Step 4. 根據夏普大大(夏普視野)的經驗(雖然夏普大是 R11i 版本,可是症頭一樣),這代表該 Delivery 中,有某一筆(或數筆) SO Line 的 Invoice Interface 有問題,造成整張 Delivery 中所有 SO Line 都未拋轉 AR Interface

Step 5. 先找到有問題的 Line ID
select item_key
from wf_item_activity_statuses_v
where item_type='OEOL'
and activity_name = 'INVOICE_INTERFACE'
and activity_status_code = 'ERROR'
and activity_begin_date >= '2011/09/15 00:00:00';

Step 6. 然後 Retry Workflow (Line ID & Org ID 要記得改,做完要 Commit)
set serveroutput on
Declare
l_line_id NUMBER := 496888; --line_id
l_org_id NUMBER;
l_count NUMBER;
l_result VARCHAR2(30);
l_activity_label VARCHAR2(30);
l_file_val VARCHAR2(200);

Begin

fnd_client_info.set_org_context('258'); --Org_id
oe_debug_pub.debug_on;
oe_debug_pub.initialize;
l_file_val := OE_DEBUG_PUB.Set_Debug_Mode('FILE');
oe_debug_pub.setdebuglevel(5);

select activity_label
into l_activity_label
from wf_item_activity_statuses_v
where item_type='OEOL'
and activity_name = 'INVOICE_INTERFACE'
and activity_status_code = 'ERROR'
and item_key = to_char(l_line_id);

dbms_output.put_line('activity label : '||l_activity_label);

OE_Standard_WF.OEOL_SELECTOR
(p_itemtype => 'OEOL'
,p_itemkey => to_char(l_line_id)
,p_actid => 12345
,p_funcmode => 'SET_CTX'
,p_result => l_result
);

wf_engine.handleError('OEOL', to_char(l_line_id), l_activity_label, 'RETRY',null);
dbms_output.put_line('File name '||OE_DEBUG_PUB.G_DIR||'/'||OE_DEBUG_PUB.G_FILE);
End;
/


Step 7. 檢查 RA_CUSTOMER_TRX_ALL,資料拋轉成功!!

參考[夏普視野]

沒有留言: