The following lines contain the word 'select', 'insert', 'update' or 'delete':
select displayed_field
into l_po_type
from po_lookup_codes
where lookup_code = P_type
and lookup_type = 'DOCUMENT TYPE';
select structure_id
into l_p_struct_num
from mtl_default_sets_view
where functional_area_id = 2 ;
select gsob.chart_of_accounts_id
into l_chart_of_accounts_id
from gl_sets_of_books gsob,
financials_system_parameters fsp
where fsp.set_of_books_id = gsob.set_of_books_id ;
SELECT sum(pod.quantity_ordered - pod.quantity_cancelled)
into quantity_released
FROM po_distributions pod,
po_line_locations poll
WHERE pod.po_release_id IS NOT NULL
AND pod.po_header_id = p_po_header_id
AND pod.po_line_id = p_po_line_id
AND pod.line_location_id = poll.line_location_id
AND poll.shipment_type = 'SCHEDULED'
AND pod.source_distribution_id = Parent_join_id AND ( nvl(pod.encumbered_flag , 'N' ) = 'Y'
OR ( nvl(pod.encumbered_flag, 'N') = 'N'
AND nvl(poll.cancel_flag, 'N') = 'Y')
OR (NVL(POLL.closed_code,'OPEN')= 'FINALLY CLOSED'))
AND pod.gl_encumbered_date
BETWEEN nvl(P_encumbrance_date_from, pod.gl_encumbered_date-1)
AND nvl(P_encumbrance_date_to, pod.gl_encumbered_date+1);