193: ) IS
194:
195:
196: l_org_information1 hr_organization_information.org_information1%TYPE;
197: l_organization_id hr_organization_units.organization_id%TYPE;
198: l_business_group_id hr_organization_units.business_group_id%TYPE;
199: l_org_information_id hr_organization_information.org_information_id%TYPE;
200: l_org_info_type_code hr_organization_information.org_information_context%TYPE;
201: l_org_id hr_organization_information.org_information_id%TYPE;
194:
195:
196: l_org_information1 hr_organization_information.org_information1%TYPE;
197: l_organization_id hr_organization_units.organization_id%TYPE;
198: l_business_group_id hr_organization_units.business_group_id%TYPE;
199: l_org_information_id hr_organization_information.org_information_id%TYPE;
200: l_org_info_type_code hr_organization_information.org_information_context%TYPE;
201: l_org_id hr_organization_information.org_information_id%TYPE;
202:
221: AND to_number(nvl(hoi.org_information2,'4712')));
222: --
223: cursor getbgid is
224: select business_group_id
225: from hr_organization_units
226: where organization_id = p_organization_id;
227:
228: /* Performance Bug fix 4892110 - Changed the below cursor to parameterized cursor avoiding fnd_sessions table */
229: cursor orgnum(s_eff_date date) is
226: where organization_id = p_organization_id;
227:
228: /* Performance Bug fix 4892110 - Changed the below cursor to parameterized cursor avoiding fnd_sessions table */
229: cursor orgnum(s_eff_date date) is
230: select orgif.org_information_id from hr_organization_information orgif,hr_organization_units ou
231: where ( orgif.org_information_context = 'NO_LOCAL_UNIT_DETAILS' or orgif.org_information_context = 'NO_LEGAL_EMPLOYER_DETAILS')
232: and ou.organization_id = orgif.organization_id
233: and ou.business_group_id = l_business_group_id
234: and orgif.org_information1 = p_org_information1
236:
237: /* Performance Bug fix 4892110 - Changed the below cursor to parameterized cursor avoiding fnd_sessions table */
238: cursor orglocalunit(s_eff_date date) is
239: select o.organization_id
240: from hr_organization_units o , hr_organization_information hoi
241: where o.organization_id = hoi.organization_id
242: and o.business_group_id = l_business_group_id
243: and hoi.org_information_context = 'CLASS'
244: and hoi.org_information1 = 'NO_LOCAL_UNIT'
243: and hoi.org_information_context = 'CLASS'
244: and hoi.org_information1 = 'NO_LOCAL_UNIT'
245: and to_char(o.organization_id) in (
246: select hoinf.org_information1
247: from hr_organization_units org, hr_organization_information hoinf
248: where org.business_group_id = l_business_group_id
249: and org.organization_id = hoinf.organization_id
250: and hoinf.org_information_context = 'NO_LOCAL_UNITS'
251: )
644:
645:
646: l_org_information1 hr_organization_information.org_information1%TYPE;
647: l_organization_id hr_organization_information.organization_id%TYPE;
648: l_business_group_id hr_organization_units.business_group_id%TYPE;
649: l_org_information_id hr_organization_information.org_information_id%TYPE;
650: l_org_info_type_code hr_organization_information.org_information_context%TYPE;
651: l_org_id hr_organization_information.org_information_id%TYPE;
652:
671: AND to_number(nvl(hoi.org_information2,'4712')));
672:
673: cursor getbgid is
674: select business_group_id
675: from hr_organization_units
676: where organization_id = l_organization_id;
677:
678: cursor getorgid is
679: select organization_id
680: from hr_organization_information
681: where org_information_id = p_org_information_id;
682: /* Performance Bug fix 4892110 - Changed the below cursor to parameterized cursor avoiding fnd_sessions table */
683: cursor orgnum(s_eff_date date) is
684: select orgif.org_information_id from hr_organization_information orgif,hr_organization_units ou
685: where ( orgif.org_information_context = 'NO_LOCAL_UNIT_DETAILS' or orgif.org_information_context = 'NO_LEGAL_EMPLOYER_DETAILS')
686: and ou.organization_id = orgif.organization_id
687: and ou.business_group_id = l_business_group_id
688: and orgif.org_information1 = p_org_information1
690:
691: /* Performance Bug fix 4892110 - Changed the below cursor to parameterized cursor avoiding fnd_sessions table */
692: cursor orglocalunit(s_eff_date date) is
693: select o.organization_id
694: from hr_organization_units o , hr_organization_information hoi
695: where o.organization_id = hoi.organization_id
696: and o.business_group_id = l_business_group_id
697: and hoi.org_information_context = 'CLASS'
698: and hoi.org_information1 = 'NO_LOCAL_UNIT'
697: and hoi.org_information_context = 'CLASS'
698: and hoi.org_information1 = 'NO_LOCAL_UNIT'
699: and to_char(o.organization_id) in (
700: select hoinf.org_information1
701: from hr_organization_units org, hr_organization_information hoinf
702: where org.business_group_id = l_business_group_id
703: and org.organization_id = hoinf.organization_id
704: and org.organization_id <> l_organization_id
705: and hoinf.org_information_context = 'NO_LOCAL_UNITS'
1217: (p_organization_id in number
1218: ,p_org_information1 in varchar2
1219: ) IS
1220:
1221: l_organization_id hr_organization_units.organization_id%TYPE;
1222: l_business_group_id hr_organization_units.business_group_id%TYPE;
1223: l_int_ext_flag hr_organization_units.internal_external_flag%TYPE;
1224:
1225: cursor getbgid is
1218: ,p_org_information1 in varchar2
1219: ) IS
1220:
1221: l_organization_id hr_organization_units.organization_id%TYPE;
1222: l_business_group_id hr_organization_units.business_group_id%TYPE;
1223: l_int_ext_flag hr_organization_units.internal_external_flag%TYPE;
1224:
1225: cursor getbgid is
1226: select business_group_id
1219: ) IS
1220:
1221: l_organization_id hr_organization_units.organization_id%TYPE;
1222: l_business_group_id hr_organization_units.business_group_id%TYPE;
1223: l_int_ext_flag hr_organization_units.internal_external_flag%TYPE;
1224:
1225: cursor getbgid is
1226: select business_group_id
1227: from hr_organization_units
1223: l_int_ext_flag hr_organization_units.internal_external_flag%TYPE;
1224:
1225: cursor getbgid is
1226: select business_group_id
1227: from hr_organization_units
1228: where organization_id = p_organization_id;
1229:
1230: cursor orgtype is
1231: select ou.internal_external_flag from hr_organization_units ou ,FND_SESSIONS s
1227: from hr_organization_units
1228: where organization_id = p_organization_id;
1229:
1230: cursor orgtype is
1231: select ou.internal_external_flag from hr_organization_units ou ,FND_SESSIONS s
1232: where ou.organization_id= p_organization_id
1233: and s.session_id = userenv('sessionid')
1234: and s.effective_date between ou.date_from and nvl(ou.date_to,to_date('31/12/4712','DD/MM/YYYY'));
1235:
1576: AND petei.element_type_id = p_ele_type_id ;
1577:
1578: CURSOR csr_get_le_details(p_le_id NUMBER) IS
1579: SELECT hou.name NAME
1580: FROM hr_organization_units hou
1581: ,hr_organization_information hoi
1582: WHERE hoi.organization_id = hou.organization_id
1583: AND hoi.org_information_context = 'NO_LEGAL_EMPLOYER_DETAILS'
1584: AND hou.organization_id = p_le_id;
1782: AND petei.eei_information1 = p_ele_code;
1783:
1784: CURSOR csr_get_le_details(p_le_id NUMBER) IS
1785: SELECT hou.name NAME
1786: FROM hr_organization_units hou
1787: ,hr_organization_information hoi
1788: WHERE hoi.organization_id = hou.organization_id
1789: AND hoi.org_information_context = 'NO_LEGAL_EMPLOYER_DETAILS'
1790: AND hou.organization_id = p_le_id;