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