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