The following lines contain the word 'select', 'insert', 'update' or 'delete':
FUNCTION get_ou(p_selected_org IN varchar2) RETURN NUMBER IS
l_ou NUMBER;
select DECODE(FPG.MULTI_ORG_FLAG, 'Y', TO_NUMBER(HOI2.ORG_INFORMATION3),
TO_NUMBER(NULL))
into l_ou
from HR_ORGANIZATION_INFORMATION HOI2,
FND_PRODUCT_GROUPS FPG
where (HOI2.ORG_INFORMATION_CONTEXT || '') ='Accounting Information'
and organization_id = p_selected_org;
p_selected_org IN varchar2,
p_org_type IN varchar2) return varchar2
IS
l_f_currency_code varchar2(15) := null;
if(p_selected_org <> 'ALL') then
select currency_code
into l_f_currency_code
from financials_system_params_all fsp,
gl_sets_of_books gsob
where fsp.org_id = p_selected_org
and fsp.set_of_books_id = gsob.set_of_books_id;
if(p_selected_org <> 'ALL') then
l_ou := get_ou(p_selected_org);
select currency_code
into l_f_currency_code
from financials_system_params_all fsp,
gl_sets_of_books gsob
where fsp.org_id = l_ou
and fsp.set_of_books_id = gsob.set_of_books_id;
else -- p_selected_org = 'ALL' and functional currency
return '0';
end if; -- end if p_selected_org<>'ALL'