SELECT h.source_order_number
, h.header_id
, f.fulfill_line_id
, f.source_line_number
, f.source_line_id
, pd.process_name
, psvl.step_id
, psvl.step_number
, psvl.parent_step_number
, psvlt.step_name
, psi.step_instance_id
, psi.group_id
, psvl.step_type
, psi.step_active
, psi.step_status
, psi.task_instance_id
, nvl(to_char(psi.actual_start_date, 'dd-mm-yy hh24:mi:ss'), 'NULL') "actual_start_Date"
, nvl(to_char(psi.actual_completion_date, 'dd-mm-yy hh24:mi:ss'), 'NULL') "actual_completion_Date"
, nvl(to_char(psi.planned_start_date, 'dd-mm-yy hh24:mi:ss'), 'NULL') "planned_start_Date"
, nvl(to_char(psi.planned_completion_date, 'dd-mm-yy hh24:mi:ss'), 'NULL') "planned_completion_Date"
, nvl(to_char(psi.required_start_date, 'dd-mm-yy hh24:mi:ss'), 'NULL') "required_start_Date"
, nvl(to_char(psi.required_completion_date, 'dd-mm-yy hh24:mi:ss'), 'NULL') "required_completion_Date"
, psi.last_updated_by
FROM fusion.doo_headers_all h
, fusion.doo_fulfill_lines_all f
, fusion.doo_orchestration_groups g
, fusion.doo_process_steps_b psvl
, fusion.doo_process_definitions_b pd
, fusion.doo_process_steps_tl psvlt
, fusion.doo_process_step_instances psi
WHERE 1 = 1
AND h.submitted_flag = 'Y'
AND h.header_id = f.header_id
AND f.header_id = g.header_id
AND g.status = 'ACTIVE'
AND f.fulfill_line_id = g.fulfillment_line_id
AND g.doo_process_instance_id = psi.doo_process_instance_id
AND psi.step_id = psvl.step_id
AND psvl.step_id = psvlt.step_id
AND psvl.doo_process_id = pd.doo_process_id
AND psvlt.language = userenv('LANG')
AND H.ORDER_NUMBER = :p_order_number
ORDER BY h.source_order_number
, LPAD(f.source_line_number, 2)
, f.fulfill_line_id
, psvl.doo_process_id
, psvl.step_number;
Sunday, February 27, 2022
Oracle Fusion SQL: SQL to Extract the Sales order Orchestraction Steps with each Step Status details
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.