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