[Home] [Help]
PACKAGE BODY: APPS.PQH_BUDGET_POOLS_API
Source
1 Package Body pqh_budget_pools_api as
2 /* $Header: pqbplapi.pkb 115.7 2003/03/03 12:16:00 ggnanagu noship $ */
3 --
4 -- Package Variables
5 --
6 g_package varchar2(33) := ' pqh_budget_pools_api.';
7 --
8 -- ----------------------------------------------------------------------------
9 -- |------------------------< create_reallocation_folder >----------------------|
10 -- ----------------------------------------------------------------------------
11 --
12 procedure create_reallocation_folder
13 (
14 p_validate in boolean
15 ,p_effective_date in date
16 ,p_folder_id out nocopy number
17 ,p_name in varchar2
18 ,p_budget_version_id in number
19 ,p_budget_unit_id in number
20 ,p_entity_type in varchar2
21 ,p_approval_status in varchar2
22 ,p_object_version_number out nocopy number
23 ,p_business_group_id in number
24 ,p_wf_transaction_category_id in number
25
26 ) is
27 --
28 -- Declare cursors and local variables
29 --
30 l_folder_id pqh_budget_pools.pool_id%TYPE;
31 l_proc varchar2(72) := g_package||'create_reallocation_folder';
32 l_object_version_number pqh_budget_pools.object_version_number%TYPE;
33 --
34 begin
35 --
36 hr_utility.set_location('Entering:'|| l_proc, 10);
37 --
38 -- Issue a savepoint if operating in validation only mode
39 --
40 savepoint create_reallocation_folder;
41 --
42 --
43 -- Check for Mandatory Arguments before calling the row handler
44 If p_budget_version_id IS NULL THEN
45 hr_api.mandatory_arg_error(p_api_name => l_proc,
46 p_argument => 'budget version id',
47 p_argument_value => p_budget_version_id);
48 End If;
49 If p_budget_unit_id IS NULL THEN
50 hr_api.mandatory_arg_error(p_api_name => l_proc,
51 p_argument => 'budget unit id',
52 p_argument_value => p_budget_unit_id);
53 End If;
54 If p_entity_type IS NULL THEN
55 hr_api.mandatory_arg_error(p_api_name => l_proc,
56 p_argument => 'entity type',
57 p_argument_value => p_entity_type);
58 End If;
59 If p_approval_status IS NULL THEN
60 hr_api.mandatory_arg_error(p_api_name => l_proc,
61 p_argument => 'approval status',
62 p_argument_value => p_approval_status);
63 End If;
64
65 hr_utility.set_location(l_proc, 20);
66 --
67 -- Process Logic
68 --
69 begin
70 --
71 -- Start of API User Hook for the before hook of create_reallocation_folder
72 --
73 pqh_budget_pools_bk1.create_reallocation_folder_b
74 (
75 p_name => p_name
76 ,p_budget_version_id => p_budget_version_id
77 ,p_budget_unit_id => p_budget_unit_id
78 ,p_entity_type => p_entity_type
79 ,p_effective_date => trunc(p_effective_date)
80 ,p_business_group_id => p_business_group_id
81 ,p_approval_status => p_approval_status
82 ,p_wf_transaction_category_id => p_wf_transaction_category_id
83 );
84 exception
85 when hr_api.cannot_find_prog_unit then
86 hr_api.cannot_find_prog_unit_error
87 (
88 p_module_name => 'CREATE_REALLOCATION_FOLDER'
89 ,p_hook_type => 'BP'
90 );
91 --
92 -- End of API User Hook for the before hook of create_reallocation_folder
93 --
94 end;
95 --
96 pqh_bpl_ins.ins
97 (
98 p_pool_id => l_folder_id
99 ,p_name => p_name
100 ,p_budget_version_id => p_budget_version_id
101 ,p_budget_unit_id => p_budget_unit_id
102 ,p_entity_type => p_entity_type
103 ,p_approval_status => p_approval_status
104 ,p_object_version_number => l_object_version_number
105 ,p_effective_date => trunc(p_effective_date)
106 ,p_business_group_id => p_business_group_id
107 ,p_wf_transaction_category_id => p_wf_transaction_category_id
108 );
109 --
110 begin
111 --
112 -- Start of API User Hook for the after hook of create_reallocation_folder
113 --
114 pqh_budget_pools_bk1.create_reallocation_folder_a
115 (
116 p_folder_id => l_folder_id
117 ,p_name => p_name
118 ,p_budget_version_id => p_budget_version_id
119 ,p_budget_unit_id => p_budget_unit_id
120 ,p_entity_type => p_entity_type
121 ,p_approval_status => p_approval_status
122 ,p_object_version_number => l_object_version_number
123 ,p_effective_date => trunc(p_effective_date)
124 ,p_business_group_id => p_business_group_id
125 ,p_wf_transaction_category_id => p_wf_transaction_category_id
126 );
127 exception
128 when hr_api.cannot_find_prog_unit then
129 hr_api.cannot_find_prog_unit_error
130 (p_module_name => 'CREATE_REALLOCATION_FOLDER'
131 ,p_hook_type => 'AP'
132 );
133 --
134 -- End of API User Hook for the after hook of create_reallocation_folder
135 --
136 end;
137 --
138 hr_utility.set_location(l_proc, 60);
139 --
140 -- When in validation only mode raise the Validate_Enabled exception
141 --
142 if p_validate then
143 raise hr_api.validate_enabled;
144 end if;
145 --
146 -- Set all output arguments
147 --
148 p_folder_id := l_folder_id;
149 p_object_version_number := l_object_version_number;
150 --
151 hr_utility.set_location(' Leaving:'||l_proc, 70);
152 --
153 exception
154 --
155 when hr_api.validate_enabled then
156 --
157 -- As the Validate_Enabled exception has been raised
158 -- we must rollback to the savepoint
159 --
160 ROLLBACK TO create_reallocation_folder;
161 --
162 -- Only set output warning arguments
163 -- (Any key or derived arguments must be set to null
164 -- when validation only mode is being used.)
165 --
166 p_folder_id := null;
167 p_object_version_number := null;
168 hr_utility.set_location(' Leaving:'||l_proc, 80);
169 --
170 when others then
171 --
172 -- A validation or unexpected error has occured
173 --
174 ROLLBACK TO create_reallocation_folder;
175 raise;
176 --
177 end create_reallocation_folder;
178 -- ----------------------------------------------------------------------------
179 -- |------------------------< update_reallocation_folder >--- ------------------|
180 -- ----------------------------------------------------------------------------
181 --
182 procedure update_reallocation_folder
183 (
184 p_validate in boolean
185 ,p_effective_date in date
186 ,p_folder_id in number
187 ,p_name in varchar2
188 ,p_budget_version_id in number
189 ,p_budget_unit_id in number
190 ,p_entity_type in varchar2
191 ,p_approval_status in varchar2
192 ,p_object_version_number in out nocopy number
193 ,p_business_group_id in number
194 ,p_wf_transaction_category_id in number
195 ) is
196 --
197 -- Declare cursors and local variables
198 --
199 l_proc varchar2(72) := g_package||'update_reallocation_folder';
200 l_object_version_number pqh_budget_pools.object_version_number%TYPE;
201 --
202 begin
203 --
204 hr_utility.set_location('Entering:'|| l_proc, 10);
205 --
206 -- Issue a savepoint if operating in validation only mode
207 --
208 savepoint update_reallocation_folder;
209 --
210 hr_utility.set_location(l_proc, 20);
211 --
212 -- Process Logic
213 --
214 l_object_version_number := p_object_version_number;
215 --
216 begin
217 --
218 -- Start of API User Hook for the before hook of update_reallocation_folder
219 --
220 pqh_budget_pools_bk2.update_reallocation_folder_b
221 (
222 p_folder_id => p_folder_id
223 ,p_name => p_name
224 ,p_budget_version_id => p_budget_version_id
225 ,p_budget_unit_id => p_budget_unit_id
226 ,p_entity_type => p_entity_type
227 ,p_approval_status => p_approval_status
228 ,p_object_version_number => p_object_version_number
229 ,p_effective_date => trunc(p_effective_date)
230 ,p_business_group_id => p_business_group_id
231 ,p_wf_transaction_category_id => p_wf_transaction_category_id
232 );
233 exception
234 when hr_api.cannot_find_prog_unit then
235 hr_api.cannot_find_prog_unit_error
236 (p_module_name => 'UPDATE_REALLOCATION_FOLDER'
237 ,p_hook_type => 'BP'
238 );
239 --
240 -- End of API User Hook for the before hook of update_reallocation_folder
241 --
242 end;
243 --
244 pqh_bpl_upd.upd
245 (
246 p_pool_id => p_folder_id
247 ,p_name => p_name
248 ,p_budget_version_id => p_budget_version_id
249 ,p_budget_unit_id => p_budget_unit_id
250 ,p_approval_status => p_approval_status
251 ,p_entity_type => p_entity_type
252 ,p_object_version_number => l_object_version_number
253 ,p_effective_date => trunc(p_effective_date)
254 ,p_business_group_id => p_business_group_id
255 ,p_wf_transaction_category_id => p_wf_transaction_category_id
256 );
257 --
258 begin
259 --
260 -- Start of API User Hook for the after hook of update_reallocation_folder
261 --
262 pqh_budget_pools_bk2.update_reallocation_folder_a
263 (
264 p_folder_id => p_folder_id
265 ,p_name => p_name
266 ,p_budget_version_id => p_budget_version_id
267 ,p_budget_unit_id => p_budget_unit_id
268 ,p_approval_status => p_approval_status
269 ,p_entity_type => p_entity_type
270 ,p_object_version_number => l_object_version_number
271 ,p_effective_date => trunc(p_effective_date)
272 ,p_business_group_id => p_business_group_id
273 ,p_wf_transaction_category_id => p_wf_transaction_category_id
274 );
275 exception
276 when hr_api.cannot_find_prog_unit then
277 hr_api.cannot_find_prog_unit_error
278 (p_module_name => 'UPDATE_REALLOCATION_FOLDER'
279 ,p_hook_type => 'AP'
280 );
281 --
282 -- End of API User Hook for the after hook of update_reallocation_folder
283 --
284 end;
285 --
286 hr_utility.set_location(l_proc, 60);
287 --
288 -- When in validation only mode raise the Validate_Enabled exception
289 --
290 if p_validate then
291 raise hr_api.validate_enabled;
292 end if;
293 --
294 -- Set all output arguments
295 --
296 p_object_version_number := l_object_version_number;
297 --
298 hr_utility.set_location(' Leaving:'||l_proc, 70);
299 --
300 exception
301 --
302 when hr_api.validate_enabled then
303 --
304 -- As the Validate_Enabled exception has been raised
305 -- we must rollback to the savepoint
306 --
307 ROLLBACK TO update_reallocation_flolder;
308 --
309 -- Only set output warning arguments
310 -- (Any key or derived arguments must be set to null
311 -- when validation only mode is being used.)
312 --
313 hr_utility.set_location(' Leaving:'||l_proc, 80);
314 --
315 when others then
316 --
317 -- A validation or unexpected error has occured
318 --
319 ROLLBACK TO update_reallocation_folder;
320 raise;
321 --
322 end update_reallocation_folder;
323 -- ----------------------------------------------------------------------------
324 -- |------------------------< delete_reallocation_folder >----------------------|
325 -- ----------------------------------------------------------------------------
326 --
327 procedure delete_reallocation_folder
328 (p_validate in boolean
329 ,p_folder_id in number
330 ,p_object_version_number in number
331 ,p_effective_date in date
332 ) is
333 --
334 -- Declare cursors and local variables
335 --
336 l_proc varchar2(72) := g_package||'delete_reallocation_folder';
337 l_object_version_number pqh_budget_pools.object_version_number%TYPE;
338 --
339 begin
340 --
341 hr_utility.set_location('Entering:'|| l_proc, 10);
342 --
343 -- Issue a savepoint if operating in validation only mode
344 --
345 savepoint delete_reallocation_folder;
346 --
347 hr_utility.set_location(l_proc, 20);
348 --
349 -- Process Logic
350 --
351 l_object_version_number := p_object_version_number;
352 --
353 --
354 begin
355 --
356 -- Start of API User Hook for the before hook of delete_reallocation_folder
357 --
358 pqh_budget_pools_bk3.delete_reallocation_folder_b
359 (
360 p_folder_id => p_folder_id
361 ,p_object_version_number => p_object_version_number
362 ,p_effective_date => trunc(p_effective_date)
363 );
364 exception
365 when hr_api.cannot_find_prog_unit then
366 hr_api.cannot_find_prog_unit_error
367 (p_module_name => 'DELETE_REALLOCATION_FOLDER'
368 ,p_hook_type => 'BP'
369 );
370 --
371 -- End of API User Hook for the before hook of delete_reallocation_folder
372 --
373 end;
374 --
375 pqh_bpl_del.del
376 (
377 p_pool_id => p_folder_id
378 ,p_object_version_number => l_object_version_number
379 );
380 --
381 begin
382 --
383 -- Start of API User Hook for the after hook of delete_reallocation_folder
384 --
385 pqh_budget_pools_bk3.delete_reallocation_folder_a
386 (
387 p_folder_id => p_folder_id
388 ,p_object_version_number => l_object_version_number
389 ,p_effective_date => trunc(p_effective_date)
390 );
391 exception
392 when hr_api.cannot_find_prog_unit then
393 hr_api.cannot_find_prog_unit_error
394 (p_module_name => 'DELETE_REALLOCATION_FOLDER'
395 ,p_hook_type => 'AP'
396 );
397 --
398 -- End of API User Hook for the after hook of delete_reallocation_folder
399 --
400 end;
401 --
402 hr_utility.set_location(l_proc, 60);
403 --
404 -- When in validation only mode raise the Validate_Enabled exception
405 --
406 if p_validate then
407 raise hr_api.validate_enabled;
408 end if;
409 --
410 hr_utility.set_location(' Leaving:'||l_proc, 70);
411 --
412 exception
413 --
414 when hr_api.validate_enabled then
415 --
416 -- As the Validate_Enabled exception has been raised
417 -- we must rollback to the savepoint
418 --
419 ROLLBACK TO delete_reallocation_folder;
420 --
421 -- Only set output warning arguments
422 -- (Any key or derived arguments must be set to null
423 -- when validation only mode is being used.)
424 --
425 --
426 when others then
427 --
428 -- A validation or unexpected error has occured
429 --
430 ROLLBACK TO delete_reallocation_folder;
431 raise;
432 --
433 end delete_reallocation_folder;
434 --
435 --
436 --
437 -- ----------------------------------------------------------------------------
438 -- |------------------------< create_reallocation_txn >----------------------|
439 -- ----------------------------------------------------------------------------
440 --
441 procedure create_reallocation_txn
442 (
443 p_validate in boolean
444 ,p_effective_date in date
445 ,p_transaction_id out nocopy number
446 ,p_name in varchar2
447 ,p_parent_folder_id in number
448 ,p_object_version_number out nocopy number
449 ,p_business_group_id in number
450 ) is
451 --
452 -- Declare cursors and local variables
453 --
454 l_transaction_id pqh_budget_pools.pool_id%TYPE;
455 l_proc varchar2(72) := g_package||'create_reallocation_txn';
456 l_object_version_number pqh_budget_pools.object_version_number%TYPE;
457 --
458 begin
459 --
460 hr_utility.set_location('Entering:'|| l_proc, 10);
461 --
462 -- Issue a savepoint if operating in validation only mode
463 --
464 savepoint create_reallocation_txn;
465 --
466 --
467 -- Check for Mandatory Arguments before calling the row handler
468 If p_parent_folder_id IS NULL THEN
469 hr_api.mandatory_arg_error(p_api_name => l_proc,
470 p_argument => 'parent folder id',
471 p_argument_value => p_parent_folder_id);
472 End If;
473 hr_utility.set_location(l_proc, 20);
474 --
475 -- Process Logic
476 --
477 begin
478 --
479 -- Start of API User Hook for the before hook of create_reallocation_txn
480 --
481 pqh_budget_pools_bk4.create_reallocation_txn_b
482 (
483 p_name => p_name
484 ,p_parent_folder_id => p_parent_folder_id
485 ,p_effective_date => trunc(p_effective_date)
486 ,p_business_group_id => p_business_group_id
487 );
488 exception
489 when hr_api.cannot_find_prog_unit then
490 hr_api.cannot_find_prog_unit_error
491 (
492 p_module_name => 'CREATE_REALLOCATION_TXN'
493 ,p_hook_type => 'BP'
494 );
495 --
496 -- End of API User Hook for the before hook of create_reallocation_txn
497 --
498 end;
499 --
500 pqh_bpl_ins.ins
501 (
502 p_pool_id => l_transaction_id
503 ,p_name => p_name
504 ,p_parent_pool_id => p_parent_folder_id
505 ,p_object_version_number => l_object_version_number
506 ,p_effective_date => trunc(p_effective_date)
507 ,p_business_group_id => p_business_group_id
508 );
509 --
510 begin
511 --
512 -- Start of API User Hook for the after hook of create_reallocation_txn
513 --
514 pqh_budget_pools_bk4.create_reallocation_txn_a
515 (
516 p_transaction_id => l_transaction_id
517 ,p_name => p_name
518 ,p_parent_folder_id => p_parent_folder_id
519 ,p_object_version_number => l_object_version_number
520 ,p_effective_date => trunc(p_effective_date)
521 ,p_business_group_id => p_business_group_id
522 );
523 exception
524 when hr_api.cannot_find_prog_unit then
525 hr_api.cannot_find_prog_unit_error
526 (p_module_name => 'CREATE_REALLOCATION_TXN'
527 ,p_hook_type => 'AP'
528 );
529 --
530 -- End of API User Hook for the after hook of create_reallocation_txn
531 --
532 end;
533 --
534 hr_utility.set_location(l_proc, 60);
535 --
536 -- When in validation only mode raise the Validate_Enabled exception
537 --
538 if p_validate then
539 raise hr_api.validate_enabled;
540 end if;
541 --
542 -- Set all output arguments
543 --
544 p_transaction_id := l_transaction_id;
545 p_object_version_number := l_object_version_number;
546 --
547 hr_utility.set_location(' Leaving:'||l_proc, 70);
548 --
549 exception
550 --
551 when hr_api.validate_enabled then
552 --
553 -- As the Validate_Enabled exception has been raised
554 -- we must rollback to the savepoint
555 --
556 ROLLBACK TO create_reallocation_txn;
557 --
558 -- Only set output warning arguments
559 -- (Any key or derived arguments must be set to null
560 -- when validation only mode is being used.)
561 --
562 p_transaction_id := null;
563 p_object_version_number := null;
564 hr_utility.set_location(' Leaving:'||l_proc, 80);
565 --
566 when others then
567 --
568 -- A validation or unexpected error has occured
569 --
570 p_transaction_id := null;
571 p_object_version_number := null;
572 ROLLBACK TO create_reallocation_txn;
573 raise;
574 --
575 end create_reallocation_txn;
576 -- ----------------------------------------------------------------------------
577 -- |------------------------< update_reallocation_txn >--- ------------------|
578 -- ----------------------------------------------------------------------------
579 --
580 procedure update_reallocation_txn
581 (
582 p_validate in boolean
583 ,p_effective_date in date
584 ,p_transaction_id in number
585 ,p_name in varchar2
586 ,p_parent_folder_id in number
587 ,p_object_version_number in out nocopy number
588 ,p_business_group_id in number
589 ) is
590 --
591 -- Declare cursors and local variables
592 --
593 l_proc varchar2(72) := g_package||'update_reallocation_txn';
594 l_object_version_number pqh_budget_pools.object_version_number%TYPE;
595 --
596 begin
597 --
598 hr_utility.set_location('Entering:'|| l_proc, 10);
599 --
600 -- Issue a savepoint if operating in validation only mode
601 --
602 savepoint update_reallocation_txn;
603 --
604 hr_utility.set_location(l_proc, 20);
605 --
606 -- Process Logic
607 --
608 l_object_version_number := p_object_version_number;
609 --
610 begin
611 --
612 -- Start of API User Hook for the before hook of update_reallocation_txn
613 --
614 pqh_budget_pools_bk5.update_reallocation_txn_b
615 (
616 p_transaction_id => p_transaction_id
617 ,p_name => p_name
618 ,p_parent_folder_id => p_parent_folder_id
619 ,p_object_version_number => p_object_version_number
620 ,p_effective_date => trunc(p_effective_date)
621 ,p_business_group_id => p_business_group_id
622 );
623 exception
624 when hr_api.cannot_find_prog_unit then
625 hr_api.cannot_find_prog_unit_error
626 (p_module_name => 'UPDATE_REALLOCATION_TXN'
627 ,p_hook_type => 'BP'
628 );
629 --
630 -- End of API User Hook for the before hook of update_reallocation_txn
631 --
632 end;
633 --
634 pqh_bpl_upd.upd
635 (
636 p_pool_id => p_transaction_id
637 ,p_name => p_name
638 ,p_parent_pool_id => p_parent_folder_id
639 ,p_object_version_number => l_object_version_number
640 ,p_effective_date => trunc(p_effective_date)
641 ,p_business_group_id => p_business_group_id
642 );
643 --
644 begin
645 --
646 -- Start of API User Hook for the after hook of update_reallocation_txn
647 --
648 pqh_budget_pools_bk5.update_reallocation_txn_a
649 (
650 p_transaction_id => p_transaction_id
651 ,p_name => p_name
652 ,p_parent_folder_id => p_parent_folder_id
653 ,p_object_version_number => p_object_version_number
654 ,p_effective_date => trunc(p_effective_date)
655 ,p_business_group_id => p_business_group_id
656 );
657 exception
658 when hr_api.cannot_find_prog_unit then
659 hr_api.cannot_find_prog_unit_error
660 (p_module_name => 'UPDATE_REALLOCATION_TXN'
661 ,p_hook_type => 'AP'
662 );
663 --
664 -- End of API User Hook for the after hook of update_reallocation_txn
665 --
666 end;
667 --
668 hr_utility.set_location(l_proc, 60);
669 --
670 -- When in validation only mode raise the Validate_Enabled exception
671 --
672 if p_validate then
673 raise hr_api.validate_enabled;
674 end if;
675 --
676 -- Set all output arguments
677 --
678 p_object_version_number := l_object_version_number;
679 --
680 hr_utility.set_location(' Leaving:'||l_proc, 70);
681 --
682 exception
683 --
684 when hr_api.validate_enabled then
685 --
686 -- As the Validate_Enabled exception has been raised
687 -- we must rollback to the savepoint
688 --
689 ROLLBACK TO update_reallocation_txn;
690 --
691 -- Only set output warning arguments
692 -- (Any key or derived arguments must be set to null
693 -- when validation only mode is being used.)
694 --
695 hr_utility.set_location(' Leaving:'||l_proc, 80);
696 --
697 when others then
698 --
699 -- A validation or unexpected error has occured
700 --
701 ROLLBACK TO update_reallocation_txn;
702 raise;
703 --
704 end update_reallocation_txn;
705 -- ----------------------------------------------------------------------------
706 -- |------------------------< delete_reallocation_txn >----------------------|
707 -- ----------------------------------------------------------------------------
708 --
709 procedure delete_reallocation_txn
710 (p_validate in boolean
711 ,p_transaction_id in number
712 ,p_object_version_number in number
713 ,p_effective_date in date
714 ) is
715 --
716 -- Declare cursors and local variables
717 --
718 l_proc varchar2(72) := g_package||'delete_reallocation_txn';
719 l_object_version_number pqh_budget_pools.object_version_number%TYPE;
720 --
721 begin
722 --
723 hr_utility.set_location('Entering:'|| l_proc, 10);
724 --
725 -- Issue a savepoint if operating in validation only mode
726 --
727 savepoint delete_reallocation_txn;
728 --
729 hr_utility.set_location(l_proc, 20);
730 --
731 -- Process Logic
732 --
733 l_object_version_number := p_object_version_number;
734 --
735 --
736 begin
737 --
738 -- Start of API User Hook for the before hook of delete_reallocation_txn
739 --
740 pqh_budget_pools_bk6.delete_reallocation_txn_b
741 (
742 p_transaction_id => p_transaction_id
743 ,p_object_version_number => p_object_version_number
744 ,p_effective_date => trunc(p_effective_date)
745 );
746 exception
747 when hr_api.cannot_find_prog_unit then
748 hr_api.cannot_find_prog_unit_error
749 (p_module_name => 'DELETE_REALLOCATION_TXN'
750 ,p_hook_type => 'BP'
751 );
752 --
753 -- End of API User Hook for the before hook of delete_reallocation_txn
754 --
755 end;
756 --
757 pqh_bpl_del.del
758 (
759 p_pool_id => p_transaction_id
760 ,p_object_version_number => l_object_version_number
761 );
762 --
763 begin
764 --
765 -- Start of API User Hook for the after hook of delete_reallocation_txn
766 --
767 pqh_budget_pools_bk6.delete_reallocation_txn_a
768 (
769 p_transaction_id => p_transaction_id
770 ,p_object_version_number => l_object_version_number
771 ,p_effective_date => trunc(p_effective_date)
772 );
773 exception
774 when hr_api.cannot_find_prog_unit then
775 hr_api.cannot_find_prog_unit_error
776 (p_module_name => 'DELETE_REALLOCATION_TXN'
777 ,p_hook_type => 'AP'
778 );
779 --
780 -- End of API User Hook for the after hook of delete_reallocation_txn
781 --
782 end;
783 --
784 hr_utility.set_location(l_proc, 60);
785 --
786 -- When in validation only mode raise the Validate_Enabled exception
787 --
788 if p_validate then
789 raise hr_api.validate_enabled;
790 end if;
791 --
792 hr_utility.set_location(' Leaving:'||l_proc, 70);
793 --
794 exception
795 --
796 when hr_api.validate_enabled then
797 --
798 -- As the Validate_Enabled exception has been raised
799 -- we must rollback to the savepoint
800 --
801 ROLLBACK TO delete_reallocation_txn;
802 --
803 -- Only set output warning arguments
804 -- (Any key or derived arguments must be set to null
805 -- when validation only mode is being used.)
806 --
807 --
808 when others then
809 --
810 -- A validation or unexpected error has occured
811 --
812 ROLLBACK TO delete_reallocation_txn;
813 raise;
814 --
815 end delete_reallocation_txn;
816 --
817 --
818
819 end pqh_budget_pools_api;