[Home] [Help]
PACKAGE BODY: APPS.PQH_CRE_BUS
Source
1 Package Body pqh_cre_bus as
2 /* $Header: pqcrerhi.pkb 120.0 2005/10/06 14:52 srajakum noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' pqh_cre_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_criteria_rate_element_id number default null;
15 --
16 -- ---------------------------------------------------------------------------
17 -- |----------------------< set_security_group_id >--------------------------|
18 -- ---------------------------------------------------------------------------
19 --
20 Procedure set_security_group_id
21 (p_criteria_rate_element_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 , pqh_criteria_rate_elements cre
32 where cre.criteria_rate_element_id = p_criteria_rate_element_id
33 and pbg.business_group_id (+) = cre.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 => 'criteria_rate_element_id'
50 ,p_argument_value => p_criteria_rate_element_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,'CRITERIA_RATE_ELEMENT_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_criteria_rate_element_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 , pqh_criteria_rate_elements cre
102 where cre.criteria_rate_element_id = p_criteria_rate_element_id
103 and pbg.business_group_id (+) = cre.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 => 'criteria_rate_element_id'
119 ,p_argument_value => p_criteria_rate_element_id
120 );
121 --
122 if ( nvl(pqh_cre_bus.g_criteria_rate_element_id, hr_api.g_number)
123 = p_criteria_rate_element_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
127 -- variable.
128 --
129 l_legislation_code := pqh_cre_bus.g_legislation_code;
130 hr_utility.set_location(l_proc, 20);
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 pqh_cre_bus.g_criteria_rate_element_id := p_criteria_rate_element_id;
154 pqh_cre_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_non_updateable_args >------------------------|
162 -- ----------------------------------------------------------------------------
163 -- {Start Of Comments}
164 --
165 -- Description:
166 -- This procedure is used to ensure that non updateable attributes have
167 -- not been updated. If an attribute has been updated an error is generated.
168 --
169 -- Pre Conditions:
170 -- g_old_rec has been populated with details of the values currently in
171 -- the database.
172 --
173 -- In Arguments:
174 -- p_rec has been populated with the updated values the user would like the
175 -- record set to.
176 --
177 -- Post Success:
178 -- Processing continues if all the non updateable attributes have not
179 -- changed.
180 --
181 -- Post Failure:
182 -- An application error is raised if any of the non updatable attributes
183 -- have been altered.
184 --
185 -- {End Of Comments}
186 -- ----------------------------------------------------------------------------
187 Procedure chk_non_updateable_args
188 (p_rec in pqh_cre_shd.g_rec_type
189 ) IS
190 --
191 l_proc varchar2(72) := g_package || 'chk_non_updateable_args';
192 --
193 Begin
194 --
195 -- Only proceed with the validation if a row exists for the current
196 -- record in the HR Schema.
197 --
198 IF NOT pqh_cre_shd.api_updating
199 (p_criteria_rate_element_id => p_rec.criteria_rate_element_id
200 ,p_object_version_number => p_rec.object_version_number
201 ) THEN
202 fnd_message.set_name('PER', 'HR_6153_ALL_PROCEDURE_FAIL');
203 fnd_message.set_token('PROCEDURE ', l_proc);
204 fnd_message.set_token('STEP ', '5');
205 fnd_message.raise_error;
206 END IF;
207 --
208 -- EDIT_HERE: Add checks to ensure non-updateable args have
209 -- not been updated.
210 --
211 --
212 if nvl(p_rec.business_group_id, hr_api.g_number) <>
213 nvl(pqh_cre_shd.g_old_rec.business_group_id
214 ,hr_api.g_number
215 ) then
216 hr_api.argument_changed_error
217 (p_api_name => l_proc
218 ,p_argument => 'BUSINESS_GROUP_ID'
219 ,p_base_table => pqh_cre_shd.g_tab_nam
220 );
221 end if;
222 --
223 End chk_non_updateable_args;
224 --
225 -- ----------------------------------------------------------------------------
226 -- |----------------------< chk_startup_action >------------------------------|
227 -- ----------------------------------------------------------------------------
228 --
229 -- Description:
230 -- This procedure will check that the current action is allowed according
231 -- to the current startup mode.
232 --
233 -- ----------------------------------------------------------------------------
234 PROCEDURE chk_startup_action
235 (p_insert IN boolean
236 ,p_business_group_id IN number
237 ,p_legislation_code IN varchar2
238 ,p_legislation_subgroup IN varchar2 DEFAULT NULL) IS
239 --
240 BEGIN
241 --
242 -- Call the supporting procedure to check startup mode
243 -- EDIT_HERE: The following call should be edited if certain types of rows
244 -- are not permitted.
245 IF (p_insert) THEN
246 hr_startup_data_api_support.chk_startup_action
247 (p_generic_allowed => TRUE
248 ,p_startup_allowed => TRUE
249 ,p_user_allowed => TRUE
250 ,p_business_group_id => p_business_group_id
251 ,p_legislation_code => p_legislation_code
252 ,p_legislation_subgroup => p_legislation_subgroup
253 );
254 ELSE
255 hr_startup_data_api_support.chk_upd_del_startup_action
256 (p_generic_allowed => TRUE
257 ,p_startup_allowed => TRUE
258 ,p_user_allowed => TRUE
259 ,p_business_group_id => p_business_group_id
260 ,p_legislation_code => p_legislation_code
261 ,p_legislation_subgroup => p_legislation_subgroup
262 );
263 END IF;
264 --
265 END chk_startup_action;
266
267 -- ----------------------------------------------------------------------------
268 -- |------< chk_criteria_rate_defn_id>------|
269 -- ----------------------------------------------------------------------------
270
271 -- Description
272 -- This procedure checks that a referenced foreign key actually exists
273 -- in the referenced table.
274 --
275 -- Pre-Conditions
276 -- None.
277 --
278 -- In Parameters
279 -- p_criteria_rate_element_id PK
280 -- p_criteria_rate_defn_id ID of FK column
281 -- p_object_version_number object version number
282 --
283 -- Post Success
284 -- Processing continues
285 --
286 -- Post Failure
287 -- Error raised.
288 --
289 -- Access Status
290 -- Internal table handler use only.
291 --
292 Procedure chk_criteria_rate_defn_id (p_criteria_rate_element_id in number,
293 p_criteria_rate_defn_id in number,
294 p_object_version_number in number) is
295 --
296 l_proc varchar2(72) := g_package||'chk_criteria_rate_defn_id';
297 l_api_updating boolean;
298 l_dummy varchar2(1);
299 --
300
301 cursor c1 is
302 select null from PQH_CRITERIA_RATE_DEFN a
303 where a.criteria_rate_defn_id = p_criteria_rate_defn_id;
304
305 --
306 Begin
307 --
308 hr_utility.set_location('Entering:'||l_proc,10);
309 --
310
311 l_api_updating := pqh_cre_shd.api_updating
312 (p_criteria_rate_element_id => p_criteria_rate_element_id,
313 p_object_version_number => p_object_version_number);
314 --
315 if (l_api_updating
316 and nvl(p_criteria_rate_defn_id,hr_api.g_number)
317 <> nvl(pqh_cre_shd.g_old_rec.criteria_rate_defn_id,hr_api.g_number)
318 or not l_api_updating) then
319 --
320 -- check if criteria_rate_defn_id value exists in
321 -- PQH_CRITERIA_RATE_DEFN table
322 --
323 open c1;
324 --
325
326 fetch c1 into l_dummy;
327
328 if c1%notfound then
329 --
330 close c1;
331 --
332 -- raise error as FK does not relate to PK in PQH_CRITERIA_RATE_DEFN
333 -- table.
334 --
335 pqh_cre_shd.constraint_error('PQH_CRITERIA_RATE_ELEMENTS_FK1');
336 --
337 end if;
338 --
339 close c1;
340
341 --
342 --
343 end if;
344 --
345 hr_utility.set_location('Leaving:'||l_proc,90);
346 --
347 End chk_criteria_rate_defn_id;
348 --
349
350
351 -- ----------------------------------------------------------------------------
352 -- |------< chk_business_group_id>------|
353 -- ----------------------------------------------------------------------------
354
355 -- Description
356 -- This procedure checks that a referenced foreign key actually exists
357 -- in the referenced table.
358 --
359 -- Pre-Conditions
360 -- None.
361 --
362 -- In Parameters
363 -- p_criteria_rate_element_id PK
364 -- p_business_group_id ID of FK column
365 -- p_object_version_number object version number
366 --
367 -- Post Success
368 -- Processing continues
369 --
370 -- Post Failure
371 -- Error raised.
372 --
373 -- Access Status
374 -- Internal table handler use only.
375 --
376 Procedure chk_business_group_id (p_criteria_rate_element_id in number,
377 p_business_group_id in number,
378 p_object_version_number in number) is
379 --
380 l_proc varchar2(72) := g_package||'chk_business_group_id';
381 l_api_updating boolean;
382 l_dummy varchar2(1);
383 --
384 cursor c1 is
385 select null from HR_ALL_ORGANIZATION_UNITS a
386 where a.business_group_id = p_business_group_id;
387
388 --
389 Begin
390 --
391 hr_utility.set_location('Entering:'||l_proc,10);
392 --
393
394 l_api_updating := pqh_cre_shd.api_updating
395 (p_criteria_rate_element_id => p_criteria_rate_element_id,
396 p_object_version_number => p_object_version_number);
397 --
398 if (l_api_updating
399 and nvl(p_business_group_id,hr_api.g_number)
400 <> nvl(pqh_cre_shd.g_old_rec.business_group_id,hr_api.g_number)
401 or not l_api_updating) then
402 --
403 -- check if business_group_id value exists in
404 -- HR_ALL_ORGANIZATION_UNITS table
405 --
406 open c1;
407 --
408
409 fetch c1 into l_dummy;
410
411 if c1%notfound then
412 --
413 close c1;
414 --
415 -- raise error as FK does not relate to PK in HR_ALL_ORGANIZATION_UNITS
416 -- table.
417 --
418 pqh_cre_shd.constraint_error('PQH_CRITERIA_RATE_ELEMENTS_FK3');
419 --
420 end if;
421 --
422 close c1;
423
424 --
425 --
426 end if;
427 --
428 hr_utility.set_location('Leaving:'||l_proc,90);
429 --
430 End chk_business_group_id;
431 --
432
433
434
435 -- ----------------------------------------------------------------------------
436 -- |------< chk_element_type_id>------|
437 -- ----------------------------------------------------------------------------
438
439 -- Description
440 -- This procedure checks that a referenced foreign key actually exists
441 -- in the referenced table.
442 --
443 -- Pre-Conditions
444 -- None.
445 --
446 -- In Parameters
447 -- p_criteria_rate_element_id PK
448 -- p_element_type_id ID of FK column
449 -- p_object_version_number object version number
450 --
451 -- Post Success
452 -- Processing continues
453 --
454 -- Post Failure
455 -- Error raised.
456 --
457 -- Access Status
458 -- Internal table handler use only.
459 --
460 Procedure chk_element_type_id (p_criteria_rate_element_id in number,
461 p_element_type_id in number,
462 p_object_version_number in number) is
463 --
464 l_proc varchar2(72) := g_package||'chk_element_type_id';
468 cursor c1 is
465 l_api_updating boolean;
466 l_dummy varchar2(1);
467 --
469 select null from PAY_ELEMENT_TYPES_F a
470 where a.element_type_id = p_element_type_id;
471
472 --
473 Begin
474 --
475 hr_utility.set_location('Entering:'||l_proc,10);
476 --
477
478 l_api_updating := pqh_cre_shd.api_updating
479 (p_criteria_rate_element_id => p_criteria_rate_element_id,
480 p_object_version_number => p_object_version_number);
481 --
482 if (l_api_updating
483 and nvl(p_element_type_id,hr_api.g_number)
484 <> nvl(pqh_cre_shd.g_old_rec.element_type_id,hr_api.g_number)
485 or not l_api_updating) then
486 --
487 -- check if element_type_id value exists in
488 -- PAY_ELEMENT_TYPES_F table
489 --
490 open c1;
491 --
492 fetch c1 into l_dummy;
493
494 if c1%notfound then
495 --
496 close c1;
497 --
498 -- raise error as FK does not relate to PK in PAY_ELEMENT_TYPES_F
499 -- table.
500 --
501 pqh_cre_shd.constraint_error('PQH_CRITERIA_RATE_ELEMENTS_FK4');
502 --
503 end if;
504 --
505 close c1;
506
507 --
508 --
509 end if;
510 --
511 hr_utility.set_location('Leaving:'||l_proc,90);
512 --
513 End chk_element_type_id;
514 --
515
516
517
518
519 -- ----------------------------------------------------------------------------
520 -- |------< chk_input_value_id>------|
521 -- ----------------------------------------------------------------------------
522
523 -- Description
524 -- This procedure checks that a referenced foreign key actually exists
525 -- in the referenced table.
526 --
527 -- Pre-Conditions
528 -- None.
529 --
530 -- In Parameters
531 -- p_criteria_rate_element_id PK
532 -- p_input_value_id ID of FK column
533 -- p_object_version_number object version number
534 --
535 -- Post Success
536 -- Processing continues
537 --
538 -- Post Failure
539 -- Error raised.
540 --
541 -- Access Status
542 -- Internal table handler use only.
543 --
544 Procedure chk_input_value_id (p_criteria_rate_element_id in number,
545 p_input_value_id in number,
546 p_object_version_number in number) is
547 --
548 l_proc varchar2(72) := g_package||'chk_input_value_id';
549 l_api_updating boolean;
550 l_dummy varchar2(1);
551 --
552 cursor c1 is
553 select null from PAY_INPUT_VALUES_F a
554 where a.input_value_id = p_input_value_id;
555
556 --
557 Begin
558 --
559 hr_utility.set_location('Entering:'||l_proc,10);
560 --
561
562 l_api_updating := pqh_cre_shd.api_updating
563 (p_criteria_rate_element_id => p_criteria_rate_element_id,
564 p_object_version_number => p_object_version_number);
565 --
566 if (l_api_updating
567 and nvl(p_input_value_id,hr_api.g_number)
568 <> nvl(pqh_cre_shd.g_old_rec.input_value_id,hr_api.g_number)
569 or not l_api_updating) then
570 --
571 -- check if input_value_id value exists in
572 -- PAY_INPUT_VALUES_F table
573 --
574 open c1;
575 --
576 fetch c1 into l_dummy;
577
578 if c1%notfound then
579 --
580 close c1;
581 --
582 -- raise error as FK does not relate to PK in PAY_INPUT_VALUES_F
583 -- table.
584 --
585 pqh_cre_shd.constraint_error('PQH_CRITERIA_RATE_ELEMENTS_FK5');
586 --
587 end if;
588 --
589 close c1;
590
591 --
592 --
593 end if;
594 --
595 hr_utility.set_location('Leaving:'||l_proc,90);
596 --
597 End chk_input_value_id;
598 --
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615 --
616 -- ----------------------------------------------------------------------------
617 -- |---------------------------< insert_validate >----------------------------|
618 -- ----------------------------------------------------------------------------
619 Procedure insert_validate
620 (p_rec in pqh_cre_shd.g_rec_type
621 ) is
622 --
623 l_proc varchar2(72) := g_package||'insert_validate';
624 --
625 Begin
626 hr_utility.set_location('Entering:'||l_proc, 5);
627 --
628 -- Call all supporting business operations
629 --
630 --
631 chk_startup_action(true
632 ,p_rec.business_group_id
633 ,p_rec.legislation_code
634 );
635 IF hr_startup_data_api_support.g_startup_mode
636 NOT IN ('GENERIC','STARTUP') THEN
637 --
638 -- Validate Important Attributes
639 --
640 hr_api.validate_bus_grp_id
641 (p_business_group_id => p_rec.business_group_id
642 ,p_associated_column1 => pqh_cre_shd.g_tab_nam
643 || '.BUSINESS_GROUP_ID');
644 --
645 -- after validating the set of important attributes,
646 -- if Multiple Message Detection is enabled and at least
647 -- one error has been found then abort further validation.
648 --
649 hr_multi_message.end_validation_set;
650 END IF;
651 --
652 --
653 -- Validate Dependent Attributes
654 --
655 --
656
657 chk_criteria_rate_defn_id
658 (
659 p_criteria_rate_element_id => p_rec.criteria_rate_element_id,
660 p_criteria_rate_defn_id => p_rec.criteria_rate_defn_id,
661 p_object_version_number => p_rec.object_version_number
662 );
663
664 chk_element_type_id
665 (p_criteria_rate_element_id => p_rec.criteria_rate_element_id,
666 p_element_type_id => p_rec.element_type_id,
667 p_object_version_number => p_rec.object_version_number);
668
669 chk_input_value_id
670 (p_criteria_rate_element_id => p_rec.criteria_rate_element_id,
671 p_input_value_id => p_rec.input_value_id,
672 p_object_version_number => p_rec.object_version_number);
673
674 IF p_rec.business_group_id IS NOT NULL THEN
675 chk_business_group_id
676 (p_criteria_rate_element_id => p_rec.criteria_rate_element_id,
677 p_business_group_id => p_rec.business_group_id,
678 p_object_version_number => p_rec.object_version_number);
679 END IF;
680
681
682
683 hr_utility.set_location(' Leaving:'||l_proc, 10);
684 End insert_validate;
685 --
686 -- ----------------------------------------------------------------------------
687 -- |---------------------------< update_validate >----------------------------|
688 -- ----------------------------------------------------------------------------
689 Procedure update_validate
690 (p_rec in pqh_cre_shd.g_rec_type
691 ) is
692 --
693 l_proc varchar2(72) := g_package||'update_validate';
694 --
695 Begin
696 hr_utility.set_location('Entering:'||l_proc, 5);
697 --
698 -- Call all supporting business operations
699 --
700 --
701 chk_startup_action(false
702 ,p_rec.business_group_id
703 ,p_rec.legislation_code
704 );
705 IF hr_startup_data_api_support.g_startup_mode
706 NOT IN ('GENERIC','STARTUP') THEN
707 --
708 -- Validate Important Attributes
709 --
710 hr_api.validate_bus_grp_id
711 (p_business_group_id => p_rec.business_group_id
712 ,p_associated_column1 => pqh_cre_shd.g_tab_nam
713 || '.BUSINESS_GROUP_ID');
714 --
715 -- After validating the set of important attributes,
716 -- if Multiple Message Detection is enabled and at least
717 -- one error has been found then abort further validation.
718 --
719 hr_multi_message.end_validation_set;
720 END IF;
721 --
722 --
723 -- Validate Dependent Attributes
724 --
725
726 chk_criteria_rate_defn_id
727 (
728 p_criteria_rate_element_id => p_rec.criteria_rate_element_id,
729 p_criteria_rate_defn_id => p_rec.criteria_rate_defn_id,
730 p_object_version_number => p_rec.object_version_number
731 );
732
733 chk_element_type_id
734 (p_criteria_rate_element_id => p_rec.criteria_rate_element_id,
735 p_element_type_id => p_rec.element_type_id,
736 p_object_version_number => p_rec.object_version_number);
737
738 chk_input_value_id
739 (p_criteria_rate_element_id => p_rec.criteria_rate_element_id,
740 p_input_value_id => p_rec.input_value_id,
741 p_object_version_number => p_rec.object_version_number);
742
743 IF p_rec.business_group_id IS NOT NULL THEN
744 chk_business_group_id
745 (p_criteria_rate_element_id => p_rec.criteria_rate_element_id,
746 p_business_group_id => p_rec.business_group_id,
747 p_object_version_number => p_rec.object_version_number);
748 END IF;
749
750
751
752 chk_non_updateable_args
753 (p_rec => p_rec
754 );
755 --
756 --
757 hr_utility.set_location(' Leaving:'||l_proc, 10);
758 End update_validate;
759 --
760 -- ----------------------------------------------------------------------------
761 -- |---------------------------< delete_validate >----------------------------|
762 -- ----------------------------------------------------------------------------
763 Procedure delete_validate
764 (p_rec in pqh_cre_shd.g_rec_type
765 ) is
766 --
767 l_proc varchar2(72) := g_package||'delete_validate';
768 --
769 Begin
770 hr_utility.set_location('Entering:'||l_proc, 5);
771 --
772 --
773 chk_startup_action(false
774 ,pqh_cre_shd.g_old_rec.business_group_id
775 ,pqh_cre_shd.g_old_rec.legislation_code
776 );
777 IF hr_startup_data_api_support.g_startup_mode
778 NOT IN ('GENERIC','STARTUP') THEN
779 --
780 -- Validate Important Attributes
781 --
782 --
783 -- After validating the set of important attributes,
784 -- if Multiple Message Detection is enabled and at least
785 -- one error has been found then abort further validation.
786 --
787 hr_multi_message.end_validation_set;
788 END IF;
789 --
790 -- Call all supporting business operations
791 --
792 hr_utility.set_location(' Leaving:'||l_proc, 10);
793 End delete_validate;
794 --
795 end pqh_cre_bus;