340: open c_pool_rule_info;
341: fetch c_pool_rule_info into l_pool_rule_info;
342: if c_pool_rule_info%NOTFOUND or c_pool_rule_info%NOTFOUND is null then
343: close c_pool_rule_info;
344: fnd_message.set_name('BEN','BEN_91724_NO_FLX_CR_RT_FOUND');
345: fnd_message.set_token('PROC',l_proc);
346: fnd_message.set_token('PERSON_ID',to_char(p_person_id));
347: hr_utility.set_location(l_proc,82);
348: fnd_message.raise_error;
341: fetch c_pool_rule_info into l_pool_rule_info;
342: if c_pool_rule_info%NOTFOUND or c_pool_rule_info%NOTFOUND is null then
343: close c_pool_rule_info;
344: fnd_message.set_name('BEN','BEN_91724_NO_FLX_CR_RT_FOUND');
345: fnd_message.set_token('PROC',l_proc);
346: fnd_message.set_token('PERSON_ID',to_char(p_person_id));
347: hr_utility.set_location(l_proc,82);
348: fnd_message.raise_error;
349: end if;
342: if c_pool_rule_info%NOTFOUND or c_pool_rule_info%NOTFOUND is null then
343: close c_pool_rule_info;
344: fnd_message.set_name('BEN','BEN_91724_NO_FLX_CR_RT_FOUND');
345: fnd_message.set_token('PROC',l_proc);
346: fnd_message.set_token('PERSON_ID',to_char(p_person_id));
347: hr_utility.set_location(l_proc,82);
348: fnd_message.raise_error;
349: end if;
350: close c_pool_rule_info;
344: fnd_message.set_name('BEN','BEN_91724_NO_FLX_CR_RT_FOUND');
345: fnd_message.set_token('PROC',l_proc);
346: fnd_message.set_token('PERSON_ID',to_char(p_person_id));
347: hr_utility.set_location(l_proc,82);
348: fnd_message.raise_error;
349: end if;
350: close c_pool_rule_info;
351:
352: open c_person_rule_info;
352: open c_person_rule_info;
353: fetch c_person_rule_info into l_person_rule_info;
354: if c_person_rule_info%NOTFOUND or c_person_rule_info%NOTFOUND is null then
355: close c_person_rule_info;
356: fnd_message.set_name('BEN','BEN_91708_PERSON_NOT_FOUND');
357: fnd_message.set_token('PROC',l_proc);
358: fnd_message.set_token('ID', p_person_id);
359: hr_utility.set_location(l_proc,82);
360: fnd_message.raise_error;
353: fetch c_person_rule_info into l_person_rule_info;
354: if c_person_rule_info%NOTFOUND or c_person_rule_info%NOTFOUND is null then
355: close c_person_rule_info;
356: fnd_message.set_name('BEN','BEN_91708_PERSON_NOT_FOUND');
357: fnd_message.set_token('PROC',l_proc);
358: fnd_message.set_token('ID', p_person_id);
359: hr_utility.set_location(l_proc,82);
360: fnd_message.raise_error;
361: end if;
354: if c_person_rule_info%NOTFOUND or c_person_rule_info%NOTFOUND is null then
355: close c_person_rule_info;
356: fnd_message.set_name('BEN','BEN_91708_PERSON_NOT_FOUND');
357: fnd_message.set_token('PROC',l_proc);
358: fnd_message.set_token('ID', p_person_id);
359: hr_utility.set_location(l_proc,82);
360: fnd_message.raise_error;
361: end if;
362: close c_person_rule_info;
356: fnd_message.set_name('BEN','BEN_91708_PERSON_NOT_FOUND');
357: fnd_message.set_token('PROC',l_proc);
358: fnd_message.set_token('ID', p_person_id);
359: hr_utility.set_location(l_proc,82);
360: fnd_message.raise_error;
361: end if;
362: close c_person_rule_info;
363:
364: -- if l_person_rule_info.region_2 is not null then
1149: if c_enrt_rt%notfound
1150: then
1151: -- error
1152: hr_utility.set_location('BEN_91724_NO_FLX_CR_RT_FOUND', 51);
1153: fnd_message.set_name('BEN','BEN_91724_NO_FLX_CR_RT_FOUND');
1154: fnd_message.set_token('PROC',l_proc);
1155: fnd_message.set_token('PERSON_ID',to_char(p_person_id));
1156: hr_utility.set_location(' choice_id='''||to_char(p_epe_rec.elig_per_elctbl_chc_id),51);
1157: hr_utility.set_location(' rslt_id='''||to_char(g_credit_pool_result_id),51);
1150: then
1151: -- error
1152: hr_utility.set_location('BEN_91724_NO_FLX_CR_RT_FOUND', 51);
1153: fnd_message.set_name('BEN','BEN_91724_NO_FLX_CR_RT_FOUND');
1154: fnd_message.set_token('PROC',l_proc);
1155: fnd_message.set_token('PERSON_ID',to_char(p_person_id));
1156: hr_utility.set_location(' choice_id='''||to_char(p_epe_rec.elig_per_elctbl_chc_id),51);
1157: hr_utility.set_location(' rslt_id='''||to_char(g_credit_pool_result_id),51);
1158: close c_enrt_rt;
1151: -- error
1152: hr_utility.set_location('BEN_91724_NO_FLX_CR_RT_FOUND', 51);
1153: fnd_message.set_name('BEN','BEN_91724_NO_FLX_CR_RT_FOUND');
1154: fnd_message.set_token('PROC',l_proc);
1155: fnd_message.set_token('PERSON_ID',to_char(p_person_id));
1156: hr_utility.set_location(' choice_id='''||to_char(p_epe_rec.elig_per_elctbl_chc_id),51);
1157: hr_utility.set_location(' rslt_id='''||to_char(g_credit_pool_result_id),51);
1158: close c_enrt_rt;
1159: fnd_message.raise_error;
1155: fnd_message.set_token('PERSON_ID',to_char(p_person_id));
1156: hr_utility.set_location(' choice_id='''||to_char(p_epe_rec.elig_per_elctbl_chc_id),51);
1157: hr_utility.set_location(' rslt_id='''||to_char(g_credit_pool_result_id),51);
1158: close c_enrt_rt;
1159: fnd_message.raise_error;
1160: elsif not p_calculate_only_mode
1161: then
1162: hr_utility.set_location(l_proc, 20);
1163: if l_acty_base_rt_id is null then
1161: then
1162: hr_utility.set_location(l_proc, 20);
1163: if l_acty_base_rt_id is null then
1164: hr_utility.set_location('BEN_91725_NO_FLX_CR_ABR_FOUND', 52);
1165: fnd_message.set_name('BEN','BEN_91725_NO_FLX_CR_ABR_FOUND');
1166: fnd_message.set_token('PROC',l_proc);
1167: fnd_message.set_token('PERSON_ID',to_char(p_person_id));
1168: hr_utility.set_location(' enrt_rt_id='''||to_char(l_enrt_rt_id),52);
1169: close c_enrt_rt;
1162: hr_utility.set_location(l_proc, 20);
1163: if l_acty_base_rt_id is null then
1164: hr_utility.set_location('BEN_91725_NO_FLX_CR_ABR_FOUND', 52);
1165: fnd_message.set_name('BEN','BEN_91725_NO_FLX_CR_ABR_FOUND');
1166: fnd_message.set_token('PROC',l_proc);
1167: fnd_message.set_token('PERSON_ID',to_char(p_person_id));
1168: hr_utility.set_location(' enrt_rt_id='''||to_char(l_enrt_rt_id),52);
1169: close c_enrt_rt;
1170: fnd_message.raise_error;
1163: if l_acty_base_rt_id is null then
1164: hr_utility.set_location('BEN_91725_NO_FLX_CR_ABR_FOUND', 52);
1165: fnd_message.set_name('BEN','BEN_91725_NO_FLX_CR_ABR_FOUND');
1166: fnd_message.set_token('PROC',l_proc);
1167: fnd_message.set_token('PERSON_ID',to_char(p_person_id));
1168: hr_utility.set_location(' enrt_rt_id='''||to_char(l_enrt_rt_id),52);
1169: close c_enrt_rt;
1170: fnd_message.raise_error;
1171: end if;
1166: fnd_message.set_token('PROC',l_proc);
1167: fnd_message.set_token('PERSON_ID',to_char(p_person_id));
1168: hr_utility.set_location(' enrt_rt_id='''||to_char(l_enrt_rt_id),52);
1169: close c_enrt_rt;
1170: fnd_message.raise_error;
1171: end if;
1172:
1173: hr_utility.set_location(' choice_id='||to_char(p_epe_rec.elig_per_elctbl_chc_id),51);
1174: hr_utility.set_location('looking for POOL p_epe_rec.bnft_prvdr_pool_id'||
1944: if c_enrt_rt%notfound
1945: then
1946: -- error
1947: hr_utility.set_location('BEN_91724_NO_FLX_CR_RT_FOUND', 51);
1948: fnd_message.set_name('BEN','BEN_91724_NO_FLX_CR_RT_FOUND');
1949: fnd_message.set_token('PROC',l_proc);
1950: close c_enrt_rt;
1951: fnd_message.raise_error;
1952: end if;
1945: then
1946: -- error
1947: hr_utility.set_location('BEN_91724_NO_FLX_CR_RT_FOUND', 51);
1948: fnd_message.set_name('BEN','BEN_91724_NO_FLX_CR_RT_FOUND');
1949: fnd_message.set_token('PROC',l_proc);
1950: close c_enrt_rt;
1951: fnd_message.raise_error;
1952: end if;
1953: close c_enrt_rt;
1947: hr_utility.set_location('BEN_91724_NO_FLX_CR_RT_FOUND', 51);
1948: fnd_message.set_name('BEN','BEN_91724_NO_FLX_CR_RT_FOUND');
1949: fnd_message.set_token('PROC',l_proc);
1950: close c_enrt_rt;
1951: fnd_message.raise_error;
1952: end if;
1953: close c_enrt_rt;
1954: if l_enrt_rt.acty_base_rt_id is null then
1955: hr_utility.set_location('BEN_91725_NO_FLX_CR_ABR_FOUND', 52);
1952: end if;
1953: close c_enrt_rt;
1954: if l_enrt_rt.acty_base_rt_id is null then
1955: hr_utility.set_location('BEN_91725_NO_FLX_CR_ABR_FOUND', 52);
1956: fnd_message.set_name('BEN','BEN_91725_NO_FLX_CR_ABR_FOUND');
1957: fnd_message.set_token('PROC',l_proc);
1958: fnd_message.raise_error;
1959: end if;
1960: --
1953: close c_enrt_rt;
1954: if l_enrt_rt.acty_base_rt_id is null then
1955: hr_utility.set_location('BEN_91725_NO_FLX_CR_ABR_FOUND', 52);
1956: fnd_message.set_name('BEN','BEN_91725_NO_FLX_CR_ABR_FOUND');
1957: fnd_message.set_token('PROC',l_proc);
1958: fnd_message.raise_error;
1959: end if;
1960: --
1961: */
1954: if l_enrt_rt.acty_base_rt_id is null then
1955: hr_utility.set_location('BEN_91725_NO_FLX_CR_ABR_FOUND', 52);
1956: fnd_message.set_name('BEN','BEN_91725_NO_FLX_CR_ABR_FOUND');
1957: fnd_message.set_token('PROC',l_proc);
1958: fnd_message.raise_error;
1959: end if;
1960: --
1961: */
1962: close c_enrt_rt;
2280: --
2281: if (c_flex_credit_choice%notfound and
2282: nvl(p_rt_val,hr_api.g_number) <> hr_api.g_number ) then --Bug 3864152
2283: hr_utility.set_location('BEN_91726_NO_FLX_CR_CHOICE', 20);
2284: fnd_message.set_name('BEN','BEN_91726_NO_FLX_CR_CHOICE');
2285: fnd_message.set_token('PROC',l_proc);
2286: fnd_message.set_token('PERSON_ID', to_char(p_person_id));
2287: fnd_message.set_token('PER_IN_LER_ID',to_char(p_per_in_ler_id));
2288: fnd_message.set_token('EFFECTIVE_DATE',to_char(p_effective_date));
2281: if (c_flex_credit_choice%notfound and
2282: nvl(p_rt_val,hr_api.g_number) <> hr_api.g_number ) then --Bug 3864152
2283: hr_utility.set_location('BEN_91726_NO_FLX_CR_CHOICE', 20);
2284: fnd_message.set_name('BEN','BEN_91726_NO_FLX_CR_CHOICE');
2285: fnd_message.set_token('PROC',l_proc);
2286: fnd_message.set_token('PERSON_ID', to_char(p_person_id));
2287: fnd_message.set_token('PER_IN_LER_ID',to_char(p_per_in_ler_id));
2288: fnd_message.set_token('EFFECTIVE_DATE',to_char(p_effective_date));
2289: fnd_message.set_token('BG_ID',to_char(p_business_group_id));
2282: nvl(p_rt_val,hr_api.g_number) <> hr_api.g_number ) then --Bug 3864152
2283: hr_utility.set_location('BEN_91726_NO_FLX_CR_CHOICE', 20);
2284: fnd_message.set_name('BEN','BEN_91726_NO_FLX_CR_CHOICE');
2285: fnd_message.set_token('PROC',l_proc);
2286: fnd_message.set_token('PERSON_ID', to_char(p_person_id));
2287: fnd_message.set_token('PER_IN_LER_ID',to_char(p_per_in_ler_id));
2288: fnd_message.set_token('EFFECTIVE_DATE',to_char(p_effective_date));
2289: fnd_message.set_token('BG_ID',to_char(p_business_group_id));
2290: close c_flex_credit_choice;
2283: hr_utility.set_location('BEN_91726_NO_FLX_CR_CHOICE', 20);
2284: fnd_message.set_name('BEN','BEN_91726_NO_FLX_CR_CHOICE');
2285: fnd_message.set_token('PROC',l_proc);
2286: fnd_message.set_token('PERSON_ID', to_char(p_person_id));
2287: fnd_message.set_token('PER_IN_LER_ID',to_char(p_per_in_ler_id));
2288: fnd_message.set_token('EFFECTIVE_DATE',to_char(p_effective_date));
2289: fnd_message.set_token('BG_ID',to_char(p_business_group_id));
2290: close c_flex_credit_choice;
2291: fnd_message.raise_error;
2284: fnd_message.set_name('BEN','BEN_91726_NO_FLX_CR_CHOICE');
2285: fnd_message.set_token('PROC',l_proc);
2286: fnd_message.set_token('PERSON_ID', to_char(p_person_id));
2287: fnd_message.set_token('PER_IN_LER_ID',to_char(p_per_in_ler_id));
2288: fnd_message.set_token('EFFECTIVE_DATE',to_char(p_effective_date));
2289: fnd_message.set_token('BG_ID',to_char(p_business_group_id));
2290: close c_flex_credit_choice;
2291: fnd_message.raise_error;
2292: else
2285: fnd_message.set_token('PROC',l_proc);
2286: fnd_message.set_token('PERSON_ID', to_char(p_person_id));
2287: fnd_message.set_token('PER_IN_LER_ID',to_char(p_per_in_ler_id));
2288: fnd_message.set_token('EFFECTIVE_DATE',to_char(p_effective_date));
2289: fnd_message.set_token('BG_ID',to_char(p_business_group_id));
2290: close c_flex_credit_choice;
2291: fnd_message.raise_error;
2292: else
2293: --
2287: fnd_message.set_token('PER_IN_LER_ID',to_char(p_per_in_ler_id));
2288: fnd_message.set_token('EFFECTIVE_DATE',to_char(p_effective_date));
2289: fnd_message.set_token('BG_ID',to_char(p_business_group_id));
2290: close c_flex_credit_choice;
2291: fnd_message.raise_error;
2292: else
2293: --
2294: if l_flex_credit_choice.enrt_cvg_strt_dt > p_effective_date
2295: and l_flex_credit_choice.chc_pen_id <> p_per_in_ler_id then
2336: ,l_prnt_acty_base_rt_id;
2337: if c_net_credits_rate%notfound then
2338: hr_utility.set_location('not found:'|| l_acty_typ_cd, 10);
2339: close c_net_credits_rate;
2340: fnd_message.set_name('BEN','BEN_92622_NET_CRED_RT_NOT_FND');
2341: fnd_message.raise_error;
2342: else
2343: close c_net_credits_rate;
2344: end if;
2337: if c_net_credits_rate%notfound then
2338: hr_utility.set_location('not found:'|| l_acty_typ_cd, 10);
2339: close c_net_credits_rate;
2340: fnd_message.set_name('BEN','BEN_92622_NET_CRED_RT_NOT_FND');
2341: fnd_message.raise_error;
2342: else
2343: close c_net_credits_rate;
2344: end if;
2345: --
2351: ,l_child_acty_base_rt_id;
2352: --
2353: if c_net_credits_child%notfound then
2354: close c_net_credits_child;
2355: fnd_message.set_name('BEN','BEN_92623_NET_CRE_CHLD_NOT_FND');
2356: fnd_message.raise_error;
2357: else
2358: close c_net_credits_child;
2359: end if;
2352: --
2353: if c_net_credits_child%notfound then
2354: close c_net_credits_child;
2355: fnd_message.set_name('BEN','BEN_92623_NET_CRE_CHLD_NOT_FND');
2356: fnd_message.raise_error;
2357: else
2358: close c_net_credits_child;
2359: end if;
2360: --
3002: hr_utility.set_location(l_proc,30 );
3003: l_balance:=p_prvdd_val+p_rlld_up_val-p_used_val-p_rollover_val;
3004: else
3005: hr_utility.set_location(l_proc,40 );
3006: fnd_message.set_name('BEN','BEN_DFLT_TRTMT_NOT_HNDLD');
3007: fnd_message.set_token('PROC',l_proc);
3008: fnd_message.set_token('PERSON_ID',to_char(p_person_id));
3009: fnd_message.set_token('DFLT_EXCS_TRTMT_CD',p_dflt_excs_trtmt_cd);
3010: fnd_message.raise_error;
3003: l_balance:=p_prvdd_val+p_rlld_up_val-p_used_val-p_rollover_val;
3004: else
3005: hr_utility.set_location(l_proc,40 );
3006: fnd_message.set_name('BEN','BEN_DFLT_TRTMT_NOT_HNDLD');
3007: fnd_message.set_token('PROC',l_proc);
3008: fnd_message.set_token('PERSON_ID',to_char(p_person_id));
3009: fnd_message.set_token('DFLT_EXCS_TRTMT_CD',p_dflt_excs_trtmt_cd);
3010: fnd_message.raise_error;
3011: end if;
3004: else
3005: hr_utility.set_location(l_proc,40 );
3006: fnd_message.set_name('BEN','BEN_DFLT_TRTMT_NOT_HNDLD');
3007: fnd_message.set_token('PROC',l_proc);
3008: fnd_message.set_token('PERSON_ID',to_char(p_person_id));
3009: fnd_message.set_token('DFLT_EXCS_TRTMT_CD',p_dflt_excs_trtmt_cd);
3010: fnd_message.raise_error;
3011: end if;
3012: hr_utility.set_location(l_proc,50 );
3005: hr_utility.set_location(l_proc,40 );
3006: fnd_message.set_name('BEN','BEN_DFLT_TRTMT_NOT_HNDLD');
3007: fnd_message.set_token('PROC',l_proc);
3008: fnd_message.set_token('PERSON_ID',to_char(p_person_id));
3009: fnd_message.set_token('DFLT_EXCS_TRTMT_CD',p_dflt_excs_trtmt_cd);
3010: fnd_message.raise_error;
3011: end if;
3012: hr_utility.set_location(l_proc,50 );
3013: --
3006: fnd_message.set_name('BEN','BEN_DFLT_TRTMT_NOT_HNDLD');
3007: fnd_message.set_token('PROC',l_proc);
3008: fnd_message.set_token('PERSON_ID',to_char(p_person_id));
3009: fnd_message.set_token('DFLT_EXCS_TRTMT_CD',p_dflt_excs_trtmt_cd);
3010: fnd_message.raise_error;
3011: end if;
3012: hr_utility.set_location(l_proc,50 );
3013: --
3014: -- balance is rounded
3126: close c_cash_abr_from_epe;
3127: -- Bug 5447507
3128: --
3129: hr_utility.set_location(l_proc,200 );
3130: fnd_message.set_name('BEN','BEN_91724_NO_FLX_CR_RT_FOUND');
3131: fnd_message.set_token('PROC',l_proc);
3132: fnd_message.set_token('PERSON_ID',to_char(p_person_id));
3133: hr_utility.set_location('BEN_91724_NO_FLX_CR_RT_FOUND', 220);
3134: hr_utility.set_location('pool_id='||to_char(p_bnft_prvdr_pool_id), 230);
3127: -- Bug 5447507
3128: --
3129: hr_utility.set_location(l_proc,200 );
3130: fnd_message.set_name('BEN','BEN_91724_NO_FLX_CR_RT_FOUND');
3131: fnd_message.set_token('PROC',l_proc);
3132: fnd_message.set_token('PERSON_ID',to_char(p_person_id));
3133: hr_utility.set_location('BEN_91724_NO_FLX_CR_RT_FOUND', 220);
3134: hr_utility.set_location('pool_id='||to_char(p_bnft_prvdr_pool_id), 230);
3135: fnd_message.raise_error;
3128: --
3129: hr_utility.set_location(l_proc,200 );
3130: fnd_message.set_name('BEN','BEN_91724_NO_FLX_CR_RT_FOUND');
3131: fnd_message.set_token('PROC',l_proc);
3132: fnd_message.set_token('PERSON_ID',to_char(p_person_id));
3133: hr_utility.set_location('BEN_91724_NO_FLX_CR_RT_FOUND', 220);
3134: hr_utility.set_location('pool_id='||to_char(p_bnft_prvdr_pool_id), 230);
3135: fnd_message.raise_error;
3136: --
3131: fnd_message.set_token('PROC',l_proc);
3132: fnd_message.set_token('PERSON_ID',to_char(p_person_id));
3133: hr_utility.set_location('BEN_91724_NO_FLX_CR_RT_FOUND', 220);
3134: hr_utility.set_location('pool_id='||to_char(p_bnft_prvdr_pool_id), 230);
3135: fnd_message.raise_error;
3136: --
3137: end if;
3138: --
3139: close c_cash_abr_from_epe;
3933: --
3934: -- error
3935: --
3936: close c_pool_info;
3937: fnd_message.set_name('BEN','BEN_92538_POOL_NOT_FOUND');
3938: fnd_message.set_token('PROC',l_proc);
3939: fnd_message.set_token('PERSON_ID',to_char(p_person_id));
3940: fnd_message.set_token('ACTY_BASE_RT_ID',to_char(p_acty_base_rt_id));
3941: fnd_message.set_token('BNFT_PRVDR_POOL_ID',
3934: -- error
3935: --
3936: close c_pool_info;
3937: fnd_message.set_name('BEN','BEN_92538_POOL_NOT_FOUND');
3938: fnd_message.set_token('PROC',l_proc);
3939: fnd_message.set_token('PERSON_ID',to_char(p_person_id));
3940: fnd_message.set_token('ACTY_BASE_RT_ID',to_char(p_acty_base_rt_id));
3941: fnd_message.set_token('BNFT_PRVDR_POOL_ID',
3942: to_char(p_bnft_prvdr_pool_id));
3935: --
3936: close c_pool_info;
3937: fnd_message.set_name('BEN','BEN_92538_POOL_NOT_FOUND');
3938: fnd_message.set_token('PROC',l_proc);
3939: fnd_message.set_token('PERSON_ID',to_char(p_person_id));
3940: fnd_message.set_token('ACTY_BASE_RT_ID',to_char(p_acty_base_rt_id));
3941: fnd_message.set_token('BNFT_PRVDR_POOL_ID',
3942: to_char(p_bnft_prvdr_pool_id));
3943: hr_utility.set_location(l_proc,20);
3936: close c_pool_info;
3937: fnd_message.set_name('BEN','BEN_92538_POOL_NOT_FOUND');
3938: fnd_message.set_token('PROC',l_proc);
3939: fnd_message.set_token('PERSON_ID',to_char(p_person_id));
3940: fnd_message.set_token('ACTY_BASE_RT_ID',to_char(p_acty_base_rt_id));
3941: fnd_message.set_token('BNFT_PRVDR_POOL_ID',
3942: to_char(p_bnft_prvdr_pool_id));
3943: hr_utility.set_location(l_proc,20);
3944: fnd_message.raise_error;
3937: fnd_message.set_name('BEN','BEN_92538_POOL_NOT_FOUND');
3938: fnd_message.set_token('PROC',l_proc);
3939: fnd_message.set_token('PERSON_ID',to_char(p_person_id));
3940: fnd_message.set_token('ACTY_BASE_RT_ID',to_char(p_acty_base_rt_id));
3941: fnd_message.set_token('BNFT_PRVDR_POOL_ID',
3942: to_char(p_bnft_prvdr_pool_id));
3943: hr_utility.set_location(l_proc,20);
3944: fnd_message.raise_error;
3945: end if;
3940: fnd_message.set_token('ACTY_BASE_RT_ID',to_char(p_acty_base_rt_id));
3941: fnd_message.set_token('BNFT_PRVDR_POOL_ID',
3942: to_char(p_bnft_prvdr_pool_id));
3943: hr_utility.set_location(l_proc,20);
3944: fnd_message.raise_error;
3945: end if;
3946: hr_utility.set_location(l_proc,30 );
3947: if l_pool_info.dflt_excs_trtmt_cd in ('DSTRBT_RLOVR_FRFT','RLOVR_DSTRBT_FRFT') then
3948: --
3977: -- Raise errors if entered rollover value exceeds any limits set
3978: --
3979: if p_new_rollover_val /* g_balance */ > g_mx_dstrbl_pct_num then
3980: --
3981: fnd_message.set_name('BEN','BEN_92960_RLOVR_VAL_GT_MXDPN');
3982: hr_utility.set_location(l_proc,40);
3983: fnd_message.raise_error;
3984: --
3985: end if;
3979: if p_new_rollover_val /* g_balance */ > g_mx_dstrbl_pct_num then
3980: --
3981: fnd_message.set_name('BEN','BEN_92960_RLOVR_VAL_GT_MXDPN');
3982: hr_utility.set_location(l_proc,40);
3983: fnd_message.raise_error;
3984: --
3985: end if;
3986: --
3987: if p_new_rollover_val /* g_balance */ > g_mx_rlovr_val then
3985: end if;
3986: --
3987: if p_new_rollover_val /* g_balance */ > g_mx_rlovr_val then
3988: --
3989: fnd_message.set_name('BEN','BEN_92961_RLOVR_VAL_GT_MXRV');
3990: hr_utility.set_location(l_proc,41);
3991: fnd_message.raise_error;
3992: --
3993: end if;
3987: if p_new_rollover_val /* g_balance */ > g_mx_rlovr_val then
3988: --
3989: fnd_message.set_name('BEN','BEN_92961_RLOVR_VAL_GT_MXRV');
3990: hr_utility.set_location(l_proc,41);
3991: fnd_message.raise_error;
3992: --
3993: end if;
3994: if p_new_rollover_val /* g_balance */ > g_mx_elcn_val then
3995: --
3992: --
3993: end if;
3994: if p_new_rollover_val /* g_balance */ > g_mx_elcn_val then
3995: --
3996: fnd_message.set_name('BEN','BEN_92962_RLOVR_VAL_GT_MXEV');
3997: hr_utility.set_location(l_proc,42);
3998: fnd_message.raise_error;
3999: --
4000: end if;
3994: if p_new_rollover_val /* g_balance */ > g_mx_elcn_val then
3995: --
3996: fnd_message.set_name('BEN','BEN_92962_RLOVR_VAL_GT_MXEV');
3997: hr_utility.set_location(l_proc,42);
3998: fnd_message.raise_error;
3999: --
4000: end if;
4001: --
4002: if p_new_rollover_val /* g_balance */ > g_mx_rlovr_rl_val then
4000: end if;
4001: --
4002: if p_new_rollover_val /* g_balance */ > g_mx_rlovr_rl_val then
4003: --
4004: fnd_message.set_name('BEN','BEN_92963_RLOVR_VAL_GT_MXRRV');
4005: hr_utility.set_location(l_proc,43);
4006: fnd_message.raise_error;
4007: --
4008: end if;
4002: if p_new_rollover_val /* g_balance */ > g_mx_rlovr_rl_val then
4003: --
4004: fnd_message.set_name('BEN','BEN_92963_RLOVR_VAL_GT_MXRRV');
4005: hr_utility.set_location(l_proc,43);
4006: fnd_message.raise_error;
4007: --
4008: end if;
4009: --
4010: --
4009: --
4010: --
4011: if p_new_rollover_val /* g_balance */ < g_mn_dstrbl_pct_num then
4012: --
4013: fnd_message.set_name('BEN','BEN_92964_RLOVR_VAL_GT_MNDPN');
4014: hr_utility.set_location(l_proc,44);
4015: fnd_message.raise_error;
4016: --
4017: end if;
4011: if p_new_rollover_val /* g_balance */ < g_mn_dstrbl_pct_num then
4012: --
4013: fnd_message.set_name('BEN','BEN_92964_RLOVR_VAL_GT_MNDPN');
4014: hr_utility.set_location(l_proc,44);
4015: fnd_message.raise_error;
4016: --
4017: end if;
4018: --
4019: if p_new_rollover_val /* g_balance */ < g_mn_rlovr_val then
4017: end if;
4018: --
4019: if p_new_rollover_val /* g_balance */ < g_mn_rlovr_val then
4020: --
4021: fnd_message.set_name('BEN','BEN_92965_RLOVR_VAL_GT_MNRV');
4022: hr_utility.set_location(l_proc,45);
4023: fnd_message.raise_error;
4024: --
4025: end if;
4019: if p_new_rollover_val /* g_balance */ < g_mn_rlovr_val then
4020: --
4021: fnd_message.set_name('BEN','BEN_92965_RLOVR_VAL_GT_MNRV');
4022: hr_utility.set_location(l_proc,45);
4023: fnd_message.raise_error;
4024: --
4025: end if;
4026: if p_new_rollover_val /* g_balance */ < g_mn_elcn_val then
4027: --
4024: --
4025: end if;
4026: if p_new_rollover_val /* g_balance */ < g_mn_elcn_val then
4027: --
4028: fnd_message.set_name('BEN','BEN_92966_RLOVR_VAL_GT_MNEV');
4029: hr_utility.set_location(l_proc,46);
4030: fnd_message.raise_error;
4031: --
4032: end if;
4026: if p_new_rollover_val /* g_balance */ < g_mn_elcn_val then
4027: --
4028: fnd_message.set_name('BEN','BEN_92966_RLOVR_VAL_GT_MNEV');
4029: hr_utility.set_location(l_proc,46);
4030: fnd_message.raise_error;
4031: --
4032: end if;
4033: --
4034: -- Reset globals
4168: hr_utility.set_location('BEN_91457_ELCTBL_CHC_NOT_FOUND ACTY_id:'||
4169: to_char(p_acty_base_rt_id), 20); hr_utility.set_location('p_person_id:'||to_char(p_person_id), 20);
4170: hr_utility.set_location('p_business_group_id:'||to_char(p_business_group_id), 20);
4171: close c_rlovr_chc;
4172: fnd_message.set_name('BEN','BEN_91457_ELCTBL_CHC_NOT_FOUND');
4173: fnd_message.set_token('ID', 'NA');
4174: fnd_message.set_token('PROC',l_proc);
4175: fnd_message.raise_error;
4176: end if;
4169: to_char(p_acty_base_rt_id), 20); hr_utility.set_location('p_person_id:'||to_char(p_person_id), 20);
4170: hr_utility.set_location('p_business_group_id:'||to_char(p_business_group_id), 20);
4171: close c_rlovr_chc;
4172: fnd_message.set_name('BEN','BEN_91457_ELCTBL_CHC_NOT_FOUND');
4173: fnd_message.set_token('ID', 'NA');
4174: fnd_message.set_token('PROC',l_proc);
4175: fnd_message.raise_error;
4176: end if;
4177: close c_rlovr_chc;
4170: hr_utility.set_location('p_business_group_id:'||to_char(p_business_group_id), 20);
4171: close c_rlovr_chc;
4172: fnd_message.set_name('BEN','BEN_91457_ELCTBL_CHC_NOT_FOUND');
4173: fnd_message.set_token('ID', 'NA');
4174: fnd_message.set_token('PROC',l_proc);
4175: fnd_message.raise_error;
4176: end if;
4177: close c_rlovr_chc;
4178:
4171: close c_rlovr_chc;
4172: fnd_message.set_name('BEN','BEN_91457_ELCTBL_CHC_NOT_FOUND');
4173: fnd_message.set_token('ID', 'NA');
4174: fnd_message.set_token('PROC',l_proc);
4175: fnd_message.raise_error;
4176: end if;
4177: close c_rlovr_chc;
4178:
4179: --
4583: if c_get_pool_abr%notfound then
4584: close c_cash_abr;
4585: close c_get_pool_abr;
4586: hr_utility.set_location(l_proc,15);
4587: fnd_message.set_name('BEN','BEN_91725_NO_FLX_CR_ABR_FOUND');
4588: fnd_message.set_token('PROC',l_proc);
4589: fnd_message.set_token('PERSON_ID',to_char(p_person_id));
4590: fnd_message.raise_error;
4591: end if;
4584: close c_cash_abr;
4585: close c_get_pool_abr;
4586: hr_utility.set_location(l_proc,15);
4587: fnd_message.set_name('BEN','BEN_91725_NO_FLX_CR_ABR_FOUND');
4588: fnd_message.set_token('PROC',l_proc);
4589: fnd_message.set_token('PERSON_ID',to_char(p_person_id));
4590: fnd_message.raise_error;
4591: end if;
4592: close c_get_pool_abr;
4585: close c_get_pool_abr;
4586: hr_utility.set_location(l_proc,15);
4587: fnd_message.set_name('BEN','BEN_91725_NO_FLX_CR_ABR_FOUND');
4588: fnd_message.set_token('PROC',l_proc);
4589: fnd_message.set_token('PERSON_ID',to_char(p_person_id));
4590: fnd_message.raise_error;
4591: end if;
4592: close c_get_pool_abr;
4593: -- Bug : 1711831
4586: hr_utility.set_location(l_proc,15);
4587: fnd_message.set_name('BEN','BEN_91725_NO_FLX_CR_ABR_FOUND');
4588: fnd_message.set_token('PROC',l_proc);
4589: fnd_message.set_token('PERSON_ID',to_char(p_person_id));
4590: fnd_message.raise_error;
4591: end if;
4592: close c_get_pool_abr;
4593: -- Bug : 1711831
4594: end if;
4612: --
4613: -- error
4614: --
4615: close c_pool_info;
4616: fnd_message.set_name('BEN','BEN_92538_POOL_NOT_FOUND');
4617: fnd_message.set_token('PROC',l_proc);
4618: fnd_message.set_token('PERSON_ID',to_char(p_person_id));
4619: fnd_message.set_token('ACTY_BASE_RT_ID',to_char(l_acty_base_rt_id));
4620: fnd_message.set_token('BNFT_PRVDR_POOL_ID',
4613: -- error
4614: --
4615: close c_pool_info;
4616: fnd_message.set_name('BEN','BEN_92538_POOL_NOT_FOUND');
4617: fnd_message.set_token('PROC',l_proc);
4618: fnd_message.set_token('PERSON_ID',to_char(p_person_id));
4619: fnd_message.set_token('ACTY_BASE_RT_ID',to_char(l_acty_base_rt_id));
4620: fnd_message.set_token('BNFT_PRVDR_POOL_ID',
4621: to_char(l_ledger_totals.bnft_prvdr_pool_id));
4614: --
4615: close c_pool_info;
4616: fnd_message.set_name('BEN','BEN_92538_POOL_NOT_FOUND');
4617: fnd_message.set_token('PROC',l_proc);
4618: fnd_message.set_token('PERSON_ID',to_char(p_person_id));
4619: fnd_message.set_token('ACTY_BASE_RT_ID',to_char(l_acty_base_rt_id));
4620: fnd_message.set_token('BNFT_PRVDR_POOL_ID',
4621: to_char(l_ledger_totals.bnft_prvdr_pool_id));
4622: hr_utility.set_location(l_proc,70);
4615: close c_pool_info;
4616: fnd_message.set_name('BEN','BEN_92538_POOL_NOT_FOUND');
4617: fnd_message.set_token('PROC',l_proc);
4618: fnd_message.set_token('PERSON_ID',to_char(p_person_id));
4619: fnd_message.set_token('ACTY_BASE_RT_ID',to_char(l_acty_base_rt_id));
4620: fnd_message.set_token('BNFT_PRVDR_POOL_ID',
4621: to_char(l_ledger_totals.bnft_prvdr_pool_id));
4622: hr_utility.set_location(l_proc,70);
4623: fnd_message.raise_error;
4616: fnd_message.set_name('BEN','BEN_92538_POOL_NOT_FOUND');
4617: fnd_message.set_token('PROC',l_proc);
4618: fnd_message.set_token('PERSON_ID',to_char(p_person_id));
4619: fnd_message.set_token('ACTY_BASE_RT_ID',to_char(l_acty_base_rt_id));
4620: fnd_message.set_token('BNFT_PRVDR_POOL_ID',
4621: to_char(l_ledger_totals.bnft_prvdr_pool_id));
4622: hr_utility.set_location(l_proc,70);
4623: fnd_message.raise_error;
4624: end if;
4619: fnd_message.set_token('ACTY_BASE_RT_ID',to_char(l_acty_base_rt_id));
4620: fnd_message.set_token('BNFT_PRVDR_POOL_ID',
4621: to_char(l_ledger_totals.bnft_prvdr_pool_id));
4622: hr_utility.set_location(l_proc,70);
4623: fnd_message.raise_error;
4624: end if;
4625: close c_pool_info;
4626: --
4627: end if;
4648: l_deficit_limit :=
4649: l_pool_info.mx_dfcit_pct_pool_crs_num/100 * l_ledger_totals.prvdd_total;
4650: hr_utility.set_location('l_deficit_limit: '||l_deficit_limit,70);
4651: if abs(l_def_exc_amt) > l_deficit_limit then
4652: fnd_message.set_name('BEN', 'BEN_92620_EXCEED_TOT_DFCIT_PCT');
4653: fnd_message.raise_error;
4654: end if;
4655: end if;
4656: --
4649: l_pool_info.mx_dfcit_pct_pool_crs_num/100 * l_ledger_totals.prvdd_total;
4650: hr_utility.set_location('l_deficit_limit: '||l_deficit_limit,70);
4651: if abs(l_def_exc_amt) > l_deficit_limit then
4652: fnd_message.set_name('BEN', 'BEN_92620_EXCEED_TOT_DFCIT_PCT');
4653: fnd_message.raise_error;
4654: end if;
4655: end if;
4656: --
4657: -- Cannot exceed the maximum percent of compensation.
4674: l_deficit_limit :=
4675: l_pool_info.mx_dfcit_pct_comp_num/100 * l_compensation_value;
4676: hr_utility.set_location('l_deficit_limit_c: '||l_deficit_limit,70);
4677: if abs(l_def_exc_amt) > l_deficit_limit then
4678: fnd_message.set_name('BEN', 'BEN_92621_DFCIT_EXC_COMP_PCT');
4679: fnd_message.raise_error;
4680: end if;
4681: end if;
4682: end if;
4675: l_pool_info.mx_dfcit_pct_comp_num/100 * l_compensation_value;
4676: hr_utility.set_location('l_deficit_limit_c: '||l_deficit_limit,70);
4677: if abs(l_def_exc_amt) > l_deficit_limit then
4678: fnd_message.set_name('BEN', 'BEN_92621_DFCIT_EXC_COMP_PCT');
4679: fnd_message.raise_error;
4680: end if;
4681: end if;
4682: end if;
4683: end if;
4858: for l_bpr_rec in c_get_mx_pct_roll_num loop
4859: for l_bpl_rec in c_get_ldgr(l_bpr_rec.acty_base_rt_id) loop
4860: if l_bpl_rec.used_val > ((l_bpr_rec.mx_pct_ttl_crs_cn_roll_num/100)
4861: * l_ledger_totals.prvdd_total) then
4862: fnd_message.set_name('BEN', 'BEN_92636_TOT_POOL_PCT_EXCD');
4863: fnd_message.raise_error;
4864: end if;
4865: end loop;
4866: end loop;
4859: for l_bpl_rec in c_get_ldgr(l_bpr_rec.acty_base_rt_id) loop
4860: if l_bpl_rec.used_val > ((l_bpr_rec.mx_pct_ttl_crs_cn_roll_num/100)
4861: * l_ledger_totals.prvdd_total) then
4862: fnd_message.set_name('BEN', 'BEN_92636_TOT_POOL_PCT_EXCD');
4863: fnd_message.raise_error;
4864: end if;
4865: end loop;
4866: end loop;
4867: --