DBA Data[Home] [Help]

PACKAGE BODY: APPS.GHR_PDI_BUS

Source


1 Package Body ghr_pdi_bus as
2 /* $Header: ghpdirhi.pkb 120.1 2005/06/13 12:28:25 vravikan noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                     Private Global Definitions                           |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package  varchar2(33)	:= '  ghr_pdi_bus.';  -- Global package name
9 
10 --
11 -----------------------------<chk_date_to>-----------------------------
12 --
13 Procedure chk_date_to(p_position_description_id IN ghr_position_descriptions.position_description_id%TYPE,
14 		          p_date_from IN DATE,
15                                       p_date_to IN DATE)
16 is
17 
18 
19 l_proc	varchar2(72) := g_package||'chk_date_to';
20 
21 
22 BEGIN
23 
24 	hr_utility.set_location('Entering: '|| l_proc, 10);
25 
26 	IF NVL(p_date_to,p_date_from) >= p_date_from THEN
27 
28 		NULL;
29 	ELSE
30 		hr_utility.set_message(8301, 'GHR_DATE_TO_<_DATE_FROM');
31 
32 		hr_utility.raise_error;
33 	END IF;
34 
35 END CHK_DATE_TO;
36 
37 
38 --
39 -----------------------------<chk_category>----------------------------------
40 --
41 Procedure chk_category(p_position_description_id IN
42                                 ghr_position_descriptions.position_description_id%TYPE,
43 		   p_category IN ghr_position_descriptions.category%TYPE,
44 		   p_effective_date IN DATE,
45 		   p_object_version_number IN number)
46 IS
47 
48 l_proc	varchar2(72) := g_package||'chk_category';
49 l_api_updating boolean;
50 l_dummy varchar2(1);
51 
52 cursor c_pd_category is
53 select 'X' from
54 dual
55 where p_category in ('ACTIVE','INACTIVE','STANDARD','CANCELED');
56 
57 BEGIN
58 
59 	hr_utility.set_location('Entering: '|| l_proc, 10);
60 
61 -- Check Mandatory Parameters are set
62 
63 	hr_api.mandatory_arg_error
64 		(p_api_name	 => l_proc,
65          	p_argument       => 'effective date',
66          	p_argument_value => p_effective_date
67 		);
68 
69 --
70 -- Only Proceed with the validation if:
71 --
72 -- a) The current g_old_rec is current and
73 -- b) The category_category value has changed
74 -- c) A record is being inserted.
75 --
76 
77 	l_api_updating := ghr_pdi_shd.api_updating(
78 			  p_position_description_id => p_position_description_id,
79 			  p_object_version_number  => p_object_version_number);
80 
81         IF (l_api_updating
82         AND
83         ((nvl(ghr_pdi_shd.g_old_rec.category,hr_api.g_varchar2)
84                                 <> nvl(p_category,hr_api.g_varchar2))))
85         OR
86         NOT l_api_updating THEN
87 
88 --
89 	hr_utility.set_location(l_proc,20);
90 --
91 
92 	IF p_category is NOT NULL THEN
93         open c_pd_category;
94         fetch c_pd_category into l_dummy;
95         IF c_pd_category%notfound then
96 
97 	-- Error: Invalid category category
98 		hr_utility.set_message(8301, 'GHR_38635_INVALID_PD_CATEGORY');
99 
100 	       hr_utility.raise_error;
101 	   END IF;
102 	   hr_utility.set_location(l_proc,30);
103         close c_pd_category;
104 
105 	END IF;
106 
107      END IF;
108 
109      hr_utility.set_location('Leaving: '|| l_proc, 40);
110 
111 end chk_category;
112 --
113 -----------------------------<chk_flsa>----------------------------------
114 --
115 Procedure chk_flsa(p_position_description_id IN
116                                 ghr_position_descriptions.position_description_id%TYPE,
117 		   p_flsa IN ghr_position_descriptions.flsa%TYPE,
118 		   p_effective_date IN DATE,
119 		   p_object_version_number IN number)
120 
121 IS
122 
123 l_proc	varchar2(72) := g_package||'chk_flsa';
124 l_api_updating boolean;
125 
126 
127 BEGIN
128 
129 	hr_utility.set_location('Entering: '|| l_proc, 10);
130 
131 -- Check Mandatory Parameters are set
132 
133 	hr_api.mandatory_arg_error
134 		(p_api_name	 => l_proc,
135          	p_argument       => 'effective date',
136          	p_argument_value => p_effective_date
137 		);
138 
139 --
140 -- Only Proceed with the validation if:
141 --
142 -- a) The current g_old_rec is current and
143 -- b) The flsa_category value has changed
144 -- c) A record is being inserted.
145 --
146 
147 	l_api_updating := ghr_pdi_shd.api_updating(
148 			  p_position_description_id => p_position_description_id,
149 			  p_object_version_number  => p_object_version_number);
150 
151         IF (l_api_updating
152         AND
153         ((nvl(ghr_pdi_shd.g_old_rec.flsa,hr_api.g_varchar2)
154                                 <> nvl(p_flsa,hr_api.g_varchar2))))
155         OR
156         NOT l_api_updating THEN
157 
158 --
159 	hr_utility.set_location(l_proc,20);
160 --
161 -- 	If flsa is not null then
162 --	Check if the flsa value exists in fnd_lookups
163 --	Where the look up type is 'GHR_US_FLSA_CATEGORY'
164 --
165 
166 	IF p_flsa is NOT NULL THEN
167 
168 	   IF hr_api.not_exists_in_hr_lookups
169 			(p_effective_date	=>	p_effective_date,
170 			 p_lookup_type		=>      'GHR_US_FLSA_CATEGORY',
171 			 p_lookup_code		=>	p_flsa
172 			) THEN
173 	-- Error: Invalid FLSA category
174 		hr_utility.set_message(8301, 'GHR_FLSA_CODE_INVALID');
175 
176 	       hr_utility.raise_error;
177 	   END IF;
178 	   hr_utility.set_location(l_proc,30);
179 
180 	END IF;
181 
182      END IF;
183 
184      hr_utility.set_location('Leaving: '|| l_proc, 40);
185 
186 end chk_flsa;
187 
188 --
189 -----------------------------<chk_financial_statement>-------------------------
190 --
191 
192 Procedure chk_financial_statement(p_position_description_id	IN
193 					ghr_position_descriptions.position_description_id%TYPE,
194 				  p_financial_statement IN 										ghr_position_descriptions.financial_statement%TYPE,
195 				  p_effective_date IN date,
196 				  p_object_version_number IN number)
197 
198 IS
199 
200 l_proc varchar2(72) := 'chk_financial_statement';
201 l_api_updating boolean;
202 
203 BEGIN
204 
205 hr_utility.set_location('Entering: '|| l_proc, 10);
206 
207 -- Check Mandatory Parameters are set
208 
209 	hr_api.mandatory_arg_error
210 
211 		(p_api_name	 => l_proc,
212          	p_argument       => 'effective date',
213          	p_argument_value => p_effective_date
214 		);
215 
216 --
217 -- Only Proceed with the validation if:
218 --
219 -- a) The current g_old_rec is current and
220 -- b) The financial_statement value has changed
221 -- c) A record is being inserted.
222 --
223 
224 	l_api_updating := ghr_pdi_shd.api_updating(
225 					p_position_description_id	=> p_position_description_id,
226 					p_object_version_number	=> p_object_version_number);
227 
228         IF (l_api_updating
229         AND
230         ((nvl(ghr_pdi_shd.g_old_rec.financial_statement,hr_api.g_varchar2)
231                                 <> nvl(p_financial_statement,hr_api.g_varchar2))))
232         OR
233         NOT l_api_updating THEN
234 --
235 	hr_utility.set_location(l_proc,20);
236 --
237 -- 	If financial statement  is not null then
238 --	Check if the financial statement value exists in fnd_lookups
239 --	Where the look up type is 'GHR_US_FINANCIAL_STATEMENT'
240 --
241 
242 	IF p_financial_statement is NOT NULL THEN
243 
244 	   IF hr_api.not_exists_in_hr_lookups
245 			(p_effective_date	=>	p_effective_date,
246 			 p_lookup_type		=>      'GHR_US_FINANCIAL_STATEMENT',
247 			 p_lookup_code		=>	p_financial_statement
248 			) THEN
249 	-- Error: Invalid FLSA category
250 		hr_utility.set_message(8301, 'GHR_FINANCIAL_STAT_INVALID');
251 
252 	       hr_utility.raise_error;
253 
254 	   END IF;
255 	   hr_utility.set_location(l_proc,30);
256 
257 	END IF;
258 
259      END IF;
260 
261      hr_utility.set_location('Leaving: '|| l_proc, 40);
262 
263 END chk_financial_statement;
264 
265 
266 --
267 -------------------------------< chk_subject_to_ia_action>---------------------
268 --
269 
270 Procedure chk_subject_to_ia_action (p_position_description_id	IN
271 					ghr_position_descriptions.position_description_id%TYPE,
272 				  p_sub_to_ia_action IN 											ghr_position_descriptions.subject_to_ia_action %TYPE,
273 				  p_effective_date IN date,
274 				  p_object_version_number IN number)
275 
276 IS
277 
278 l_proc	varchar2(72) := g_package||'chk_subject_to_ia_action_action';
279 l_api_updating boolean;
280 
281 
282 BEGIN
283 
284 	hr_utility.set_location('Entering: '|| l_proc, 10);
285 
286 -- Check Mandatory Parameters are set
287 
288 	hr_api.mandatory_arg_error
289 		(p_api_name	 => l_proc,
290          	p_argument       => 'effective date',
291          	p_argument_value => p_effective_date
292 		);
293 
294 --
295 -- Only Proceed with the validation if:
296 --
297 -- a) The current g_old_rec is current and
298 -- b) The flsa_category value has changed
299 -- c) A record is being inserted.
300 --
301 
302 	l_api_updating := ghr_pdi_shd.api_updating(
303 					p_position_description_id	=> p_position_description_id,
304 					p_object_version_number	=> p_object_version_number);
305 
306         IF (l_api_updating
307         AND
308         ((nvl(ghr_pdi_shd.g_old_rec.subject_to_ia_action,hr_api.g_varchar2)
309                                 <> nvl(p_sub_to_ia_action,hr_api.g_varchar2))))
310         OR
311         NOT l_api_updating THEN
312 --
313 	hr_utility.set_location(l_proc,20);
314 --
315 -- 	If Subject to IA action is not null then
316 --	Check if the subject to IA action value exists in fnd_lookups
317 --	Where the look up type is 'subject_to_ia_action_ACTION'
318 --
319 
320 	IF p_sub_to_ia_action is NOT NULL THEN
321 
322 	   IF hr_api.not_exists_in_hr_lookups
323 			(p_effective_date	=>	p_effective_date,
324 			 p_lookup_type		=>      'YES_NO',
325 			 p_lookup_code		=>	p_sub_to_ia_action
326 			) THEN
327 	-- Error: Invalid Subject to IA Action
328 		hr_utility.set_message(8301, 'GHR_SUBJECT_TO_IA_INVALID');
329 
330 	       hr_utility.raise_error;
331 	   END IF;
332         ELSE
333 		hr_utility.set_message(8301, 'GHR_38637_NULL_SUB_IA_ACTION');
334 	        hr_utility.raise_error;
335 	   hr_utility.set_location(l_proc,30);
336 
337 	END IF;
338 
339      END IF;
340 
341      hr_utility.set_location('Leaving: '|| l_proc, 40);
342 
343 END CHK_subject_to_ia_action;
344 
345 
346 --
347 ---------------------------------<chk_position_status>---------------------------
348 --
349 
350 Procedure chk_position_status 	(p_position_description_id	IN
351 					ghr_position_descriptions.position_description_id%TYPE,
352 				  p_position_status IN 									ghr_position_descriptions.position_status%TYPE,
353 				  p_effective_date IN date,
354 				  p_object_version_number IN number)
355 IS
356 l_proc	varchar2(72) := g_package||'chk_position_status';
357 l_api_updating boolean;
358 
359 
360 BEGIN
361 
362 	hr_utility.set_location('Entering: '|| l_proc, 10);
363 
364 -- Check Mandatory Parameters are set
365 
366 	hr_api.mandatory_arg_error
367 		(p_api_name	 => l_proc,
368          	p_argument       => 'effective date',
369          	p_argument_value => p_effective_date
370 		);
371 
372 --
373 -- Only Proceed with the validation if:
374 --
375 -- a) The current g_old_rec is current and
376 -- b) The flsa_category value has changed
377 -- c) A record is being inserted.
378 --
379 
380 	l_api_updating := ghr_pdi_shd.api_updating(
381 					p_position_description_id	=> p_position_description_id,
382 					p_object_version_number	=> p_object_version_number);
383 
384         IF (l_api_updating
385         AND
386         ((nvl(ghr_pdi_shd.g_old_rec.position_status,hr_api.g_number)
387                                 <> nvl(p_position_status,hr_api.g_number))))
388         OR
389         NOT l_api_updating THEN
390 
391 --
392 	hr_utility.set_location(l_proc,20);
393 --
394 -- 	If Subject to IA action is not null then
395 --	Check if the position status value exists in fnd_lookups
396 --	Where the look up type is 'GHR_US_POSITION_OCCUPIED'
397 --
398 
399 	IF p_position_status is NOT NULL THEN
400 
401 	   IF hr_api.not_exists_in_hr_lookups
402 			(p_effective_date	=>	p_effective_date,
403 			 p_lookup_type		=>      'GHR_US_POSITION_OCCUPIED',
404 			 p_lookup_code		=>	p_position_status
405 			) THEN
406 
407 	-- Error: Invalid Position Status
408 		hr_utility.set_message(8301, 'GHR_POSITION_STATUS_INVALID');
409              	hr_utility.raise_error;
410 
411 	   END IF;
412 	   hr_utility.set_location(l_proc,30);
413 
414 	END IF;
415 
416      END IF;
417 
418      hr_utility.set_location('Leaving: '|| l_proc, 40);
419 
420 END CHK_POSITION_STATUS;
421 
422 
423 --
424 -----------------------------------<chk_position_is>---------------------------------
425 --
426 
427 Procedure chk_position_is (p_position_description_id	IN
428 					ghr_position_descriptions.position_description_id%TYPE,
429 			  p_position_is IN ghr_position_descriptions.position_is%TYPE,
430 			  p_effective_date IN date,
431 			  p_object_version_number IN number)
432 
433 IS
434 
435 l_proc	varchar2(72) := g_package||'chk_position_is';
436 l_api_updating boolean;
437 
438 
439 BEGIN
440 
441 	hr_utility.set_location('Entering: '|| l_proc, 10);
442 
443 -- Check Mandatory Parameters are set
444 
445 	hr_api.mandatory_arg_error
446 		(p_api_name	 => l_proc,
447          	p_argument       => 'effective date',
448          	p_argument_value => p_effective_date
449 		);
450 
451 --
452 -- Only Proceed with the validation if:
453 --
454 -- a) The current g_old_rec is current and
455 -- b) The flsa_category value has changed
456 -- c) A record is being inserted.
457 --
458 
459 	l_api_updating := ghr_pdi_shd.api_updating(
460 					p_position_description_id	=> p_position_description_id,
461 					p_object_version_number	=> p_object_version_number);
462 
463         IF (l_api_updating
464         AND
465         ((nvl(ghr_pdi_shd.g_old_rec.position_is,hr_api.g_varchar2)
466                                 <> nvl(p_position_is,hr_api.g_varchar2))))
467         OR
468         NOT l_api_updating THEN
469 
470 --
471 	hr_utility.set_location(l_proc,20);
472 --
473 -- 	If Position is is not null then
474 --	Check if the Position Is value exists in fnd_lookups
475 --	Where the look up type is 'GHR_US_SUPERVISORY_STATUS'
476 --
477 
478 	IF p_position_is is NOT NULL THEN
479 
480 	   IF hr_api.not_exists_in_hr_lookups
481 		(p_effective_date	=>	p_effective_date,
482 		 p_lookup_type		=>      'GHR_US_SUPERVISORY_STATUS',
483 		 p_lookup_code		=>	p_position_is
484 		) THEN
485 
486 	-- Error: Invalid Position Is
487 		hr_utility.set_message(8301, 'GHR_POSITION_IS_VALUE_INVALID');
488 	        hr_utility.raise_error;
489 	   END IF;
490 	   hr_utility.set_location(l_proc,30);
491 
492 	END IF;
493 
494      END IF;
495 
496      hr_utility.set_location('Leaving: '|| l_proc, 40);
497 
498 END CHK_POSITION_IS;
499 
500 
501 
505 Procedure chk_position_sensitivity(p_position_description_id	IN
502 -----------------------------<chk_position_sensitivity>--------------------
503 
504 
506 					ghr_position_descriptions.position_description_id%TYPE,
507 				  p_position_sensitivity IN 										ghr_position_descriptions.position_sensitivity%TYPE,
508 				  p_effective_date IN date,
509 				  p_object_version_number IN number)
510 
511 IS
512 
513 l_proc	varchar2(72) := g_package||'chk_position_sensitivity';
514 l_api_updating boolean;
515 
516 
517 BEGIN
518 
519 	hr_utility.set_location('Entering: '|| l_proc, 10);
520 
521 -- Check Mandatory Parameters are set
522 
523 	hr_api.mandatory_arg_error
524 		(p_api_name	 => l_proc,
525          	p_argument       => 'effective date',
526          	p_argument_value => p_effective_date
527 		);
528 
529 --
530 -- Only Proceed with the validation if:
531 --
532 -- a) The current g_old_rec is current and
533 -- b) The Position Sensitivity value has changed
534 -- c) A record is being inserted.
535 --
536 
537 	l_api_updating := ghr_pdi_shd.api_updating(
538 					p_position_description_id	=> p_position_description_id,
539 					p_object_version_number	=> p_object_version_number);
540 
541         IF (l_api_updating
542         AND
543         ((nvl(ghr_pdi_shd.g_old_rec.position_sensitivity,hr_api.g_varchar2)
544                                 <> nvl(p_position_sensitivity,hr_api.g_varchar2))))
545         OR
546         NOT l_api_updating THEN
547 
548 --
549 	hr_utility.set_location(l_proc,20);
550 --
551 -- 	If position sensitivity is not null then
552 --	Check if the position sensitivity value exists in fnd_lookups
553 --	Where the look up type is 'GHR_US_POSN_SENSITIVITY'
554 --
555 
556 	IF p_position_sensitivity is NOT NULL THEN
557 
558 	   IF hr_api.not_exists_in_hr_lookups
559 			(p_effective_date	=>	p_effective_date,
560 			 p_lookup_type		=>      'GHR_US_POSN_SENSITIVITY',
561 			 p_lookup_code		=>	p_position_sensitivity
562 			) THEN
563 	-- Error: Invalid Position Sensitivity
564 		hr_utility.set_message(8301, 'GHR_POS_SENSITIVITY_INVALID');
565 	        hr_utility.raise_error;
566 	   END IF;
567 	   hr_utility.set_location(l_proc,30);
568 
569 	END IF;
570 
571      END IF;
572 
573      hr_utility.set_location('Leaving: '|| l_proc, 40);
574 
575 END CHK_POSITION_SENSITIVITY;
576 
577 
578 
579 
580 --
581 -----------------------------------<chk_competitive_level>----------------------------
582 --
583 
584 Procedure chk_competitive_level(p_position_description_id	IN
585 					ghr_position_descriptions.position_description_id%TYPE,
586 				  p_competitive_level IN ghr_position_descriptions.competitive_level%TYPE,
587 				  p_effective_date IN date,
588 				  p_object_version_number IN number)
589 IS
590 
591 l_proc	varchar2(72) := g_package||'chk_competitive_level';
592 l_api_updating boolean;
593 
594 
595 BEGIN
596 
597 	hr_utility.set_location('Entering: '|| l_proc, 10);
598 
599 -- Check Mandatory Parameters are set
600 
601 	hr_api.mandatory_arg_error
602 		(p_api_name	 => l_proc,
603          	p_argument       => 'effective date',
604          	p_argument_value => p_effective_date
605 		);
606 
607 --
608 -- Only Proceed with the validation if:
609 --
610 -- a) The current g_old_rec is current and
611 -- b) Thecomp level value has changed
612 -- c) A record is being inserted.
613 --
614 
615 	l_api_updating := ghr_pdi_shd.api_updating(
616 					p_position_description_id	=> p_position_description_id,
617 					p_object_version_number	=> p_object_version_number);
618 
619         IF (l_api_updating
620         AND
621         ((nvl(ghr_pdi_shd.g_old_rec.competitive_level,hr_api.g_varchar2)
622                                 <> nvl(p_competitive_level,hr_api.g_varchar2))))
623         OR
624         NOT l_api_updating THEN
625 
626 
627 	hr_utility.set_location(l_proc,20);
628 -- Commented by vtakru 04/06/98
629 -- 	If Competitive level is not null then
630 --	Check if the comp level value exists in fnd_lookups
631 --	Where the look up type is 'GHR_US_COMP_LEVEL'
632 --
633 
634 --	IF p_competitive_level is NOT NULL THEN
635 --
636 --	   IF hr_api.not_exists_in_hr_lookups
637 --			(p_effective_date	=>	p_effective_date,
638 --			 p_lookup_type		=>      'GHR_US_COMP_LEVEL',
639 --			 p_lookup_code		=>	p_competitive_level
640 --			) THEN
641 --	   Error: Invalid Competitive level
642 --		hr_utility.set_message(8301, 'GHR_COMPETITIVE_LEVEL_INVALID');
643 --	        hr_utility.raise_error;
644 --	   END IF;
645 --	   hr_utility.set_location(l_proc,30);
646 --
647 --	END IF;
648 
649      END IF;
650 
651      hr_utility.set_location('Leaving: '|| l_proc, 40);
652 
653 END CHK_COMPETITIVE_LEVEL;
654 
655 
656 --
657 ------------------------------------<chk_career_ladder>--------------------------------
658 --
659 
660 Procedure chk_career_ladder(p_position_description_id	IN
664 			     p_object_version_number IN number)
661 					ghr_position_descriptions.position_description_id%TYPE,
662 			     p_career_ladder IN ghr_position_descriptions.career_ladder%TYPE,
663 			     p_effective_date IN date,
665 
666 
667 
668 IS
669 
670 l_proc	varchar2(72) := g_package||'chk_career_ladder';
671 l_api_updating boolean;
672 
673 
674 BEGIN
675 
676 	hr_utility.set_location('Entering: '|| l_proc, 10);
677 
678 -- Check Mandatory Parameters are set
679 
680 	hr_api.mandatory_arg_error
681 		(p_api_name	 => l_proc,
682          	p_argument       => 'effective date',
683          	p_argument_value => p_effective_date
684 		);
685 
686 --
687 -- Only Proceed with the validation if:
688 --
689 -- a) The current g_old_rec is current and
690 -- b) The career ladder value has changed
691 -- c) A record is being inserted.
692 --
693 
694 	l_api_updating := ghr_pdi_shd.api_updating(
695 					p_position_description_id	=> p_position_description_id,
696 					p_object_version_number	=> p_object_version_number);
697 
698         IF (l_api_updating
699         AND
700         ((nvl(ghr_pdi_shd.g_old_rec.career_ladder,hr_api.g_varchar2)
701                                 <> nvl(p_career_ladder,hr_api.g_varchar2))))
702         OR
703         NOT l_api_updating THEN
704 
705 --
706 	hr_utility.set_location(l_proc,20);
707 --
708 -- 	If career ladder is not null then
709 --	Check if the career ladder value exists in fnd_lookups
710 --	Where the look up type is 'YES_NO'
711 --
712 
713 	IF p_career_ladder is NOT NULL THEN
714 
715 	   IF hr_api.not_exists_in_hr_lookups
716 			(p_effective_date	=>	p_effective_date,
717 			 p_lookup_type		=>      'YES_NO',
718 			 p_lookup_code		=>	p_career_ladder
719 			) THEN
720 	-- Error: Invalid career ladder value
721 		hr_utility.set_message(8301, 'GHR_CAREER_LADDER_INVALID');
722 	        hr_utility.raise_error;
723 	   END IF;
724         ELSE
725 		hr_utility.set_message(8301, 'GHR_38636_NULL_CAREER_LADDER');
726 	        hr_utility.raise_error;
727 
728 	   hr_utility.set_location(l_proc,30);
729 
730 	END IF;
731 
732      END IF;
733 
734      hr_utility.set_location('Leaving: '|| l_proc, 40);
735 
736 END CHK_CAREER_LADDER;
737 
738 --
739 ------------------------------------<chk_routing_group_id>---------------------------------
740 --
741 
742 Procedure chk_routing_group_id(p_position_description_id	IN
743 					ghr_position_descriptions.position_description_id%TYPE,
744 				  p_routing_group_id IN 											ghr_position_descriptions.routing_group_id%TYPE,
745 				  p_effective_date IN date,
746 				  p_object_version_number IN number)
747 
748 IS
749 
750 l_proc	varchar2(72) := g_package||'chk_routing_group_id';
751 l_api_updating boolean;
752 
753 
754 BEGIN
755 
756 -- Note: Will be implemented as Part of the september release.
757 NULL;
758 
759 END CHK_ROUTING_GROUP_ID;
760 
761 
762 
763 --
764 -------------------------------------<chk_non_updateable_args>-------------------------------
765 --
766 
767 
768 Procedure chk_non_updateable_args(p_rec IN ghr_pdi_shd.g_rec_type)
769 
770 IS
771 
772 l_proc 	varchar2(72)	:= g_package || 'chk_non_updateable_args';
773 l_error	exception;
774 l_argument	varchar2(30);
775 
776 
777 BEGIN
778 
779 --
780 
781 	hr_utility.set_location('Entering:'|| l_proc,10);
782 
783 --
784 --	Only proceed with the validation if the row exists for
785 --      the current record in the HR schema.
786 --
787 
788 	IF not ghr_pdi_shd.api_updating
789 			(p_position_description_id   => p_rec.position_description_id,
790 			 p_object_version_number     => p_rec.object_version_number)
791 	THEN
792 
793 		hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
794 		hr_utility.set_message_token('PROCEDURE',l_proc);
795 		hr_utility.set_message_token('STEP','20');
796 	END IF;
797 
798 --
799 	hr_utility.set_location (l_proc, 30);
800 --
801 
802 /*
803 
804 -- To be changed in the screens to base it on the user role.
805 
806 	IF NVL(p_rec.date_to, hr_api.g_date)
807 		<> NVL(ghr_pdi_shd.g_old_rec.date_to,hr_api.g_date)
808 	THEN
809 
810 		l_argument := 'date_to';
811 		RAISE l_error;
812 	END IF;
813 
814 */
815 
816 	IF NVL(p_rec.opm_cert_num, hr_api.g_number)
817 		<> NVL(ghr_pdi_shd.g_old_rec.opm_cert_num,hr_api.g_number)
818 	THEN
819 
820 		l_argument := 'opm_cert_num';
821 		RAISE l_error;
822 	END IF;
823 
824 
825 --
826 	hr_utility.set_location('Leaving :' || l_proc, 40);
827 
828 	EXCEPTION
829 
830 		WHEN l_error THEN
831 
832 			hr_api.argument_changed_error
833 
834 				(p_api_name   =>  l_proc,
835 				 p_argument   =>  l_argument);
836 
837 		WHEN OTHERS THEN
838 
839 			RAISE;
843 -- ----------------------------------------------------------------------------
840 
841 END CHK_NON_UPDATEABLE_ARGS;
842 
844 -- |---------------------------< insert_validate >----------------------------|
845 -- ----------------------------------------------------------------------------
846 Procedure insert_validate(p_rec in ghr_pdi_shd.g_rec_type) is
847 --
848   l_proc  varchar2(72) := g_package||'insert_validate';
849 --
850 Begin
851   hr_utility.set_location('Entering:'||l_proc, 5);
852   --
853   -- Set up the CLIENT_INFO
854   --
855   ghr_utility.set_client_info;
856   --
857   -- Call all supporting business operations
858   --
859   --
860   --
861 
862   chk_date_to(
863               p_position_description_id  => p_rec.position_description_id,
864               p_date_from                => p_rec.date_from,
865               p_date_to                  => p_rec.date_to);
866 
867   chk_flsa(
868               p_position_description_id  => p_rec.position_description_id,
869               p_flsa                     => p_rec.flsa,
870               p_effective_date           => p_rec.date_from,
871               p_object_version_number    => p_rec.object_version_number);
872 
873   chk_category(
874               p_position_description_id  => p_rec.position_description_id,
875               p_category                     => p_rec.category,
876               p_effective_date           => p_rec.date_from,
877               p_object_version_number    => p_rec.object_version_number);
878 
879   chk_financial_statement(
880               p_position_description_id  => p_rec.position_description_id,
881               p_financial_statement      => p_rec.financial_statement,
882               p_effective_date           => p_rec.date_from,
883               p_object_version_number    => p_rec.object_version_number);
884 
885   chk_subject_to_ia_action(
886               p_position_description_id  => p_rec.position_description_id,
887               p_sub_to_ia_action         => p_rec.subject_to_ia_action,
888               p_effective_date           => p_rec.date_from,
889               p_object_version_number    => p_rec.object_version_number);
890 
891   chk_position_status(
892               p_position_description_id  => p_rec.position_description_id,
893               p_position_status         => p_rec.position_status,
894               p_effective_date           => p_rec.date_from,
895               p_object_version_number    => p_rec.object_version_number);
896 
897   chk_position_is(
898               p_position_description_id  => p_rec.position_description_id,
899               p_position_is              => p_rec.position_is,
900               p_effective_date           => p_rec.date_from,
901               p_object_version_number    => p_rec.object_version_number);
902 
903   chk_position_sensitivity(
904               p_position_description_id  => p_rec.position_description_id,
905               p_position_sensitivity     => p_rec.position_sensitivity,
906               p_effective_date           => p_rec.date_from,
907               p_object_version_number    => p_rec.object_version_number);
908 
909   chk_competitive_level(
910               p_position_description_id  => p_rec.position_description_id,
911               p_competitive_level        => p_rec.competitive_level,
912               p_effective_date           => p_rec.date_from,
913               p_object_version_number    => p_rec.object_version_number);
914 
915   chk_career_ladder(
916               p_position_description_id  => p_rec.position_description_id,
917               p_career_ladder            => p_rec.career_ladder,
918               p_effective_date           => p_rec.date_from,
919               p_object_version_number    => p_rec.object_version_number);
920 
921   chk_routing_group_id(
922               p_position_description_id  => p_rec.position_description_id,
923               p_routing_group_id         => p_rec.routing_group_id,
924               p_effective_date           => p_rec.date_from,
925               p_object_version_number    => p_rec.object_version_number);
926 
927 
928   hr_utility.set_location(' Leaving:'||l_proc, 10);
929 End insert_validate;
930 --
931 -- ----------------------------------------------------------------------------
932 -- |---------------------------< update_validate >----------------------------|
933 -- ----------------------------------------------------------------------------
934 Procedure update_validate(p_rec in ghr_pdi_shd.g_rec_type) is
935 --
936   l_proc  varchar2(72) := g_package||'update_validate';
937 --
938 Begin
939   hr_utility.set_location('Entering:'||l_proc, 5);
940   --
941   -- Set up the CLIENT_INFO
942   --
943   ghr_utility.set_client_info;
944   --
945   -- Call all supporting business operations
946   --
947   --
948   --
949 
950   chk_date_to(
951               p_position_description_id  => p_rec.position_description_id,
952               p_date_from                => p_rec.date_from,
953               p_date_to                  => p_rec.date_to);
954 
955   chk_flsa(
956               p_position_description_id  => p_rec.position_description_id,
957               p_flsa                     => p_rec.flsa,
961   chk_financial_statement(
958               p_effective_date           => p_rec.date_from,
959               p_object_version_number    => p_rec.object_version_number);
960 
962               p_position_description_id  => p_rec.position_description_id,
963               p_financial_statement      => p_rec.financial_statement,
964               p_effective_date           => p_rec.date_from,
965               p_object_version_number    => p_rec.object_version_number);
966 
967   chk_subject_to_ia_action(
968               p_position_description_id  => p_rec.position_description_id,
969               p_sub_to_ia_action         => p_rec.subject_to_ia_action,
970               p_effective_date           => p_rec.date_from,
971               p_object_version_number    => p_rec.object_version_number);
972 
973   chk_position_status(
974               p_position_description_id  => p_rec.position_description_id,
975               p_position_status         => p_rec.position_status,
976               p_effective_date           => p_rec.date_from,
977               p_object_version_number    => p_rec.object_version_number);
978 
979   chk_position_is(
980               p_position_description_id  => p_rec.position_description_id,
981               p_position_is              => p_rec.position_is,
982               p_effective_date           => p_rec.date_from,
983               p_object_version_number    => p_rec.object_version_number);
984 
985   chk_position_sensitivity(
986               p_position_description_id  => p_rec.position_description_id,
987               p_position_sensitivity     => p_rec.position_sensitivity,
988               p_effective_date           => p_rec.date_from,
989               p_object_version_number    => p_rec.object_version_number);
990 
991   chk_competitive_level(
992               p_position_description_id  => p_rec.position_description_id,
993               p_competitive_level        => p_rec.competitive_level,
994               p_effective_date           => p_rec.date_from,
995               p_object_version_number    => p_rec.object_version_number);
996 
997   chk_career_ladder(
998               p_position_description_id  => p_rec.position_description_id,
999               p_career_ladder            => p_rec.career_ladder,
1000               p_effective_date           => p_rec.date_from,
1001               p_object_version_number    => p_rec.object_version_number);
1002 
1003   chk_routing_group_id(
1004               p_position_description_id  => p_rec.position_description_id,
1005               p_routing_group_id         => p_rec.routing_group_id,
1006               p_effective_date           => p_rec.date_from,
1007               p_object_version_number    => p_rec.object_version_number);
1008   hr_utility.set_location(' Leaving:'||l_proc, 10);
1009 End update_validate;
1010 --
1011 -- ----------------------------------------------------------------------------
1012 -- |---------------------------< delete_validate >----------------------------|
1013 -- ----------------------------------------------------------------------------
1014 Procedure delete_validate(p_rec in ghr_pdi_shd.g_rec_type) is
1015 --
1016   l_proc  varchar2(72) := g_package||'delete_validate';
1017 --
1018 Begin
1019   hr_utility.set_location('Entering:'||l_proc, 5);
1020   --
1021   -- Call all supporting business operations
1022   --
1023   hr_utility.set_location(' Leaving:'||l_proc, 10);
1024 End delete_validate;
1025 --
1026 end ghr_pdi_bus;