22:
23: cursor c_noaccess_list (p_id Varchar2) IS
24: Select haotl.name organization_name,
25: pap.full_name manager_name,
26: fnd_date.canonical_to_date(cm.ORG_INFORMATION3) start_Date,
27: fnd_date.canonical_to_date(cm.ORG_INFORMATION4) end_Date,
28: decode((decode(decode(HR_SECURITY.VIEW_ALL ,'Y' , 'TRUE', HR_SECURITY.SHOW_RECORD('HR_ALL_ORGANIZATION_UNITS', HAO.ORGANIZATION_ID)
29: ),'TRUE',0,1)+ decode(decode(hr_general.get_xbg_profile,'Y', hao.business_group_id , hr_general.get_business_group_id),hao.business_group_id,0,1)
30: + decode(decode(HR_SECURITY.VIEW_ALL ,'Y' , 'TRUE', HR_SECURITY.SHOW_RECORD('PER_ALL_PEOPLE_F', PAP.PERSON_ID, PAP.PERSON_TYPE_ID, PAP.EMPLOYEE_NUMBER,PAP.APPLICANT_NUMBER)
23: cursor c_noaccess_list (p_id Varchar2) IS
24: Select haotl.name organization_name,
25: pap.full_name manager_name,
26: fnd_date.canonical_to_date(cm.ORG_INFORMATION3) start_Date,
27: fnd_date.canonical_to_date(cm.ORG_INFORMATION4) end_Date,
28: decode((decode(decode(HR_SECURITY.VIEW_ALL ,'Y' , 'TRUE', HR_SECURITY.SHOW_RECORD('HR_ALL_ORGANIZATION_UNITS', HAO.ORGANIZATION_ID)
29: ),'TRUE',0,1)+ decode(decode(hr_general.get_xbg_profile,'Y', hao.business_group_id , hr_general.get_business_group_id),hao.business_group_id,0,1)
30: + decode(decode(HR_SECURITY.VIEW_ALL ,'Y' , 'TRUE', HR_SECURITY.SHOW_RECORD('PER_ALL_PEOPLE_F', PAP.PERSON_ID, PAP.PERSON_TYPE_ID, PAP.EMPLOYEE_NUMBER,PAP.APPLICANT_NUMBER)
31: ),'TRUE',0,1) + decode(decode(hr_general.get_xbg_profile,'Y',pap.business_group_id , hr_general.get_business_group_id),pap.business_group_id,0,1)),0,'Y','N') hasUpdateAccess
57: and s.transaction_step_id = v.transaction_step_id
58: and v.name = 'P_ORGANIZATION_ID'
59: and v.number_value = hao.organization_id
60: and rownum < 2)
61: and (nvl(fnd_date.canonical_to_date(cm.ORG_INFORMATION4),sysdate) >= sysdate
62: Or (fnd_date.canonical_to_date(cm.ORG_INFORMATION4) <= sysdate
63: and fnd_date.canonical_to_date(cm.ORG_INFORMATION3)
64: = (select max(fnd_date.canonical_to_date(oi.ORG_INFORMATION3))
65: from hr_organization_information oi
58: and v.name = 'P_ORGANIZATION_ID'
59: and v.number_value = hao.organization_id
60: and rownum < 2)
61: and (nvl(fnd_date.canonical_to_date(cm.ORG_INFORMATION4),sysdate) >= sysdate
62: Or (fnd_date.canonical_to_date(cm.ORG_INFORMATION4) <= sysdate
63: and fnd_date.canonical_to_date(cm.ORG_INFORMATION3)
64: = (select max(fnd_date.canonical_to_date(oi.ORG_INFORMATION3))
65: from hr_organization_information oi
66: where oi.org_information_context = 'Organization Name Alias'
59: and v.number_value = hao.organization_id
60: and rownum < 2)
61: and (nvl(fnd_date.canonical_to_date(cm.ORG_INFORMATION4),sysdate) >= sysdate
62: Or (fnd_date.canonical_to_date(cm.ORG_INFORMATION4) <= sysdate
63: and fnd_date.canonical_to_date(cm.ORG_INFORMATION3)
64: = (select max(fnd_date.canonical_to_date(oi.ORG_INFORMATION3))
65: from hr_organization_information oi
66: where oi.org_information_context = 'Organization Name Alias'
67: and oi.organization_id = cm.organization_id)));
60: and rownum < 2)
61: and (nvl(fnd_date.canonical_to_date(cm.ORG_INFORMATION4),sysdate) >= sysdate
62: Or (fnd_date.canonical_to_date(cm.ORG_INFORMATION4) <= sysdate
63: and fnd_date.canonical_to_date(cm.ORG_INFORMATION3)
64: = (select max(fnd_date.canonical_to_date(oi.ORG_INFORMATION3))
65: from hr_organization_information oi
66: where oi.org_information_context = 'Organization Name Alias'
67: and oi.organization_id = cm.organization_id)));
68:
284: ,p_org_information_id => p_ccmgr_rec.org_information_id
285: ,p_org_info_type_code => 'Organization Name Alias'
286: ,p_org_information1 => p_ccmgr_rec.org_information1
287: ,p_org_information2 => l_manager_id
288: ,p_org_information3 => fnd_date.date_to_canonical(l_start_date)
289: ,p_org_information4 => fnd_date.date_to_canonical(l_end_date)
290: ,p_org_information5 => Null
291: ,p_org_information6 => Null
292: ,p_org_information7 => Null
285: ,p_org_info_type_code => 'Organization Name Alias'
286: ,p_org_information1 => p_ccmgr_rec.org_information1
287: ,p_org_information2 => l_manager_id
288: ,p_org_information3 => fnd_date.date_to_canonical(l_start_date)
289: ,p_org_information4 => fnd_date.date_to_canonical(l_end_date)
290: ,p_org_information5 => Null
291: ,p_org_information6 => Null
292: ,p_org_information7 => Null
293: ,p_org_information8 => Null
317: ,p_organization_id => p_ccmgr_rec.organization_id
318: ,p_org_info_type_code => 'Organization Name Alias'
319: ,p_org_information1 => p_ccmgr_rec.org_information1
320: ,p_org_information2 => p_ccmgr_rec.manager_id
321: ,p_org_information3 => fnd_date.date_to_canonical(p_ccmgr_rec.start_date)
322: ,p_org_information4 => fnd_date.date_to_canonical(p_ccmgr_rec.end_date)
323: ,p_org_information5 => Null
324: ,p_org_information6 => Null
325: ,p_org_information7 => Null
318: ,p_org_info_type_code => 'Organization Name Alias'
319: ,p_org_information1 => p_ccmgr_rec.org_information1
320: ,p_org_information2 => p_ccmgr_rec.manager_id
321: ,p_org_information3 => fnd_date.date_to_canonical(p_ccmgr_rec.start_date)
322: ,p_org_information4 => fnd_date.date_to_canonical(p_ccmgr_rec.end_date)
323: ,p_org_information5 => Null
324: ,p_org_information6 => Null
325: ,p_org_information7 => Null
326: ,p_org_information8 => Null
406: p_login_person_id := nvl(fnd_global.employee_id,p_login_person_id);
407:
408: Begin
409: hr_utility.set_location(l_proc,10);
410: l_eff_date := nvl(fnd_date.canonical_to_date(wf_engine.GetItemAttrText(p_item_key,p_item_type,'P_EFFECTIVE_DATE')),trunc(sysdate));
411: Exception when others then
412: l_eff_date := trunc(sysdate);
413: hr_utility.set_location(l_proc,555);
414: End;