SO line not close or header not close ISSUE

来源:互联网 发布:淘宝网夏季女装连衣裙 编辑:程序博客网 时间:2024/06/05 20:08

系统运维时候,会遇到系统中So 状态错误的问题:

一般解决方法如下:

1.首先,运行请求 Retry Errored Workflow Activities ,试图重新try Workflow


运行完毕之后,可以查询订单的行状态和头状态;


2. 如果request运行完毕了,订单么有变化,此时应该需要通过datafix来修复数据;

1)对于行已经全部关闭了,但是头没有关闭的订单

此时只需要修改订单头的状态即可,将

update apps.oe_order_headers_all set open_flag = 'N' ,flow_status_code = 'CLOSED' 

where header_id = &header_id; SQl>commit

2)对于行的流程已经走完,但是行的状态不是Close(当然此时头不会close)

首先通过以下句子查询出line是还没有关闭的line ,找到line_id;

select a.order_number,b.line_number,b.* from apps.oe_order_headers_all a,apps.oe_order_lines_all b
where a.header_id=b.header_id 
and a.order_number in ('&order NUmber')
and b.open_flag ='Y'

然后运行一下句子,填入 line_id即可

 declare
   l_line_id       number:=&line_id;
   l_result      VARCHAR2(30);
   l_activity_id  NUMBER;
   l_file_val  varchar2(500);
 begin
 oe_debug_pub.debug_on;
 oe_debug_pub.initialize;
 l_file_val:=OE_DEBUG_PUB.Set_Debug_Mode('FILE');
 oe_Debug_pub.setdebuglevel(5);
 dbms_output.put_line(' Inside the script');
 dbms_output.put_line('file path is:'||l_file_val);
    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
    );


  oe_debug_pub.add('Retrun value of OEOL_selector function is'||l_result);
  update oe_order_lines_all
  set    actual_shipment_Date = (SELECT max(transaction_date)
                                 FROM   po.rcv_transactions
                                 WHERE  transaction_type = 'RECEIVE'
                                 AND    oe_order_line_id = l_line_id)
        ,last_update_date=SYSDATE,last_updated_by=-18532055
  where line_id=l_line_id;


  wf_engine.handleError('OEOL', to_char(l_line_id),'RMA_WAIT_FOR_INSPECTION','SKIP','COMPLETE');
  oe_debug_pub.add('inspection activity is retried for line: '||l_line_id);


oe_debug_pub.debug_off;
end;


运行之后,查询SO ,SO行已经关闭。



0 0
原创粉丝点击