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