The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT
NVL(precision,2)
FROM
fnd_currencies
WHERE currency_code = l_invoice_currency;*/
SELECT
NVL(precision,2)
FROM
fnd_currencies
WHERE currency_code = p_currency_code;
SELECT
commodity_code
, transaction_nature
, transport_mode
, port
, statistical_procedure_code
, total_weight
, alternate_quantity
, dispatch_territory_code
, dispatch_territory_eu_code
, destination_territory_code
, destination_territory_eu_code
, origin_territory_code
, origin_territory_eu_code
, stat_ext_value
, area
, comments
, delivery_terms
, customer_vat_number
-- , invoice_line_ext_value
, movement_amount
, invoice_reference
, entity_org_id
, invoice_id
, document_source_type
, currency_conversion_rate
, transaction_quantity
, invoice_unit_price
FROM
mtl_movement_statistics
WHERE movement_status = 'F'
AND report_reference = to_char(p_legal_entity_id)||p_zone_code
||p_period_name||p_usage_type
||p_stat_type||p_movement_type
ORDER BY commodity_code, parent_movement_id, movement_id;
SELECT
invoice_num
, invoice_currency_code
INTO
l_invoice_num
, l_invoice_currency
FROM ap_invoices_all
WHERE invoice_id = mvt_rec.invoice_id;
SELECT
trx_number
, invoice_currency_code
INTO
l_invoice_num
, l_invoice_currency
FROM ra_customer_trx_all
WHERE customer_trx_id = mvt_rec.invoice_id;
SELECT
invoice_num
, invoice_currency_code
INTO
l_invoice_num
, l_invoice_currency
FROM ap_invoices_all
WHERE invoice_id = mvt_rec.invoice_id;
UPDATE
mtl_movement_statistics
SET
movement_status = 'X'
WHERE movement_status = 'F'
AND report_reference = to_char(p_legal_entity_id)||p_zone_code
||p_period_name||p_usage_type
||p_stat_type||p_movement_type;