116: FOR cur_loc_rec IN cur_loc LOOP
117: RETURN(cur_loc_rec.meaning);
118: END LOOP;
119: ELSE
120: hr_utility.set_message(8301, 'GHR_38596_NOT_HR_LOOKUP');
121: hr_utility.raise_error;
122: END IF;
123:
124: RETURN(NULL);
117: RETURN(cur_loc_rec.meaning);
118: END LOOP;
119: ELSE
120: hr_utility.set_message(8301, 'GHR_38596_NOT_HR_LOOKUP');
121: hr_utility.raise_error;
122: END IF;
123:
124: RETURN(NULL);
125:
145: FOR cur_loc_rec IN cur_loc LOOP
146: RETURN(cur_loc_rec.description);
147: END LOOP;
148: ELSE
149: -- cannot use hr_utility as it will violate the pragma we need therfore just return
150: -- error!! -- This shouldn't happen anyway as this procedure should only be called for
151: -- application id 800!
152: RETURN('Error: GHR_38596_NOT_HR_LOOKUP');
153: END IF;
292: RETURN VARCHAR2 IS
293: l_pos_psi_data per_position_extra_info%rowtype;
294: l_personnel_system_indicator VARCHAR2(30);
295: BEGIN
296: hr_utility.set_location('Entering get_psi',0);
297: ghr_history_fetch.fetch_positionei(
298: p_position_id => p_position_id,
299: p_information_type => 'GHR_US_POS_AFHR_DATA',
300: p_date_effective => p_effective_date,
303: l_personnel_system_indicator := l_pos_psi_data.poei_information3;
304: ELSE
305: l_personnel_system_indicator := '00';
306: END IF;
307: hr_utility.set_location('Leaving get_psi',10);
308: RETURN l_personnel_system_indicator;
309: EXCEPTION
310: WHEN OTHERS THEN
311: hr_utility.set_location('Leaving get_psi',20);
307: hr_utility.set_location('Leaving get_psi',10);
308: RETURN l_personnel_system_indicator;
309: EXCEPTION
310: WHEN OTHERS THEN
311: hr_utility.set_location('Leaving get_psi',20);
312: RAISE;
313: END get_personnel_system_indicator;
314: --
315:
1060: ,p_work_schedule => l_dummy
1061: ,p_part_time_hours => l_dummy);
1062: END IF;
1063: if p_prd is not null then
1064: hr_utility.set_location('PRD BEF TO_DATA' || l_prd,1);
1065: l_prd := p_prd;
1066: hr_utility.set_location('PRD AFT TO_DATA' || l_prd,2);
1067: end if;
1068:
1062: END IF;
1063: if p_prd is not null then
1064: hr_utility.set_location('PRD BEF TO_DATA' || l_prd,1);
1065: l_prd := p_prd;
1066: hr_utility.set_location('PRD AFT TO_DATA' || l_prd,2);
1067: end if;
1068:
1069: FOR cur_pos_ids_rec IN cur_pos_ids LOOP
1070: p_job_id := cur_pos_ids_rec.job_id;
1089: END IF;
1090:
1091: IF l_person_id is not null then
1092: IF l_prd IN ('A','B','E','F','U','V') THEN
1093: hr_utility.set_location('l_prd is ' || l_prd,1);
1094: hr_utility.set_location('l_person_id is ' || to_char(l_person_id),1);
1095: hr_utility.set_location('p_position_id is ' || to_char(p_position_id),1);
1096: hr_utility.set_location('p_effective_date is ' || to_char(p_effective_date,'YYYY/MM/DD'),2);
1097: p_pay_basis := get_upd34_pay_basis (p_person_id => l_person_id
1090:
1091: IF l_person_id is not null then
1092: IF l_prd IN ('A','B','E','F','U','V') THEN
1093: hr_utility.set_location('l_prd is ' || l_prd,1);
1094: hr_utility.set_location('l_person_id is ' || to_char(l_person_id),1);
1095: hr_utility.set_location('p_position_id is ' || to_char(p_position_id),1);
1096: hr_utility.set_location('p_effective_date is ' || to_char(p_effective_date,'YYYY/MM/DD'),2);
1097: p_pay_basis := get_upd34_pay_basis (p_person_id => l_person_id
1098: ,p_position_id => p_position_id
1091: IF l_person_id is not null then
1092: IF l_prd IN ('A','B','E','F','U','V') THEN
1093: hr_utility.set_location('l_prd is ' || l_prd,1);
1094: hr_utility.set_location('l_person_id is ' || to_char(l_person_id),1);
1095: hr_utility.set_location('p_position_id is ' || to_char(p_position_id),1);
1096: hr_utility.set_location('p_effective_date is ' || to_char(p_effective_date,'YYYY/MM/DD'),2);
1097: p_pay_basis := get_upd34_pay_basis (p_person_id => l_person_id
1098: ,p_position_id => p_position_id
1099: ,p_prd => l_prd
1092: IF l_prd IN ('A','B','E','F','U','V') THEN
1093: hr_utility.set_location('l_prd is ' || l_prd,1);
1094: hr_utility.set_location('l_person_id is ' || to_char(l_person_id),1);
1095: hr_utility.set_location('p_position_id is ' || to_char(p_position_id),1);
1096: hr_utility.set_location('p_effective_date is ' || to_char(p_effective_date,'YYYY/MM/DD'),2);
1097: p_pay_basis := get_upd34_pay_basis (p_person_id => l_person_id
1098: ,p_position_id => p_position_id
1099: ,p_prd => l_prd
1100: ,p_effective_date => p_effective_date);
1690: AND per.person_id <> p_user_person_id
1691: AND per.person_id = p_person_id;
1692: --
1693: BEGIN
1694: hr_utility.set_location('Entering ' || l_proc,5);
1695: -- For cancel and correction families do not need to do the check so just return true
1696: IF p_noa_family_code IN ('CANCEL', 'CORRECT') THEN
1697: l_ret_val := 'TRUE';
1698: hr_utility.set_location('Valid person for CORRECT or CANCEL ' ,6);
1694: hr_utility.set_location('Entering ' || l_proc,5);
1695: -- For cancel and correction families do not need to do the check so just return true
1696: IF p_noa_family_code IN ('CANCEL', 'CORRECT') THEN
1697: l_ret_val := 'TRUE';
1698: hr_utility.set_location('Valid person for CORRECT or CANCEL ' ,6);
1699: END IF;
1700:
1701: IF p_noa_family_code = 'APP' THEN
1702: --
1700:
1701: IF p_noa_family_code = 'APP' THEN
1702: --
1703:
1704: hr_utility.set_location( ' Input parameters for check person ',7);
1705: hr_utility.set_location( ' p_person_id = '|| to_char(p_person_id),7);
1706: hr_utility.set_location( ' p_effective_date = '|| to_char(p_effective_date,'DD-MON-YYYY'),7);
1707: hr_utility.set_location( ' p_business_group_id = '|| to_char(p_business_group_id),7);
1708: hr_utility.set_location( ' p_user_person_id = '|| to_char(p_user_person_id),7);
1701: IF p_noa_family_code = 'APP' THEN
1702: --
1703:
1704: hr_utility.set_location( ' Input parameters for check person ',7);
1705: hr_utility.set_location( ' p_person_id = '|| to_char(p_person_id),7);
1706: hr_utility.set_location( ' p_effective_date = '|| to_char(p_effective_date,'DD-MON-YYYY'),7);
1707: hr_utility.set_location( ' p_business_group_id = '|| to_char(p_business_group_id),7);
1708: hr_utility.set_location( ' p_user_person_id = '|| to_char(p_user_person_id),7);
1709: hr_utility.set_location( ' p_noa_family_code = '|| p_noa_family_code,7);
1702: --
1703:
1704: hr_utility.set_location( ' Input parameters for check person ',7);
1705: hr_utility.set_location( ' p_person_id = '|| to_char(p_person_id),7);
1706: hr_utility.set_location( ' p_effective_date = '|| to_char(p_effective_date,'DD-MON-YYYY'),7);
1707: hr_utility.set_location( ' p_business_group_id = '|| to_char(p_business_group_id),7);
1708: hr_utility.set_location( ' p_user_person_id = '|| to_char(p_user_person_id),7);
1709: hr_utility.set_location( ' p_noa_family_code = '|| p_noa_family_code,7);
1710: hr_utility.set_location( ' p_second_noa_family_code = '|| p_second_noa_family_code,7);
1703:
1704: hr_utility.set_location( ' Input parameters for check person ',7);
1705: hr_utility.set_location( ' p_person_id = '|| to_char(p_person_id),7);
1706: hr_utility.set_location( ' p_effective_date = '|| to_char(p_effective_date,'DD-MON-YYYY'),7);
1707: hr_utility.set_location( ' p_business_group_id = '|| to_char(p_business_group_id),7);
1708: hr_utility.set_location( ' p_user_person_id = '|| to_char(p_user_person_id),7);
1709: hr_utility.set_location( ' p_noa_family_code = '|| p_noa_family_code,7);
1710: hr_utility.set_location( ' p_second_noa_family_code = '|| p_second_noa_family_code,7);
1711: --
1704: hr_utility.set_location( ' Input parameters for check person ',7);
1705: hr_utility.set_location( ' p_person_id = '|| to_char(p_person_id),7);
1706: hr_utility.set_location( ' p_effective_date = '|| to_char(p_effective_date,'DD-MON-YYYY'),7);
1707: hr_utility.set_location( ' p_business_group_id = '|| to_char(p_business_group_id),7);
1708: hr_utility.set_location( ' p_user_person_id = '|| to_char(p_user_person_id),7);
1709: hr_utility.set_location( ' p_noa_family_code = '|| p_noa_family_code,7);
1710: hr_utility.set_location( ' p_second_noa_family_code = '|| p_second_noa_family_code,7);
1711: --
1712: FOR c_per_app_rec IN c_per_app LOOP
1705: hr_utility.set_location( ' p_person_id = '|| to_char(p_person_id),7);
1706: hr_utility.set_location( ' p_effective_date = '|| to_char(p_effective_date,'DD-MON-YYYY'),7);
1707: hr_utility.set_location( ' p_business_group_id = '|| to_char(p_business_group_id),7);
1708: hr_utility.set_location( ' p_user_person_id = '|| to_char(p_user_person_id),7);
1709: hr_utility.set_location( ' p_noa_family_code = '|| p_noa_family_code,7);
1710: hr_utility.set_location( ' p_second_noa_family_code = '|| p_second_noa_family_code,7);
1711: --
1712: FOR c_per_app_rec IN c_per_app LOOP
1713: l_ret_val := 'TRUE';
1706: hr_utility.set_location( ' p_effective_date = '|| to_char(p_effective_date,'DD-MON-YYYY'),7);
1707: hr_utility.set_location( ' p_business_group_id = '|| to_char(p_business_group_id),7);
1708: hr_utility.set_location( ' p_user_person_id = '|| to_char(p_user_person_id),7);
1709: hr_utility.set_location( ' p_noa_family_code = '|| p_noa_family_code,7);
1710: hr_utility.set_location( ' p_second_noa_family_code = '|| p_second_noa_family_code,7);
1711: --
1712: FOR c_per_app_rec IN c_per_app LOOP
1713: l_ret_val := 'TRUE';
1714: hr_utility.set_location('Valid person from c_per_app ' ,8);
1710: hr_utility.set_location( ' p_second_noa_family_code = '|| p_second_noa_family_code,7);
1711: --
1712: FOR c_per_app_rec IN c_per_app LOOP
1713: l_ret_val := 'TRUE';
1714: hr_utility.set_location('Valid person from c_per_app ' ,8);
1715: END LOOP;
1716: ELSE
1717: FOR c_per_emp_rec IN c_per_emp LOOP
1718: l_ret_val := 'TRUE';
1715: END LOOP;
1716: ELSE
1717: FOR c_per_emp_rec IN c_per_emp LOOP
1718: l_ret_val := 'TRUE';
1719: hr_utility.set_location('Valid person from c_per_emp ' ,8);
1720: END LOOP;
1721: END IF;
1722: if l_ret_val = 'FALSE' then
1723: hr_utility.set_location('Invalid person ' ,9);
1719: hr_utility.set_location('Valid person from c_per_emp ' ,8);
1720: END LOOP;
1721: END IF;
1722: if l_ret_val = 'FALSE' then
1723: hr_utility.set_location('Invalid person ' ,9);
1724: end if;
1725: hr_utility.set_location('Leaving ' || l_proc,10);
1726: RETURN(l_ret_val);
1727:
1721: END IF;
1722: if l_ret_val = 'FALSE' then
1723: hr_utility.set_location('Invalid person ' ,9);
1724: end if;
1725: hr_utility.set_location('Leaving ' || l_proc,10);
1726: RETURN(l_ret_val);
1727:
1728: END check_valid_person_id;
1729: --
1930:
1931:
1932: BEGIN
1933:
1934: hr_utility.set_location('Entering ' || l_proc,5);
1935:
1936: ghr_history_fetch.fetch_positionei
1937: (p_position_id => p_position_id ,
1938: p_information_type => 'GHR_US_POS_GRP1' ,
1942: l_title := l_pos_ei_data.poei_information12;
1943:
1944: return(l_title);
1945:
1946: hr_utility.set_location('Leaving ' || l_proc,25);
1947: End get_position_work_title;
1948:
1949:
1950: FUNCTION get_position_work_title(p_person_id in varchar2,
1967: AND asg.primary_flag = 'Y';
1968:
1969: BEGIN
1970:
1971: hr_utility.set_location('Entering ' || l_proc,5);
1972:
1973: -- Get the person's Position (for his primary Assignment).
1974:
1975: for per_pos_id in C_per_pos loop
1972:
1973: -- Get the person's Position (for his primary Assignment).
1974:
1975: for per_pos_id in C_per_pos loop
1976: hr_utility.set_location(l_proc,10);
1977: l_position_id := per_pos_id.position_id;
1978: end loop;
1979:
1980:
1978: end loop;
1979:
1980:
1981: If l_position_id is not null then
1982: hr_utility.set_location(l_proc,15);
1983: ghr_history_fetch.fetch_positionei
1984: (p_position_id => l_position_id ,
1985: p_information_type => 'GHR_US_POS_GRP1' ,
1986: p_date_effective => p_effective_date ,
1988: );
1989: l_title := l_pos_ei_data.poei_information12;
1990: End if;
1991: return(l_title);
1992: hr_utility.set_location('Leaving ' || l_proc,25);
1993: End get_position_work_title;
1994:
1995:
1996: -- Function that returns fullname in the format (fml) i.e
2008: AND trunc(nvl(p_effective_date,sysdate))between per.effective_start_date and per.effective_end_date;
2009:
2010:
2011: BEGIN
2012: hr_utility.set_location('Entering ' || l_proc,5);
2013: for full_name in c_full_name loop
2014: hr_utility.set_location(l_proc,10);
2015: l_name := substr(full_name.full_name,1,240);
2016: End loop;
2010:
2011: BEGIN
2012: hr_utility.set_location('Entering ' || l_proc,5);
2013: for full_name in c_full_name loop
2014: hr_utility.set_location(l_proc,10);
2015: l_name := substr(full_name.full_name,1,240);
2016: End loop;
2017:
2018: hr_utility.set_location('Leaving ' || l_proc,15);
2014: hr_utility.set_location(l_proc,10);
2015: l_name := substr(full_name.full_name,1,240);
2016: End loop;
2017:
2018: hr_utility.set_location('Leaving ' || l_proc,15);
2019: return(l_name);
2020: END get_full_name_fml;
2021:
2022: FUNCTION get_upd34_pay_basis (p_person_id IN per_people_f.person_id%TYPE
2029: l_retained_grade ghr_pay_calc.retained_grade_rec_type;
2030: l_update34_date DATE;
2031: l_pos_ei_grade_data per_position_extra_info%rowtype;
2032: BEGIN
2033: hr_utility.set_location('Entering get_upd34_pay_basis',10);
2034: begin
2035: l_retained_grade := ghr_pc_basic_pay.get_retained_grade_details (p_person_id
2036: ,p_effective_date
2037: ,p_pa_request_id);
2036: ,p_effective_date
2037: ,p_pa_request_id);
2038: EXCEPTION
2039: when others then
2040: hr_utility.set_location('Exception raised ' || sqlerrm(sqlcode),15);
2041: hr_utility.set_message(8301,'GHR_38255_MISSING_RETAINED_DET');
2042: hr_utility.raise_error;
2043: end;
2044:
2037: ,p_pa_request_id);
2038: EXCEPTION
2039: when others then
2040: hr_utility.set_location('Exception raised ' || sqlerrm(sqlcode),15);
2041: hr_utility.set_message(8301,'GHR_38255_MISSING_RETAINED_DET');
2042: hr_utility.raise_error;
2043: end;
2044:
2045: IF p_prd IN ('A','B','E','F')
2038: EXCEPTION
2039: when others then
2040: hr_utility.set_location('Exception raised ' || sqlerrm(sqlcode),15);
2041: hr_utility.set_message(8301,'GHR_38255_MISSING_RETAINED_DET');
2042: hr_utility.raise_error;
2043: end;
2044:
2045: IF p_prd IN ('A','B','E','F')
2046: AND nvl(p_noa_code,'XXX') <> '740'
2044:
2045: IF p_prd IN ('A','B','E','F')
2046: AND nvl(p_noa_code,'XXX') <> '740'
2047: AND l_retained_grade.temp_step IS NOT NULL THEN
2048: hr_utility.set_location('get from positionei ',1);
2049: ghr_history_fetch.fetch_positionei(
2050: p_position_id => p_position_id,
2051: p_information_type => 'GHR_US_POS_VALID_GRADE',
2052: p_date_effective => p_effective_date,
2057: END IF;
2058: END IF;
2059:
2060: l_update34_date := ghr_pay_caps.update34_implemented_date(p_person_id);
2061: hr_utility.set_location('l_update34_date ' || l_update34_date,1);
2062: If l_update34_date is null then
2063: hr_utility.set_location('update 34 is null',1);
2064: RETURN(l_retained_grade.pay_basis);
2065: elsif p_effective_date >= l_update34_date then
2059:
2060: l_update34_date := ghr_pay_caps.update34_implemented_date(p_person_id);
2061: hr_utility.set_location('l_update34_date ' || l_update34_date,1);
2062: If l_update34_date is null then
2063: hr_utility.set_location('update 34 is null',1);
2064: RETURN(l_retained_grade.pay_basis);
2065: elsif p_effective_date >= l_update34_date then
2066: hr_utility.set_location('update 34 isnot null and effective_date is ',1);
2067: RETURN(l_retained_grade.pay_basis);
2062: If l_update34_date is null then
2063: hr_utility.set_location('update 34 is null',1);
2064: RETURN(l_retained_grade.pay_basis);
2065: elsif p_effective_date >= l_update34_date then
2066: hr_utility.set_location('update 34 isnot null and effective_date is ',1);
2067: RETURN(l_retained_grade.pay_basis);
2068: else
2069: hr_utility.set_location('get from positionei ',1);
2070: ghr_history_fetch.fetch_positionei(
2065: elsif p_effective_date >= l_update34_date then
2066: hr_utility.set_location('update 34 isnot null and effective_date is ',1);
2067: RETURN(l_retained_grade.pay_basis);
2068: else
2069: hr_utility.set_location('get from positionei ',1);
2070: ghr_history_fetch.fetch_positionei(
2071: p_position_id => p_position_id,
2072: p_information_type => 'GHR_US_POS_VALID_GRADE',
2073: p_date_effective => p_effective_date,
2155: for c_par_rec in c_par
2156: loop
2157: l_exists := TRUE;
2158: l_effective_date := c_par_rec.effective_date;
2159: hr_utility.set_location('p_rpa' || c_par_rec.pa_request_id,1);
2160: exit;
2161: end loop;
2162:
2163: l_update34_date := ghr_pay_caps.update34_implemented_date(p_person_id);
2163: l_update34_date := ghr_pay_caps.update34_implemented_date(p_person_id);
2164:
2165: If p_date = nvl(l_update34_date,hr_api.g_date) then
2166: If not l_exists then
2167: hr_utility.set_location('Not exists',1);
2168: l_effective_date := NULL;
2169: l_del_flag := 'Y';
2170: Else
2171: hr_utility.set_location('Exists',1);
2167: hr_utility.set_location('Not exists',1);
2168: l_effective_date := NULL;
2169: l_del_flag := 'Y';
2170: Else
2171: hr_utility.set_location('Exists',1);
2172: if l_effective_date <> p_date then
2173: l_upd_flag := 'Y';
2174: end if;
2175: End if;
2182:
2183: l_person_extra_info_id := l_per_ei_data.person_extra_info_id;
2184: l_object_version_number := l_per_ei_data.object_version_number;
2185: if l_person_extra_info_id is not null then
2186: hr_utility.set_location('PEID Exists',1);
2187: if l_del_flag = 'Y' then
2188: delete per_people_extra_info
2189: where person_extra_info_id = l_person_extra_info_id;
2190: