The following lines contain the word 'select', 'insert', 'update' or 'delete':
select nvl(drop_ship_flag,'N')
into l_drop_ship_flag
from po_line_locations_all
where line_location_id = X_po_line_location_id;
SELECT plt.outside_operation_flag
INTO l_osp_flag
FROM po_line_types plt,
po_lines pl
WHERE plt.line_type_id = pl.line_type_id
AND pl.po_line_id = p_po_line_id;
SELECT 1
INTO valid_open_job
FROM WIP_REPETITIVE_SCHEDULES WRS
WHERE WRS.ORGANIZATION_ID = X_to_organization_id
AND WRS.REPETITIVE_SCHEDULE_ID =
X_wip_repetitive_schedule_id
AND WRS.STATUS_TYPE IN (3,4);
SELECT 1
INTO valid_open_job
FROM WIP_DISCRETE_JOBS WDJ
WHERE WDJ.ORGANIZATION_ID = X_to_organization_id
AND WDJ.WIP_ENTITY_ID = X_wip_entity_id
AND WDJ.STATUS_TYPE IN (3,4);
SELECT count(1)
INTO X_number_of_inv_dest
FROM po_distributions pd
WHERE pd.line_location_id = X_line_location_id
AND pd.destination_type_code = 'INVENTORY';
SELECT count(1)
INTO X_number_of_inv_dest
FROM rcv_shipment_lines rsl
WHERE rsl.shipment_line_id = X_shipment_line_id
AND rsl.destination_type_code = 'INVENTORY';
SELECT nvl(max(hre.full_name),'notfound')
INTO x_del_per_val
FROM hr_employees_current_v hre
WHERE (hre.inactive_date IS NULL
OR hre.inactive_date > sysdate)
AND hre.employee_id = x_deliver_to_person_id;
SELECT count (1)
INTO X_num_of_distributions
FROM po_distributions pod
WHERE pod.line_location_id = X_po_line_location_id;
SELECT count (1)
INTO X_num_of_receipts
FROM rcv_supply rs
WHERE rs.po_line_location_id = X_po_line_location_id;
SELECT we.wip_entity_name job,
wn.operation_seq_num sequence,
bd.department_code department
INTO X_job,
X_sequence,
X_department
FROM wip_entities we,
bom_departments bd,
wip_operation_resources wr,
wip_operations wn,
wip_operations wo
WHERE wo.wip_entity_id = X_wip_entity_id
AND wo.organization_id = X_to_organization_id
AND nvl(wo.repetitive_schedule_id, -1) =
nvl(X_wip_repetitive_schedule_id, -1)
AND wo.operation_seq_num = X_wip_operation_seq_num
AND wr.wip_entity_id = X_wip_entity_id
AND wr.organization_id = X_to_organization_id
AND nvl(wr.repetitive_schedule_id, -1) =
nvl(X_wip_repetitive_schedule_id, -1)
AND wr.operation_seq_num = X_wip_operation_seq_num
AND wr.resource_seq_num = X_wip_resource_seq_num
AND wn.wip_entity_id = X_wip_entity_id
AND wn.organization_id = X_to_organization_id
AND nvl(wn.repetitive_schedule_id, -1) =
nvl(X_wip_repetitive_schedule_id, -1)
AND wn.operation_seq_num =
decode(wr.autocharge_type, 4,
nvl(wo.next_operation_seq_num, wo.operation_seq_num),
wo.operation_seq_num)
AND bd.department_id = wn.department_id
AND we.wip_entity_id = X_wip_entity_id
AND we.organization_id = X_to_organization_id;
SELECT we.wip_entity_name job
INTO X_job
FROM wip_entities we
WHERE we.wip_entity_id = X_wip_entity_id
AND we.organization_id = X_to_organization_id;
SELECT wn.operation_seq_num sequence,
bd.department_code department
INTO X_sequence, X_department
FROM bom_departments bd,
wip_operation_resources wr,
wip_operations wn,
wip_operations wo
WHERE wo.wip_entity_id = X_wip_entity_id
AND wo.organization_id = X_to_organization_id
AND nvl(wo.repetitive_schedule_id, -1) =
nvl(X_wip_repetitive_schedule_id, -1)
AND wo.operation_seq_num = X_wip_operation_seq_num
AND wr.wip_entity_id = X_wip_entity_id
AND wr.organization_id = X_to_organization_id
AND nvl(wr.repetitive_schedule_id, -1) =
nvl(X_wip_repetitive_schedule_id, -1)
AND wr.operation_seq_num = X_wip_operation_seq_num
AND wr.resource_seq_num = X_wip_resource_seq_num
AND wn.wip_entity_id = X_wip_entity_id
AND wn.organization_id = X_to_organization_id
AND nvl(wn.repetitive_schedule_id, -1) =
nvl(X_wip_repetitive_schedule_id, -1)
AND wn.operation_seq_num = wo.operation_seq_num
-- Bug#2738959 : Removed the decode statement for autocharge_type 4
-- Replaced the following statement with the one above.
-- Comparing with operation_seq_num instead of next_operation_seq_num
-- AND wn.operation_seq_num =
-- decode(wr.autocharge_type, 4,
-- nvl(wo.next_operation_seq_num, wo.operation_seq_num),
-- wo.operation_seq_num)
AND bd.department_id = wn.department_id;
select bd.department_code department
into X_department
from bom_departments bd,wip_operations wn
where wn.wip_entity_id = X_wip_entity_id
and wn.organization_id = X_to_organization_id
and nvl(wn.repetitive_schedule_id, -1) =
nvl(X_wip_repetitive_schedule_id, -1)
and bd.department_id = wn.department_id;
SELECT wo.operation_seq_num sequence
INTO X_sequence
FROM wip_operations wo
WHERE wo.wip_entity_id = X_wip_entity_id
AND wo.organization_id = X_to_organization_id
AND nvl(wo.repetitive_schedule_id, -1) =
nvl(X_wip_repetitive_schedule_id, -1)
AND wo.operation_seq_num = X_wip_operation_seq_num;
select wl.line_code
into X_line_num
from wip_lines wl
where wl.organization_id = X_to_organization_id
and wl.line_id = X_wip_line_id;
select displayed_field, lookup_code
into x_destination_type_dsp, x_destination_type_code
from po_lookup_codes
where lookup_code = 'RECEIVING'
and lookup_type = 'RCV DESTINATION TYPE';
select oel.subinventory,
NVL(oel.ship_from_org_id, oeh.ship_from_org_id),
oeh.conversion_rate,
oeh.conversion_rate_date
into x_deliver_to_sub,
x_to_organization_id,
x_rate,
x_rate_date
from oe_order_lines_all oel,
oe_order_headers_all oeh
where oeh.header_id = x_oe_order_header_id
and oel.line_id = x_oe_order_line_id;
select haou.location_id,
hla.location_code
into x_deliver_to_location_id,
x_deliver_to_location
from hr_all_organization_units haou,
hr_locations_all hla
where haou.organization_id = x_to_organization_id
and haou.location_id = hla.location_id;