The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT 'Y'
FROM per_person_types ppt
WHERE ppt.person_type_Id = p_person_type_id
AND ppt.system_person_type like 'EMP%';
INVALID_UPDATE EXCEPTION;
SELECT business_group_id
FROM hr_all_organization_units
WHERE organization_id = p_organization_id;
select o.organization_id
from hr_organization_units o , hr_organization_information hoi , FND_SESSIONS s
where o.organization_id = hoi.organization_id
and hoi.org_information_context = 'CLASS'
and hoi.org_information1 = 'SE_LOCAL_UNIT'
and to_char(o.organization_id) in
(
select hoinf.org_information1
from hr_organization_units org, hr_organization_information hoinf
where org.business_group_id = l_business_group_id
and org.organization_id = hoinf.organization_id
and hoinf.org_information_context = 'SE_LOCAL_UNITS'
)
and s.session_id = userenv('sessionid')
and s.effective_date between o.date_from and nvl(o.date_to,to_date('31/12/4712','DD/MM/YYYY'))
ORDER BY o.name;
select o.organization_id
from hr_organization_units o ,
hr_organization_information hoi,
hr_organization_information hoinf,
FND_SESSIONS s
where o.organization_id = hoi.organization_id
and o.business_group_id = l_business_group_id
and hoi.org_information_context = 'CLASS'
and hoi.org_information1 = 'SE_LOCAL_UNIT'
and hoinf.org_information_context = 'SE_LOCAL_UNITS'
and to_char(o.organization_id) = hoinf.org_information1
and to_char(hoi.organization_id) = hoinf.org_information1
and s.session_id = userenv('sessionid')
and s.effective_date between o.date_from and nvl(o.date_to,to_date('31/12/4712','DD/MM/YYYY'))
ORDER BY o.name;
select count(hoi2.org_information1)
from HR_ORGANIZATION_UNITS o1
, HR_ORGANIZATION_INFORMATION hoi1
, HR_ORGANIZATION_INFORMATION hoi2
WHERE o1.business_group_id =l_business_group_id
and hoi1.organization_id = o1.organization_id
and hoi1.org_information1 = 'SE_LOCAL_UNIT'
and hoi1.org_information_context = 'CLASS'
and o1.organization_id = hoi2.organization_id
and hoi2.org_information1 = p_org_information1
and hoi2.ORG_INFORMATION_CONTEXT='SE_LOCAL_UNIT_DETAILS'
and hoi1.organization_id in
(select hoi1.organization_id
from HR_ORGANIZATION_UNITS o1
, HR_ORGANIZATION_INFORMATION hoi1
, HR_ORGANIZATION_INFORMATION hoi2
, HR_ORGANIZATION_INFORMATION hoi3
WHERE o1.business_group_id =l_business_group_id
and hoi1.organization_id = o1.organization_id
and hoi1.org_information1 = 'SE_LOCAL_UNIT'
and hoi1.org_information_context = 'CLASS'
and o1.organization_id = hoi2.org_information1
and hoi2.ORG_INFORMATION_CONTEXT='SE_LOCAL_UNITS'
and hoi2.organization_id = hoi3.organization_id
and hoi3.ORG_INFORMATION_CONTEXT='CLASS'
and hoi3.org_information1 = 'HR_LEGAL_EMPLOYER'
AND hoi3.organization_id IN
(select hoi3.organization_id
from HR_ORGANIZATION_UNITS o1
, HR_ORGANIZATION_INFORMATION hoi1
, HR_ORGANIZATION_INFORMATION hoi2
, HR_ORGANIZATION_INFORMATION hoi3
WHERE o1.business_group_id =l_business_group_id
and hoi1.organization_id = o1.organization_id
and hoi1.organization_id = p_organization_id
and hoi1.org_information1 = 'SE_LOCAL_UNIT'
and hoi1.org_information_context = 'CLASS'
and o1.organization_id = hoi2.org_information1
and hoi2.ORG_INFORMATION_CONTEXT='SE_LOCAL_UNITS'
and hoi2.organization_id = hoi3.organization_id
and hoi3.ORG_INFORMATION_CONTEXT='CLASS'
and hoi3.org_information1 = 'HR_LEGAL_EMPLOYER' ) );
select hoi3.organization_id
from HR_ALL_ORGANIZATION_UNITS o1
, HR_ORGANIZATION_INFORMATION hoi1
, HR_ORGANIZATION_INFORMATION hoi2
, HR_ORGANIZATION_INFORMATION hoi3
WHERE o1.business_group_id =l_business_group_id
and hoi1.organization_id = o1.organization_id
and hoi1.organization_id = p_organization_id
and hoi1.org_information1 = 'SE_LOCAL_UNIT'
and hoi1.org_information_context = 'CLASS'
and o1.organization_id = hoi2.org_information1
and hoi2.ORG_INFORMATION_CONTEXT='SE_LOCAL_UNITS'
and hoi2.organization_id = hoi3.organization_id
and hoi3.ORG_INFORMATION_CONTEXT='CLASS'
and hoi3.org_information1 = 'HR_LEGAL_EMPLOYER';
select count(hoi2.org_information1)
from HR_ALL_ORGANIZATION_UNITS o1
, HR_ORGANIZATION_INFORMATION hoi1
, HR_ORGANIZATION_INFORMATION hoi2
, HR_ORGANIZATION_INFORMATION hoi3
, HR_ORGANIZATION_INFORMATION hoi4
WHERE o1.business_group_id =l_business_group_id
and hoi1.organization_id = o1.organization_id
and hoi1.org_information1 = 'SE_LOCAL_UNIT'
and hoi1.org_information_context = 'CLASS'
and o1.organization_id = hoi2.organization_id
and hoi2.org_information1 = p_org_information1
and hoi2.ORG_INFORMATION_CONTEXT='SE_LOCAL_UNIT_DETAILS'
and hoi2.organization_id = hoi4.org_information1
and hoi3.ORG_INFORMATION_CONTEXT='CLASS'
and hoi3.org_information1 = 'HR_LEGAL_EMPLOYER'
and hoi4.ORG_INFORMATION_CONTEXT='SE_LOCAL_UNITS'
and hoi4.organization_id = hoi3.organization_id
and hoi4.organization_id = L_LEGAL_EMPLOYER;
select count(hoi2.org_information6)
from HR_ORGANIZATION_UNITS o1
, HR_ORGANIZATION_INFORMATION hoi1
, HR_ORGANIZATION_INFORMATION hoi2
WHERE o1.business_group_id =l_business_group_id
and hoi1.organization_id = o1.organization_id
and hoi1.org_information1 = 'SE_LOCAL_UNIT'
and hoi1.org_information_context = 'CLASS'
and o1.organization_id = hoi2.organization_id
and hoi2.org_information6 = 'Y'
and hoi2.ORG_INFORMATION_CONTEXT='SE_LOCAL_UNIT_DETAILS'
and hoi1.organization_id in
(select hoi1.organization_id
from HR_ORGANIZATION_UNITS o1
, HR_ORGANIZATION_INFORMATION hoi1
, HR_ORGANIZATION_INFORMATION hoi2
, HR_ORGANIZATION_INFORMATION hoi3
WHERE o1.business_group_id =l_business_group_id
and hoi1.organization_id = o1.organization_id
and hoi1.org_information1 = 'SE_LOCAL_UNIT'
and hoi1.org_information_context = 'CLASS'
and o1.organization_id = hoi2.org_information1
and hoi2.ORG_INFORMATION_CONTEXT='SE_LOCAL_UNITS'
and hoi2.organization_id = hoi3.organization_id
and hoi3.ORG_INFORMATION_CONTEXT='CLASS'
and hoi3.org_information1 = 'HR_LEGAL_EMPLOYER'
AND hoi3.organization_id IN
(select hoi3.organization_id
from HR_ORGANIZATION_UNITS o1
, HR_ORGANIZATION_INFORMATION hoi1
, HR_ORGANIZATION_INFORMATION hoi2
, HR_ORGANIZATION_INFORMATION hoi3
WHERE o1.business_group_id =l_business_group_id
and hoi1.organization_id = o1.organization_id
and hoi1.organization_id = p_organization_id
and hoi1.org_information1 = 'SE_LOCAL_UNIT'
and hoi1.org_information_context = 'CLASS'
and o1.organization_id = hoi2.org_information1
and hoi2.ORG_INFORMATION_CONTEXT='SE_LOCAL_UNITS'
and hoi2.organization_id = hoi3.organization_id
and hoi3.ORG_INFORMATION_CONTEXT='CLASS'
and hoi3.org_information1 = 'HR_LEGAL_EMPLOYER' ) );*/
select count(hoi2.org_information6)
from HR_ALL_ORGANIZATION_UNITS o1
, HR_ORGANIZATION_INFORMATION hoi1
, HR_ORGANIZATION_INFORMATION hoi2
, HR_ORGANIZATION_INFORMATION hoi3
, HR_ORGANIZATION_INFORMATION hoi4
WHERE o1.business_group_id =l_business_group_id
and hoi1.organization_id = o1.organization_id
and hoi1.org_information1 = 'SE_LOCAL_UNIT'
and hoi1.org_information_context = 'CLASS'
and o1.organization_id = hoi2.organization_id
and hoi2.org_information6 = 'Y'
and hoi2.ORG_INFORMATION_CONTEXT='SE_LOCAL_UNIT_DETAILS'
and hoi2.organization_id = hoi4.org_information1
and hoi3.ORG_INFORMATION_CONTEXT='CLASS'
and hoi3.org_information1 = 'HR_LEGAL_EMPLOYER'
and hoi4.ORG_INFORMATION_CONTEXT='SE_LOCAL_UNITS'
and hoi4.organization_id = hoi3.organization_id
and hoi4.organization_id = L_LEGAL_EMPLOYER;
select count(hoi2.org_information6)
from HR_ORGANIZATION_UNITS o1
, HR_ORGANIZATION_INFORMATION hoi1
, HR_ORGANIZATION_INFORMATION hoi2
WHERE o1.business_group_id =l_business_group_id
and hoi1.organization_id = o1.organization_id
and hoi1.org_information1 = 'SE_LOCAL_UNIT'
and hoi1.org_information_context = 'CLASS'
and o1.organization_id = hoi2.organization_id
and hoi2.org_information6 = 'Y'
and hoi2.organization_id <> P_ORG_INFORMATION1
and hoi2.ORG_INFORMATION_CONTEXT='SE_LOCAL_UNIT_DETAILS'
and hoi1.organization_id in
(select hoi1.organization_id
from HR_ORGANIZATION_UNITS o1
, HR_ORGANIZATION_INFORMATION hoi1
, HR_ORGANIZATION_INFORMATION hoi2
, HR_ORGANIZATION_INFORMATION hoi3
WHERE o1.business_group_id =l_business_group_id
and hoi1.organization_id = o1.organization_id
and hoi1.org_information1 = 'SE_LOCAL_UNIT'
and hoi1.org_information_context = 'CLASS'
and o1.organization_id = hoi2.org_information1
and hoi2.ORG_INFORMATION_CONTEXT='SE_LOCAL_UNITS'
and hoi2.organization_id = hoi3.organization_id
and hoi3.ORG_INFORMATION_CONTEXT='CLASS'
and hoi3.org_information1 = 'HR_LEGAL_EMPLOYER'
AND hoi3.organization_id = p_organization_id );
CURSOR main_lc_le IS select count(hoi2.org_information6)
from HR_ALL_ORGANIZATION_UNITS o1
, HR_ORGANIZATION_INFORMATION hoi1
, HR_ORGANIZATION_INFORMATION hoi2
, HR_ORGANIZATION_INFORMATION hoi3
, HR_ORGANIZATION_INFORMATION hoi4
WHERE o1.business_group_id =l_business_group_id
and hoi1.organization_id = o1.organization_id
and hoi1.org_information1 = 'SE_LOCAL_UNIT'
and hoi1.org_information_context = 'CLASS'
and o1.organization_id = hoi2.organization_id
and hoi2.org_information6 = 'Y'
and hoi2.organization_id <> P_ORG_INFORMATION1
and hoi2.ORG_INFORMATION_CONTEXT='SE_LOCAL_UNIT_DETAILS'
and o1.organization_id = hoi3.org_information1
and hoi3.ORG_INFORMATION_CONTEXT='SE_LOCAL_UNITS'
and hoi3.organization_id = hoi4.organization_id
and hoi4.ORG_INFORMATION_CONTEXT='CLASS'
and hoi4.org_information1 = 'HR_LEGAL_EMPLOYER'
AND hoi4.organization_id = p_organization_id ;
select count(hoi2.org_information1)
from HR_ORGANIZATION_UNITS o1
, HR_ORGANIZATION_INFORMATION hoi1
, HR_ORGANIZATION_INFORMATION hoi2
WHERE o1.business_group_id =l_business_group_id
and hoi1.organization_id = o1.organization_id
and hoi1.org_information1 = 'SE_LOCAL_UNIT'
and hoi1.org_information_context = 'CLASS'
and o1.organization_id = hoi2.organization_id
and hoi2.organization_id <> P_ORG_INFORMATION1
and hoi2.ORG_INFORMATION_CONTEXT='SE_LOCAL_UNIT_DETAILS'
and hoi2.org_information1 in
(select hoi2.org_information1
from HR_ORGANIZATION_UNITS o1
, HR_ORGANIZATION_INFORMATION hoi1
, HR_ORGANIZATION_INFORMATION hoi2
WHERE o1.business_group_id =l_business_group_id
and hoi1.organization_id = o1.organization_id
and hoi1.org_information1 = 'SE_LOCAL_UNIT'
and hoi1.org_information_context = 'CLASS'
and o1.organization_id = hoi2.organization_id
and hoi2.organization_id = P_ORG_INFORMATION1
and hoi2.ORG_INFORMATION_CONTEXT='SE_LOCAL_UNIT_DETAILS'
)
and hoi1.organization_id in
(select hoi1.organization_id
from HR_ORGANIZATION_UNITS o1
, HR_ORGANIZATION_INFORMATION hoi1
, HR_ORGANIZATION_INFORMATION hoi2
, HR_ORGANIZATION_INFORMATION hoi3
WHERE o1.business_group_id =l_business_group_id
and hoi1.organization_id = o1.organization_id
and hoi1.org_information1 = 'SE_LOCAL_UNIT'
and hoi1.org_information_context = 'CLASS'
and o1.organization_id = hoi2.org_information1
and hoi2.ORG_INFORMATION_CONTEXT='SE_LOCAL_UNITS'
and hoi2.organization_id = hoi3.organization_id
and hoi3.ORG_INFORMATION_CONTEXT='CLASS'
and hoi3.org_information1 = 'HR_LEGAL_EMPLOYER'
AND hoi3.organization_id = p_organization_id);
select count(hoi2.org_information1)
from HR_ALL_ORGANIZATION_UNITS o1
, HR_ORGANIZATION_INFORMATION hoi1
, HR_ORGANIZATION_INFORMATION hoi2
, HR_ORGANIZATION_INFORMATION hoi3
, HR_ORGANIZATION_INFORMATION hoi4
, HR_ORGANIZATION_INFORMATION hoi5
WHERE o1.business_group_id =l_business_group_id
and hoi1.organization_id = o1.organization_id
and hoi1.org_information1 = 'SE_LOCAL_UNIT'
and hoi1.org_information_context = 'CLASS'
and o1.organization_id = hoi2.organization_id
and hoi2.organization_id <> p_org_information1
and hoi2.ORG_INFORMATION_CONTEXT='SE_LOCAL_UNIT_DETAILS'
and o1.organization_id = hoi3.org_information1
and hoi3.ORG_INFORMATION_CONTEXT='SE_LOCAL_UNITS'
and hoi3.organization_id = hoi4.organization_id
and hoi4.ORG_INFORMATION_CONTEXT='CLASS'
and hoi4.org_information1 = 'HR_LEGAL_EMPLOYER'
AND hoi4.organization_id = p_organization_id
and hoi5.organization_id = p_org_information1
and hoi5.ORG_INFORMATION_CONTEXT='SE_LOCAL_UNIT_DETAILS'
and hoi2.org_information1 = hoi5.org_information1;
select count(hoi1.org_information1)
from HR_ALL_ORGANIZATION_UNITS o1
, HR_ORGANIZATION_INFORMATION hoi1
, HR_ORGANIZATION_INFORMATION hoi2
WHERE o1.business_group_id =l_business_group_id
and o1.organization_id=hoi1.organization_id
and hoi1.ORG_INFORMATION_CONTEXT='CLASS'
and hoi1.org_information1 = 'HR_LEGAL_EMPLOYER'
and hoi2.ORG_INFORMATION_CONTEXT='SE_TAX_DECLARATION_DETAILS'
and hoi2.organization_id = hoi1.organization_id
and hoi2.org_information1=l_param1
and hoi2.org_information2=l_param2
and hoi2.organization_id = p_organization_id;
select count(hoi1.org_information1)
from HR_ALL_ORGANIZATION_UNITS o1
, HR_ORGANIZATION_INFORMATION hoi1
, HR_ORGANIZATION_INFORMATION hoi2
WHERE o1.business_group_id =l_business_group_id
and o1.organization_id=hoi1.organization_id
and hoi1.ORG_INFORMATION_CONTEXT='CLASS'
and hoi1.org_information1 = 'HR_LEGAL_EMPLOYER'
and hoi2.ORG_INFORMATION_CONTEXT='SE_ABSENCE_CATEGORY_LIMIT'
and hoi2.organization_id = hoi1.organization_id
and hoi2.org_information1=l_param1
and hoi2.organization_id = p_organization_id;
select count(hoi2.org_information2)
from HR_ALL_ORGANIZATION_UNITS o1
, HR_ORGANIZATION_INFORMATION hoi1
, HR_ORGANIZATION_INFORMATION hoi2
WHERE o1.business_group_id =l_business_group_id
and hoi1.organization_id = o1.organization_id
and hoi1.org_information_context = 'CLASS'
and hoi1.org_information1 = 'HR_LEGAL_EMPLOYER'
and o1.organization_id = hoi2.organization_id
and hoi1.organization_id = hoi2.organization_id
and hoi2.ORG_INFORMATION_CONTEXT='SE_LEGAL_EMPLOYER_DETAILS'
and hoi2.org_information2 = p_org_information2;
select hoi2.org_information6
from HR_ALL_ORGANIZATION_UNITS o1
, HR_ORGANIZATION_INFORMATION hoi1
, HR_ORGANIZATION_INFORMATION hoi2
WHERE o1.business_group_id =l_business_group_id
and hoi1.organization_id = o1.organization_id
and hoi1.org_information1 = 'SE_LOCAL_UNIT'
and hoi1.org_information_context = 'CLASS'
and o1.organization_id = hoi2.organization_id
and hoi1.organization_id = hoi2.organization_id
and o1.organization_id = p_org_information1
and hoi2.ORG_INFORMATION_CONTEXT='SE_LOCAL_UNIT_DETAILS';
SELECT COUNT(*)
FROM hr_organization_information hoi, hr_all_organization_units ou
WHERE (hoi.org_information_context = 'SE_COMPANY_MILEAGE_RATES')
AND ou.organization_id = hoi.organization_id
AND ou.organization_id = nvl(p_organization_id , 0)
AND ou.business_group_id = l_business_group_id
AND (( fnd_date.canonical_to_date(p_org_information4) between fnd_date.canonical_to_date(hoi.org_information4) AND
nvl(fnd_date.canonical_to_date(hoi.org_information5),to_date('31/12/4712','DD/MM/YYYY')))
OR ( nvl(fnd_date.canonical_to_date(p_org_information5),to_date('31/12/4712','DD/MM/YYYY')) between fnd_date.canonical_to_date(hoi.org_information4) AND
nvl(fnd_date.canonical_to_date(hoi.org_information5),to_date('31/12/4712','DD/MM/YYYY')))
OR ( fnd_date.canonical_to_date(hoi.org_information4) between fnd_date.canonical_to_date(p_org_information4) AND
nvl(fnd_date.canonical_to_date(p_org_information5),to_date('31/12/4712','DD/MM/YYYY')))
OR ( nvl(fnd_date.canonical_to_date(hoi.org_information4),to_date('31/12/4712','DD/MM/YYYY')) between fnd_date.canonical_to_date(p_org_information4) AND
nvl(fnd_date.canonical_to_date(p_org_information5),to_date('31/12/4712','DD/MM/YYYY'))));
SELECT nvl(global_value,0) FROM ff_globals_f,
FND_SESSIONS s
WHERE GLOBAL_NAME=csr_v_global --'SE_EMPLOYER_TAX_PERC'
AND legislation_code='SE'
and s.effective_date --p_effective_date
BETWEEN effective_start_date AND
effective_end_date
AND s.session_id=userenv('sessionid');
SELECT
trim(meaning)
FROM hr_lookups
WHERE lookup_type='SE_AGREEMENT_CODE'
AND lookup_code=TRIM(csr_v_lookup_code);
SELECT count(*)
FROM hr_organization_information hoi, hr_organization_units ou, fnd_sessions s
WHERE hoi.org_information_context = 'SE_STD_WORK_DETAILS'
AND ou.organization_id = hoi.organization_id
AND ou.organization_id = nvl (p_organization_id, 0)
AND ou.business_group_id = l_business_group_id
AND hoi.org_information1 = p_org_information1
AND s.session_id = userenv ('sessionid')
AND s.effective_date BETWEEN ou.date_from AND nvl (ou.date_to, TO_DATE ('31/12/4712', 'DD/MM/YYYY'));
WHEN INVALID_UPDATE
THEN
fnd_message.set_name('PAY', 'HR_377241_SE_INVALID_UPDATE');
PROCEDURE validate_update_org_inf
(p_org_info_type_code IN VARCHAR2
,p_org_information_id IN NUMBER
,p_org_information1 IN VARCHAR2 DEFAULT null
,p_org_information2 IN VARCHAR2 DEFAULT null
,p_org_information3 IN VARCHAR2 DEFAULT null
,p_org_information4 IN VARCHAR2 DEFAULT null
,p_org_information5 IN VARCHAR2 DEFAULT null
,p_org_information6 IN VARCHAR2 DEFAULT null
,p_org_information7 IN VARCHAR2 DEFAULT null
,p_org_information8 IN VARCHAR2 DEFAULT null
,p_org_information9 IN VARCHAR2 DEFAULT null
,p_org_information10 IN VARCHAR2 DEFAULT NULL
,p_org_information11 IN VARCHAR2 DEFAULT NULL
,p_org_information12 IN VARCHAR2 DEFAULT NULL
,p_org_information13 IN VARCHAR2 DEFAULT NULL
,p_org_information14 IN VARCHAR2 DEFAULT NULL
,p_org_information15 IN VARCHAR2 DEFAULT NULL
,p_org_information16 IN VARCHAR2 DEFAULT null
) IS
l_count NUMBER ;
INVALID_UPDATE EXCEPTION;
SELECT business_group_id
FROM hr_all_organization_units
where organization_id = l_organization_id;
SELECT organization_id
FROM hr_organization_information
WHERE org_information_id = p_org_information_id;
SELECT o.organization_id
FROM hr_organization_units o , hr_organization_information hoi , FND_SESSIONS s
WHERE o.organization_id = hoi.organization_id
AND hoi.org_information_context = 'CLASS'
AND hoi.org_information1 = 'SE_LOCAL_UNIT'
AND to_char(o.organization_id) IN
(
SELECT hoinf.org_information1
FROM hr_organization_units org, hr_organization_information hoinf
WHERE org.business_group_id = l_business_group_id
AND org.organization_id = hoinf.organization_id
AND org.organization_id <> l_organization_id
AND hoinf.org_information_context = 'SE_LOCAL_UNITS'
)
AND s.session_id = userenv('sessionid')
AND s.effective_date between o.date_from and nvl(o.date_to,to_date('31/12/4712','DD/MM/YYYY'))
ORDER BY o.name;
CURSOR orglocalunit IS select o.organization_id
from hr_organization_units o ,
hr_organization_information hoi,
hr_organization_information hoinf,
FND_SESSIONS s
where o.organization_id = hoi.organization_id
and o.business_group_id = l_business_group_id
and hoi.org_information_context = 'CLASS'
and hoi.org_information1 = 'SE_LOCAL_UNIT'
and hoinf.org_information_context = 'SE_LOCAL_UNITS'
AND hoinf.organization_id <> l_organization_id
and to_char(o.organization_id) = hoinf.org_information1
and s.session_id = userenv('sessionid')
and s.effective_date between o.date_from and nvl(o.date_to,to_date('31/12/4712','DD/MM/YYYY'))
ORDER BY o.name;
select count(hoi2.org_information1)
from HR_ORGANIZATION_UNITS o1
, HR_ORGANIZATION_INFORMATION hoi1
, HR_ORGANIZATION_INFORMATION hoi2
WHERE o1.business_group_id =l_business_group_id
and hoi1.organization_id = o1.organization_id
and hoi1.org_information1 = 'SE_LOCAL_UNIT'
and hoi1.org_information_context = 'CLASS'
and o1.organization_id = hoi2.organization_id
and hoi2.org_information1 = p_org_information1
and hoi2.organization_id <> l_organization_id
and hoi2.ORG_INFORMATION_CONTEXT='SE_LOCAL_UNIT_DETAILS'
and hoi1.organization_id in
(select hoi1.organization_id
from HR_ORGANIZATION_UNITS o1
, HR_ORGANIZATION_INFORMATION hoi1
, HR_ORGANIZATION_INFORMATION hoi2
, HR_ORGANIZATION_INFORMATION hoi3
WHERE o1.business_group_id =l_business_group_id
and hoi1.organization_id = o1.organization_id
and hoi1.org_information1 = 'SE_LOCAL_UNIT'
and hoi1.org_information_context = 'CLASS'
and o1.organization_id = hoi2.org_information1
and hoi2.ORG_INFORMATION_CONTEXT='SE_LOCAL_UNITS'
and hoi2.organization_id = hoi3.organization_id
and hoi3.ORG_INFORMATION_CONTEXT='CLASS'
and hoi3.org_information1 = 'HR_LEGAL_EMPLOYER'
AND hoi3.organization_id IN
(select hoi3.organization_id
from HR_ORGANIZATION_UNITS o1
, HR_ORGANIZATION_INFORMATION hoi1
, HR_ORGANIZATION_INFORMATION hoi2
, HR_ORGANIZATION_INFORMATION hoi3
WHERE o1.business_group_id =l_business_group_id
and hoi1.organization_id = o1.organization_id
and hoi1.organization_id = l_organization_id
and hoi1.org_information1 = 'SE_LOCAL_UNIT'
and hoi1.org_information_context = 'CLASS'
and o1.organization_id = hoi2.org_information1
and hoi2.ORG_INFORMATION_CONTEXT='SE_LOCAL_UNITS'
and hoi2.organization_id = hoi3.organization_id
and hoi3.ORG_INFORMATION_CONTEXT='CLASS'
and hoi3.org_information1 = 'HR_LEGAL_EMPLOYER' ) );
select hoi3.organization_id
from HR_ALL_ORGANIZATION_UNITS o1
, HR_ORGANIZATION_INFORMATION hoi1
, HR_ORGANIZATION_INFORMATION hoi2
, HR_ORGANIZATION_INFORMATION hoi3
WHERE o1.business_group_id =l_business_group_id
and hoi1.organization_id = o1.organization_id
and hoi1.organization_id = l_organization_id
and hoi1.org_information1 = 'SE_LOCAL_UNIT'
and hoi1.org_information_context = 'CLASS'
and o1.organization_id = hoi2.org_information1
and hoi2.ORG_INFORMATION_CONTEXT='SE_LOCAL_UNITS'
and hoi2.organization_id = hoi3.organization_id
and hoi3.ORG_INFORMATION_CONTEXT='CLASS'
and hoi3.org_information1 = 'HR_LEGAL_EMPLOYER';
select count(hoi2.org_information1)
from HR_ALL_ORGANIZATION_UNITS o1
, HR_ORGANIZATION_INFORMATION hoi1
, HR_ORGANIZATION_INFORMATION hoi2
, HR_ORGANIZATION_INFORMATION hoi3
, HR_ORGANIZATION_INFORMATION hoi4
WHERE o1.business_group_id =l_business_group_id
and hoi1.organization_id = o1.organization_id
and hoi1.org_information1 = 'SE_LOCAL_UNIT'
and hoi1.org_information_context = 'CLASS'
and o1.organization_id = hoi2.organization_id
and hoi2.org_information1 = p_org_information1
and hoi2.organization_id <> l_organization_id
and hoi2.ORG_INFORMATION_CONTEXT='SE_LOCAL_UNIT_DETAILS'
and hoi2.organization_id = hoi4.org_information1
and hoi3.ORG_INFORMATION_CONTEXT='CLASS'
and hoi3.org_information1 = 'HR_LEGAL_EMPLOYER'
and hoi4.ORG_INFORMATION_CONTEXT='SE_LOCAL_UNITS'
and hoi4.organization_id = hoi3.organization_id
and hoi4.organization_id = L_LEGAL_EMPLOYER;
select count(hoi2.org_information6)
from HR_ORGANIZATION_UNITS o1
, HR_ORGANIZATION_INFORMATION hoi1
, HR_ORGANIZATION_INFORMATION hoi2
WHERE o1.business_group_id =l_business_group_id
and hoi1.organization_id = o1.organization_id
and hoi1.org_information1 = 'SE_LOCAL_UNIT'
and hoi1.org_information_context = 'CLASS'
and o1.organization_id = hoi2.organization_id
and hoi2.org_information6 = 'Y'
and hoi2.organization_id <> l_organization_id
and hoi2.ORG_INFORMATION_CONTEXT='SE_LOCAL_UNIT_DETAILS'
and hoi1.organization_id in
(select hoi1.organization_id
from HR_ORGANIZATION_UNITS o1
, HR_ORGANIZATION_INFORMATION hoi1
, HR_ORGANIZATION_INFORMATION hoi2
, HR_ORGANIZATION_INFORMATION hoi3
WHERE o1.business_group_id =l_business_group_id
and hoi1.organization_id = o1.organization_id
and hoi1.org_information1 = 'SE_LOCAL_UNIT'
and hoi1.org_information_context = 'CLASS'
and o1.organization_id = hoi2.org_information1
and hoi2.ORG_INFORMATION_CONTEXT='SE_LOCAL_UNITS'
and hoi2.organization_id = hoi3.organization_id
and hoi3.ORG_INFORMATION_CONTEXT='CLASS'
and hoi3.org_information1 = 'HR_LEGAL_EMPLOYER'
AND hoi3.organization_id IN
(select hoi3.organization_id
from HR_ORGANIZATION_UNITS o1
, HR_ORGANIZATION_INFORMATION hoi1
, HR_ORGANIZATION_INFORMATION hoi2
, HR_ORGANIZATION_INFORMATION hoi3
WHERE o1.business_group_id =l_business_group_id
and hoi1.organization_id = o1.organization_id
and hoi1.organization_id = l_organization_id
and hoi1.org_information1 = 'SE_LOCAL_UNIT'
and hoi1.org_information_context = 'CLASS'
and o1.organization_id = hoi2.org_information1
and hoi2.ORG_INFORMATION_CONTEXT='SE_LOCAL_UNITS'
and hoi2.organization_id = hoi3.organization_id
and hoi3.ORG_INFORMATION_CONTEXT='CLASS'
and hoi3.org_information1 = 'HR_LEGAL_EMPLOYER' ) );
select count(hoi2.org_information6)
from HR_ALL_ORGANIZATION_UNITS o1
, HR_ORGANIZATION_INFORMATION hoi1
, HR_ORGANIZATION_INFORMATION hoi2
, HR_ORGANIZATION_INFORMATION hoi3
, HR_ORGANIZATION_INFORMATION hoi4
WHERE o1.business_group_id =l_business_group_id
and hoi1.organization_id = o1.organization_id
and hoi1.org_information1 = 'SE_LOCAL_UNIT'
and hoi1.org_information_context = 'CLASS'
and o1.organization_id = hoi2.organization_id
and hoi2.org_information6 = 'Y'
and hoi2.organization_id <> l_organization_id
and hoi2.ORG_INFORMATION_CONTEXT='SE_LOCAL_UNIT_DETAILS'
and hoi2.organization_id = hoi4.org_information1
and hoi3.ORG_INFORMATION_CONTEXT='CLASS'
and hoi3.org_information1 = 'HR_LEGAL_EMPLOYER'
and hoi4.ORG_INFORMATION_CONTEXT='SE_LOCAL_UNITS'
and hoi4.organization_id = hoi3.organization_id
and hoi4.organization_id = L_LEGAL_EMPLOYER;
select count(hoi2.org_information6)
from HR_ORGANIZATION_UNITS o1
, HR_ORGANIZATION_INFORMATION hoi1
, HR_ORGANIZATION_INFORMATION hoi2
WHERE o1.business_group_id =l_business_group_id
and hoi1.organization_id = o1.organization_id
and hoi1.org_information1 = 'SE_LOCAL_UNIT'
and hoi1.org_information_context = 'CLASS'
and o1.organization_id = hoi2.organization_id
and hoi2.org_information6 = 'Y'
and hoi2.organization_id <> P_ORG_INFORMATION1
and hoi2.ORG_INFORMATION_CONTEXT='SE_LOCAL_UNIT_DETAILS'
and hoi1.organization_id in
(select hoi1.organization_id
from HR_ORGANIZATION_UNITS o1
, HR_ORGANIZATION_INFORMATION hoi1
, HR_ORGANIZATION_INFORMATION hoi2
, HR_ORGANIZATION_INFORMATION hoi3
WHERE o1.business_group_id =l_business_group_id
and hoi1.organization_id = o1.organization_id
and hoi1.org_information1 = 'SE_LOCAL_UNIT'
and hoi1.org_information_context = 'CLASS'
and o1.organization_id = hoi2.org_information1
and hoi2.ORG_INFORMATION_CONTEXT='SE_LOCAL_UNITS'
and hoi2.organization_id = hoi3.organization_id
and hoi3.ORG_INFORMATION_CONTEXT='CLASS'
and hoi3.org_information1 = 'HR_LEGAL_EMPLOYER'
and hoi2.org_information_id <> p_org_information_id
AND hoi3.organization_id = l_organization_id );*/
CURSOR main_lc_le IS select count(hoi2.org_information6)
from HR_ALL_ORGANIZATION_UNITS o1
, HR_ORGANIZATION_INFORMATION hoi1
, HR_ORGANIZATION_INFORMATION hoi2
, HR_ORGANIZATION_INFORMATION hoi3
, HR_ORGANIZATION_INFORMATION hoi4
WHERE o1.business_group_id =l_business_group_id
and hoi1.organization_id = o1.organization_id
and hoi1.org_information1 = 'SE_LOCAL_UNIT'
and hoi1.org_information_context = 'CLASS'
and o1.organization_id = hoi2.organization_id
and hoi2.org_information6 = 'Y'
and hoi2.organization_id <> P_ORG_INFORMATION1
and hoi2.ORG_INFORMATION_CONTEXT='SE_LOCAL_UNIT_DETAILS'
and o1.organization_id = hoi3.org_information1
and hoi3.ORG_INFORMATION_CONTEXT='SE_LOCAL_UNITS'
and hoi3.org_information_id <> p_org_information_id
and hoi3.organization_id = hoi4.organization_id
and hoi4.ORG_INFORMATION_CONTEXT='CLASS'
and hoi4.org_information1 = 'HR_LEGAL_EMPLOYER'
AND hoi4.organization_id = l_organization_id ;
select count(hoi2.org_information1)
from HR_ORGANIZATION_UNITS o1
, HR_ORGANIZATION_INFORMATION hoi1
, HR_ORGANIZATION_INFORMATION hoi2
WHERE o1.business_group_id =l_business_group_id
and hoi1.organization_id = o1.organization_id
and hoi1.org_information1 = 'SE_LOCAL_UNIT'
and hoi1.org_information_context = 'CLASS'
and o1.organization_id = hoi2.organization_id
and hoi2.organization_id <> P_ORG_INFORMATION1
and hoi2.ORG_INFORMATION_CONTEXT='SE_LOCAL_UNIT_DETAILS'
and hoi2.org_information1 in
(select hoi2.org_information1
from HR_ORGANIZATION_UNITS o1
, HR_ORGANIZATION_INFORMATION hoi1
, HR_ORGANIZATION_INFORMATION hoi2
WHERE o1.business_group_id =l_business_group_id
and hoi1.organization_id = o1.organization_id
and hoi1.org_information1 = 'SE_LOCAL_UNIT'
and hoi1.org_information_context = 'CLASS'
and o1.organization_id = hoi2.organization_id
and hoi2.organization_id = P_ORG_INFORMATION1
and hoi2.ORG_INFORMATION_CONTEXT='SE_LOCAL_UNIT_DETAILS'
)
and hoi1.organization_id in
(select hoi1.organization_id
from HR_ORGANIZATION_UNITS o1
, HR_ORGANIZATION_INFORMATION hoi1
, HR_ORGANIZATION_INFORMATION hoi2
, HR_ORGANIZATION_INFORMATION hoi3
WHERE o1.business_group_id =l_business_group_id
and hoi1.organization_id = o1.organization_id
and hoi1.org_information1 = 'SE_LOCAL_UNIT'
and hoi1.org_information_context = 'CLASS'
and o1.organization_id = hoi2.org_information1
and hoi2.ORG_INFORMATION_CONTEXT='SE_LOCAL_UNITS'
and hoi2.organization_id = hoi3.organization_id
and hoi3.ORG_INFORMATION_CONTEXT='CLASS'
and hoi3.org_information1 = 'HR_LEGAL_EMPLOYER'
and hoi2.org_information_id <> p_org_information_id
AND hoi3.organization_id = l_organization_id);
select count(hoi2.org_information1)
from HR_ALL_ORGANIZATION_UNITS o1
, HR_ORGANIZATION_INFORMATION hoi1
, HR_ORGANIZATION_INFORMATION hoi2
, HR_ORGANIZATION_INFORMATION hoi3
, HR_ORGANIZATION_INFORMATION hoi4
, HR_ORGANIZATION_INFORMATION hoi5
WHERE o1.business_group_id =l_business_group_id
and hoi1.organization_id = o1.organization_id
and hoi1.org_information1 = 'SE_LOCAL_UNIT'
and hoi1.org_information_context = 'CLASS'
and o1.organization_id = hoi2.organization_id
and hoi2.organization_id <> p_org_information1
and hoi2.ORG_INFORMATION_CONTEXT='SE_LOCAL_UNIT_DETAILS'
and o1.organization_id = hoi3.org_information1
and hoi3.ORG_INFORMATION_CONTEXT='SE_LOCAL_UNITS'
and hoi3.org_information_id <> p_org_information_id
and hoi3.organization_id = hoi4.organization_id
and hoi4.ORG_INFORMATION_CONTEXT='CLASS'
and hoi4.org_information1 = 'HR_LEGAL_EMPLOYER'
AND hoi4.organization_id = l_organization_id
and to_char(hoi5.organization_id) = p_org_information1
and hoi5.ORG_INFORMATION_CONTEXT='SE_LOCAL_UNIT_DETAILS'
and hoi2.org_information1 = hoi5.org_information1;
select count(hoi1.org_information1)
from HR_ALL_ORGANIZATION_UNITS o1
,HR_ORGANIZATION_INFORMATION hoi1
,HR_ORGANIZATION_INFORMATION hoi2
WHERE o1.business_group_id =l_business_group_id
and o1.organization_id=hoi1.organization_id
and hoi1.ORG_INFORMATION_CONTEXT='CLASS'
and hoi1.org_information1 = 'HR_LEGAL_EMPLOYER'
and hoi2.ORG_INFORMATION_CONTEXT='SE_TAX_DECLARATION_DETAILS'
and hoi2.organization_id = hoi1.organization_id
and hoi2.org_information1=l_param1
and hoi2.org_information2=l_param2
and hoi2.organization_id = l_organization_id
and hoi2.org_information_id <> p_org_information_id;
select count(hoi1.org_information1)
from HR_ALL_ORGANIZATION_UNITS o1
,HR_ORGANIZATION_INFORMATION hoi1
,HR_ORGANIZATION_INFORMATION hoi2
WHERE o1.business_group_id =l_business_group_id
and o1.organization_id=hoi1.organization_id
and hoi1.ORG_INFORMATION_CONTEXT='CLASS'
and hoi1.org_information1 = 'HR_LEGAL_EMPLOYER'
and hoi2.ORG_INFORMATION_CONTEXT='SE_ABSENCE_CATEGORY_LIMIT'
and hoi2.organization_id = hoi1.organization_id
and hoi2.org_information1=l_param1
and hoi2.organization_id = l_organization_id
and hoi2.org_information_id <> p_org_information_id;
select count(hoi2.org_information2)
from HR_ALL_ORGANIZATION_UNITS o1
, HR_ORGANIZATION_INFORMATION hoi1
, HR_ORGANIZATION_INFORMATION hoi2
WHERE o1.business_group_id =l_business_group_id
and hoi1.organization_id = o1.organization_id
and hoi1.org_information1 = 'HR_LEGAL_EMPLOYER'
and hoi1.org_information_context = 'CLASS'
and o1.organization_id = hoi2.organization_id
and hoi1.organization_id = hoi2.organization_id
and hoi2.org_information2 = p_org_information2
and o1.organization_id <> l_organization_id
and hoi2.ORG_INFORMATION_CONTEXT='SE_LEGAL_EMPLOYER_DETAILS';
select hoi2.org_information6
from HR_ALL_ORGANIZATION_UNITS o1
, HR_ORGANIZATION_INFORMATION hoi1
, HR_ORGANIZATION_INFORMATION hoi2
WHERE o1.business_group_id =l_business_group_id
and hoi1.organization_id = o1.organization_id
and hoi1.org_information1 = 'SE_LOCAL_UNIT'
and hoi1.org_information_context = 'CLASS'
and o1.organization_id = hoi2.organization_id
and hoi1.organization_id = hoi2.organization_id
and o1.organization_id = p_org_information1
and hoi2.ORG_INFORMATION_CONTEXT='SE_LOCAL_UNIT_DETAILS';
SELECT COUNT(*)
FROM hr_organization_information hoi, hr_all_organization_units ou
WHERE (hoi.org_information_context = 'SE_COMPANY_MILEAGE_RATES')
AND ou.organization_id = hoi.organization_id
AND ou.organization_id = nvl(l_organization_id , 0)
AND ou.business_group_id = l_business_group_id
AND (( fnd_date.canonical_to_date(p_org_information4) between fnd_date.canonical_to_date(hoi.org_information4) AND
nvl(fnd_date.canonical_to_date(hoi.org_information5),to_date('31/12/4712','DD/MM/YYYY')))
OR ( nvl(fnd_date.canonical_to_date(p_org_information5),to_date('31/12/4712','DD/MM/YYYY')) between fnd_date.canonical_to_date(hoi.org_information4) AND
nvl(fnd_date.canonical_to_date(hoi.org_information5),to_date('31/12/4712','DD/MM/YYYY')))
OR ( fnd_date.canonical_to_date(hoi.org_information4) between fnd_date.canonical_to_date(p_org_information4) AND
nvl(fnd_date.canonical_to_date(p_org_information5),to_date('31/12/4712','DD/MM/YYYY')))
OR ( nvl(fnd_date.canonical_to_date(hoi.org_information5),to_date('31/12/4712','DD/MM/YYYY')) between fnd_date.canonical_to_date(p_org_information4) AND
nvl(fnd_date.canonical_to_date(p_org_information5),to_date('31/12/4712','DD/MM/YYYY'))))
AND hoi.org_information_id <> p_org_information_id ;
SELECT ORG_INFORMATION1,ORG_INFORMATION2,
ORG_INFORMATION3,ORG_INFORMATION4
FROM hr_organization_information
WHERE org_information_id=p_org_information_id;
SELECT nvl(global_value,0) FROM ff_globals_f,
FND_SESSIONS s
WHERE GLOBAL_NAME=csr_v_global --'SE_EMPLOYER_TAX_PERC'
AND legislation_code='SE'
and s.effective_date --p_effective_date
BETWEEN effective_start_date AND
effective_end_date
AND s.session_id=userenv('sessionid');
SELECT
trim(meaning)
FROM hr_lookups
WHERE lookup_type='SE_AGREEMENT_CODE'
AND lookup_code=TRIM(csr_v_lookup_code);
SELECT count(*)
FROM hr_organization_information hoi, hr_organization_units ou, fnd_sessions s
WHERE hoi.org_information_context = 'SE_STD_WORK_DETAILS'
AND ou.organization_id = hoi.organization_id
AND ou.organization_id = nvl (l_organization_id, 0)
AND ou.business_group_id = l_business_group_id
AND hoi.org_information1 = p_org_information1
AND hoi.org_information_id <> p_org_information_id
AND s.session_id = userenv ('sessionid')
AND s.effective_date BETWEEN ou.date_from AND nvl (ou.date_to, TO_DATE ('31/12/4712', 'DD/MM/YYYY'));
Raise INVALID_UPDATE;
WHEN INVALID_UPDATE
THEN
fnd_message.set_name('PAY', 'HR_377241_SE_INVALID_UPDATE');
END validate_update_org_inf;
SELECT INTERNAL_EXTERNAL_FLAG
FROM HR_all_ORGANIZATION_UNITS
WHERE ORGANIZATION_ID = P_ORGANIZATION_ID;
PROCEDURE UPDATE_ASG_VALIDATE
(
p_segment5 IN VARCHAR2
,p_segment6 IN VARCHAR2
) IS
VALID_NOTIFY_DATE EXCEPTION ;
END UPDATE_ASG_VALIDATE ;