50: p_elig_schedd_hrs_prte_id => p_elig_schedd_hrs_prte_id,
51: p_object_version_number => p_object_version_number);
52: --
53: if (l_api_updating
54: and nvl(p_elig_schedd_hrs_prte_id,hr_api.g_number)
55: <> ben_esh_shd.g_old_rec.elig_schedd_hrs_prte_id) then
56: --
57: -- raise error as PK has changed
58: --
120: p_object_version_number => p_object_version_number);
121: --
122: if (l_api_updating
123: and p_excld_flag
124: <> nvl(ben_esh_shd.g_old_rec.excld_flag,hr_api.g_varchar2)
125: or not l_api_updating) then
126: --
127: -- check if value of lookup falls within lookup type.
128: --
126: --
127: -- check if value of lookup falls within lookup type.
128: --
129: --
130: if hr_api.not_exists_in_hr_lookups
131: (p_lookup_type => 'YES_NO',
132: p_lookup_code => p_excld_flag,
133: p_effective_date => p_effective_date) then
134: --
248: --
249: cursor c3 is
250: select null
251: from ben_elig_schedd_hrs_prte_f
252: where nvl(freq_cd,hr_api.g_number) = nvl(p_freq_cd,hr_api.g_number)
253: and nvl(hrs_num,hr_api.g_number) = nvl(p_hrs_num,hr_api.g_number)
254: and nvl(max_hrs_num,hr_api.g_number) = nvl(p_max_hrs_num,hr_api.g_number)
255: and nvl(schedd_hrs_rl,hr_api.g_number) = nvl(p_schedd_hrs_rl,hr_api.g_number)
256: and eligy_prfl_id = p_eligy_prfl_id
249: cursor c3 is
250: select null
251: from ben_elig_schedd_hrs_prte_f
252: where nvl(freq_cd,hr_api.g_number) = nvl(p_freq_cd,hr_api.g_number)
253: and nvl(hrs_num,hr_api.g_number) = nvl(p_hrs_num,hr_api.g_number)
254: and nvl(max_hrs_num,hr_api.g_number) = nvl(p_max_hrs_num,hr_api.g_number)
255: and nvl(schedd_hrs_rl,hr_api.g_number) = nvl(p_schedd_hrs_rl,hr_api.g_number)
256: and eligy_prfl_id = p_eligy_prfl_id
257: and elig_schedd_hrs_prte_id <> nvl(p_elig_schedd_hrs_prte_id,hr_api.g_number)
250: select null
251: from ben_elig_schedd_hrs_prte_f
252: where nvl(freq_cd,hr_api.g_number) = nvl(p_freq_cd,hr_api.g_number)
253: and nvl(hrs_num,hr_api.g_number) = nvl(p_hrs_num,hr_api.g_number)
254: and nvl(max_hrs_num,hr_api.g_number) = nvl(p_max_hrs_num,hr_api.g_number)
255: and nvl(schedd_hrs_rl,hr_api.g_number) = nvl(p_schedd_hrs_rl,hr_api.g_number)
256: and eligy_prfl_id = p_eligy_prfl_id
257: and elig_schedd_hrs_prte_id <> nvl(p_elig_schedd_hrs_prte_id,hr_api.g_number)
258: and business_group_id + 0 = p_business_group_id
251: from ben_elig_schedd_hrs_prte_f
252: where nvl(freq_cd,hr_api.g_number) = nvl(p_freq_cd,hr_api.g_number)
253: and nvl(hrs_num,hr_api.g_number) = nvl(p_hrs_num,hr_api.g_number)
254: and nvl(max_hrs_num,hr_api.g_number) = nvl(p_max_hrs_num,hr_api.g_number)
255: and nvl(schedd_hrs_rl,hr_api.g_number) = nvl(p_schedd_hrs_rl,hr_api.g_number)
256: and eligy_prfl_id = p_eligy_prfl_id
257: and elig_schedd_hrs_prte_id <> nvl(p_elig_schedd_hrs_prte_id,hr_api.g_number)
258: and business_group_id + 0 = p_business_group_id
259: and p_validation_start_date <= effective_end_date
253: and nvl(hrs_num,hr_api.g_number) = nvl(p_hrs_num,hr_api.g_number)
254: and nvl(max_hrs_num,hr_api.g_number) = nvl(p_max_hrs_num,hr_api.g_number)
255: and nvl(schedd_hrs_rl,hr_api.g_number) = nvl(p_schedd_hrs_rl,hr_api.g_number)
256: and eligy_prfl_id = p_eligy_prfl_id
257: and elig_schedd_hrs_prte_id <> nvl(p_elig_schedd_hrs_prte_id,hr_api.g_number)
258: and business_group_id + 0 = p_business_group_id
259: and p_validation_start_date <= effective_end_date
260: and p_validation_end_date >= effective_start_date
261: ;
271: p_object_version_number => p_object_version_number);
272: --
273: /* if (l_api_updating
274: and p_freq_cd
275: <> nvl(ben_esh_shd.g_old_rec.freq_cd,hr_api.g_varchar2)
276: or not l_api_updating)
277: and p_freq_cd is not null then
278: */
279: --
349: p_object_version_number => p_object_version_number);
350: --
351: if (l_api_updating
352: and p_freq_cd
353: <> nvl(ben_esh_shd.g_old_rec.freq_cd,hr_api.g_varchar2)
354: or not l_api_updating)
355: and p_freq_cd is not null then
356: --
357: -- check if value of lookup falls within lookup type.
355: and p_freq_cd is not null then
356: --
357: -- check if value of lookup falls within lookup type.
358: --
359: if hr_api.not_exists_in_hr_lookups
360: (p_lookup_type => 'FREQUENCY',
361: p_lookup_code => p_freq_cd,
362: p_effective_date => p_effective_date) then
363: --
427: p_object_version_number => p_object_version_number);
428: --
429: if (l_api_updating
430: and p_determination_cd
431: <> nvl(ben_esh_shd.g_old_rec.determination_cd,hr_api.g_varchar2)
432: or not l_api_updating)
433: and p_determination_cd is not null then
434: --
435: -- check if value of lookup falls within lookup type.
433: and p_determination_cd is not null then
434: --
435: -- check if value of lookup falls within lookup type.
436: --
437: if hr_api.not_exists_in_hr_lookups
438: (p_lookup_type => 'BEN_LOS_DET',
439: p_lookup_code => p_determination_cd,
440: p_effective_date => p_effective_date) then
441: --
445: fnd_message.raise_error;
446: --
447: end if;
448: --
449: if nvl(p_determination_cd,hr_api.g_number)='RL' and p_determination_rl is null then
450: -- raise error as rule is specified, but code is not 'RL'
451: --
452: fnd_message.set_name('BEN','BEN_91098_LOS_DET_RL_NULL');
453: fnd_message.raise_error;
453: fnd_message.raise_error;
454: --
455: end if;
456:
457: if p_determination_rl is not null and nvl(p_determination_cd,hr_api.g_varchar2) <> 'RL' then
458: -- raise error as rule is specified, but code is not 'RL'
459: --
460: fnd_message.set_name('BEN','BEN_91071_LOS_DET_RL_NOT_NULL');
461: fnd_message.raise_error;
519: p_object_version_number => p_object_version_number);
520: --
521: if (l_api_updating
522: and p_rounding_cd
523: <> nvl(ben_esh_shd.g_old_rec.rounding_cd,hr_api.g_varchar2)
524: or not l_api_updating)
525: and p_rounding_cd is not null then
526: --
527: if nvl(p_rounding_cd,hr_api.g_number)='RL' and p_rounding_rl is null then
523: <> nvl(ben_esh_shd.g_old_rec.rounding_cd,hr_api.g_varchar2)
524: or not l_api_updating)
525: and p_rounding_cd is not null then
526: --
527: if nvl(p_rounding_cd,hr_api.g_number)='RL' and p_rounding_rl is null then
528: -- raise error as rule is specified, but code is not 'RL'
529: --
530: fnd_message.set_name('BEN','BEN_91733_RNDG_RULE');
531: fnd_message.raise_error;
531: fnd_message.raise_error;
532: --
533: end if;
534:
535: if p_rounding_rl is not null and nvl(p_rounding_cd,hr_api.g_varchar2) <> 'RL' then
536: -- raise error as rule is specified, but code is not 'RL'
537: --
538: fnd_message.set_name('BEN','BEN_91043_RNDG_RL_NOT_NULL');
539: fnd_message.raise_error;
542:
543:
544: -- check if value of lookup falls within lookup type.
545: --
546: if hr_api.not_exists_in_hr_lookups
547: (p_lookup_type => 'BEN_RNDG',
548: p_lookup_code => p_rounding_cd,
549: p_effective_date => p_effective_date) then
550: --
674: p_object_version_number => p_object_version_number);
675: --
676: if (l_api_updating
677: and p_determination_rl
678: <> nvl(ben_esh_shd.g_old_rec.determination_rl,hr_api.g_number)
679: or not l_api_updating)
680: -- and p_determination_cd is not null
681: and p_determination_rl is not null then
682: --
681: and p_determination_rl is not null then
682: --
683: -- check if formula exists.
684: --
685: if p_determination_rl is not null and nvl(p_determination_cd,hr_api.g_varchar2) <> 'RL' then
686: -- raise error as rule is specified, but code is not 'RL'
687: --
688: fnd_message.set_name('BEN','BEN_91071_LOS_DET_RL_NOT_NULL');
689: fnd_message.raise_error;
689: fnd_message.raise_error;
690: --
691: end if;
692:
693: if nvl(p_determination_cd,hr_api.g_number)='RL' and p_determination_rl is null then
694: -- raise error as rule is specified, but code is not 'RL'
695: --
696: fnd_message.set_name('BEN','BEN_91098_LOS_DET_RL_NULL');
697: fnd_message.raise_error;
697: fnd_message.raise_error;
698: --
699: end if;
700:
701: if nvl(p_determination_cd,hr_api.g_varchar2)='RL' then
702: if not match_formula_type(p_rl => p_determination_rl,
703: p_formula_type_id => -170,p_effective_date => p_effective_date) then
704: --
705: -- raise error as forumula type not exists
768: p_object_version_number => p_object_version_number);
769: --
770: if (l_api_updating
771: and p_rounding_rl
772: <> nvl(ben_esh_shd.g_old_rec.rounding_rl,hr_api.g_number)
773: or not l_api_updating)
774: -- and p_rounding_cd is not null
775: and p_rounding_rl is not null then
776: --
774: -- and p_rounding_cd is not null
775: and p_rounding_rl is not null then
776: --
777:
778: if p_rounding_rl is not null and nvl(p_rounding_cd,hr_api.g_varchar2) <> 'RL' then
779: -- raise error as rule is specified, but code is not 'RL'
780:
781: fnd_message.set_name('BEN','BEN_91043_RNDG_RL_NOT_NULL');
782: fnd_message.raise_error;
782: fnd_message.raise_error;
783: --
784: end if;
785:
786: if nvl(p_rounding_cd,hr_api.g_number)='RL' and p_rounding_rl is null then
787: -- raise error as rule is specified, but code is not 'RL'
788: --
789: fnd_message.set_name('BEN','BEN_91733_RNDG_RULE');
790: fnd_message.raise_error;
790: fnd_message.raise_error;
791: --
792: end if;
793:
794: if nvl(p_rounding_cd,hr_api.g_varchar2)='RL' then
795: if not match_formula_type(p_rl => p_rounding_rl,
796: p_formula_type_id => -169,p_effective_date => p_effective_date) then
797: -- raise error as forumula type not exists
798: --
856: p_object_version_number => p_object_version_number);
857: --
858: if (l_api_updating
859: and p_schedd_hrs_rl
860: <> nvl(ben_esh_shd.g_old_rec.schedd_hrs_rl,hr_api.g_number)
861: or not l_api_updating)
862: and p_schedd_hrs_rl is not null then
863: --
864: -- check if formula exists.
927: (p_elig_schedd_hrs_prte_id => p_elig_schedd_hrs_prte_id,
928: p_effective_date => p_effective_date,
929: p_object_version_number => p_object_version_number);
930: --
931: if (l_api_updating and p_hrs_num <> nvl(ben_esh_shd.g_old_rec.hrs_num,hr_api.g_number))
932: or (l_api_updating and p_max_hrs_num <> nvl(ben_esh_shd.g_old_rec.max_hrs_num,hr_api.g_number))
933: or (l_api_updating and p_freq_cd <> nvl(ben_esh_shd.g_old_rec.freq_cd,hr_api.g_varchar2))
934: or not l_api_updating
935: or (nvl(p_hrs_num,hr_api.g_number) is not null and nvl(p_max_hrs_num,hr_api.g_number) is not null) then
928: p_effective_date => p_effective_date,
929: p_object_version_number => p_object_version_number);
930: --
931: if (l_api_updating and p_hrs_num <> nvl(ben_esh_shd.g_old_rec.hrs_num,hr_api.g_number))
932: or (l_api_updating and p_max_hrs_num <> nvl(ben_esh_shd.g_old_rec.max_hrs_num,hr_api.g_number))
933: or (l_api_updating and p_freq_cd <> nvl(ben_esh_shd.g_old_rec.freq_cd,hr_api.g_varchar2))
934: or not l_api_updating
935: or (nvl(p_hrs_num,hr_api.g_number) is not null and nvl(p_max_hrs_num,hr_api.g_number) is not null) then
936: --
929: p_object_version_number => p_object_version_number);
930: --
931: if (l_api_updating and p_hrs_num <> nvl(ben_esh_shd.g_old_rec.hrs_num,hr_api.g_number))
932: or (l_api_updating and p_max_hrs_num <> nvl(ben_esh_shd.g_old_rec.max_hrs_num,hr_api.g_number))
933: or (l_api_updating and p_freq_cd <> nvl(ben_esh_shd.g_old_rec.freq_cd,hr_api.g_varchar2))
934: or not l_api_updating
935: or (nvl(p_hrs_num,hr_api.g_number) is not null and nvl(p_max_hrs_num,hr_api.g_number) is not null) then
936: --
937: hr_utility.set_location('Inside:'||l_proc,8);
931: if (l_api_updating and p_hrs_num <> nvl(ben_esh_shd.g_old_rec.hrs_num,hr_api.g_number))
932: or (l_api_updating and p_max_hrs_num <> nvl(ben_esh_shd.g_old_rec.max_hrs_num,hr_api.g_number))
933: or (l_api_updating and p_freq_cd <> nvl(ben_esh_shd.g_old_rec.freq_cd,hr_api.g_varchar2))
934: or not l_api_updating
935: or (nvl(p_hrs_num,hr_api.g_number) is not null and nvl(p_max_hrs_num,hr_api.g_number) is not null) then
936: --
937: hr_utility.set_location('Inside:'||l_proc,8);
938:
939: -- check if min or max is null, if freq_cd is specified
956:
957:
958: -- check if value of min hours is greater than max hours
959: if not (p_hrs_num is null or p_max_hrs_num is null) then
960: if nvl(p_hrs_num,hr_api.g_number) > nvl(p_max_hrs_num,hr_api.g_number) then
961: fnd_message.set_name('BEN', 'BEN_91069_INVALID_MIN_MAX');
962: fnd_message.raise_error;
963: end if;
964:
1002: --
1003: -- {End Of Comments}
1004: -- ----------------------------------------------------------------------------
1005: Procedure dt_update_validate
1006: (p_eligy_prfl_id in number default hr_api.g_number,
1007: p_datetrack_mode in varchar2,
1008: p_validation_start_date in date,
1009: p_validation_end_date in date) Is
1010: --
1016: hr_utility.set_location('Entering:'||l_proc, 5);
1017: --
1018: -- Ensure that the p_datetrack_mode argument is not null
1019: --
1020: hr_api.mandatory_arg_error
1021: (p_api_name => l_proc,
1022: p_argument => 'datetrack_mode',
1023: p_argument_value => p_datetrack_mode);
1024: --
1028: --
1029: --
1030: -- Ensure the arguments are not null
1031: --
1032: hr_api.mandatory_arg_error
1033: (p_api_name => l_proc,
1034: p_argument => 'validation_start_date',
1035: p_argument_value => p_validation_start_date);
1036: --
1033: (p_api_name => l_proc,
1034: p_argument => 'validation_start_date',
1035: p_argument_value => p_validation_start_date);
1036: --
1037: hr_api.mandatory_arg_error
1038: (p_api_name => l_proc,
1039: p_argument => 'validation_end_date',
1040: p_argument_value => p_validation_end_date);
1041: --
1038: (p_api_name => l_proc,
1039: p_argument => 'validation_end_date',
1040: p_argument_value => p_validation_end_date);
1041: --
1042: If ((nvl(p_eligy_prfl_id, hr_api.g_number) <> hr_api.g_number) and
1043: NOT (dt_api.check_min_max_dates
1044: (p_base_table_name => 'ben_eligy_prfl_f',
1045: p_base_key_column => 'eligy_prfl_id',
1046: p_base_key_value => p_eligy_prfl_id,
1122: hr_utility.set_location('Entering:'||l_proc, 5);
1123: --
1124: -- Ensure that the p_datetrack_mode argument is not null
1125: --
1126: hr_api.mandatory_arg_error
1127: (p_api_name => l_proc,
1128: p_argument => 'datetrack_mode',
1129: p_argument_value => p_datetrack_mode);
1130: --
1136: --
1137: --
1138: -- Ensure the arguments are not null
1139: --
1140: hr_api.mandatory_arg_error
1141: (p_api_name => l_proc,
1142: p_argument => 'validation_start_date',
1143: p_argument_value => p_validation_start_date);
1144: --
1141: (p_api_name => l_proc,
1142: p_argument => 'validation_start_date',
1143: p_argument_value => p_validation_start_date);
1144: --
1145: hr_api.mandatory_arg_error
1146: (p_api_name => l_proc,
1147: p_argument => 'validation_end_date',
1148: p_argument_value => p_validation_end_date);
1149: --
1146: (p_api_name => l_proc,
1147: p_argument => 'validation_end_date',
1148: p_argument_value => p_validation_end_date);
1149: --
1150: hr_api.mandatory_arg_error
1151: (p_api_name => l_proc,
1152: p_argument => 'elig_schedd_hrs_prte_id',
1153: p_argument_value => p_elig_schedd_hrs_prte_id);
1154: --
1194: --
1195: -- Call all supporting business operations
1196: --
1197: --
1198: hr_api.validate_bus_grp_id(p_rec.business_group_id); -- Validate Bus Grp
1199: --
1200: chk_elig_schedd_hrs_prte_id
1201: (p_elig_schedd_hrs_prte_id => p_rec.elig_schedd_hrs_prte_id,
1202: p_effective_date => p_effective_date,
1299: --
1300: -- Call all supporting business operations
1301: --
1302: --
1303: hr_api.validate_bus_grp_id(p_rec.business_group_id); -- Validate Bus Grp
1304: --
1305: chk_elig_schedd_hrs_prte_id
1306: (p_elig_schedd_hrs_prte_id => p_rec.elig_schedd_hrs_prte_id,
1307: p_effective_date => p_effective_date,
1448: hr_utility.set_location('Entering:'|| l_proc, 10);
1449: --
1450: -- Ensure that all the mandatory parameter are not null
1451: --
1452: hr_api.mandatory_arg_error(p_api_name => l_proc,
1453: p_argument => 'elig_schedd_hrs_prte_id',
1454: p_argument_value => p_elig_schedd_hrs_prte_id);
1455: --
1456: open csr_leg_code;