DBA Data[Home] [Help]

APPS.HR_SE_VALIDATE_PKG SQL Statements

The following lines contain the word 'select', 'insert', 'update' or 'delete':

Line: 15

    SELECT 'Y'
    FROM   per_person_types ppt
    WHERE  ppt.person_type_Id = p_person_type_id
    AND    ppt.system_person_type like 'EMP%';
Line: 200

	INVALID_UPDATE					EXCEPTION;
Line: 219

	SELECT 	 business_group_id
	FROM 	 hr_all_organization_units
	WHERE 	 organization_id = p_organization_id;
Line: 224

		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;
Line: 242

	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;
Line: 259

	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'   ) );
Line: 306

		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';
Line: 324

	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;
Line: 345

	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'   ) );*/
Line: 389

	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;
Line: 411

	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 );
Line: 440

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 ;
Line: 463

	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);
Line: 505

	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;
Line: 530

			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;
Line: 545

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;
Line: 559

	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;
Line: 573

	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';
Line: 588

	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'))));
Line: 604

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');
Line: 614

SELECT
trim(meaning)
FROM hr_lookups
WHERE lookup_type='SE_AGREEMENT_CODE'
AND lookup_code=TRIM(csr_v_lookup_code);
Line: 625

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'));
Line: 941

		WHEN INVALID_UPDATE
			THEN
			fnd_message.set_name('PAY', 'HR_377241_SE_INVALID_UPDATE');
Line: 1006

 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 ;
Line: 1053

	INVALID_UPDATE					EXCEPTION;
Line: 1068

	SELECT	business_group_id
	FROM	hr_all_organization_units
	where	organization_id = l_organization_id;
Line: 1073

		SELECT	organization_id
		FROM 	hr_organization_information
		WHERE 	org_information_id = p_org_information_id;
Line: 1079

		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;
Line: 1098

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;
Line: 1115

	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'   ) );
Line: 1160

		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';
Line: 1178

	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;
Line: 1202

	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'   ) );
Line: 1247

	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;
Line: 1270

	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 );*/
Line: 1299

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 ;
Line: 1322

	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);
Line: 1365

	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;
Line: 1391

		        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;
Line: 1407

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;
Line: 1422

	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';
Line: 1437

	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';
Line: 1454

	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	;
Line: 1471

SELECT ORG_INFORMATION1,ORG_INFORMATION2,
ORG_INFORMATION3,ORG_INFORMATION4
FROM hr_organization_information
WHERE org_information_id=p_org_information_id;
Line: 1477

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');
Line: 1487

SELECT
trim(meaning)
FROM hr_lookups
WHERE lookup_type='SE_AGREEMENT_CODE'
AND lookup_code=TRIM(csr_v_lookup_code);
Line: 1497

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'));
Line: 1724

              			Raise INVALID_UPDATE;
Line: 1824

		WHEN INVALID_UPDATE
			THEN
			fnd_message.set_name('PAY', 'HR_377241_SE_INVALID_UPDATE');
Line: 1884

 END validate_update_org_inf;
Line: 1929

	SELECT	INTERNAL_EXTERNAL_FLAG
	FROM	HR_all_ORGANIZATION_UNITS
	WHERE	ORGANIZATION_ID = P_ORGANIZATION_ID;
Line: 1993

PROCEDURE  UPDATE_ASG_VALIDATE
(
 p_segment5			IN	VARCHAR2
,p_segment6			IN	VARCHAR2
 ) IS

	VALID_NOTIFY_DATE		EXCEPTION ;
Line: 2023

END UPDATE_ASG_VALIDATE ;