DBA Data[Home] [Help]

PACKAGE BODY: APPS.PER_JBR_BUS

Source


1 Package Body per_jbr_bus as
2 /* $Header: pejbrrhi.pkb 115.7 2002/12/06 10:18:00 pkakar ship $ */
3 --
4 -- ---------------------------------------------------------------------------
5 -- |                    Private Global Definitions                           |
6 -- ---------------------------------------------------------------------------
7 --
8 g_package  varchar2(33)	:= '  per_jbr_bus.';  -- Global package name
9 --
10 -- [ Start of change 8/4 by Kim Conley]
11 --
12 -- ----------------------------------------------------------------------------
13 -- |--------------------------< chk_job_id >----------------------------------|
14 -- ----------------------------------------------------------------------------
15 --
16 -- Description:
17 --  	This procedure validates that the job_id exists in the
18 --	PER_JOBS_V view .
19 --
20 --	The procedure also validates that the combination of job id
21 --	and analysis criteria id, do not already exist in the job requirement
22 --	table.  This procedure does not do the mandatory check, because
23 --	the chk_job_pos confirmed the existence of job id
24 --
25 -- Pre-conditions:
26 --  	The job id must not be null, and position id must be null
27 --
28 -- In Arguments:
29 --	p_analysis_criteria_id
30 --	p_job_id
31 --	p_job_requirement_id
32 --	p_business_group_id
33 --
34 -- Post Success:
35 -- 	If a job is is valid, and the combination of job and
36 --	analysis criteria doesn't already exist then processing continues
37 --
38 -- Post Failure:
39 --	If  job id is not valid or the combination of job and
40 --	analysis_criteria_id already exist then
41 --	an application error will be raised and processing is terminated.
42 --
43 -- Access Status:
44 --	Internal Table Handler Use Only
45 --
46 -- {End of Comments}
47 -- ----------------------------------------------------------------------------
48 Procedure chk_job_id (p_job_id			in  number,
49                       p_analysis_criteria_id 	in  number,
50 	              p_job_requirement_id	in  number default null,
51 	              p_business_group_id	in  number,
52                       p_object_version_number   in  number default null) is
53 --
54   l_exists		varchar2(1);
55   l_proc		varchar2(72)	:=  g_package||'chk_job_id';
56   l_api_updating        boolean;
57 --
58 cursor csr_job_exists is
59    select 'x'
60    from   per_jobs_v pj
61    where  pj.job_id = p_job_id
62    and    pj.business_group_id + 0 = p_business_group_id;
63 --
64 cursor csr_combo_exists is
65    select 'x'
66    from   per_job_requirements pjr
67    where (p_job_requirement_id <> pjr.job_requirement_id or
68           p_job_requirement_id is NULL)
69    and    p_job_id = pjr.job_id
70    and    p_analysis_criteria_id = pjr.analysis_criteria_id;
71 --
72 begin
73   hr_utility.set_location('Entering :'||l_proc,1);
74   --
75   l_api_updating :=
76     per_jbr_shd.api_updating
77       (p_job_requirement_id    => p_job_requirement_id,
78        p_object_version_number => p_object_version_number);
79   --
80   if ((l_api_updating and
81       (per_jbr_shd.g_old_rec.job_id <> p_job_id) or
82       (per_jbr_shd.g_old_rec.analysis_criteria_id <>
83        p_analysis_criteria_id)) or
84       (not l_api_updating)) then
85 --
86 --  Checks that job is valid
87 --
88 hr_utility.set_location(l_proc,2);
89 --
90     open csr_job_exists;
91     fetch csr_job_exists into l_exists;
92     if csr_job_exists%notfound then
93       close csr_job_exists;
94       hr_utility.set_message(801,'HR_51090_JOB_NOT_EXIST');
95       hr_utility.raise_error;
96     else
97       close csr_job_exists;
98     end if;
99 --
100 --
101 --  Checks the combination of job and analysis criteria
102 --
103     hr_utility.set_location(l_proc,3);
104     open csr_combo_exists;
105     fetch csr_combo_exists into l_exists;
106     if csr_combo_exists%found then
107       close csr_combo_exists;
108       hr_utility.set_message(801,'HR_51109_JBR_ALREADY_EXISTS');
109       hr_utility.raise_error;
110     else
111       close csr_combo_exists;
112   end if;
113 --
114 end if;
115 hr_utility.set_location('Leaving:'||l_proc,4);
116 end chk_job_id;
117 --
118 -- ----------------------------------------------------------------------------
119 -- |----------------------< chk_position_id >---------------------------------|
120 -- ----------------------------------------------------------------------------
121 --
122 -- Description:
123 --  	This procedure validates that the position_id exists in the
124 --	HR_POSITIONS table
125 --
126 --	The procedure also validates that the combination of position id
127 --	and analysis criteria id, do not already exist in the job requirement
128 --	table.  This procedure does not do the mandatory check, because
129 --	the chk_job_pos confirmed the existence of position id
130 --
131 -- Pre-conditions:
132 --  	The position id must not be null, and job id must be null
133 --
134 -- In Arguments:
135 --	p_analysis_criteria_id
136 --	p_position_id
137 --	p_job_requirement_id
138 --      p_business_group_id
139 --
140 -- Post Success:
141 -- 	If a position is is valid, and the combination of position and
142 --	analysis criteria doesn't already exist then processing continues
143 --
144 -- Post Failure:
145 --	If  position id is not valid or the combination of position and
146 --	analysis_criteria_id already exist then
147 --	an application error will be raised and processing is terminated.
148 --
149 -- Access Status:
150 --	Internal Table Handler Use Only
151 --
152 -- {End of Comments}
153 -- ---------------------------------------------------------------------------
154 Procedure chk_position_id (
155 	         p_position_id		 in number,
156                  p_analysis_criteria_id	 in number,
157 	         p_job_requirement_id	 in number default null,
158 	         p_business_group_id	 in number,
159                  p_object_version_number in number default null) is
160 --
161   l_exists		varchar2(1);
162   l_proc	        varchar2(72)	:=  g_package||'chk_position_id';
163   l_api_updating        boolean;
164   --
165   -- Changed 12-Oct-99 SCNair (per_positions to hr_positions) Date tracked position req.
166   --
167   cursor csr_position_exists is
168      select 'x'
169      from   hr_positions_f pos
170      where  pos.position_id = p_position_id
171      and    pos.business_group_id + 0 = p_business_group_id;
172 --
173   cursor csr_pos_combo_exists is
174     select 'x'
175     from   per_job_requirements pjr
176     where  (p_job_requirement_id <> pjr.job_requirement_id or
177             p_job_requirement_id is NULL)
178     and    p_position_id = pjr.position_id
179     and    p_analysis_criteria_id = pjr.analysis_criteria_id;
180 --
181 begin
182   hr_utility.set_location('Entering :'||l_proc,1);
183   l_api_updating :=
184     per_jbr_shd.api_updating
185       (p_job_requirement_id    => p_job_requirement_id,
186        p_object_version_number => p_object_version_number);
187   --
188   if ((l_api_updating and
189       (per_jbr_shd.g_old_rec.position_id <> p_position_id or
190        per_jbr_shd.g_old_rec.analysis_criteria_id <>
191        p_analysis_criteria_id)) or
192       (not l_api_updating)) then
193     --
194     --  Checks that position is valid
195     --
196     hr_utility.set_location(l_proc,2);
197     open csr_position_exists;
198     fetch csr_position_exists into l_exists;
199     if csr_position_exists%notfound then
200       close csr_position_exists;
201       hr_utility.set_message(801,'HR_51093_POS_NOT_EXIST');
202       hr_utility.raise_error;
203     else
204       close csr_position_exists;
205     end if;
206   --
207     --
208     --  Checks the combination of position and analysis criteria
209     --
210     hr_utility.set_location(l_proc,3);
211     open csr_pos_combo_exists;
212     fetch csr_pos_combo_exists into l_exists;
213     if csr_pos_combo_exists%found then
214       close csr_pos_combo_exists;
215       hr_utility.set_message(801,'HR_51110_JBR_POS_ALREADY_EXIS');
216     hr_utility.raise_error;
217     else
218       close csr_pos_combo_exists;
219     end if;
220   end if;
221 --
222   hr_utility.set_location('Leaving:'||l_proc,4);
223 end chk_position_id;
224 --
225 -- ----------------------------------------------------------------------------
226 -- |---------------< chk_analysis_criteria_id >-------------------------------|
227 -- ----------------------------------------------------------------------------
228 --
229 -- Description:
230 --  	Validates that the analysis_criteria_id is not null, and exists in
231 --            per_analysis_criteria table
232 --
233 -- Pre-conditions:
234 --  	None
235 --
236 -- In Arguments:
237 --	p_analysis_criteria_id
238 --
239 -- Post Success:
240 -- 	If a analysis_criteria_id is valid then processing continues
241 --
242 -- Post Failure:
243 --	If  a analysis_criteria_id is null or not in per_analysis_criteria then
244 --	an application error will be raised and processing is terminated.
245 --
246 -- Access Status:
247 --	Internal Table Handler Use Only
248 --
249 -- {End of Comments}
250 -- ---------------------------------------------------------------------------
251 Procedure chk_analysis_criteria_id
252             (p_analysis_criteria_id  in number,
253              p_job_requirement_id    in number default null,
254              p_object_version_number in number default null) is
255 --
256   l_exists	 varchar2(1);
257   l_proc	 varchar2(72)	:=  g_package||'chk_analysis_criteria_id';
258   l_api_updating boolean;
259 --
260   cursor csr_criteria_exists is
261     select 'x'
262     from   per_analysis_criteria pac
263     where  pac.analysis_criteria_id = p_analysis_criteria_id;
264 --
265 begin
266   --
267   --  Checks that analysis criteria is not null
268   --
269   hr_utility.set_location('Entering:'||l_proc,1);
270   --
271   hr_api.mandatory_arg_error(p_api_name  => l_proc,
272 	 		     p_argument  => 'analysis_criteria_id',
273                              p_argument_value  =>  p_analysis_criteria_id);
274   --
275   hr_utility.set_location(l_proc,2);
276   l_api_updating :=
277     per_jbr_shd.api_updating
278       (p_job_requirement_id    => p_job_requirement_id,
279        p_object_version_number => p_object_version_number);
280   --
281   if ((l_api_updating and
282       (per_jbr_shd.g_old_rec.analysis_criteria_id <>
283        p_analysis_criteria_id)) or
284       (not l_api_updating)) then
285     --
286     --
287     --  Checks that analysis criteria is valid
288     --
289     hr_utility.set_location(l_proc, 3);
290     --
291     open csr_criteria_exists;
292     fetch csr_criteria_exists into l_exists;
293     if csr_criteria_exists%notfound then
294       close csr_criteria_exists;
295       hr_utility.set_message(801,'HR_51111_JBR_A_CR_NOT_EXIS');
296     hr_utility.raise_error;
297     else
298       close csr_criteria_exists;
299     end if;
300   end if;
301   --
302 hr_utility.set_location('Leaving:'||l_proc,4);
303 end chk_analysis_criteria_id;
304 --
305 -- ----------------------------------------------------------------------------
306 -- |-------------------------< chk_job_pos >----------------------------------|
307 --  ---------------------------------------------------------------------------
308 --
309 -- Description:
310 --  	This procedure checks for the mutual exculsivity of job_id and
311 --            position_id.  If job exists but position doesn't the chk_job_id
312 --            procedure is called.  If position exists but job doesn't the
313 --	chk_position_id procedure is called.
314 --
315 --	NOTE:  This procedure was created so that there was no
316 --	conditional branching in the insert_validate procedure
317 --
318 -- Pre-conditions:
319 --  	None
320 --
321 -- In Arguments:
322 --	p_position_id
323 --	p_job_id
324 --	p_analysis_criteria_id
325 --	p_job_requirement_id
326 --
327 -- Post Success:
328 -- 	If a job is not null and position is null chk_job_id is called
329 --      (processing continues).  If position is not null and job is
330 --      null then chk_position_id is called (processing continues)
331 --
332 -- Post Failure:
333 --	If  both job and position exist , OR job and position are null then
334 --	an application error will be raised and processing is terminated.
335 --
336 -- Access Status:
337 --	Internal Table Handler Use Only
338 --
339 -- {End of Comments}
340 -------------------------------------------------------------------------------
341 Procedure chk_job_pos
342                  (p_position_id 	  in number,
343 	          p_job_id         	  in number,
344 	          p_analysis_criteria_id  in number,
345 	          p_job_requirement_id	  in number default null,
346 	          p_business_group_id	  in number,
347                   p_object_version_number in number default null) is
348 --
349   l_proc  varchar2(72)  :=  g_package||'chk_job_pos';
350 --
351 begin
352   hr_utility.set_location(' Entering:'||l_proc,1);
353   --
354   if (p_position_id is not null AND p_job_id is null) then
355     chk_position_id(p_job_requirement_id        => p_job_requirement_id,
356                     p_object_version_number     => p_object_version_number,
357                     p_position_id  		=> p_position_id,
358 	 	    p_analysis_criteria_id	=> p_analysis_criteria_id,
359 		    p_business_group_id 	=> p_business_group_id);
360   elsif (p_job_id is not null AND p_position_id is null) then
361     chk_job_id(p_job_requirement_id     => p_job_requirement_id,
362                p_object_version_number  => p_object_version_number,
363                p_job_id			=> p_job_id,
364 	       p_analysis_criteria_id	=> p_analysis_criteria_id,
365 	       p_business_group_id	=> p_business_group_id);
366   else
367     hr_utility.set_message(801, 'HR_51112_JBR_JOB_OR_POS');
368     hr_utility.raise_error;
369   end if;
370   --
371   hr_utility.set_location(' Leaving:'||l_proc,2);
372 end chk_job_pos;
373 --
374 -- ----------------------------------------------------------------------------
375 -- |------------------------< chk_essential >---------------------------------|
376 --  ---------------------------------------------------------------------------
377 --
378 -- Description:
379 --  	This procedure checks that ESSENTIAL is 'Y' or 'N'.
380 --
381 -- Pre-conditions:
382 --  	None
383 --
384 -- In Arguments:
385 --	p_essential
386 --
387 -- Post Success:
388 -- 	 If essential is 'Y' or 'N' processing continues
389 --
390 -- Post Failure:
391 --	If  essential is not 'Y' or 'N'  then
392 --	an application error will be raised and processing is terminated.
393 --
394 -- Access Status:
395 --	Internal Table Handler Use Only
396 --
397 -- {End of Comments}
398 -- ---------------------------------------------------------------------------
399 Procedure chk_essential(p_essential             in varchar2,
400                         p_job_requirement_id    in number default null,
401                         p_object_version_number in number default null) is
402 --
403   l_proc         varchar2(72)  := g_package||'chk_essential';
404   l_api_updating boolean;
405   l_exists       varchar2(1);
406 --
407   cursor csr_essential is
408     select 'x'
409     from   hr_lookups hl
410     where  hl.lookup_type = 'YES_NO'
411     and    hl.lookup_code = p_essential;
412 --
413 begin
414   --
415   hr_utility.set_location('Entering :'||l_proc,1);
416   --
417   hr_api.mandatory_arg_error(p_api_name  => l_proc,
421   hr_utility.set_location(l_proc,2);
418  	  	             p_argument  => 'essential',
419                              p_argument_value  =>  p_essential);
420   --
422 
423   l_api_updating :=
424     per_jbr_shd.api_updating
425       (p_job_requirement_id => p_job_requirement_id,
426        p_object_version_number => p_object_version_number);
427   --
428   if ((l_api_updating and
429        per_jbr_shd.g_old_rec.essential <> p_essential) or
430       (not l_api_updating)) then
431   --
432   hr_utility.set_location(l_proc,3);
433   --
434     open csr_essential;
435     fetch csr_essential into l_exists;
436     if csr_essential%notfound then
437       hr_utility.set_message(801, 'HR_51113_JBR_ESSENTIAL');
438     hr_utility.raise_error;
439     end if;
440     close csr_essential;
441   end if;
442   --
443 hr_utility.set_location(' Leaving :'||l_proc,4);
444 --
445 end chk_essential;
446 --
447 --
448 -- -----------------------------------------------------------------------
449 -- |------------------------------< chk_df >-----------------------------|
450 -- -----------------------------------------------------------------------
451 --
452 -- Description:
453 --   Validates the all Descriptive Flexfield values.
454 --
455 -- Pre-conditions:
456 --   All other columns have been validated. Must be called as the
457 --   last step from insert_validate and update_validate.
458 --
459 -- In Arguments:
460 --   p_rec
461 --
462 -- Post Success:
463 --   If the Descriptive Flexfield structure column and data values are
464 --   all valid this procedure will end normally and processing will
465 --   continue.
466 --
467 -- Post Failure:
468 --   If the Descriptive Flexfield structure column value or any of
469 --   the data values are invalid then an application error is raised as
470 --   a PL/SQL exception.
471 --
472 -- Access Status:
473 --   Internal Row Handler Use Only.
474 --
475 procedure chk_df
476   (p_rec in per_jbr_shd.g_rec_type) is
477 --
478   l_proc     varchar2(72) := g_package||'chk_df';
479 --
480 begin
481   hr_utility.set_location('Entering:'||l_proc, 10);
482   --
483   if ((p_rec.job_requirement_id is not null) and (
484     nvl(per_jbr_shd.g_old_rec.attribute_category, hr_api.g_varchar2) <>
485     nvl(p_rec.attribute_category, hr_api.g_varchar2) or
486     nvl(per_jbr_shd.g_old_rec.attribute1, hr_api.g_varchar2) <>
487     nvl(p_rec.attribute1, hr_api.g_varchar2) or
488     nvl(per_jbr_shd.g_old_rec.attribute2, hr_api.g_varchar2) <>
489     nvl(p_rec.attribute2, hr_api.g_varchar2) or
490     nvl(per_jbr_shd.g_old_rec.attribute3, hr_api.g_varchar2) <>
491     nvl(p_rec.attribute3, hr_api.g_varchar2) or
492     nvl(per_jbr_shd.g_old_rec.attribute4, hr_api.g_varchar2) <>
493     nvl(p_rec.attribute4, hr_api.g_varchar2) or
494     nvl(per_jbr_shd.g_old_rec.attribute5, hr_api.g_varchar2) <>
495     nvl(p_rec.attribute5, hr_api.g_varchar2) or
496     nvl(per_jbr_shd.g_old_rec.attribute6, hr_api.g_varchar2) <>
497     nvl(p_rec.attribute6, hr_api.g_varchar2) or
498     nvl(per_jbr_shd.g_old_rec.attribute7, hr_api.g_varchar2) <>
499     nvl(p_rec.attribute7, hr_api.g_varchar2) or
500     nvl(per_jbr_shd.g_old_rec.attribute8, hr_api.g_varchar2) <>
501     nvl(p_rec.attribute8, hr_api.g_varchar2) or
502     nvl(per_jbr_shd.g_old_rec.attribute9, hr_api.g_varchar2) <>
503     nvl(p_rec.attribute9, hr_api.g_varchar2) or
504     nvl(per_jbr_shd.g_old_rec.attribute10, hr_api.g_varchar2) <>
505     nvl(p_rec.attribute10, hr_api.g_varchar2) or
506     nvl(per_jbr_shd.g_old_rec.attribute11, hr_api.g_varchar2) <>
507     nvl(p_rec.attribute11, hr_api.g_varchar2) or
508     nvl(per_jbr_shd.g_old_rec.attribute12, hr_api.g_varchar2) <>
509     nvl(p_rec.attribute12, hr_api.g_varchar2) or
510     nvl(per_jbr_shd.g_old_rec.attribute13, hr_api.g_varchar2) <>
511     nvl(p_rec.attribute13, hr_api.g_varchar2) or
512     nvl(per_jbr_shd.g_old_rec.attribute14, hr_api.g_varchar2) <>
513     nvl(p_rec.attribute14, hr_api.g_varchar2) or
514     nvl(per_jbr_shd.g_old_rec.attribute15, hr_api.g_varchar2) <>
515     nvl(p_rec.attribute15, hr_api.g_varchar2) or
516     nvl(per_jbr_shd.g_old_rec.attribute16, hr_api.g_varchar2) <>
517     nvl(p_rec.attribute16, hr_api.g_varchar2) or
518     nvl(per_jbr_shd.g_old_rec.attribute17, hr_api.g_varchar2) <>
519     nvl(p_rec.attribute17, hr_api.g_varchar2) or
520     nvl(per_jbr_shd.g_old_rec.attribute18, hr_api.g_varchar2) <>
521     nvl(p_rec.attribute18, hr_api.g_varchar2) or
522     nvl(per_jbr_shd.g_old_rec.attribute19, hr_api.g_varchar2) <>
523     nvl(p_rec.attribute19, hr_api.g_varchar2) or
524     nvl(per_jbr_shd.g_old_rec.attribute20, hr_api.g_varchar2) <>
525     nvl(p_rec.attribute20, hr_api.g_varchar2)))
526     or
527     (p_rec.job_requirement_id is null) then
528    --
529    -- Only execute the validation if absolutely necessary:
530    -- a) During update, the structure column value or any
531    --    of the attribute values have actually changed.
532    -- b) During insert.
533    --
534    hr_dflex_utility.ins_or_upd_descflex_attribs
535      (p_appl_short_name     => 'PER'
536       ,p_descflex_name      => 'PER_JOB_REQUIREMENTS'
537       ,p_attribute_category => p_rec.attribute_category
538       ,p_attribute1_name    => 'ATTRIBUTE1'
539       ,p_attribute1_value   => p_rec.attribute1
543       ,p_attribute3_value   => p_rec.attribute3
540       ,p_attribute2_name    => 'ATTRIBUTE2'
541       ,p_attribute2_value   => p_rec.attribute2
542       ,p_attribute3_name    => 'ATTRIBUTE3'
544       ,p_attribute4_name    => 'ATTRIBUTE4'
545       ,p_attribute4_value   => p_rec.attribute4
546       ,p_attribute5_name    => 'ATTRIBUTE5'
547       ,p_attribute5_value   => p_rec.attribute5
548       ,p_attribute6_name    => 'ATTRIBUTE6'
549       ,p_attribute6_value   => p_rec.attribute6
550       ,p_attribute7_name    => 'ATTRIBUTE7'
551       ,p_attribute7_value   => p_rec.attribute7
552       ,p_attribute8_name    => 'ATTRIBUTE8'
553       ,p_attribute8_value   => p_rec.attribute8
554       ,p_attribute9_name    => 'ATTRIBUTE9'
555       ,p_attribute9_value   => p_rec.attribute9
556       ,p_attribute10_name   => 'ATTRIBUTE10'
557       ,p_attribute10_value  => p_rec.attribute10
558       ,p_attribute11_name   => 'ATTRIBUTE11'
559       ,p_attribute11_value  => p_rec.attribute11
560       ,p_attribute12_name   => 'ATTRIBUTE12'
561       ,p_attribute12_value  => p_rec.attribute12
562       ,p_attribute13_name   => 'ATTRIBUTE13'
563       ,p_attribute13_value  => p_rec.attribute13
564       ,p_attribute14_name   => 'ATTRIBUTE14'
565       ,p_attribute14_value  => p_rec.attribute14
566       ,p_attribute15_name   => 'ATTRIBUTE15'
567       ,p_attribute15_value  => p_rec.attribute15
568       ,p_attribute16_name   => 'ATTRIBUTE16'
569       ,p_attribute16_value  => p_rec.attribute16
570       ,p_attribute17_name   => 'ATTRIBUTE17'
571       ,p_attribute17_value  => p_rec.attribute17
572       ,p_attribute18_name   => 'ATTRIBUTE18'
573       ,p_attribute18_value  => p_rec.attribute18
574       ,p_attribute19_name   => 'ATTRIBUTE19'
575       ,p_attribute19_value  => p_rec.attribute19
576       ,p_attribute20_name   => 'ATTRIBUTE20'
577       ,p_attribute20_value  => p_rec.attribute20
578       );
579   end if;
580   --
581   hr_utility.set_location(' Leaving:'||l_proc, 20);
582 end chk_df;
583 --
584 -- ---------------------------------------------------------------------------
585 -- |--------------------------< insert_validate >----------------------------|
586 -- ---------------------------------------------------------------------------
587 Procedure insert_validate(p_rec in per_jbr_shd.g_rec_type) is
588 --
589   l_proc  varchar2(72) := g_package||'insert_validate';
590 --
591 Begin
592   hr_utility.set_location('Entering:'||l_proc, 5);
593   --
594   -- Call all supporting business operations
595   --
596   hr_api.validate_bus_grp_id(p_rec.business_group_id);  -- Validate Bus Grp
597   --
598   -- [ Start of changes by Kim Conley]
599   --
600   chk_analysis_criteria_id
601     (p_analysis_criteria_id => p_rec.analysis_criteria_id);
602   --
603   chk_job_pos (p_position_id 		=> p_rec.position_id,
604 	       p_job_id         	=> p_rec.job_id,
605 	       p_analysis_criteria_id	=> p_rec.analysis_criteria_id,
606 	       p_business_group_id	=> p_rec.business_group_id);
607   --
608   chk_essential(p_essential => p_rec.essential);
609   --
610   -- Call descriptive flexfield validation routines
611   --
612   per_jbr_bus.chk_df(p_rec => p_rec);
613   --
614   hr_utility.set_location(' Leaving:'||l_proc, 10);
615 End insert_validate;
616 --
617 -- ---------------------------------------------------------------------------
618 -- |--------------------------< update_validate >----------------------------|
619 -- ---------------------------------------------------------------------------
620 Procedure update_validate(p_rec in per_jbr_shd.g_rec_type) is
621 --
622   l_proc  varchar2(72) := g_package||'update_validate';
623 --
624 Begin
625   hr_utility.set_location('Entering:'||l_proc, 5);
626   --
627   -- Call all supporting business operations
628   --
629   -- Validate Business Group
630   --
631   hr_api.validate_bus_grp_id(p_rec.business_group_id);
632   --
633   hr_utility.set_location(l_proc, 6);
634   --
635   chk_analysis_criteria_id
636     (p_job_requirement_id    => p_rec.job_requirement_id,
637      p_object_version_number => p_rec.object_version_number,
638      p_analysis_criteria_id  => p_rec.analysis_criteria_id);
639   --
640   chk_job_pos
641     (p_job_requirement_id    => p_rec.job_requirement_id,
642      p_object_version_number => p_rec.object_version_number,
643      p_position_id           => p_rec.position_id,
644      p_job_id                => p_rec.job_id,
645      p_analysis_criteria_id  => p_rec.analysis_criteria_id,
646      p_business_group_id     => p_rec.business_group_id);
647   --
648   chk_essential
649     (p_job_requirement_id    => p_rec.job_requirement_id,
650      p_object_version_number => p_rec.object_version_number,
651      p_essential             => p_rec.essential);
652   --
653   -- Call descriptive flexfield validation routines
654   --
655   per_jbr_bus.chk_df(p_rec => p_rec);
656   --
657   hr_utility.set_location(' Leaving:'||l_proc, 10);
658 End update_validate;
659 --
660 -- ---------------------------------------------------------------------------
661 -- |--------------------------< delete_validate >----------------------------|
662 -- ---------------------------------------------------------------------------
663 Procedure delete_validate(p_rec in per_jbr_shd.g_rec_type) is
667 Begin
664 --
665 l_proc  varchar2(72) := g_package||'delete_validate';
666 --
668 hr_utility.set_location('Entering:'||l_proc, 5);
669   --
670   -- Call all supporting business operations
671   --
672 hr_utility.set_location(' Leaving:'||l_proc, 10);
673 End delete_validate;
674 --
675 end per_jbr_bus;