The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT NVL(intransit_time,0)
FROM mtl_interorg_ship_methods
WHERE from_organization_id = p_oem_organization_id
AND to_organization_id = p_tp_organization_id
AND default_flag =1;
SELECT NVL(plla.need_by_date, plla.promised_date)
, jso.osa_item_id
INTO
l_need_by_date
, l_osa_item_id
FROM
jmf_subcontract_orders jso,
po_line_locations_all plla
WHERE subcontract_po_shipment_id = p_subcontract_po_shipment_id
AND plla.line_location_id = jso.subcontract_po_shipment_id;
SELECT distinct project_id
, task_id
FROM po_distributions_all
WHERE line_location_id = p_replen_po_shipment_id
AND project_id IS NOT NULL;
SELECT org_id
INTO l_org_id
FROM po_line_locations_all
WHERE line_location_id = p_replen_po_shipment_id;
, '>> ' || l_program ||': Org ID selected from PO_LINE_LOCATIONS_ALL = '
|| l_org_id
);
SELECT TO_NUMBER(DECODE(SUBSTRB(USERENV('CLIENT_INFO'),1,1),' ',NULL,SUBSTRB(USERENV('CLIENT_INFO'),1,10)))
INTO l_client_info_org_id
FROM DUAL;
SELECT TO_NUMBER(org_information1)
INTO l_header_rec.sold_to_org_id
FROM HR_ORGANIZATION_INFORMATION
WHERE organization_id = p_tp_organization_id
AND org_information_context = 'Customer/Supplier Association';
SELECT site.site_use_id
INTO l_header_rec.invoice_to_org_id
FROM hz_cust_site_uses_all site,
hz_cust_acct_sites_all acct_site
WHERE site.cust_acct_site_id = acct_site.cust_acct_site_id
AND site.site_use_code = 'BILL_TO'
AND site.org_id = acct_site.org_id
AND acct_site.cust_account_id = l_header_rec.sold_to_org_id
AND site.status = 'A';
SELECT shikyu_default_order_type_id
INTO l_header_rec.order_type_id
FROM mtl_interorg_parameters
WHERE from_organization_id = p_oem_organization_id
AND to_organization_id = p_tp_organization_id;
SELECT default_outbound_line_type_id
INTO l_line_type_id
FROM oe_transaction_Types_all
WHERE transaction_type_id = l_header_rec.order_type_id;
SELECT NVL(need_by_date, promised_date)
INTO l_replen_po_need_by_date
FROM po_line_locations_all
WHERE line_location_id = p_replen_po_shipment_id;
SELECT primary_uom_code
INTO l_primary_uom_code
FROM mtl_system_items_b
WHERE inventory_item_id = p_item_id
AND organization_id = p_oem_organization_id;
SELECT muomvl.uom_code,
plla.quantity
INTO l_price_list_uom,
l_quantity
FROM po_line_locations_all plla,
mtl_units_of_measure_vl muomvl
WHERE plla.line_location_id = p_replen_po_shipment_id
AND plla.unit_meas_lookup_code = muomvl.unit_of_measure;
SELECT segment1
INTO l_order_number
FROM po_headers_all poh
WHERE EXISTS
(SELECT 1 FROM po_line_locations_all poll
WHERE poll.line_location_id = p_subcontract_po_shipment_id
AND poll.po_header_id = poh.po_header_id);
SELECT segment1
INTO l_sub_comp
FROM mtl_system_items_b
WHERE inventory_item_id = p_item_id
AND organization_id = p_tp_organization_id ;
SELECT unit_selling_price,
price_list_id
INTO l_unit_price,
l_price_list_id
FROM oe_order_lines_all
WHERE line_id = l_line_tbl(1).line_id;
SELECT currency_code
INTO l_currency_code
FROM oe_price_lists
WHERE price_list_id = l_price_list_id;
SELECT qp_price_list_pvt.get_product_uom_code(list_line_id),
operand
INTO l_price_list_uom,
l_component_price
FROM qp_list_lines
WHERE list_header_id = l_price_list_id
AND qp_price_list_pvt.get_inventory_item_id(list_line_id) = p_item_id
AND l_ship_date BETWEEN
NVL(start_date_active, l_ship_date - 1)
AND
NVL(end_date_active, l_ship_date + 1);
UPDATE jmf_shikyu_components
SET currency = l_currency_code
, price_list_id = l_price_list_id
, last_update_date = sysdate
, last_updated_by = FND_GLOBAL.user_id
, last_update_login = FND_GLOBAL.login_id
WHERE subcontract_po_shipment_id = p_subcontract_po_shipment_id
AND oem_organization_id = p_oem_organization_id
AND shikyu_component_id = p_item_id;
UPDATE jmf_shikyu_components
SET primary_uom_price = l_unit_price
, primary_uom = l_primary_uom_code
, uom = l_price_list_uom
, currency = l_currency_code
, price_list_id = l_price_list_id
, shikyu_component_price = l_component_price
, last_update_date = sysdate
, last_updated_by = FND_GLOBAL.user_id
, last_update_login = FND_GLOBAL.login_id
WHERE subcontract_po_shipment_id = p_subcontract_po_shipment_id
AND oem_organization_id = p_oem_organization_id
AND shikyu_component_id = p_item_id;
, '>> ' || l_program || ': Updated JMF_SHIKYU_COMPONENTS table'
);
SELECT concatenated_segments
INTO l_item_number
FROM MTL_SYSTEM_ITEMS_VL
WHERE organization_id = p_oem_organization_id
AND inventory_item_id = p_item_id;
SELECT concatenated_segments
INTO l_item_number
FROM MTL_SYSTEM_ITEMS_VL
WHERE organization_id = p_oem_organization_id
AND inventory_item_id = p_item_id;
SELECT concatenated_segments
INTO l_item_number
FROM MTL_SYSTEM_ITEMS_VL
WHERE organization_id = p_oem_organization_id
AND inventory_item_id = p_item_id;