The following lines contain the word 'select', 'insert', 'update' or 'delete':
po_line_locations_pkg_s3.select_summary(X_release_id); */
SELECT ship_via_lookup_code
INTO X_ship_via_lookup_code
FROM po_headers
WHERE po_header_id = X_po_header_id;
SELECT mp.organization_code
INTO x_ship_to_org_code
FROM financials_system_parameters fsp,
hr_organization_information hoi,
mtl_parameters mp
WHERE mp.organization_id = p_ship_to_org_id
AND mp.organization_id = hoi.organization_id
AND hoi.org_information_context = 'Accounting Information'
AND hoi.org_information1 = TO_CHAR(fsp.set_of_books_id);
SELECT to_number(max(POR.release_num) + 1)
FROM po_releases POR
WHERE POR.po_header_id = X_po_header_id;
select pll.po_release_id, pll.line_location_id
into X_po_release_id_record.po_release_id ,
X_po_release_id_record.po_line_location_id
from po_line_locations pll, po_releases pr where
pll.po_line_id = nvl(X_po_release_id_record.po_line_id,pll.po_line_id) and --1830177
pll.po_release_id = pr.po_release_id and
pr.po_header_id = X_po_release_id_record.po_header_id and
pr.release_num = X_po_release_id_record.release_num and
pll.shipment_num = X_po_release_id_record.shipment_num;
select 1
into v_count
from po_releases
where po_header_id = X_po_release_id_record.po_header_id
and release_num = X_po_release_id_record.release_num;
select count(*) into v_count
from po_line_locations pll, po_releases pr where
pll.po_line_id = nvl(X_po_release_id_record.po_line_id,pll.po_line_id) and --1830177
pll.po_release_id = pr.po_release_id and
pr.po_header_id = X_po_release_id_record.po_header_id and
pr.release_num = X_po_release_id_record.release_num;
select pll.po_release_id, pll.line_location_id, pll.shipment_num
into X_po_release_id_record.po_release_id ,
X_po_release_id_record.po_line_location_id,
X_po_release_id_record.shipment_num
from po_line_locations pll, po_releases pr where
pll.po_line_id = nvl(X_po_release_id_record.po_line_id,pll.po_line_id) and --1830177
pll.po_release_id = pr.po_release_id and
pr.po_header_id = X_po_release_id_record.po_header_id and
pr.release_num = X_po_release_id_record.release_num;
select distinct pll.po_release_id
into X_po_release_id_record.po_release_id
from po_line_locations pll, po_releases pr where
pll.po_line_id = nvl(X_po_release_id_record.po_line_id,pll.po_line_id) and--1830177
pll.po_release_id = pr.po_release_id and
pr.po_header_id = X_po_release_id_record.po_header_id and
pr.release_num = X_po_release_id_record.release_num;
select count(*) into v_count
from po_line_locations pll
where
pll.po_line_id = X_po_release_id_record.po_line_id and
pll.shipment_num = X_po_release_id_record.shipment_num;
select pll.po_release_id, pll.line_location_id
into X_po_release_id_record.po_release_id ,
X_po_release_id_record.po_line_location_id
from po_line_locations pll
where
pll.po_line_id = X_po_release_id_record.po_line_id and
pll.shipment_num = X_po_release_id_record.shipment_num;
select count(*) into v_count
from po_line_locations pll
where
pll.po_line_id = X_po_release_id_record.po_line_id
and NVL(pll.APPROVED_FLAG,'N') = 'Y'
and NVL(pll.CANCEL_FLAG, 'N') = 'N'
and NVL(pll.CLOSED_CODE,'OPEN') <> 'FINALLY CLOSED'
and pll.SHIPMENT_TYPE IN ('STANDARD','BLANKET','SCHEDULED');
select pll.po_release_id, pll.line_location_id, pll.shipment_num
into X_po_release_id_record.po_release_id ,
X_po_release_id_record.po_line_location_id,
X_po_release_id_record.shipment_num
from po_line_locations pll
where
pll.po_line_id = X_po_release_id_record.po_line_id
and NVL(pll.APPROVED_FLAG,'N') = 'Y' -- bug 610238 should include the same clause as above
and NVL(pll.CANCEL_FLAG, 'N') = 'N'
and NVL(pll.CLOSED_CODE,'OPEN') <> 'FINALLY CLOSED'
and pll.SHIPMENT_TYPE IN ('STANDARD','BLANKET','SCHEDULED');
SELECT 'Y'
FROM PO_HEADERS POH
WHERE POH.po_header_id = X_po_header_id
AND TRUNC(X_release_date) BETWEEN
TRUNC(nvl(POH.start_date, X_release_date))
AND
TRUNC(nvl(POH.end_date, X_release_date));
SELECT 'N'
FROM PO_RELEASES POR
WHERE POR.po_header_id = X_po_header_id
AND POR.release_num = X_release_num
AND (X_rowid is null OR
X_rowid <> POR.rowid);
SELECT 'Y'
FROM PO_RELEASES POR
WHERE POR.po_release_id = X_po_release_id
AND ( POR.release_num <> X_release_num
OR POR.agent_id <> X_agent_id
OR POR.release_date <> X_release_date
OR ((POR.acceptance_required_flag <> X_acceptance_required_flag)
OR (POR.acceptance_required_flag IS NULL
AND
X_acceptance_required_flag IS NOT NULL)
OR (POR.acceptance_required_flag IS NOT NULL
AND
X_acceptance_required_flag IS NULL))
OR ((POR.acceptance_due_date <> X_acceptance_due_date)
OR (POR.acceptance_due_date IS NULL
AND
X_acceptance_due_date IS NOT NULL)
OR (POR.acceptance_due_date IS NOT NULL
AND
X_acceptance_due_date IS NULL))
--
OR ((POR.shipping_control <> p_shipping_control)
OR (POR.shipping_control IS NULL
AND
p_shipping_control IS NOT NULL)
OR (POR.shipping_control IS NOT NULL
AND
p_shipping_control IS NULL))
--
);