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