[Home] [Help]
PACKAGE BODY: APPS.BEN_PL_EXTRACT_ID_API
Source
1 Package Body ben_pl_extract_id_api as
2 /* $Header: bepeiapi.pkb 120.0 2005/05/28 10:33:21 appldev noship $ */
3 --
4 -- Package Variables
5 --
6 g_package varchar2(33) := ' ben_pl_extract_id_api.';
7 --
8 -- ----------------------------------------------------------------------------
9 -- |------------------------< create_pl_extract_id >----------------------|
10 -- ----------------------------------------------------------------------------
11 --
12 procedure create_pl_extract_id
13 (
14 p_validate in boolean default false
15 ,p_pl_extract_identifier_id out nocopy number
16 ,p_effective_start_date out nocopy date
17 ,p_effective_end_date out nocopy date
18 ,p_pl_id in number default null
19 ,p_plip_id in number default null
20 ,p_oipl_id in number default null
21 ,p_third_party_identifier in varchar2 default null
22 ,p_organization_id in number default null
23 ,p_job_id in number default null
24 ,p_position_id in number default null
25 ,p_people_group_id in number default null
26 ,p_grade_id in number default null
27 ,p_payroll_id in number default null
28 ,p_home_state in varchar2 default null
29 ,p_home_zip in varchar2 default null
30 ,p_object_version_number out nocopy number
31 ,p_business_group_id in number default null
32 ,p_effective_date in date
33 ) is
34 --
35 -- Declare cursors and local variables
36 --
37 l_pl_extract_identifier_id ben_pl_extract_identifier_f.pl_extract_identifier_id%TYPE;
38 l_effective_start_date ben_pl_extract_identifier_f.effective_start_date%TYPE;
39 l_effective_end_date ben_pl_extract_identifier_f.effective_end_date%TYPE;
40 l_proc varchar2(72) := g_package||'create_pl_extract_id';
41 l_object_version_number ben_pl_extract_identifier_f.object_version_number%TYPE;
42 --
43 begin
44 --
45 hr_utility.set_location('Entering:'|| l_proc, 10);
46 --
47 -- Issue a savepoint if operating in validation only mode
48 --
49 savepoint create_pl_extract_id;
50 --
51 hr_utility.set_location(l_proc, 20);
52 --
53 -- Process Logic
54 --
55 begin
56 --
57 -- Start of API User Hook for the before hook of create_pl_extract_id
58 --
59 ben_pl_extract_id_bk1.create_pl_extract_id_b
60 (
61 p_pl_id => p_pl_id
62 ,p_plip_id => p_plip_id
63 ,p_oipl_id => p_oipl_id
64 ,p_third_party_identifier => p_third_party_identifier
65 ,p_organization_id => p_organization_id
66 ,p_job_id => p_job_id
67 ,p_position_id => p_position_id
68 ,p_people_group_id => p_people_group_id
69 ,p_grade_id => p_grade_id
70 ,p_payroll_id => p_payroll_id
71 ,p_home_state => p_home_state
72 ,p_home_zip => p_home_zip
73 ,p_business_group_id => p_business_group_id
74 ,p_effective_date => trunc(p_effective_date)
75 );
76 exception
77 when hr_api.cannot_find_prog_unit then
78 hr_api.cannot_find_prog_unit_error
79 (
80 p_module_name => 'CREATE_PL_EXTRACT_ID'
81 ,p_hook_type => 'BP'
82 );
83 --
84 -- End of API User Hook for the before hook of create_pl_extract_id
85 --
86 end;
87 --
88 ben_pei_ins.ins
89 (
90 p_pl_extract_identifier_id => l_pl_extract_identifier_id,
91 p_effective_start_date => l_effective_start_date,
92 p_effective_end_date => l_effective_end_date,
93 p_pl_id => p_pl_id,
94 p_plip_id => p_plip_id,
95 p_oipl_id => p_oipl_id,
96 p_third_party_identifier => p_third_party_identifier,
97 p_organization_id => p_organization_id,
98 p_job_id => p_job_id,
99 p_position_id => p_position_id,
100 p_people_group_id => p_people_group_id,
101 p_grade_id => p_grade_id,
102 p_payroll_id => p_payroll_id,
103 p_home_state => p_home_state,
104 p_home_zip => p_home_zip,
105 p_business_group_id => p_business_group_id,
106 p_object_version_number => l_object_version_number,
107 p_effective_date => trunc(p_effective_date)
108 );
109 --
110 begin
111 --
112 -- Start of API User Hook for the after hook of create_pl_extract_id
113 --
114 ben_pl_extract_id_bk1.create_pl_extract_id_a
115 (
116 p_pl_extract_identifier_id => l_pl_extract_identifier_id
117 ,p_effective_start_date => l_effective_start_date
118 ,p_effective_end_date => l_effective_end_date
119 ,p_pl_id => p_pl_id
120 ,p_plip_id => p_plip_id
121 ,p_oipl_id => p_oipl_id
122 ,p_third_party_identifier => p_third_party_identifier
123 ,p_organization_id => p_organization_id
124 ,p_job_id => p_job_id
125 ,p_position_id => p_position_id
126 ,p_people_group_id => p_people_group_id
127 ,p_grade_id => p_grade_id
128 ,p_payroll_id => p_payroll_id
129 ,p_home_state => p_home_state
130 ,p_home_zip => p_home_zip
131 ,p_object_version_number => l_object_version_number
132 ,p_business_group_id => p_business_group_id
133 ,p_effective_date => trunc(p_effective_date)
134 );
135 exception
136 when hr_api.cannot_find_prog_unit then
137 hr_api.cannot_find_prog_unit_error
138 (p_module_name => 'CREATE_PL_EXTRACT_ID'
139 ,p_hook_type => 'AP'
140 );
141 --
142 -- End of API User Hook for the after hook of create_pl_extract_id
143 --
144 end;
145 --
146 hr_utility.set_location(l_proc, 60);
147 --
148 -- When in validation only mode raise the Validate_Enabled exception
149 --
150 if p_validate then
151 raise hr_api.validate_enabled;
152 end if;
153 --
154 -- Set all output arguments
155 --
156 p_pl_extract_identifier_id := l_pl_extract_identifier_id;
157 p_effective_start_date := l_effective_start_date;
158 p_effective_end_date := l_effective_end_date;
159 p_object_version_number := l_object_version_number;
160 --
161 hr_utility.set_location(' Leaving:'||l_proc, 70);
162 --
163 exception
164 --
165 when hr_api.validate_enabled then
166 --
167 -- As the Validate_Enabled exception has been raised
168 -- we must rollback to the savepoint
169 --
170 ROLLBACK TO create_pl_extract_id;
171 --
172 -- Only set output warning arguments
173 -- (Any key or derived arguments must be set to null
174 -- when validation only mode is being used.)
175 --
176 p_pl_extract_identifier_id := null;
177 p_effective_start_date := null;
178 p_effective_end_date := null;
179 p_object_version_number := null;
180 hr_utility.set_location(' Leaving:'||l_proc, 80);
181 --
182 when others then
183 --
184 -- A validation or unexpected error has occured
185 --
186 ROLLBACK TO create_pl_extract_id;
187 p_pl_extract_identifier_id := null;
188 p_effective_start_date := null;
189 p_effective_end_date := null;
190 p_object_version_number := null;
191 raise;
192 --
193 end create_pl_extract_id;
194 -- ----------------------------------------------------------------------------
195 -- |--------------------------< update_pl_extract_id >------------------------|
196 -- ----------------------------------------------------------------------------
197 --
198 procedure update_pl_extract_id
199 (
200 p_validate in boolean default false
201 ,p_pl_extract_identifier_id in number
202 ,p_effective_start_date out nocopy date
203 ,p_effective_end_date out nocopy date
204 ,p_pl_id in number default hr_api.g_number
205 ,p_plip_id in number default hr_api.g_number
206 ,p_oipl_id in number default hr_api.g_number
207 ,p_third_party_identifier in varchar2 default hr_api.g_varchar2
208 ,p_organization_id in number default hr_api.g_number
209 ,p_job_id in number default hr_api.g_number
210 ,p_position_id in number default hr_api.g_number
211 ,p_people_group_id in number default hr_api.g_number
212 ,p_grade_id in number default hr_api.g_number
213 ,p_payroll_id in number default hr_api.g_number
214 ,p_home_state in varchar2 default hr_api.g_varchar2
215 ,p_home_zip in varchar2 default hr_api.g_varchar2
216 ,p_object_version_number in out nocopy number
217 ,p_business_group_id in number default hr_api.g_number
218 ,p_effective_date in date
219 ,p_datetrack_mode in varchar2
220 ) is
221 --
222 -- Declare cursors and local variables
223 --
224 l_proc varchar2(72) := g_package||'update_pl_extract_id';
225 l_object_version_number ben_pl_extract_identifier_f.object_version_number%TYPE;
226 l_effective_start_date ben_pl_extract_identifier_f.effective_start_date%TYPE;
227 l_effective_end_date ben_pl_extract_identifier_f.effective_end_date%TYPE;
228 --
229 begin
230 --
231 hr_utility.set_location('Entering:'|| l_proc, 10);
232 --
233 -- Issue a savepoint if operating in validation only mode
234 --
235 savepoint update_pl_extract_id;
236 --
237 hr_utility.set_location(l_proc, 20);
238 --
239 -- Process Logic
240 --
241 l_object_version_number := p_object_version_number;
242 --
243 begin
244 --
245 -- Start of API User Hook for the before hook of update_pl_extract_id
246 --
247 ben_pl_extract_id_bk2.update_pl_extract_id_b
248 (
249 p_pl_extract_identifier_id => p_pl_extract_identifier_id
250 ,p_pl_id => p_pl_id
251 ,p_plip_id => p_plip_id
252 ,p_oipl_id => p_oipl_id
253 ,p_third_party_identifier => p_third_party_identifier
254 ,p_organization_id => p_organization_id
255 ,p_job_id => p_job_id
256 ,p_position_id => p_position_id
257 ,p_people_group_id => p_people_group_id
258 ,p_grade_id => p_grade_id
259 ,p_payroll_id => p_payroll_id
260 ,p_home_state => p_home_state
261 ,p_home_zip => p_home_zip
262 ,p_object_version_number => p_object_version_number
263 ,p_business_group_id => p_business_group_id
264 ,p_effective_date => trunc(p_effective_date)
265 ,p_datetrack_mode => p_datetrack_mode
266 );
267 exception
268 when hr_api.cannot_find_prog_unit then
269 hr_api.cannot_find_prog_unit_error
270 (p_module_name => 'UPDATE_PL_EXTRACT_ID'
271 ,p_hook_type => 'BP'
272 );
273 --
274 -- End of API User Hook for the before hook of update_pl_extract_id
275 --
276 end;
277 --
278 ben_pei_upd.upd
279 (
280 p_pl_extract_identifier_id => p_pl_extract_identifier_id,
281 p_effective_start_date => l_effective_start_date,
282 p_effective_end_date => l_effective_end_date,
283 p_pl_id => p_pl_id,
284 p_plip_id => p_plip_id,
285 p_oipl_id => p_oipl_id,
286 p_third_party_identifier => p_third_party_identifier,
287 p_organization_id => p_organization_id,
288 p_job_id => p_job_id,
289 p_position_id => p_position_id,
290 p_people_group_id => p_people_group_id,
291 p_grade_id => p_grade_id,
292 p_payroll_id => p_payroll_id,
293 p_home_state => p_home_state,
294 p_home_zip => p_home_zip,
295 p_business_group_id => p_business_group_id,
296 p_object_version_number => l_object_version_number,
297 p_effective_date => trunc(p_effective_date),
298 p_datetrack_mode => p_datetrack_mode
299 );
300 --
301 --
302 begin
303 --
304 -- Start of API User Hook for the after hook of update_pl_extract_id
305 --
306 ben_pl_extract_id_bk2.update_pl_extract_id_a
307 (
308 p_pl_extract_identifier_id => p_pl_extract_identifier_id
309 ,p_effective_start_date => l_effective_start_date
310 ,p_effective_end_date => l_effective_end_date
311 ,p_pl_id => p_pl_id
312 ,p_plip_id => p_plip_id
313 ,p_oipl_id => p_oipl_id
314 ,p_third_party_identifier => p_third_party_identifier
315 ,p_organization_id => p_organization_id
316 ,p_job_id => p_job_id
317 ,p_position_id => p_position_id
318 ,p_people_group_id => p_people_group_id
319 ,p_grade_id => p_grade_id
320 ,p_payroll_id => p_payroll_id
321 ,p_home_state => p_home_state
322 ,p_home_zip => p_home_zip
323 ,p_object_version_number => l_object_version_number
324 ,p_business_group_id => p_business_group_id
325 ,p_effective_date => trunc(p_effective_date)
326 ,p_datetrack_mode => p_datetrack_mode
327 );
328 exception
329 when hr_api.cannot_find_prog_unit then
330 hr_api.cannot_find_prog_unit_error
331 (p_module_name => 'UPDATE_PL_EXTRACT_ID'
332 ,p_hook_type => 'AP'
333 );
334 --
335 -- End of API User Hook for the after hook of update_pl_extract_id
336 --
337 end;
338 --
339 hr_utility.set_location(l_proc, 60);
340 --
341 -- When in validation only mode raise the Validate_Enabled exception
342 --
343 if p_validate then
344 raise hr_api.validate_enabled;
345 end if;
346 --
347 -- Set all output arguments
348 --
349 p_object_version_number := l_object_version_number;
350 p_effective_start_date := l_effective_start_date;
351 p_effective_end_date := l_effective_end_date;
352 --
353 hr_utility.set_location(' Leaving:'||l_proc, 70);
354 --
355 exception
356 --
357 when hr_api.validate_enabled then
358 --
359 -- As the Validate_Enabled exception has been raised
360 -- we must rollback to the savepoint
361 --
362 ROLLBACK TO update_pl_extract_id;
363 --
364 -- Only set output warning arguments
365 -- (Any key or derived arguments must be set to null
366 -- when validation only mode is being used.)
367 --
368 hr_utility.set_location(' Leaving:'||l_proc, 80);
369 --
370 when others then
371 --
372 -- A validation or unexpected error has occured
373 --
374 ROLLBACK TO update_pl_extract_id;
375 p_object_version_number := l_object_version_number;
376 p_effective_start_date := null;
377 p_effective_end_date := null;
378 raise;
379 --
380 end update_pl_extract_id;
381 -- ----------------------------------------------------------------------------
382 -- |--------------------------< delete_pl_extract_id >------------------------|
383 -- ----------------------------------------------------------------------------
384 --
385 procedure delete_pl_extract_id
386 (p_validate in boolean default false
387 ,p_pl_extract_identifier_id in number
388 ,p_effective_start_date out nocopy date
389 ,p_effective_end_date out nocopy date
390 ,p_object_version_number in out nocopy number
391 ,p_effective_date in date
392 ,p_datetrack_mode in varchar2
393 ) is
394 --
395 -- Declare cursors and local variables
396 --
397 l_proc varchar2(72) := g_package||'delete_pl_extract_id';
398 l_object_version_number ben_pl_extract_identifier_f.object_version_number%TYPE;
399 l_effective_start_date ben_pl_extract_identifier_f.effective_start_date%TYPE;
400 l_effective_end_date ben_pl_extract_identifier_f.effective_end_date%TYPE;
401 --
402 begin
403 --
404 hr_utility.set_location('Entering:'|| l_proc, 10);
405 --
406 -- Issue a savepoint if operating in validation only mode
407 --
408 savepoint delete_pl_extract_id;
409 --
410 hr_utility.set_location(l_proc, 20);
411 --
412 -- Process Logic
413 --
414 l_object_version_number := p_object_version_number;
415 --
416 --
417 begin
418 --
419 -- Start of API User Hook for the before hook of delete_pl_extract_id
420 --
421 ben_pl_extract_id_bk3.delete_pl_extract_id_b
422 (
423 p_pl_extract_identifier_id => p_pl_extract_identifier_id
424 ,p_object_version_number => p_object_version_number
425 ,p_effective_date => trunc(p_effective_date)
426 ,p_datetrack_mode => p_datetrack_mode
427 );
428 exception
429 when hr_api.cannot_find_prog_unit then
430 hr_api.cannot_find_prog_unit_error
431 (p_module_name => 'DELETE_PL_EXTRACT_ID'
432 ,p_hook_type => 'BP'
433 );
434 --
435 -- End of API User Hook for the before hook of delete_pl_extract_id
436 --
437 end;
438 --
439 ben_pei_del.del
440 (
441 p_pl_extract_identifier_id => p_pl_extract_identifier_id
442 ,p_effective_start_date => l_effective_start_date
443 ,p_effective_end_date => l_effective_end_date
444 ,p_object_version_number => l_object_version_number
445 ,p_effective_date => p_effective_date
446 ,p_datetrack_mode => p_datetrack_mode
447 );
448 --
449 begin
450 --
451 -- Start of API User Hook for the after hook of delete_pl_extract_id
452 --
453 ben_pl_extract_id_bk3.delete_pl_extract_id_a
454 (p_pl_extract_identifier_id => p_pl_extract_identifier_id
455 ,p_effective_start_date => l_effective_start_date
456 ,p_effective_end_date => l_effective_end_date
457 ,p_object_version_number => l_object_version_number
458 ,p_effective_date => trunc(p_effective_date)
459 ,p_datetrack_mode => p_datetrack_mode
460 );
461 exception
462 when hr_api.cannot_find_prog_unit then
463 hr_api.cannot_find_prog_unit_error
464 (p_module_name => 'DELETE_PL_EXTRACT_ID'
465 ,p_hook_type => 'AP'
466 );
467 --
468 -- End of API User Hook for the after hook of delete_pl_extract_id
469 --
470 end;
471 --
472 hr_utility.set_location(l_proc, 60);
473 --
474 -- When in validation only mode raise the Validate_Enabled exception
475 --
476 if p_validate then
477 raise hr_api.validate_enabled;
478 end if;
479 --
480 hr_utility.set_location(' Leaving:'||l_proc, 70);
481 --
482 exception
483 --
484 when hr_api.validate_enabled then
485 --
486 -- As the Validate_Enabled exception has been raised
487 -- we must rollback to the savepoint
488 --
489 ROLLBACK TO delete_pl_extract_id;
490 --
491 -- Only set output warning arguments
492 -- (Any key or derived arguments must be set to null
493 -- when validation only mode is being used.)
494 --
495 p_effective_start_date := null;
496 p_effective_end_date := null;
497 --
498 when others then
499 --
500 -- A validation or unexpected error has occured
501 --
502 ROLLBACK TO delete_pl_extract_id;
503 p_object_version_number := l_object_version_number;
504 p_effective_start_date := null;
505 p_effective_end_date := null;
506 raise;
507 --
508 end delete_pl_extract_id;
509 --
510 -- ----------------------------------------------------------------------------
511 -- |-------------------------------< lck >------------------------------------|
512 -- ----------------------------------------------------------------------------
513 --
514 procedure lck
515 (
516 p_pl_extract_identifier_id in number
517 ,p_object_version_number in number
518 ,p_effective_date in date
519 ,p_datetrack_mode in varchar2
520 ,p_validation_start_date out nocopy date
521 ,p_validation_end_date out nocopy date
522 ) is
523 --
524 --
525 -- Declare cursors and local variables
526 --
527 l_proc varchar2(72) := g_package||'lck';
528 l_validation_start_date date;
529 l_validation_end_date date;
530 --
531 begin
532 --
533 hr_utility.set_location('Entering:'|| l_proc, 10);
534 --
535 ben_pei_shd.lck
536 (p_pl_extract_identifier_id => p_pl_extract_identifier_id
537 ,p_validation_start_date => l_validation_start_date
538 ,p_validation_end_date => l_validation_end_date
539 ,p_object_version_number => p_object_version_number
540 ,p_effective_date => p_effective_date
541 ,p_datetrack_mode => p_datetrack_mode
542 );
543 --
544 hr_utility.set_location(' Leaving:'||l_proc, 70);
545 --
546 end lck;
547 --
548 end ben_pl_extract_id_api;