无法通过工作流正常关闭的销售订单问题解决

对于无法通过工作流正常关闭的销售订单:

请尝试以下方法:

      begin
        fnd_global.apps_initialize(:USER_ID,:RESP_ID, :RESP_APPL_ID);
      end;
        /
         
        /*IfWork Flow exist for Order header then use the script below. This will close theOrder
        Afterrunning this script run "Workflow Background Process" */
        begin
        wf_engine.completeactivity
        (
     'OEOH',--item_type
     '9999999',--item_key = header_id .... pass the HEADER_ID of the order you want to close
     'CLOSE_WAIT_FOR_L',-- apps.wf_process_activities.activity_name where instance_id= apps.wf_item_activity_statuses.process_activity
     null
     );
     end;
     /
     Commit;

 

如果工作流完成,且订单头关闭情况下,可以用以下脚本关闭订单行

SelectHEADER_ID, OPEN_FLAG, FLOW_STATUS_CODE

fromapps.oe_order_lines_all

whereorg_id=:org_id and header_id =:HEADER_ID; --pass the ORG_ID and HEADER_ID ofthe order you want to close

 

updateapps.oe_order_headers_all

set open_flag ='N' , FLOW_STATUS_CODE= 'CLOSED'

whereorg_id=:org_id and header_id =:HEADER_ID; --pass the ORG_ID and HEADER_ID ofthe order you want to close

 

Commit;

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值