[Home] [Help]
PACKAGE BODY: APPS.BEN_PAY_BASIS_RATE_API
Source
1 Package Body ben_PAY_BASIS_RATE_api as
2 /* $Header: bepbrapi.pkb 115.3 2002/12/16 09:37:16 hnarayan ship $ */
3 --
4 -- Package Variables
5 --
6 g_package varchar2(33) := ' ben_PAY_BASIS_RATE_api.';
7 --
8 -- ----------------------------------------------------------------------------
9 -- |------------------------< create_PAY_BASIS_RATE >----------------------|
10 -- ----------------------------------------------------------------------------
11 --
12 procedure create_PAY_BASIS_RATE
13 (p_validate in boolean default false
14 ,p_py_bss_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_pay_basis_id in number default null
19 ,p_excld_flag in varchar2 default null
20 ,p_ordr_num in number default null
21 ,p_business_group_id in number default null
22 ,p_pbr_attribute_category in varchar2 default null
23 ,p_pbr_attribute1 in varchar2 default null
24 ,p_pbr_attribute2 in varchar2 default null
25 ,p_pbr_attribute3 in varchar2 default null
26 ,p_pbr_attribute4 in varchar2 default null
27 ,p_pbr_attribute5 in varchar2 default null
28 ,p_pbr_attribute6 in varchar2 default null
29 ,p_pbr_attribute7 in varchar2 default null
30 ,p_pbr_attribute8 in varchar2 default null
31 ,p_pbr_attribute9 in varchar2 default null
32 ,p_pbr_attribute10 in varchar2 default null
33 ,p_pbr_attribute11 in varchar2 default null
34 ,p_pbr_attribute12 in varchar2 default null
35 ,p_pbr_attribute13 in varchar2 default null
36 ,p_pbr_attribute14 in varchar2 default null
37 ,p_pbr_attribute15 in varchar2 default null
38 ,p_pbr_attribute16 in varchar2 default null
39 ,p_pbr_attribute17 in varchar2 default null
40 ,p_pbr_attribute18 in varchar2 default null
41 ,p_pbr_attribute19 in varchar2 default null
42 ,p_pbr_attribute20 in varchar2 default null
43 ,p_pbr_attribute21 in varchar2 default null
44 ,p_pbr_attribute22 in varchar2 default null
45 ,p_pbr_attribute23 in varchar2 default null
46 ,p_pbr_attribute24 in varchar2 default null
47 ,p_pbr_attribute25 in varchar2 default null
48 ,p_pbr_attribute26 in varchar2 default null
49 ,p_pbr_attribute27 in varchar2 default null
50 ,p_pbr_attribute28 in varchar2 default null
51 ,p_pbr_attribute29 in varchar2 default null
52 ,p_pbr_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_py_bss_rt_id ben_py_bss_rt_f.py_bss_rt_id%TYPE;
60 l_effective_start_date ben_py_bss_rt_f.effective_start_date%TYPE;
61 l_effective_end_date ben_py_bss_rt_f.effective_end_date%TYPE;
62 l_proc varchar2(72) := g_package||'create_PAY_BASIS_RATE';
63 l_object_version_number ben_py_bss_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_PAY_BASIS_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_PAY_BASIS_RATE
80 --
81 ben_PAY_BASIS_RATE_bk1.create_PAY_BASIS_RATE_b
82 (
83 p_vrbl_rt_prfl_id => p_vrbl_rt_prfl_id
84 ,p_pay_basis_id => p_pay_basis_id
85 ,p_excld_flag => p_excld_flag
86 ,p_ordr_num => p_ordr_num
87 ,p_business_group_id => p_business_group_id
88 ,p_pbr_attribute_category => p_pbr_attribute_category
89 ,p_pbr_attribute1 => p_pbr_attribute1
90 ,p_pbr_attribute2 => p_pbr_attribute2
91 ,p_pbr_attribute3 => p_pbr_attribute3
92 ,p_pbr_attribute4 => p_pbr_attribute4
93 ,p_pbr_attribute5 => p_pbr_attribute5
94 ,p_pbr_attribute6 => p_pbr_attribute6
95 ,p_pbr_attribute7 => p_pbr_attribute7
96 ,p_pbr_attribute8 => p_pbr_attribute8
97 ,p_pbr_attribute9 => p_pbr_attribute9
98 ,p_pbr_attribute10 => p_pbr_attribute10
99 ,p_pbr_attribute11 => p_pbr_attribute11
100 ,p_pbr_attribute12 => p_pbr_attribute12
101 ,p_pbr_attribute13 => p_pbr_attribute13
102 ,p_pbr_attribute14 => p_pbr_attribute14
103 ,p_pbr_attribute15 => p_pbr_attribute15
104 ,p_pbr_attribute16 => p_pbr_attribute16
105 ,p_pbr_attribute17 => p_pbr_attribute17
106 ,p_pbr_attribute18 => p_pbr_attribute18
107 ,p_pbr_attribute19 => p_pbr_attribute19
108 ,p_pbr_attribute20 => p_pbr_attribute20
109 ,p_pbr_attribute21 => p_pbr_attribute21
110 ,p_pbr_attribute22 => p_pbr_attribute22
111 ,p_pbr_attribute23 => p_pbr_attribute23
112 ,p_pbr_attribute24 => p_pbr_attribute24
113 ,p_pbr_attribute25 => p_pbr_attribute25
114 ,p_pbr_attribute26 => p_pbr_attribute26
115 ,p_pbr_attribute27 => p_pbr_attribute27
116 ,p_pbr_attribute28 => p_pbr_attribute28
117 ,p_pbr_attribute29 => p_pbr_attribute29
118 ,p_pbr_attribute30 => p_pbr_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_PAY_BASIS_RATE'
126 ,p_hook_type => 'BP'
127 );
128 --
129 -- End of API User Hook for the before hook of create_PAY_BASIS_RATE
130 --
131 end;
132 --
133 ben_pbr_ins.ins
134 (
135 p_py_bss_rt_id => l_py_bss_rt_id
136 ,p_effective_start_date => l_effective_start_date
137 ,p_effective_end_date => l_effective_end_date
138 ,p_vrbl_rt_prfl_id => p_vrbl_rt_prfl_id
139 ,p_pay_basis_id => p_pay_basis_id
140 ,p_excld_flag => p_excld_flag
141 ,p_ordr_num => p_ordr_num
142 ,p_business_group_id => p_business_group_id
143 ,p_pbr_attribute_category => p_pbr_attribute_category
144 ,p_pbr_attribute1 => p_pbr_attribute1
145 ,p_pbr_attribute2 => p_pbr_attribute2
146 ,p_pbr_attribute3 => p_pbr_attribute3
147 ,p_pbr_attribute4 => p_pbr_attribute4
148 ,p_pbr_attribute5 => p_pbr_attribute5
149 ,p_pbr_attribute6 => p_pbr_attribute6
150 ,p_pbr_attribute7 => p_pbr_attribute7
151 ,p_pbr_attribute8 => p_pbr_attribute8
152 ,p_pbr_attribute9 => p_pbr_attribute9
153 ,p_pbr_attribute10 => p_pbr_attribute10
154 ,p_pbr_attribute11 => p_pbr_attribute11
155 ,p_pbr_attribute12 => p_pbr_attribute12
156 ,p_pbr_attribute13 => p_pbr_attribute13
157 ,p_pbr_attribute14 => p_pbr_attribute14
158 ,p_pbr_attribute15 => p_pbr_attribute15
159 ,p_pbr_attribute16 => p_pbr_attribute16
160 ,p_pbr_attribute17 => p_pbr_attribute17
161 ,p_pbr_attribute18 => p_pbr_attribute18
162 ,p_pbr_attribute19 => p_pbr_attribute19
163 ,p_pbr_attribute20 => p_pbr_attribute20
164 ,p_pbr_attribute21 => p_pbr_attribute21
165 ,p_pbr_attribute22 => p_pbr_attribute22
166 ,p_pbr_attribute23 => p_pbr_attribute23
167 ,p_pbr_attribute24 => p_pbr_attribute24
168 ,p_pbr_attribute25 => p_pbr_attribute25
169 ,p_pbr_attribute26 => p_pbr_attribute26
170 ,p_pbr_attribute27 => p_pbr_attribute27
171 ,p_pbr_attribute28 => p_pbr_attribute28
172 ,p_pbr_attribute29 => p_pbr_attribute29
173 ,p_pbr_attribute30 => p_pbr_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_PAY_BASIS_RATE
181 --
182 ben_PAY_BASIS_RATE_bk1.create_PAY_BASIS_RATE_a
183 (
184 p_py_bss_rt_id => l_py_bss_rt_id
185 ,p_effective_start_date => l_effective_start_date
186 ,p_effective_end_date => l_effective_end_date
187 ,p_vrbl_rt_prfl_id => p_vrbl_rt_prfl_id
188 ,p_pay_basis_id => p_pay_basis_id
189 ,p_excld_flag => p_excld_flag
190 ,p_ordr_num => p_ordr_num
191 ,p_business_group_id => p_business_group_id
192 ,p_pbr_attribute_category => p_pbr_attribute_category
193 ,p_pbr_attribute1 => p_pbr_attribute1
194 ,p_pbr_attribute2 => p_pbr_attribute2
195 ,p_pbr_attribute3 => p_pbr_attribute3
196 ,p_pbr_attribute4 => p_pbr_attribute4
197 ,p_pbr_attribute5 => p_pbr_attribute5
198 ,p_pbr_attribute6 => p_pbr_attribute6
199 ,p_pbr_attribute7 => p_pbr_attribute7
200 ,p_pbr_attribute8 => p_pbr_attribute8
201 ,p_pbr_attribute9 => p_pbr_attribute9
202 ,p_pbr_attribute10 => p_pbr_attribute10
203 ,p_pbr_attribute11 => p_pbr_attribute11
204 ,p_pbr_attribute12 => p_pbr_attribute12
205 ,p_pbr_attribute13 => p_pbr_attribute13
206 ,p_pbr_attribute14 => p_pbr_attribute14
207 ,p_pbr_attribute15 => p_pbr_attribute15
208 ,p_pbr_attribute16 => p_pbr_attribute16
209 ,p_pbr_attribute17 => p_pbr_attribute17
210 ,p_pbr_attribute18 => p_pbr_attribute18
211 ,p_pbr_attribute19 => p_pbr_attribute19
212 ,p_pbr_attribute20 => p_pbr_attribute20
213 ,p_pbr_attribute21 => p_pbr_attribute21
214 ,p_pbr_attribute22 => p_pbr_attribute22
215 ,p_pbr_attribute23 => p_pbr_attribute23
216 ,p_pbr_attribute24 => p_pbr_attribute24
217 ,p_pbr_attribute25 => p_pbr_attribute25
218 ,p_pbr_attribute26 => p_pbr_attribute26
219 ,p_pbr_attribute27 => p_pbr_attribute27
220 ,p_pbr_attribute28 => p_pbr_attribute28
221 ,p_pbr_attribute29 => p_pbr_attribute29
222 ,p_pbr_attribute30 => p_pbr_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_PAY_BASIS_RATE'
230 ,p_hook_type => 'AP'
231 );
232 --
233 -- End of API User Hook for the after hook of create_PAY_BASIS_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_PY_BSS_FLAG',
243 p_reference_table => 'BEN_PY_BSS_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_py_bss_rt_id := l_py_bss_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_PAY_BASIS_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_py_bss_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_PAY_BASIS_RATE;
287 p_py_bss_rt_id := null;
288 p_effective_start_date := null;
289 p_effective_end_date := null;
290 p_object_version_number := null;
291 raise;
292 --
293 end create_PAY_BASIS_RATE;
294 -- ----------------------------------------------------------------------------
295 -- |------------------------< update_PAY_BASIS_RATE >--- ------------------|
296 -- ----------------------------------------------------------------------------
297 --
298 procedure update_PAY_BASIS_RATE
299 (p_validate in boolean default false
300 ,p_py_bss_rt_id in number
301 ,p_effective_start_date out nocopy date
302 ,p_effective_end_date out nocopy date
303 ,p_vrbl_rt_prfl_id in number default hr_api.g_number
304 ,p_pay_basis_id in number default hr_api.g_number
305 ,p_excld_flag in varchar2 default hr_api.g_varchar2
306 ,p_ordr_num in number default hr_api.g_number
307 ,p_business_group_id in number default hr_api.g_number
308 ,p_pbr_attribute_category in varchar2 default hr_api.g_varchar2
309 ,p_pbr_attribute1 in varchar2 default hr_api.g_varchar2
310 ,p_pbr_attribute2 in varchar2 default hr_api.g_varchar2
311 ,p_pbr_attribute3 in varchar2 default hr_api.g_varchar2
312 ,p_pbr_attribute4 in varchar2 default hr_api.g_varchar2
313 ,p_pbr_attribute5 in varchar2 default hr_api.g_varchar2
314 ,p_pbr_attribute6 in varchar2 default hr_api.g_varchar2
315 ,p_pbr_attribute7 in varchar2 default hr_api.g_varchar2
316 ,p_pbr_attribute8 in varchar2 default hr_api.g_varchar2
317 ,p_pbr_attribute9 in varchar2 default hr_api.g_varchar2
318 ,p_pbr_attribute10 in varchar2 default hr_api.g_varchar2
319 ,p_pbr_attribute11 in varchar2 default hr_api.g_varchar2
320 ,p_pbr_attribute12 in varchar2 default hr_api.g_varchar2
324 ,p_pbr_attribute16 in varchar2 default hr_api.g_varchar2
321 ,p_pbr_attribute13 in varchar2 default hr_api.g_varchar2
322 ,p_pbr_attribute14 in varchar2 default hr_api.g_varchar2
323 ,p_pbr_attribute15 in varchar2 default hr_api.g_varchar2
325 ,p_pbr_attribute17 in varchar2 default hr_api.g_varchar2
326 ,p_pbr_attribute18 in varchar2 default hr_api.g_varchar2
327 ,p_pbr_attribute19 in varchar2 default hr_api.g_varchar2
328 ,p_pbr_attribute20 in varchar2 default hr_api.g_varchar2
329 ,p_pbr_attribute21 in varchar2 default hr_api.g_varchar2
330 ,p_pbr_attribute22 in varchar2 default hr_api.g_varchar2
331 ,p_pbr_attribute23 in varchar2 default hr_api.g_varchar2
332 ,p_pbr_attribute24 in varchar2 default hr_api.g_varchar2
333 ,p_pbr_attribute25 in varchar2 default hr_api.g_varchar2
334 ,p_pbr_attribute26 in varchar2 default hr_api.g_varchar2
335 ,p_pbr_attribute27 in varchar2 default hr_api.g_varchar2
336 ,p_pbr_attribute28 in varchar2 default hr_api.g_varchar2
337 ,p_pbr_attribute29 in varchar2 default hr_api.g_varchar2
338 ,p_pbr_attribute30 in varchar2 default hr_api.g_varchar2
339 ,p_object_version_number in out nocopy number
340 ,p_effective_date in date
341 ,p_datetrack_mode in varchar2
342 ) is
343 --
344 -- Declare cursors and local variables
345 --
346 l_proc varchar2(72) := g_package||'update_PAY_BASIS_RATE';
347 l_object_version_number ben_py_bss_rt_f.object_version_number%TYPE;
348 l_effective_start_date ben_py_bss_rt_f.effective_start_date%TYPE;
349 l_effective_end_date ben_py_bss_rt_f.effective_end_date%TYPE;
350 --
351 begin
352 --
353 hr_utility.set_location('Entering:'|| l_proc, 10);
354 --
355 -- Issue a savepoint if operating in validation only mode
356 --
357 savepoint update_PAY_BASIS_RATE;
358 --
359 hr_utility.set_location(l_proc, 20);
360 --
361 -- Process Logic
362 --
363 l_object_version_number := p_object_version_number;
364 --
365 begin
366 --
367 -- Start of API User Hook for the before hook of update_PAY_BASIS_RATE
368 --
369 ben_PAY_BASIS_RATE_bk2.update_PAY_BASIS_RATE_b
370 (
371 p_py_bss_rt_id => p_py_bss_rt_id
372 ,p_vrbl_rt_prfl_id => p_vrbl_rt_prfl_id
373 ,p_pay_basis_id => p_pay_basis_id
374 ,p_excld_flag => p_excld_flag
375 ,p_ordr_num => p_ordr_num
376 ,p_business_group_id => p_business_group_id
377 ,p_pbr_attribute_category => p_pbr_attribute_category
378 ,p_pbr_attribute1 => p_pbr_attribute1
379 ,p_pbr_attribute2 => p_pbr_attribute2
380 ,p_pbr_attribute3 => p_pbr_attribute3
381 ,p_pbr_attribute4 => p_pbr_attribute4
382 ,p_pbr_attribute5 => p_pbr_attribute5
383 ,p_pbr_attribute6 => p_pbr_attribute6
384 ,p_pbr_attribute7 => p_pbr_attribute7
385 ,p_pbr_attribute8 => p_pbr_attribute8
386 ,p_pbr_attribute9 => p_pbr_attribute9
387 ,p_pbr_attribute10 => p_pbr_attribute10
388 ,p_pbr_attribute11 => p_pbr_attribute11
389 ,p_pbr_attribute12 => p_pbr_attribute12
390 ,p_pbr_attribute13 => p_pbr_attribute13
391 ,p_pbr_attribute14 => p_pbr_attribute14
392 ,p_pbr_attribute15 => p_pbr_attribute15
393 ,p_pbr_attribute16 => p_pbr_attribute16
394 ,p_pbr_attribute17 => p_pbr_attribute17
395 ,p_pbr_attribute18 => p_pbr_attribute18
396 ,p_pbr_attribute19 => p_pbr_attribute19
397 ,p_pbr_attribute20 => p_pbr_attribute20
398 ,p_pbr_attribute21 => p_pbr_attribute21
399 ,p_pbr_attribute22 => p_pbr_attribute22
400 ,p_pbr_attribute23 => p_pbr_attribute23
401 ,p_pbr_attribute24 => p_pbr_attribute24
402 ,p_pbr_attribute25 => p_pbr_attribute25
403 ,p_pbr_attribute26 => p_pbr_attribute26
404 ,p_pbr_attribute27 => p_pbr_attribute27
405 ,p_pbr_attribute28 => p_pbr_attribute28
406 ,p_pbr_attribute29 => p_pbr_attribute29
407 ,p_pbr_attribute30 => p_pbr_attribute30
408 ,p_object_version_number => p_object_version_number
409 ,p_effective_date => trunc(p_effective_date)
410 ,p_datetrack_mode => p_datetrack_mode
411 );
412 exception
413 when hr_api.cannot_find_prog_unit then
414 hr_api.cannot_find_prog_unit_error
415 (p_module_name => 'UPDATE_PAY_BASIS_RATE'
416 ,p_hook_type => 'BP'
417 );
418 --
419 -- End of API User Hook for the before hook of update_PAY_BASIS_RATE
420 --
421 end;
422 --
423 ben_pbr_upd.upd
424 (
425 p_py_bss_rt_id => p_py_bss_rt_id
426 ,p_effective_start_date => l_effective_start_date
430 ,p_excld_flag => p_excld_flag
427 ,p_effective_end_date => l_effective_end_date
428 ,p_vrbl_rt_prfl_id => p_vrbl_rt_prfl_id
429 ,p_pay_basis_id => p_pay_basis_id
431 ,p_ordr_num => p_ordr_num
432 ,p_business_group_id => p_business_group_id
433 ,p_pbr_attribute_category => p_pbr_attribute_category
434 ,p_pbr_attribute1 => p_pbr_attribute1
435 ,p_pbr_attribute2 => p_pbr_attribute2
436 ,p_pbr_attribute3 => p_pbr_attribute3
437 ,p_pbr_attribute4 => p_pbr_attribute4
438 ,p_pbr_attribute5 => p_pbr_attribute5
439 ,p_pbr_attribute6 => p_pbr_attribute6
440 ,p_pbr_attribute7 => p_pbr_attribute7
441 ,p_pbr_attribute8 => p_pbr_attribute8
442 ,p_pbr_attribute9 => p_pbr_attribute9
443 ,p_pbr_attribute10 => p_pbr_attribute10
444 ,p_pbr_attribute11 => p_pbr_attribute11
445 ,p_pbr_attribute12 => p_pbr_attribute12
446 ,p_pbr_attribute13 => p_pbr_attribute13
447 ,p_pbr_attribute14 => p_pbr_attribute14
448 ,p_pbr_attribute15 => p_pbr_attribute15
449 ,p_pbr_attribute16 => p_pbr_attribute16
450 ,p_pbr_attribute17 => p_pbr_attribute17
451 ,p_pbr_attribute18 => p_pbr_attribute18
452 ,p_pbr_attribute19 => p_pbr_attribute19
453 ,p_pbr_attribute20 => p_pbr_attribute20
454 ,p_pbr_attribute21 => p_pbr_attribute21
455 ,p_pbr_attribute22 => p_pbr_attribute22
456 ,p_pbr_attribute23 => p_pbr_attribute23
457 ,p_pbr_attribute24 => p_pbr_attribute24
458 ,p_pbr_attribute25 => p_pbr_attribute25
459 ,p_pbr_attribute26 => p_pbr_attribute26
460 ,p_pbr_attribute27 => p_pbr_attribute27
461 ,p_pbr_attribute28 => p_pbr_attribute28
462 ,p_pbr_attribute29 => p_pbr_attribute29
463 ,p_pbr_attribute30 => p_pbr_attribute30
464 ,p_object_version_number => l_object_version_number
465 ,p_effective_date => trunc(p_effective_date)
466 ,p_datetrack_mode => p_datetrack_mode
467 );
468 --
469 begin
470 --
471 -- Start of API User Hook for the after hook of update_PAY_BASIS_RATE
472 --
473 ben_PAY_BASIS_RATE_bk2.update_PAY_BASIS_RATE_a
474 (
475 p_py_bss_rt_id => p_py_bss_rt_id
476 ,p_effective_start_date => l_effective_start_date
477 ,p_effective_end_date => l_effective_end_date
478 ,p_vrbl_rt_prfl_id => p_vrbl_rt_prfl_id
479 ,p_pay_basis_id => p_pay_basis_id
480 ,p_excld_flag => p_excld_flag
481 ,p_ordr_num => p_ordr_num
482 ,p_business_group_id => p_business_group_id
483 ,p_pbr_attribute_category => p_pbr_attribute_category
484 ,p_pbr_attribute1 => p_pbr_attribute1
485 ,p_pbr_attribute2 => p_pbr_attribute2
486 ,p_pbr_attribute3 => p_pbr_attribute3
487 ,p_pbr_attribute4 => p_pbr_attribute4
488 ,p_pbr_attribute5 => p_pbr_attribute5
489 ,p_pbr_attribute6 => p_pbr_attribute6
490 ,p_pbr_attribute7 => p_pbr_attribute7
491 ,p_pbr_attribute8 => p_pbr_attribute8
492 ,p_pbr_attribute9 => p_pbr_attribute9
493 ,p_pbr_attribute10 => p_pbr_attribute10
494 ,p_pbr_attribute11 => p_pbr_attribute11
495 ,p_pbr_attribute12 => p_pbr_attribute12
496 ,p_pbr_attribute13 => p_pbr_attribute13
497 ,p_pbr_attribute14 => p_pbr_attribute14
498 ,p_pbr_attribute15 => p_pbr_attribute15
499 ,p_pbr_attribute16 => p_pbr_attribute16
500 ,p_pbr_attribute17 => p_pbr_attribute17
501 ,p_pbr_attribute18 => p_pbr_attribute18
502 ,p_pbr_attribute19 => p_pbr_attribute19
503 ,p_pbr_attribute20 => p_pbr_attribute20
504 ,p_pbr_attribute21 => p_pbr_attribute21
505 ,p_pbr_attribute22 => p_pbr_attribute22
506 ,p_pbr_attribute23 => p_pbr_attribute23
507 ,p_pbr_attribute24 => p_pbr_attribute24
508 ,p_pbr_attribute25 => p_pbr_attribute25
509 ,p_pbr_attribute26 => p_pbr_attribute26
510 ,p_pbr_attribute27 => p_pbr_attribute27
511 ,p_pbr_attribute28 => p_pbr_attribute28
512 ,p_pbr_attribute29 => p_pbr_attribute29
513 ,p_pbr_attribute30 => p_pbr_attribute30
514 ,p_object_version_number => l_object_version_number
515 ,p_effective_date => trunc(p_effective_date)
516 ,p_datetrack_mode => p_datetrack_mode
517 );
518 exception
519 when hr_api.cannot_find_prog_unit then
520 hr_api.cannot_find_prog_unit_error
521 (p_module_name => 'UPDATE_PAY_BASIS_RATE'
522 ,p_hook_type => 'AP'
523 );
524 --
528 --
525 -- End of API User Hook for the after hook of update_PAY_BASIS_RATE
526 --
527 end;
529 hr_utility.set_location(l_proc, 60);
530 --
531 -- When in validation only mode raise the Validate_Enabled exception
532 --
533 if p_validate then
534 raise hr_api.validate_enabled;
535 end if;
536 --
537 -- Set all output arguments
538 --
539 p_object_version_number := l_object_version_number;
540 p_effective_start_date := l_effective_start_date;
541 p_effective_end_date := l_effective_end_date;
542 --
543 hr_utility.set_location(' Leaving:'||l_proc, 70);
544 --
545 exception
546 --
547 when hr_api.validate_enabled then
548 --
549 -- As the Validate_Enabled exception has been raised
550 -- we must rollback to the savepoint
551 --
552 ROLLBACK TO update_PAY_BASIS_RATE;
553 --
554 -- Only set output warning arguments
555 -- (Any key or derived arguments must be set to null
556 -- when validation only mode is being used.)
557 --
558 p_effective_start_date := null;
559 p_effective_end_date := null;
560 hr_utility.set_location(' Leaving:'||l_proc, 80);
561 --
562 when others then
563 --
564 -- A validation or unexpected error has occured
565 --
566 ROLLBACK TO update_PAY_BASIS_RATE;
567 p_effective_start_date := null;
568 p_effective_end_date := null;
569 raise;
570 --
571 end update_PAY_BASIS_RATE;
572 -- ----------------------------------------------------------------------------
573 -- |------------------------< delete_PAY_BASIS_RATE >----------------------|
574 -- ----------------------------------------------------------------------------
575 --
576 procedure delete_PAY_BASIS_RATE
577 (p_validate in boolean default false
578 ,p_py_bss_rt_id in number
579 ,p_effective_start_date out nocopy date
580 ,p_effective_end_date out nocopy date
581 ,p_object_version_number in out nocopy number
582 ,p_effective_date in date
583 ,p_datetrack_mode in varchar2
584 ) is
585 --
586 -- Declare cursors and local variables
587 --
588 l_proc varchar2(72) := g_package||'update_PAY_BASIS_RATE';
589 l_object_version_number ben_py_bss_rt_f.object_version_number%TYPE;
590 l_effective_start_date ben_py_bss_rt_f.effective_start_date%TYPE;
591 l_effective_end_date ben_py_bss_rt_f.effective_end_date%TYPE;
592 --
593 begin
594 --
595 hr_utility.set_location('Entering:'|| l_proc, 10);
596 --
597 -- Issue a savepoint if operating in validation only mode
598 --
599 savepoint delete_PAY_BASIS_RATE;
600 --
601 hr_utility.set_location(l_proc, 20);
602 --
603 -- Process Logic
604 --
605 l_object_version_number := p_object_version_number;
606 --
607 --
608 begin
609 --
610 -- Start of API User Hook for the before hook of delete_PAY_BASIS_RATE
611 --
612 ben_PAY_BASIS_RATE_bk3.delete_PAY_BASIS_RATE_b
613 (
614 p_py_bss_rt_id => p_py_bss_rt_id
615 ,p_object_version_number => p_object_version_number
616 ,p_effective_date => trunc(p_effective_date)
617 ,p_datetrack_mode => p_datetrack_mode
618 );
619 exception
620 when hr_api.cannot_find_prog_unit then
621 hr_api.cannot_find_prog_unit_error
622 (p_module_name => 'DELETE_PAY_BASIS_RATE'
623 ,p_hook_type => 'BP'
624 );
625 --
626 -- End of API User Hook for the before hook of delete_PAY_BASIS_RATE
627 --
628 end;
629 --
630 ben_pbr_del.del
631 (
632 p_py_bss_rt_id => p_py_bss_rt_id
633 ,p_effective_start_date => l_effective_start_date
634 ,p_effective_end_date => l_effective_end_date
635 ,p_object_version_number => l_object_version_number
636 ,p_effective_date => p_effective_date
637 ,p_datetrack_mode => p_datetrack_mode
638 );
639 --
640 begin
641 --
642 -- Start of API User Hook for the after hook of delete_PAY_BASIS_RATE
643 --
644 ben_PAY_BASIS_RATE_bk3.delete_PAY_BASIS_RATE_a
645 (
646 p_py_bss_rt_id => p_py_bss_rt_id
647 ,p_effective_start_date => l_effective_start_date
648 ,p_effective_end_date => l_effective_end_date
649 ,p_object_version_number => l_object_version_number
650 ,p_effective_date => trunc(p_effective_date)
651 ,p_datetrack_mode => p_datetrack_mode
652 );
653 exception
654 when hr_api.cannot_find_prog_unit then
655 hr_api.cannot_find_prog_unit_error
656 (p_module_name => 'DELETE_PAY_BASIS_RATE'
657 ,p_hook_type => 'AP'
658 );
659 --
660 -- End of API User Hook for the after hook of delete_PAY_BASIS_RATE
661 --
662 end;
663 --
664 ben_profile_handler.event_handler
665 (p_event => 'DELETE',
666 p_base_table => 'BEN_VRBL_RT_PRFL_F',
667 p_base_table_column => 'VRBL_RT_PRFL_ID',
671 p_reference_table_column => 'VRBL_RT_PRFL_ID');
668 p_base_table_column_value => ben_pbr_shd.g_old_rec.vrbl_rt_prfl_id,
669 p_base_table_reference_column => 'RT_PY_BSS_FLAG',
670 p_reference_table => 'BEN_PY_BSS_RT_F',
672 --
673 hr_utility.set_location(l_proc, 60);
674 --
675 -- When in validation only mode raise the Validate_Enabled exception
676 --
677 if p_validate then
678 raise hr_api.validate_enabled;
679 end if;
680 --
681 hr_utility.set_location(' Leaving:'||l_proc, 70);
682 --
683 exception
684 --
685 when hr_api.validate_enabled then
686 --
687 -- As the Validate_Enabled exception has been raised
688 -- we must rollback to the savepoint
689 --
690 ROLLBACK TO delete_PAY_BASIS_RATE;
691 --
692 -- Only set output warning arguments
693 -- (Any key or derived arguments must be set to null
694 -- when validation only mode is being used.)
695 --
696 p_effective_start_date := null;
697 p_effective_end_date := null;
698 --
699 when others then
700 --
701 -- A validation or unexpected error has occured
702 --
703 ROLLBACK TO delete_PAY_BASIS_RATE;
704 p_effective_start_date := null;
705 p_effective_end_date := null;
706 raise;
707 --
708 end delete_PAY_BASIS_RATE;
709 --
710 -- ----------------------------------------------------------------------------
711 -- |-------------------------------< lck >------------------------------------|
712 -- ----------------------------------------------------------------------------
713 --
714 procedure lck
715 (
716 p_py_bss_rt_id in number
720 ,p_validation_start_date out nocopy date
717 ,p_object_version_number in number
718 ,p_effective_date in date
719 ,p_datetrack_mode in varchar2
721 ,p_validation_end_date out nocopy date
722 ) is
723 --
724 --
725 -- Declare cursors and local variables
726 --
727 l_proc varchar2(72) := g_package||'lck';
728 l_validation_start_date date;
729 l_validation_end_date date;
730 --
731 begin
732 --
733 hr_utility.set_location('Entering:'|| l_proc, 10);
734 --
735 ben_pbr_shd.lck
736 (
737 p_py_bss_rt_id => p_py_bss_rt_id
738 ,p_validation_start_date => l_validation_start_date
739 ,p_validation_end_date => l_validation_end_date
740 ,p_object_version_number => p_object_version_number
741 ,p_effective_date => p_effective_date
742 ,p_datetrack_mode => p_datetrack_mode
743 );
744 --
745 hr_utility.set_location(' Leaving:'||l_proc, 70);
746 --
747 end lck;
748 --
749 end ben_PAY_BASIS_RATE_api;