The following lines contain the word 'select', 'insert', 'update' or 'delete':
select pod.destination_type_code,
pod.destination_type_code,
plc.displayed_field,
pod.wip_entity_id,
pod.wip_line_id,
pod.wip_repetitive_schedule_id,
pod.deliver_to_person_id,
pod.deliver_to_location_id,
pod.po_distribution_id,
round(pod.rate,28), -- Bug 409020
pod.rate_date, -- Bug 409020
mkc.kanban_card_number, --
pod.project_id, -- bug 5220069
pod.task_id, -- bug 5220069
pod.code_combination_id
into x_destination_type_code,
x_destination_context,
x_destination_type_dsp,
x_wip_entity_id,
x_wip_line_id,
x_wip_repetitive_schedule_id,
x_deliver_to_person_id,
x_deliver_to_location_id,
x_po_distribution_id,
v_currency_conv_rate,
v_currency_conv_date,
x_kanban_card_number, --
x_project_id, -- bug 5220069
x_task_id, -- bug 5220069
l_code_combination_id --
from po_distributions pod,
po_lookup_codes plc,
mtl_supply ms,
mtl_kanban_cards mkc --
where ms.supply_type_code = 'RECEIVING'
and ms.supply_source_id = x_rcv_transaction_id
and pod.po_distribution_id = ms.po_distribution_id
and plc.lookup_type = 'RCV DESTINATION TYPE'
and plc.lookup_code = pod.destination_type_code
AND pod.kanban_card_id = mkc.kanban_card_id (+); --
task_id related conditions in the above sql, writing a separate select
to retrieve the project and task numbers. This sql will be executed
only when project/task references are there in the PO distribution.
*/
x_project_number := NULL;
select PPA.SEGMENT1 PROJECT_NUMBER ,
PT.TASK_NUMBER
into x_project_number,
x_task_number
from PA_PROJECTS_ALL PPA,
PA_TASKS PT
where PPA.PROJECT_ID = PT.PROJECT_ID
and PPA.project_id = x_project_id
and PT.task_id = x_task_id;
select PSN.PROJECT_NUMBER ,
NULL
into x_project_number,
x_task_number
from PJM_SEIBAN_NUMBERS PSN
where PSN.project_id = x_project_id;
select displayed_field
into x_receiving
from po_lookup_codes
where lookup_type = 'RCV DESTINATION TYPE'
and lookup_code = 'RECEIVING';
SELECT substr(rtrim(address1) || '-' || rtrim(city),1,20)
INTO x_location_code
FROM hz_locations
WHERE location_id = x_location_id;
SELECT location_code
INTO x_location_code
FROM hr_locations
WHERE location_id = x_location_id;
select location_code
into x_location_code
from hr_locations
where location_id = x_location_id;
select full_name
into x_name
from per_employees_current_x -- Bug 7257731: Changed the view name from hr_employees to per_employees_current_x
where employee_id = x_employee_id;
select hazard_class
into x_hazard_class
from po_hazard_classes
where hazard_class_id = x_hazard_id;
select un_number
into x_un_number
from po_un_numbers
where un_number_id = x_un_number_id;
select destination_subinventory
into x_subinventory
from po_distributions
where po_distribution_id = X_po_distribution_id;
select subinventory
into x_subinventory
from oe_order_lines_all
where line_id = x_oe_order_line_id;
select subinventory_code
into x_subinventory
from mtl_item_sub_defaults
where inventory_item_id = x_item_id
and organization_id = x_org_id
and default_type = 2;
select locator_id
into x_locator_id
from mtl_item_loc_defaults
where inventory_item_id = x_item_id
and organization_id = x_org_id
and subinventory_code = x_subinventory
and default_type = 2;
select 'Check to see if deliver_to_location_id is valid'
INTO x_del_loc_val
from hr_locations
WHERE nvl(inventory_organization_id,x_org_id) = x_org_id
AND (inactive_date IS NULL
OR
inactive_date > x_date)
AND location_id = x_deliver_to_location_id;
select 'Check to see if deliver_to_location_id is valid'
INTO x_del_loc_val
from hz_locations
WHERE (address_expiration_date IS NULL
OR
address_expiration_date > x_date)
AND location_id = x_deliver_to_location_id;
select 'Check to see if location_id is valid'
into x_loc_val
from hr_locations
WHERE nvl(inventory_organization_id,x_org_id) = x_org_id
AND receiving_site_flag = 'Y'
AND (inactive_date IS NULL
OR
inactive_date > x_date)
AND location_id = x_location_id;
select 'Check to see if location_id is valid'
into x_loc_val
from hz_locations
WHERE (address_expiration_date IS NULL
OR
address_expiration_date > x_date)
AND location_id = x_location_id;
select 'Check to see if deliver_to_person_id is valid'
into x_del_per_val
from hr_employees_current_v
WHERE (inactive_date IS NULL
OR
inactive_date > x_date)
AND employee_id = x_deliver_to_person_id;
select 'Check to see if subinventory is valid'
into x_subinv
from mtl_secondary_inventories
WHERE (disable_date IS NULL
OR
disable_date > x_date)
AND organization_id = x_org_id
AND secondary_inventory_name = x_subinventory;
select locator_type
into x_locator_type
from mtl_secondary_inventories
where organization_id = x_org_id
and secondary_inventory_name = x_subinv;
into local variables so that final updated values could be returned
*/
l_destination_type_code := x_destination_type_code;
select plc.displayed_field
into l_destination_type_dsp
from po_lookup_codes plc
where plc.lookup_type = 'RCV DESTINATION TYPE'
and plc.lookup_code = l_destination_type_code;
SELECT project_id, task_id
INTO X_project_id,X_task_id
FROM oe_order_lines_all
WHERE line_id = x_oe_order_line_id;
select pa.project_number,pt.task_number
into x_project_number,x_task_number
from pjm_projects_all_v pa,
pa_tasks_expend_v pt
where pa.project_id = X_project_id
and pt.task_id = X_task_id
and pa.project_id=pt.project_id;
select project_number
into x_project_number
from pjm_projects_all_v
where project_id = X_project_id;
select locator_id
into x_locator_id
from rcv_shipment_lines
where shipment_line_id = x_shipment_line_id;
select haou.location_id
into l_deliver_to_location_id
from hr_all_organization_units haou
where haou.organization_id = (select ship_from_org_id
from oe_order_lines_all
where line_id = x_oe_order_line_id);
select count(*)
into x_count_po_distribution
from po_distributions
where line_location_id = x_po_line_location_id;
SELECT project_id, task_id
INTO X_project_id, X_task_id
FROM po_distributions
WHERE po_distribution_id = l_po_distribution_id;
SELECT project_id, task_id
INTO X_project_id,X_task_id
FROM oe_order_lines_all
WHERE line_id = x_oe_order_line_id;
SELECT currency_conversion_rate,currency_conversion_date
INTO x_currency_conv_rate,x_currency_conv_date
FROM rcv_transactions
WHERE transaction_id = x_transaction_id;
into local variables so that final updated values could be returned
*/
l_destination_type_code := x_destination_type_code;
select plc.displayed_field
into l_destination_type_dsp
from po_lookup_codes plc
where plc.lookup_type = 'RCV DESTINATION TYPE'
and plc.lookup_code = l_destination_type_code;
select locator_id
into x_locator_id
from rcv_shipment_lines
where shipment_line_id = x_shipment_line_id;
select count(*)
into x_count_po_distribution
from po_distributions
where line_location_id = x_po_line_location_id;
SELECT project_id, task_id
INTO X_project_id, X_task_id
FROM po_distributions
WHERE po_distribution_id = l_po_distribution_id;
SELECT project_id, task_id
INTO X_project_id,X_task_id
FROM oe_order_lines_all
WHERE line_id = x_oe_order_line_id;
SELECT currency_conversion_rate,currency_conversion_date
INTO x_currency_conv_rate,x_currency_conv_date
FROM rcv_transactions
WHERE transaction_id = x_transaction_id;