407: FROM csp_requirement_headers h,
408: csp_requirement_lines l,
409: csp_req_line_details dio,
410: oe_order_lines_all oola,
411: oe_order_headers_all ooha
412: WHERE h.task_id = p_task_id
413: AND h.task_assignment_id = r_asgn.task_assignment_id
414: AND h.address_type IN ('R', 'S')
415: AND h.requirement_header_id = l.requirement_header_id
666: FROM csp_requirement_headers h,
667: csp_requirement_lines l,
668: csp_req_line_details d,
669: oe_order_lines_all oola,
670: oe_order_headers_all ooha
671: WHERE h.task_assignment_id = r_asgn.task_assignment_id
672: AND h.task_id = p_task_id
673: AND h.requirement_header_id = l.requirement_header_id
674: AND l.requirement_line_id = d.requirement_line_id
2232: AND crl.local_RESERVATION_ID IS NOT NULL;
2233:
2234: cursor cancel_order IS
2235: select distinct oeh.header_id,crl.requirement_line_id
2236: from oe_order_lines_all oel, oe_order_headers_all oeh, csp_requirement_headers crh, csp_requirement_lines crl
2237: where crh.task_assignment_id = p_task_assignment_id
2238: and crl.REQUIREMENT_HEADER_ID = crh.REQUIREMENT_HEADER_ID
2239: and oel.line_id = crl.order_line_id
2240: and oeh.header_id = oel.header_id
2446: from csp_req_line_details crld
2447: ,csp_requirement_lines crl
2448: ,csp_requirement_headers crh
2449: ,oe_order_lines_all oel
2450: ,oe_order_headers_all oeh
2451: where crh.task_assignment_id = p_task_assignment_id
2452: and crl.requirement_header_id = crh.requirement_header_id
2453: and crld.requirement_line_id = crl.requirement_line_id
2454: and crld.source_type = 'IO'
2457: order by oeh.header_id;
2458:
2459: CURSOR get_order_status(c_header_id NUMBER) IS
2460: select flow_status_code
2461: from oe_order_headers_all
2462: where header_id = c_header_id;
2463:
2464: cursor get_line_details(c_order_header_id Number) is
2465: select REQ_LINE_DETAIL_ID
2815: from csp_req_line_details crld
2816: ,csp_requirement_lines crl
2817: ,csp_requirement_headers crh
2818: ,oe_order_lines_all oel
2819: ,oe_order_headers_all oeh
2820: where crh.task_assignment_id = p_task_assignment_id
2821: and crl.requirement_header_id = crh.requirement_header_id
2822: and crld.requirement_line_id = crl.requirement_line_id
2823: and crld.source_type = 'IO'
8061: from csp_req_line_details crld
8062: ,csp_requirement_lines crl
8063: ,csp_requirement_headers crh
8064: ,oe_order_lines_all oel
8065: ,oe_order_headers_all oeh
8066: where crh.task_id = l_task_id
8067: and crl.requirement_header_id = crh.requirement_header_id
8068: and crld.requirement_line_id = crl.requirement_line_id
8069: and crld.source_type = 'IO'
8072: order by oeh.header_id;
8073:
8074: CURSOR get_order_status(c_header_id NUMBER) IS
8075: select flow_status_code
8076: from oe_order_headers_all
8077: where header_id = c_header_id;
8078:
8079: cursor cleanup_needed IS
8080: select 'Y'