The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT count(1)
INTO x_location_count
FROM hr_locations_all hl
WHERE hl.location_id = x_location_id
AND sysdate < nvl(hl.inactive_date, sysdate + 1)
AND nvl(hl.ship_to_site_flag, 'N') = decode(x_ship_to, 'Y', x_ship_to,
nvl(hl.ship_to_site_flag, 'N'))
AND nvl(hl.receiving_site_flag, 'N') = decode(x_receiving, 'Y', x_receiving,
nvl(hl.receiving_site_flag, 'N'))
AND nvl(hl.inventory_organization_id, x_destination_org_id) =
x_destination_org_id
AND (nvl(x_val_internal, 'N') = 'N'
OR
x_location_id in
(SELECT pla.location_id
FROM po_location_associations_all pla,
org_organization_definitions org -- Bug 5028505
WHERE pla.location_id = x_location_id
AND org.organization_id= x_source_org_id -- Bug 5028505
AND org.operating_unit = pla.org_id )); -- Bug 5028505
SELECT count(1)
INTO x_location_count
FROM hr_locations_all hl
WHERE hl.location_id = x_location_id
AND sysdate < nvl(hl.inactive_date, sysdate + 1)
AND nvl(hl.ship_to_site_flag, 'N') = decode(x_ship_to, 'Y', x_ship_to,
nvl(hl.ship_to_site_flag, 'N'))
AND nvl(hl.receiving_site_flag, 'N') = decode(x_receiving, 'Y', x_receiving,
nvl(hl.receiving_site_flag, 'N'))
AND nvl(hl.inventory_organization_id, x_destination_org_id) =
x_destination_org_id
AND (nvl(x_val_internal, 'N') = 'N'
OR
x_location_id in
(SELECT pla.location_id
FROM po_location_associations pla
WHERE pla.location_id = x_location_id));
SELECT count(1)
INTO x_location_count
FROM hz_locations hz
WHERE hz.location_id = x_location_id
AND sysdate < nvl(hz.address_expiration_date, sysdate + 1);