[Home] [Help]
PACKAGE BODY: APPS.HXC_TIME_ENTRY_RULE_API
Source
1 Package Body hxc_time_entry_rule_api as
2 /* $Header: hxcterapi.pkb 120.2 2005/09/23 09:07:21 nissharm noship $ */
3 --
4 -- Package Variables
5 --
6 g_package varchar2(33) := ' hxc_time_entry_rule_api.';
7
8 g_debug boolean := hr_utility.debug_enabled;
9 --
10 -- ----------------------------------------------------------------------------
11 -- |------------------------< create_time_entry_rule>----------------------|
12 -- ----------------------------------------------------------------------------
13 --
14 procedure create_time_entry_rule
15 (p_validate in boolean default false
16 ,p_time_entry_rule_id in out nocopy number
17 ,p_object_version_number in out nocopy number
18 ,p_name in varchar2
19 ,p_business_group_id in number default null
20 ,p_legislation_code in varchar2 default null
21 ,p_rule_usage in varchar2
22 ,p_start_date in date
23 ,p_mapping_id in number default null
24 ,p_formula_id in number default null
25 ,p_description in varchar2 default null
26 ,p_end_date in date default null
27 ,p_effective_date in date
28 ,p_attribute_category in varchar2 default null
29 ,p_attribute1 in varchar2 default null
30 ,p_attribute2 in varchar2 default null
31 ,p_attribute3 in varchar2 default null
32 ,p_attribute4 in varchar2 default null
33 ,p_attribute5 in varchar2 default null
34 ,p_attribute6 in varchar2 default null
35 ,p_attribute7 in varchar2 default null
36 ,p_attribute8 in varchar2 default null
37 ,p_attribute9 in varchar2 default null
38 ,p_attribute10 in varchar2 default null
39 ,p_attribute11 in varchar2 default null
40 ,p_attribute12 in varchar2 default null
41 ,p_attribute13 in varchar2 default null
42 ,p_attribute14 in varchar2 default null
43 ,p_attribute15 in varchar2 default null
44 ,p_attribute16 in varchar2 default null
45 ,p_attribute17 in varchar2 default null
46 ,p_attribute18 in varchar2 default null
47 ,p_attribute19 in varchar2 default null
48 ,p_attribute20 in varchar2 default null
49 ,p_attribute21 in varchar2 default null
50 ,p_attribute22 in varchar2 default null
51 ,p_attribute23 in varchar2 default null
52 ,p_attribute24 in varchar2 default null
53 ,p_attribute25 in varchar2 default null
54 ,p_attribute26 in varchar2 default null
55 ,p_attribute27 in varchar2 default null
56 ,p_attribute28 in varchar2 default null
57 ,p_attribute29 in varchar2 default null
58 ,p_attribute30 in varchar2 default null
59 ) is
60 --
61 -- Declare cursors and local variables
62 --
63 l_proc varchar2(72);
64 l_object_version_number hxc_time_entry_rules.object_version_number%TYPE;
65 l_time_entry_rule_id hxc_time_entry_rules.time_entry_rule_id%TYPE;
66 --
67 begin
68
69 g_debug := hr_utility.debug_enabled;
70 --
71
72 --
73 if g_debug then
74 l_proc := g_package||' create_time_entry_rule';
75 hr_utility.set_location('Entering:'|| l_proc, 10);
76 end if;
77 --
78 -- Issue a savepoint if operating in validation only mode
79 --
80 savepoint create_time_entry_rule;
81 --
82 if g_debug then
83 hr_utility.set_location(l_proc, 20);
84 end if;
85 --
86 -- Call Before Process User Hook
87 --
88 begin
89 hxc_time_entry_rule_BK_1.create_time_entry_rule_b
90 (p_time_entry_rule_id => p_time_entry_rule_id
91 ,p_object_version_number => p_object_version_number
92 ,p_name => p_name
93 ,p_business_group_id => p_business_group_id
94 ,p_legislation_code => p_legislation_code
95 ,p_rule_usage => p_rule_usage
96 ,p_start_date => p_start_date
97 ,p_mapping_id => p_mapping_id
98 ,p_formula_id => p_formula_id
99 ,p_description => p_description
100 ,p_end_date => p_end_date
101 ,p_effective_date => p_effective_date
102 ,p_attribute_category => p_attribute_category
103 ,p_attribute1 => p_attribute1
104 ,p_attribute2 => p_attribute2
105 ,p_attribute3 => p_attribute3
106 ,p_attribute4 => p_attribute4
107 ,p_attribute5 => p_attribute5
108 ,p_attribute6 => p_attribute6
109 ,p_attribute7 => p_attribute7
110 ,p_attribute8 => p_attribute8
111 ,p_attribute9 => p_attribute9
112 ,p_attribute10 => p_attribute10
113 ,p_attribute11 => p_attribute11
114 ,p_attribute12 => p_attribute12
115 ,p_attribute13 => p_attribute13
116 ,p_attribute14 => p_attribute14
117 ,p_attribute15 => p_attribute15
118 ,p_attribute16 => p_attribute16
119 ,p_attribute17 => p_attribute17
120 ,p_attribute18 => p_attribute18
121 ,p_attribute19 => p_attribute19
122 ,p_attribute20 => p_attribute20
123 ,p_attribute21 => p_attribute21
124 ,p_attribute22 => p_attribute22
125 ,p_attribute23 => p_attribute23
126 ,p_attribute24 => p_attribute24
127 ,p_attribute25 => p_attribute25
128 ,p_attribute26 => p_attribute26
129 ,p_attribute27 => p_attribute27
130 ,p_attribute28 => p_attribute28
131 ,p_attribute29 => p_attribute29
132 ,p_attribute30 => p_attribute30 );
133 exception
134 when hr_api.cannot_find_prog_unit then
135 hr_api.cannot_find_prog_unit_error
136 (p_module_name => 'create_time_entry_rule'
137 ,p_hook_type => 'BP'
138 );
139 end;
140 --
141 if g_debug then
142 hr_utility.set_location(l_proc, 30);
143 end if;
144 --
145 -- Process Logic
146 --
147 --
148 if g_debug then
149 hr_utility.set_location(l_proc, 40);
150 end if;
151 --
152 -- call row handler
153 --
154 hxc_ter_ins.ins (
155 p_effective_date => p_effective_date
156 ,p_name => p_name
157 ,p_business_group_id => p_business_group_id
158 ,p_legislation_code => p_legislation_code
159 ,p_rule_usage => p_rule_usage
160 ,p_start_date => p_start_date
161 ,p_mapping_id => p_mapping_id
162 ,p_formula_id => p_formula_id
163 ,p_description => p_description
164 ,p_end_date => p_end_date
165 ,p_attribute_category => p_attribute_category
166 ,p_attribute1 => p_attribute1
167 ,p_attribute2 => p_attribute2
168 ,p_attribute3 => p_attribute3
169 ,p_attribute4 => p_attribute4
170 ,p_attribute5 => p_attribute5
171 ,p_attribute6 => p_attribute6
172 ,p_attribute7 => p_attribute7
173 ,p_attribute8 => p_attribute8
174 ,p_attribute9 => p_attribute9
175 ,p_attribute10 => p_attribute10
176 ,p_attribute11 => p_attribute11
177 ,p_attribute12 => p_attribute12
178 ,p_attribute13 => p_attribute13
179 ,p_attribute14 => p_attribute14
180 ,p_attribute15 => p_attribute15
181 ,p_attribute16 => p_attribute16
182 ,p_attribute17 => p_attribute17
183 ,p_attribute18 => p_attribute18
184 ,p_attribute19 => p_attribute19
185 ,p_attribute20 => p_attribute20
186 ,p_attribute21 => p_attribute21
187 ,p_attribute22 => p_attribute22
188 ,p_attribute23 => p_attribute23
189 ,p_attribute24 => p_attribute24
190 ,p_attribute25 => p_attribute25
191 ,p_attribute26 => p_attribute26
192 ,p_attribute27 => p_attribute27
193 ,p_attribute28 => p_attribute28
194 ,p_attribute29 => p_attribute29
195 ,p_attribute30 => p_attribute30
196 ,p_time_entry_rule_id => l_time_entry_rule_id
197 ,p_object_version_number => l_object_version_number );
198 --
199 if g_debug then
200 hr_utility.set_location(l_proc, 50);
201 end if;
202 --
203 -- Call After Process User Hook
204 --
205 begin
206 hxc_time_entry_rule_BK_1.create_time_entry_rule_a
207 (p_time_entry_rule_id => l_time_entry_rule_id
208 ,p_object_version_number => l_object_version_number
209 ,p_name => p_name
210 ,p_business_group_id => p_business_group_id
211 ,p_legislation_code => p_legislation_code
212 ,p_rule_usage => p_rule_usage
213 ,p_start_date => p_start_date
214 ,p_mapping_id => p_mapping_id
215 ,p_formula_id => p_formula_id
216 ,p_description => p_description
217 ,p_end_date => p_end_date
218 ,p_effective_date => p_effective_date
219 ,p_attribute_category => p_attribute_category
220 ,p_attribute1 => p_attribute1
221 ,p_attribute2 => p_attribute2
222 ,p_attribute3 => p_attribute3
223 ,p_attribute4 => p_attribute4
224 ,p_attribute5 => p_attribute5
225 ,p_attribute6 => p_attribute6
226 ,p_attribute7 => p_attribute7
227 ,p_attribute8 => p_attribute8
228 ,p_attribute9 => p_attribute9
229 ,p_attribute10 => p_attribute10
230 ,p_attribute11 => p_attribute11
231 ,p_attribute12 => p_attribute12
232 ,p_attribute13 => p_attribute13
233 ,p_attribute14 => p_attribute14
234 ,p_attribute15 => p_attribute15
235 ,p_attribute16 => p_attribute16
236 ,p_attribute17 => p_attribute17
237 ,p_attribute18 => p_attribute18
238 ,p_attribute19 => p_attribute19
239 ,p_attribute20 => p_attribute20
240 ,p_attribute21 => p_attribute21
241 ,p_attribute22 => p_attribute22
242 ,p_attribute23 => p_attribute23
243 ,p_attribute24 => p_attribute24
244 ,p_attribute25 => p_attribute25
245 ,p_attribute26 => p_attribute26
246 ,p_attribute27 => p_attribute27
247 ,p_attribute28 => p_attribute28
248 ,p_attribute29 => p_attribute29
249 ,p_attribute30 => p_attribute30
250 );
251 exception
252 when hr_api.cannot_find_prog_unit then
253 hr_api.cannot_find_prog_unit_error
254 (p_module_name => 'create_time_entry_rule'
255 ,p_hook_type => 'AP'
256 );
257 end;
258 --
259 if g_debug then
260 hr_utility.set_location(l_proc, 60);
261 end if;
262 --
263 -- When in validation only mode raise the Validate_Enabled exception
264 --
265 if p_validate then
266 raise hr_api.validate_enabled;
267 end if;
268 --
269 if g_debug then
270 hr_utility.set_location(' Leaving:'||l_proc, 70);
271 end if;
272 --
273 -- Set all output arguments
274 --
275 p_time_entry_rule_id := l_time_entry_rule_id;
276 p_object_version_number := l_object_version_number;
277 --
278 exception
279 --
280 when hr_api.validate_enabled then
281 --
282 -- As the Validate_Enabled exception has been raised
283 -- we must rollback to the savepoint
284 --
285 ROLLBACK TO create_time_entry_rule;
286 --
287 -- Only set output warning arguments
288 -- (Any key or derived arguments must be set to null
289 -- when validation only mode is being used.)
290 --
291 p_time_entry_rule_id := null;
292 p_object_version_number := null;
293 --
294 if g_debug then
295 hr_utility.set_location(' Leaving:'||l_proc, 80);
296 end if;
297 --
298 when others then
299 --
300 -- A validation or unexpected error has occured
301 --
302 if g_debug then
303 hr_utility.trace('In exeception');
304 end if;
305 ROLLBACK TO create_time_entry_rule;
306 raise;
307 --
308 END create_time_entry_rule;
309 --
310 -- ----------------------------------------------------------------------------
311 -- |------------------------< update_time_entry_rule>----------------------|
312 -- ----------------------------------------------------------------------------
313 --
314 procedure update_time_entry_rule
315 (p_validate in boolean default false
316 ,p_time_entry_rule_id in number
317 ,p_object_version_number in out nocopy number
318 ,p_name in varchar2
319 ,p_business_group_id in number default hr_api.g_number
320 ,p_legislation_code in varchar2 default hr_api.g_varchar2
321 ,p_rule_usage in varchar2
322 ,p_start_date in date
323 ,p_mapping_id in number default hr_api.g_number
324 ,p_formula_id in number default hr_api.g_number
325 ,p_description in varchar2 default hr_api.g_varchar2
326 ,p_end_date in date default hr_api.g_date
327 ,p_effective_date in date default hr_api.g_date
328 ,p_attribute_category in varchar2 default hr_api.g_varchar2
329 ,p_attribute1 in varchar2 default hr_api.g_varchar2
330 ,p_attribute2 in varchar2 default hr_api.g_varchar2
331 ,p_attribute3 in varchar2 default hr_api.g_varchar2
332 ,p_attribute4 in varchar2 default hr_api.g_varchar2
333 ,p_attribute5 in varchar2 default hr_api.g_varchar2
334 ,p_attribute6 in varchar2 default hr_api.g_varchar2
335 ,p_attribute7 in varchar2 default hr_api.g_varchar2
336 ,p_attribute8 in varchar2 default hr_api.g_varchar2
337 ,p_attribute9 in varchar2 default hr_api.g_varchar2
338 ,p_attribute10 in varchar2 default hr_api.g_varchar2
339 ,p_attribute11 in varchar2 default hr_api.g_varchar2
340 ,p_attribute12 in varchar2 default hr_api.g_varchar2
341 ,p_attribute13 in varchar2 default hr_api.g_varchar2
342 ,p_attribute14 in varchar2 default hr_api.g_varchar2
343 ,p_attribute15 in varchar2 default hr_api.g_varchar2
344 ,p_attribute16 in varchar2 default hr_api.g_varchar2
345 ,p_attribute17 in varchar2 default hr_api.g_varchar2
346 ,p_attribute18 in varchar2 default hr_api.g_varchar2
347 ,p_attribute19 in varchar2 default hr_api.g_varchar2
348 ,p_attribute20 in varchar2 default hr_api.g_varchar2
349 ,p_attribute21 in varchar2 default hr_api.g_varchar2
350 ,p_attribute22 in varchar2 default hr_api.g_varchar2
351 ,p_attribute23 in varchar2 default hr_api.g_varchar2
352 ,p_attribute24 in varchar2 default hr_api.g_varchar2
353 ,p_attribute25 in varchar2 default hr_api.g_varchar2
354 ,p_attribute26 in varchar2 default hr_api.g_varchar2
355 ,p_attribute27 in varchar2 default hr_api.g_varchar2
356 ,p_attribute28 in varchar2 default hr_api.g_varchar2
357 ,p_attribute29 in varchar2 default hr_api.g_varchar2
358 ,p_attribute30 in varchar2 default hr_api.g_varchar2
359 ) is
360 --
361 -- Declare cursors and local variables
362 --
363 l_proc varchar2(72);
364 l_object_version_number hxc_time_entry_rules.object_version_number%TYPE := p_object_version_number;
365 --
366 begin
367
368 g_debug := hr_utility.debug_enabled;
369 --
370 if g_debug then
371 l_proc := g_package||' update_time_entry_rule';
372 hr_utility.set_location('Entering:'|| l_proc, 10);
373 end if;
374
375 --
376 -- Issue a savepoint if operating in validation only mode
377 --
378 savepoint update_time_entry_rule;
379 --
380 if g_debug then
381 hr_utility.set_location(l_proc, 20);
382 end if;
383 --
384 -- Call Before Process User Hook
385 --
386 begin
387 hxc_time_entry_rule_BK_2.update_time_entry_rule_b
388 (p_time_entry_rule_id => p_time_entry_rule_id
389 ,p_object_version_number => p_object_version_number
390 ,p_name => p_name
391 ,p_business_group_id => p_business_group_id
392 ,p_legislation_code => p_legislation_code
393 ,p_rule_usage => p_rule_usage
394 ,p_start_date => p_start_date
395 ,p_mapping_id => p_mapping_id
396 ,p_formula_id => p_formula_id
397 ,p_description => p_description
398 ,p_end_date => p_end_date
399 ,p_effective_date => p_effective_date
400 ,p_attribute_category => p_attribute_category
401 ,p_attribute1 => p_attribute1
402 ,p_attribute2 => p_attribute2
403 ,p_attribute3 => p_attribute3
404 ,p_attribute4 => p_attribute4
405 ,p_attribute5 => p_attribute5
406 ,p_attribute6 => p_attribute6
407 ,p_attribute7 => p_attribute7
408 ,p_attribute8 => p_attribute8
409 ,p_attribute9 => p_attribute9
410 ,p_attribute10 => p_attribute10
411 ,p_attribute11 => p_attribute11
412 ,p_attribute12 => p_attribute12
413 ,p_attribute13 => p_attribute13
414 ,p_attribute14 => p_attribute14
415 ,p_attribute15 => p_attribute15
416 ,p_attribute16 => p_attribute16
417 ,p_attribute17 => p_attribute17
418 ,p_attribute18 => p_attribute18
419 ,p_attribute19 => p_attribute19
420 ,p_attribute20 => p_attribute20
421 ,p_attribute21 => p_attribute21
422 ,p_attribute22 => p_attribute22
423 ,p_attribute23 => p_attribute23
424 ,p_attribute24 => p_attribute24
425 ,p_attribute25 => p_attribute25
426 ,p_attribute26 => p_attribute26
427 ,p_attribute27 => p_attribute27
428 ,p_attribute28 => p_attribute28
429 ,p_attribute29 => p_attribute29
430 ,p_attribute30 => p_attribute30
431 );
432 exception
433 when hr_api.cannot_find_prog_unit then
434 hr_api.cannot_find_prog_unit_error
435 (p_module_name => 'update_time_entry_rule'
436 ,p_hook_type => 'BP'
437 );
438 end;
439 --
440 if g_debug then
441 hr_utility.set_location(l_proc, 30);
442 end if;
443 --
444 -- Process Logic
445 --
446 -- call row handler
447 --
448 hxc_ter_upd.upd (
449 p_effective_date => p_effective_date
450 ,p_name => p_name
451 ,p_business_group_id => p_business_group_id
452 ,p_legislation_code => p_legislation_code
453 ,p_rule_usage => p_rule_usage
454 ,p_start_date => p_start_date
455 ,p_mapping_id => p_mapping_id
456 ,p_formula_id => p_formula_id
457 ,p_description => p_description
458 ,p_end_date => p_end_date
459 ,p_attribute_category => p_attribute_category
460 ,p_attribute1 => p_attribute1
461 ,p_attribute2 => p_attribute2
462 ,p_attribute3 => p_attribute3
463 ,p_attribute4 => p_attribute4
464 ,p_attribute5 => p_attribute5
465 ,p_attribute6 => p_attribute6
466 ,p_attribute7 => p_attribute7
467 ,p_attribute8 => p_attribute8
468 ,p_attribute9 => p_attribute9
469 ,p_attribute10 => p_attribute10
470 ,p_attribute11 => p_attribute11
471 ,p_attribute12 => p_attribute12
472 ,p_attribute13 => p_attribute13
473 ,p_attribute14 => p_attribute14
474 ,p_attribute15 => p_attribute15
475 ,p_attribute16 => p_attribute16
476 ,p_attribute17 => p_attribute17
477 ,p_attribute18 => p_attribute18
478 ,p_attribute19 => p_attribute19
479 ,p_attribute20 => p_attribute20
480 ,p_attribute21 => p_attribute21
481 ,p_attribute22 => p_attribute22
482 ,p_attribute23 => p_attribute23
483 ,p_attribute24 => p_attribute24
484 ,p_attribute25 => p_attribute25
485 ,p_attribute26 => p_attribute26
486 ,p_attribute27 => p_attribute27
487 ,p_attribute28 => p_attribute28
488 ,p_attribute29 => p_attribute29
489 ,p_attribute30 => p_attribute30
490 ,p_time_entry_rule_id => p_time_entry_rule_id
491 ,p_object_version_number => l_object_version_number );
492 --
493 --
494 if g_debug then
495 hr_utility.set_location(l_proc, 40);
496 end if;
497 --
498 -- Call After Process User Hook
499 --
500 begin
501 hxc_time_entry_rule_BK_2.update_time_entry_rule_a
502 (p_time_entry_rule_id => p_time_entry_rule_id
503 ,p_object_version_number => l_object_version_number
504 ,p_name => p_name
505 ,p_business_group_id => p_business_group_id
506 ,p_legislation_code => p_legislation_code
507 ,p_rule_usage => p_rule_usage
508 ,p_start_date => p_start_date
509 ,p_mapping_id => p_mapping_id
510 ,p_formula_id => p_formula_id
511 ,p_description => p_description
512 ,p_end_date => p_end_date
513 ,p_effective_date => p_effective_date
514 ,p_attribute_category => p_attribute_category
515 ,p_attribute1 => p_attribute1
516 ,p_attribute2 => p_attribute2
517 ,p_attribute3 => p_attribute3
518 ,p_attribute4 => p_attribute4
519 ,p_attribute5 => p_attribute5
520 ,p_attribute6 => p_attribute6
521 ,p_attribute7 => p_attribute7
522 ,p_attribute8 => p_attribute8
523 ,p_attribute9 => p_attribute9
524 ,p_attribute10 => p_attribute10
525 ,p_attribute11 => p_attribute11
526 ,p_attribute12 => p_attribute12
527 ,p_attribute13 => p_attribute13
528 ,p_attribute14 => p_attribute14
529 ,p_attribute15 => p_attribute15
530 ,p_attribute16 => p_attribute16
531 ,p_attribute17 => p_attribute17
532 ,p_attribute18 => p_attribute18
533 ,p_attribute19 => p_attribute19
534 ,p_attribute20 => p_attribute20
535 ,p_attribute21 => p_attribute21
536 ,p_attribute22 => p_attribute22
537 ,p_attribute23 => p_attribute23
538 ,p_attribute24 => p_attribute24
539 ,p_attribute25 => p_attribute25
540 ,p_attribute26 => p_attribute26
541 ,p_attribute27 => p_attribute27
542 ,p_attribute28 => p_attribute28
543 ,p_attribute29 => p_attribute29
544 ,p_attribute30 => p_attribute30
545 );
546 exception
547 when hr_api.cannot_find_prog_unit then
548 hr_api.cannot_find_prog_unit_error
549 (p_module_name => 'update_time_entry_rule'
550 ,p_hook_type => 'AP'
551 );
552 end;
553 --
554 if g_debug then
555 hr_utility.set_location(l_proc, 50);
556 end if;
557 --
558 -- When in validation only mode raise the Validate_Enabled exception
559 --
560 if p_validate then
561 raise hr_api.validate_enabled;
562 end if;
563 --
564 if g_debug then
565 hr_utility.set_location(' Leaving:'||l_proc, 60);
566 end if;
567 --
568 -- Set all output arguments
569 --
570 p_object_version_number := l_object_version_number;
571 --
572 exception
573 --
574 when hr_api.validate_enabled then
575 --
576 -- As the Validate_Enabled exception has been raised
577 -- we must rollback to the savepoint
578 --
579 ROLLBACK TO update_time_entry_rule;
580 --
581 -- Only set output warning arguments
582 -- (Any key or derived arguments must be set to null
583 -- when validation only mode is being used.)
584 --
585 p_object_version_number := null;
586 --
587 if g_debug then
588 hr_utility.set_location(' Leaving:'||l_proc, 60);
589 end if;
590 --
591 when others then
592 --
593 -- A validation or unexpected error has occured
594 --
595 if g_debug then
596 hr_utility.trace('In exeception');
597 end if;
598 ROLLBACK TO update_time_entry_rule;
599 raise;
600 --
601 END update_time_entry_rule;
602 --
603 -- ----------------------------------------------------------------------------
604 -- |------------------------< delete_time_entry_rule >---------------------|
605 -- ----------------------------------------------------------------------------
606 --
607 procedure delete_time_entry_rule
608 (p_validate in boolean default false
609 ,p_time_entry_rule_id in number
610 ,p_object_version_number in number
611 ) is
612 --
613 -- Declare cursors and local variables
614 --
615 l_proc varchar2(72);
616 --
617 begin
618
619 g_debug := hr_utility.debug_enabled;
620 --
621 if g_debug then
622 l_proc := g_package||'delete_time_entry_rule';
623 hr_utility.set_location('Entering:'|| l_proc, 10);
624 end if;
625 --
626 -- Issue a savepoint if operating in validation only mode
627 --
628 savepoint delete_time_entry_rule;
629 --
630 if g_debug then
631 hr_utility.set_location(l_proc, 20);
632 end if;
633 --
634 -- Call Before Process User Hook
635 --
636 begin
637 --
638 hxc_time_entry_rule_BK_3.delete_time_entry_rule_b
639 (p_time_entry_rule_id => p_time_entry_rule_id
640 ,p_object_version_number => p_object_version_number
641 );
642 exception
643 when hr_api.cannot_find_prog_unit then
644 hr_api.cannot_find_prog_unit_error
645 (p_module_name => 'delete_time_entry_rule_b'
646 ,p_hook_type => 'BP'
647 );
648 end;
649 --
650 if g_debug then
651 hr_utility.set_location(l_proc, 30);
652 end if;
653 --
654 -- Process Logic
655 --
656 hxc_ter_del.del
657 (
658 p_time_entry_rule_id => p_time_entry_rule_id
659 ,p_object_version_number => p_object_version_number
660 );
661 --
662 if g_debug then
663 hr_utility.set_location(l_proc, 40);
664 end if;
665 --
666 -- Call After Process User Hook
667 --
668 begin
669 --
670 hxc_time_entry_rule_BK_3.delete_time_entry_rule_a
671 (p_time_entry_rule_id => p_time_entry_rule_id
672 ,p_object_version_number => p_object_version_number
673 );
674 exception
675 when hr_api.cannot_find_prog_unit then
676 hr_api.cannot_find_prog_unit_error
677 (p_module_name => 'delete_time_entry_rule_a'
678 ,p_hook_type => 'AP'
679 );
680 end;
681 --
682 -- When in validation only mode raise the Validate_Enabled exception
683 --
684 if p_validate then
685 raise hr_api.validate_enabled;
686 end if;
687 --
688 if g_debug then
689 hr_utility.set_location(' Leaving:'||l_proc, 50);
690 end if;
691 --
692 exception
693 --
694 when hr_api.validate_enabled then
695 --
696 -- As the Validate_Enabled exception has been raised
697 -- we must rollback to the savepoint
698 --
699 ROLLBACK TO delete_time_entry_rule;
700 --
701 when others then
702 --
703 -- A validation or unexpected error has occured
704 --
705 ROLLBACK TO delete_time_entry_rule;
706 raise;
707 --
708 end delete_time_entry_rule;
709 --
710 END hxc_time_entry_rule_api;