42: l_api_updating boolean;
43: --
44: Begin
45: --
46: hr_utility.set_location('Entering:'||l_proc, 5);
47: --
48: l_api_updating := ben_cpo_shd.api_updating
49: (p_effective_date => p_effective_date,
50: p_popl_org_id => p_popl_org_id,
71: end if;
72: --
73: end if;
74: --
75: hr_utility.set_location('Leaving:'||l_proc, 10);
76: --
77: End chk_popl_org_id;
78: --
79: -- ----------------------------------------------------------------------------
117: where a.organization_id = p_organization_id;
118: --
119: Begin
120: --
121: hr_utility.set_location('Entering:'||l_proc,5);
122: --
123: l_api_updating := ben_cpo_shd.api_updating
124: (p_popl_org_id => p_popl_org_id,
125: p_effective_date => p_effective_date,
149: close c1;
150: --
151: end if;
152: --
153: hr_utility.set_location('Leaving:'||l_proc,10);
154: --
155: End chk_organization_id;
156: --
157: -- ----------------------------------------------------------------------------
184: l_proc varchar2(72) := g_package||'chk_pgm_pl_id';
185: --
186: Begin
187: --
188: hr_utility.set_location('Entering:'||l_proc,5);
189: --
190: -- check that only one of the foreign keys is populated.
191: --
192: if p_pgm_id is not null and
191: --
192: if p_pgm_id is not null and
193: p_pl_id is not null then
194: --
195: hr_utility.set_message(801,'PGM_OR_PL_ID_SET');
196: hr_utility.raise_error;
197: --
198: elsif p_pgm_id is null and
199: p_pl_id is null then
192: if p_pgm_id is not null and
193: p_pl_id is not null then
194: --
195: hr_utility.set_message(801,'PGM_OR_PL_ID_SET');
196: hr_utility.raise_error;
197: --
198: elsif p_pgm_id is null and
199: p_pl_id is null then
200: --
197: --
198: elsif p_pgm_id is null and
199: p_pl_id is null then
200: --
201: hr_utility.set_message(801,'PGM_OR_PL_ID_SET');
202: hr_utility.raise_error;
203: --
204: end if;
205: --
198: elsif p_pgm_id is null and
199: p_pl_id is null then
200: --
201: hr_utility.set_message(801,'PGM_OR_PL_ID_SET');
202: hr_utility.raise_error;
203: --
204: end if;
205: --
206: hr_utility.set_location('Leaving:'||l_proc,10);
202: hr_utility.raise_error;
203: --
204: end if;
205: --
206: hr_utility.set_location('Leaving:'||l_proc,10);
207: --
208: End chk_pgm_pl_id;
209:
210: -- ----------------------------------------------------------------------------
247: l_integrity_error Exception;
248: l_table_name all_tables.table_name%TYPE;
249: --
250: Begin
251: hr_utility.set_location('Entering:'||l_proc, 5);
252: --
253: -- Ensure that the p_datetrack_mode argument is not null
254: --
255: hr_api.mandatory_arg_error
296: End If;
297: --
298: End If;
299: --
300: hr_utility.set_location(' Leaving:'||l_proc, 10);
301: Exception
302: When l_integrity_error Then
303: --
304: -- A referential integrity check was violated therefore
303: --
304: -- A referential integrity check was violated therefore
305: -- we must error
306: --
307: hr_utility.set_message(801, 'HR_7216_DT_UPD_INTEGRITY_ERR');
308: hr_utility.set_message_token('TABLE_NAME', l_table_name);
309: hr_utility.raise_error;
310: When Others Then
311: --
304: -- A referential integrity check was violated therefore
305: -- we must error
306: --
307: hr_utility.set_message(801, 'HR_7216_DT_UPD_INTEGRITY_ERR');
308: hr_utility.set_message_token('TABLE_NAME', l_table_name);
309: hr_utility.raise_error;
310: When Others Then
311: --
312: -- An unhandled or unexpected error has occurred which
305: -- we must error
306: --
307: hr_utility.set_message(801, 'HR_7216_DT_UPD_INTEGRITY_ERR');
308: hr_utility.set_message_token('TABLE_NAME', l_table_name);
309: hr_utility.raise_error;
310: When Others Then
311: --
312: -- An unhandled or unexpected error has occurred which
313: -- we must report
311: --
312: -- An unhandled or unexpected error has occurred which
313: -- we must report
314: --
315: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
316: hr_utility.set_message_token('PROCEDURE', l_proc);
317: hr_utility.set_message_token('STEP','15');
318: hr_utility.raise_error;
319: End dt_update_validate;
312: -- An unhandled or unexpected error has occurred which
313: -- we must report
314: --
315: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
316: hr_utility.set_message_token('PROCEDURE', l_proc);
317: hr_utility.set_message_token('STEP','15');
318: hr_utility.raise_error;
319: End dt_update_validate;
320: --
313: -- we must report
314: --
315: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
316: hr_utility.set_message_token('PROCEDURE', l_proc);
317: hr_utility.set_message_token('STEP','15');
318: hr_utility.raise_error;
319: End dt_update_validate;
320: --
321: -- ----------------------------------------------------------------------------
314: --
315: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
316: hr_utility.set_message_token('PROCEDURE', l_proc);
317: hr_utility.set_message_token('STEP','15');
318: hr_utility.raise_error;
319: End dt_update_validate;
320: --
321: -- ----------------------------------------------------------------------------
322: -- |--------------------------< dt_delete_validate >--------------------------|
363: l_rows_exist Exception;
364: l_table_name all_tables.table_name%TYPE;
365: --
366: Begin
367: hr_utility.set_location('Entering:'||l_proc, 5);
368: --
369: -- Ensure that the p_datetrack_mode argument is not null
370: --
371: hr_api.mandatory_arg_error
400: --
401: --
402: End If;
403: --
404: hr_utility.set_location(' Leaving:'||l_proc, 10);
405: Exception
406: When l_rows_exist Then
407: --
408: -- A referential integrity check was violated therefore
407: --
408: -- A referential integrity check was violated therefore
409: -- we must error
410: --
411: hr_utility.set_message(801, 'HR_7215_DT_CHILD_EXISTS');
412: hr_utility.set_message_token('TABLE_NAME', l_table_name);
413: hr_utility.raise_error;
414: When Others Then
415: --
408: -- A referential integrity check was violated therefore
409: -- we must error
410: --
411: hr_utility.set_message(801, 'HR_7215_DT_CHILD_EXISTS');
412: hr_utility.set_message_token('TABLE_NAME', l_table_name);
413: hr_utility.raise_error;
414: When Others Then
415: --
416: -- An unhandled or unexpected error has occurred which
409: -- we must error
410: --
411: hr_utility.set_message(801, 'HR_7215_DT_CHILD_EXISTS');
412: hr_utility.set_message_token('TABLE_NAME', l_table_name);
413: hr_utility.raise_error;
414: When Others Then
415: --
416: -- An unhandled or unexpected error has occurred which
417: -- we must report
415: --
416: -- An unhandled or unexpected error has occurred which
417: -- we must report
418: --
419: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
420: hr_utility.set_message_token('PROCEDURE', l_proc);
421: hr_utility.set_message_token('STEP','15');
422: hr_utility.raise_error;
423: End dt_delete_validate;
416: -- An unhandled or unexpected error has occurred which
417: -- we must report
418: --
419: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
420: hr_utility.set_message_token('PROCEDURE', l_proc);
421: hr_utility.set_message_token('STEP','15');
422: hr_utility.raise_error;
423: End dt_delete_validate;
424: --
417: -- we must report
418: --
419: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
420: hr_utility.set_message_token('PROCEDURE', l_proc);
421: hr_utility.set_message_token('STEP','15');
422: hr_utility.raise_error;
423: End dt_delete_validate;
424: --
425: -- ----------------------------------------------------------------------------
418: --
419: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
420: hr_utility.set_message_token('PROCEDURE', l_proc);
421: hr_utility.set_message_token('STEP','15');
422: hr_utility.raise_error;
423: End dt_delete_validate;
424: --
425: -- ----------------------------------------------------------------------------
426: -- |---------------------------< insert_validate >----------------------------|
434: --
435: l_proc varchar2(72) := g_package||'insert_validate';
436: --
437: Begin
438: hr_utility.set_location('Entering:'||l_proc, 5);
439: --
440: -- Call all supporting business operations
441: --
442: --
457: (p_pgm_id => p_rec.pgm_id,
458: p_pl_id => p_rec.pl_id);
459: --
460:
461: hr_utility.set_location(' Leaving:'||l_proc, 10);
462: End insert_validate;
463: --
464: -- ----------------------------------------------------------------------------
465: -- |---------------------------< update_validate >----------------------------|
473: --
474: l_proc varchar2(72) := g_package||'update_validate';
475: --
476: Begin
477: hr_utility.set_location('Entering:'||l_proc, 5);
478: --
479: -- Call all supporting business operations
480: --
481: --
506: p_validation_start_date => p_validation_start_date,
507: p_validation_end_date => p_validation_end_date);
508: --
509:
510: hr_utility.set_location(' Leaving:'||l_proc, 10);
511: End update_validate;
512: --
513: -- ----------------------------------------------------------------------------
514: -- |---------------------------< delete_validate >----------------------------|
522: --
523: l_proc varchar2(72) := g_package||'delete_validate';
524: --
525: Begin
526: hr_utility.set_location('Entering:'||l_proc, 5);
527: --
528: -- Call all supporting business operations
529: --
530: dt_delete_validate
532: p_validation_start_date => p_validation_start_date,
533: p_validation_end_date => p_validation_end_date,
534: p_popl_org_id => p_rec.popl_org_id);
535: --
536: hr_utility.set_location(' Leaving:'||l_proc, 10);
537: End delete_validate;
538: --
539: -- ---------------------------------------------------------------------------
540: -- |---------------------< return_legislation_code >-------------------------|
558: l_proc varchar2(72) := g_package||'return_legislation_code';
559: --
560: begin
561: --
562: hr_utility.set_location('Entering:'|| l_proc, 10);
563: --
564: -- Ensure that all the mandatory parameter are not null
565: --
566: hr_api.mandatory_arg_error(p_api_name => l_proc,
576: close csr_leg_code;
577: --
578: -- The primary key is invalid therefore we must error
579: --
580: hr_utility.set_message(801,'HR_7220_INVALID_PRIMARY_KEY');
581: hr_utility.raise_error;
582: --
583: end if;
584: --
577: --
578: -- The primary key is invalid therefore we must error
579: --
580: hr_utility.set_message(801,'HR_7220_INVALID_PRIMARY_KEY');
581: hr_utility.raise_error;
582: --
583: end if;
584: --
585: close csr_leg_code;
583: end if;
584: --
585: close csr_leg_code;
586: --
587: hr_utility.set_location(' Leaving:'|| l_proc, 20);
588: --
589: return l_legislation_code;
590: --
591: end return_legislation_code;