[Home] [Help]
PACKAGE BODY: APPS.BEN_ENRLD_ANTHR_PGM_RT_API
Source
1 Package Body ben_ENRLD_ANTHR_PGM_RT_api as
2 /* $Header: beepmapi.pkb 115.1 2002/12/13 08:29:27 bmanyam noship $ */
3 --
4 -- Package Variables
5 --
6 g_package varchar2(33) := ' ben_ENRLD_ANTHR_PGM_RT_api.';
7 --
8 -- ----------------------------------------------------------------------------
9 -- |------------------------< create_ENRLD_ANTHR_PGM_RT >----------------------|
10 -- ----------------------------------------------------------------------------
11 --
12 procedure create_ENRLD_ANTHR_PGM_RT
13 (p_validate in boolean default false
14 ,p_enrld_anthr_pgm_rt_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_vrbl_rt_prfl_id in number default null
22 ,p_business_group_id in number default null
23 ,p_epm_attribute_category in varchar2 default null
24 ,p_epm_attribute1 in varchar2 default null
25 ,p_epm_attribute2 in varchar2 default null
26 ,p_epm_attribute3 in varchar2 default null
27 ,p_epm_attribute4 in varchar2 default null
28 ,p_epm_attribute5 in varchar2 default null
29 ,p_epm_attribute6 in varchar2 default null
30 ,p_epm_attribute7 in varchar2 default null
31 ,p_epm_attribute8 in varchar2 default null
32 ,p_epm_attribute9 in varchar2 default null
33 ,p_epm_attribute10 in varchar2 default null
34 ,p_epm_attribute11 in varchar2 default null
35 ,p_epm_attribute12 in varchar2 default null
36 ,p_epm_attribute13 in varchar2 default null
37 ,p_epm_attribute14 in varchar2 default null
38 ,p_epm_attribute15 in varchar2 default null
39 ,p_epm_attribute16 in varchar2 default null
40 ,p_epm_attribute17 in varchar2 default null
41 ,p_epm_attribute18 in varchar2 default null
42 ,p_epm_attribute19 in varchar2 default null
43 ,p_epm_attribute20 in varchar2 default null
44 ,p_epm_attribute21 in varchar2 default null
45 ,p_epm_attribute22 in varchar2 default null
46 ,p_epm_attribute23 in varchar2 default null
47 ,p_epm_attribute24 in varchar2 default null
48 ,p_epm_attribute25 in varchar2 default null
49 ,p_epm_attribute26 in varchar2 default null
50 ,p_epm_attribute27 in varchar2 default null
51 ,p_epm_attribute28 in varchar2 default null
52 ,p_epm_attribute29 in varchar2 default null
53 ,p_epm_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_enrld_anthr_pgm_rt_id ben_enrld_anthr_pgm_rt_f.enrld_anthr_pgm_rt_id%TYPE;
61 l_effective_start_date ben_enrld_anthr_pgm_rt_f.effective_start_date%TYPE;
62 l_effective_end_date ben_enrld_anthr_pgm_rt_f.effective_end_date%TYPE;
63 l_proc varchar2(72) := g_package||'create_ENRLD_ANTHR_PGM_RT';
64 l_object_version_number ben_enrld_anthr_pgm_rt_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_ENRLD_ANTHR_PGM_RT;
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_ENRLD_ANTHR_PGM_RT
81 --
82 ben_ENRLD_ANTHR_PGM_RT_bk1.create_ENRLD_ANTHR_PGM_RT_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_vrbl_rt_prfl_id => p_vrbl_rt_prfl_id
89 ,p_business_group_id => p_business_group_id
90 ,p_epm_attribute_category => p_epm_attribute_category
91 ,p_epm_attribute1 => p_epm_attribute1
92 ,p_epm_attribute2 => p_epm_attribute2
93 ,p_epm_attribute3 => p_epm_attribute3
94 ,p_epm_attribute4 => p_epm_attribute4
95 ,p_epm_attribute5 => p_epm_attribute5
96 ,p_epm_attribute6 => p_epm_attribute6
97 ,p_epm_attribute7 => p_epm_attribute7
98 ,p_epm_attribute8 => p_epm_attribute8
99 ,p_epm_attribute9 => p_epm_attribute9
100 ,p_epm_attribute10 => p_epm_attribute10
101 ,p_epm_attribute11 => p_epm_attribute11
102 ,p_epm_attribute12 => p_epm_attribute12
103 ,p_epm_attribute13 => p_epm_attribute13
104 ,p_epm_attribute14 => p_epm_attribute14
105 ,p_epm_attribute15 => p_epm_attribute15
106 ,p_epm_attribute16 => p_epm_attribute16
107 ,p_epm_attribute17 => p_epm_attribute17
108 ,p_epm_attribute18 => p_epm_attribute18
109 ,p_epm_attribute19 => p_epm_attribute19
110 ,p_epm_attribute20 => p_epm_attribute20
111 ,p_epm_attribute21 => p_epm_attribute21
112 ,p_epm_attribute22 => p_epm_attribute22
113 ,p_epm_attribute23 => p_epm_attribute23
114 ,p_epm_attribute24 => p_epm_attribute24
115 ,p_epm_attribute25 => p_epm_attribute25
116 ,p_epm_attribute26 => p_epm_attribute26
117 ,p_epm_attribute27 => p_epm_attribute27
118 ,p_epm_attribute28 => p_epm_attribute28
119 ,p_epm_attribute29 => p_epm_attribute29
120 ,p_epm_attribute30 => p_epm_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_ENRLD_ANTHR_PGM_RT'
128 ,p_hook_type => 'BP'
129 );
130 --
131 -- End of API User Hook for the before hook of create_ENRLD_ANTHR_PGM_RT
132 --
133 end;
134 --
135 ben_epm_ins.ins
136 (
137 p_enrld_anthr_pgm_rt_id => l_enrld_anthr_pgm_rt_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_vrbl_rt_prfl_id => p_vrbl_rt_prfl_id
145 ,p_business_group_id => p_business_group_id
146 ,p_epm_attribute_category => p_epm_attribute_category
147 ,p_epm_attribute1 => p_epm_attribute1
148 ,p_epm_attribute2 => p_epm_attribute2
149 ,p_epm_attribute3 => p_epm_attribute3
150 ,p_epm_attribute4 => p_epm_attribute4
151 ,p_epm_attribute5 => p_epm_attribute5
152 ,p_epm_attribute6 => p_epm_attribute6
153 ,p_epm_attribute7 => p_epm_attribute7
154 ,p_epm_attribute8 => p_epm_attribute8
155 ,p_epm_attribute9 => p_epm_attribute9
156 ,p_epm_attribute10 => p_epm_attribute10
157 ,p_epm_attribute11 => p_epm_attribute11
158 ,p_epm_attribute12 => p_epm_attribute12
159 ,p_epm_attribute13 => p_epm_attribute13
160 ,p_epm_attribute14 => p_epm_attribute14
161 ,p_epm_attribute15 => p_epm_attribute15
162 ,p_epm_attribute16 => p_epm_attribute16
163 ,p_epm_attribute17 => p_epm_attribute17
164 ,p_epm_attribute18 => p_epm_attribute18
165 ,p_epm_attribute19 => p_epm_attribute19
166 ,p_epm_attribute20 => p_epm_attribute20
167 ,p_epm_attribute21 => p_epm_attribute21
168 ,p_epm_attribute22 => p_epm_attribute22
169 ,p_epm_attribute23 => p_epm_attribute23
170 ,p_epm_attribute24 => p_epm_attribute24
171 ,p_epm_attribute25 => p_epm_attribute25
172 ,p_epm_attribute26 => p_epm_attribute26
173 ,p_epm_attribute27 => p_epm_attribute27
174 ,p_epm_attribute28 => p_epm_attribute28
175 ,p_epm_attribute29 => p_epm_attribute29
176 ,p_epm_attribute30 => p_epm_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_ENRLD_ANTHR_PGM_RT
184 --
185 ben_ENRLD_ANTHR_PGM_RT_bk1.create_ENRLD_ANTHR_PGM_RT_a
186 (
187 p_enrld_anthr_pgm_rt_id => l_enrld_anthr_pgm_rt_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_vrbl_rt_prfl_id => p_vrbl_rt_prfl_id
195 ,p_business_group_id => p_business_group_id
196 ,p_epm_attribute_category => p_epm_attribute_category
197 ,p_epm_attribute1 => p_epm_attribute1
198 ,p_epm_attribute2 => p_epm_attribute2
199 ,p_epm_attribute3 => p_epm_attribute3
200 ,p_epm_attribute4 => p_epm_attribute4
201 ,p_epm_attribute5 => p_epm_attribute5
202 ,p_epm_attribute6 => p_epm_attribute6
203 ,p_epm_attribute7 => p_epm_attribute7
204 ,p_epm_attribute8 => p_epm_attribute8
205 ,p_epm_attribute9 => p_epm_attribute9
206 ,p_epm_attribute10 => p_epm_attribute10
207 ,p_epm_attribute11 => p_epm_attribute11
208 ,p_epm_attribute12 => p_epm_attribute12
209 ,p_epm_attribute13 => p_epm_attribute13
210 ,p_epm_attribute14 => p_epm_attribute14
211 ,p_epm_attribute15 => p_epm_attribute15
212 ,p_epm_attribute16 => p_epm_attribute16
213 ,p_epm_attribute17 => p_epm_attribute17
214 ,p_epm_attribute18 => p_epm_attribute18
215 ,p_epm_attribute19 => p_epm_attribute19
216 ,p_epm_attribute20 => p_epm_attribute20
217 ,p_epm_attribute21 => p_epm_attribute21
218 ,p_epm_attribute22 => p_epm_attribute22
219 ,p_epm_attribute23 => p_epm_attribute23
220 ,p_epm_attribute24 => p_epm_attribute24
221 ,p_epm_attribute25 => p_epm_attribute25
222 ,p_epm_attribute26 => p_epm_attribute26
223 ,p_epm_attribute27 => p_epm_attribute27
224 ,p_epm_attribute28 => p_epm_attribute28
225 ,p_epm_attribute29 => p_epm_attribute29
226 ,p_epm_attribute30 => p_epm_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_ENRLD_ANTHR_PGM_RT'
234 ,p_hook_type => 'AP'
235 );
236 --
237 -- End of API User Hook for the after hook of create_ENRLD_ANTHR_PGM_RT
238 --
239 end;
240 --
241 ben_profile_handler.event_handler
242 (p_event => 'CREATE',
243 p_base_table => 'BEN_VRBL_RT_PRFL_F',
244 p_base_table_column => 'VRBL_RT_PRFL_ID',
245 p_base_table_column_value => p_vrbl_rt_prfl_id,
246 p_base_table_reference_column => 'RT_ENRLD_PGM_FLAG',
247 p_reference_table => 'BEN_ENRLD_ANTHR_PGM_RT_F',
248 p_reference_table_column => 'VRBL_RT_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_enrld_anthr_pgm_rt_id := l_enrld_anthr_pgm_rt_id;
261 p_effective_start_date := l_effective_start_date;
265 hr_utility.set_location(' Leaving:'||l_proc, 70);
262 p_effective_end_date := l_effective_end_date;
263 p_object_version_number := l_object_version_number;
264 --
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_ENRLD_ANTHR_PGM_RT;
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_enrld_anthr_pgm_rt_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_ENRLD_ANTHR_PGM_RT;
291 -- NOCOPY Changes
292 p_enrld_anthr_pgm_rt_id := null;
293 p_effective_start_date := null;
294 p_effective_end_date := null;
295 p_object_version_number := null;
296 -- NOCOPY Changes
297 raise;
298 --
299 end create_ENRLD_ANTHR_PGM_RT;
300 -- ----------------------------------------------------------------------------
301 -- |------------------------< update_ENRLD_ANTHR_PGM_RT >--- ------------------|
302 -- ----------------------------------------------------------------------------
303 --
304 procedure update_ENRLD_ANTHR_PGM_RT
305 (p_validate in boolean default false
306 ,p_enrld_anthr_pgm_rt_id in number
307 ,p_effective_start_date out nocopy date
308 ,p_effective_end_date out nocopy date
309 ,p_ordr_num in number default hr_api.g_number
310 ,p_excld_flag in varchar2 default hr_api.g_varchar2
311 ,p_enrl_det_dt_cd in varchar2 default hr_api.g_varchar2
312 ,p_pgm_id in number default hr_api.g_number
313 ,p_vrbl_rt_prfl_id in number default hr_api.g_number
314 ,p_business_group_id in number default hr_api.g_number
315 ,p_epm_attribute_category in varchar2 default hr_api.g_varchar2
316 ,p_epm_attribute1 in varchar2 default hr_api.g_varchar2
317 ,p_epm_attribute2 in varchar2 default hr_api.g_varchar2
318 ,p_epm_attribute3 in varchar2 default hr_api.g_varchar2
319 ,p_epm_attribute4 in varchar2 default hr_api.g_varchar2
320 ,p_epm_attribute5 in varchar2 default hr_api.g_varchar2
321 ,p_epm_attribute6 in varchar2 default hr_api.g_varchar2
322 ,p_epm_attribute7 in varchar2 default hr_api.g_varchar2
323 ,p_epm_attribute8 in varchar2 default hr_api.g_varchar2
324 ,p_epm_attribute9 in varchar2 default hr_api.g_varchar2
325 ,p_epm_attribute10 in varchar2 default hr_api.g_varchar2
326 ,p_epm_attribute11 in varchar2 default hr_api.g_varchar2
327 ,p_epm_attribute12 in varchar2 default hr_api.g_varchar2
328 ,p_epm_attribute13 in varchar2 default hr_api.g_varchar2
329 ,p_epm_attribute14 in varchar2 default hr_api.g_varchar2
330 ,p_epm_attribute15 in varchar2 default hr_api.g_varchar2
331 ,p_epm_attribute16 in varchar2 default hr_api.g_varchar2
332 ,p_epm_attribute17 in varchar2 default hr_api.g_varchar2
333 ,p_epm_attribute18 in varchar2 default hr_api.g_varchar2
334 ,p_epm_attribute19 in varchar2 default hr_api.g_varchar2
335 ,p_epm_attribute20 in varchar2 default hr_api.g_varchar2
336 ,p_epm_attribute21 in varchar2 default hr_api.g_varchar2
337 ,p_epm_attribute22 in varchar2 default hr_api.g_varchar2
338 ,p_epm_attribute23 in varchar2 default hr_api.g_varchar2
339 ,p_epm_attribute24 in varchar2 default hr_api.g_varchar2
340 ,p_epm_attribute25 in varchar2 default hr_api.g_varchar2
341 ,p_epm_attribute26 in varchar2 default hr_api.g_varchar2
342 ,p_epm_attribute27 in varchar2 default hr_api.g_varchar2
343 ,p_epm_attribute28 in varchar2 default hr_api.g_varchar2
344 ,p_epm_attribute29 in varchar2 default hr_api.g_varchar2
345 ,p_epm_attribute30 in varchar2 default hr_api.g_varchar2
346 ,p_object_version_number in out nocopy number
347 ,p_effective_date in date
348 ,p_datetrack_mode in varchar2
349 ) is
350 --
351 -- Declare cursors and local variables
352 --
353 l_proc varchar2(72) := g_package||'update_ENRLD_ANTHR_PGM_RT';
354 l_object_version_number ben_enrld_anthr_pgm_rt_f.object_version_number%TYPE;
355 l_effective_start_date ben_enrld_anthr_pgm_rt_f.effective_start_date%TYPE;
356 l_effective_end_date ben_enrld_anthr_pgm_rt_f.effective_end_date%TYPE;
357 --
358 begin
359 --
360 hr_utility.set_location('Entering:'|| l_proc, 10);
361 --
362 -- Issue a savepoint if operating in validation only mode
363 --
364 savepoint update_ENRLD_ANTHR_PGM_RT;
365 --
366 hr_utility.set_location(l_proc, 20);
367 --
368 -- Process Logic
369 --
370 l_object_version_number := p_object_version_number;
371 --
375 --
372 begin
373 --
374 -- Start of API User Hook for the before hook of update_ENRLD_ANTHR_PGM_RT
376 ben_ENRLD_ANTHR_PGM_RT_bk2.update_ENRLD_ANTHR_PGM_RT_b
377 (
378 p_enrld_anthr_pgm_rt_id => p_enrld_anthr_pgm_rt_id
379 ,p_ordr_num => p_ordr_num
380 ,p_excld_flag => p_excld_flag
381 ,p_enrl_det_dt_cd => p_enrl_det_dt_cd
382 ,p_pgm_id => p_pgm_id
383 ,p_vrbl_rt_prfl_id => p_vrbl_rt_prfl_id
384 ,p_business_group_id => p_business_group_id
385 ,p_epm_attribute_category => p_epm_attribute_category
386 ,p_epm_attribute1 => p_epm_attribute1
387 ,p_epm_attribute2 => p_epm_attribute2
388 ,p_epm_attribute3 => p_epm_attribute3
389 ,p_epm_attribute4 => p_epm_attribute4
390 ,p_epm_attribute5 => p_epm_attribute5
391 ,p_epm_attribute6 => p_epm_attribute6
392 ,p_epm_attribute7 => p_epm_attribute7
393 ,p_epm_attribute8 => p_epm_attribute8
394 ,p_epm_attribute9 => p_epm_attribute9
395 ,p_epm_attribute10 => p_epm_attribute10
396 ,p_epm_attribute11 => p_epm_attribute11
397 ,p_epm_attribute12 => p_epm_attribute12
398 ,p_epm_attribute13 => p_epm_attribute13
399 ,p_epm_attribute14 => p_epm_attribute14
400 ,p_epm_attribute15 => p_epm_attribute15
401 ,p_epm_attribute16 => p_epm_attribute16
402 ,p_epm_attribute17 => p_epm_attribute17
403 ,p_epm_attribute18 => p_epm_attribute18
404 ,p_epm_attribute19 => p_epm_attribute19
405 ,p_epm_attribute20 => p_epm_attribute20
406 ,p_epm_attribute21 => p_epm_attribute21
407 ,p_epm_attribute22 => p_epm_attribute22
408 ,p_epm_attribute23 => p_epm_attribute23
409 ,p_epm_attribute24 => p_epm_attribute24
410 ,p_epm_attribute25 => p_epm_attribute25
411 ,p_epm_attribute26 => p_epm_attribute26
412 ,p_epm_attribute27 => p_epm_attribute27
413 ,p_epm_attribute28 => p_epm_attribute28
414 ,p_epm_attribute29 => p_epm_attribute29
415 ,p_epm_attribute30 => p_epm_attribute30
416 ,p_object_version_number => p_object_version_number
417 ,p_effective_date => trunc(p_effective_date)
418 ,p_datetrack_mode => p_datetrack_mode
419 );
420 exception
421 when hr_api.cannot_find_prog_unit then
422 hr_api.cannot_find_prog_unit_error
423 (p_module_name => 'UPDATE_ENRLD_ANTHR_PGM_RT'
424 ,p_hook_type => 'BP'
425 );
426 --
427 -- End of API User Hook for the before hook of update_ENRLD_ANTHR_PGM_RT
428 --
429 end;
430 --
431 ben_epm_upd.upd
432 (
433 p_enrld_anthr_pgm_rt_id => p_enrld_anthr_pgm_rt_id
434 ,p_effective_start_date => l_effective_start_date
435 ,p_effective_end_date => l_effective_end_date
436 ,p_ordr_num => p_ordr_num
437 ,p_excld_flag => p_excld_flag
438 ,p_enrl_det_dt_cd => p_enrl_det_dt_cd
439 ,p_pgm_id => p_pgm_id
440 ,p_vrbl_rt_prfl_id => p_vrbl_rt_prfl_id
441 ,p_business_group_id => p_business_group_id
442 ,p_epm_attribute_category => p_epm_attribute_category
443 ,p_epm_attribute1 => p_epm_attribute1
444 ,p_epm_attribute2 => p_epm_attribute2
445 ,p_epm_attribute3 => p_epm_attribute3
446 ,p_epm_attribute4 => p_epm_attribute4
447 ,p_epm_attribute5 => p_epm_attribute5
448 ,p_epm_attribute6 => p_epm_attribute6
449 ,p_epm_attribute7 => p_epm_attribute7
450 ,p_epm_attribute8 => p_epm_attribute8
451 ,p_epm_attribute9 => p_epm_attribute9
452 ,p_epm_attribute10 => p_epm_attribute10
453 ,p_epm_attribute11 => p_epm_attribute11
454 ,p_epm_attribute12 => p_epm_attribute12
455 ,p_epm_attribute13 => p_epm_attribute13
456 ,p_epm_attribute14 => p_epm_attribute14
457 ,p_epm_attribute15 => p_epm_attribute15
458 ,p_epm_attribute16 => p_epm_attribute16
459 ,p_epm_attribute17 => p_epm_attribute17
460 ,p_epm_attribute18 => p_epm_attribute18
461 ,p_epm_attribute19 => p_epm_attribute19
462 ,p_epm_attribute20 => p_epm_attribute20
463 ,p_epm_attribute21 => p_epm_attribute21
464 ,p_epm_attribute22 => p_epm_attribute22
465 ,p_epm_attribute23 => p_epm_attribute23
466 ,p_epm_attribute24 => p_epm_attribute24
467 ,p_epm_attribute25 => p_epm_attribute25
468 ,p_epm_attribute26 => p_epm_attribute26
469 ,p_epm_attribute27 => p_epm_attribute27
470 ,p_epm_attribute28 => p_epm_attribute28
471 ,p_epm_attribute29 => p_epm_attribute29
475 ,p_datetrack_mode => p_datetrack_mode
472 ,p_epm_attribute30 => p_epm_attribute30
473 ,p_object_version_number => l_object_version_number
474 ,p_effective_date => trunc(p_effective_date)
476 );
477 --
478 begin
479 --
480 -- Start of API User Hook for the after hook of update_ENRLD_ANTHR_PGM_RT
481 --
482 ben_ENRLD_ANTHR_PGM_RT_bk2.update_ENRLD_ANTHR_PGM_RT_a
483 (
484 p_enrld_anthr_pgm_rt_id => p_enrld_anthr_pgm_rt_id
485 ,p_effective_start_date => l_effective_start_date
486 ,p_effective_end_date => l_effective_end_date
487 ,p_ordr_num => p_ordr_num
488 ,p_excld_flag => p_excld_flag
489 ,p_enrl_det_dt_cd => p_enrl_det_dt_cd
490 ,p_pgm_id => p_pgm_id
491 ,p_vrbl_rt_prfl_id => p_vrbl_rt_prfl_id
492 ,p_business_group_id => p_business_group_id
493 ,p_epm_attribute_category => p_epm_attribute_category
494 ,p_epm_attribute1 => p_epm_attribute1
495 ,p_epm_attribute2 => p_epm_attribute2
496 ,p_epm_attribute3 => p_epm_attribute3
497 ,p_epm_attribute4 => p_epm_attribute4
498 ,p_epm_attribute5 => p_epm_attribute5
499 ,p_epm_attribute6 => p_epm_attribute6
500 ,p_epm_attribute7 => p_epm_attribute7
501 ,p_epm_attribute8 => p_epm_attribute8
502 ,p_epm_attribute9 => p_epm_attribute9
503 ,p_epm_attribute10 => p_epm_attribute10
504 ,p_epm_attribute11 => p_epm_attribute11
505 ,p_epm_attribute12 => p_epm_attribute12
506 ,p_epm_attribute13 => p_epm_attribute13
507 ,p_epm_attribute14 => p_epm_attribute14
508 ,p_epm_attribute15 => p_epm_attribute15
509 ,p_epm_attribute16 => p_epm_attribute16
510 ,p_epm_attribute17 => p_epm_attribute17
511 ,p_epm_attribute18 => p_epm_attribute18
512 ,p_epm_attribute19 => p_epm_attribute19
513 ,p_epm_attribute20 => p_epm_attribute20
514 ,p_epm_attribute21 => p_epm_attribute21
515 ,p_epm_attribute22 => p_epm_attribute22
516 ,p_epm_attribute23 => p_epm_attribute23
517 ,p_epm_attribute24 => p_epm_attribute24
518 ,p_epm_attribute25 => p_epm_attribute25
519 ,p_epm_attribute26 => p_epm_attribute26
520 ,p_epm_attribute27 => p_epm_attribute27
521 ,p_epm_attribute28 => p_epm_attribute28
522 ,p_epm_attribute29 => p_epm_attribute29
523 ,p_epm_attribute30 => p_epm_attribute30
524 ,p_object_version_number => l_object_version_number
525 ,p_effective_date => trunc(p_effective_date)
526 ,p_datetrack_mode => p_datetrack_mode
527 );
528 exception
529 when hr_api.cannot_find_prog_unit then
530 hr_api.cannot_find_prog_unit_error
531 (p_module_name => 'UPDATE_ENRLD_ANTHR_PGM_RT'
532 ,p_hook_type => 'AP'
533 );
534 --
535 -- End of API User Hook for the after hook of update_ENRLD_ANTHR_PGM_RT
536 --
537 end;
538 --
539 hr_utility.set_location(l_proc, 60);
540 --
541 -- When in validation only mode raise the Validate_Enabled exception
542 --
543 if p_validate then
544 raise hr_api.validate_enabled;
545 end if;
546 --
547 -- Set all output arguments
548 --
549 p_object_version_number := l_object_version_number;
550 p_effective_start_date := l_effective_start_date;
551 p_effective_end_date := l_effective_end_date;
552 --
553 hr_utility.set_location(' Leaving:'||l_proc, 70);
554 --
555 exception
556 --
557 when hr_api.validate_enabled then
558 --
559 -- As the Validate_Enabled exception has been raised
560 -- we must rollback to the savepoint
561 --
562 ROLLBACK TO update_ENRLD_ANTHR_PGM_RT;
563 --
564 -- NOCOPY Changes
565 p_effective_start_date := null;
566 p_effective_end_date := null;
567 -- NOCOPY Changes
568
569 -- Only set output warning arguments
570 -- (Any key or derived arguments must be set to null
571 -- when validation only mode is being used.)
572 --
573 hr_utility.set_location(' Leaving:'||l_proc, 80);
574 --
575 when others then
576 --
577 -- A validation or unexpected error has occured
578 --
579 ROLLBACK TO update_ENRLD_ANTHR_PGM_RT;
580 -- NOCOPY Changes
581 p_effective_start_date := null;
582 p_effective_end_date := null;
583 -- NOCOPY Changes
584 raise;
585 --
586 end update_ENRLD_ANTHR_PGM_RT;
587 -- ----------------------------------------------------------------------------
588 -- |------------------------< delete_ENRLD_ANTHR_PGM_RT >----------------------|
589 -- ----------------------------------------------------------------------------
590 --
591 procedure delete_ENRLD_ANTHR_PGM_RT
592 (p_validate in boolean default false
596 ,p_object_version_number in out nocopy number
593 ,p_enrld_anthr_pgm_rt_id in number
594 ,p_effective_start_date out nocopy date
595 ,p_effective_end_date out nocopy date
597 ,p_effective_date in date
598 ,p_datetrack_mode in varchar2
599 ) is
600 --
601 -- Declare cursors and local variables
602 --
603 l_proc varchar2(72) := g_package||'update_ENRLD_ANTHR_PGM_RT';
604 l_object_version_number ben_enrld_anthr_pgm_rt_f.object_version_number%TYPE;
605 l_effective_start_date ben_enrld_anthr_pgm_rt_f.effective_start_date%TYPE;
606 l_effective_end_date ben_enrld_anthr_pgm_rt_f.effective_end_date%TYPE;
607 --
608 begin
609 --
610 hr_utility.set_location('Entering:'|| l_proc, 10);
611 --
612 -- Issue a savepoint if operating in validation only mode
613 --
614 savepoint delete_ENRLD_ANTHR_PGM_RT;
615 --
616 hr_utility.set_location(l_proc, 20);
617 --
618 -- Process Logic
619 --
620 l_object_version_number := p_object_version_number;
621 --
622 --
623 begin
624 --
625 -- Start of API User Hook for the before hook of delete_ENRLD_ANTHR_PGM_RT
626 --
627 ben_ENRLD_ANTHR_PGM_RT_bk3.delete_ENRLD_ANTHR_PGM_RT_b
628 (
629 p_enrld_anthr_pgm_rt_id => p_enrld_anthr_pgm_rt_id
630 ,p_object_version_number => p_object_version_number
631 ,p_effective_date => trunc(p_effective_date)
632 ,p_datetrack_mode => p_datetrack_mode
633 );
634 exception
635 when hr_api.cannot_find_prog_unit then
636 hr_api.cannot_find_prog_unit_error
637 (p_module_name => 'DELETE_ENRLD_ANTHR_PGM_RT'
638 ,p_hook_type => 'BP'
639 );
640 --
641 -- End of API User Hook for the before hook of delete_ENRLD_ANTHR_PGM_RT
642 --
643 end;
644 --
645 ben_epm_del.del
646 (
647 p_enrld_anthr_pgm_rt_id => p_enrld_anthr_pgm_rt_id
648 ,p_effective_start_date => l_effective_start_date
649 ,p_effective_end_date => l_effective_end_date
650 ,p_object_version_number => l_object_version_number
651 ,p_effective_date => p_effective_date
652 ,p_datetrack_mode => p_datetrack_mode
653 );
654 --
655 begin
656 --
657 -- Start of API User Hook for the after hook of delete_ENRLD_ANTHR_PGM_RT
658 --
659 ben_ENRLD_ANTHR_PGM_RT_bk3.delete_ENRLD_ANTHR_PGM_RT_a
660 (
661 p_enrld_anthr_pgm_rt_id => p_enrld_anthr_pgm_rt_id
662 ,p_effective_start_date => l_effective_start_date
663 ,p_effective_end_date => l_effective_end_date
664 ,p_object_version_number => l_object_version_number
665 ,p_effective_date => trunc(p_effective_date)
666 ,p_datetrack_mode => p_datetrack_mode
667 );
668 exception
669 when hr_api.cannot_find_prog_unit then
670 hr_api.cannot_find_prog_unit_error
671 (p_module_name => 'DELETE_ENRLD_ANTHR_PGM_RT'
672 ,p_hook_type => 'AP'
673 );
674 --
675 -- End of API User Hook for the after hook of delete_ENRLD_ANTHR_PGM_RT
676 --
677 end;
678 --
679 ben_profile_handler.event_handler
680 (p_event => 'DELETE',
681 p_base_table => 'BEN_VRBL_RT_PRFL_F',
682 p_base_table_column => 'VRBL_RT_PRFL_ID',
683 p_base_table_column_value => ben_epm_shd.g_old_rec.vrbl_rt_prfl_id,
684 p_base_table_reference_column => 'RT_ENRLD_PGM_FLAG',
685 p_reference_table => 'BEN_ENRLD_ANTHR_PGM_RT_F',
686 p_reference_table_column => 'VRBL_RT_PRFL_ID');
687 --
688 hr_utility.set_location(l_proc, 60);
689 --
690 -- When in validation only mode raise the Validate_Enabled exception
691 --
692 if p_validate then
693 raise hr_api.validate_enabled;
694 end if;
695 --
696 hr_utility.set_location(' Leaving:'||l_proc, 70);
697 --
698 exception
699 --
700 when hr_api.validate_enabled then
701 --
702 -- As the Validate_Enabled exception has been raised
703 -- we must rollback to the savepoint
704 --
705 ROLLBACK TO delete_ENRLD_ANTHR_PGM_RT;
706 --
707 -- Only set output warning arguments
708 -- (Any key or derived arguments must be set to null
709 -- when validation only mode is being used.)
710 --
711 p_effective_start_date := null;
712 p_effective_end_date := null;
713 --
714 when others then
715 --
716 -- A validation or unexpected error has occured
717 --
718 ROLLBACK TO delete_ENRLD_ANTHR_PGM_RT;
719 -- NOCOPY Changes
720 p_effective_start_date := null;
721 p_effective_end_date := null;
722 -- NOCOPY Changes
723
724 raise;
725 --
726 end delete_ENRLD_ANTHR_PGM_RT;
727 --
728 -- ----------------------------------------------------------------------------
729 -- |-------------------------------< lck >------------------------------------|
730 -- ----------------------------------------------------------------------------
731 --
732 procedure lck
733 (
734 p_enrld_anthr_pgm_rt_id in number
735 ,p_object_version_number in number
739 ,p_validation_end_date out nocopy date
736 ,p_effective_date in date
737 ,p_datetrack_mode in varchar2
738 ,p_validation_start_date out nocopy date
740 ) is
741 --
742 --
743 -- Declare cursors and local variables
744 --
745 l_proc varchar2(72) := g_package||'lck';
746 l_validation_start_date date;
747 l_validation_end_date date;
748 --
749 begin
750 --
751 hr_utility.set_location('Entering:'|| l_proc, 10);
752 --
753 ben_epm_shd.lck
754 (
755 p_enrld_anthr_pgm_rt_id => p_enrld_anthr_pgm_rt_id
756 ,p_validation_start_date => l_validation_start_date
757 ,p_validation_end_date => l_validation_end_date
758 ,p_object_version_number => p_object_version_number
759 ,p_effective_date => p_effective_date
760 ,p_datetrack_mode => p_datetrack_mode
761 );
762 --
763 hr_utility.set_location(' Leaving:'||l_proc, 70);
764 --
765 end lck;
766 --
767 end ben_ENRLD_ANTHR_PGM_RT_api;