42: Begin
43: --
44: hr_utility.set_location('Entering:'||l_proc, 5);
45: --
46: l_api_updating := pqh_rft_shd.api_updating
47: (p_ref_template_id => p_ref_template_id,
48: p_object_version_number => p_object_version_number);
49: --
50: if (l_api_updating
48: p_object_version_number => p_object_version_number);
49: --
50: if (l_api_updating
51: and nvl(p_ref_template_id,hr_api.g_number)
52: <> pqh_rft_shd.g_old_rec.ref_template_id) then
53: --
54: -- raise error as PK has changed
55: --
56: pqh_rft_shd.constraint_error('PQH_REF_TEMPLATES_PK');
52: <> pqh_rft_shd.g_old_rec.ref_template_id) then
53: --
54: -- raise error as PK has changed
55: --
56: pqh_rft_shd.constraint_error('PQH_REF_TEMPLATES_PK');
57: --
58: elsif not l_api_updating then
59: --
60: -- check if PK is null
62: if p_ref_template_id is not null then
63: --
64: -- raise error as PK is not null
65: --
66: pqh_rft_shd.constraint_error('PQH_REF_TEMPLATES_PK');
67: --
68: end if;
69: --
70: end if;
120: Begin
121: --
122: hr_utility.set_location('Entering:'||l_proc,5);
123: --
124: l_api_updating := pqh_rft_shd.api_updating
125: (p_ref_template_id => p_ref_template_id,
126: p_object_version_number => p_object_version_number);
127: --
128: if (l_api_updating
126: p_object_version_number => p_object_version_number);
127: --
128: if (l_api_updating
129: and nvl(p_base_template_id,hr_api.g_number)
130: <> nvl(pqh_rft_shd.g_old_rec.base_template_id,hr_api.g_number)
131: or not l_api_updating) then
132:
133: --
134: -- check if base_template_id value exists in pqh_templates table
143: --
144: -- raise error as FK does not relate to PK in pqh_templates
145: -- table.
146: --
147: pqh_rft_shd.constraint_error('PQH_REF_TEMPLATES_FK2');
148: --
149: end if;
150: --
151: close c1;
220: Begin
221: --
222: hr_utility.set_location('Entering:'||l_proc,5);
223: --
224: l_api_updating := pqh_rft_shd.api_updating
225: (p_ref_template_id => p_ref_template_id,
226: p_object_version_number => p_object_version_number);
227: --
228: if (l_api_updating
226: p_object_version_number => p_object_version_number);
227: --
228: if (l_api_updating
229: and nvl(p_parent_template_id,hr_api.g_number)
230: <> nvl(pqh_rft_shd.g_old_rec.parent_template_id,hr_api.g_number)
231: or not l_api_updating) and
232: p_parent_template_id is not null then
233: --
234: -- check if parent_template_id value exists in pqh_templates table
242: --
243: -- raise error as FK does not relate to PK in pqh_templates
244: -- table.
245: --
246: pqh_rft_shd.constraint_error('PQH_REF_TEMPLATES_FK1');
247: --
248: end if;
249: --
250: close c1;
292: --
293: hr_utility.set_location('Entering:'||l_proc,5);
294: --
295:
296: l_api_updating := pqh_rft_shd.api_updating
297: (p_ref_template_id => p_ref_template_id,
298: p_object_version_number => p_object_version_number);
299: --
300: if (l_api_updating
298: p_object_version_number => p_object_version_number);
299: --
300: if (l_api_updating
301: and nvl(p_base_template_id,hr_api.g_number)
302: <> nvl(pqh_rft_shd.g_old_rec.base_template_id,hr_api.g_number)
303: or not l_api_updating) then
304: --
305: open c1(p_parent_template_id);
306: fetch c1 into l_parent_leg_code, l_parent_template_name;
371: Begin
372: --
373: hr_utility.set_location('Entering:'||l_proc, 5);
374: --
375: l_api_updating := pqh_rft_shd.api_updating
376: (p_ref_template_id => p_ref_template_id,
377: p_object_version_number => p_object_version_number);
378: --
379: if (l_api_updating
377: p_object_version_number => p_object_version_number);
378: --
379: if (l_api_updating
380: and p_reference_type_cd
381: <> nvl(pqh_rft_shd.g_old_rec.reference_type_cd,hr_api.g_varchar2)
382: or not l_api_updating) then
383: --
384: -- check if value of lookup falls within lookup type.
385: --
449: Begin
450: --
451: hr_utility.set_location('Entering:'||l_proc,5);
452: --
453: l_api_updating := pqh_rft_shd.api_updating
454: (p_ref_template_id => p_ref_template_id,
455: p_object_version_number => p_object_version_number);
456: --
457: if (l_api_updating
455: p_object_version_number => p_object_version_number);
456: --
457: if (l_api_updating
458: and nvl(p_parent_template_id,hr_api.g_number)
459: <> nvl(pqh_rft_shd.g_old_rec.parent_template_id,hr_api.g_number)
460: or not l_api_updating) and
461: p_parent_template_id is not null then
462: --
463: --
482:
483: -- ----------------------------------------------------------------------------
484: -- |---------------------------< insert_validate >----------------------------|
485: -- ----------------------------------------------------------------------------
486: Procedure insert_validate(p_rec in pqh_rft_shd.g_rec_type
487: ,p_effective_date in date) is
488: --
489: l_proc varchar2(72) := g_package||'insert_validate';
490: --
534: --
535: -- ----------------------------------------------------------------------------
536: -- |---------------------------< update_validate >----------------------------|
537: -- ----------------------------------------------------------------------------
538: Procedure update_validate(p_rec in pqh_rft_shd.g_rec_type
539: ,p_effective_date in date) is
540: --
541: l_proc varchar2(72) := g_package||'update_validate';
542: --
588: --
589: -- ----------------------------------------------------------------------------
590: -- |---------------------------< delete_validate >----------------------------|
591: -- ----------------------------------------------------------------------------
592: Procedure delete_validate(p_rec in pqh_rft_shd.g_rec_type
593: ,p_effective_date in date) is
594: --
595: l_proc varchar2(72) := g_package||'delete_validate';
596: --