The following lines contain the word 'select', 'insert', 'update' or 'delete':
( p_selected_org in varchar2
) return varchar2
is
cursor c_one_org_currency(b_org_id number) is
select distinct
gsob.currency_code
from
hr_organization_information hoi
, gl_sets_of_books gsob
, mtl_parameters mp
where hoi.org_information_context = 'Accounting Information'
and hoi.org_information1 = to_char(gsob.set_of_books_id)
and hoi.organization_id = mp.organization_id
and mp.organization_id = b_org_id
and mp.eam_enabled_flag = 'Y';
select distinct
gsob.currency_code
, count(distinct gsob.currency_code) over() currency_count
from
hr_organization_information hoi
, gl_sets_of_books gsob
, mtl_parameters mp
where hoi.org_information_context = 'Accounting Information'
and hoi.org_information1 = to_char(gsob.set_of_books_id)
and hoi.organization_id = mp.organization_id
and
( exists
( select 1
from org_access o
where o.responsibility_id = fnd_global.resp_id
and o.resp_application_id = fnd_global.resp_appl_id
and o.organization_id = mp.organization_id ) or
( not exists ( select 1
from org_access ora
where mp.organization_id = ora.organization_id
)
)
)
and mp.eam_enabled_flag = 'Y';
nvl(g_org,'NULL') <> p_selected_org then
g_resp_id := fnd_global.resp_id;
g_org := p_selected_org;
if p_selected_org = 'ALL' then
open c_all_orgs_currency;
l_org_id := to_number(p_selected_org);