[Home] [Help]
PACKAGE BODY: APPS.HR_CAGR_ENT_ITEM_API
Source
1 Package Body hr_cagr_ent_item_api as
2 /* $Header: peceiapi.pkb 120.1 2006/10/18 08:44:46 grreddy noship $ */
3 --
4 -- Package Variables
5 --
6 g_package varchar2(33) := ' hr_cagr_ent_item_api.';
7 --
8 -- ----------------------------------------------------------------------------
9 -- |------------------------< create_cagr_entitlement_item >------------------|
10 -- ----------------------------------------------------------------------------
11 --
12 procedure create_cagr_entitlement_item
13 (p_validate in boolean default false
14 ,p_effective_date in date
15 ,p_language_code in varchar2 default hr_api.userenv_lang
16 ,p_business_group_id in number default null
17 ,p_item_name in varchar2
18 ,p_element_type_id in number default null
19 ,p_input_value_id in varchar2 default null
20 ,p_column_type in varchar2
21 ,p_column_size in number default 2000
22 ,p_legislation_code in varchar2 default null
23 ,p_beneficial_rule in varchar2 default null
24 ,p_cagr_api_param_id in number default null
25 ,p_category_name in varchar2
26 ,p_beneficial_formula_id in number default null
27 ,p_uom in varchar2
28 ,p_flex_value_set_id in number default null
29 ,p_ben_rule_value_set_id in number default null
30 ,p_mult_entries_allowed_flag in varchar2 default null
31 ,p_auto_create_entries_flag in varchar2 default null -- CEI Enh
32 ,p_object_version_number out nocopy number
33 ,p_cagr_entitlement_item_id out nocopy number
34 ,p_opt_id out nocopy number ) IS
35 --
36 -- Declare cursors and local variables
37 --
38 l_proc VARCHAR2(72) := g_package||'create_cagr_entitlement_item';
39 l_object_version_number per_cagr_entitlement_items.object_version_number%TYPE;
40 l_cagr_entitlement_item_id per_cagr_entitlement_items.cagr_entitlement_item_id%TYPE;
41 l_effective_date DATE;
42 l_cagr_api_id per_cagr_entitlement_items.cagr_api_id%TYPE;
43 l_language_code hr_locations_all_tl.language%TYPE;
44 --
45 -- Declare variables for Option API Call
46 --
47 l_opt_id ben_opt_f.opt_id%TYPE;
48 l_opt_ovn ben_opt_f.object_version_number%TYPE;
49 l_effective_start_date DATE;
50 l_effective_end_date DATE;
51 --
52 CURSOR csr_get_api_id IS
53 SELECT cagr_api_id
54 FROM per_cagr_api_parameters p
55 WHERE p.cagr_api_param_id = p_cagr_api_param_id;
56 --
57 BEGIN
58 --
59 hr_utility.set_location('Entering:'|| l_proc, 10);
60 --
61 -- Issue a savepoint if operating in validation only mode
62 --
63 SAVEPOINT create_cagr_entitlement_item;
64 --
65 hr_utility.set_location(l_proc, 20);
66 --
67 l_effective_date := TRUNC(p_effective_date);
68 --
69 -- Validate the language parameter. l_language_code should be passed to functions
70 -- instead of p_language_code from now on, to allow an IN OUT parameter to
71 -- be passed through.
72 --
73 l_language_code := p_language_code;
74 hr_api.validate_language_code(p_language_code => l_language_code);
75 --
76 -- Create the option that will be used for this item
77 --
78 BEGIN
79 --
80 hr_utility.set_location(l_proc, 30);
81 --
82 ben_option_definition_api.create_option_definition
83 (p_validate => p_validate
84 ,p_opt_id => l_opt_id
85 ,p_effective_start_date => l_effective_start_date
86 ,p_effective_end_date => l_effective_end_date
87 ,p_name => per_cagr_utility_pkg.option_name
88 ,p_business_group_id => p_business_group_id
89 ,p_object_version_number => l_opt_ovn
90 ,p_effective_date => TO_DATE('01-01-1953','DD-MM-YYYY'));
91 --
92 hr_utility.set_location(l_proc||'/'||l_opt_id, 40);
93 --
94 END;
95 --
96 hr_utility.set_location(l_proc, 50);
97 --
98 -- Fetch the API ID for the CAGR Parameter
99 -- ID passed into this procedure.
100 --
101 IF p_cagr_api_param_id IS NOT NULL THEN
102 --
103 OPEN csr_get_api_id;
104 FETCH csr_get_api_id INTO l_cagr_api_id;
105 --
106 IF csr_get_api_id%NOTFOUND THEN
107 --
108 CLOSE csr_get_api_id;
109 --
110 hr_utility.set_message(800, 'HR_289232_CAGR_API_PARAM_ID_IN');
111 hr_utility.raise_error;
112 --
113 ELSE
114 --
115 CLOSE csr_get_api_id;
116 --
117 END IF;
118 --
119 END IF;
120 --
121 hr_utility.set_location(l_proc||'/'||l_cagr_api_id, 60);
122 --
123 -- Process Logic
124 --
125 BEGIN
126 --
127 -- Start of API User Hook for the before hook of create_cagr_entitlement_item
128 --
129 hr_cagr_ent_item_bk1.create_cagr_entitlement_item_b
130 (p_cagr_entitlement_item_id => p_cagr_entitlement_item_id
131 ,p_language_code => p_language_code
132 ,p_business_group_id => p_business_group_id
133 ,p_opt_id => l_opt_id
134 ,p_item_name => p_item_name
135 ,p_element_type_id => p_element_type_id
136 ,p_input_value_id => p_input_value_id
137 ,p_column_type => p_column_type
138 ,p_column_size => p_column_size
139 ,p_legislation_code => p_legislation_code
140 ,p_beneficial_rule => p_beneficial_rule
141 ,p_cagr_api_id => l_cagr_api_id
142 ,p_cagr_api_param_id => p_cagr_api_param_id
143 ,p_category_name => p_category_name
144 ,p_beneficial_formula_id => p_beneficial_formula_id
145 ,p_uom => p_uom
146 ,p_flex_value_set_id => p_flex_value_set_id
147 ,p_ben_rule_value_set_id => p_ben_rule_value_set_id
148 ,p_mult_entries_allowed_flag => p_mult_entries_allowed_flag
149 ,p_auto_create_entries_flag => p_auto_create_entries_flag -- CEI Enh
150
151 );
152 EXCEPTION
153 WHEN hr_api.cannot_find_prog_unit THEN
154 hr_api.cannot_find_prog_unit_error
155 (
156 p_module_name => 'CREATE_CAGR_ENTITLEMENT_ITEM'
157 ,p_hook_type => 'BP'
158 );
159 --
160 -- End of API User Hook for the before hook of create_cagr_entitlement_item
161 --
162 END;
163 --
164 hr_utility.set_location(l_proc, 70);
165 --
166 per_cei_ins.ins
167 (p_cagr_entitlement_item_id => l_cagr_entitlement_item_id
168 ,p_effective_date => l_effective_date
169 ,p_business_group_id => p_business_group_id
170 ,p_opt_id => l_opt_id
171 ,p_item_name => p_item_name
172 ,p_element_type_id => p_element_type_id
173 ,p_input_value_id => p_input_value_id
174 ,p_column_type => p_column_type
175 ,p_column_size => p_column_size
176 ,p_legislation_code => p_legislation_code
177 ,p_beneficial_rule => p_beneficial_rule
178 ,p_cagr_api_id => l_cagr_api_id
179 ,p_cagr_api_param_id => p_cagr_api_param_id
180 ,p_category_name => p_category_name
181 ,p_beneficial_formula_id => p_beneficial_formula_id
182 ,p_uom => p_uom
183 ,p_flex_value_set_id => p_flex_value_set_id
184 ,p_ben_rule_value_set_id => p_ben_rule_value_set_id
185 ,p_mult_entries_allowed_flag => p_mult_entries_allowed_flag
186 ,p_auto_create_entries_flag => p_auto_create_entries_flag -- CEI Enh
187 ,p_object_version_number => l_object_version_number);
188 --
189 -- Now insert translatable rows in HR_LOCATIONS_ALL_TL table
190 --
191 per_cit_ins.ins_tl
192 (p_language_code => l_language_code
193 ,p_cagr_entitlement_item_id => l_cagr_entitlement_item_id
194 ,p_item_name => p_item_name
195 ) ;
196 --
197 begin
198 --
199 -- Start of API User Hook for the after hook of create_cagr_entitlement_item
200 --
201 hr_cagr_ent_item_bk1.create_cagr_entitlement_item_a
202 (p_cagr_entitlement_item_id => p_cagr_entitlement_item_id
203 ,p_language_code => p_language_code
204 ,p_business_group_id => p_business_group_id
205 ,p_opt_id => l_opt_id
206 ,p_item_name => p_item_name
207 ,p_element_type_id => p_element_type_id
208 ,p_input_value_id => p_input_value_id
209 ,p_column_type => p_column_type
210 ,p_column_size => p_column_size
211 ,p_legislation_code => p_legislation_code
212 ,p_beneficial_rule => p_beneficial_rule
213 ,p_cagr_api_id => l_cagr_api_id
214 ,p_cagr_api_param_id => p_cagr_api_param_id
215 ,p_category_name => p_category_name
216 ,p_beneficial_formula_id => p_beneficial_formula_id
217 ,p_uom => p_uom
218 ,p_flex_value_set_id => p_flex_value_set_id
219 ,p_ben_rule_value_set_id => p_ben_rule_value_set_id
220 ,p_mult_entries_allowed_flag => p_mult_entries_allowed_flag
221 ,p_auto_create_entries_flag => p_auto_create_entries_flag -- CEI Enh
222 ,p_object_version_number => l_object_version_number
223 );
224 exception
225 when hr_api.cannot_find_prog_unit then
226 hr_api.cannot_find_prog_unit_error
227 (p_module_name => 'CREATE_cagr_entitlement_item'
228 ,p_hook_type => 'AP'
229 );
230 --
231 -- End of API User Hook for the after hook of create_cagr_entitlement_item
232 --
233 end;
234 --
235 hr_utility.set_location(l_proc, 80);
236 --
237 -- When in validation only mode raise the Validate_Enabled exception
238 --
239 if p_validate then
240 raise hr_api.validate_enabled;
241 end if;
242 --
243 -- Set all output arguments
244 --
245 p_object_version_number := l_object_version_number;
246 p_cagr_entitlement_item_id := l_cagr_entitlement_item_id;
247 p_opt_id := l_opt_id;
248 --
249 hr_utility.set_location(' Leaving:'||l_proc, 999);
250 --
251 exception
252 --
253 when hr_api.validate_enabled then
254 --
255 -- As the Validate_Enabled exception has been raised
256 -- we must rollback to the savepoint
257 --
258 ROLLBACK TO create_cagr_entitlement_item;
259 --
260 -- Only set output warning arguments
261 -- (Any key or derived arguments must be set to null
262 -- when validation only mode is being used.)
263 --
264 p_object_version_number := null;
265 hr_utility.set_location(' Leaving:'||l_proc, 80);
266 --
267 when others then
268 --
269 -- A validation or unexpected error has occured
270 --
271 ROLLBACK TO create_cagr_entitlement_item;
272 raise;
273 --
274 end create_cagr_entitlement_item;
275 -- ----------------------------------------------------------------------------
276 -- |------------------------< update_cagr_entitlement_item >--- ------------------|
277 -- ----------------------------------------------------------------------------
278 --
279 procedure update_cagr_entitlement_item
280 (p_validate in boolean default false
281 ,p_effective_date in date
282 ,p_language_code in varchar2 DEFAULT hr_api.userenv_lang
283 ,p_cagr_entitlement_item_id in number default hr_api.g_number
284 ,p_business_group_id in number default hr_api.g_number
285 ,p_item_name in varchar2 default hr_api.g_varchar2
286 ,p_element_type_id in number default hr_api.g_number
287 ,p_input_value_id in varchar2 default hr_api.g_varchar2
288 ,p_column_type in varchar2 default hr_api.g_varchar2
289 ,p_column_size in number default hr_api.g_number
290 ,p_legislation_code in varchar2 default hr_api.g_varchar2
291 ,p_beneficial_rule in varchar2 default hr_api.g_varchar2
292 ,p_cagr_api_param_id in number default hr_api.g_number
293 ,p_category_name in varchar2 default hr_api.g_varchar2
294 ,p_beneficial_formula_id in number default hr_api.g_number
295 ,p_uom in varchar2 default hr_api.g_varchar2
296 ,p_flex_value_set_id in number default hr_api.g_number
297 ,p_ben_rule_value_set_id in number default hr_api.g_number
298 ,p_mult_entries_allowed_flag in varchar2 default hr_api.g_varchar2
299 ,p_object_version_number in out nocopy number
300 ) is
301 --
302 -- Declare cursors and local variables
303 --
304 l_proc varchar2(72) := g_package||'update_cagr_entitlement_item';
305 l_object_version_number per_cagr_entitlement_items.object_version_number%TYPE;
306 l_effective_date DATE;
307 l_language_code hr_locations_all_tl.language%TYPE;
308 l_cagr_api_id per_cagr_entitlement_items.cagr_api_id%TYPE;
309 --
310 CURSOR csr_get_api_id IS
311 SELECT cagr_api_id
312 FROM per_cagr_api_parameters p
313 WHERE p.cagr_api_param_id = p_cagr_api_param_id;
314 --
315 begin
316 --
317 hr_utility.set_location('Entering:'|| l_proc, 10);
318 --
319 -- Issue a savepoint if operating in validation only mode
320 --
321 savepoint update_cagr_entitlement_item;
322 --
323 hr_utility.set_location(l_proc, 20);
324 --
325 l_effective_date := TRUNC(p_effective_date);
326 --
327 -- Validate the language parameter. l_language_code should be passed to functions
328 -- instead of p_language_code from now on, to allow an IN OUT parameter to be
329 -- passed through.
330 --
331 l_language_code := p_language_code;
332 hr_api.validate_language_code(p_language_code => l_language_code);
333 --
334 hr_utility.set_location(l_proc, 30);
335 --
336 -- Fetch the API ID for the CAGR Parameter
337 -- ID passed into this procedure.
338 --
339 IF p_cagr_api_param_id IS NOT NULL THEN
340 --
341 OPEN csr_get_api_id;
342 FETCH csr_get_api_id INTO l_cagr_api_id;
343 --
344 IF csr_get_api_id%NOTFOUND THEN
345 --
346 CLOSE csr_get_api_id;
347 --
348 hr_utility.set_message(800, 'HR_289232_CAGR_API_PARAM_ID_IN');
349 hr_utility.raise_error;
350 --
351 ELSE
352 --
353 CLOSE csr_get_api_id;
354 --
355 END IF;
356 --
357 END IF;
358 --
359 hr_utility.set_location(l_proc||'/'||l_cagr_api_id, 40);
360 --
361 -- Process Logic
362 --
363 l_object_version_number := p_object_version_number;
364 --
365 begin
366 --
367 -- Start of API User Hook for the before hook of update_cagr_entitlement_item
368 --
369 hr_cagr_ent_item_bk2.update_cagr_entitlement_item_b
370 (p_cagr_entitlement_item_id => p_cagr_entitlement_item_id
371 ,p_language_code => p_language_code
375 ,p_input_value_id => p_input_value_id
372 ,p_business_group_id => p_business_group_id
373 ,p_item_name => p_item_name
374 ,p_element_type_id => p_element_type_id
376 ,p_column_type => p_column_type
377 ,p_column_size => p_column_size
378 ,p_legislation_code => p_legislation_code
379 ,p_beneficial_rule => p_beneficial_rule
380 ,p_cagr_api_id => l_cagr_api_id
381 ,p_cagr_api_param_id => p_cagr_api_param_id
382 ,p_category_name => p_category_name
383 ,p_beneficial_formula_id => p_beneficial_formula_id
384 ,p_uom => p_uom
385 ,p_flex_value_set_id => p_flex_value_set_id
386 ,p_ben_rule_value_set_id => p_ben_rule_value_set_id
387 ,p_mult_entries_allowed_flag => p_mult_entries_allowed_flag
388 ,p_object_version_number => l_object_version_number
389 );
390 exception
391 when hr_api.cannot_find_prog_unit then
392 hr_api.cannot_find_prog_unit_error
393 (p_module_name => 'UPDATE_cagr_entitlement_item'
394 ,p_hook_type => 'BP'
395 );
396 --
397 -- End of API User Hook for the before hook of update_cagr_entitlement_item
398 --
399 end;
400 --
401 per_cei_upd.upd
402 (p_cagr_entitlement_item_id => p_cagr_entitlement_item_id
403 ,p_effective_date => l_effective_date
404 ,p_business_group_id => p_business_group_id
405 ,p_item_name => p_item_name
406 ,p_element_type_id => p_element_type_id
407 ,p_input_value_id => p_input_value_id
408 ,p_column_type => p_column_type
409 ,p_column_size => p_column_size
410 ,p_legislation_code => p_legislation_code
411 ,p_beneficial_rule => p_beneficial_rule
412 ,p_cagr_api_id => l_cagr_api_id
413 ,p_cagr_api_param_id => p_cagr_api_param_id
414 ,p_category_name => p_category_name
415 ,p_beneficial_formula_id => p_beneficial_formula_id
416 ,p_uom => p_uom
417 ,p_flex_value_set_id => p_flex_value_set_id
418 ,p_ben_rule_value_set_id => p_ben_rule_value_set_id
419 ,p_mult_entries_allowed_flag => p_mult_entries_allowed_flag
420 ,p_object_version_number => l_object_version_number
421 );
422 --
423 per_cit_upd.upd_tl
424 (p_language_code => l_language_code
425 ,p_cagr_entitlement_item_id => p_cagr_entitlement_item_id
426 ,p_item_name => p_item_name) ;
427 --
428 begin
429 --
430 -- Start of API User Hook for the after hook of update_cagr_entitlement_item
431 --
432 hr_cagr_ent_item_bk2.update_cagr_entitlement_item_a
433 (p_cagr_entitlement_item_id => p_cagr_entitlement_item_id
434 ,p_language_code => p_language_code
435 ,p_business_group_id => p_business_group_id
436 ,p_item_name => p_item_name
437 ,p_element_type_id => p_element_type_id
438 ,p_input_value_id => p_input_value_id
439 ,p_column_type => p_column_type
440 ,p_column_size => p_column_size
441 ,p_legislation_code => p_legislation_code
442 ,p_beneficial_rule => p_beneficial_rule
443 ,p_cagr_api_id => l_cagr_api_id
444 ,p_cagr_api_param_id => p_cagr_api_param_id
445 ,p_category_name => p_category_name
446 ,p_beneficial_formula_id => p_beneficial_formula_id
447 ,p_uom => p_uom
448 ,p_flex_value_set_id => p_flex_value_set_id
449 ,p_ben_rule_value_set_id => p_ben_rule_value_set_id
450 ,p_mult_entries_allowed_flag => p_mult_entries_allowed_flag
451 ,p_object_version_number => l_object_version_number
452 );
453 exception
454 when hr_api.cannot_find_prog_unit then
455 hr_api.cannot_find_prog_unit_error
456 (p_module_name => 'UPDATE_cagr_entitlement_item'
457 ,p_hook_type => 'AP'
458 );
459 --
460 -- End of API User Hook for the after hook of update_cagr_entitlement_item
461 --
462 end;
463 --
464 hr_utility.set_location(l_proc, 60);
465 --
466 -- When in validation only mode raise the Validate_Enabled exception
467 --
468 if p_validate then
469 raise hr_api.validate_enabled;
470 end if;
471 --
472 -- Set all output arguments
473 --
474 p_object_version_number := l_object_version_number;
475 --
476 hr_utility.set_location(' Leaving:'||l_proc, 999);
477 --
478 exception
479 --
480 when hr_api.validate_enabled then
481 --
482 -- As the Validate_Enabled exception has been raised
483 -- we must rollback to the savepoint
484 --
485 ROLLBACK TO update_cagr_entitlement_item;
486 --
487 -- Only set output warning arguments
488 -- (Any key or derived arguments must be set to null
492 --
489 -- when validation only mode is being used.)
490 --
491 hr_utility.set_location(' Leaving:'||l_proc, 80);
493 when others then
494 --
495 -- A validation or unexpected error has occured
496 --
497 ROLLBACK TO update_cagr_entitlement_item;
498 raise;
499 --
500 end update_cagr_entitlement_item;
501 -- ----------------------------------------------------------------------------
502 -- |------------------------< delete_cagr_entitlement_item >----------------------|
503 -- ----------------------------------------------------------------------------
504 --
505 procedure delete_cagr_entitlement_item
506 (p_validate in boolean default false
507 ,p_effective_date in date
508 ,p_cagr_entitlement_item_id in number
509 ,p_object_version_number in out nocopy number
510 ) is
511 --
512 -- Declare cursors and local variables
513 --
514 l_proc VARCHAR2(72) := g_package||'update_cagr_entitlement_item';
515 l_object_version_number per_cagr_entitlement_items.object_version_number%TYPE;
516 l_effective_date DATE;
517 l_opt_id NUMBER;
518 l_opt_ovn NUMBER;
519 l_effective_start_date DATE;
520 l_effective_end_date DATE;
521 --
522 CURSOR csr_option IS
523 SELECT b.opt_id,
524 b.object_version_number
525 FROM ben_opt_f b,
526 PER_CAGR_ENTITLEMENT_ITEMS cagitems
527 WHERE b.opt_id = cagitems.opt_Id
528 AND cagitems.CAGR_ENTITLEMENT_ITEM_ID = p_cagr_entitlement_item_id;
529 --
530 begin
531 --
532 hr_utility.set_location('Entering:'|| l_proc, 10);
533 --
534 -- Issue a savepoint if operating in validation only mode
535 --
536 savepoint delete_cagr_entitlement_item;
537 --
538 hr_utility.set_location(l_proc, 20);
539 --
540 l_effective_date := TRUNC(p_effective_date);
541 --
542 -- Process Logic
543 --
544 l_object_version_number := p_object_version_number;
545 --
546 --
547 begin
548 --
549 -- Start of API User Hook for the before hook of delete_cagr_entitlement_item
550 --
551 hr_cagr_ent_item_bk3.delete_cagr_entitlement_item_b
552 (p_cagr_entitlement_item_id => p_cagr_entitlement_item_id
553 ,p_effective_date => l_effective_date
554 ,p_object_version_number => l_object_version_number
555 );
556 exception
557 when hr_api.cannot_find_prog_unit then
558 hr_api.cannot_find_prog_unit_error
559 (p_module_name => 'DELETE_cagr_entitlement_item'
560 ,p_hook_type => 'BP'
561 );
562 --
563 -- End of API User Hook for the before hook of delete_cagr_entitlement_item
564 --
565 end;
566 --
567 --
568 -- Process Logic
569 -- =============
570 --
571 -- Need to lock main table to maintain the locking ladder order
572 --
573 hr_utility.set_location( l_proc, 30);
574 per_cei_shd.lck ( p_cagr_entitlement_item_id => p_cagr_entitlement_item_id
575 ,p_object_version_number => p_object_version_number);
576 --
577 --
578 open csr_option;
579 fetch csr_option into l_opt_id, l_opt_ovn;
580 --
581 if csr_option%found then
582 ben_option_definition_api.delete_option_definition
583 (p_validate => p_validate
584 ,p_opt_id => l_opt_id
585 ,p_effective_start_date => l_effective_start_date
586 ,p_effective_end_date => l_effective_end_date
587 ,p_object_version_number => l_opt_ovn
588 ,p_effective_date => p_effective_date
589 ,p_datetrack_mode => 'ZAP'
590 );
591 end if;
592 --
593 -- Remove all matching translation rows
594 --
595 hr_utility.set_location( l_proc, 35);
596 per_cit_del.del_tl ( p_cagr_entitlement_item_id => p_cagr_entitlement_item_id );
597 --
598 hr_utility.set_location( l_proc, 45);
599 --
600 per_cei_del.del
601 (p_cagr_entitlement_item_id => p_cagr_entitlement_item_id
602 ,p_effective_date => l_effective_date
603 ,p_object_version_number => l_object_version_number
604 );
605 --
606 begin
607 --
608 -- Start of API User Hook for the after hook of delete_cagr_entitlement_item
609 --
610 hr_cagr_ent_item_bk3.delete_cagr_entitlement_item_a
611 (p_cagr_entitlement_item_id => p_cagr_entitlement_item_id
612 ,p_effective_date => l_effective_date
613 ,p_object_version_number => l_object_version_number);
614
615 exception
616 when hr_api.cannot_find_prog_unit then
617 hr_api.cannot_find_prog_unit_error
618 (p_module_name => 'DELETE_cagr_entitlement_item'
619 ,p_hook_type => 'AP'
620 );
621 --
622 -- End of API User Hook for the after hook of delete_cagr_entitlement_item
623 --
624 end;
625 --
626 hr_utility.set_location(l_proc, 60);
627 --
628 -- When in validation only mode raise the Validate_Enabled exception
629 --
630 if p_validate then
631 raise hr_api.validate_enabled;
632 end if;
633 --
634 hr_utility.set_location(' Leaving:'||l_proc, 70);
638 when hr_api.validate_enabled then
635 --
636 exception
637 --
639 --
640 -- As the Validate_Enabled exception has been raised
641 -- we must rollback to the savepoint
642 --
643 ROLLBACK TO delete_cagr_entitlement_item;
644 --
645 -- Only set output warning arguments
646 -- (Any key or derived arguments must be set to null
647 -- when validation only mode is being used.)
648 --
649 --
650 when others then
651 --
652 -- A validation or unexpected error has occured
653 --
654 ROLLBACK TO delete_cagr_entitlement_item;
655 raise;
656 --
657 end delete_cagr_entitlement_item;
658 --
659 end hr_cagr_ent_item_api;