料号禁用,在做履行接受时,数据无法传送AR接口

一、查看订单行状态:

在查看行状态,发现已经关闭了,但是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;

二、查看订单行工作流状态:

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;

运行之后,查看状态(已连接至应收款管理系统),已经成功插入接口表中

四、跑INVOICE_INTERFACE工作流:

由于工作流中的interface 都是未完成,需要更改工作流状态(运行本程序后,请等5-10分钟,让系统的工作流跑完)

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;

 运行之后,查看订单行状态,已经关闭。

查看订单行工作流状态,如下图所示:

五、跑CLOSE_LINE工作流:

(0)

相关推荐