40: l_api_updating boolean;
41: --
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);
68: end if;
69: --
70: end if;
71: --
72: hr_utility.set_location('Leaving:'||l_proc, 10);
73: --
74: End chk_ref_template_id;
75: --
76: -- ----------------------------------------------------------------------------
118: where a.template_id = p_base_template_id;
119: --
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);
153: -- The referenced template must be enabled .
154: --
155: if l_enable_flag <> 'Y' then
156: if p_reference_type_cd = 'REFERENCE' then
157: hr_utility.set_message(8302,'PQH_RFT_NOT_ENABLED');
158: hr_utility.raise_error;
159: Else
160: hr_utility.set_message(8302,'PQH_COPY_TEM_NOT_ENABLED');
161: hr_utility.raise_error;
154: --
155: if l_enable_flag <> 'Y' then
156: if p_reference_type_cd = 'REFERENCE' then
157: hr_utility.set_message(8302,'PQH_RFT_NOT_ENABLED');
158: hr_utility.raise_error;
159: Else
160: hr_utility.set_message(8302,'PQH_COPY_TEM_NOT_ENABLED');
161: hr_utility.raise_error;
162: End if;
156: if p_reference_type_cd = 'REFERENCE' then
157: hr_utility.set_message(8302,'PQH_RFT_NOT_ENABLED');
158: hr_utility.raise_error;
159: Else
160: hr_utility.set_message(8302,'PQH_COPY_TEM_NOT_ENABLED');
161: hr_utility.raise_error;
162: End if;
163: end if;
164: --
157: hr_utility.set_message(8302,'PQH_RFT_NOT_ENABLED');
158: hr_utility.raise_error;
159: Else
160: hr_utility.set_message(8302,'PQH_COPY_TEM_NOT_ENABLED');
161: hr_utility.raise_error;
162: End if;
163: end if;
164: --
165: -- Can refernce only templates marked as reference templates.
164: --
165: -- Can refernce only templates marked as reference templates.
166: --
167: if p_reference_type_cd = 'REFERENCE' and l_attribute_only_flag <> 'Y' then
168: hr_utility.set_message(8302,'PQH_INVALID_RFT');
169: hr_utility.raise_error;
170: end if;
171:
172: end if;
165: -- Can refernce only templates marked as reference templates.
166: --
167: if p_reference_type_cd = 'REFERENCE' and l_attribute_only_flag <> 'Y' then
168: hr_utility.set_message(8302,'PQH_INVALID_RFT');
169: hr_utility.raise_error;
170: end if;
171:
172: end if;
173: --
170: end if;
171:
172: end if;
173: --
174: hr_utility.set_location('Leaving:'||l_proc,10);
175: --
176: End chk_base_template_id;
177: --
178: -- ----------------------------------------------------------------------------
218: where a.template_id = p_parent_template_id;
219: --
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);
252: -- If inserting reference template to a parent reference template
253: -- raise error
254: --
255: if l_attribute_only_flag = 'Y' and p_reference_type_cd = 'REFERENCE' then
256: hr_utility.set_message(8302,'PQH_PARENT_TEM_IS_ATTR_ONLY');
257: hr_utility.raise_error;
258: End if;
259: --
260: end if;
253: -- raise error
254: --
255: if l_attribute_only_flag = 'Y' and p_reference_type_cd = 'REFERENCE' then
256: hr_utility.set_message(8302,'PQH_PARENT_TEM_IS_ATTR_ONLY');
257: hr_utility.raise_error;
258: End if;
259: --
260: end if;
261: --
259: --
260: end if;
261: --
262: if l_freeze_status_cd = 'FREEZE_TEMPLATE' then
263: hr_utility.set_message(8302,'PQH_NO_ADD_REF_TO_PARENT');
264: hr_utility.raise_error;
265: end if;
266: hr_utility.set_location('Leaving:'||l_proc,10);
267: --
260: end if;
261: --
262: if l_freeze_status_cd = 'FREEZE_TEMPLATE' then
263: hr_utility.set_message(8302,'PQH_NO_ADD_REF_TO_PARENT');
264: hr_utility.raise_error;
265: end if;
266: hr_utility.set_location('Leaving:'||l_proc,10);
267: --
268: End chk_parent_template_id;
262: if l_freeze_status_cd = 'FREEZE_TEMPLATE' then
263: hr_utility.set_message(8302,'PQH_NO_ADD_REF_TO_PARENT');
264: hr_utility.raise_error;
265: end if;
266: hr_utility.set_location('Leaving:'||l_proc,10);
267: --
268: End chk_parent_template_id;
269: --
270: -- Check the compatability of the legislation code of the parent/base templates
289: where template_id = p_template_id;
290: --
291: Begin
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,
310: close c1;
311: --
312: if l_parent_leg_code is null then
313: if l_base_leg_code is not null then
314: hr_utility.set_message(8302,'PQH_NO_LEG_REF_TEM');
315: hr_utility.set_message_token('REF_TEMPLATE', l_base_template_name);
316: hr_utility.set_message_token('PARENT_TEMPLATE', l_parent_template_name);
317: hr_utility.raise_error;
318: end if;
311: --
312: if l_parent_leg_code is null then
313: if l_base_leg_code is not null then
314: hr_utility.set_message(8302,'PQH_NO_LEG_REF_TEM');
315: hr_utility.set_message_token('REF_TEMPLATE', l_base_template_name);
316: hr_utility.set_message_token('PARENT_TEMPLATE', l_parent_template_name);
317: hr_utility.raise_error;
318: end if;
319: else
312: if l_parent_leg_code is null then
313: if l_base_leg_code is not null then
314: hr_utility.set_message(8302,'PQH_NO_LEG_REF_TEM');
315: hr_utility.set_message_token('REF_TEMPLATE', l_base_template_name);
316: hr_utility.set_message_token('PARENT_TEMPLATE', l_parent_template_name);
317: hr_utility.raise_error;
318: end if;
319: else
320: if nvl(l_base_leg_code,l_parent_leg_code) <> l_parent_leg_code then
313: if l_base_leg_code is not null then
314: hr_utility.set_message(8302,'PQH_NO_LEG_REF_TEM');
315: hr_utility.set_message_token('REF_TEMPLATE', l_base_template_name);
316: hr_utility.set_message_token('PARENT_TEMPLATE', l_parent_template_name);
317: hr_utility.raise_error;
318: end if;
319: else
320: if nvl(l_base_leg_code,l_parent_leg_code) <> l_parent_leg_code then
321: hr_utility.set_message(8302,'PQH_REF_TEM_LEG_NE_PAR_TEM');
317: hr_utility.raise_error;
318: end if;
319: else
320: if nvl(l_base_leg_code,l_parent_leg_code) <> l_parent_leg_code then
321: hr_utility.set_message(8302,'PQH_REF_TEM_LEG_NE_PAR_TEM');
322: hr_utility.set_message_token('REF_TEMPLATE', l_base_template_name);
323: hr_utility.set_message_token('PARENT_TEMPLATE', l_parent_template_name);
324: hr_utility.raise_error;
325: end if;
318: end if;
319: else
320: if nvl(l_base_leg_code,l_parent_leg_code) <> l_parent_leg_code then
321: hr_utility.set_message(8302,'PQH_REF_TEM_LEG_NE_PAR_TEM');
322: hr_utility.set_message_token('REF_TEMPLATE', l_base_template_name);
323: hr_utility.set_message_token('PARENT_TEMPLATE', l_parent_template_name);
324: hr_utility.raise_error;
325: end if;
326: end if;
319: else
320: if nvl(l_base_leg_code,l_parent_leg_code) <> l_parent_leg_code then
321: hr_utility.set_message(8302,'PQH_REF_TEM_LEG_NE_PAR_TEM');
322: hr_utility.set_message_token('REF_TEMPLATE', l_base_template_name);
323: hr_utility.set_message_token('PARENT_TEMPLATE', l_parent_template_name);
324: hr_utility.raise_error;
325: end if;
326: end if;
327: --
320: if nvl(l_base_leg_code,l_parent_leg_code) <> l_parent_leg_code then
321: hr_utility.set_message(8302,'PQH_REF_TEM_LEG_NE_PAR_TEM');
322: hr_utility.set_message_token('REF_TEMPLATE', l_base_template_name);
323: hr_utility.set_message_token('PARENT_TEMPLATE', l_parent_template_name);
324: hr_utility.raise_error;
325: end if;
326: end if;
327: --
328: --
327: --
328: --
329: end if;
330: --
331: hr_utility.set_location('Leaving:'||l_proc,10);
332: --
333: End chk_legislation_code;
334: --
335: --
369: l_api_updating boolean;
370: --
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);
389: p_effective_date => p_effective_date) then
390: --
391: -- raise error as does not exist as lookup
392: --
393: hr_utility.set_message(801,'HR_LOOKUP_DOES_NOT_EXIST');
394: hr_utility.raise_error;
395: --
396: end if;
397: --
390: --
391: -- raise error as does not exist as lookup
392: --
393: hr_utility.set_message(801,'HR_LOOKUP_DOES_NOT_EXIST');
394: hr_utility.raise_error;
395: --
396: end if;
397: --
398: end if;
396: end if;
397: --
398: end if;
399: --
400: hr_utility.set_location('Leaving:'||l_proc,10);
401: --
402: end chk_reference_type_cd;
403: --
404: --
447: from pqh_templates a
448: where a.template_id = p_base_template_id;
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);
470: close c2;
471: --
472:
473: if l_base_tct <> l_parent_tct then
474: hr_utility.set_message(8302,'PQH_RFT_TCT_MISMATCH');
475: hr_utility.raise_error;
476: End if;
477: end if;
478: --
471: --
472:
473: if l_base_tct <> l_parent_tct then
474: hr_utility.set_message(8302,'PQH_RFT_TCT_MISMATCH');
475: hr_utility.raise_error;
476: End if;
477: end if;
478: --
479: hr_utility.set_location('Leaving:'||l_proc,10);
475: hr_utility.raise_error;
476: End if;
477: end if;
478: --
479: hr_utility.set_location('Leaving:'||l_proc,10);
480: --
481: End chk_rft_tct;
482:
483: -- ----------------------------------------------------------------------------
488: --
489: l_proc varchar2(72) := g_package||'insert_validate';
490: --
491: Begin
492: hr_utility.set_location('Entering:'||l_proc, 5);
493: --
494: -- Call all supporting business operations
495: --
496: chk_ref_template_id
528: p_parent_template_id => p_rec.parent_template_id,
529: p_base_template_id => p_rec.base_template_id,
530: p_object_version_number => p_rec.object_version_number);
531: --
532: hr_utility.set_location(' Leaving:'||l_proc, 10);
533: End insert_validate;
534: --
535: -- ----------------------------------------------------------------------------
536: -- |---------------------------< update_validate >----------------------------|
540: --
541: l_proc varchar2(72) := g_package||'update_validate';
542: --
543: Begin
544: hr_utility.set_location('Entering:'||l_proc, 5);
545: --
546: -- Call all supporting business operations
547: --
548: chk_ref_template_id
582: p_object_version_number => p_rec.object_version_number);
583: --
584: --
585: --
586: hr_utility.set_location(' Leaving:'||l_proc, 10);
587: End update_validate;
588: --
589: -- ----------------------------------------------------------------------------
590: -- |---------------------------< delete_validate >----------------------------|
594: --
595: l_proc varchar2(72) := g_package||'delete_validate';
596: --
597: Begin
598: hr_utility.set_location('Entering:'||l_proc, 5);
599: --
600: -- Call all supporting business operations
601: --
602: hr_utility.set_location(' Leaving:'||l_proc, 10);
598: hr_utility.set_location('Entering:'||l_proc, 5);
599: --
600: -- Call all supporting business operations
601: --
602: hr_utility.set_location(' Leaving:'||l_proc, 10);
603: End delete_validate;
604: --
605: end pqh_rft_bus;