55: from per_grades gra
56: where gra.grade_id = p_grade_id;
57: --
58: begin
59: hr_utility.set_location('Entering: '|| l_proc, 1);
60: --
61: -- Check mandatory parameters have been set
62: --
63: hr_api.mandatory_arg_error
70: (p_api_name => l_proc,
71: p_argument => 'business_group_id',
72: p_argument_value => p_business_group_id
73: );
74: hr_utility.set_location(l_proc, 2);
75: --
76: -- Check that the grade ID is linked to a valid grade on per_grades
77: --
78: open csr_valid_gra;
78: open csr_valid_gra;
79: fetch csr_valid_gra into l_business_group_id;
80: if csr_valid_gra%notfound then
81: close csr_valid_gra;
82: hr_utility.set_message(801, 'HR_51082_GRADE_NOT_EXIST');
83: hr_utility.raise_error;
84: end if;
85: close csr_valid_gra;
86: --
79: fetch csr_valid_gra into l_business_group_id;
80: if csr_valid_gra%notfound then
81: close csr_valid_gra;
82: hr_utility.set_message(801, 'HR_51082_GRADE_NOT_EXIST');
83: hr_utility.raise_error;
84: end if;
85: close csr_valid_gra;
86: --
87: hr_utility.set_location(l_proc, 3);
83: hr_utility.raise_error;
84: end if;
85: close csr_valid_gra;
86: --
87: hr_utility.set_location(l_proc, 3);
88: --
89: if l_business_group_id <> p_business_group_id then
90: hr_utility.set_message(801, 'HR_51083_GRADE_INVALID_BG');
91: hr_utility.raise_error;
86: --
87: hr_utility.set_location(l_proc, 3);
88: --
89: if l_business_group_id <> p_business_group_id then
90: hr_utility.set_message(801, 'HR_51083_GRADE_INVALID_BG');
91: hr_utility.raise_error;
92: end if;
93: hr_utility.set_location(' Leaving: '|| l_proc, 4);
94: end chk_grade_id;
87: hr_utility.set_location(l_proc, 3);
88: --
89: if l_business_group_id <> p_business_group_id then
90: hr_utility.set_message(801, 'HR_51083_GRADE_INVALID_BG');
91: hr_utility.raise_error;
92: end if;
93: hr_utility.set_location(' Leaving: '|| l_proc, 4);
94: end chk_grade_id;
95: --
89: if l_business_group_id <> p_business_group_id then
90: hr_utility.set_message(801, 'HR_51083_GRADE_INVALID_BG');
91: hr_utility.raise_error;
92: end if;
93: hr_utility.set_location(' Leaving: '|| l_proc, 4);
94: end chk_grade_id;
95: --
96: -- ----------------------------------------------------------------------------
97: -- |---------------------------< chk_date_from >----------------------------|
171: and p_date_from >= pos.date_effective
172: and p_effective_date between pos.effective_start_date and pos.effective_end_date;
173: --
174: begin
175: hr_utility.set_location('Entering:'|| l_proc, 1);
176: --
177: -- Check mandatory parameters have been set
178: --
179: hr_api.mandatory_arg_error
197: ,p_object_version_number => p_object_version_number);
198: --
199: if ((l_api_updating and per_vgr_shd.g_old_rec.date_from <> p_date_from) or
200: (NOT l_api_updating)) then
201: hr_utility.set_location(l_proc, 2);
202: --
203: -- Check that the date_from value is less than or equal to the date_to
204: -- value for the current record
205: --
203: -- Check that the date_from value is less than or equal to the date_to
204: -- value for the current record
205: --
206: if p_date_from > nvl(p_date_to, hr_api.g_eot) then
207: hr_utility.set_message(801, 'HR_51084_VGR_DATE_LESS');
208: hr_utility.raise_error;
209: end if;
210: hr_utility.set_location(l_proc, 3);
211: --
204: -- value for the current record
205: --
206: if p_date_from > nvl(p_date_to, hr_api.g_eot) then
207: hr_utility.set_message(801, 'HR_51084_VGR_DATE_LESS');
208: hr_utility.raise_error;
209: end if;
210: hr_utility.set_location(l_proc, 3);
211: --
212: -- Check that date_from is within the range of the date_from and date_to
206: if p_date_from > nvl(p_date_to, hr_api.g_eot) then
207: hr_utility.set_message(801, 'HR_51084_VGR_DATE_LESS');
208: hr_utility.raise_error;
209: end if;
210: hr_utility.set_location(l_proc, 3);
211: --
212: -- Check that date_from is within the range of the date_from and date_to
213: -- on per_grades for p_grade_id
214: --
215: open csr_chk_gra_dates;
216: fetch csr_chk_gra_dates into l_exists;
217: if csr_chk_gra_dates%notfound then
218: close csr_chk_gra_dates;
219: hr_utility.set_message(801, 'HR_51085_VGR_DATE_GRADE');
220: hr_utility.raise_error;
221: end if;
222: close csr_chk_gra_dates;
223: hr_utility.set_location(l_proc, 4);
216: fetch csr_chk_gra_dates into l_exists;
217: if csr_chk_gra_dates%notfound then
218: close csr_chk_gra_dates;
219: hr_utility.set_message(801, 'HR_51085_VGR_DATE_GRADE');
220: hr_utility.raise_error;
221: end if;
222: close csr_chk_gra_dates;
223: hr_utility.set_location(l_proc, 4);
224: --
219: hr_utility.set_message(801, 'HR_51085_VGR_DATE_GRADE');
220: hr_utility.raise_error;
221: end if;
222: close csr_chk_gra_dates;
223: hr_utility.set_location(l_proc, 4);
224: --
225: -- Check that date_from is on or later than the date_from on per_jobs_v for
226: -- p_job_id
227: --
229: open csr_chk_job_dates;
230: fetch csr_chk_job_dates into l_exists;
231: if csr_chk_job_dates%notfound then
232: close csr_chk_job_dates;
233: hr_utility.set_message(801, 'HR_51086_VGR_DATE_JOB');
234: hr_utility.raise_error;
235: end if;
236: close csr_chk_job_dates;
237: end if;
230: fetch csr_chk_job_dates into l_exists;
231: if csr_chk_job_dates%notfound then
232: close csr_chk_job_dates;
233: hr_utility.set_message(801, 'HR_51086_VGR_DATE_JOB');
234: hr_utility.raise_error;
235: end if;
236: close csr_chk_job_dates;
237: end if;
238: hr_utility.set_location(l_proc, 5);
234: hr_utility.raise_error;
235: end if;
236: close csr_chk_job_dates;
237: end if;
238: hr_utility.set_location(l_proc, 5);
239: --
240: -- Check that date_from is on or later than the effective_date on
241: -- hr_positions_f p_position_id
242: --
244: open csr_chk_pos_dates;
245: fetch csr_chk_pos_dates into l_exists;
246: if csr_chk_pos_dates%notfound then
247: close csr_chk_pos_dates;
248: hr_utility.set_message(801, 'HR_51087_VGR_DATE_POS');
249: hr_utility.raise_error;
250: end if;
251: close csr_chk_pos_dates;
252: end if;
245: fetch csr_chk_pos_dates into l_exists;
246: if csr_chk_pos_dates%notfound then
247: close csr_chk_pos_dates;
248: hr_utility.set_message(801, 'HR_51087_VGR_DATE_POS');
249: hr_utility.raise_error;
250: end if;
251: close csr_chk_pos_dates;
252: end if;
253: end if;
251: close csr_chk_pos_dates;
252: end if;
253: end if;
254: --
255: hr_utility.set_location(' Leaving:'|| l_proc, 6);
256: end chk_date_from;
257: --
258: -- ----------------------------------------------------------------------------
259: -- |---------------------------< chk_job_or_position_rule >-------------|
293: l_proc varchar2(72) := g_package||'chk_job_or_position_rule';
294: --
295: --
296: begin
297: hr_utility.set_location('Entering: '|| l_proc, 1);
298: --
299: if p_job_id is not null and p_position_id is not null then
300: hr_utility.set_message(801, 'HR_51088_VGR_JOB_OR_POS');
301: hr_utility.raise_error;
296: begin
297: hr_utility.set_location('Entering: '|| l_proc, 1);
298: --
299: if p_job_id is not null and p_position_id is not null then
300: hr_utility.set_message(801, 'HR_51088_VGR_JOB_OR_POS');
301: hr_utility.raise_error;
302: elsif p_job_id is null and p_position_id is null then
303: hr_utility.set_message(801, 'HR_51089_VGR_INV_JOB_OR_POS');
304: hr_utility.raise_error;
297: hr_utility.set_location('Entering: '|| l_proc, 1);
298: --
299: if p_job_id is not null and p_position_id is not null then
300: hr_utility.set_message(801, 'HR_51088_VGR_JOB_OR_POS');
301: hr_utility.raise_error;
302: elsif p_job_id is null and p_position_id is null then
303: hr_utility.set_message(801, 'HR_51089_VGR_INV_JOB_OR_POS');
304: hr_utility.raise_error;
305: end if;
299: if p_job_id is not null and p_position_id is not null then
300: hr_utility.set_message(801, 'HR_51088_VGR_JOB_OR_POS');
301: hr_utility.raise_error;
302: elsif p_job_id is null and p_position_id is null then
303: hr_utility.set_message(801, 'HR_51089_VGR_INV_JOB_OR_POS');
304: hr_utility.raise_error;
305: end if;
306: --
307: hr_utility.set_location('Leaving: '|| l_proc, 1);
300: hr_utility.set_message(801, 'HR_51088_VGR_JOB_OR_POS');
301: hr_utility.raise_error;
302: elsif p_job_id is null and p_position_id is null then
303: hr_utility.set_message(801, 'HR_51089_VGR_INV_JOB_OR_POS');
304: hr_utility.raise_error;
305: end if;
306: --
307: hr_utility.set_location('Leaving: '|| l_proc, 1);
308: end chk_job_or_position_rule;
303: hr_utility.set_message(801, 'HR_51089_VGR_INV_JOB_OR_POS');
304: hr_utility.raise_error;
305: end if;
306: --
307: hr_utility.set_location('Leaving: '|| l_proc, 1);
308: end chk_job_or_position_rule;
309: --
310: -- ----------------------------------------------------------------------------
311: -- |---------------------------< chk_job_id >----------------------------|
372: );
373: -- Fix For Bug # 6983587 Ends
374: --
375: begin
376: hr_utility.set_location('Entering: '|| l_proc, 1);
377: --
378: --
379: -- Check that the job ID, if it is not null, is linked to a valid job on
380: -- per_jobs_v
395: open csr_valid_job;
396: fetch csr_valid_job into l_business_group_id;
397: if csr_valid_job %notfound then
398: close csr_valid_job;
399: hr_utility.set_message(801, 'HR_51090_JOB_NOT_EXIST');
400: hr_utility.raise_error;
401: end if;
402: close csr_valid_job;
403: --
396: fetch csr_valid_job into l_business_group_id;
397: if csr_valid_job %notfound then
398: close csr_valid_job;
399: hr_utility.set_message(801, 'HR_51090_JOB_NOT_EXIST');
400: hr_utility.raise_error;
401: end if;
402: close csr_valid_job;
403: --
404: hr_utility.set_location(l_proc, 2);
400: hr_utility.raise_error;
401: end if;
402: close csr_valid_job;
403: --
404: hr_utility.set_location(l_proc, 2);
405: --
406: if l_business_group_id <> p_business_group_id then
407: hr_utility.set_message(801, 'HR_51091_JOB_INVALID_BG');
408: hr_utility.raise_error;
403: --
404: hr_utility.set_location(l_proc, 2);
405: --
406: if l_business_group_id <> p_business_group_id then
407: hr_utility.set_message(801, 'HR_51091_JOB_INVALID_BG');
408: hr_utility.raise_error;
409: end if;
410: --
411: hr_utility.set_location(l_proc, 4);
404: hr_utility.set_location(l_proc, 2);
405: --
406: if l_business_group_id <> p_business_group_id then
407: hr_utility.set_message(801, 'HR_51091_JOB_INVALID_BG');
408: hr_utility.raise_error;
409: end if;
410: --
411: hr_utility.set_location(l_proc, 4);
412: --
407: hr_utility.set_message(801, 'HR_51091_JOB_INVALID_BG');
408: hr_utility.raise_error;
409: end if;
410: --
411: hr_utility.set_location(l_proc, 4);
412: --
413: open csr_chk_job_grd_comb;
414: fetch csr_chk_job_grd_comb into l_exists;
415: if csr_chk_job_grd_comb%found then
413: open csr_chk_job_grd_comb;
414: fetch csr_chk_job_grd_comb into l_exists;
415: if csr_chk_job_grd_comb%found then
416: close csr_chk_job_grd_comb;
417: hr_utility.set_message(801, 'HR_51092_VGR_JOB_GRD_COMBO');
418: hr_utility.raise_error;
419: end if;
420: close csr_chk_job_grd_comb;
421: --
414: fetch csr_chk_job_grd_comb into l_exists;
415: if csr_chk_job_grd_comb%found then
416: close csr_chk_job_grd_comb;
417: hr_utility.set_message(801, 'HR_51092_VGR_JOB_GRD_COMBO');
418: hr_utility.raise_error;
419: end if;
420: close csr_chk_job_grd_comb;
421: --
422: end if;
419: end if;
420: close csr_chk_job_grd_comb;
421: --
422: end if;
423: hr_utility.set_location(' Leaving: '|| l_proc, 10);
424: end chk_job_id;
425: --
426: -- ----------------------------------------------------------------------------
427: -- |---------------------------< chk_position_id >----------------------------|
478: where vgr.position_id = p_position_id
479: and vgr.grade_id = p_grade_id;
480: --
481: begin
482: hr_utility.set_location('Entering: '|| l_proc, 1);
483: --
484: --
485: hr_api.mandatory_arg_error
486: (p_api_name => l_proc,
501: open csr_valid_pos;
502: fetch csr_valid_pos into l_business_group_id;
503: if csr_valid_pos%notfound then
504: close csr_valid_pos;
505: hr_utility.set_message(801, 'HR_51093_POS_NOT_EXIST');
506: hr_utility.raise_error;
507: end if;
508: close csr_valid_pos;
509: --
502: fetch csr_valid_pos into l_business_group_id;
503: if csr_valid_pos%notfound then
504: close csr_valid_pos;
505: hr_utility.set_message(801, 'HR_51093_POS_NOT_EXIST');
506: hr_utility.raise_error;
507: end if;
508: close csr_valid_pos;
509: --
510: hr_utility.set_location(l_proc, 2);
506: hr_utility.raise_error;
507: end if;
508: close csr_valid_pos;
509: --
510: hr_utility.set_location(l_proc, 2);
511: --
512: if l_business_group_id <> p_business_group_id then
513: hr_utility.set_message(801, 'HR_51094_POS_INVALID_BG');
514: hr_utility.raise_error;
509: --
510: hr_utility.set_location(l_proc, 2);
511: --
512: if l_business_group_id <> p_business_group_id then
513: hr_utility.set_message(801, 'HR_51094_POS_INVALID_BG');
514: hr_utility.raise_error;
515: end if;
516: --
517: hr_utility.set_location(l_proc, 3);
510: hr_utility.set_location(l_proc, 2);
511: --
512: if l_business_group_id <> p_business_group_id then
513: hr_utility.set_message(801, 'HR_51094_POS_INVALID_BG');
514: hr_utility.raise_error;
515: end if;
516: --
517: hr_utility.set_location(l_proc, 3);
518: --
513: hr_utility.set_message(801, 'HR_51094_POS_INVALID_BG');
514: hr_utility.raise_error;
515: end if;
516: --
517: hr_utility.set_location(l_proc, 3);
518: --
519: open csr_chk_pos_grd_comb;
520: fetch csr_chk_pos_grd_comb into l_exists;
521: if csr_chk_pos_grd_comb%found then
519: open csr_chk_pos_grd_comb;
520: fetch csr_chk_pos_grd_comb into l_exists;
521: if csr_chk_pos_grd_comb%found then
522: CLose csr_chk_pos_grd_comb;
523: hr_utility.set_message(801, 'HR_51095_VGR_POS_GRD_COMBO');
524: hr_utility.raise_error;
525: end if;
526: close csr_chk_pos_grd_comb;
527: --
520: fetch csr_chk_pos_grd_comb into l_exists;
521: if csr_chk_pos_grd_comb%found then
522: CLose csr_chk_pos_grd_comb;
523: hr_utility.set_message(801, 'HR_51095_VGR_POS_GRD_COMBO');
524: hr_utility.raise_error;
525: end if;
526: close csr_chk_pos_grd_comb;
527: --
528: end if;
525: end if;
526: close csr_chk_pos_grd_comb;
527: --
528: end if;
529: hr_utility.set_location(' Leaving: '|| l_proc, 10);
530: end chk_position_id;
531: --
532: -- ----------------------------------------------------------------------------
533: -- |---------------------------< chk_date_to >----------------------------|
606: and nvl(p_date_to, hr_api.g_eot) <= nvl(hr_general.get_position_date_end(p_position_id), hr_api.g_eot)
607: and p_effective_date between pos.effective_start_date and pos.effective_end_date;
608: --
609: begin
610: hr_utility.set_location('Entering:'|| l_proc, 1);
611: --
612: -- Check mandatory parameters havu been set
613: --
614: hr_api.mandatory_arg_error
634: if ((l_api_updating and
635: nvl(per_vgr_shd.g_old_rec.date_to, hr_api.g_eot) <>
636: nvl(p_date_to, hr_api.g_eot)) or
637: (NOT l_api_updating)) then
638: hr_utility.set_location(l_proc, 2);
639: --
640: -- Check that the date_from value is greater than or equal to the date_to
641: -- value for the current record
642: --
640: -- Check that the date_from value is greater than or equal to the date_to
641: -- value for the current record
642: --
643: if p_date_from > nvl(p_date_to, hr_api.g_eot) then
644: hr_utility.set_message(801, 'HR_51096_VGR_DATE_GREATER');
645: hr_utility.raise_error;
646: end if;
647: hr_utility.set_location(l_proc, 3);
648: --
641: -- value for the current record
642: --
643: if p_date_from > nvl(p_date_to, hr_api.g_eot) then
644: hr_utility.set_message(801, 'HR_51096_VGR_DATE_GREATER');
645: hr_utility.raise_error;
646: end if;
647: hr_utility.set_location(l_proc, 3);
648: --
649: -- Check that date_to is within the range of the date_from and date_to
643: if p_date_from > nvl(p_date_to, hr_api.g_eot) then
644: hr_utility.set_message(801, 'HR_51096_VGR_DATE_GREATER');
645: hr_utility.raise_error;
646: end if;
647: hr_utility.set_location(l_proc, 3);
648: --
649: -- Check that date_to is within the range of the date_from and date_to
650: -- on per_grades for p_grade_id
651: --
652: open csr_chk_gra_dates;
653: fetch csr_chk_gra_dates into l_exists;
654: if csr_chk_gra_dates%notfound then
655: close csr_chk_gra_dates;
656: hr_utility.set_message(801, 'HR_51097_VGR_END_DATE_INVALID');
657: hr_utility.raise_error;
658: end if;
659: close csr_chk_gra_dates;
660: hr_utility.set_location(l_proc, 4);
653: fetch csr_chk_gra_dates into l_exists;
654: if csr_chk_gra_dates%notfound then
655: close csr_chk_gra_dates;
656: hr_utility.set_message(801, 'HR_51097_VGR_END_DATE_INVALID');
657: hr_utility.raise_error;
658: end if;
659: close csr_chk_gra_dates;
660: hr_utility.set_location(l_proc, 4);
661: --
656: hr_utility.set_message(801, 'HR_51097_VGR_END_DATE_INVALID');
657: hr_utility.raise_error;
658: end if;
659: close csr_chk_gra_dates;
660: hr_utility.set_location(l_proc, 4);
661: --
662: -- Check that date_to is on or earlier than the date_to on per_jobs_v for
663: -- p_job_id
664: --
666: open csr_chk_job_dates;
667: fetch csr_chk_job_dates into l_exists;
668: if csr_chk_job_dates%notfound then
669: close csr_chk_job_dates;
670: hr_utility.set_message(801, 'HR_51098_VGR_END_DATE_JOB');
671: hr_utility.raise_error;
672: end if;
673: close csr_chk_job_dates;
674: end if;
667: fetch csr_chk_job_dates into l_exists;
668: if csr_chk_job_dates%notfound then
669: close csr_chk_job_dates;
670: hr_utility.set_message(801, 'HR_51098_VGR_END_DATE_JOB');
671: hr_utility.raise_error;
672: end if;
673: close csr_chk_job_dates;
674: end if;
675: hr_utility.set_location(l_proc, 5);
671: hr_utility.raise_error;
672: end if;
673: close csr_chk_job_dates;
674: end if;
675: hr_utility.set_location(l_proc, 5);
676: --
677: -- Check that date_to is on or later than the end_date on
678: -- hr_positions_f p_position_id
679: --
681: open csr_chk_pos_dates;
682: fetch csr_chk_pos_dates into l_exists;
683: if csr_chk_pos_dates%notfound then
684: close csr_chk_pos_dates;
685: hr_utility.set_message(801, 'HR_51099_VGR_END_DATE_POS');
686: hr_utility.raise_error;
687: end if;
688: close csr_chk_pos_dates;
689: end if;
682: fetch csr_chk_pos_dates into l_exists;
683: if csr_chk_pos_dates%notfound then
684: close csr_chk_pos_dates;
685: hr_utility.set_message(801, 'HR_51099_VGR_END_DATE_POS');
686: hr_utility.raise_error;
687: end if;
688: close csr_chk_pos_dates;
689: end if;
690: end if;
688: close csr_chk_pos_dates;
689: end if;
690: end if;
691: --
692: hr_utility.set_location(' Leaving:'|| l_proc, 6);
693: end chk_date_to;
694: -- -----------------------------------------------------------------------
695: -- |------------------------------< chk_df >-----------------------------|
696: -- -----------------------------------------------------------------------
723: --
724: l_proc varchar2(72) := g_package||'chk_df';
725: --
726: begin
727: hr_utility.set_location('Entering:'||l_proc, 10);
728: --
729: if ((p_rec.valid_grade_id is not null) and (
730: nvl(per_vgr_shd.g_old_rec.attribute_category, hr_api.g_varchar2) <>
731: nvl(p_rec.attribute_category, hr_api.g_varchar2) or
823: ,p_attribute20_value => p_rec.attribute20
824: );
825: end if;
826: --
827: hr_utility.set_location(' Leaving:'||l_proc, 20);
828:
829: end chk_df;
830: --
831: -- ----------------------------------------------------------------------------
836: --
837: l_proc varchar2(72) := g_package||'insert_validate';
838: --
839: Begin
840: hr_utility.set_location('Entering:'||l_proc, 5);
841: --
842: -- Call all supporting business operations. Mapping to the appropriate
843: -- Business Rules in pervga.bru is provided.
844: --
846: -- Validate Business Group id
847: --
848: hr_api.validate_bus_grp_id(p_rec.business_group_id);
849: --
850: hr_utility.set_location(l_proc, 10);
851: --
852: -- Validate Grade id
853: --
854: chk_grade_id (p_grade_id => p_rec.grade_id
853: --
854: chk_grade_id (p_grade_id => p_rec.grade_id
855: ,p_business_group_id => p_rec.business_group_id );
856: --
857: hr_utility.set_location(l_proc, 15);
858: --
859: -- Validate that either Position or Job Ids are set
860: --
861: chk_job_or_position_rule
861: chk_job_or_position_rule
862: (p_job_id => p_rec.job_id
863: ,p_position_id => p_rec.position_id);
864: --
865: hr_utility.set_location(l_proc, 20);
866: --
867: -- Validate Job id
868: --
869: chk_job_id (p_job_id => p_rec.job_id
871: ,p_grade_id => p_rec.grade_id
872: ,p_date_from => p_rec.date_from -- Added For Bug # 6983587
873: ,p_date_to => p_rec.date_to); -- Added For Bug 6983587
874: --
875: hr_utility.set_location(l_proc, 25);
876: --
877: -- Validate Position id
878: --
879: chk_position_id (p_position_id => p_rec.position_id
880: ,p_business_group_id => p_rec.business_group_id
881: ,p_grade_id => p_rec.grade_id
882: ,p_effective_date => p_effective_date); -- Added for Bug# 1760707
883: --
884: hr_utility.set_location(l_proc, 30);
885: --
886: -- Validate Date From
887: --
888: chk_date_from
894: ,p_position_id => p_rec.position_id
895: ,p_object_version_number => p_rec.object_version_number
896: ,p_effective_date => p_effective_date); -- Added for Bug# 1760707
897: --
898: hr_utility.set_location(l_proc, 35);
899: --
900: -- Validate Date To
901: --
902: chk_date_to
908: ,p_position_id => p_rec.position_id
909: ,p_object_version_number => p_rec.object_version_number
910: ,p_effective_date => p_effective_date); -- Added for Bug# 1760707
911: --
912: hr_utility.set_location(' Leaving:'||l_proc, 40);
913: --
914: -- Call descriptive flexfield validation routines
915: --
916: per_vgr_bus.chk_df(p_rec => p_rec);
914: -- Call descriptive flexfield validation routines
915: --
916: per_vgr_bus.chk_df(p_rec => p_rec);
917: --
918: hr_utility.set_location(' Leaving:'||l_proc, 45);
919:
920: End insert_validate;
921: --
922: -- ----------------------------------------------------------------------------
927: --
928: l_proc varchar2(72) := g_package||'update_validate';
929: --
930: Begin
931: hr_utility.set_location('Entering:'||l_proc, 5);
932: --
933: -- Call all supporting business operations. Mapping to the
934: -- appropriate Business Rules in per_vgr.bru is provided
935: --
932: --
933: -- Call all supporting business operations. Mapping to the
934: -- appropriate Business Rules in per_vgr.bru is provided
935: --
936: hr_utility.set_location(l_proc, 6);
937: --
938: -- Validate Business Group id
939: --
940: hr_api.validate_bus_grp_id(p_rec.business_group_id);
950: ,p_position_id => p_rec.position_id
951: ,p_object_version_number => p_rec.object_version_number
952: ,p_effective_date => p_effective_date); -- Added for Bug# 1760707
953: --
954: hr_utility.set_location(l_proc, 7);
955: --
956: -- Validate Date To
957: --
958: chk_date_to
965: ,p_object_version_number => p_rec.object_version_number
966: ,p_effective_date => p_effective_date ); --Added for Bug#1760707
967: --
968: --
969: hr_utility.set_location(' Leaving:'||l_proc, 10);
970: --
971: -- Call descriptive flexfield validation routines
972: --
973: per_vgr_bus.chk_df(p_rec => p_rec);
971: -- Call descriptive flexfield validation routines
972: --
973: per_vgr_bus.chk_df(p_rec => p_rec);
974: --
975: hr_utility.set_location(' Leaving:'||l_proc, 15);
976: End update_validate;
977: --
978: -- ----------------------------------------------------------------------------
979: -- |---------------------------< delete_validate >----------------------------|
982: --
983: l_proc varchar2(72) := g_package||'delete_validate';
984: --
985: Begin
986: hr_utility.set_location('Entering:'||l_proc, 5);
987: --
988: -- Call all supporting business operations
989: --
990: hr_utility.set_location(' Leaving:'||l_proc, 10);
986: hr_utility.set_location('Entering:'||l_proc, 5);
987: --
988: -- Call all supporting business operations
989: --
990: hr_utility.set_location(' Leaving:'||l_proc, 10);
991: End delete_validate;
992: --
993: -- ---------------------------------------------------------------------------
994: -- |---------------------< return_legislation_code >-------------------------|
1011: --
1012: l_legislation_code varchar2(150);
1013: l_proc varchar2(72) := g_package||'return_legislation_code';
1014: begin
1015: hr_utility.set_location('Entering:'|| l_proc, 10);
1016: --
1017: -- Ensure that all the mandatory parameter are not null
1018: --
1019: hr_api.mandatory_arg_error(p_api_name => l_proc,
1026: -- call to this function. Just return the value in the global
1027: -- variable.
1028: --
1029: l_legislation_code := g_legislation_code;
1030: hr_utility.set_location(l_proc, 20);
1031: else
1032: --
1033: -- The ID is different to the last call to this function
1034: -- or this is the first call to this function.
1043: fnd_message.set_name('PAY', 'HR_7220_INVALID_PRIMARY_KEY');
1044: fnd_message.raise_error;
1045: end if;
1046: --
1047: hr_utility.set_location(' Leaving:'|| l_proc, 30);
1048: --
1049: -- Set the global variables so the vlaues are
1050: -- available for the next call to this function
1051: --
1052: close csr_leg_code;
1053: g_valid_grade_id := p_valid_grade_id;
1054: g_legislation_code := l_legislation_code;
1055: end if;
1056: hr_utility.set_location('Entering:'|| l_proc, 40);
1057: --
1058: return l_legislation_code;
1059: end return_legislation_code;
1060: --