[Home] [Help]
PACKAGE BODY: APPS.PQH_RLM_BUS
Source
1 Package Body pqh_rlm_bus as
2 /* $Header: pqrlmrhi.pkb 115.13 2003/08/19 15:07:31 hsajja noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' pqh_rlm_bus.'; -- Global package name
9 --
10 -- ----------------------------------------------------------------------------
11 -- |------< chk_routing_list_member_id >------|
12 -- ----------------------------------------------------------------------------
13 --
14 -- Description
15 -- This procedure is used to check that the primary key for the table
16 -- is created properly. It should be null on insert and
17 -- should not be able to be updated.
18 --
19 -- Pre Conditions
20 -- None.
21 --
22 -- In Parameters
23 -- routing_list_member_id PK of record being inserted or updated.
24 -- object_version_number Object version number of record being
25 -- inserted or updated.
26 --
27 -- Post Success
28 -- Processing continues
29 --
30 -- Post Failure
31 -- Errors handled by the procedure
32 --
33 -- Access Status
34 -- Internal table handler use only.
35 --
36 Procedure chk_routing_list_member_id(p_routing_list_member_id in number,
37 p_object_version_number in number) is
38 --
39 l_proc varchar2(72) := g_package||'chk_routing_list_member_id';
40 l_api_updating boolean;
41 --
42 Begin
43 --
44 hr_utility.set_location('Entering:'||l_proc, 5);
45 --
46 l_api_updating := pqh_rlm_shd.api_updating
47 (p_routing_list_member_id => p_routing_list_member_id,
48 p_object_version_number => p_object_version_number);
49 --
50 if (l_api_updating
51 and nvl(p_routing_list_member_id,hr_api.g_number)
52 <> pqh_rlm_shd.g_old_rec.routing_list_member_id) then
53 --
54 -- raise error as PK has changed
55 --
56 pqh_rlm_shd.constraint_error('PQH_ROUTING_LIST_MEMBERS_PK');
57 --
58 elsif not l_api_updating then
59 --
60 -- check if PK is null
61 --
62 if p_routing_list_member_id is not null then
63 --
64 -- raise error as PK is not null
65 --
66 pqh_rlm_shd.constraint_error('PQH_ROUTING_LIST_MEMBERS_PK');
67 --
68 end if;
69 --
70 end if;
71 --
72 hr_utility.set_location('Leaving:'||l_proc, 10);
73 --
74 End chk_routing_list_member_id;
75 --
76 -- ----------------------------------------------------------------------------
77 -- |------< chk_routing_list_id >------|
78 -- ----------------------------------------------------------------------------
79 --
80 -- Description
81 -- This procedure checks that a referenced foreign key actually exists
82 -- in the referenced table.
83 --
84 -- Pre-Conditions
85 -- None.
86 --
87 -- In Parameters
88 -- p_routing_list_member_id PK
89 -- p_routing_list_id ID of FK column
90 -- p_object_version_number object version number
91 --
92 -- Post Success
93 -- Processing continues
94 --
95 -- Post Failure
96 -- Error raised.
97 --
98 -- Access Status
99 -- Internal table handler use only.
100 --
101 Procedure chk_routing_list_id (p_routing_list_member_id in number,
102 p_routing_list_id in number,
103 p_object_version_number in number) is
104 --
105 l_proc varchar2(72) := g_package||'chk_routing_list_id';
106 l_api_updating boolean;
107 l_dummy varchar2(1);
108 --
109 cursor c1 is
110 select null
111 from pqh_routing_lists a
112 where a.routing_list_id = p_routing_list_id;
113 --
114 Begin
115 --
116 hr_utility.set_location('Entering:'||l_proc,5);
117 --
118 l_api_updating := pqh_rlm_shd.api_updating
119 (p_routing_list_member_id => p_routing_list_member_id,
120 p_object_version_number => p_object_version_number);
121 --
122 if (l_api_updating
123 and nvl(p_routing_list_id,hr_api.g_number)
124 <> nvl(pqh_rlm_shd.g_old_rec.routing_list_id,hr_api.g_number)
125 or not l_api_updating) then
126 --
127 -- check if routing_list_id value exists in pqh_routing_lists table
128 --
129 open c1;
130 --
131 fetch c1 into l_dummy;
132 if c1%notfound then
133 --
134 close c1;
135 --
136 -- raise error as FK does not relate to PK in pqh_routing_lists
137 -- table.
138 --
139 hr_utility.set_message(8302, 'PQH_INVALID_ROUTING_LIST');
140 hr_utility.raise_error;
141
142 -- pqh_rlm_shd.constraint_error('PQH_ROUTING_LIST_MEMBERS_FK2');
143 --
144 end if;
145 --
146 close c1;
147 --
148 end if;
149 --
150 hr_utility.set_location('Leaving:'||l_proc,10);
151 --
152 End chk_routing_list_id;
153 --
154 -- ----------------------------------------------------------------------------
155 -- |------< chk_role_user_id >------|
156 -- ----------------------------------------------------------------------------
157 --
158 -- Description
159 -- This procedure checks that a referenced foreign key actually exists
160 -- in the referenced table.
161 --
162 -- Pre-Conditions
163 -- None.
164 --
165 -- In Parameters
166 -- p_routing_list_member_id PK
167 -- p_role_id ID of FK column
168 -- p_object_version_number object version number
169 --
170 -- Post Success
171 -- Processing continues
172 --
173 -- Post Failure
174 -- Error raised.
175 --
176 -- Access Status
177 -- Internal table handler use only.
178 --
179 Procedure chk_role_user_id (p_routing_list_member_id in number,
180 p_role_id in number,
181 p_user_id in number,
182 p_object_version_number in number) is
183 --
184 l_proc varchar2(72) := g_package||'chk_role_user_id';
185 l_api_updating boolean;
186 l_dummy varchar2(1);
187 --
188 cursor c1 is
189 select null
190 from pqh_roles a
191 where a.role_id = p_role_id;
192 --
193 cursor c2 is
194 select null
195 from pqh_role_users_v
196 where user_id = nvl(p_user_id, -1)
197 and role_id = p_role_id;
198 Begin
199 --
200 hr_utility.set_location('Entering:'||l_proc,5);
201 --
202 l_api_updating := pqh_rlm_shd.api_updating
203 (p_routing_list_member_id => p_routing_list_member_id,
204 p_object_version_number => p_object_version_number);
205 --
206 --
207 if (l_api_updating
208 and (nvl(p_role_id,hr_api.g_number)
209 <> nvl(pqh_rlm_shd.g_old_rec.role_id,hr_api.g_number)
210 or nvl(p_user_id,hr_api.g_number)
211 <> nvl(pqh_rlm_shd.g_old_rec.user_id,hr_api.g_number) )
212 or not l_api_updating) and
213 (p_role_id is not null) then
214 --
215 -- check if role_id value exists in pqh_roles table and user is assigned to role
216 --
217 open c1;
218 --
219 fetch c1 into l_dummy;
220 if c1%notfound then
221 --
222 close c1;
223 --
224 -- raise error as FK does not relate to PK in pqh_roles
225 -- table.
226 --
227 hr_utility.set_message(8302,'PQH_INVALID_ROLE');
228 hr_utility.raise_error;
229 -- pqh_rlm_shd.constraint_error('PQH_ROUTING_LIST_MEMBERS_FK1');
230 --
231 end if;
232 --
233 close c1;
234 --
235 --
236 -- check if user_id is assigned to role
237 --
238 if p_user_id is not null then
239 open c2;
240 --
241 fetch c2 into l_dummy;
242 if c2%notfound then
243 --
244 close c2;
245 --
246 -- raise error as user_id is not assigned to role
247 -- table.
248 --
249 hr_utility.set_message(8302,'PQH_USER_NOT_OF_CUR_ROLE');
250 hr_utility.raise_error;
251 -- pqh_rlm_shd.constraint_error('PQH_ROUTING_LIST_MEMBERS_FK1');
252 --
253 end if;
254 --
255 close c2;
256 end if;
257 --
258 end if;
259 --
260 hr_utility.set_location('Leaving:'||l_proc,10);
261 --
262 End chk_role_user_id;
263 --
264 -- ----------------------------------------------------------------------------
265 -- |------< chk_rlist_role_user_uk1 >------|
266 -- ----------------------------------------------------------------------------
267 --
268 -- Description
269 -- This procedure checks that a referenced foreign key actually exists
270 -- in the referenced table.
271 --
272 -- Pre-Conditions
273 -- None.
274 --
275 -- In Parameters
276 -- p_role_template_id PK
277 -- p_template_id ID of FK column
278 -- p_object_version_number object version number
279 --
280 -- Post Success
281 -- Processing continues
282 --
283 -- Post Failure
284 -- Error raised.
285 --
286 -- Access Status
287 -- Internal table handler use only.
288 --
289 Procedure chk_rlist_role_user_uk1 (p_routing_list_member_id in number,
290 p_routing_list_id in number,
291 p_role_id in number,
292 p_user_id in number,
293 p_object_version_number in number) is
294 --
295 l_proc varchar2(72) := g_package||'chk_rlist_role_user_uk1';
296 l_api_updating boolean;
297 l_dummy varchar2(1);
298 --
299 cursor c1 is
300 select null
301 from pqh_routing_list_members a
302 where a.routing_list_id=p_routing_list_id
303 and a.role_id = p_role_id
304 and nvl(a.user_id,-1) = nvl(p_user_id, -1);
305 --
306 Begin
307 --
308 hr_utility.set_location('Entering:'||l_proc,5);
309 --
310 l_api_updating := pqh_rlm_shd.api_updating
311 (p_routing_list_member_id => p_routing_list_member_id,
312 p_object_version_number => p_object_version_number);
313 --
314 if (l_api_updating
315 and (nvl(p_routing_list_id,hr_api.g_number)
316 <> nvl(pqh_rlm_shd.g_old_rec.routing_list_id,hr_api.g_number)
317 or nvl(p_role_id,hr_api.g_number)
318 <> nvl(pqh_rlm_shd.g_old_rec.role_id,hr_api.g_number)
319 or nvl(p_user_id,hr_api.g_number)
320 <> nvl(pqh_rlm_shd.g_old_rec.user_id,hr_api.g_number) )
321 or not l_api_updating) and
322 (p_role_id is not null) then
323 --
324 -- check if transaction_category_id and template_id value exists in pqh_templates table
325 --
326 open c1;
327 --
328 fetch c1 into l_dummy;
329 if c1%found then
330 --
331 close c1;
332 --
333 -- raise error as UK failed
334 -- table.
335 --
336 hr_utility.set_message(8302,'PQH_DUP_RLM_NOT_ALLOWED');
337 hr_utility.raise_error;
338 -- pqh_rtm_shd.constraint_error('PQH_ROUTING_LIST_MEMBERS_UK1');
339 --
340 end if;
341 --
342 close c1;
343 --
344 end if;
345 --
346 hr_utility.set_location('Leaving:'||l_proc,10);
347 --
348 End chk_rlist_role_user_uk1;
349 --
350 -- ----------------------------------------------------------------------------
351 -- |------< chk_rlist_seq_uk2 >------|
352 -- ----------------------------------------------------------------------------
353 --
354 -- Description
355 -- This procedure checks that a referenced foreign key actually exists
356 -- in the referenced table.
357 --
358 -- Pre-Conditions
359 -- None.
360 --
361 -- In Parameters
362 --
363 -- Post Success
364 -- Processing continues
365 --
366 -- Post Failure
367 -- Error raised.
368 --
369 -- Access Status
370 -- Internal table handler use only.
371 --
372 Procedure chk_rlist_seq_uk2 (p_routing_list_member_id in number,
373 p_routing_list_id in number,
374 p_seq_no in number,
375 p_object_version_number in number) is
376 --
377 l_proc varchar2(72) := g_package||'chk_rlist_seq_uk2';
378 l_api_updating boolean;
379 l_dummy varchar2(1);
380 --
381 cursor c1 is
382 select null
383 from pqh_routing_list_members a
384 where a.routing_list_id=p_routing_list_id
385 and a.seq_no = p_seq_no;
386 --
387 Begin
388 --
389 hr_utility.set_location('Entering:'||l_proc,5);
390 --
391 l_api_updating := pqh_rlm_shd.api_updating
392 (p_routing_list_member_id => p_routing_list_member_id,
393 p_object_version_number => p_object_version_number);
394 --
395 if (l_api_updating
396 and (nvl(p_routing_list_id,hr_api.g_number)
397 <> nvl(pqh_rlm_shd.g_old_rec.routing_list_id,hr_api.g_number)
398 or nvl(p_seq_no,hr_api.g_number)
399 <> nvl(pqh_rlm_shd.g_old_rec.seq_no,hr_api.g_number))
400 or not l_api_updating) and
401 (p_seq_no is not null) then
402 --
403 --
404 open c1;
405 --
406 fetch c1 into l_dummy;
407 if c1%found then
408 --
409 close c1;
410 --
411 -- raise error as UK failed
412 -- table.
413 --
414 hr_utility.set_message(8302,'PQH_DUP_RLM_SEQ_NOT_ALLOWED');
415 hr_utility.raise_error;
416 --
417 end if;
418 --
419 close c1;
420 --
421 end if;
422 --
423 hr_utility.set_location('Leaving:'||l_proc,10);
424 --
425 End chk_rlist_seq_uk2;
426 --
427 --
428 -- ----------------------------------------------------------------------------
429 -- |------< chk_approver_flag >------|
430 -- ----------------------------------------------------------------------------
431 --
432 -- Description
433 -- This procedure is used to check that the lookup value is valid.
434 --
435 -- Pre Conditions
436 -- None.
437 --
438 -- In Parameters
439 -- routing_list_member_id PK of record being inserted or updated.
443 -- inserted or updated.
440 -- approver_flag Value of lookup code.
441 -- effective_date effective date
442 -- object_version_number Object version number of record being
444 --
445 -- Post Success
446 -- Processing continues
447 --
448 -- Post Failure
449 -- Error handled by procedure
450 --
451 -- Access Status
452 -- Internal table handler use only.
453 --
454 Procedure chk_approver_flag(p_routing_list_member_id in number,
455 p_approver_flag in varchar2,
456 p_effective_date in date,
457 p_object_version_number in number) is
458 --
459 l_proc varchar2(72) := g_package||'chk_approver_flag';
460 l_api_updating boolean;
461 --
462 Begin
463 --
464 hr_utility.set_location('Entering:'||l_proc, 5);
465 --
466 l_api_updating := pqh_rlm_shd.api_updating
467 (p_routing_list_member_id => p_routing_list_member_id,
468 p_object_version_number => p_object_version_number);
469 --
470 if (l_api_updating
471 and p_approver_flag
472 <> nvl(pqh_rlm_shd.g_old_rec.approver_flag,hr_api.g_varchar2)
473 or not l_api_updating)
474 and p_approver_flag is not null then
475 --
476 -- check if value of lookup falls within lookup type.
477 --
478 if hr_api.not_exists_in_hr_lookups
479 (p_lookup_type => 'YES_NO',
480 p_lookup_code => p_approver_flag,
481 p_effective_date => p_effective_date) then
482 --
483 -- raise error as does not exist as lookup
484 --
485 hr_utility.set_message(801,'HR_LOOKUP_DOES_NOT_EXIST');
486 hr_utility.raise_error;
487 --
488 end if;
489 --
490 end if;
491 --
492 hr_utility.set_location('Leaving:'||l_proc,10);
493 --
494 end chk_approver_flag;
495 --
496 --
497 -- ----------------------------------------------------------------------------
498 -- |------< chk_enable_flag >------|
499 -- ----------------------------------------------------------------------------
500 --
501 -- Description
502 -- This procedure is used to check that the lookup value is valid.
503 --
504 -- Pre Conditions
505 -- None.
506 --
507 -- In Parameters
508 -- routing_list_member_id PK of record being inserted or updated.
509 -- approver_flag Value of lookup code.
510 -- effective_date effective date
511 -- object_version_number Object version number of record being
512 -- inserted or updated.
513 --
514 -- Post Success
515 -- Processing continues
516 --
517 -- Post Failure
518 -- Error handled by procedure
519 --
520 -- Access Status
521 -- Internal table handler use only.
522 --
523 Procedure chk_enable_flag(p_routing_list_member_id in number,
524 p_routing_list_id in number,
525 p_role_id in number,
526 p_user_id in number,
527 p_enable_flag in varchar2,
528 p_effective_date in date,
529 p_object_version_number in number) is
530 --
531 l_proc varchar2(72) := g_package||'chk_enable_flag';
532 l_api_updating boolean;
533 l_routing_list_enable_flag varchar2(10);
534 l_role_enable_flag varchar2(10);
535 l_role_user_enable_flag varchar2(10);
536 l_dummy varchar2(10);
537 --
538 cursor c_routing_list_enable_flag(p_routing_list_id number) is
539 select enable_flag
540 from pqh_routing_lists
541 where routing_list_id = p_routing_list_id;
542 --
543 cursor c_role_enable_flag(p_role_id number) is
544 select enable_flag
545 from pqh_roles
546 where role_id = p_role_id;
547 --
548 cursor c_role_user_enable_flag(p_role_id number, p_user_id number) is
549 select 'x'
550 from pqh_role_users_v
551 where role_id = p_role_id
552 and user_id = p_user_id;
553 --
554 Begin
555 --
556 hr_utility.set_location('Entering:'||l_proc, 5);
557 --
558 l_api_updating := pqh_rlm_shd.api_updating
559 (p_routing_list_member_id => p_routing_list_member_id,
560 p_object_version_number => p_object_version_number);
561 --
562 if (l_api_updating
563 and p_enable_flag
564 <> nvl(pqh_rlm_shd.g_old_rec.enable_flag,hr_api.g_varchar2)
565 or not l_api_updating)
566 and p_enable_flag is not null then
567 --
568 -- check if value of lookup falls within lookup type.
569 --
570 if hr_api.not_exists_in_hr_lookups
571 (p_lookup_type => 'YES_NO',
572 p_lookup_code => p_enable_flag,
573 p_effective_date => p_effective_date) then
574 --
575 -- raise error as does not exist as lookup
576 --
577 hr_utility.set_message(801,'HR_LOOKUP_DOES_NOT_EXIST');
578 hr_utility.raise_error;
579 --
580 end if;
581 --
582 if p_enable_flag = 'Y' then
583 --
587 --
584 open c_routing_list_enable_flag(p_routing_list_id);
585 fetch c_routing_list_enable_flag into l_routing_list_enable_flag;
586 close c_routing_list_enable_flag;
588 if nvl(l_routing_list_enable_flag,'N') ='N' then
589 hr_utility.set_message(8302,'PQH_CANT_ENABLE_RLM_RL_DIS');
590 hr_utility.raise_error;
591 end if;
592 --
593 --
594 open c_role_enable_flag(p_role_id);
595 fetch c_role_enable_flag into l_role_enable_flag;
596 close c_role_enable_flag;
597 --
598 if nvl(l_role_enable_flag,'N') = 'N' then
599 hr_utility.set_message(8302,'PQH_CANT_ENABLE_RLM_RLS_DIS');
600 hr_utility.raise_error;
601 end if;
602 --
603 --
604 if p_user_id is not null then
605 open c_role_user_enable_flag(p_role_id, p_user_id);
606 fetch c_role_user_enable_flag into l_dummy;
607 --
608 if c_role_user_enable_flag%notfound then
609 close c_role_user_enable_flag;
610 hr_utility.set_message(8302,'PQH_CANT_ENBL_RLM_RLSUSR_DIS');
611 hr_utility.raise_error;
612 else
613 close c_role_user_enable_flag;
614 end if;
615 --
616 end if;
617 --
618 end if;
619 --
620 end if;
621 --
622 hr_utility.set_location('Leaving:'||l_proc,10);
623 --
624 end chk_enable_flag;
625 --
626 -- ----------------------------------------------------------------------------
627 -- |------< chk_for_pending_txns >------|
628 -- ----------------------------------------------------------------------------
629 --
630 -- Description
631 -- This procedure is used to check that the lookup value is valid.
632 --
633 -- Pre Conditions
634 -- None.
635 --
636 -- In Parameters
637 -- routing_list_member_id PK of record being inserted or updated.
638 --
639 -- Post Success
640 -- Processing continues
641 --
642 -- Post Failure
643 -- Error handled by procedure
644 --
645 -- Access Status
646 -- Internal table handler use only.
647 --
648 Procedure chk_for_pending_txns(p_routing_list_member_id in number,
649 p_routing_list_id in number,
650 p_object_version_number in number) is
651 --
652 l_proc varchar2(72) := g_package||'chk_for_pending_txns';
653 l_api_updating boolean;
654 l_bus_grp_name varchar2(240);
655 --
656 cursor c_txn_cats(p_routing_list_id number) is
657 select distinct ptc.transaction_category_id, ptc.name transaction_category_name,
658 ptc.business_group_id
659 from pqh_routing_list_members rlm, pqh_routing_categories rct,
660 pqh_transaction_categories ptc
661 where rlm.routing_list_id = rct.routing_list_id
662 and rct.routing_list_id = p_routing_list_id
663 and rct.transaction_category_id = ptc.transaction_category_id;
664 --
665 Begin
666 --
667 hr_utility.set_location('Entering:'||l_proc, 5);
668 --
669 for r_txn_cat in c_txn_cats(p_routing_list_id)
670 loop
671 --
672 if nvl(pqh_tct_bus.chk_active_transaction_exists(r_txn_cat.transaction_category_id),'N')
673 = 'Y' then
674 hr_utility.set_message(8302,'PQH_CANT_DEL_RLM_PNDG_TXN');
675 hr_utility.set_message_token('TRANSACTION_CATEGORY', r_txn_cat.transaction_category_name);
676 if (r_txn_cat.business_group_id is not null) then
677 l_bus_grp_name := hr_general.DECODE_ORGANIZATION(r_txn_cat.business_group_id);
678 else
679 l_bus_grp_name := hr_general.decode_lookup('PQH_TCT_SCOPE', 'GLOBAL');
680 end if;
681
682 hr_utility.set_message_token('BUSINESS_GROUP', l_bus_grp_name);
683 hr_utility.raise_error;
684 end if;
685 --
686 end loop;
687 --
688 hr_utility.set_location('Leaving:'||l_proc,10);
689 --
690 end chk_for_pending_txns;
691 --
692 function chk_txn_cat_freeze_status(p_transaction_category_id in number) return varchar2 is
693 --
694 l_freeze_status varchar2(30);
695 --
696 cursor c_cat_status(p_transaction_category_id number) is
697 select freeze_status_cd
698 from pqh_transaction_categories_vl
699 where transaction_category_id = p_transaction_category_id;
700 --
701 begin
702 --
703 open c_cat_status(p_transaction_category_id);
704 fetch c_cat_status into l_freeze_status;
705 close c_cat_status;
706 return(l_freeze_status);
707 --
708 end;
709 --
710 function chk_rlm_txn_cat_frozen(p_routing_list_member_id in number) return varchar2 is
711 --
712 l_proc varchar2(72) := g_package||'chk_rlm_txn_cat_frozen';
713 l_api_updating boolean;
714 --
715 cursor c_txn_cats(p_routing_list_member_id number) is
716 select distinct rtc.transaction_category_id
717 from pqh_attribute_ranges arg, pqh_routing_categories rtc
718 where routing_list_member_id = p_routing_list_member_id
719 and arg.routing_category_id = rtc.routing_category_id;
720
721 --
722 Begin
723 --
724 hr_utility.set_location('Entering:'||l_proc, 5);
725 --
729 return chk_txn_cat_freeze_status(r_txn_cat.transaction_category_id);
726 for r_txn_cat in c_txn_cats(p_routing_list_member_id)
727 loop
728 --
730 --
731 end loop;
732 --
733 hr_utility.set_location('Leaving:'||l_proc,10);
734 --
735 end chk_rlm_txn_cat_frozen;
736 --
737 -- ----------------------------------------------------------------------------
738 -- |---------------------------< insert_validate >----------------------------|
739 -- ----------------------------------------------------------------------------
740 Procedure insert_validate(p_rec in pqh_rlm_shd.g_rec_type
741 ,p_effective_date in date) is
742 --
743 l_proc varchar2(72) := g_package||'insert_validate';
744 --
745 Begin
746 hr_utility.set_location('Entering:'||l_proc, 5);
747 --
748 -- Call all supporting business operations
749 --
750 chk_routing_list_member_id
751 (p_routing_list_member_id => p_rec.routing_list_member_id,
752 p_object_version_number => p_rec.object_version_number);
753 --
754 chk_routing_list_id
755 (p_routing_list_member_id => p_rec.routing_list_member_id,
756 p_routing_list_id => p_rec.routing_list_id,
757 p_object_version_number => p_rec.object_version_number);
758 --
759 chk_role_user_id
760 (p_routing_list_member_id => p_rec.routing_list_member_id,
761 p_role_id => p_rec.role_id,
762 p_user_id => p_rec.user_id,
763 p_object_version_number => p_rec.object_version_number);
764 --
765 chk_approver_flag
766 (p_routing_list_member_id => p_rec.routing_list_member_id,
767 p_approver_flag => p_rec.approver_flag,
768 p_effective_date => p_effective_date,
769 p_object_version_number => p_rec.object_version_number);
770 --
771 chk_enable_flag
772 (p_routing_list_member_id => p_rec.routing_list_member_id,
773 p_routing_list_id => p_rec.routing_list_id,
774 p_role_id => p_rec.role_id,
775 p_user_id => p_rec.user_id,
776 p_enable_flag => p_rec.enable_flag,
777 p_effective_date => p_effective_date,
778 p_object_version_number => p_rec.object_version_number);
779 --
780 chk_rlist_role_user_uk1
781 (p_routing_list_member_id => p_rec.routing_list_member_id,
782 p_routing_list_id => p_rec.routing_list_id,
783 p_role_id => p_rec.role_id,
784 p_user_id => p_rec.user_id,
785 p_object_version_number => p_rec.object_version_number);
786 --
787 chk_rlist_seq_uk2
788 (p_routing_list_member_id => p_rec.routing_list_member_id,
789 p_routing_list_id => p_rec.routing_list_id,
790 p_seq_no => p_rec.seq_no,
791 p_object_version_number => p_rec.object_version_number);
792 --
793 --
794 hr_utility.set_location(' Leaving:'||l_proc, 10);
795 End insert_validate;
796 --
797 -- ----------------------------------------------------------------------------
798 -- |---------------------------< update_validate >----------------------------|
799 -- ----------------------------------------------------------------------------
800 Procedure update_validate(p_rec in pqh_rlm_shd.g_rec_type
801 ,p_effective_date in date) is
802 --
803 l_proc varchar2(72) := g_package||'update_validate';
804 --
805 Begin
806 hr_utility.set_location('Entering:'||l_proc, 5);
807 --
808 -- Call all supporting business operations
809 --
810 --
811 chk_routing_list_member_id
812 (p_routing_list_member_id => p_rec.routing_list_member_id,
813 p_object_version_number => p_rec.object_version_number);
814 --
815 chk_routing_list_id
816 (p_routing_list_member_id => p_rec.routing_list_member_id,
817 p_routing_list_id => p_rec.routing_list_id,
818 p_object_version_number => p_rec.object_version_number);
819 --
820 chk_role_user_id
821 (p_routing_list_member_id => p_rec.routing_list_member_id,
822 p_role_id => p_rec.role_id,
823 p_user_id => p_rec.user_id,
824 p_object_version_number => p_rec.object_version_number);
825 --
826 chk_rlist_role_user_uk1
827 (p_routing_list_member_id => p_rec.routing_list_member_id,
828 p_routing_list_id => p_rec.routing_list_id,
829 p_role_id => p_rec.role_id,
830 p_user_id => p_rec.user_id,
831 p_object_version_number => p_rec.object_version_number);
832 --
833 chk_approver_flag
834 (p_routing_list_member_id => p_rec.routing_list_member_id,
835 p_approver_flag => p_rec.approver_flag,
836 p_effective_date => p_effective_date,
837 p_object_version_number => p_rec.object_version_number);
838 --
839 chk_enable_flag
840 (p_routing_list_member_id => p_rec.routing_list_member_id,
841 p_routing_list_id => p_rec.routing_list_id,
842 p_role_id => p_rec.role_id,
843 p_user_id => p_rec.user_id,
844 p_enable_flag => p_rec.enable_flag,
845 p_effective_date => p_effective_date,
846 p_object_version_number => p_rec.object_version_number);
847 --
848 --
849 chk_rlist_seq_uk2
850 (p_routing_list_member_id => p_rec.routing_list_member_id,
851 p_routing_list_id => p_rec.routing_list_id,
852 p_seq_no => p_rec.seq_no,
853 p_object_version_number => p_rec.object_version_number);
854 --
855 hr_utility.set_location(' Leaving:'||l_proc, 10);
856 End update_validate;
857 --
858 -- ----------------------------------------------------------------------------
859 -- |---------------------------< delete_validate >----------------------------|
860 -- ----------------------------------------------------------------------------
861 Procedure delete_validate(p_rec in pqh_rlm_shd.g_rec_type
862 ,p_effective_date in date) is
863 --
864 l_proc varchar2(72) := g_package||'delete_validate';
865 --
866 Begin
867 hr_utility.set_location('Entering:'||l_proc, 5);
868 --
869 -- Call all supporting business operations
870 --
871 chk_for_pending_txns(p_routing_list_member_id => p_rec.routing_list_member_id,
872 p_routing_list_id => p_rec.routing_list_id,
873 p_object_version_number => p_rec.object_version_number);
874 hr_utility.set_location(' Leaving:'||l_proc, 10);
875 End delete_validate;
876 --
877 end pqh_rlm_bus;