133: p_effective_date => p_effective_date) then
134: --
135: -- raise error as does not exist as lookup
136: --
137: fnd_message.set_name('PAY','HR_LOOKUP_DOES_NOT_EXIST');
138: fnd_message.raise_error;
139: --
140: end if;
141: --
134: --
135: -- raise error as does not exist as lookup
136: --
137: fnd_message.set_name('PAY','HR_LOOKUP_DOES_NOT_EXIST');
138: fnd_message.raise_error;
139: --
140: end if;
141: --
142: end if;
285: if pl1%notfound then
286: close pl1;
287: -- raise error as corresponding Plan does not exist in ben_pl_f
288: -- table.
289: fnd_message.set_name('BEN', 'BEN_91641_ENRT_RSLT_INVLD');
290: fnd_message.raise_error;
291: elsif l_bnf_dsgn_cd is null then
292: -- raise error as this plan does not allow to designate beneficiaries
293: fnd_message.set_name('BEN', 'BEN_91634_BNF_NOT_ALWD');
286: close pl1;
287: -- raise error as corresponding Plan does not exist in ben_pl_f
288: -- table.
289: fnd_message.set_name('BEN', 'BEN_91641_ENRT_RSLT_INVLD');
290: fnd_message.raise_error;
291: elsif l_bnf_dsgn_cd is null then
292: -- raise error as this plan does not allow to designate beneficiaries
293: fnd_message.set_name('BEN', 'BEN_91634_BNF_NOT_ALWD');
294: fnd_message.raise_error;
289: fnd_message.set_name('BEN', 'BEN_91641_ENRT_RSLT_INVLD');
290: fnd_message.raise_error;
291: elsif l_bnf_dsgn_cd is null then
292: -- raise error as this plan does not allow to designate beneficiaries
293: fnd_message.set_name('BEN', 'BEN_91634_BNF_NOT_ALWD');
294: fnd_message.raise_error;
295: else
296: if p_organization_id is not null and
297: l_bnf_may_dsgt_org_flag = 'N' then
290: fnd_message.raise_error;
291: elsif l_bnf_dsgn_cd is null then
292: -- raise error as this plan does not allow to designate beneficiaries
293: fnd_message.set_name('BEN', 'BEN_91634_BNF_NOT_ALWD');
294: fnd_message.raise_error;
295: else
296: if p_organization_id is not null and
297: l_bnf_may_dsgt_org_flag = 'N' then
298: -- raise error as this plan does not allow to designate orgs
295: else
296: if p_organization_id is not null and
297: l_bnf_may_dsgt_org_flag = 'N' then
298: -- raise error as this plan does not allow to designate orgs
299: fnd_message.set_name('BEN', 'BEN_91635_ORGS_BNF_NOT_ALWD');
300: fnd_message.raise_error;
301: end if;
302: if p_prmry_cntngnt_cd = 'CNTNGNT' and
303: l_bnf_cntngt_bnfs_alwd_flag = 'N' then
296: if p_organization_id is not null and
297: l_bnf_may_dsgt_org_flag = 'N' then
298: -- raise error as this plan does not allow to designate orgs
299: fnd_message.set_name('BEN', 'BEN_91635_ORGS_BNF_NOT_ALWD');
300: fnd_message.raise_error;
301: end if;
302: if p_prmry_cntngnt_cd = 'CNTNGNT' and
303: l_bnf_cntngt_bnfs_alwd_flag = 'N' then
304: -- raise error as this plan does not allow to designate contingent bnfs
301: end if;
302: if p_prmry_cntngnt_cd = 'CNTNGNT' and
303: l_bnf_cntngt_bnfs_alwd_flag = 'N' then
304: -- raise error as this plan does not allow to designate contingent bnfs
305: fnd_message.set_name('BEN', 'BEN_91636_CNTNGNT_BNF_NOT_ALWD');
306: fnd_message.raise_error;
307: end if;
308: if p_addl_instrn_txt is not null and
309: l_bnf_addl_instn_txt_alwd_flag = 'N' then
302: if p_prmry_cntngnt_cd = 'CNTNGNT' and
303: l_bnf_cntngt_bnfs_alwd_flag = 'N' then
304: -- raise error as this plan does not allow to designate contingent bnfs
305: fnd_message.set_name('BEN', 'BEN_91636_CNTNGNT_BNF_NOT_ALWD');
306: fnd_message.raise_error;
307: end if;
308: if p_addl_instrn_txt is not null and
309: l_bnf_addl_instn_txt_alwd_flag = 'N' then
310: -- raise error as this plan does not allow addl instructions
307: end if;
308: if p_addl_instrn_txt is not null and
309: l_bnf_addl_instn_txt_alwd_flag = 'N' then
310: -- raise error as this plan does not allow addl instructions
311: fnd_message.set_name('BEN', 'BEN_91637_ADDL_TXT_NOT_ALWD');
312: fnd_message.raise_error;
313: end if;
314: if l_bnf_pct_amt_alwd_cd = 'PCTA' then
315: if p_amt_dsgd_val is null and p_pct_dsgd_num is null then
308: if p_addl_instrn_txt is not null and
309: l_bnf_addl_instn_txt_alwd_flag = 'N' then
310: -- raise error as this plan does not allow addl instructions
311: fnd_message.set_name('BEN', 'BEN_91637_ADDL_TXT_NOT_ALWD');
312: fnd_message.raise_error;
313: end if;
314: if l_bnf_pct_amt_alwd_cd = 'PCTA' then
315: if p_amt_dsgd_val is null and p_pct_dsgd_num is null then
316: fnd_message.set_name('BEN', 'BEN_92527_PCT_AMT_NULL');
312: fnd_message.raise_error;
313: end if;
314: if l_bnf_pct_amt_alwd_cd = 'PCTA' then
315: if p_amt_dsgd_val is null and p_pct_dsgd_num is null then
316: fnd_message.set_name('BEN', 'BEN_92527_PCT_AMT_NULL');
317: fnd_message.raise_error;
318: end if;
319: end if;
320: if p_amt_dsgd_val is not null then
313: end if;
314: if l_bnf_pct_amt_alwd_cd = 'PCTA' then
315: if p_amt_dsgd_val is null and p_pct_dsgd_num is null then
316: fnd_message.set_name('BEN', 'BEN_92527_PCT_AMT_NULL');
317: fnd_message.raise_error;
318: end if;
319: end if;
320: if p_amt_dsgd_val is not null then
321: if l_bnf_pct_amt_alwd_cd = 'PCTO' then
319: end if;
320: if p_amt_dsgd_val is not null then
321: if l_bnf_pct_amt_alwd_cd = 'PCTO' then
322: -- raise error as this plan does not allow to designate amount
323: fnd_message.set_name('BEN', 'BEN_91638_BNF_AMT_NOT_ALWD');
324: fnd_message.raise_error;
325: elsif p_amt_dsgd_val = 0 then
326: -- raise error as this amt is invalid
327: fnd_message.set_name('BEN', 'BEN_92528_INV_AMT_VAL');
320: if p_amt_dsgd_val is not null then
321: if l_bnf_pct_amt_alwd_cd = 'PCTO' then
322: -- raise error as this plan does not allow to designate amount
323: fnd_message.set_name('BEN', 'BEN_91638_BNF_AMT_NOT_ALWD');
324: fnd_message.raise_error;
325: elsif p_amt_dsgd_val = 0 then
326: -- raise error as this amt is invalid
327: fnd_message.set_name('BEN', 'BEN_92528_INV_AMT_VAL');
328: fnd_message.raise_error;
323: fnd_message.set_name('BEN', 'BEN_91638_BNF_AMT_NOT_ALWD');
324: fnd_message.raise_error;
325: elsif p_amt_dsgd_val = 0 then
326: -- raise error as this amt is invalid
327: fnd_message.set_name('BEN', 'BEN_92528_INV_AMT_VAL');
328: fnd_message.raise_error;
329: elsif l_bnf_mn_dsgntbl_amt is not null and
330: p_amt_dsgd_val < l_bnf_mn_dsgntbl_amt then
331: -- raise error as this amount is below minimum allowed
324: fnd_message.raise_error;
325: elsif p_amt_dsgd_val = 0 then
326: -- raise error as this amt is invalid
327: fnd_message.set_name('BEN', 'BEN_92528_INV_AMT_VAL');
328: fnd_message.raise_error;
329: elsif l_bnf_mn_dsgntbl_amt is not null and
330: p_amt_dsgd_val < l_bnf_mn_dsgntbl_amt then
331: -- raise error as this amount is below minimum allowed
332: fnd_message.set_name('BEN', 'BEN_91639_BNF_AMT_MIN_ALWD');
328: fnd_message.raise_error;
329: elsif l_bnf_mn_dsgntbl_amt is not null and
330: p_amt_dsgd_val < l_bnf_mn_dsgntbl_amt then
331: -- raise error as this amount is below minimum allowed
332: fnd_message.set_name('BEN', 'BEN_91639_BNF_AMT_MIN_ALWD');
333: fnd_message.set_token('MIN_AMT',l_bnf_mn_dsgntbl_amt);--4455819
334: fnd_message.raise_error;
335: elsif l_bnf_incrmt_amt is not null and
336: mod((p_amt_dsgd_val - nvl(l_bnf_mn_dsgntbl_amt, 0)), l_bnf_incrmt_amt) <> 0 then
329: elsif l_bnf_mn_dsgntbl_amt is not null and
330: p_amt_dsgd_val < l_bnf_mn_dsgntbl_amt then
331: -- raise error as this amount is below minimum allowed
332: fnd_message.set_name('BEN', 'BEN_91639_BNF_AMT_MIN_ALWD');
333: fnd_message.set_token('MIN_AMT',l_bnf_mn_dsgntbl_amt);--4455819
334: fnd_message.raise_error;
335: elsif l_bnf_incrmt_amt is not null and
336: mod((p_amt_dsgd_val - nvl(l_bnf_mn_dsgntbl_amt, 0)), l_bnf_incrmt_amt) <> 0 then
337: -- raise error as this amount is not in increments allowed
330: p_amt_dsgd_val < l_bnf_mn_dsgntbl_amt then
331: -- raise error as this amount is below minimum allowed
332: fnd_message.set_name('BEN', 'BEN_91639_BNF_AMT_MIN_ALWD');
333: fnd_message.set_token('MIN_AMT',l_bnf_mn_dsgntbl_amt);--4455819
334: fnd_message.raise_error;
335: elsif l_bnf_incrmt_amt is not null and
336: mod((p_amt_dsgd_val - nvl(l_bnf_mn_dsgntbl_amt, 0)), l_bnf_incrmt_amt) <> 0 then
337: -- raise error as this amount is not in increments allowed
338: fnd_message.set_name('BEN', 'BEN_91640_BNF_AMT_INCRMT_ALWD');
334: fnd_message.raise_error;
335: elsif l_bnf_incrmt_amt is not null and
336: mod((p_amt_dsgd_val - nvl(l_bnf_mn_dsgntbl_amt, 0)), l_bnf_incrmt_amt) <> 0 then
337: -- raise error as this amount is not in increments allowed
338: fnd_message.set_name('BEN', 'BEN_91640_BNF_AMT_INCRMT_ALWD');
339: fnd_message.raise_error;
340: end if;
341: end if;
342: if p_pct_dsgd_num is not null then
335: elsif l_bnf_incrmt_amt is not null and
336: mod((p_amt_dsgd_val - nvl(l_bnf_mn_dsgntbl_amt, 0)), l_bnf_incrmt_amt) <> 0 then
337: -- raise error as this amount is not in increments allowed
338: fnd_message.set_name('BEN', 'BEN_91640_BNF_AMT_INCRMT_ALWD');
339: fnd_message.raise_error;
340: end if;
341: end if;
342: if p_pct_dsgd_num is not null then
343: if p_pct_dsgd_num > 100 or p_pct_dsgd_num <= 0 then
341: end if;
342: if p_pct_dsgd_num is not null then
343: if p_pct_dsgd_num > 100 or p_pct_dsgd_num <= 0 then
344: -- raise error as this pct num is invalid
345: fnd_message.set_name('BEN', 'BEN_91271_INV_PCT_VAL');
346: fnd_message.raise_error;
347: elsif l_bnf_mn_dsgntbl_pct_val is not null and
348: p_pct_dsgd_num < l_bnf_mn_dsgntbl_pct_val then
349: -- raise error as this pct is below minimum allowed
342: if p_pct_dsgd_num is not null then
343: if p_pct_dsgd_num > 100 or p_pct_dsgd_num <= 0 then
344: -- raise error as this pct num is invalid
345: fnd_message.set_name('BEN', 'BEN_91271_INV_PCT_VAL');
346: fnd_message.raise_error;
347: elsif l_bnf_mn_dsgntbl_pct_val is not null and
348: p_pct_dsgd_num < l_bnf_mn_dsgntbl_pct_val then
349: -- raise error as this pct is below minimum allowed
350: if (l_bnf_enrt_oipl_id is not null)
353: fetch csr_option_name into l_bnf_enrt_option_name;
354: if csr_option_name%notfound then
355: close csr_option_name;
356: -- raise error as corresponding option does not exist in ben_opt_f
357: fnd_message.set_name('ben', 'ben_91641_enrt_rslt_invld');
358: fnd_message.raise_error;
359: end if;
360: close csr_option_name;
361: fnd_message.set_name('BEN', 'BEN_93263_BNF_PCT_MIN_ALWD');
354: if csr_option_name%notfound then
355: close csr_option_name;
356: -- raise error as corresponding option does not exist in ben_opt_f
357: fnd_message.set_name('ben', 'ben_91641_enrt_rslt_invld');
358: fnd_message.raise_error;
359: end if;
360: close csr_option_name;
361: fnd_message.set_name('BEN', 'BEN_93263_BNF_PCT_MIN_ALWD');
362: fnd_message.set_token('MIN',l_bnf_mn_dsgntbl_pct_val);
357: fnd_message.set_name('ben', 'ben_91641_enrt_rslt_invld');
358: fnd_message.raise_error;
359: end if;
360: close csr_option_name;
361: fnd_message.set_name('BEN', 'BEN_93263_BNF_PCT_MIN_ALWD');
362: fnd_message.set_token('MIN',l_bnf_mn_dsgntbl_pct_val);
363: fnd_message.set_token('OPT',l_bnf_enrt_option_name);
364: fnd_message.set_token('PL',l_pl_name);
365: else
358: fnd_message.raise_error;
359: end if;
360: close csr_option_name;
361: fnd_message.set_name('BEN', 'BEN_93263_BNF_PCT_MIN_ALWD');
362: fnd_message.set_token('MIN',l_bnf_mn_dsgntbl_pct_val);
363: fnd_message.set_token('OPT',l_bnf_enrt_option_name);
364: fnd_message.set_token('PL',l_pl_name);
365: else
366: fnd_message.set_name('BEN', 'BEN_91642_BNF_PCT_MIN_ALWD');
359: end if;
360: close csr_option_name;
361: fnd_message.set_name('BEN', 'BEN_93263_BNF_PCT_MIN_ALWD');
362: fnd_message.set_token('MIN',l_bnf_mn_dsgntbl_pct_val);
363: fnd_message.set_token('OPT',l_bnf_enrt_option_name);
364: fnd_message.set_token('PL',l_pl_name);
365: else
366: fnd_message.set_name('BEN', 'BEN_91642_BNF_PCT_MIN_ALWD');
367:
360: close csr_option_name;
361: fnd_message.set_name('BEN', 'BEN_93263_BNF_PCT_MIN_ALWD');
362: fnd_message.set_token('MIN',l_bnf_mn_dsgntbl_pct_val);
363: fnd_message.set_token('OPT',l_bnf_enrt_option_name);
364: fnd_message.set_token('PL',l_pl_name);
365: else
366: fnd_message.set_name('BEN', 'BEN_91642_BNF_PCT_MIN_ALWD');
367:
368: -- Added for Bug 1845251
362: fnd_message.set_token('MIN',l_bnf_mn_dsgntbl_pct_val);
363: fnd_message.set_token('OPT',l_bnf_enrt_option_name);
364: fnd_message.set_token('PL',l_pl_name);
365: else
366: fnd_message.set_name('BEN', 'BEN_91642_BNF_PCT_MIN_ALWD');
367:
368: -- Added for Bug 1845251
369:
370: fnd_message.set_token('MIN',l_bnf_mn_dsgntbl_pct_val);
366: fnd_message.set_name('BEN', 'BEN_91642_BNF_PCT_MIN_ALWD');
367:
368: -- Added for Bug 1845251
369:
370: fnd_message.set_token('MIN',l_bnf_mn_dsgntbl_pct_val);
371: fnd_message.set_token('PL',l_pl_name);
372: end if;
373: fnd_message.raise_error;
374: elsif l_bnf_pct_incrmt_val is not null and
367:
368: -- Added for Bug 1845251
369:
370: fnd_message.set_token('MIN',l_bnf_mn_dsgntbl_pct_val);
371: fnd_message.set_token('PL',l_pl_name);
372: end if;
373: fnd_message.raise_error;
374: elsif l_bnf_pct_incrmt_val is not null and
375: mod((p_pct_dsgd_num - nvl(l_bnf_mn_dsgntbl_pct_val, 0)), l_bnf_pct_incrmt_val) <> 0 then
369:
370: fnd_message.set_token('MIN',l_bnf_mn_dsgntbl_pct_val);
371: fnd_message.set_token('PL',l_pl_name);
372: end if;
373: fnd_message.raise_error;
374: elsif l_bnf_pct_incrmt_val is not null and
375: mod((p_pct_dsgd_num - nvl(l_bnf_mn_dsgntbl_pct_val, 0)), l_bnf_pct_incrmt_val) <> 0 then
376: -- raise error as this pct is not in increments allowed
377: fnd_message.set_name('BEN', 'BEN_91643_BNF_PCT_INCRMT_ALWD');
373: fnd_message.raise_error;
374: elsif l_bnf_pct_incrmt_val is not null and
375: mod((p_pct_dsgd_num - nvl(l_bnf_mn_dsgntbl_pct_val, 0)), l_bnf_pct_incrmt_val) <> 0 then
376: -- raise error as this pct is not in increments allowed
377: fnd_message.set_name('BEN', 'BEN_91643_BNF_PCT_INCRMT_ALWD');
378:
379: fnd_message.set_token('INCR',l_bnf_pct_incrmt_val);
380: fnd_message.set_token('PL',l_pl_name);
381:
375: mod((p_pct_dsgd_num - nvl(l_bnf_mn_dsgntbl_pct_val, 0)), l_bnf_pct_incrmt_val) <> 0 then
376: -- raise error as this pct is not in increments allowed
377: fnd_message.set_name('BEN', 'BEN_91643_BNF_PCT_INCRMT_ALWD');
378:
379: fnd_message.set_token('INCR',l_bnf_pct_incrmt_val);
380: fnd_message.set_token('PL',l_pl_name);
381:
382: fnd_message.raise_error;
383: end if;
376: -- raise error as this pct is not in increments allowed
377: fnd_message.set_name('BEN', 'BEN_91643_BNF_PCT_INCRMT_ALWD');
378:
379: fnd_message.set_token('INCR',l_bnf_pct_incrmt_val);
380: fnd_message.set_token('PL',l_pl_name);
381:
382: fnd_message.raise_error;
383: end if;
384: elsif p_amt_dsgd_val is null and
378:
379: fnd_message.set_token('INCR',l_bnf_pct_incrmt_val);
380: fnd_message.set_token('PL',l_pl_name);
381:
382: fnd_message.raise_error;
383: end if;
384: elsif p_amt_dsgd_val is null and
385: l_bnf_mn_dsgntbl_pct_val is not null and
386: nvl(p_pct_dsgd_num,0) < l_bnf_mn_dsgntbl_pct_val then
392: fetch csr_option_name into l_bnf_enrt_option_name;
393: if csr_option_name%notfound then
394: close csr_option_name;
395: -- raise error as corresponding option does not exist in ben_opt_f
396: fnd_message.set_name('ben', 'ben_91641_enrt_rslt_invld');
397: fnd_message.raise_error;
398: end if;
399: close csr_option_name;
400: fnd_message.set_name('BEN', 'BEN_93263_BNF_PCT_MIN_ALWD');
393: if csr_option_name%notfound then
394: close csr_option_name;
395: -- raise error as corresponding option does not exist in ben_opt_f
396: fnd_message.set_name('ben', 'ben_91641_enrt_rslt_invld');
397: fnd_message.raise_error;
398: end if;
399: close csr_option_name;
400: fnd_message.set_name('BEN', 'BEN_93263_BNF_PCT_MIN_ALWD');
401: fnd_message.set_token('MIN',l_bnf_mn_dsgntbl_pct_val);
396: fnd_message.set_name('ben', 'ben_91641_enrt_rslt_invld');
397: fnd_message.raise_error;
398: end if;
399: close csr_option_name;
400: fnd_message.set_name('BEN', 'BEN_93263_BNF_PCT_MIN_ALWD');
401: fnd_message.set_token('MIN',l_bnf_mn_dsgntbl_pct_val);
402: fnd_message.set_token('OPT',l_bnf_enrt_option_name);
403: fnd_message.set_token('PL',l_pl_name);
404: else
397: fnd_message.raise_error;
398: end if;
399: close csr_option_name;
400: fnd_message.set_name('BEN', 'BEN_93263_BNF_PCT_MIN_ALWD');
401: fnd_message.set_token('MIN',l_bnf_mn_dsgntbl_pct_val);
402: fnd_message.set_token('OPT',l_bnf_enrt_option_name);
403: fnd_message.set_token('PL',l_pl_name);
404: else
405: fnd_message.set_name('BEN', 'BEN_91642_BNF_PCT_MIN_ALWD');
398: end if;
399: close csr_option_name;
400: fnd_message.set_name('BEN', 'BEN_93263_BNF_PCT_MIN_ALWD');
401: fnd_message.set_token('MIN',l_bnf_mn_dsgntbl_pct_val);
402: fnd_message.set_token('OPT',l_bnf_enrt_option_name);
403: fnd_message.set_token('PL',l_pl_name);
404: else
405: fnd_message.set_name('BEN', 'BEN_91642_BNF_PCT_MIN_ALWD');
406:
399: close csr_option_name;
400: fnd_message.set_name('BEN', 'BEN_93263_BNF_PCT_MIN_ALWD');
401: fnd_message.set_token('MIN',l_bnf_mn_dsgntbl_pct_val);
402: fnd_message.set_token('OPT',l_bnf_enrt_option_name);
403: fnd_message.set_token('PL',l_pl_name);
404: else
405: fnd_message.set_name('BEN', 'BEN_91642_BNF_PCT_MIN_ALWD');
406:
407: -- Added for Bug 1845251
401: fnd_message.set_token('MIN',l_bnf_mn_dsgntbl_pct_val);
402: fnd_message.set_token('OPT',l_bnf_enrt_option_name);
403: fnd_message.set_token('PL',l_pl_name);
404: else
405: fnd_message.set_name('BEN', 'BEN_91642_BNF_PCT_MIN_ALWD');
406:
407: -- Added for Bug 1845251
408:
409: fnd_message.set_token('MIN',l_bnf_mn_dsgntbl_pct_val);
405: fnd_message.set_name('BEN', 'BEN_91642_BNF_PCT_MIN_ALWD');
406:
407: -- Added for Bug 1845251
408:
409: fnd_message.set_token('MIN',l_bnf_mn_dsgntbl_pct_val);
410: fnd_message.set_token('PL',l_pl_name);
411:
412: end if;
413: fnd_message.raise_error;
406:
407: -- Added for Bug 1845251
408:
409: fnd_message.set_token('MIN',l_bnf_mn_dsgntbl_pct_val);
410: fnd_message.set_token('PL',l_pl_name);
411:
412: end if;
413: fnd_message.raise_error;
414: end if;
409: fnd_message.set_token('MIN',l_bnf_mn_dsgntbl_pct_val);
410: fnd_message.set_token('PL',l_pl_name);
411:
412: end if;
413: fnd_message.raise_error;
414: end if;
415: end if;
416: close pl1;
417: hr_utility.set_location('Leaving:'||l_proc,10);
492: --
493: fetch c1 into l_sum;
494: if (l_sum + p_pct_dsgd_num) > 100 then
495: --
496: fnd_message.set_name('BEN', 'BEN_91644_BNF_TTL_PCT_EXCEEDED');
497: fnd_message.raise_error;
498: --
499: --
500: end if;
493: fetch c1 into l_sum;
494: if (l_sum + p_pct_dsgd_num) > 100 then
495: --
496: fnd_message.set_name('BEN', 'BEN_91644_BNF_TTL_PCT_EXCEEDED');
497: fnd_message.raise_error;
498: --
499: --
500: end if;
501: --
605: open c2;
606: fetch c2 into l_sum;
607: if (l_sum + p_amt_dsgd_val) > nvl(l_amt, 0) then
608: --
609: fnd_message.set_name('BEN', 'BEN_91645_BNF_TTL_AMT_EXCEEDED');
610: fnd_message.raise_error;
611: --
612: close c2;
613: --
606: fetch c2 into l_sum;
607: if (l_sum + p_amt_dsgd_val) > nvl(l_amt, 0) then
608: --
609: fnd_message.set_name('BEN', 'BEN_91645_BNF_TTL_AMT_EXCEEDED');
610: fnd_message.raise_error;
611: --
612: close c2;
613: --
614: end if;
702: --
703: ben_pbn_shd.constraint_error('BEN_PL_BNF_FK4');
704: elsif p_amt_dsgd_uom <> l_uom then
705: --
706: fnd_message.set_name('BEN', 'BEN_91647_BNF_AMT_UOM_INVALID');
707: fnd_message.raise_error;
708: --
709: --
710: end if;
703: ben_pbn_shd.constraint_error('BEN_PL_BNF_FK4');
704: elsif p_amt_dsgd_uom <> l_uom then
705: --
706: fnd_message.set_name('BEN', 'BEN_91647_BNF_AMT_UOM_INVALID');
707: fnd_message.raise_error;
708: --
709: --
710: end if;
711: --
827: close c3;
828: --
829: -- raise error as this beneficiary already exists for this enrt rslt
830: --
831: fnd_message.set_name('BEN', 'BEN_91648_DUP_PL_BNF');
832: fnd_message.raise_error;
833: --
834: end if;
835: close c3;
828: --
829: -- raise error as this beneficiary already exists for this enrt rslt
830: --
831: fnd_message.set_name('BEN', 'BEN_91648_DUP_PL_BNF');
832: fnd_message.raise_error;
833: --
834: end if;
835: close c3;
836: --
1139: end if;
1140: --
1141: -- Bug 2869639 Added separate message when option id is null
1142: if l_opt_id is not NULL then
1143: fnd_message.set_name('BEN', 'BEN_93049_INVLD_BNF_CNTCT_TYPE');
1144: fnd_message.set_token('RLTYP', nvl(l_lkup_meaning_reln_type,''));
1145: fnd_message.set_token('PL_ID', l_pl_name );
1146: -- fnd_message.set_token('OIPL_ID', to_char(l_oipl_id) );
1147: fnd_message.set_token('OPT_ID', l_opt_name );
1140: --
1141: -- Bug 2869639 Added separate message when option id is null
1142: if l_opt_id is not NULL then
1143: fnd_message.set_name('BEN', 'BEN_93049_INVLD_BNF_CNTCT_TYPE');
1144: fnd_message.set_token('RLTYP', nvl(l_lkup_meaning_reln_type,''));
1145: fnd_message.set_token('PL_ID', l_pl_name );
1146: -- fnd_message.set_token('OIPL_ID', to_char(l_oipl_id) );
1147: fnd_message.set_token('OPT_ID', l_opt_name );
1148: else
1141: -- Bug 2869639 Added separate message when option id is null
1142: if l_opt_id is not NULL then
1143: fnd_message.set_name('BEN', 'BEN_93049_INVLD_BNF_CNTCT_TYPE');
1144: fnd_message.set_token('RLTYP', nvl(l_lkup_meaning_reln_type,''));
1145: fnd_message.set_token('PL_ID', l_pl_name );
1146: -- fnd_message.set_token('OIPL_ID', to_char(l_oipl_id) );
1147: fnd_message.set_token('OPT_ID', l_opt_name );
1148: else
1149: fnd_message.set_name('BEN', 'BEN_93904_INVLD_BNF_CNTCT_T_PL');
1142: if l_opt_id is not NULL then
1143: fnd_message.set_name('BEN', 'BEN_93049_INVLD_BNF_CNTCT_TYPE');
1144: fnd_message.set_token('RLTYP', nvl(l_lkup_meaning_reln_type,''));
1145: fnd_message.set_token('PL_ID', l_pl_name );
1146: -- fnd_message.set_token('OIPL_ID', to_char(l_oipl_id) );
1147: fnd_message.set_token('OPT_ID', l_opt_name );
1148: else
1149: fnd_message.set_name('BEN', 'BEN_93904_INVLD_BNF_CNTCT_T_PL');
1150: fnd_message.set_token('RLTYP', nvl(l_lkup_meaning_reln_type,''));
1143: fnd_message.set_name('BEN', 'BEN_93049_INVLD_BNF_CNTCT_TYPE');
1144: fnd_message.set_token('RLTYP', nvl(l_lkup_meaning_reln_type,''));
1145: fnd_message.set_token('PL_ID', l_pl_name );
1146: -- fnd_message.set_token('OIPL_ID', to_char(l_oipl_id) );
1147: fnd_message.set_token('OPT_ID', l_opt_name );
1148: else
1149: fnd_message.set_name('BEN', 'BEN_93904_INVLD_BNF_CNTCT_T_PL');
1150: fnd_message.set_token('RLTYP', nvl(l_lkup_meaning_reln_type,''));
1151: fnd_message.set_token('PL_ID', l_pl_name );
1145: fnd_message.set_token('PL_ID', l_pl_name );
1146: -- fnd_message.set_token('OIPL_ID', to_char(l_oipl_id) );
1147: fnd_message.set_token('OPT_ID', l_opt_name );
1148: else
1149: fnd_message.set_name('BEN', 'BEN_93904_INVLD_BNF_CNTCT_T_PL');
1150: fnd_message.set_token('RLTYP', nvl(l_lkup_meaning_reln_type,''));
1151: fnd_message.set_token('PL_ID', l_pl_name );
1152: end if;
1153: --
1146: -- fnd_message.set_token('OIPL_ID', to_char(l_oipl_id) );
1147: fnd_message.set_token('OPT_ID', l_opt_name );
1148: else
1149: fnd_message.set_name('BEN', 'BEN_93904_INVLD_BNF_CNTCT_T_PL');
1150: fnd_message.set_token('RLTYP', nvl(l_lkup_meaning_reln_type,''));
1151: fnd_message.set_token('PL_ID', l_pl_name );
1152: end if;
1153: --
1154: fnd_message.raise_error;
1147: fnd_message.set_token('OPT_ID', l_opt_name );
1148: else
1149: fnd_message.set_name('BEN', 'BEN_93904_INVLD_BNF_CNTCT_T_PL');
1150: fnd_message.set_token('RLTYP', nvl(l_lkup_meaning_reln_type,''));
1151: fnd_message.set_token('PL_ID', l_pl_name );
1152: end if;
1153: --
1154: fnd_message.raise_error;
1155:
1150: fnd_message.set_token('RLTYP', nvl(l_lkup_meaning_reln_type,''));
1151: fnd_message.set_token('PL_ID', l_pl_name );
1152: end if;
1153: --
1154: fnd_message.raise_error;
1155:
1156: End;
1157:
1158: Begin
1584: --
1585: open c_bnf_person_rel_typ;
1586: fetch c_bnf_person_rel_typ into l_lkup_meaning_reln_type ;
1587: if c_bnf_person_rel_typ%found then
1588: fnd_message.set_token('RLTYP', l_lkup_meaning_reln_type);
1589: end if;
1590: close c_bnf_person_rel_typ;
1591: --
1592: -- get plan and oipl ids, if oipl_id is not null then retrieve opt_id also
1600: fetch c_opt into l_opt_id;
1601: close c_opt;
1602: end if;
1603: --
1604: fnd_message.set_name('BEN', 'BEN_93049_INVLD_BNF_CNTCT_TYPE');
1605: fnd_message.set_token('RLTYP', nvl(l_lkup_meaning_reln_type,''));
1606: fnd_message.set_token('PL_ID', to_char(l_pl_id) );
1607: fnd_message.set_token('OIPL_ID', to_char(l_oipl_id) );
1608: fnd_message.set_token('OPT_ID', to_char(l_opt_id) );
1601: close c_opt;
1602: end if;
1603: --
1604: fnd_message.set_name('BEN', 'BEN_93049_INVLD_BNF_CNTCT_TYPE');
1605: fnd_message.set_token('RLTYP', nvl(l_lkup_meaning_reln_type,''));
1606: fnd_message.set_token('PL_ID', to_char(l_pl_id) );
1607: fnd_message.set_token('OIPL_ID', to_char(l_oipl_id) );
1608: fnd_message.set_token('OPT_ID', to_char(l_opt_id) );
1609: fnd_message.raise_error;
1602: end if;
1603: --
1604: fnd_message.set_name('BEN', 'BEN_93049_INVLD_BNF_CNTCT_TYPE');
1605: fnd_message.set_token('RLTYP', nvl(l_lkup_meaning_reln_type,''));
1606: fnd_message.set_token('PL_ID', to_char(l_pl_id) );
1607: fnd_message.set_token('OIPL_ID', to_char(l_oipl_id) );
1608: fnd_message.set_token('OPT_ID', to_char(l_opt_id) );
1609: fnd_message.raise_error;
1610: --
1603: --
1604: fnd_message.set_name('BEN', 'BEN_93049_INVLD_BNF_CNTCT_TYPE');
1605: fnd_message.set_token('RLTYP', nvl(l_lkup_meaning_reln_type,''));
1606: fnd_message.set_token('PL_ID', to_char(l_pl_id) );
1607: fnd_message.set_token('OIPL_ID', to_char(l_oipl_id) );
1608: fnd_message.set_token('OPT_ID', to_char(l_opt_id) );
1609: fnd_message.raise_error;
1610: --
1611: end if;
1604: fnd_message.set_name('BEN', 'BEN_93049_INVLD_BNF_CNTCT_TYPE');
1605: fnd_message.set_token('RLTYP', nvl(l_lkup_meaning_reln_type,''));
1606: fnd_message.set_token('PL_ID', to_char(l_pl_id) );
1607: fnd_message.set_token('OIPL_ID', to_char(l_oipl_id) );
1608: fnd_message.set_token('OPT_ID', to_char(l_opt_id) );
1609: fnd_message.raise_error;
1610: --
1611: end if;
1612: --
1605: fnd_message.set_token('RLTYP', nvl(l_lkup_meaning_reln_type,''));
1606: fnd_message.set_token('PL_ID', to_char(l_pl_id) );
1607: fnd_message.set_token('OIPL_ID', to_char(l_oipl_id) );
1608: fnd_message.set_token('OPT_ID', to_char(l_opt_id) );
1609: fnd_message.raise_error;
1610: --
1611: end if;
1612: --
1613: close c_pl_dsgn_rqmt;
1800: --
1801: -- raise error as the person/organization has already been designated
1802: --
1803: --
1804: fnd_message.set_name('BEN', 'BEN_92619_PRIMY_AND_CNTGNT');
1805: fnd_message.raise_error;
1806: --
1807: end if;
1808: --
1801: -- raise error as the person/organization has already been designated
1802: --
1803: --
1804: fnd_message.set_name('BEN', 'BEN_92619_PRIMY_AND_CNTGNT');
1805: fnd_message.raise_error;
1806: --
1807: end if;
1808: --
1809: close c1;
1914: --
1915: -- An unhandled or unexpected error has occurred which
1916: -- we must report
1917: --
1918: fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
1919: fnd_message.set_token('PROCEDURE', l_proc);
1920: fnd_message.set_token('STEP','15');
1921: fnd_message.raise_error;
1922: End dt_update_validate;
1915: -- An unhandled or unexpected error has occurred which
1916: -- we must report
1917: --
1918: fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
1919: fnd_message.set_token('PROCEDURE', l_proc);
1920: fnd_message.set_token('STEP','15');
1921: fnd_message.raise_error;
1922: End dt_update_validate;
1923: --
1916: -- we must report
1917: --
1918: fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
1919: fnd_message.set_token('PROCEDURE', l_proc);
1920: fnd_message.set_token('STEP','15');
1921: fnd_message.raise_error;
1922: End dt_update_validate;
1923: --
1924: -- ----------------------------------------------------------------------------
1917: --
1918: fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
1919: fnd_message.set_token('PROCEDURE', l_proc);
1920: fnd_message.set_token('STEP','15');
1921: fnd_message.raise_error;
1922: End dt_update_validate;
1923: --
1924: -- ----------------------------------------------------------------------------
1925: -- |--------------------------< dt_delete_validate >--------------------------|
2026: --
2027: -- An unhandled or unexpected error has occurred which
2028: -- we must report
2029: --
2030: fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
2031: fnd_message.set_token('PROCEDURE', l_proc);
2032: fnd_message.set_token('STEP','15');
2033: fnd_message.raise_error;
2034: End dt_delete_validate;
2027: -- An unhandled or unexpected error has occurred which
2028: -- we must report
2029: --
2030: fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
2031: fnd_message.set_token('PROCEDURE', l_proc);
2032: fnd_message.set_token('STEP','15');
2033: fnd_message.raise_error;
2034: End dt_delete_validate;
2035: --
2028: -- we must report
2029: --
2030: fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
2031: fnd_message.set_token('PROCEDURE', l_proc);
2032: fnd_message.set_token('STEP','15');
2033: fnd_message.raise_error;
2034: End dt_delete_validate;
2035: --
2036: -- ----------------------------------------------------------------------------
2029: --
2030: fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
2031: fnd_message.set_token('PROCEDURE', l_proc);
2032: fnd_message.set_token('STEP','15');
2033: fnd_message.raise_error;
2034: End dt_delete_validate;
2035: --
2036: -- ----------------------------------------------------------------------------
2037: -- |---------------------------< insert_validate >----------------------------|
2399: close csr_leg_code;
2400: --
2401: -- The primary key is invalid therefore we must error
2402: --
2403: fnd_message.set_name('PAY','HR_7220_INVALID_PRIMARY_KEY');
2404: fnd_message.raise_error;
2405: --
2406: end if;
2407: --
2400: --
2401: -- The primary key is invalid therefore we must error
2402: --
2403: fnd_message.set_name('PAY','HR_7220_INVALID_PRIMARY_KEY');
2404: fnd_message.raise_error;
2405: --
2406: end if;
2407: --
2408: close csr_leg_code;