The following lines contain the word 'select', 'insert', 'update' or 'delete':
select gl.currency_code into l_currency_code
from ar_system_parameters_all asp,
gl_ledgers gl
where org_id = p_org_id
and gl.ledger_id = asp.set_of_books_id;
select site_use.cust_acct_site_id, site_use.PAYMENT_TERM_ID,
site_use.site_use_id
into x_bill_to_address_id,x_payment_term_id, l_site_use_id
from hz_cust_site_uses_all site_use,
hz_cust_acct_sites_all sites
where sites.cust_account_id = p_bill_to_customer_account_id
and sites.status ='A'
and sites.cust_acct_site_id = site_use.cust_acct_site_id
and site_use.site_use_code = 'BILL_TO'
and site_use.primary_flag = 'Y'
and site_use.org_id = p_org_id;
select site_use.cust_acct_site_id
into x_ship_to_address_id
from hz_cust_site_uses_all site_use,
hz_cust_acct_sites_all sites
where sites.cust_account_id = p_ship_to_customer_account_id
and sites.status ='A'
and sites.cust_acct_site_id = site_use.cust_acct_site_id
and site_use.site_use_code = 'SHIP_TO'
and site_use.primary_flag = 'Y'
and site_use.org_id = p_org_id;
SELECT tl.term_id into x_payment_term_id
FROM ra_terms t_su,
ra_terms t_cp1,
ra_terms t_cp2,
ra_terms tl,
hz_customer_profiles cp1,
hz_customer_profiles cp2,
hz_cust_site_uses_all su
WHERE p_bill_to_customer_account_id = cp1.cust_account_id(+)
AND cp2.cust_account_id = p_bill_to_customer_account_id
AND su.site_use_id = cp1.site_use_id(+)
AND cp2.site_use_id IS NULL
AND su.payment_term_id = t_su.term_id(+)
AND cp1.standard_terms = t_cp1.term_id(+)
AND cp2.standard_terms = t_cp2.term_id(+)
AND NVL( t_su.term_id, NVL( t_cp1.term_id, t_cp2.term_id)) = tl.term_id
AND su.site_use_id = l_site_use_id
AND su.org_id = p_org_id;
select payment_term_id into x_payment_term_id
from hz_cust_accounts
where CUST_ACCOUNT_ID = p_bill_to_customer_account_id;