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