对于无法通过工作流正常关闭的销售订单:
请尝试以下方法:
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;