44: Begin
45: --
46: hr_utility.set_location('Entering:'||l_proc, 5);
47: --
48: l_api_updating := ben_opt_shd.api_updating
49: (p_effective_date => p_effective_date,
50: p_opt_id => p_opt_id,
51: p_object_version_number => p_object_version_number);
52: --
51: p_object_version_number => p_object_version_number);
52: --
53: if (l_api_updating
54: and nvl(p_opt_id,hr_api.g_number)
55: <> ben_opt_shd.g_old_rec.opt_id) then
56: --
57: -- raise error as PK has changed
58: --
59: ben_opt_shd.constraint_error('BEN_OPT_F_PK');
55: <> ben_opt_shd.g_old_rec.opt_id) then
56: --
57: -- raise error as PK has changed
58: --
59: ben_opt_shd.constraint_error('BEN_OPT_F_PK');
60: --
61: elsif not l_api_updating then
62: --
63: -- check if PK is null
65: if p_opt_id is not null then
66: --
67: -- raise error as PK is not null
68: --
69: ben_opt_shd.constraint_error('BEN_OPT_F_PK');
70: --
71: end if;
72: --
73: end if;
225: end if ;
226:
227: end if ;
228: -- if the type got changed from cwb to non cwb validate the child
229: if ben_opt_shd.g_old_rec.group_opt_id is not null and p_group_opt_id is null then
230: chk_opt_group_child(p_opt_id => p_opt_id ,
231: p_name => p_name, /* Bug 4057566 */
232: p_opt_typ_cd => 'CWB' ,
233: p_effective_date => p_effective_date) ;
276: Begin
277: --
278: hr_utility.set_location('Entering:'||l_proc, 5);
279: --
280: l_api_updating := ben_opt_shd.api_updating
281: (p_opt_id => p_opt_id,
282: p_effective_date => p_effective_date,
283: p_object_version_number => p_object_version_number);
284: --
283: p_object_version_number => p_object_version_number);
284: --
285: if (l_api_updating
286: and p_invk_wv_opt_flag
287: <> nvl(ben_opt_shd.g_old_rec.invk_wv_opt_flag,hr_api.g_varchar2)
288: or not l_api_updating)
289: and p_invk_wv_opt_flag is not null then
290: --
291: -- check if value of lookup falls within lookup type.
362: Begin
363: --
364: hr_utility.set_location('Entering:'||l_proc, 5);
365: --
366: l_api_updating := ben_opt_shd.api_updating
367: (p_opt_id => p_opt_id,
368: p_effective_date => p_effective_date,
369: p_object_version_number => p_object_version_number);
370: --
369: p_object_version_number => p_object_version_number);
370: --
371: if (l_api_updating
372: and nvl(p_rqd_perd_enrt_nenrt_rl,hr_api.g_number)
373: <> nvl(ben_opt_shd.g_old_rec.rqd_perd_enrt_nenrt_rl,hr_api.g_number)
374: or not l_api_updating)
375: and p_rqd_perd_enrt_nenrt_rl is not null then
376: --
377: -- check if value of formula rule is valid.
438: Begin
439: --
440: hr_utility.set_location('Entering:'||l_proc, 5);
441: --
442: l_api_updating := ben_opt_shd.api_updating
443: (p_opt_id => p_opt_id,
444: p_effective_date => p_effective_date,
445: p_object_version_number => p_object_version_number);
446: --
445: p_object_version_number => p_object_version_number);
446: --
447: if (l_api_updating
448: and p_rqd_perd_enrt_nenrt_uom
449: <> nvl(ben_opt_shd.g_old_rec.rqd_perd_enrt_nenrt_uom,hr_api.g_varchar2)
450: or not l_api_updating)
451: and p_rqd_perd_enrt_nenrt_uom is not null then
452: --
453: -- check if value of lookup falls within lookup type.
533: -- raise error as UK1 is violated
534: --
535: fnd_message.set_name('BEN','BEN_91009_NAME_NOT_UNIQUE');
536: fnd_message.raise_error;
537: --ben_opt_shd.constraint_error('BEN_OPT_UK1');
538: --
539: end if;
540: --
541: close csr_name;
583: Begin
584: --
585: hr_utility.set_location('Entering:'||l_proc, 5);
586: --
587: l_api_updating := ben_opt_shd.api_updating
588: (p_opt_id => p_opt_id,
589: p_effective_date => p_effective_date,
590: p_object_version_number => p_object_version_number);
591: --
590: p_object_version_number => p_object_version_number);
591: --
592: if (l_api_updating
593: and p_component_reason
594: <> nvl(ben_opt_shd.g_old_rec.component_reason,hr_api.g_varchar2)
595: or not l_api_updating)
596: and p_component_reason is not null then
597: --
598: -- check if value of lookup falls within lookup type.
652: Begin
653: --
654: hr_utility.set_location('Entering:'||l_proc, 5);
655: --
656: l_api_updating := ben_opt_shd.api_updating
657: (p_opt_id => p_opt_id,
658: p_effective_date => p_effective_date,
659: p_object_version_number => p_object_version_number);
660: --
659: p_object_version_number => p_object_version_number);
660: --
661: if (l_api_updating
662: and p_mapping_table_name
663: <> nvl(ben_opt_shd.g_old_rec.mapping_table_name,hr_api.g_varchar2)
664: or not l_api_updating)
665: and p_mapping_table_name is not null then
666: --
667: -- check if value of lookup falls within lookup type.
733: Begin
734: --
735: hr_utility.set_location('Entering:'||l_proc, 5);
736: --
737: l_api_updating := ben_opt_shd.api_updating
738: (p_opt_id => p_opt_id,
739: p_effective_date => p_effective_date,
740: p_object_version_number => p_object_version_number);
741: --
740: p_object_version_number => p_object_version_number);
741: --
742: if (l_api_updating
743: and nvl(p_mapping_table_pk_id,hr_api.g_number)
744: <> nvl(ben_opt_shd.g_old_rec.mapping_table_pk_id,hr_api.g_number)
745: or not l_api_updating)
746: and p_mapping_table_pk_id is not null then
747: --
748: -- check if value of Mapping Table Primary Key Id is valid.
1095: -- ----------------------------------------------------------------------------
1096: -- |---------------------------< insert_validate >----------------------------|
1097: -- ----------------------------------------------------------------------------
1098: Procedure insert_validate
1099: (p_rec in ben_opt_shd.g_rec_type,
1100: p_effective_date in date,
1101: p_datetrack_mode in varchar2,
1102: p_validation_start_date in date,
1103: p_validation_end_date in date) is
1183: -- ----------------------------------------------------------------------------
1184: -- |---------------------------< update_validate >----------------------------|
1185: -- ----------------------------------------------------------------------------
1186: Procedure update_validate
1187: (p_rec in ben_opt_shd.g_rec_type,
1188: p_effective_date in date,
1189: p_datetrack_mode in varchar2,
1190: p_validation_start_date in date,
1191: p_validation_end_date in date) is
1280: -- ----------------------------------------------------------------------------
1281: -- |---------------------------< delete_validate >----------------------------|
1282: -- ----------------------------------------------------------------------------
1283: Procedure delete_validate
1284: (p_rec in ben_opt_shd.g_rec_type,
1285: p_effective_date in date,
1286: p_datetrack_mode in varchar2,
1287: p_validation_start_date in date,
1288: p_validation_end_date in date) is