1230: FETCH csr_per_details INTO l_per_details_rec;
1231: IF csr_per_details%NOTFOUND
1232: THEN
1233: CLOSE csr_per_details;
1234: fnd_message.set_name('PER','PER_289602_CWK_INV_PERSON_ID');
1235: fnd_message.raise_error;
1236: END IF;
1237: CLOSE csr_per_details;
1238: --
1231: IF csr_per_details%NOTFOUND
1232: THEN
1233: CLOSE csr_per_details;
1234: fnd_message.set_name('PER','PER_289602_CWK_INV_PERSON_ID');
1235: fnd_message.raise_error;
1236: END IF;
1237: CLOSE csr_per_details;
1238: --
1239: -- If the specified person type id is not null then check that it
1256: ,p_person_id
1257: ,l_per_details_rec.business_group_id
1258: ,'Y'
1259: ,p_effective_date) then
1260: fnd_message.set_name('PAY','HR_7193_PER_FUT_TYPE_EXISTS');
1261: fnd_message.raise_error;
1262: end if;
1263: else
1264: if hr_person.chk_future_person_type(l_per_details_rec.system_person_type
1257: ,l_per_details_rec.business_group_id
1258: ,'Y'
1259: ,p_effective_date) then
1260: fnd_message.set_name('PAY','HR_7193_PER_FUT_TYPE_EXISTS');
1261: fnd_message.raise_error;
1262: end if;
1263: else
1264: if hr_person.chk_future_person_type(l_per_details_rec.system_person_type
1265: ,p_person_id
1264: if hr_person.chk_future_person_type(l_per_details_rec.system_person_type
1265: ,p_person_id
1266: ,l_per_details_rec.business_group_id
1267: ,p_effective_date) then
1268: fnd_message.set_name('PAY','HR_7193_PER_FUT_TYPE_EXISTS');
1269: fnd_message.raise_error;
1270: end if;
1271: end if;
1272: --
1265: ,p_person_id
1266: ,l_per_details_rec.business_group_id
1267: ,p_effective_date) then
1268: fnd_message.set_name('PAY','HR_7193_PER_FUT_TYPE_EXISTS');
1269: fnd_message.raise_error;
1270: end if;
1271: end if;
1272: --
1273: -- Check against the existing person type records.
1277: ,l_effective_date)
1278: or hr_general2.is_person_type(p_person_id
1279: ,'CWK'
1280: ,l_effective_date) then
1281: fnd_message.set_name('PER','PER_289603_CWK_INV_PERSON_TYPE');
1282: fnd_message.raise_error;
1283: elsif l_per_details_rec.system_person_type = 'OTHER' then
1284: l_person_type_id1 := hr_person_type_usage_info.get_default_person_type_id
1285: (l_per_details_rec.business_group_id,
1278: or hr_general2.is_person_type(p_person_id
1279: ,'CWK'
1280: ,l_effective_date) then
1281: fnd_message.set_name('PER','PER_289603_CWK_INV_PERSON_TYPE');
1282: fnd_message.raise_error;
1283: elsif l_per_details_rec.system_person_type = 'OTHER' then
1284: l_person_type_id1 := hr_person_type_usage_info.get_default_person_type_id
1285: (l_per_details_rec.business_group_id,
1286: 'OTHER');
1682: FETCH csr_per_details INTO l_per_details_rec;
1683: IF csr_per_details%NOTFOUND
1684: THEN
1685: CLOSE csr_per_details;
1686: fnd_message.set_name('PER','PER_289602_CWK_INV_PERSON_ID');
1687: fnd_message.raise_error;
1688: END IF;
1689: CLOSE csr_per_details;
1690: hr_utility.set_location(l_proc, 25);
1683: IF csr_per_details%NOTFOUND
1684: THEN
1685: CLOSE csr_per_details;
1686: fnd_message.set_name('PER','PER_289602_CWK_INV_PERSON_ID');
1687: fnd_message.raise_error;
1688: END IF;
1689: CLOSE csr_per_details;
1690: hr_utility.set_location(l_proc, 25);
1691: --
1694: if hr_person.chk_future_person_type(l_per_details_rec.system_person_type
1695: ,p_person_id
1696: ,l_per_details_rec.business_group_id
1697: ,p_effective_date) then
1698: fnd_message.set_name('PAY','HR_7193_PER_FUT_TYPE_EXISTS');
1699: fnd_message.raise_error;
1700: end if;
1701:
1702: hr_utility.set_location(l_proc, 28);
1695: ,p_person_id
1696: ,l_per_details_rec.business_group_id
1697: ,p_effective_date) then
1698: fnd_message.set_name('PAY','HR_7193_PER_FUT_TYPE_EXISTS');
1699: fnd_message.raise_error;
1700: end if;
1701:
1702: hr_utility.set_location(l_proc, 28);
1703: --
1709: or not hr_general2.is_person_type(p_person_id
1710: ,'CWK'
1711: ,l_effective_date) then
1712: close csr_fut_apl;
1713: fnd_message.set_name('PER','PER_289603_CWK_INV_PERSON_TYPE');
1714: fnd_message.raise_error;
1715: else
1716: close csr_fut_apl;
1717: end if;
1710: ,'CWK'
1711: ,l_effective_date) then
1712: close csr_fut_apl;
1713: fnd_message.set_name('PER','PER_289603_CWK_INV_PERSON_TYPE');
1714: fnd_message.raise_error;
1715: else
1716: close csr_fut_apl;
1717: end if;
1718: hr_utility.set_location(l_proc, 30);
2244: hr_utility.set_location(l_proc, 30);
2245: --
2246: close csr_get_derived_details;
2247: --
2248: fnd_message.set_name('PER','HR_289609_PDP_NOT_EXISTS');
2249: fnd_message.raise_error;
2250: end if;
2251: --
2252: close csr_get_derived_details;
2245: --
2246: close csr_get_derived_details;
2247: --
2248: fnd_message.set_name('PER','HR_289609_PDP_NOT_EXISTS');
2249: fnd_message.raise_error;
2250: end if;
2251: --
2252: close csr_get_derived_details;
2253:
2263: then
2264:
2265: hr_utility.set_location(l_proc, 50);
2266:
2267: fnd_message.set_name('PER','HR_289612_PDP_NOT_PTU_CWK');
2268: fnd_message.raise_error;
2269:
2270: end if;
2271:
2264:
2265: hr_utility.set_location(l_proc, 50);
2266:
2267: fnd_message.set_name('PER','HR_289612_PDP_NOT_PTU_CWK');
2268: fnd_message.raise_error;
2269:
2270: end if;
2271:
2272: hr_utility.set_location(l_proc, 60);
2285: open csr_fpt_ptu_changes;
2286: fetch csr_fpt_ptu_changes into l_exists;
2287: if csr_fpt_ptu_changes%found then
2288: hr_utility.set_location(l_proc, 75);
2289: fnd_message.set_name('PAY','HR_7957_PDS_INV_ATT_FUTURE');
2290: fnd_message.raise_error;
2291: end if;
2292: close csr_fpt_ptu_changes;
2293: else
2286: fetch csr_fpt_ptu_changes into l_exists;
2287: if csr_fpt_ptu_changes%found then
2288: hr_utility.set_location(l_proc, 75);
2289: fnd_message.set_name('PAY','HR_7957_PDS_INV_ATT_FUTURE');
2290: fnd_message.raise_error;
2291: end if;
2292: close csr_fpt_ptu_changes;
2293: else
2294:
2295: hr_utility.set_location(l_proc, 70);
2296: --
2297: close csr_future_per_changes;
2298: --
2299: fnd_message.set_name('PAY','HR_7957_PDS_INV_ATT_FUTURE');
2300: fnd_message.raise_error;
2301: end if;
2302: end if;
2303: --
2296: --
2297: close csr_future_per_changes;
2298: --
2299: fnd_message.set_name('PAY','HR_7957_PDS_INV_ATT_FUTURE');
2300: fnd_message.raise_error;
2301: end if;
2302: end if;
2303: --
2304: hr_utility.set_location(l_proc, 80);
2361: then
2362: --
2363: hr_utility.set_location(l_proc, 150);
2364: --
2365: fnd_message.set_name('PAY','HR_7505_PDS_INV_LSP_ATT_DT');
2366: fnd_message.raise_error;
2367: end if;
2368: else
2369: --
2362: --
2363: hr_utility.set_location(l_proc, 150);
2364: --
2365: fnd_message.set_name('PAY','HR_7505_PDS_INV_LSP_ATT_DT');
2366: fnd_message.raise_error;
2367: end if;
2368: else
2369: --
2370: hr_utility.set_location(l_proc, 160);
2386: --
2387: -- As the cursor should always return at least a null value, this
2388: -- should never happen!
2389: --
2390: fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
2391: fnd_message.set_token('PROCEDURE', l_proc);
2392: fnd_message.set_token('STEP','175');
2393: fnd_message.raise_error;
2394: end if;
2387: -- As the cursor should always return at least a null value, this
2388: -- should never happen!
2389: --
2390: fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
2391: fnd_message.set_token('PROCEDURE', l_proc);
2392: fnd_message.set_token('STEP','175');
2393: fnd_message.raise_error;
2394: end if;
2395: --
2388: -- should never happen!
2389: --
2390: fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
2391: fnd_message.set_token('PROCEDURE', l_proc);
2392: fnd_message.set_token('STEP','175');
2393: fnd_message.raise_error;
2394: end if;
2395: --
2396: close csr_get_max_tpe_end_date;
2389: --
2390: fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
2391: fnd_message.set_token('PROCEDURE', l_proc);
2392: fnd_message.set_token('STEP','175');
2393: fnd_message.raise_error;
2394: end if;
2395: --
2396: close csr_get_max_tpe_end_date;
2397: --
2836: hr_utility.set_location(l_proc, 30);
2837: --
2838: close csr_get_derived_details;
2839: --
2840: fnd_message.set_name('PER','HR_289609_PDP_NOT_EXISTS');
2841: fnd_message.raise_error;
2842: end if;
2843: --
2844: close csr_get_derived_details;
2837: --
2838: close csr_get_derived_details;
2839: --
2840: fnd_message.set_name('PER','HR_289609_PDP_NOT_EXISTS');
2841: fnd_message.raise_error;
2842: end if;
2843: --
2844: close csr_get_derived_details;
2845: --
2847:
2848: if l_object_version_number <> p_object_version_number
2849: then
2850:
2851: fnd_message.set_name('PAY','HR_7155_OBJECT_INVALID');
2852: fnd_message.raise_error;
2853: end if;
2854:
2855: hr_utility.set_location(l_proc, 40);
2848: if l_object_version_number <> p_object_version_number
2849: then
2850:
2851: fnd_message.set_name('PAY','HR_7155_OBJECT_INVALID');
2852: fnd_message.raise_error;
2853: end if;
2854:
2855: hr_utility.set_location(l_proc, 40);
2856: --
2860: then
2861: --
2862: hr_utility.set_location(l_proc, 50);
2863: --
2864: fnd_message.set_name('PAY','HR_51007_ASG_INV_NOT_ACT_TERM');
2865: fnd_message.raise_error;
2866: end if;
2867: --
2868: -- Check if the final process date is set
2861: --
2862: hr_utility.set_location(l_proc, 50);
2863: --
2864: fnd_message.set_name('PAY','HR_51007_ASG_INV_NOT_ACT_TERM');
2865: fnd_message.raise_error;
2866: end if;
2867: --
2868: -- Check if the final process date is set
2869: --
2932: then
2933: --
2934: hr_utility.set_location(l_proc, 100);
2935: --
2936: fnd_message.set_name('PER','HR_289613_PDP_NOT_PTU_EX_CWK');
2937: fnd_message.raise_error;
2938: --
2939: end if;
2940: --
2933: --
2934: hr_utility.set_location(l_proc, 100);
2935: --
2936: fnd_message.set_name('PER','HR_289613_PDP_NOT_PTU_EX_CWK');
2937: fnd_message.raise_error;
2938: --
2939: end if;
2940: --
2941: hr_utility.set_location(l_proc, 110);
3799: AND pdp.actual_termination_date = p_actual_termination_date;
3800: --
3801: exception when NO_DATA_FOUND then
3802:
3803: fnd_message.set_name('PER','HR_289614_PDP_STILL_OPEN');
3804: fnd_message.raise_error;
3805: end;
3806: --
3807: hr_utility.set_location(l_proc,30);
3800: --
3801: exception when NO_DATA_FOUND then
3802:
3803: fnd_message.set_name('PER','HR_289614_PDP_STILL_OPEN');
3804: fnd_message.raise_error;
3805: end;
3806: --
3807: hr_utility.set_location(l_proc,30);
3808:
3824:
3825: end loop;
3826:
3827: if b_future_person_type_err = TRUE then
3828: fnd_message.set_name('PAY','HR_7122_EMP_CNCL_TERM_INVLD');
3829: fnd_message.raise_error;
3830: end if;
3831: --
3832: hr_utility.set_location(l_proc,40);
3825: end loop;
3826:
3827: if b_future_person_type_err = TRUE then
3828: fnd_message.set_name('PAY','HR_7122_EMP_CNCL_TERM_INVLD');
3829: fnd_message.raise_error;
3830: end if;
3831: --
3832: hr_utility.set_location(l_proc,40);
3833:
3891:
3892: --
3893: IF l_action_chk = 'W' THEN
3894:
3895: fnd_message.set_name('PER','HR_289615_FUTURE_ACTIONS_EXIST');
3896: fnd_message.raise_error;
3897: END IF;
3898: --
3899: if l_action_chk = 'Y' then
3892: --
3893: IF l_action_chk = 'W' THEN
3894:
3895: fnd_message.set_name('PER','HR_289615_FUTURE_ACTIONS_EXIST');
3896: fnd_message.raise_error;
3897: END IF;
3898: --
3899: if l_action_chk = 'Y' then
3900: p_fut_actns_exist_warning := TRUE;