43: --
44: l_proc := g_package||'chk_noac_la_id';
45: hr_utility.set_location('Entering:'||l_proc, 5);
46: --
47: l_api_updating := ghr_nla_shd.api_updating
48: (p_noac_la_id => p_noac_la_id,
49: p_object_version_number => p_object_version_number);
50: --
51: if (l_api_updating
49: p_object_version_number => p_object_version_number);
50: --
51: if (l_api_updating
52: and nvl(p_noac_la_id,hr_api.g_number)
53: <> ghr_nla_shd.g_old_rec.noac_la_id) then
54: --
55: -- raise error as PK has changed
56: --
57: ghr_nla_shd.constraint_error('GHR_NOAC_LAS_PK');
53: <> ghr_nla_shd.g_old_rec.noac_la_id) then
54: --
55: -- raise error as PK has changed
56: --
57: ghr_nla_shd.constraint_error('GHR_NOAC_LAS_PK');
58: --
59: elsif not l_api_updating then
60: --
61: -- check if PK is null
63: if p_noac_la_id is not null then
64: --
65: -- raise error as PK is not null
66: --
67: ghr_nla_shd.constraint_error('GHR_NOAC_LAS_PK');
68: --
69: end if;
70: --
71: end if;
115: Begin
116: --
117: hr_utility.set_location('Entering:'||l_proc,5);
118: --
119: l_api_updating := ghr_nla_shd.api_updating
120: (p_noac_la_id => p_noac_la_id,
121: p_object_version_number => p_object_version_number);
122: --
123: if (l_api_updating
121: p_object_version_number => p_object_version_number);
122: --
123: if (l_api_updating
124: and nvl(p_nature_of_action_id,hr_api.g_number)
125: <> nvl(ghr_nla_shd.g_old_rec.nature_of_action_id,hr_api.g_number)
126: or not l_api_updating) then
127: --
128: -- check if nature_of_action_id value exists in ghr_nature_of_actions table
129: --
136: --
137: -- raise error as FK does not relate to PK in ghr_nature_of_actions
138: -- table.
139: --
140: ghr_nla_shd.constraint_error('GHR_NOAC_LAS_FK1');
141: --
142: end if;
143: --
144: close c1;
187: --
188: l_proc := g_package||'chk_enabled_flag';
189: hr_utility.set_location('Entering:'||l_proc, 5);
190: --
191: l_api_updating := ghr_nla_shd.api_updating
192: (p_noac_la_id => p_noac_la_id,
193: p_object_version_number => p_object_version_number);
194: --
195: if (l_api_updating
193: p_object_version_number => p_object_version_number);
194: --
195: if (l_api_updating
196: and p_enabled_flag
197: <> nvl(ghr_nla_shd.g_old_rec.enabled_flag,hr_api.g_varchar2)
198: or not l_api_updating) then
199: --
200: -- check if value of lookup falls within lookup type.
201: --
256: --
257: l_proc := g_package||'chk_valid_second_lac_flag';
258: hr_utility.set_location('Entering:'||l_proc, 5);
259: --
260: l_api_updating := ghr_nla_shd.api_updating
261: (p_noac_la_id => p_noac_la_id,
262: p_object_version_number => p_object_version_number);
263: --
264: if (l_api_updating
262: p_object_version_number => p_object_version_number);
263: --
264: if (l_api_updating
265: and p_valid_second_lac_flag
266: <> nvl(ghr_nla_shd.g_old_rec.valid_second_lac_flag,hr_api.g_varchar2)
267: or not l_api_updating) then
268: --
269: -- check if value of lookup falls within lookup type.
270: --
325: --
326: l_proc := g_package||'chk_valid_first_lac_flag';
327: hr_utility.set_location('Entering:'||l_proc, 5);
328: --
329: l_api_updating := ghr_nla_shd.api_updating
330: (p_noac_la_id => p_noac_la_id,
331: p_object_version_number => p_object_version_number);
332: --
333: if (l_api_updating
331: p_object_version_number => p_object_version_number);
332: --
333: if (l_api_updating
334: and p_valid_first_lac_flag
335: <> nvl(ghr_nla_shd.g_old_rec.valid_first_lac_flag,hr_api.g_varchar2)
336: or not l_api_updating) then
337: --
338: -- check if value of lookup falls within lookup type.
339: --
397: --
398: l_proc := g_package||'chk_date_from';
399: hr_utility.set_location('Entering:'||l_proc, 5);
400: --
401: l_api_updating := ghr_nla_shd.api_updating
402: (p_noac_la_id => p_noac_la_id,
403: p_object_version_number => p_object_version_number);
404: --
405: if (l_api_updating
403: p_object_version_number => p_object_version_number);
404: --
405: if (l_api_updating
406: and p_date_from
407: <> nvl(ghr_nla_shd.g_old_rec.date_from,hr_api.g_date)
408: or not l_api_updating) then
409: --
410: -- check if value of date_from is not null
411: --
478: --
479: l_proc := g_package||'chk_unique_act_lac_cd';
480: hr_utility.set_location('Entering:'||l_proc, 5);
481: --
482: l_api_updating := ghr_nla_shd.api_updating
483: (p_noac_la_id => p_noac_la_id,
484: p_object_version_number => p_object_version_number);
485: --
486: hr_utility.set_location('Entering:'||l_proc, 10);
486: hr_utility.set_location('Entering:'||l_proc, 10);
487: --
488: if (l_api_updating
489: and ( p_nature_of_action_id
490: <> nvl(ghr_nla_shd.g_old_rec.nature_of_action_id,hr_api.g_number)
491: or
492: p_lac_lookup_code
493: <> nvl(ghr_nla_shd.g_old_rec.lac_lookup_code,hr_api.g_varchar2)
494: )
489: and ( p_nature_of_action_id
490: <> nvl(ghr_nla_shd.g_old_rec.nature_of_action_id,hr_api.g_number)
491: or
492: p_lac_lookup_code
493: <> nvl(ghr_nla_shd.g_old_rec.lac_lookup_code,hr_api.g_varchar2)
494: )
495: or not l_api_updating) then
496: --
497: -- check if the combination of action_id and lac_lookup_code already exits
567: --
568: l_proc := g_package||'chk_lac_lookup_code';
569: hr_utility.set_location('Entering:'||l_proc, 5);
570: --
571: l_api_updating := ghr_nla_shd.api_updating
572: (p_noac_la_id => p_noac_la_id,
573: p_object_version_number => p_object_version_number);
574: --
575: if (l_api_updating
573: p_object_version_number => p_object_version_number);
574: --
575: if (l_api_updating
576: and p_lac_lookup_code
577: <> nvl(ghr_nla_shd.g_old_rec.lac_lookup_code,hr_api.g_varchar2)
578: or not l_api_updating) then
579: --
580: -- check if value of lookup falls within lookup type.
581: --
600: --
601: -- ----------------------------------------------------------------------------
602: -- |---------------------------< insert_validate >----------------------------|
603: -- ----------------------------------------------------------------------------
604: Procedure insert_validate(p_rec in ghr_nla_shd.g_rec_type
605: ,p_effective_date in date) is
606: --
607: l_proc varchar2(72);
608: --
669: --
670: -- ----------------------------------------------------------------------------
671: -- |---------------------------< update_validate >----------------------------|
672: -- ----------------------------------------------------------------------------
673: Procedure update_validate(p_rec in ghr_nla_shd.g_rec_type
674: ,p_effective_date in date) is
675: --
676: l_proc varchar2(72);
677: --
738: --
739: -- ----------------------------------------------------------------------------
740: -- |---------------------------< delete_validate >----------------------------|
741: -- ----------------------------------------------------------------------------
742: Procedure delete_validate(p_rec in ghr_nla_shd.g_rec_type
743: ,p_effective_date in date) is
744: --
745: l_proc varchar2(72) ;
746: --