DBA Data[Home] [Help]

PACKAGE BODY: APPS.PER_REQ_BUS

Source


1 Package Body per_req_bus as
2 /* $Header: pereqrhi.pkb 120.0.12000000.2 2007/07/10 05:22:20 mkjayara noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                     Private Global Definitions                           |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package  varchar2(33) := '  per_req_bus.';  -- Global package name
9 --
10 -- The following two global variables are only to be
11 -- used by the return_legislation_code function.
12 --
13 g_legislation_code            varchar2(150)  default null;
14 g_requisition_id              number         default null;
15 --
16 --  ---------------------------------------------------------------------------
17 --  |----------------------< set_security_group_id >--------------------------|
18 --  ---------------------------------------------------------------------------
19 --
20 Procedure set_security_group_id
21   (p_requisition_id                       in number
22   ) is
23   --
24   -- Declare cursor
25   --
26   cursor csr_sec_grp is
27     select pbg.security_group_id
28       from per_business_groups pbg
29          , per_requisitions req
30      where req.requisition_id = p_requisition_id
31        and pbg.business_group_id = req.business_group_id;
32   --
33   -- Declare local variables
34   --
35   l_security_group_id number;
36   l_proc              varchar2(72)  :=  g_package||'set_security_group_id';
37   --
38 begin
39   --
40   hr_utility.set_location('Entering:'|| l_proc, 10);
41   --
42   -- Ensure that all the mandatory parameter are not null
43   --
44   hr_api.mandatory_arg_error
45     (p_api_name           => l_proc
46     ,p_argument           => 'requisition_id'
47     ,p_argument_value     => p_requisition_id
48     );
49   --
50   open csr_sec_grp;
51   fetch csr_sec_grp into l_security_group_id;
52   --
53   if csr_sec_grp%notfound then
54      --
55      close csr_sec_grp;
56      --
57      -- The primary key is invalid therefore we must error
58      --
59      fnd_message.set_name('PAY','HR_7220_INVALID_PRIMARY_KEY');
60      fnd_message.raise_error;
61      --
62   end if;
63   close csr_sec_grp;
64   --
65   -- Set the security_group_id in CLIENT_INFO
66   --
67   hr_api.set_security_group_id
68     (p_security_group_id => l_security_group_id
69     );
70   --
71   hr_utility.set_location(' Leaving:'|| l_proc, 20);
72   --
73 end set_security_group_id;
74 --
75 --  ---------------------------------------------------------------------------
76 --  |---------------------< return_legislation_code >-------------------------|
77 --  ---------------------------------------------------------------------------
78 --
79 Function return_legislation_code
80   (p_requisition_id                       in     number
81   )
82   Return Varchar2 Is
83   --
84   -- Declare cursor
85   --
86  cursor csr_leg_code is
87     select pbg.legislation_code
88       from per_business_groups pbg
89          , per_requisitions req
90      where req.requisition_id = p_requisition_id
91        and pbg.business_group_id = req.business_group_id;
92   --
93   -- Declare local variables
94   --
95   l_legislation_code  varchar2(150);
96   l_proc              varchar2(72)  :=  g_package||'return_legislation_code';
97   --
98 Begin
99   --
100   hr_utility.set_location('Entering:'|| l_proc, 10);
101   --
102   -- Ensure that all the mandatory parameter are not null
103   --
104   hr_api.mandatory_arg_error
105     (p_api_name           => l_proc
106     ,p_argument           => 'requisition_id'
107     ,p_argument_value     => p_requisition_id
108     );
109   --
110   if ( nvl(per_req_bus.g_requisition_id, hr_api.g_number)
111        = p_requisition_id) then
112     --
113     -- The legislation code has already been found with a previous
114     -- call to this function. Just return the value in the global
115     -- variable.
116     --
117     l_legislation_code := per_req_bus.g_legislation_code;
118     hr_utility.set_location(l_proc, 20);
119   else
120     --
121     -- The ID is different to the last call to this function
122     -- or this is the first call to this function.
123     --
124     open csr_leg_code;
125     fetch csr_leg_code into l_legislation_code;
126     --
127     if csr_leg_code%notfound then
128       --
129       -- The primary key is invalid therefore we must error
130       --
131       close csr_leg_code;
132       fnd_message.set_name('PAY','HR_7220_INVALID_PRIMARY_KEY');
133       fnd_message.raise_error;
134     end if;
135     hr_utility.set_location(l_proc,30);
136     --
137     -- Set the global variables so the values are
138     -- available for the next call to this function.
139     --
140     close csr_leg_code;
141     per_req_bus.g_requisition_id              := p_requisition_id;
142     per_req_bus.g_legislation_code  := l_legislation_code;
143   end if;
144   hr_utility.set_location(' Leaving:'|| l_proc, 40);
145   return l_legislation_code;
146 end return_legislation_code;
147 --
148 -- ----------------------------------------------------------------------------
149 -- |------------------------------< chk_df >----------------------------------|
150 -- ----------------------------------------------------------------------------
151 --
152 -- Description:
153 --   Validates all the Descriptive Flexfield values.
154 --
155 -- Prerequisites:
156 --   All other columns have been validated.  Must be called as the
157 --   last step from insert_validate and update_validate.
158 --
159 -- In Arguments:
160 --   p_rec
161 --
162 -- Post Success:
163 --   If the Descriptive Flexfield structure column and data values are
164 --   all valid this procedure will end normally and processing will
165 --   continue.
166 --
167 -- Post Failure:
168 --   If the Descriptive Flexfield structure column value or any of
169 --   the data values are invalid then an application error is raised as
170 --   a PL/SQL exception.
171 --
172 -- Access Status:
173 --   Internal Row Handler Use Only.
174 --
175 -- ----------------------------------------------------------------------------
176 procedure chk_df
177   (p_rec in per_req_shd.g_rec_type
178   ) is
179 --
180   l_proc   varchar2(72) := g_package || 'chk_df';
181 --
182 begin
183   hr_utility.set_location('Entering:'||l_proc,10);
184   --
185   if ((p_rec.requisition_id is not null)  and (
186     nvl(per_req_shd.g_old_rec.attribute_category, hr_api.g_varchar2) <>
187     nvl(p_rec.attribute_category, hr_api.g_varchar2)  or
188     nvl(per_req_shd.g_old_rec.attribute1, hr_api.g_varchar2) <>
189     nvl(p_rec.attribute1, hr_api.g_varchar2)  or
190     nvl(per_req_shd.g_old_rec.attribute2, hr_api.g_varchar2) <>
191     nvl(p_rec.attribute2, hr_api.g_varchar2)  or
192     nvl(per_req_shd.g_old_rec.attribute3, hr_api.g_varchar2) <>
193     nvl(p_rec.attribute3, hr_api.g_varchar2)  or
194     nvl(per_req_shd.g_old_rec.attribute4, hr_api.g_varchar2) <>
195     nvl(p_rec.attribute4, hr_api.g_varchar2)  or
196     nvl(per_req_shd.g_old_rec.attribute5, hr_api.g_varchar2) <>
197     nvl(p_rec.attribute5, hr_api.g_varchar2)  or
198     nvl(per_req_shd.g_old_rec.attribute6, hr_api.g_varchar2) <>
199     nvl(p_rec.attribute6, hr_api.g_varchar2)  or
200     nvl(per_req_shd.g_old_rec.attribute7, hr_api.g_varchar2) <>
201     nvl(p_rec.attribute7, hr_api.g_varchar2)  or
202     nvl(per_req_shd.g_old_rec.attribute8, hr_api.g_varchar2) <>
203     nvl(p_rec.attribute8, hr_api.g_varchar2)  or
204     nvl(per_req_shd.g_old_rec.attribute9, hr_api.g_varchar2) <>
205     nvl(p_rec.attribute9, hr_api.g_varchar2)  or
206     nvl(per_req_shd.g_old_rec.attribute10, hr_api.g_varchar2) <>
207     nvl(p_rec.attribute10, hr_api.g_varchar2)  or
208     nvl(per_req_shd.g_old_rec.attribute11, hr_api.g_varchar2) <>
209     nvl(p_rec.attribute11, hr_api.g_varchar2)  or
210     nvl(per_req_shd.g_old_rec.attribute12, hr_api.g_varchar2) <>
211     nvl(p_rec.attribute12, hr_api.g_varchar2)  or
212     nvl(per_req_shd.g_old_rec.attribute13, hr_api.g_varchar2) <>
213     nvl(p_rec.attribute13, hr_api.g_varchar2)  or
214     nvl(per_req_shd.g_old_rec.attribute14, hr_api.g_varchar2) <>
215     nvl(p_rec.attribute14, hr_api.g_varchar2)  or
216     nvl(per_req_shd.g_old_rec.attribute15, hr_api.g_varchar2) <>
217     nvl(p_rec.attribute15, hr_api.g_varchar2)  or
218     nvl(per_req_shd.g_old_rec.attribute16, hr_api.g_varchar2) <>
219     nvl(p_rec.attribute16, hr_api.g_varchar2)  or
220     nvl(per_req_shd.g_old_rec.attribute17, hr_api.g_varchar2) <>
221     nvl(p_rec.attribute17, hr_api.g_varchar2)  or
222     nvl(per_req_shd.g_old_rec.attribute18, hr_api.g_varchar2) <>
223     nvl(p_rec.attribute18, hr_api.g_varchar2)  or
224     nvl(per_req_shd.g_old_rec.attribute19, hr_api.g_varchar2) <>
225     nvl(p_rec.attribute19, hr_api.g_varchar2)  or
226     nvl(per_req_shd.g_old_rec.attribute20, hr_api.g_varchar2) <>
227     nvl(p_rec.attribute20, hr_api.g_varchar2) ))
228     or (p_rec.requisition_id is null)  then
229     --
230     -- Only execute the validation if absolutely necessary:
231     -- a) During update, the structure column value or any
232     --    of the attribute values have actually changed.
233     -- b) During insert.
234     --
235     hr_dflex_utility.ins_or_upd_descflex_attribs
236       (p_appl_short_name                 => 'PER'
237       ,p_descflex_name                   => 'PER_REQUISITIONS'
238       ,p_attribute_category              => p_rec.attribute_category
239       ,p_attribute1_name                 => 'ATTRIBUTE1'
240       ,p_attribute1_value                => p_rec.attribute1
241       ,p_attribute2_name                 => 'ATTRIBUTE2'
242       ,p_attribute2_value                => p_rec.attribute2
243       ,p_attribute3_name                 => 'ATTRIBUTE3'
244       ,p_attribute3_value                => p_rec.attribute3
245       ,p_attribute4_name                 => 'ATTRIBUTE4'
246       ,p_attribute4_value                => p_rec.attribute4
247       ,p_attribute5_name                 => 'ATTRIBUTE5'
248       ,p_attribute5_value                => p_rec.attribute5
249       ,p_attribute6_name                 => 'ATTRIBUTE6'
250       ,p_attribute6_value                => p_rec.attribute6
251       ,p_attribute7_name                 => 'ATTRIBUTE7'
252       ,p_attribute7_value                => p_rec.attribute7
253       ,p_attribute8_name                 => 'ATTRIBUTE8'
254       ,p_attribute8_value                => p_rec.attribute8
255       ,p_attribute9_name                 => 'ATTRIBUTE9'
256       ,p_attribute9_value                => p_rec.attribute9
257       ,p_attribute10_name                => 'ATTRIBUTE10'
258       ,p_attribute10_value               => p_rec.attribute10
259       ,p_attribute11_name                => 'ATTRIBUTE11'
260       ,p_attribute11_value               => p_rec.attribute11
261       ,p_attribute12_name                => 'ATTRIBUTE12'
262       ,p_attribute12_value               => p_rec.attribute12
263       ,p_attribute13_name                => 'ATTRIBUTE13'
264       ,p_attribute13_value               => p_rec.attribute13
265       ,p_attribute14_name                => 'ATTRIBUTE14'
266       ,p_attribute14_value               => p_rec.attribute14
267       ,p_attribute15_name                => 'ATTRIBUTE15'
268       ,p_attribute15_value               => p_rec.attribute15
269       ,p_attribute16_name                => 'ATTRIBUTE16'
270       ,p_attribute16_value               => p_rec.attribute16
271       ,p_attribute17_name                => 'ATTRIBUTE17'
272       ,p_attribute17_value               => p_rec.attribute17
273       ,p_attribute18_name                => 'ATTRIBUTE18'
274       ,p_attribute18_value               => p_rec.attribute18
275       ,p_attribute19_name                => 'ATTRIBUTE19'
276       ,p_attribute19_value               => p_rec.attribute19
277       ,p_attribute20_name                => 'ATTRIBUTE20'
278       ,p_attribute20_value               => p_rec.attribute20
279       );
280   end if;
281   --
282   hr_utility.set_location(' Leaving:'||l_proc,20);
283 end chk_df;
284 --
285 -- ----------------------------------------------------------------------------
286 -- |-----------------------< chk_non_updateable_args >------------------------|
287 -- ----------------------------------------------------------------------------
288 -- {Start Of Comments}
289 --
290 -- Description:
291 --   This procedure is used to ensure that non updateable attributes have
292 --   not been updated. If an attribute has been updated an error is generated.
293 --
294 -- Pre Conditions:
295 --   g_old_rec has been populated with details of the values currently in
296 --   the database.
297 --
298 -- In Arguments:
299 --   p_rec has been populated with the updated values the user would like the
300 --   record set to.
301 --
302 -- Post Success:
303 --   Processing continues if all the non updateable attributes have not
304 --   changed.
305 --
306 -- Post Failure:
307 --   An application error is raised if any of the non updatable attributes
308 --   have been altered.
309 --
310 -- {End Of Comments}
311 -- ----------------------------------------------------------------------------
312 Procedure chk_non_updateable_args
313   (p_rec in per_req_shd.g_rec_type
314   ) IS
315 --
316   l_proc     varchar2(72) := g_package || 'chk_non_updateable_args';
317   l_error    EXCEPTION;
318   l_argument varchar2(30);
319 --
320 Begin
321   hr_utility.set_location('Entering:'||l_proc,10);
322   --
323   -- Only proceed with the validation if a row exists for the current
324   -- record in the HR Schema.
325   --
326   IF NOT per_req_shd.api_updating
327     (p_requisition_id                       => p_rec.requisition_id
328     ,p_object_version_number                => p_rec.object_version_number
329     )THEN
330      fnd_message.set_name('PER', 'HR_6153_ALL_PROCEDURE_FAIL');
331      fnd_message.set_name('PROCEDURE ', l_proc);
332      fnd_message.set_name('STEP ', '5');
333      fnd_message.raise_error;
334   END IF;
335   --
336   -- EDIT_HERE: Add checks to ensure non-updateable args have
337   --            not been updated.
338   --
339   if p_rec.business_group_id <> per_req_shd.g_old_rec.business_group_id
340     then l_argument := 'business_group_id';
341     raise l_error;
342   end if;
343   --
344   if p_rec.requisition_id <> per_req_shd.g_old_rec.requisition_id
345     then l_argument := 'requisition_id';
346     raise l_error;
347   end if;
348 
349   EXCEPTION
350     WHEN l_error THEN
351       hr_api.argument_changed_error
352         (p_api_name => l_proc
353         ,p_argument => l_argument);
354     WHEN OTHERS THEN
355       RAISE;
356 
357    hr_utility.set_location(' Leaving:'||l_proc,20);
358 End chk_non_updateable_args;
359 --
360 -- ----------------------------------------------------------------------------
361 -- |-----------------------< chk_name >---------------------------------------|
362 -- ----------------------------------------------------------------------------
363 -- {Start Of Comments}
364 --
365 -- Description:
366 --   This procedure is used to ensure that mandatory parameters have been
367 --   set. If the requisition name is null or already exists then an error is
368 --   generated.
369 --
370 -- Pre Conditions:
371 --   g_old_rec has been populated with details of the values currently in
372 --   the database.
373 --
374 -- In Arguments:
375 --   p_name.
376 --
377 -- Post Success:
378 --   Processing continues if the requisition name is not null and valid.
379 --
380 -- Post Failure:
381 --   An application error is raised if the requisition name is null or is
382 --   already found
383 --   in the business group.
387 Procedure chk_name
384 --
385 -- {End Of Comments}
386 -- ----------------------------------------------------------------------------
388   (p_name in per_requisitions.name%type
389   ) IS
390 --
391   l_proc varchar2(72) := g_package || 'chk_name';
392   l_name varchar2(1);
393 --
394 --   Cursor to check that the requisition name does not exist previously
395 --
396 cursor csr_name is
397   select null
398     from per_requisitions
399   where name = p_name;
400 --
401 Begin
402   hr_utility.set_location('Entering:'||l_proc,10);
403   --
404   -- Check to ensure that the Requisition Name is not null.
405   --
406   hr_utility.set_location(l_proc, 20);
407   if p_name is null then
408     hr_api.mandatory_arg_error
409     (p_api_name           => l_proc
410     ,p_argument           => 'NAME'
411     ,p_argument_value     => p_name
412     );
413   end if;
414   --
415   -- Check that the requisition name does not exist already.
416   --
417   open csr_name;
418   fetch csr_name into l_name;
419   hr_utility.set_location(l_proc, 30);
420   if csr_name%found then
421     close csr_name;
422     fnd_message.set_name('PER','IRC_412115_DUPLICATE_VAC_NAME');
423     fnd_message.raise_error;
424   end if;
425   close csr_name;
426   hr_utility.set_location(' Leaving:'||l_proc,40);
427 exception
428   when app_exception.application_exception then
429     if hr_multi_message.exception_add
430          (p_associated_column1      => 'PER_REQUISITIONS.NAME'
431          ) then
432       hr_utility.set_location(' Leaving:'|| l_proc, 50);
433       raise;
434     end if;
435   --
436   hr_utility.set_location(' Leaving:'||l_proc,60);
437 end chk_name;
438 --
439 -- ----------------------------------------------------------------------------
440 -- |-----------------------< chk_requisition_dates >--------------------------|
441 -- ----------------------------------------------------------------------------
442 -- {Start Of Comments}
443 --
444 -- Description:
445 --   This procedure is used to ensure that the start date has been entered
446 --   and it is valid.
447 --
448 -- Pre Conditions:
449 --   g_old_rec has been populated with details of the values currently in
450 --   the database.
451 --
452 -- In Arguments:
453 --   p_date_from
454 --   p_date_to
455 --
456 -- Post Success:
457 --   Processing continues if the start date is not null and valid.
458 --
459 -- Post Failure:
460 --   An application error is raised if the start date is null or is not before
461 --   the end date.
462 --
463 -- {End Of Comments}
464 -- ----------------------------------------------------------------------------
465 Procedure chk_requisition_dates
466   (p_date_from  in per_requisitions.date_from%type
467   ,p_date_to    in per_requisitions.date_to%type
468   ,p_requisition_id in per_requisitions.requisition_id%type
469   ,p_object_version_number in per_requisitions.object_version_number%type
470   ) IS
471 --
472   l_proc     varchar2(72) := g_package || 'chk_requisition_dates';
473   l_api_updating boolean;
474 --
475 Begin
476   hr_utility.set_location('Entering:'||l_proc,10);
477   --
478   l_api_updating := per_req_shd.api_updating(p_requisition_id,p_object_version_number);
479   --
480   --  Check to see if date_from or date_to values have changed.
481   --
482   hr_utility.set_location(l_proc, 20);
483   if ((l_api_updating
484     and ((nvl(per_req_shd.g_old_rec.date_from,hr_api.g_date) <> p_date_from)
485     or (nvl(per_req_shd.g_old_rec.date_to,hr_api.g_date) <> p_date_to)))
486     or (NOT l_api_updating)) then
487     --
488     -- Check that the start date has been entered.
489     --
490     hr_utility.set_location(l_proc, 30);
491     if(p_date_from is NULL) then
492       fnd_message.set_name('PER','PER_289466_REQ_DATE_FROM_MAND');
493       hr_multi_message.add
494          (p_associated_column1      => 'PER_REQUISITIONS.DATE_FROM'
495          );
496 
497    end if;
498     --
499     -- Check that the start date is before the end date.
500     --
501     hr_utility.set_location(l_proc, 40);
502     if(p_date_from > nvl(p_date_to,hr_api.g_eot)) then
503       fnd_message.set_name('PER','IRC_ALL_DATE_START_END');
504       hr_multi_message.add
505          (p_associated_column1      => 'PER_REQUISITIONS.DATE_FROM'
506          ,p_associated_column2      => 'PER_REQUISITIONS.DATE_TO'
507          );
508     end if;
509   end if;
510   --
511   hr_utility.set_location(' Leaving:'||l_proc,20);
512 --
513 end chk_requisition_dates;
514 --
515 -- ----------------------------------------------------------------------------
516 -- |-----------------------< chk_person_id >----------------------------------|
517 -- ----------------------------------------------------------------------------
518 -- {Start Of Comments}
519 --
520 -- Description:
521 --   This procedure is used to ensure that mandatory parameters have been
522 --   set.
523 --
524 -- Pre Conditions:
525 --   g_old_rec has been populated with details of the values currently in
526 --   the database.
527 --
528 -- In Arguments:
529 --   p_person_id
530 --   p_date_from
531 --   p_date_to.
532 --
533 -- Post Success:
537 -- Post Failure:
534 --   Processing continues if a valid record for person_id exists in
535 --   PER_ALL_PEOPLE_F and if the effective date is valid.
536 --
538 --   An application error is raised if the person_id does not exist or is not
539 --   valid at that effective date.
540 --
541 -- {End Of Comments}
542 -- ----------------------------------------------------------------------------
543 Procedure chk_person_id
544   (p_person_id in per_requisitions.person_id%type
545   ,p_requisition_id in per_requisitions.requisition_id%type
546   ,p_object_version_number in per_requisitions.object_version_number%type
547   ,p_date_from in per_requisitions.date_from%type
548   ,p_date_to  in per_requisitions.date_to%type
549   ) IS
550 --
551   l_proc     varchar2(72) := g_package || 'chk_person_id';
552   l_person_id per_requisitions.person_id%type;
553   l_api_updating boolean;
554 --
555 --   Cursor to check that the person_id exists in PER_ALL_PEOPLE_F
556 --
557 cursor csr_person_id is
558   select person_id
559     from per_all_people_f
560   where person_id = p_person_id
561   and p_date_from between effective_start_date and effective_end_date;
562 --
563 Begin
564   hr_utility.set_location('Entering:'||l_proc,10);
565   --
566   l_api_updating := per_req_shd.api_updating(p_requisition_id
567     ,p_object_version_number);
568   --
569   --  Check to see if person_id value has changed.
570   --
571   hr_utility.set_location(l_proc, 20);
572   if ((l_api_updating
573     and (nvl(per_req_shd.g_old_rec.person_id,hr_api.g_number) <> p_person_id))
574     or (NOT l_api_updating)) then
575   --
576     if p_person_id is not NULL then
577     --
578     -- Check if the person_id exists in PER_ALL_PEOPLE_F
579     -- and if the person is valid at this effective date
580     --
581       open csr_person_id;
582       fetch csr_person_id into l_person_id;
583       hr_utility.set_location(l_proc, 30);
584       if csr_person_id%notfound then
585         close csr_person_id;
586         fnd_message.set_name('PER','PER_289467_REQ_INV_PERSON_ID');
587         fnd_message.raise_error;
588       end if;
589       close csr_person_id;
590     end if;
591    end if;
592    hr_utility.set_location(' Leaving:'||l_proc,40);
593 exception
594   when app_exception.application_exception then
595     if hr_multi_message.exception_add
596          (p_associated_column1      => 'PER_REQUISITIONS.PERSON_ID'
597          ) then
598       hr_utility.set_location(' Leaving:'|| l_proc, 60);
599       raise;
600     end if;
601     hr_utility.set_location(' Leaving:'|| l_proc, 70);
602 --
603 end chk_person_id;
604 --
605 -- ----------------------------------------------------------------------------
606 -- |---------------------------< insert_validate >----------------------------|
607 -- ----------------------------------------------------------------------------
608 Procedure insert_validate
609   (p_rec                          in per_req_shd.g_rec_type
610   ) is
611 --
612   l_proc  varchar2(72) := g_package||'insert_validate';
613 --
614 Begin
615   hr_utility.set_location('Entering:'||l_proc,10);
616   --
617   -- Call all supporting business operations
618   --
619   hr_api.validate_bus_grp_id(p_rec.business_group_id); -- Validate Bus Grp
620   hr_utility.set_location(l_proc, 20);
621   --
622   per_req_bus.chk_name
623   (p_name => p_rec.name
624   );
625   hr_utility.set_location(l_proc, 30);
626   --
627   per_req_bus.chk_requisition_dates
628   (p_date_from => p_rec.date_from
629   ,p_date_to => p_rec.date_to
630   ,p_requisition_id => p_rec.requisition_id
631   ,p_object_version_number => p_rec.object_version_number
632   );
633   hr_utility.set_location(l_proc, 40);
634   --
635   per_req_bus.chk_person_id
636   (p_person_id => p_rec.person_id
637   ,p_requisition_id => p_rec.requisition_id
638   ,p_object_version_number => p_rec.object_version_number
639   ,p_date_from => p_rec.date_from
640   ,p_date_to => p_rec.date_to
641   );
642   hr_utility.set_location(l_proc, 50);
643   --
644   per_req_bus.chk_df
645   (p_rec => p_rec
646   );
647   hr_multi_message.end_validation_set();
648   --
649   hr_utility.set_location(' Leaving:'||l_proc, 60);
650 End insert_validate;
651 --
652 -- ----------------------------------------------------------------------------
653 -- |---------------------------< update_validate >----------------------------|
654 -- ----------------------------------------------------------------------------
655 Procedure update_validate
656   (p_rec                          in per_req_shd.g_rec_type
657   ) is
658 --
659   l_proc  varchar2(72) := g_package||'update_validate';
660 --
661 Begin
662   hr_utility.set_location('Entering:'||l_proc, 10);
663   --
664   -- Call all supporting business operations
665   --
666   hr_utility.set_location(l_proc, 20);
667   --
668   chk_non_updateable_args
669     (p_rec              => p_rec
670     );
671   hr_api.validate_bus_grp_id(p_rec.business_group_id);  -- Validate Bus Grp
672   hr_utility.set_location(l_proc, 30);
673   --
674   per_req_bus.chk_requisition_dates
675   (p_date_from => p_rec.date_from
676   ,p_date_to => p_rec.date_to
677   ,p_requisition_id => p_rec.requisition_id
678   ,p_object_version_number =>  p_rec.object_version_number
679   );
680   hr_utility.set_location(l_proc, 40);
681   --
682   per_req_bus.chk_person_id
683   (p_person_id => p_rec.person_id
684   ,p_requisition_id => p_rec.requisition_id
685   ,p_object_version_number => p_rec.object_version_number
686   ,p_date_from => p_rec.date_from
687   ,p_date_to => p_rec.date_to
688   );
689   hr_utility.set_location(l_proc, 50);
690   --
691   per_req_bus.chk_df
692   (p_rec => p_rec
693   );
694   hr_multi_message.end_validation_set();
695   --
696   hr_utility.set_location(' Leaving:'||l_proc, 60);
697 End update_validate;
698 --
699 -- ----------------------------------------------------------------------------
700 -- |---------------------------< delete_validate >----------------------------|
701 -- ----------------------------------------------------------------------------
702 Procedure delete_validate
703   (p_rec                          in per_req_shd.g_rec_type
704   ) is
705 --
706   l_proc  varchar2(72) := g_package||'delete_validate';
707 --
708 Begin
709   hr_utility.set_location('Entering:'||l_proc, 5);
710   --
711   -- Call all supporting business operations
712   --
713   hr_utility.set_location(' Leaving:'||l_proc, 10);
714 End delete_validate;
715 --
716 end per_req_bus;