[Home] [Help]
PACKAGE BODY: APPS.BEN_PDT_BUS
Source
1 Package Body ben_pdt_bus as
2 /* $Header: bepdtrhi.pkb 115.0 2003/10/30 09:33 rpillay noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' ben_pdt_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_pymt_check_det_id number default null;
15 --
16 -- ---------------------------------------------------------------------------
17 -- |----------------------< set_security_group_id >--------------------------|
18 -- ---------------------------------------------------------------------------
19 --
20 Procedure set_security_group_id
21 (p_pymt_check_det_id in number
22 ,p_associated_column1 in varchar2 default null
23 ) is
24 --
25 -- Declare cursor
26 --
27 cursor csr_sec_grp is
28 select pbg.security_group_id,
29 pbg.legislation_code
30 from per_business_groups_perf pbg
31 , ben_pymt_check_det pdt
32 where pdt.pymt_check_det_id = p_pymt_check_det_id
33 and pbg.business_group_id = pdt.business_group_id;
34 --
35 -- Declare local variables
36 --
37 l_security_group_id number;
38 l_proc varchar2(72) := g_package||'set_security_group_id';
39 l_legislation_code varchar2(150);
40 --
41 begin
42 --
43 hr_utility.set_location('Entering:'|| l_proc, 10);
44 --
45 -- Ensure that all the mandatory parameter are not null
46 --
47 hr_api.mandatory_arg_error
48 (p_api_name => l_proc
49 ,p_argument => 'pymt_check_det_id'
50 ,p_argument_value => p_pymt_check_det_id
51 );
52 --
53 open csr_sec_grp;
54 fetch csr_sec_grp into l_security_group_id
55 , l_legislation_code;
56 --
57 if csr_sec_grp%notfound then
58 --
59 close csr_sec_grp;
60 --
61 -- The primary key is invalid therefore we must error
62 --
63 fnd_message.set_name('PAY','HR_7220_INVALID_PRIMARY_KEY');
64 hr_multi_message.add
65 (p_associated_column1
66 => nvl(p_associated_column1,'PYMT_CHECK_DET_ID')
67 );
68 --
69 else
70 close csr_sec_grp;
71 --
72 -- Set the security_group_id in CLIENT_INFO
73 --
74 hr_api.set_security_group_id
75 (p_security_group_id => l_security_group_id
76 );
77 --
78 -- Set the sessions legislation context in HR_SESSION_DATA
79 --
80 hr_api.set_legislation_context(l_legislation_code);
81 end if;
82 --
83 hr_utility.set_location(' Leaving:'|| l_proc, 20);
84 --
85 end set_security_group_id;
86 --
87 -- ---------------------------------------------------------------------------
88 -- |---------------------< return_legislation_code >-------------------------|
89 -- ---------------------------------------------------------------------------
90 --
91 Function return_legislation_code
92 (p_pymt_check_det_id in number
93 )
94 Return Varchar2 Is
95 --
96 -- Declare cursor
97 --
98 cursor csr_leg_code is
99 select pbg.legislation_code
100 from per_business_groups_perf pbg
101 , ben_pymt_check_det pdt
102 where pdt.pymt_check_det_id = p_pymt_check_det_id
103 and pbg.business_group_id = pdt.business_group_id;
104 --
105 -- Declare local variables
106 --
107 l_legislation_code varchar2(150);
108 l_proc varchar2(72) := g_package||'return_legislation_code';
109 --
110 Begin
111 --
112 hr_utility.set_location('Entering:'|| l_proc, 10);
113 --
114 -- Ensure that all the mandatory parameter are not null
115 --
116 hr_api.mandatory_arg_error
117 (p_api_name => l_proc
118 ,p_argument => 'pymt_check_det_id'
119 ,p_argument_value => p_pymt_check_det_id
120 );
121 --
122 if ( nvl(ben_pdt_bus.g_pymt_check_det_id, hr_api.g_number)
123 = p_pymt_check_det_id) then
124 --
125 -- The legislation code has already been found with a previous
126 -- call to this function. Just return the value in the global
130 hr_utility.set_location(l_proc, 20);
127 -- variable.
128 --
129 l_legislation_code := ben_pdt_bus.g_legislation_code;
131 else
132 --
133 -- The ID is different to the last call to this function
134 -- or this is the first call to this function.
135 --
136 open csr_leg_code;
137 fetch csr_leg_code into l_legislation_code;
138 --
139 if csr_leg_code%notfound then
140 --
141 -- The primary key is invalid therefore we must error
142 --
143 close csr_leg_code;
144 fnd_message.set_name('PAY','HR_7220_INVALID_PRIMARY_KEY');
145 fnd_message.raise_error;
146 end if;
147 hr_utility.set_location(l_proc,30);
148 --
149 -- Set the global variables so the values are
150 -- available for the next call to this function.
151 --
152 close csr_leg_code;
153 ben_pdt_bus.g_pymt_check_det_id := p_pymt_check_det_id;
154 ben_pdt_bus.g_legislation_code := l_legislation_code;
155 end if;
156 hr_utility.set_location(' Leaving:'|| l_proc, 40);
157 return l_legislation_code;
158 end return_legislation_code;
159 --
160 -- ----------------------------------------------------------------------------
161 -- |------------------------------< chk_df >----------------------------------|
162 -- ----------------------------------------------------------------------------
163 --
164 -- Description:
165 -- Validates all the Descriptive Flexfield values.
166 --
167 -- Prerequisites:
168 -- All other columns have been validated. Must be called as the
169 -- last step from insert_validate and update_validate.
170 --
171 -- In Arguments:
172 -- p_rec
173 --
174 -- Post Success:
175 -- If the Descriptive Flexfield structure column and data values are
176 -- all valid this procedure will end normally and processing will
177 -- continue.
178 --
179 -- Post Failure:
180 -- If the Descriptive Flexfield structure column value or any of
181 -- the data values are invalid then an application error is raised as
182 -- a PL/SQL exception.
183 --
184 -- Access Status:
185 -- Internal Row Handler Use Only.
186 --
187 -- ----------------------------------------------------------------------------
188 procedure chk_df
189 (p_rec in ben_pdt_shd.g_rec_type
190 ) is
191 --
192 l_proc varchar2(72) := g_package || 'chk_df';
193 --
194 begin
195 hr_utility.set_location('Entering:'||l_proc,10);
196 --
197 if ((p_rec.pymt_check_det_id is not null) and (
198 nvl(ben_pdt_shd.g_old_rec.pdt_attribute_category, hr_api.g_varchar2) <>
199 nvl(p_rec.pdt_attribute_category, hr_api.g_varchar2) or
200 nvl(ben_pdt_shd.g_old_rec.pdt_attribute1, hr_api.g_varchar2) <>
201 nvl(p_rec.pdt_attribute1, hr_api.g_varchar2) or
202 nvl(ben_pdt_shd.g_old_rec.pdt_attribute2, hr_api.g_varchar2) <>
203 nvl(p_rec.pdt_attribute2, hr_api.g_varchar2) or
204 nvl(ben_pdt_shd.g_old_rec.pdt_attribute3, hr_api.g_varchar2) <>
205 nvl(p_rec.pdt_attribute3, hr_api.g_varchar2) or
206 nvl(ben_pdt_shd.g_old_rec.pdt_attribute4, hr_api.g_varchar2) <>
207 nvl(p_rec.pdt_attribute4, hr_api.g_varchar2) or
208 nvl(ben_pdt_shd.g_old_rec.pdt_attribute5, hr_api.g_varchar2) <>
209 nvl(p_rec.pdt_attribute5, hr_api.g_varchar2) or
210 nvl(ben_pdt_shd.g_old_rec.pdt_attribute6, hr_api.g_varchar2) <>
211 nvl(p_rec.pdt_attribute6, hr_api.g_varchar2) or
212 nvl(ben_pdt_shd.g_old_rec.pdt_attribute7, hr_api.g_varchar2) <>
213 nvl(p_rec.pdt_attribute7, hr_api.g_varchar2) or
214 nvl(ben_pdt_shd.g_old_rec.pdt_attribute8, hr_api.g_varchar2) <>
215 nvl(p_rec.pdt_attribute8, hr_api.g_varchar2) or
216 nvl(ben_pdt_shd.g_old_rec.pdt_attribute9, hr_api.g_varchar2) <>
217 nvl(p_rec.pdt_attribute9, hr_api.g_varchar2) or
218 nvl(ben_pdt_shd.g_old_rec.pdt_attribute10, hr_api.g_varchar2) <>
219 nvl(p_rec.pdt_attribute10, hr_api.g_varchar2) or
220 nvl(ben_pdt_shd.g_old_rec.pdt_attribute11, hr_api.g_varchar2) <>
221 nvl(p_rec.pdt_attribute11, hr_api.g_varchar2) or
222 nvl(ben_pdt_shd.g_old_rec.pdt_attribute12, hr_api.g_varchar2) <>
223 nvl(p_rec.pdt_attribute12, hr_api.g_varchar2) or
224 nvl(ben_pdt_shd.g_old_rec.pdt_attribute13, hr_api.g_varchar2) <>
225 nvl(p_rec.pdt_attribute13, hr_api.g_varchar2) or
226 nvl(ben_pdt_shd.g_old_rec.pdt_attribute14, hr_api.g_varchar2) <>
227 nvl(p_rec.pdt_attribute14, hr_api.g_varchar2) or
228 nvl(ben_pdt_shd.g_old_rec.pdt_attribute15, hr_api.g_varchar2) <>
229 nvl(p_rec.pdt_attribute15, hr_api.g_varchar2) or
230 nvl(ben_pdt_shd.g_old_rec.pdt_attribute16, hr_api.g_varchar2) <>
231 nvl(p_rec.pdt_attribute16, hr_api.g_varchar2) or
232 nvl(ben_pdt_shd.g_old_rec.pdt_attribute17, hr_api.g_varchar2) <>
233 nvl(p_rec.pdt_attribute17, hr_api.g_varchar2) or
234 nvl(ben_pdt_shd.g_old_rec.pdt_attribute18, hr_api.g_varchar2) <>
235 nvl(p_rec.pdt_attribute18, hr_api.g_varchar2) or
236 nvl(ben_pdt_shd.g_old_rec.pdt_attribute19, hr_api.g_varchar2) <>
237 nvl(p_rec.pdt_attribute19, hr_api.g_varchar2) or
238 nvl(ben_pdt_shd.g_old_rec.pdt_attribute20, hr_api.g_varchar2) <>
239 nvl(p_rec.pdt_attribute20, hr_api.g_varchar2) or
240 nvl(ben_pdt_shd.g_old_rec.pdt_attribute21, hr_api.g_varchar2) <>
241 nvl(p_rec.pdt_attribute21, hr_api.g_varchar2) or
242 nvl(ben_pdt_shd.g_old_rec.pdt_attribute22, hr_api.g_varchar2) <>
243 nvl(p_rec.pdt_attribute22, hr_api.g_varchar2) or
244 nvl(ben_pdt_shd.g_old_rec.pdt_attribute23, hr_api.g_varchar2) <>
245 nvl(p_rec.pdt_attribute23, hr_api.g_varchar2) or
246 nvl(ben_pdt_shd.g_old_rec.pdt_attribute24, hr_api.g_varchar2) <>
247 nvl(p_rec.pdt_attribute24, hr_api.g_varchar2) or
248 nvl(ben_pdt_shd.g_old_rec.pdt_attribute25, hr_api.g_varchar2) <>
249 nvl(p_rec.pdt_attribute25, hr_api.g_varchar2) or
253 nvl(p_rec.pdt_attribute27, hr_api.g_varchar2) or
250 nvl(ben_pdt_shd.g_old_rec.pdt_attribute26, hr_api.g_varchar2) <>
251 nvl(p_rec.pdt_attribute26, hr_api.g_varchar2) or
252 nvl(ben_pdt_shd.g_old_rec.pdt_attribute27, hr_api.g_varchar2) <>
254 nvl(ben_pdt_shd.g_old_rec.pdt_attribute28, hr_api.g_varchar2) <>
255 nvl(p_rec.pdt_attribute28, hr_api.g_varchar2) or
256 nvl(ben_pdt_shd.g_old_rec.pdt_attribute29, hr_api.g_varchar2) <>
257 nvl(p_rec.pdt_attribute29, hr_api.g_varchar2) or
258 nvl(ben_pdt_shd.g_old_rec.pdt_attribute30, hr_api.g_varchar2) <>
259 nvl(p_rec.pdt_attribute30, hr_api.g_varchar2) ))
260 or (p_rec.pymt_check_det_id is null) then
261 --
262 -- Only execute the validation if absolutely necessary:
263 -- a) During update, the structure column value or any
264 -- of the attribute values have actually changed.
265 -- b) During insert.
266 --
267 hr_dflex_utility.ins_or_upd_descflex_attribs
268 (p_appl_short_name => 'BEN'
269 ,p_descflex_name => 'EDIT_HERE: Enter descflex name'
270 ,p_attribute_category => 'PDT_ATTRIBUTE_CATEGORY'
271 ,p_attribute1_name => 'PDT_ATTRIBUTE1'
272 ,p_attribute1_value => p_rec.pdt_attribute1
273 ,p_attribute2_name => 'PDT_ATTRIBUTE2'
274 ,p_attribute2_value => p_rec.pdt_attribute2
275 ,p_attribute3_name => 'PDT_ATTRIBUTE3'
276 ,p_attribute3_value => p_rec.pdt_attribute3
277 ,p_attribute4_name => 'PDT_ATTRIBUTE4'
278 ,p_attribute4_value => p_rec.pdt_attribute4
279 ,p_attribute5_name => 'PDT_ATTRIBUTE5'
280 ,p_attribute5_value => p_rec.pdt_attribute5
281 ,p_attribute6_name => 'PDT_ATTRIBUTE6'
282 ,p_attribute6_value => p_rec.pdt_attribute6
283 ,p_attribute7_name => 'PDT_ATTRIBUTE7'
284 ,p_attribute7_value => p_rec.pdt_attribute7
285 ,p_attribute8_name => 'PDT_ATTRIBUTE8'
286 ,p_attribute8_value => p_rec.pdt_attribute8
287 ,p_attribute9_name => 'PDT_ATTRIBUTE9'
288 ,p_attribute9_value => p_rec.pdt_attribute9
289 ,p_attribute10_name => 'PDT_ATTRIBUTE10'
290 ,p_attribute10_value => p_rec.pdt_attribute10
291 ,p_attribute11_name => 'PDT_ATTRIBUTE11'
292 ,p_attribute11_value => p_rec.pdt_attribute11
293 ,p_attribute12_name => 'PDT_ATTRIBUTE12'
294 ,p_attribute12_value => p_rec.pdt_attribute12
295 ,p_attribute13_name => 'PDT_ATTRIBUTE13'
296 ,p_attribute13_value => p_rec.pdt_attribute13
297 ,p_attribute14_name => 'PDT_ATTRIBUTE14'
298 ,p_attribute14_value => p_rec.pdt_attribute14
299 ,p_attribute15_name => 'PDT_ATTRIBUTE15'
300 ,p_attribute15_value => p_rec.pdt_attribute15
301 ,p_attribute16_name => 'PDT_ATTRIBUTE16'
302 ,p_attribute16_value => p_rec.pdt_attribute16
303 ,p_attribute17_name => 'PDT_ATTRIBUTE17'
304 ,p_attribute17_value => p_rec.pdt_attribute17
305 ,p_attribute18_name => 'PDT_ATTRIBUTE18'
306 ,p_attribute18_value => p_rec.pdt_attribute18
307 ,p_attribute19_name => 'PDT_ATTRIBUTE19'
308 ,p_attribute19_value => p_rec.pdt_attribute19
309 ,p_attribute20_name => 'PDT_ATTRIBUTE20'
310 ,p_attribute20_value => p_rec.pdt_attribute20
311 ,p_attribute21_name => 'PDT_ATTRIBUTE21'
312 ,p_attribute21_value => p_rec.pdt_attribute21
313 ,p_attribute22_name => 'PDT_ATTRIBUTE22'
314 ,p_attribute22_value => p_rec.pdt_attribute22
315 ,p_attribute23_name => 'PDT_ATTRIBUTE23'
316 ,p_attribute23_value => p_rec.pdt_attribute23
317 ,p_attribute24_name => 'PDT_ATTRIBUTE24'
318 ,p_attribute24_value => p_rec.pdt_attribute24
319 ,p_attribute25_name => 'PDT_ATTRIBUTE25'
320 ,p_attribute25_value => p_rec.pdt_attribute25
321 ,p_attribute26_name => 'PDT_ATTRIBUTE26'
322 ,p_attribute26_value => p_rec.pdt_attribute26
323 ,p_attribute27_name => 'PDT_ATTRIBUTE27'
324 ,p_attribute27_value => p_rec.pdt_attribute27
325 ,p_attribute28_name => 'PDT_ATTRIBUTE28'
326 ,p_attribute28_value => p_rec.pdt_attribute28
327 ,p_attribute29_name => 'PDT_ATTRIBUTE29'
328 ,p_attribute29_value => p_rec.pdt_attribute29
329 ,p_attribute30_name => 'PDT_ATTRIBUTE30'
330 ,p_attribute30_value => p_rec.pdt_attribute30
331 );
332 end if;
333 --
334 hr_utility.set_location(' Leaving:'||l_proc,20);
335 end chk_df;
336 --
337 -- ----------------------------------------------------------------------------
338 -- |-----------------------< chk_non_updateable_args >------------------------|
339 -- ----------------------------------------------------------------------------
340 -- {Start Of Comments}
341 --
342 -- Description:
343 -- This procedure is used to ensure that non updateable attributes have
344 -- not been updated. If an attribute has been updated an error is generated.
345 --
346 -- Pre Conditions:
347 -- g_old_rec has been populated with details of the values currently in
348 -- the database.
349 --
350 -- In Arguments:
351 -- p_rec has been populated with the updated values the user would like the
352 -- record set to.
353 --
357 --
354 -- Post Success:
355 -- Processing continues if all the non updateable attributes have not
356 -- changed.
358 -- Post Failure:
359 -- An application error is raised if any of the non updatable attributes
360 -- have been altered.
361 --
362 -- {End Of Comments}
363 -- ----------------------------------------------------------------------------
364 Procedure chk_non_updateable_args
365 (p_effective_date in date
366 ,p_rec in ben_pdt_shd.g_rec_type
367 ) IS
368 --
369 l_proc varchar2(72) := g_package || 'chk_non_updateable_args';
370 --
371 Begin
372 --
373 -- Only proceed with the validation if a row exists for the current
374 -- record in the HR Schema.
375 --
376 IF NOT ben_pdt_shd.api_updating
377 (p_pymt_check_det_id => p_rec.pymt_check_det_id
378 ,p_object_version_number => p_rec.object_version_number
379 ) THEN
380 fnd_message.set_name('PER', 'HR_6153_ALL_PROCEDURE_FAIL');
381 fnd_message.set_token('PROCEDURE ', l_proc);
382 fnd_message.set_token('STEP ', '5');
383 fnd_message.raise_error;
384 END IF;
385
386 IF nvl(p_rec.business_group_id,hr_api.g_number) <>
387 nvl(ben_pdt_shd.g_old_rec.business_group_id,hr_api.g_number) then
388
389 hr_api.argument_changed_error
390 (p_api_name => l_proc,
391 p_argument => 'BUSINESS_GROUP_ID',
392 p_base_table => ben_pdt_shd.g_tab_nam);
393 END IF;
394 --
395 IF nvl(p_rec.person_id,hr_api.g_number) <>
396 nvl(ben_pdt_shd.g_old_rec.person_id,hr_api.g_number) then
397
398 hr_api.argument_changed_error
399 (p_api_name => l_proc,
400 p_argument => 'PERSON_ID',
401 p_base_table => ben_pdt_shd.g_tab_nam);
402 END IF;
403
404 End chk_non_updateable_args;
405 --
406 --
407 -- ----------------------------------------------------------------------------
408 -- |------< chk_pymt_check_det_id >------|
409 -- ----------------------------------------------------------------------------
410 --
411 -- Description
412 -- This procedure is used to check that the primary key for the table
413 -- is created properly. It should be null on insert and
414 -- should not be able to be updated.
415 --
416 -- Pre Conditions
417 -- None.
418 --
419 -- In Parameters
420 -- pymt_check_det_id PK of record being inserted or updated.
421 -- object_version_number Object version number of record being
422 -- inserted or updated.
423 --
424 -- Post Success
425 -- Processing continues
426 --
427 -- Post Failure
428 -- Errors handled by the procedure
429 --
430 -- Access Status
431 -- Internal table handler use only.
432 --
433 Procedure chk_pymt_check_det_id(p_pymt_check_det_id in number,
434 p_object_version_number in number) is
435 --
436 l_proc varchar2(72) := g_package||'chk_pymt_check_det_id';
437 l_api_updating boolean;
438 --
439 Begin
440 --
441 hr_utility.set_location('Entering:'||l_proc, 5);
442 --
443 l_api_updating := ben_pdt_shd.api_updating
444 (p_pymt_check_det_id => p_pymt_check_det_id,
445 p_object_version_number => p_object_version_number);
446 --
447 if (l_api_updating
448 and nvl(p_pymt_check_det_id,hr_api.g_number)
449 <> ben_pdt_shd.g_old_rec.pymt_check_det_id) then
450 --
451 -- raise error as PK has changed
452 --
453 ben_pty_shd.constraint_error('BEN_PYMT_CHECK_DET_PK');
454 --
455 elsif not l_api_updating then
456 --
457 -- check if PK is null
458 --
459 if p_pymt_check_det_id is not null then
460 --
461 -- raise error as PK is not null
462 --
463 ben_pty_shd.constraint_error('BEN_PYMT_CHECK_DET_PK');
464 --
465 end if;
466 --
467 end if;
468 --
469 hr_utility.set_location('Leaving:'||l_proc, 10);
470 --
471 End chk_pymt_check_det_id;
472 --
473 -- ----------------------------------------------------------------------------
474 -- |------< chk_person_id >------|
475 -- ----------------------------------------------------------------------------
476 --
477 -- Description
478 -- This procedure checks that a referenced foreign key actually exists
479 -- in the referenced table.
480 --
481 -- Pre-Conditions
482 -- None.
483 --
484 -- In Parameters
485 -- p_pymt_check_det_id PK
486 -- p_person_ID of FK column
487 -- p_object_version_number object version number
488 --
489 -- Post Success
490 -- Processing continues
491 --
492 -- Post Failure
493 -- Error raised.
494 --
495 -- Access Status
496 -- Internal table handler use only.
497 --
498 Procedure chk_person_id (p_pymt_check_det_id in number,
499 p_person_id in number,
500 p_object_version_number in number) is
501 --
502 l_proc varchar2(72) := g_package||'chk_person_id';
503 l_api_updating boolean;
504 l_dummy varchar2(1);
505 --
506 cursor c1 is
507 select null
508 from per_all_people_f a
509 where a.person_id = p_person_id;
510 --
511 Begin
512 --
513 hr_utility.set_location('Entering:'||l_proc,5);
514 --
515 l_api_updating := ben_pdt_shd.api_updating
516 (p_pymt_check_det_id => p_pymt_check_det_id,
517 p_object_version_number => p_object_version_number);
518 --
519 if (l_api_updating
520 and nvl(p_person_id,hr_api.g_number)
521 <> nvl(ben_pdt_shd.g_old_rec.person_id,hr_api.g_number)
522 or not l_api_updating) then
523 --
524 -- check if person_id value exists in per_all_people_f table
525 --
526 open c1;
527 --
528 fetch c1 into l_dummy;
529 if c1%notfound then
530 --
531 close c1;
532 --
533 -- raise error as FK does not relate to PK in per_all_people_f
534 -- table.
535 --
536 ben_pdt_shd.constraint_error('BEN_PYMT_CHECK_DET_FK2');
537 --
538 end if;
539 --
540 close c1;
541 --
542 end if;
543 --
544 hr_utility.set_location('Leaving:'||l_proc,10);
545 --
546 End chk_person_id;
547 --
548 -- ----------------------------------------------------------------------------
549 -- |---------------------------< insert_validate >----------------------------|
550 -- ----------------------------------------------------------------------------
551 Procedure insert_validate
552 (p_effective_date in date
553 ,p_rec in ben_pdt_shd.g_rec_type
554 ) is
555 --
556 l_proc varchar2(72) := g_package||'insert_validate';
557 --
558 Begin
559 hr_utility.set_location('Entering:'||l_proc, 5);
560 --
561 -- Call all supporting business operations
562 --
563 hr_api.validate_bus_grp_id
564 (p_business_group_id => p_rec.business_group_id
565 ,p_associated_column1 => ben_pdt_shd.g_tab_nam
566 || '.BUSINESS_GROUP_ID');
567 --
568 -- After validating the set of important attributes,
569 -- if Multiple Message detection is enabled and at least
570 -- one error has been found then abort further validation.
571 --
572 hr_multi_message.end_validation_set;
573 --
574 -- Validate Dependent Attributes
575 --
576 --
577 chk_pymt_check_det_id(p_pymt_check_det_id => p_rec.pymt_check_det_id
578 ,p_object_version_number => p_rec.object_version_number);
579
580 chk_person_id(p_pymt_check_det_id => p_rec.pymt_check_det_id
581 ,p_person_id => p_rec.person_id
582 ,p_object_version_number => p_rec.object_version_number);
583 --
584 hr_utility.set_location(' Leaving:'||l_proc, 10);
585 End insert_validate;
586 --
587 -- ----------------------------------------------------------------------------
588 -- |---------------------------< update_validate >----------------------------|
589 -- ----------------------------------------------------------------------------
590 Procedure update_validate
591 (p_effective_date in date
592 ,p_rec in ben_pdt_shd.g_rec_type
593 ) is
594 --
595 l_proc varchar2(72) := g_package||'update_validate';
596 --
597 Begin
598 hr_utility.set_location('Entering:'||l_proc, 5);
599 --
600 -- Call all supporting business operations
601 --
602 hr_api.validate_bus_grp_id
603 (p_business_group_id => p_rec.business_group_id
604 ,p_associated_column1 => ben_pdt_shd.g_tab_nam
605 || '.BUSINESS_GROUP_ID');
606 --
607 -- After validating the set of important attributes,
608 -- if Multiple Message detection is enabled and at least
609 -- one error has been found then abort further validation.
610 --
611 hr_multi_message.end_validation_set;
612 --
613 -- Validate Dependent Attributes
614 --
615 chk_non_updateable_args
616 (p_effective_date => p_effective_date
617 ,p_rec => p_rec
618 );
619 --
620 chk_pymt_check_det_id(p_pymt_check_det_id => p_rec.pymt_check_det_id
621 ,p_object_version_number => p_rec.object_version_number);
622
623 chk_person_id(p_pymt_check_det_id => p_rec.pymt_check_det_id
624 ,p_person_id => p_rec.person_id
625 ,p_object_version_number => p_rec.object_version_number);
626
627
628 hr_utility.set_location(' Leaving:'||l_proc, 10);
629 End update_validate;
630 --
631 -- ----------------------------------------------------------------------------
632 -- |---------------------------< delete_validate >----------------------------|
633 -- ----------------------------------------------------------------------------
634 Procedure delete_validate
635 (p_rec in ben_pdt_shd.g_rec_type
636 ) is
637 --
638 l_proc varchar2(72) := g_package||'delete_validate';
639 --
640 Begin
641 hr_utility.set_location('Entering:'||l_proc, 5);
642 --
643 -- Call all supporting business operations
644 --
645 hr_utility.set_location(' Leaving:'||l_proc, 10);
646 End delete_validate;
647 --
648 end ben_pdt_bus;