小男孩‘自慰网亚洲一区二区,亚洲一级在线播放毛片,亚洲中文字幕av每天更新,黄aⅴ永久免费无码,91成人午夜在线精品,色网站免费在线观看,亚洲欧洲wwwww在线观看

分享

料號禁用,在做履行接受時,數(shù)據(jù)無法傳送AR接口

 daizhengya 2021-05-18

一、查看訂單行狀態(tài):

在查看行狀態(tài),發(fā)現(xiàn)已經(jīng)關閉了,但是INVOICE_INTERFACE_STATUS_CODE = NOT_ELIGIBLE INVOICED_QUANTITY = NULL

復制代碼
SELECT ool.fulfilled_quantity,
       ool.invoice_interface_status_code,
       ool.open_flag,
       ool.flow_status_code,
       ool.line_id,
       ool.invoiced_quantity,
       ool.ordered_quantity,
       ooh.order_number
  FROM oe_order_headers_all ooh,
       oe_order_lines_all   ool
 WHERE 1 = 1
   AND ooh.header_id = ool.header_id
   AND ooh.org_id = 81
   AND ool.line_id = 131959;
復制代碼

二、查看訂單行工作流狀態(tài):

復制代碼
SELECT ias.item_type
       , ias.item_key
       , pa.instance_label
       , ias.activity_result_code result
       , ias.activity_status
    FROM wf_item_activity_statuses ias, wf_process_activities pa
   WHERE     1 = 1
         AND ias.item_type LIKE 'OEOL'
         AND ias.item_key LIKE '131959'
         --AND pa.instance_label LIKE 'instance_label'
         AND ias.process_activity = pa.instance_id
--AND ias.activity_status = 'ERROR'
ORDER BY ias.item_key, ias.begin_date
復制代碼

三、運行導入接口表:

復制代碼
DECLARE
  l_result_out    VARCHAR2(30);
  l_return_status VARCHAR2(30);
  CURSOR cur_order_info IS
    SELECT line_id FROM oe_order_lines_all WHERE line_id = 131959;
BEGIN
    fnd_global.apps_initialize(user_id      => 1292,
                             resp_id      => 50830,
                             resp_appl_id => 222);
  mo_global.init('S', 81); 
  
  FOR rec IN cur_order_info LOOP   
   UPDATE oe_order_lines_all
       SET invoiced_quantity             = NULL,
           invoice_interface_status_code = NULL,
        --fulfilled_quantity           = ordered_quantity, --非銷退不要更新
           open_flag                     = 'N',
           flow_status_code              = 'CANCELLED',
           last_updated_by               = -1,
           last_update_date              = SYSDATE
     WHERE line_id = rec.line_id; 

   DELETE FROM ra_interface_lines_all
     WHERE interface_line_attribute6 = to_char(rec.line_id);
  
    DELETE FROM ra_interface_salescredits_all
     WHERE interface_line_attribute6 = to_char(rec.line_id);
    COMMIT;
  
    oe_invoice_pub.interface_line(rec.line_id,
                                  'OEOL',
                                  l_result_out,
                                  l_return_status);
    dbms_output.put_line(to_char(rec.line_id) || '+' || l_result_out || '+' ||l_return_status);
commit;
END LOOP;  
END;   
復制代碼

運行之后,查看狀態(tài)(已連接至應收款管理系統(tǒng)),已經(jīng)成功插入接口表中

四、跑INVOICE_INTERFACE工作流:

由于工作流中的interface 都是未完成,需要更改工作流狀態(tài)(運行本程序后,請等5-10分鐘,讓系統(tǒng)的工作流跑完)

BEGIN
    fnd_global.apps_initialize(user_id      => 1292,
                             resp_id      => 50830,
                             resp_appl_id => 222);
  mo_global.init('S', 81); 

wf_engine.handleerror(itemtype => 'OEOL', 
itemkey => 131959, 
activity => 'INVOICE_INTERFACE',
command => 'RETRY', 
RESULT => NULL);  
commit;
END;

 運行之后,查看訂單行狀態(tài),已經(jīng)關閉。

查看訂單行工作流狀態(tài),如下圖所示:

五、跑CLOSE_LINE工作流:

 

 

    本站是提供個人知識管理的網(wǎng)絡存儲空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點。請注意甄別內(nèi)容中的聯(lián)系方式、誘導購買等信息,謹防詐騙。如發(fā)現(xiàn)有害或侵權內(nèi)容,請點擊一鍵舉報。
    轉藏 分享 獻花(0

    0條評論

    發(fā)表

    請遵守用戶 評論公約

    類似文章 更多