325: */
326: /*The first part of this query cause performance hit for bug 10243160. splite the cursor
327: cursor c1 is -- x_req_header_id is a parameter
328: select pol.requisition_line_id
329: from po_requisition_headers_all poh, --
331: where x_req_header_id is null AND
332: line_location_id is null AND
333: nvl(pol.cancel_flag,'N') ='N' AND
337: authorization_status = 'APPROVED' AND
338: poh.requisition_header_id = pol.requisition_header_id
339: union all
340: select pol.requisition_line_id
341: from po_requisition_headers_all poh, --
343: where x_req_header_id is not null AND
344: poh.requisition_header_id = x_req_header_id AND
345: line_location_id is null AND
353: --Bug 10243160 start. Separate the cursor into c1 and c2. c2 is for concurrent program. It may cause performance hit.
354: --Use c2 only if it needs. so that reduce the overhead for regular autocreate flow.
355: cursor c1 is --c1 is for autocreate flow. x_req_header_id is a parameter
356: select pol.requisition_line_id
357: from po_requisition_headers_all poh, --
359: where poh.requisition_header_id = x_req_header_id AND
360: line_location_id is null AND
361: nvl(pol.cancel_flag,'N') ='N' AND
368:
369: --c2 is for concurrent program flow.
370: cursor c2 is
371: select pol.requisition_line_id
372: from po_requisition_headers_all poh, --
374: where line_location_id is null AND
375: nvl(pol.cancel_flag,'N') ='N' AND
376: nvl(pol.closed_code,'OPEN') <> 'FINALLY CLOSED' AND
399: CURSOR C_ConsumeReqLines is
400: SELECT prl.requisition_line_id
401: FROM po_lines pol,
402: po_requisition_lines prl,
403: po_requisition_headers_all prh --
405: AND prl.auction_header_id = pol.auction_header_id
406: AND prl.bid_line_number = pol.bid_line_number
407: AND prl.bid_number = pol.bid_number
416:
417: --
418: cursor C_CLMReqLines is
419: select pol.requisition_line_id
420: from po_requisition_headers_all poh, --
422: where poh.requisition_header_id = x_req_header_id AND
423: line_location_id is null AND
424: nvl(pol.cancel_flag,'N') ='N' AND
977: x_suggested_vendor_site_id,
978: l_job_id, --
979: l_labor_req_line_id, --
980: x_federal_flag -- Bug 14314684
981: from po_requisition_headers_all phs, --
983: where pls.requisition_line_id = x_req_line_id
984: and phs.requisition_header_id = pls.requisition_header_id;
985: