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