[Home] [Help]
PACKAGE BODY: APPS.BEN_ELIGY_CRIT_VALUES_API
Source
1 Package body ben_eligy_crit_values_api as
2 /* $Header: beecvapi.pkb 120.1 2005/07/29 09:50:56 rbingi noship $ */
3 --
4 -- Package Variables
5 --
6 g_package varchar2(33) := ' ben_eligy_crit_values_api.';
7 --
8 -- ----------------------------------------------------------------------------
9 -- |------------------------< create_eligy_crit_values >----------------------|
10 -- ----------------------------------------------------------------------------
11 --
12
13 procedure create_eligy_crit_values
14 (
15 p_validate In Boolean default false
16 ,p_eligy_crit_values_id Out nocopy Number
17 ,p_eligy_prfl_id In Number default NULL
18 ,p_eligy_criteria_id In Number default NULL
19 ,p_effective_start_date Out nocopy Date
20 ,p_effective_end_date Out nocopy Date
21 ,p_ordr_num In Number default NULL
22 ,p_number_value1 In Number default NULL
23 ,p_number_value2 In Number default NULL
24 ,p_char_value1 In Varchar2 default NULL
25 ,p_char_value2 In Varchar2 default NULL
26 ,p_date_value1 In Date default NULL
27 ,p_date_value2 In Date default NULL
28 ,p_excld_flag In Varchar2 default 'N'
29 ,p_business_group_id In Number default NULL
30 ,p_ecv_attribute_category In Varchar2 default NULL
31 ,p_ecv_attribute1 In Varchar2 default NULL
32 ,p_ecv_attribute2 In Varchar2 default NULL
33 ,p_ecv_attribute3 In Varchar2 default NULL
34 ,p_ecv_attribute4 In Varchar2 default NULL
35 ,p_ecv_attribute5 In Varchar2 default NULL
36 ,p_ecv_attribute6 In Varchar2 default NULL
37 ,p_ecv_attribute7 In Varchar2 default NULL
38 ,p_ecv_attribute8 In Varchar2 default NULL
39 ,p_ecv_attribute9 In Varchar2 default NULL
40 ,p_ecv_attribute10 In Varchar2 default NULL
41 ,p_ecv_attribute11 In Varchar2 default NULL
42 ,p_ecv_attribute12 In Varchar2 default NULL
43 ,p_ecv_attribute13 In Varchar2 default NULL
44 ,p_ecv_attribute14 In Varchar2 default NULL
45 ,p_ecv_attribute15 In Varchar2 default NULL
46 ,p_ecv_attribute16 In Varchar2 default NULL
47 ,p_ecv_attribute17 In Varchar2 default NULL
48 ,p_ecv_attribute18 In Varchar2 default NULL
49 ,p_ecv_attribute19 In Varchar2 default NULL
50 ,p_ecv_attribute20 In Varchar2 default NULL
51 ,p_ecv_attribute21 In Varchar2 default NULL
52 ,p_ecv_attribute22 In Varchar2 default NULL
53 ,p_ecv_attribute23 In Varchar2 default NULL
54 ,p_ecv_attribute24 In Varchar2 default NULL
55 ,p_ecv_attribute25 In Varchar2 default NULL
56 ,p_ecv_attribute26 In Varchar2 default NULL
57 ,p_ecv_attribute27 In Varchar2 default NULL
58 ,p_ecv_attribute28 In Varchar2 default NULL
59 ,p_ecv_attribute29 In Varchar2 default NULL
60 ,p_ecv_attribute30 In Varchar2 default NULL
61 ,p_object_version_number Out nocopy Number
62 ,p_effective_date In Date
63 ,p_criteria_score In Number default NULL
64 ,p_criteria_weight In Number default NULL
65 ,p_char_value3 In Varchar2 default NULL
66 ,p_char_value4 In Varchar2 default NULL
67 ,p_number_value3 In Number default NULL
68 ,p_number_value4 In Number default NULL
69 ,p_date_value3 In Date default NULL
70 ,p_date_value4 In Date default NULL
71 ) is
72 --
73 -- Declare cursors and local variables
74 --
75 l_eligy_crit_values_id ben_eligy_crit_values_f.eligy_crit_values_id%TYPE;
76 l_effective_start_date ben_eligy_crit_values_f.effective_start_date%TYPE;
77 l_effective_end_date ben_eligy_crit_values_f.effective_end_date%TYPE;
78 l_proc varchar2(72) := g_package||'create_eligy_crit_values';
79 l_object_version_number ben_eligy_crit_values_f.object_version_number%TYPE;
80 --
81 begin
82 --
83 hr_utility.set_location('Entering:'|| l_proc, 10);
84 --
85 -- Issue a savepoint if operating in validation only mode
86 --
87 savepoint create_eligy_crit_values;
88 --
89 hr_utility.set_location(l_proc, 20);
90 --
91 -- Process Logic
92 --
93 begin
94 --
95 -- Start of API User Hook for the before hook of create_eligy_crit_values
96 --
97
98 ben_eligy_crit_values_bk1.create_eligy_crit_values_b
99 (
100 p_eligy_prfl_id => p_eligy_prfl_id,
101 p_eligy_criteria_id => p_eligy_criteria_id,
102 p_ordr_num => p_ordr_num,
103 p_number_value1 => p_number_value1,
104 p_number_value2 => p_number_value2,
105 p_char_value1 => p_char_value1,
106 p_char_value2 => p_char_value2,
107 p_date_value1 => p_date_value1,
108 p_date_value2 => p_date_value2,
109 p_excld_flag => p_excld_flag,
110 p_business_group_id => p_business_group_id,
111 p_ecv_attribute_category => p_ecv_attribute_category,
112 p_ecv_attribute1 => p_ecv_attribute1,
113 p_ecv_attribute2 => p_ecv_attribute2,
114 p_ecv_attribute3 => p_ecv_attribute3,
115 p_ecv_attribute4 => p_ecv_attribute4,
116 p_ecv_attribute5 => p_ecv_attribute5,
117 p_ecv_attribute6 => p_ecv_attribute6,
118 p_ecv_attribute7 => p_ecv_attribute7,
119 p_ecv_attribute8 => p_ecv_attribute8,
120 p_ecv_attribute9 => p_ecv_attribute9,
121 p_ecv_attribute10 => p_ecv_attribute10,
122 p_ecv_attribute11 => p_ecv_attribute11,
123 p_ecv_attribute12 => p_ecv_attribute12,
124 p_ecv_attribute13 => p_ecv_attribute13,
125 p_ecv_attribute14 => p_ecv_attribute14,
126 p_ecv_attribute15 => p_ecv_attribute15,
127 p_ecv_attribute16 => p_ecv_attribute16,
128 p_ecv_attribute17 => p_ecv_attribute17,
129 p_ecv_attribute18 => p_ecv_attribute18,
130 p_ecv_attribute19 => p_ecv_attribute19,
131 p_ecv_attribute20 => p_ecv_attribute20,
132 p_ecv_attribute21 => p_ecv_attribute21,
133 p_ecv_attribute22 => p_ecv_attribute22,
134 p_ecv_attribute23 => p_ecv_attribute23,
135 p_ecv_attribute24 => p_ecv_attribute24,
136 p_ecv_attribute25 => p_ecv_attribute25,
137 p_ecv_attribute26 => p_ecv_attribute26,
138 p_ecv_attribute27 => p_ecv_attribute27,
139 p_ecv_attribute28 => p_ecv_attribute28,
140 p_ecv_attribute29 => p_ecv_attribute29,
141 p_ecv_attribute30 => p_ecv_attribute30,
142 p_effective_date => trunc(p_effective_date),
143 p_criteria_score => p_criteria_score,
144 p_criteria_weight => p_criteria_weight,
145 p_char_value3 => p_char_value3,
146 p_char_value4 => p_char_value4,
147 p_number_value3 => p_number_value3,
148 p_number_value4 => p_number_value4,
149 p_date_value3 => p_date_value3,
150 p_date_value4 => p_date_value4
151 );
152 exception
153 when hr_api.cannot_find_prog_unit then
154 hr_api.cannot_find_prog_unit_error
155 (
156 p_module_name => 'CREATE_eligy_crit_values'
157 ,p_hook_type => 'BP'
158 );
159 --
160 -- End of API User Hook for the before hook of create_eligy_crit_values
161 --
162 end;
163 --
164 ben_ecv_ins.ins
165 (
166 p_eligy_crit_values_id => l_eligy_crit_values_id,
167 p_eligy_prfl_id => p_eligy_prfl_id,
168 p_eligy_criteria_id => p_eligy_criteria_id,
169 p_effective_start_date => l_effective_start_date,
170 p_effective_end_date => l_effective_end_date,
171 p_ordr_num => p_ordr_num,
172 p_number_value1 => p_number_value1,
173 p_number_value2 => p_number_value2,
174 p_char_value1 => p_char_value1,
175 p_char_value2 => p_char_value2,
176 p_date_value1 => p_date_value1,
177 p_date_value2 => p_date_value2,
178 p_excld_flag => p_excld_flag,
179 p_business_group_id => p_business_group_id,
180 p_ecv_attribute_category => p_ecv_attribute_category,
181 p_ecv_attribute1 => p_ecv_attribute1,
182 p_ecv_attribute2 => p_ecv_attribute2,
183 p_ecv_attribute3 => p_ecv_attribute3,
184 p_ecv_attribute4 => p_ecv_attribute4,
185 p_ecv_attribute5 => p_ecv_attribute5,
186 p_ecv_attribute6 => p_ecv_attribute6,
187 p_ecv_attribute7 => p_ecv_attribute7,
188 p_ecv_attribute8 => p_ecv_attribute8,
189 p_ecv_attribute9 => p_ecv_attribute9,
190 p_ecv_attribute10 => p_ecv_attribute10,
191 p_ecv_attribute11 => p_ecv_attribute11,
192 p_ecv_attribute12 => p_ecv_attribute12,
193 p_ecv_attribute13 => p_ecv_attribute13,
194 p_ecv_attribute14 => p_ecv_attribute14,
195 p_ecv_attribute15 => p_ecv_attribute15,
196 p_ecv_attribute16 => p_ecv_attribute16,
197 p_ecv_attribute17 => p_ecv_attribute17,
198 p_ecv_attribute18 => p_ecv_attribute18,
199 p_ecv_attribute19 => p_ecv_attribute19,
200 p_ecv_attribute20 => p_ecv_attribute20,
201 p_ecv_attribute21 => p_ecv_attribute21,
202 p_ecv_attribute22 => p_ecv_attribute22,
203 p_ecv_attribute23 => p_ecv_attribute23,
204 p_ecv_attribute24 => p_ecv_attribute24,
205 p_ecv_attribute25 => p_ecv_attribute25,
206 p_ecv_attribute26 => p_ecv_attribute26,
207 p_ecv_attribute27 => p_ecv_attribute27,
208 p_ecv_attribute28 => p_ecv_attribute28,
209 p_ecv_attribute29 => p_ecv_attribute29,
210 p_ecv_attribute30 => p_ecv_attribute30,
211 p_object_version_number => l_object_version_number,
212 p_effective_date => trunc(p_effective_date),
213 p_criteria_score => p_criteria_score,
214 p_criteria_weight => p_criteria_weight,
215 p_char_value3 => p_char_value3,
216 p_char_value4 => p_char_value4,
217 p_number_value3 => p_number_value3,
218 p_number_value4 => p_number_value4,
219 p_date_value3 => p_date_value3,
220 p_date_value4 => p_date_value4
221 );
222
223 begin
224
225 --
226 -- Start of API User Hook for the after hook of create_eligy_crit_values
227 --
228
229 ben_eligy_crit_values_bk1.create_eligy_crit_values_a
230 (
231 p_eligy_crit_values_id => l_eligy_crit_values_id,
232 p_eligy_prfl_id => p_eligy_prfl_id,
233 p_eligy_criteria_id => p_eligy_criteria_id,
234 p_effective_start_date => l_effective_start_date,
235 p_effective_end_date => l_effective_end_date,
236 p_ordr_num => p_ordr_num,
237 p_number_value1 => p_number_value1,
238 p_number_value2 => p_number_value2,
239 p_char_value1 => p_char_value1,
240 p_char_value2 => p_char_value2,
241 p_date_value1 => p_date_value1,
242 p_date_value2 => p_date_value2,
243 p_excld_flag => p_excld_flag,
244 p_business_group_id => p_business_group_id,
245 p_ecv_attribute_category => p_ecv_attribute_category,
246 p_ecv_attribute1 => p_ecv_attribute1,
247 p_ecv_attribute2 => p_ecv_attribute2,
248 p_ecv_attribute3 => p_ecv_attribute3,
249 p_ecv_attribute4 => p_ecv_attribute4,
250 p_ecv_attribute5 => p_ecv_attribute5,
251 p_ecv_attribute6 => p_ecv_attribute6,
252 p_ecv_attribute7 => p_ecv_attribute7,
253 p_ecv_attribute8 => p_ecv_attribute8,
254 p_ecv_attribute9 => p_ecv_attribute9,
255 p_ecv_attribute10 => p_ecv_attribute10,
256 p_ecv_attribute11 => p_ecv_attribute11,
257 p_ecv_attribute12 => p_ecv_attribute12,
258 p_ecv_attribute13 => p_ecv_attribute13,
259 p_ecv_attribute14 => p_ecv_attribute14,
260 p_ecv_attribute15 => p_ecv_attribute15,
261 p_ecv_attribute16 => p_ecv_attribute16,
262 p_ecv_attribute17 => p_ecv_attribute17,
263 p_ecv_attribute18 => p_ecv_attribute18,
264 p_ecv_attribute19 => p_ecv_attribute19,
265 p_ecv_attribute20 => p_ecv_attribute20,
266 p_ecv_attribute21 => p_ecv_attribute21,
267 p_ecv_attribute22 => p_ecv_attribute22,
268 p_ecv_attribute23 => p_ecv_attribute23,
269 p_ecv_attribute24 => p_ecv_attribute24,
270 p_ecv_attribute25 => p_ecv_attribute25,
271 p_ecv_attribute26 => p_ecv_attribute26,
272 p_ecv_attribute27 => p_ecv_attribute27,
273 p_ecv_attribute28 => p_ecv_attribute28,
274 p_ecv_attribute29 => p_ecv_attribute29,
275 p_ecv_attribute30 => p_ecv_attribute30,
276 p_object_version_number => l_object_version_number,
277 p_effective_date => trunc(p_effective_date),
278 p_criteria_score => p_criteria_score,
279 p_criteria_weight => p_criteria_weight,
280 p_char_value3 => p_char_value3,
281 p_char_value4 => p_char_value4,
282 p_number_value3 => p_number_value3,
283 p_number_value4 => p_number_value4,
284 p_date_value3 => p_date_value3,
285 p_date_value4 => p_date_value4
286 );
287 exception
288 when hr_api.cannot_find_prog_unit then
289 hr_api.cannot_find_prog_unit_error
290 (p_module_name => 'CREATE_eligy_crit_values'
291 ,p_hook_type => 'AP'
292 );
293
294 --
295 -- End of API User Hook for the after hook of create_eligy_crit_values
296 --
297 end;
298 --
299 ben_profile_handler.event_handler
300 (p_event => 'CREATE',
301 p_base_table => 'BEN_ELIGY_PRFL_F',
302 p_base_table_column => 'ELIGY_PRFL_ID',
303 p_base_table_column_value => p_eligy_prfl_id,
304 p_base_table_reference_column => 'ELIG_CRIT_VALUES_FLAG',
305 p_reference_table => 'BEN_ELIGY_CRIT_VALUES_F',
306 p_reference_table_column => 'ELIGY_PRFL_ID');
307 --
308 hr_utility.set_location(l_proc, 60);
309 --
310 -- When in validation only mode raise the Validate_Enabled exception
311 --
312 if p_validate then
313 raise hr_api.validate_enabled;
314 end if;
315 --
316 -- Set all output arguments
317 --
318 p_eligy_crit_values_id := l_eligy_crit_values_id;
319 p_effective_start_date := l_effective_start_date;
320 p_effective_end_date := l_effective_end_date;
321 p_object_version_number := l_object_version_number;
322 --
323 hr_utility.set_location(' Leaving:'||l_proc, 70);
324 --
325 exception
326 --
327 when hr_api.validate_enabled then
328 --
329 -- As the Validate_Enabled exception has been raised
330 -- we must rollback to the savepoint
331 --
332 ROLLBACK TO create_eligy_crit_values;
333 --
334 -- Only set output warning arguments
335 -- (Any key or derived arguments must be set to null
336 -- when validation only mode is being used.)
337 --
338 p_eligy_crit_values_id := NULL;
339 p_effective_start_date := NULL;
340 p_effective_end_date := NULL;
341 p_object_version_number := NULL;
342 hr_utility.set_location(' Leaving:'||l_proc, 80);
343 --
344 when others then
345 --
346 -- A validation or unexpected error has occured
347 --
348 ROLLBACK TO create_eligy_crit_values;
349 -- Added the following code for NOCOPY Changes.
350 p_eligy_crit_values_id := NULL;
351 p_effective_start_date := NULL;
352 p_effective_end_date := NULL;
353 p_object_version_number := NULL;
354 -- Added the above code for NOCOPY Changes.
355 raise;
356 --
357 end create_eligy_crit_values;
358
359 -- ----------------------------------------------------------------------------
360 -- |------------------------< update_eligy_crit_values >--- ------------------|
361 -- ----------------------------------------------------------------------------
362 --
363 procedure update_eligy_crit_values
364 (
365 p_validate In Boolean default false
366 ,p_eligy_crit_values_id In Number
367 ,p_eligy_prfl_id In Number default hr_api.g_number
368 ,p_eligy_criteria_id In Number default hr_api.g_number
369 ,p_effective_start_date Out nocopy Date
370 ,p_effective_end_date Out nocopy Date
371 ,p_ordr_num In Number default hr_api.g_number
372 ,p_number_value1 In Number default hr_api.g_number
373 ,p_number_value2 In Number default hr_api.g_number
374 ,p_char_value1 In Varchar2 default hr_api.g_varchar2
375 ,p_char_value2 In Varchar2 default hr_api.g_varchar2
376 ,p_date_value1 In Date default hr_api.g_date
377 ,p_date_value2 In Date default hr_api.g_date
378 ,p_excld_flag In Varchar2 default hr_api.g_varchar2
379 ,p_business_group_id In Number default hr_api.g_number
380 ,p_ecv_attribute_category In Varchar2 default hr_api.g_varchar2
381 ,p_ecv_attribute1 In Varchar2 default hr_api.g_varchar2
382 ,p_ecv_attribute2 In Varchar2 default hr_api.g_varchar2
383 ,p_ecv_attribute3 In Varchar2 default hr_api.g_varchar2
384 ,p_ecv_attribute4 In Varchar2 default hr_api.g_varchar2
385 ,p_ecv_attribute5 In Varchar2 default hr_api.g_varchar2
386 ,p_ecv_attribute6 In Varchar2 default hr_api.g_varchar2
387 ,p_ecv_attribute7 In Varchar2 default hr_api.g_varchar2
388 ,p_ecv_attribute8 In Varchar2 default hr_api.g_varchar2
389 ,p_ecv_attribute9 In Varchar2 default hr_api.g_varchar2
390 ,p_ecv_attribute10 In Varchar2 default hr_api.g_varchar2
391 ,p_ecv_attribute11 In Varchar2 default hr_api.g_varchar2
392 ,p_ecv_attribute12 In Varchar2 default hr_api.g_varchar2
393 ,p_ecv_attribute13 In Varchar2 default hr_api.g_varchar2
394 ,p_ecv_attribute14 In Varchar2 default hr_api.g_varchar2
395 ,p_ecv_attribute15 In Varchar2 default hr_api.g_varchar2
396 ,p_ecv_attribute16 In Varchar2 default hr_api.g_varchar2
397 ,p_ecv_attribute17 In Varchar2 default hr_api.g_varchar2
398 ,p_ecv_attribute18 In Varchar2 default hr_api.g_varchar2
399 ,p_ecv_attribute19 In Varchar2 default hr_api.g_varchar2
400 ,p_ecv_attribute20 In Varchar2 default hr_api.g_varchar2
401 ,p_ecv_attribute21 In Varchar2 default hr_api.g_varchar2
402 ,p_ecv_attribute22 In Varchar2 default hr_api.g_varchar2
403 ,p_ecv_attribute23 In Varchar2 default hr_api.g_varchar2
404 ,p_ecv_attribute24 In Varchar2 default hr_api.g_varchar2
405 ,p_ecv_attribute25 In Varchar2 default hr_api.g_varchar2
406 ,p_ecv_attribute26 In Varchar2 default hr_api.g_varchar2
407 ,p_ecv_attribute27 In Varchar2 default hr_api.g_varchar2
408 ,p_ecv_attribute28 In Varchar2 default hr_api.g_varchar2
409 ,p_ecv_attribute29 In Varchar2 default hr_api.g_varchar2
410 ,p_ecv_attribute30 In Varchar2 default hr_api.g_varchar2
411 ,p_object_version_number In Out nocopy Number
412 ,p_effective_date In Date
413 ,p_datetrack_mode In varchar2
414 ,p_criteria_score In Number default hr_api.g_number
415 ,p_criteria_weight In Number default hr_api.g_number
416 ,p_char_value3 In Varchar2 default hr_api.g_varchar2
417 ,p_char_value4 In Varchar2 default hr_api.g_varchar2
418 ,p_number_value3 In Number default hr_api.g_number
419 ,p_number_value4 In Number default hr_api.g_number
420 ,p_date_value3 In Date default hr_api.g_date
421 ,p_date_value4 In Date default hr_api.g_date
422 ) is
423 --
424 -- Declare cursors and local variables
425 --
426 l_proc varchar2(72) := g_package||'update_eligy_crit_values';
427 l_object_version_number ben_eligy_crit_values_f.object_version_number%TYPE;
428 l_effective_start_date ben_eligy_crit_values_f.effective_start_date%TYPE;
429 l_effective_end_date ben_eligy_crit_values_f.effective_end_date%TYPE;
430 --
431 begin
432 --
433 hr_utility.set_location('Entering:'|| l_proc, 10);
434 --
435 -- Issue a savepoint if operating in validation only mode
436 --
437 savepoint update_eligy_crit_values;
438 --
439 hr_utility.set_location(l_proc, 20);
440 --
441 -- Process Logic
442 --
443 l_object_version_number := p_object_version_number;
444 --
445 begin
446 --
447 -- Start of API User Hook for the before hook of update_eligy_crit_values
448 --
449 ben_eligy_crit_values_bk2.update_eligy_crit_values_b
450 (
451 p_eligy_crit_values_id => p_eligy_crit_values_id,
452 p_eligy_prfl_id => p_eligy_prfl_id,
453 p_eligy_criteria_id => p_eligy_criteria_id,
454 p_ordr_num => p_ordr_num,
455 p_number_value1 => p_number_value1,
456 p_number_value2 => p_number_value2,
457 p_char_value1 => p_char_value1,
458 p_char_value2 => p_char_value2,
459 p_date_value1 => p_date_value1,
460 p_date_value2 => p_date_value2,
461 p_excld_flag => p_excld_flag,
462 p_business_group_id => p_business_group_id,
463 p_ecv_attribute_category => p_ecv_attribute_category,
464 p_ecv_attribute1 => p_ecv_attribute1,
465 p_ecv_attribute2 => p_ecv_attribute2,
466 p_ecv_attribute3 => p_ecv_attribute3,
467 p_ecv_attribute4 => p_ecv_attribute4,
468 p_ecv_attribute5 => p_ecv_attribute5,
469 p_ecv_attribute6 => p_ecv_attribute6,
470 p_ecv_attribute7 => p_ecv_attribute7,
471 p_ecv_attribute8 => p_ecv_attribute8,
472 p_ecv_attribute9 => p_ecv_attribute9,
473 p_ecv_attribute10 => p_ecv_attribute10,
474 p_ecv_attribute11 => p_ecv_attribute11,
475 p_ecv_attribute12 => p_ecv_attribute12,
476 p_ecv_attribute13 => p_ecv_attribute13,
477 p_ecv_attribute14 => p_ecv_attribute14,
478 p_ecv_attribute15 => p_ecv_attribute15,
479 p_ecv_attribute16 => p_ecv_attribute16,
480 p_ecv_attribute17 => p_ecv_attribute17,
481 p_ecv_attribute18 => p_ecv_attribute18,
482 p_ecv_attribute19 => p_ecv_attribute19,
483 p_ecv_attribute20 => p_ecv_attribute20,
484 p_ecv_attribute21 => p_ecv_attribute21,
485 p_ecv_attribute22 => p_ecv_attribute22,
486 p_ecv_attribute23 => p_ecv_attribute23,
487 p_ecv_attribute24 => p_ecv_attribute24,
488 p_ecv_attribute25 => p_ecv_attribute25,
489 p_ecv_attribute26 => p_ecv_attribute26,
490 p_ecv_attribute27 => p_ecv_attribute27,
491 p_ecv_attribute28 => p_ecv_attribute28,
492 p_ecv_attribute29 => p_ecv_attribute29,
493 p_ecv_attribute30 => p_ecv_attribute30,
494 p_object_version_number => p_object_version_number,
495 p_effective_date => trunc(p_effective_date),
496 p_datetrack_mode => p_datetrack_mode,
497 p_criteria_score => p_criteria_score,
498 p_criteria_weight => p_criteria_weight,
499 p_char_value3 => p_char_value3,
500 p_char_value4 => p_char_value4,
501 p_number_value3 => p_number_value3,
502 p_number_value4 => p_number_value4,
503 p_date_value3 => p_date_value3,
504 p_date_value4 => p_date_value4
505 );
506 exception
507 when hr_api.cannot_find_prog_unit then
508 hr_api.cannot_find_prog_unit_error
509 (p_module_name => 'UPDATE_eligy_crit_values'
510 ,p_hook_type => 'BP'
511 );
512 --
513 -- End of API User Hook for the before hook of update_eligy_crit_values
514 --
515 end;
516 --
517 ben_ecv_upd.upd
518 (
519 p_eligy_crit_values_id => p_eligy_crit_values_id,
520 p_effective_start_date => l_effective_start_date,
521 p_effective_end_date => l_effective_end_date,
522 p_eligy_prfl_id => p_eligy_prfl_id,
523 p_eligy_criteria_id => p_eligy_criteria_id,
524 p_ordr_num => p_ordr_num,
525 p_number_value1 => p_number_value1,
526 p_number_value2 => p_number_value2,
527 p_char_value1 => p_char_value1,
528 p_char_value2 => p_char_value2,
529 p_date_value1 => p_date_value1,
530 p_date_value2 => p_date_value2,
531 p_excld_flag => p_excld_flag,
532 p_business_group_id => p_business_group_id,
533 p_ecv_attribute_category => p_ecv_attribute_category,
534 p_ecv_attribute1 => p_ecv_attribute1,
535 p_ecv_attribute2 => p_ecv_attribute2,
536 p_ecv_attribute3 => p_ecv_attribute3,
537 p_ecv_attribute4 => p_ecv_attribute4,
538 p_ecv_attribute5 => p_ecv_attribute5,
539 p_ecv_attribute6 => p_ecv_attribute6,
540 p_ecv_attribute7 => p_ecv_attribute7,
541 p_ecv_attribute8 => p_ecv_attribute8,
542 p_ecv_attribute9 => p_ecv_attribute9,
543 p_ecv_attribute10 => p_ecv_attribute10,
544 p_ecv_attribute11 => p_ecv_attribute11,
545 p_ecv_attribute12 => p_ecv_attribute12,
546 p_ecv_attribute13 => p_ecv_attribute13,
547 p_ecv_attribute14 => p_ecv_attribute14,
548 p_ecv_attribute15 => p_ecv_attribute15,
549 p_ecv_attribute16 => p_ecv_attribute16,
550 p_ecv_attribute17 => p_ecv_attribute17,
551 p_ecv_attribute18 => p_ecv_attribute18,
552 p_ecv_attribute19 => p_ecv_attribute19,
553 p_ecv_attribute20 => p_ecv_attribute20,
554 p_ecv_attribute21 => p_ecv_attribute21,
555 p_ecv_attribute22 => p_ecv_attribute22,
556 p_ecv_attribute23 => p_ecv_attribute23,
557 p_ecv_attribute24 => p_ecv_attribute24,
558 p_ecv_attribute25 => p_ecv_attribute25,
559 p_ecv_attribute26 => p_ecv_attribute26,
560 p_ecv_attribute27 => p_ecv_attribute27,
561 p_ecv_attribute28 => p_ecv_attribute28,
562 p_ecv_attribute29 => p_ecv_attribute29,
563 p_ecv_attribute30 => p_ecv_attribute30,
564 p_object_version_number => l_object_version_number,
565 p_effective_date => trunc(p_effective_date),
566 p_datetrack_mode => p_datetrack_mode,
567 p_criteria_score => p_criteria_score,
568 p_criteria_weight => p_criteria_weight,
569 p_char_value3 => p_char_value3,
570 p_char_value4 => p_char_value4,
571 p_number_value3 => p_number_value3,
572 p_number_value4 => p_number_value4,
573 p_date_value3 => p_date_value3,
574 p_date_value4 => p_date_value4
575 );
576 --
577 begin
578 NULL;
579 --
580 -- Start of API User Hook for the after hook of update_eligy_crit_values
581 --
582
583 ben_eligy_crit_values_bk2.update_eligy_crit_values_a
584 (
585 p_eligy_crit_values_id => p_eligy_crit_values_id,
586 p_eligy_prfl_id => p_eligy_prfl_id,
587 p_eligy_criteria_id => p_eligy_criteria_id,
588 p_effective_start_date => p_effective_start_date,
589 p_effective_end_date => p_effective_end_date,
590 p_ordr_num => p_ordr_num,
591 p_number_value1 => p_number_value1,
592 p_number_value2 => p_number_value2,
593 p_char_value1 => p_char_value1,
594 p_char_value2 => p_char_value2,
595 p_date_value1 => p_date_value1,
596 p_date_value2 => p_date_value2,
597 p_excld_flag => p_excld_flag,
598 p_business_group_id => p_business_group_id,
599 p_ecv_attribute_category => p_ecv_attribute_category,
600 p_ecv_attribute1 => p_ecv_attribute1,
601 p_ecv_attribute2 => p_ecv_attribute2,
602 p_ecv_attribute3 => p_ecv_attribute3,
603 p_ecv_attribute4 => p_ecv_attribute4,
604 p_ecv_attribute5 => p_ecv_attribute5,
605 p_ecv_attribute6 => p_ecv_attribute6,
606 p_ecv_attribute7 => p_ecv_attribute7,
607 p_ecv_attribute8 => p_ecv_attribute8,
608 p_ecv_attribute9 => p_ecv_attribute9,
609 p_ecv_attribute10 => p_ecv_attribute10,
610 p_ecv_attribute11 => p_ecv_attribute11,
611 p_ecv_attribute12 => p_ecv_attribute12,
612 p_ecv_attribute13 => p_ecv_attribute13,
613 p_ecv_attribute14 => p_ecv_attribute14,
614 p_ecv_attribute15 => p_ecv_attribute15,
615 p_ecv_attribute16 => p_ecv_attribute16,
616 p_ecv_attribute17 => p_ecv_attribute17,
617 p_ecv_attribute18 => p_ecv_attribute18,
618 p_ecv_attribute19 => p_ecv_attribute19,
619 p_ecv_attribute20 => p_ecv_attribute20,
620 p_ecv_attribute21 => p_ecv_attribute21,
621 p_ecv_attribute22 => p_ecv_attribute22,
622 p_ecv_attribute23 => p_ecv_attribute23,
623 p_ecv_attribute24 => p_ecv_attribute24,
624 p_ecv_attribute25 => p_ecv_attribute25,
625 p_ecv_attribute26 => p_ecv_attribute26,
626 p_ecv_attribute27 => p_ecv_attribute27,
627 p_ecv_attribute28 => p_ecv_attribute28,
628 p_ecv_attribute29 => p_ecv_attribute29,
629 p_ecv_attribute30 => p_ecv_attribute30,
630 p_object_version_number => l_object_version_number,
631 p_effective_date => trunc(p_effective_date),
632 p_datetrack_mode => p_datetrack_mode,
633 p_criteria_score => p_criteria_score,
634 p_criteria_weight => p_criteria_weight,
635 p_char_value3 => p_char_value3,
636 p_char_value4 => p_char_value4,
637 p_number_value3 => p_number_value3,
638 p_number_value4 => p_number_value4,
639 p_date_value3 => p_date_value3,
640 p_date_value4 => p_date_value4
641 );
642
643 exception
644 when hr_api.cannot_find_prog_unit then
645 hr_api.cannot_find_prog_unit_error
646 (p_module_name => 'UPDATE_eligy_crit_values'
647 ,p_hook_type => 'AP'
648 );
649 --
650 -- End of API User Hook for the after hook of update_eligy_crit_values
651 --
652 end;
653 --
654 hr_utility.set_location(l_proc, 60);
655 --
656 -- When in validation only mode raise the Validate_Enabled exception
657 --
658 if p_validate then
659 raise hr_api.validate_enabled;
660 end if;
661 --
662 -- Set all output arguments
663 --
664 p_object_version_number := l_object_version_number;
665 p_effective_start_date := l_effective_start_date;
666 p_effective_end_date := l_effective_end_date;
667 --
668 hr_utility.set_location(' Leaving:'||l_proc, 70);
669 --
670 exception
671 --
672 when hr_api.validate_enabled then
673 --
674 -- As the Validate_Enabled exception has been raised
675 -- we must rollback to the savepoint
676 --
677 ROLLBACK TO update_eligy_crit_values;
678 --
679 -- Only set output warning arguments
680 -- (Any key or derived arguments must be set to null
681 -- when validation only mode is being used.)
682 --
683 hr_utility.set_location(' Leaving:'||l_proc, 80);
684 --
685 when others then
686 --
687 -- A validation or unexpected error has occured
688 --
689 ROLLBACK TO update_eligy_crit_values;
690 -- Added the following code for NOCOPY Changes.
691 p_object_version_number := l_object_version_number;
692 p_effective_start_date := NULL;
693 p_effective_end_date := NULL;
694 -- Added the above code for NOCOPY Changes.
695 raise;
696 --
697 end update_eligy_crit_values;
698 -- ----------------------------------------------------------------------------
699 -- |------------------------< delete_eligy_crit_values >----------------------|
700 -- ----------------------------------------------------------------------------
701 --
702 procedure delete_eligy_crit_values
703 (
704 p_validate In Boolean default false
705 ,p_eligy_crit_values_id In Number
706 ,p_effective_start_date Out nocopy date
707 ,p_effective_end_date Out nocopy date
708 ,p_object_version_number In Out nocopy number
709 ,p_effective_date In Date
710 ,p_datetrack_mode In Varchar2
711 ) is
712 --
713 -- Declare cursors and local variables
714 --
715 l_proc varchar2(72) := g_package||'delete_eligy_crit_values';
716 l_object_version_number ben_eligy_crit_values_f.object_version_number%TYPE;
717 l_effective_start_date ben_eligy_crit_values_f.effective_start_date%TYPE;
718 l_effective_end_date ben_eligy_crit_values_f.effective_end_date%TYPE;
719 --
720 begin
721 --
722 hr_utility.set_location('Entering:'|| l_proc, 10);
723 --
724 -- Issue a savepoint if operating in validation only mode
725 --
726 savepoint delete_eligy_crit_values;
727 --
728 hr_utility.set_location(l_proc, 20);
729 --
730 -- Process Logic
731 --
732 l_object_version_number := p_object_version_number;
733 --
734 --
735 begin
736 --
737 -- Start of API User Hook for the before hook of delete_eligy_crit_values
738 --
739 ben_eligy_crit_values_bk3.delete_eligy_crit_values_b
740 (
741 p_eligy_crit_values_id => p_eligy_crit_values_id
742 ,p_object_version_number => p_object_version_number
743 ,p_effective_date => trunc(p_effective_date)
744 ,p_datetrack_mode => p_datetrack_mode
745 );
746 exception
747 when hr_api.cannot_find_prog_unit then
748 hr_api.cannot_find_prog_unit_error
749 (p_module_name => 'DELETE_eligy_crit_values'
750 ,p_hook_type => 'BP'
751 );
752 --
753 -- End of API User Hook for the before hook of delete_eligy_crit_values
754 --
755 end;
756 --
757 ben_ecv_del.del
758 (
759 p_eligy_crit_values_id => p_eligy_crit_values_id
760 ,p_effective_start_date => l_effective_start_date
761 ,p_effective_end_date => l_effective_end_date
762 ,p_object_version_number => l_object_version_number
763 ,p_effective_date => p_effective_date
764 ,p_datetrack_mode => p_datetrack_mode
765 );
766 --
767 begin
768 --
769 -- Start of API User Hook for the after hook of delete_eligy_crit_values
770 --
771 ben_eligy_crit_values_bk3.delete_eligy_crit_values_a
772 (
773 p_eligy_crit_values_id => p_eligy_crit_values_id
774 ,p_effective_start_date => l_effective_start_date
775 ,p_effective_end_date => l_effective_end_date
776 ,p_object_version_number => l_object_version_number
777 ,p_effective_date => trunc(p_effective_date)
778 ,p_datetrack_mode => p_datetrack_mode
779 );
780 exception
781 when hr_api.cannot_find_prog_unit then
782 hr_api.cannot_find_prog_unit_error
783 (p_module_name => 'DELETE_eligy_crit_values'
784 ,p_hook_type => 'AP'
785 );
786 --
787 -- End of API User Hook for the after hook of delete_eligy_crit_values
788 --
789 end;
790 --
791 ben_profile_handler.event_handler
792 (p_event => 'DELETE',
793 p_base_table => 'BEN_ELIGY_PRFL_F',
794 p_base_table_column => 'ELIGY_PRFL_ID',
795 p_base_table_column_value => ben_ecv_shd.g_old_rec.eligy_prfl_id,
796 p_base_table_reference_column => 'ELIG_CRIT_VALUES_FLAG',
797 p_reference_table => 'BEN_ELIGY_CRIT_VALUES_F',
798 p_reference_table_column => 'ELIGY_PRFL_ID');
799 --
800 hr_utility.set_location(l_proc, 60);
801 --
802 -- When in validation only mode raise the Validate_Enabled exception
803 --
804 if p_validate then
805 raise hr_api.validate_enabled;
806 end if;
807 --
808 hr_utility.set_location(' Leaving:'||l_proc, 70);
809 --
810 exception
811 --
812 when hr_api.validate_enabled then
813 --
814 -- As the Validate_Enabled exception has been raised
815 -- we must rollback to the savepoint
816 --
817 ROLLBACK TO delete_eligy_crit_values;
818 --
819 -- Only set output warning arguments
820 -- (Any key or derived arguments must be set to null
821 -- when validation only mode is being used.)
822 --
823 p_effective_start_date := NULL;
824 p_effective_end_date := NULL;
825 --
826 when others then
827 --
828 -- A validation or unexpected error has occured
829 --
830 ROLLBACK TO delete_eligy_crit_values;
831 -- Added the following code for NOCOPY Changes.
832 p_object_version_number := l_object_version_number;
833 p_effective_start_date := NULL;
834 p_effective_end_date := NULL;
835 -- Added the above code for NOCOPY Changes.
836
837 raise;
838 --
839 end delete_eligy_crit_values;
840 --
841 -- ----------------------------------------------------------------------------
842 -- |-------------------------------< lck >------------------------------------|
843 -- ----------------------------------------------------------------------------
844 --
845 procedure lck
846 (
847 p_eligy_crit_values_id In Number
848 ,p_object_version_number In Number
849 ,p_effective_date In Date
850 ,p_datetrack_mode In Varchar2
851 ,p_validation_start_date Out nocopy Date
852 ,p_validation_end_date Out nocopy Date
853 ) is
854 --
855 --
856 -- Declare cursors and local variables
857 --
858 l_proc varchar2(72) := g_package||'lck';
859 l_validation_start_date date;
860 l_validation_end_date date;
861 --
862 begin
863 --
864 hr_utility.set_location('Entering:'|| l_proc, 10);
865 --
866 ben_ecv_shd.lck
867 (
868 p_eligy_crit_values_id => p_eligy_crit_values_id
869 ,p_validation_start_date => l_validation_start_date
870 ,p_validation_end_date => l_validation_end_date
871 ,p_object_version_number => p_object_version_number
872 ,p_effective_date => p_effective_date
873 ,p_datetrack_mode => p_datetrack_mode
874 );
875 --
876 hr_utility.set_location(' Leaving:'||l_proc, 70);
877 --
878 end lck;
879 --
880 end ben_eligy_crit_values_api;