[Home] [Help]
PACKAGE BODY: APPS.BEN_WORK_LOC_RATE_API
Source
1 Package Body ben_WORK_LOC_RATE_api as
2 /* $Header: bewlrapi.pkb 120.0 2005/05/28 12:17:01 appldev noship $ */
3 --
4 -- Package Variables
5 --
6 g_package varchar2(33) := ' ben_WORK_LOC_RATE_api.';
7 --
8 -- ----------------------------------------------------------------------------
9 -- |------------------------< create_WORK_LOC_RATE >----------------------|
10 -- ----------------------------------------------------------------------------
11 --
12 procedure create_WORK_LOC_RATE
13 (p_validate in boolean default false
14 ,p_wk_loc_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_location_id in number default null
20 ,p_excld_flag in varchar2 default null
21 ,p_ordr_num in number default null
22 ,p_wlr_attribute_category in varchar2 default null
23 ,p_wlr_attribute1 in varchar2 default null
24 ,p_wlr_attribute2 in varchar2 default null
25 ,p_wlr_attribute3 in varchar2 default null
26 ,p_wlr_attribute4 in varchar2 default null
27 ,p_wlr_attribute5 in varchar2 default null
28 ,p_wlr_attribute6 in varchar2 default null
29 ,p_wlr_attribute7 in varchar2 default null
30 ,p_wlr_attribute8 in varchar2 default null
31 ,p_wlr_attribute9 in varchar2 default null
32 ,p_wlr_attribute10 in varchar2 default null
33 ,p_wlr_attribute11 in varchar2 default null
34 ,p_wlr_attribute12 in varchar2 default null
35 ,p_wlr_attribute13 in varchar2 default null
36 ,p_wlr_attribute14 in varchar2 default null
37 ,p_wlr_attribute15 in varchar2 default null
38 ,p_wlr_attribute16 in varchar2 default null
39 ,p_wlr_attribute17 in varchar2 default null
40 ,p_wlr_attribute18 in varchar2 default null
41 ,p_wlr_attribute19 in varchar2 default null
42 ,p_wlr_attribute20 in varchar2 default null
43 ,p_wlr_attribute21 in varchar2 default null
44 ,p_wlr_attribute22 in varchar2 default null
45 ,p_wlr_attribute23 in varchar2 default null
46 ,p_wlr_attribute24 in varchar2 default null
47 ,p_wlr_attribute25 in varchar2 default null
48 ,p_wlr_attribute26 in varchar2 default null
49 ,p_wlr_attribute27 in varchar2 default null
50 ,p_wlr_attribute28 in varchar2 default null
51 ,p_wlr_attribute29 in varchar2 default null
52 ,p_wlr_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_wk_loc_rt_id ben_wk_loc_rt_f.wk_loc_rt_id%TYPE;
60 l_effective_start_date ben_wk_loc_rt_f.effective_start_date%TYPE;
61 l_effective_end_date ben_wk_loc_rt_f.effective_end_date%TYPE;
62 l_proc varchar2(72) := g_package||'create_WORK_LOC_RATE';
63 l_object_version_number ben_wk_loc_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_WORK_LOC_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_WORK_LOC_RATE
80 --
81 ben_WORK_LOC_RATE_bk1.create_WORK_LOC_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_location_id => p_location_id
86 ,p_excld_flag => p_excld_flag
87 ,p_ordr_num => p_ordr_num
88 ,p_wlr_attribute_category => p_wlr_attribute_category
89 ,p_wlr_attribute1 => p_wlr_attribute1
90 ,p_wlr_attribute2 => p_wlr_attribute2
91 ,p_wlr_attribute3 => p_wlr_attribute3
92 ,p_wlr_attribute4 => p_wlr_attribute4
93 ,p_wlr_attribute5 => p_wlr_attribute5
94 ,p_wlr_attribute6 => p_wlr_attribute6
95 ,p_wlr_attribute7 => p_wlr_attribute7
96 ,p_wlr_attribute8 => p_wlr_attribute8
97 ,p_wlr_attribute9 => p_wlr_attribute9
98 ,p_wlr_attribute10 => p_wlr_attribute10
99 ,p_wlr_attribute11 => p_wlr_attribute11
100 ,p_wlr_attribute12 => p_wlr_attribute12
101 ,p_wlr_attribute13 => p_wlr_attribute13
102 ,p_wlr_attribute14 => p_wlr_attribute14
103 ,p_wlr_attribute15 => p_wlr_attribute15
104 ,p_wlr_attribute16 => p_wlr_attribute16
105 ,p_wlr_attribute17 => p_wlr_attribute17
106 ,p_wlr_attribute18 => p_wlr_attribute18
107 ,p_wlr_attribute19 => p_wlr_attribute19
108 ,p_wlr_attribute20 => p_wlr_attribute20
109 ,p_wlr_attribute21 => p_wlr_attribute21
110 ,p_wlr_attribute22 => p_wlr_attribute22
111 ,p_wlr_attribute23 => p_wlr_attribute23
112 ,p_wlr_attribute24 => p_wlr_attribute24
113 ,p_wlr_attribute25 => p_wlr_attribute25
114 ,p_wlr_attribute26 => p_wlr_attribute26
115 ,p_wlr_attribute27 => p_wlr_attribute27
116 ,p_wlr_attribute28 => p_wlr_attribute28
117 ,p_wlr_attribute29 => p_wlr_attribute29
118 ,p_wlr_attribute30 => p_wlr_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_WORK_LOC_RATE'
126 ,p_hook_type => 'BP'
127 );
128 --
129 -- End of API User Hook for the before hook of create_WORK_LOC_RATE
130 --
131 end;
132 --
133 ben_wlr_ins.ins
134 (
135 p_wk_loc_rt_id => l_wk_loc_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_location_id => p_location_id
141 ,p_excld_flag => p_excld_flag
142 ,p_ordr_num => p_ordr_num
143 ,p_wlr_attribute_category => p_wlr_attribute_category
144 ,p_wlr_attribute1 => p_wlr_attribute1
145 ,p_wlr_attribute2 => p_wlr_attribute2
146 ,p_wlr_attribute3 => p_wlr_attribute3
147 ,p_wlr_attribute4 => p_wlr_attribute4
148 ,p_wlr_attribute5 => p_wlr_attribute5
149 ,p_wlr_attribute6 => p_wlr_attribute6
150 ,p_wlr_attribute7 => p_wlr_attribute7
151 ,p_wlr_attribute8 => p_wlr_attribute8
152 ,p_wlr_attribute9 => p_wlr_attribute9
153 ,p_wlr_attribute10 => p_wlr_attribute10
154 ,p_wlr_attribute11 => p_wlr_attribute11
155 ,p_wlr_attribute12 => p_wlr_attribute12
156 ,p_wlr_attribute13 => p_wlr_attribute13
157 ,p_wlr_attribute14 => p_wlr_attribute14
158 ,p_wlr_attribute15 => p_wlr_attribute15
159 ,p_wlr_attribute16 => p_wlr_attribute16
160 ,p_wlr_attribute17 => p_wlr_attribute17
161 ,p_wlr_attribute18 => p_wlr_attribute18
162 ,p_wlr_attribute19 => p_wlr_attribute19
163 ,p_wlr_attribute20 => p_wlr_attribute20
164 ,p_wlr_attribute21 => p_wlr_attribute21
165 ,p_wlr_attribute22 => p_wlr_attribute22
166 ,p_wlr_attribute23 => p_wlr_attribute23
167 ,p_wlr_attribute24 => p_wlr_attribute24
168 ,p_wlr_attribute25 => p_wlr_attribute25
169 ,p_wlr_attribute26 => p_wlr_attribute26
170 ,p_wlr_attribute27 => p_wlr_attribute27
171 ,p_wlr_attribute28 => p_wlr_attribute28
172 ,p_wlr_attribute29 => p_wlr_attribute29
173 ,p_wlr_attribute30 => p_wlr_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_WORK_LOC_RATE
181 --
182 ben_WORK_LOC_RATE_bk1.create_WORK_LOC_RATE_a
183 (
184 p_wk_loc_rt_id => l_wk_loc_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_location_id => p_location_id
190 ,p_excld_flag => p_excld_flag
191 ,p_ordr_num => p_ordr_num
192 ,p_wlr_attribute_category => p_wlr_attribute_category
193 ,p_wlr_attribute1 => p_wlr_attribute1
194 ,p_wlr_attribute2 => p_wlr_attribute2
195 ,p_wlr_attribute3 => p_wlr_attribute3
196 ,p_wlr_attribute4 => p_wlr_attribute4
197 ,p_wlr_attribute5 => p_wlr_attribute5
198 ,p_wlr_attribute6 => p_wlr_attribute6
199 ,p_wlr_attribute7 => p_wlr_attribute7
200 ,p_wlr_attribute8 => p_wlr_attribute8
201 ,p_wlr_attribute9 => p_wlr_attribute9
202 ,p_wlr_attribute10 => p_wlr_attribute10
203 ,p_wlr_attribute11 => p_wlr_attribute11
204 ,p_wlr_attribute12 => p_wlr_attribute12
205 ,p_wlr_attribute13 => p_wlr_attribute13
206 ,p_wlr_attribute14 => p_wlr_attribute14
207 ,p_wlr_attribute15 => p_wlr_attribute15
208 ,p_wlr_attribute16 => p_wlr_attribute16
209 ,p_wlr_attribute17 => p_wlr_attribute17
210 ,p_wlr_attribute18 => p_wlr_attribute18
211 ,p_wlr_attribute19 => p_wlr_attribute19
212 ,p_wlr_attribute20 => p_wlr_attribute20
213 ,p_wlr_attribute21 => p_wlr_attribute21
214 ,p_wlr_attribute22 => p_wlr_attribute22
215 ,p_wlr_attribute23 => p_wlr_attribute23
216 ,p_wlr_attribute24 => p_wlr_attribute24
217 ,p_wlr_attribute25 => p_wlr_attribute25
218 ,p_wlr_attribute26 => p_wlr_attribute26
219 ,p_wlr_attribute27 => p_wlr_attribute27
220 ,p_wlr_attribute28 => p_wlr_attribute28
221 ,p_wlr_attribute29 => p_wlr_attribute29
222 ,p_wlr_attribute30 => p_wlr_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_WORK_LOC_RATE'
230 ,p_hook_type => 'AP'
231 );
232 --
233 -- End of API User Hook for the after hook of create_WORK_LOC_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_WK_LOC_FLAG',
243 p_reference_table => 'BEN_WK_LOC_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_wk_loc_rt_id := l_wk_loc_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_WORK_LOC_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_wk_loc_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_WORK_LOC_RATE;
287 p_effective_start_date := null;
288 p_effective_end_date := null;
289 p_object_version_number := null;
290 raise;
291 --
292 end create_WORK_LOC_RATE;
293 -- ----------------------------------------------------------------------------
294 -- |------------------------< update_WORK_LOC_RATE >--- ------------------|
295 -- ----------------------------------------------------------------------------
296 --
297 procedure update_WORK_LOC_RATE
298 (p_validate in boolean default false
299 ,p_wk_loc_rt_id in number
300 ,p_effective_start_date out nocopy date
301 ,p_effective_end_date out nocopy date
302 ,p_business_group_id in number default hr_api.g_number
303 ,p_vrbl_rt_prfl_id in number default hr_api.g_number
304 ,p_location_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_wlr_attribute_category in varchar2 default hr_api.g_varchar2
308 ,p_wlr_attribute1 in varchar2 default hr_api.g_varchar2
312 ,p_wlr_attribute5 in varchar2 default hr_api.g_varchar2
309 ,p_wlr_attribute2 in varchar2 default hr_api.g_varchar2
310 ,p_wlr_attribute3 in varchar2 default hr_api.g_varchar2
311 ,p_wlr_attribute4 in varchar2 default hr_api.g_varchar2
313 ,p_wlr_attribute6 in varchar2 default hr_api.g_varchar2
314 ,p_wlr_attribute7 in varchar2 default hr_api.g_varchar2
315 ,p_wlr_attribute8 in varchar2 default hr_api.g_varchar2
316 ,p_wlr_attribute9 in varchar2 default hr_api.g_varchar2
317 ,p_wlr_attribute10 in varchar2 default hr_api.g_varchar2
318 ,p_wlr_attribute11 in varchar2 default hr_api.g_varchar2
319 ,p_wlr_attribute12 in varchar2 default hr_api.g_varchar2
320 ,p_wlr_attribute13 in varchar2 default hr_api.g_varchar2
321 ,p_wlr_attribute14 in varchar2 default hr_api.g_varchar2
322 ,p_wlr_attribute15 in varchar2 default hr_api.g_varchar2
323 ,p_wlr_attribute16 in varchar2 default hr_api.g_varchar2
324 ,p_wlr_attribute17 in varchar2 default hr_api.g_varchar2
325 ,p_wlr_attribute18 in varchar2 default hr_api.g_varchar2
326 ,p_wlr_attribute19 in varchar2 default hr_api.g_varchar2
327 ,p_wlr_attribute20 in varchar2 default hr_api.g_varchar2
328 ,p_wlr_attribute21 in varchar2 default hr_api.g_varchar2
329 ,p_wlr_attribute22 in varchar2 default hr_api.g_varchar2
330 ,p_wlr_attribute23 in varchar2 default hr_api.g_varchar2
331 ,p_wlr_attribute24 in varchar2 default hr_api.g_varchar2
332 ,p_wlr_attribute25 in varchar2 default hr_api.g_varchar2
333 ,p_wlr_attribute26 in varchar2 default hr_api.g_varchar2
334 ,p_wlr_attribute27 in varchar2 default hr_api.g_varchar2
335 ,p_wlr_attribute28 in varchar2 default hr_api.g_varchar2
336 ,p_wlr_attribute29 in varchar2 default hr_api.g_varchar2
337 ,p_wlr_attribute30 in varchar2 default hr_api.g_varchar2
338 ,p_object_version_number in out nocopy number
339 ,p_effective_date in date
340 ,p_datetrack_mode in varchar2
341 ) is
342 --
343 -- Declare cursors and local variables
344 --
345 l_proc varchar2(72) := g_package||'update_WORK_LOC_RATE';
346 l_object_version_number ben_wk_loc_rt_f.object_version_number%TYPE;
347 l_effective_start_date ben_wk_loc_rt_f.effective_start_date%TYPE;
348 l_effective_end_date ben_wk_loc_rt_f.effective_end_date%TYPE;
349 --
350 begin
351 --
352 hr_utility.set_location('Entering:'|| l_proc, 10);
353 --
354 -- Issue a savepoint if operating in validation only mode
355 --
356 savepoint update_WORK_LOC_RATE;
357 --
358 hr_utility.set_location(l_proc, 20);
359 --
360 -- Process Logic
361 --
362 l_object_version_number := p_object_version_number;
363 --
364 begin
365 --
366 -- Start of API User Hook for the before hook of update_WORK_LOC_RATE
367 --
368 ben_WORK_LOC_RATE_bk2.update_WORK_LOC_RATE_b
369 (
370 p_wk_loc_rt_id => p_wk_loc_rt_id
371 ,p_business_group_id => p_business_group_id
372 ,p_vrbl_rt_prfl_id => p_vrbl_rt_prfl_id
373 ,p_location_id => p_location_id
374 ,p_excld_flag => p_excld_flag
375 ,p_ordr_num => p_ordr_num
376 ,p_wlr_attribute_category => p_wlr_attribute_category
377 ,p_wlr_attribute1 => p_wlr_attribute1
378 ,p_wlr_attribute2 => p_wlr_attribute2
379 ,p_wlr_attribute3 => p_wlr_attribute3
380 ,p_wlr_attribute4 => p_wlr_attribute4
381 ,p_wlr_attribute5 => p_wlr_attribute5
382 ,p_wlr_attribute6 => p_wlr_attribute6
383 ,p_wlr_attribute7 => p_wlr_attribute7
384 ,p_wlr_attribute8 => p_wlr_attribute8
385 ,p_wlr_attribute9 => p_wlr_attribute9
386 ,p_wlr_attribute10 => p_wlr_attribute10
387 ,p_wlr_attribute11 => p_wlr_attribute11
388 ,p_wlr_attribute12 => p_wlr_attribute12
389 ,p_wlr_attribute13 => p_wlr_attribute13
390 ,p_wlr_attribute14 => p_wlr_attribute14
391 ,p_wlr_attribute15 => p_wlr_attribute15
392 ,p_wlr_attribute16 => p_wlr_attribute16
393 ,p_wlr_attribute17 => p_wlr_attribute17
394 ,p_wlr_attribute18 => p_wlr_attribute18
395 ,p_wlr_attribute19 => p_wlr_attribute19
396 ,p_wlr_attribute20 => p_wlr_attribute20
397 ,p_wlr_attribute21 => p_wlr_attribute21
398 ,p_wlr_attribute22 => p_wlr_attribute22
399 ,p_wlr_attribute23 => p_wlr_attribute23
400 ,p_wlr_attribute24 => p_wlr_attribute24
401 ,p_wlr_attribute25 => p_wlr_attribute25
402 ,p_wlr_attribute26 => p_wlr_attribute26
403 ,p_wlr_attribute27 => p_wlr_attribute27
404 ,p_wlr_attribute28 => p_wlr_attribute28
405 ,p_wlr_attribute29 => p_wlr_attribute29
409 ,p_datetrack_mode => p_datetrack_mode
406 ,p_wlr_attribute30 => p_wlr_attribute30
407 ,p_object_version_number => p_object_version_number
408 ,p_effective_date => trunc(p_effective_date)
410 );
411 exception
412 when hr_api.cannot_find_prog_unit then
413 hr_api.cannot_find_prog_unit_error
414 (p_module_name => 'UPDATE_WORK_LOC_RATE'
415 ,p_hook_type => 'BP'
416 );
417 --
418 -- End of API User Hook for the before hook of update_WORK_LOC_RATE
419 --
420 end;
421 --
422 ben_wlr_upd.upd
423 (
424 p_wk_loc_rt_id => p_wk_loc_rt_id
425 ,p_effective_start_date => l_effective_start_date
426 ,p_effective_end_date => l_effective_end_date
427 ,p_business_group_id => p_business_group_id
428 ,p_vrbl_rt_prfl_id => p_vrbl_rt_prfl_id
429 ,p_location_id => p_location_id
430 ,p_excld_flag => p_excld_flag
431 ,p_ordr_num => p_ordr_num
432 ,p_wlr_attribute_category => p_wlr_attribute_category
433 ,p_wlr_attribute1 => p_wlr_attribute1
434 ,p_wlr_attribute2 => p_wlr_attribute2
435 ,p_wlr_attribute3 => p_wlr_attribute3
436 ,p_wlr_attribute4 => p_wlr_attribute4
437 ,p_wlr_attribute5 => p_wlr_attribute5
438 ,p_wlr_attribute6 => p_wlr_attribute6
439 ,p_wlr_attribute7 => p_wlr_attribute7
440 ,p_wlr_attribute8 => p_wlr_attribute8
441 ,p_wlr_attribute9 => p_wlr_attribute9
442 ,p_wlr_attribute10 => p_wlr_attribute10
443 ,p_wlr_attribute11 => p_wlr_attribute11
444 ,p_wlr_attribute12 => p_wlr_attribute12
445 ,p_wlr_attribute13 => p_wlr_attribute13
446 ,p_wlr_attribute14 => p_wlr_attribute14
447 ,p_wlr_attribute15 => p_wlr_attribute15
448 ,p_wlr_attribute16 => p_wlr_attribute16
449 ,p_wlr_attribute17 => p_wlr_attribute17
450 ,p_wlr_attribute18 => p_wlr_attribute18
451 ,p_wlr_attribute19 => p_wlr_attribute19
452 ,p_wlr_attribute20 => p_wlr_attribute20
453 ,p_wlr_attribute21 => p_wlr_attribute21
454 ,p_wlr_attribute22 => p_wlr_attribute22
455 ,p_wlr_attribute23 => p_wlr_attribute23
456 ,p_wlr_attribute24 => p_wlr_attribute24
457 ,p_wlr_attribute25 => p_wlr_attribute25
458 ,p_wlr_attribute26 => p_wlr_attribute26
459 ,p_wlr_attribute27 => p_wlr_attribute27
460 ,p_wlr_attribute28 => p_wlr_attribute28
461 ,p_wlr_attribute29 => p_wlr_attribute29
462 ,p_wlr_attribute30 => p_wlr_attribute30
463 ,p_object_version_number => l_object_version_number
464 ,p_effective_date => trunc(p_effective_date)
465 ,p_datetrack_mode => p_datetrack_mode
466 );
467 --
468 begin
469 --
470 -- Start of API User Hook for the after hook of update_WORK_LOC_RATE
471 --
472 ben_WORK_LOC_RATE_bk2.update_WORK_LOC_RATE_a
473 (
474 p_wk_loc_rt_id => p_wk_loc_rt_id
475 ,p_effective_start_date => l_effective_start_date
476 ,p_effective_end_date => l_effective_end_date
477 ,p_business_group_id => p_business_group_id
478 ,p_vrbl_rt_prfl_id => p_vrbl_rt_prfl_id
479 ,p_location_id => p_location_id
480 ,p_excld_flag => p_excld_flag
481 ,p_ordr_num => p_ordr_num
482 ,p_wlr_attribute_category => p_wlr_attribute_category
483 ,p_wlr_attribute1 => p_wlr_attribute1
484 ,p_wlr_attribute2 => p_wlr_attribute2
485 ,p_wlr_attribute3 => p_wlr_attribute3
486 ,p_wlr_attribute4 => p_wlr_attribute4
487 ,p_wlr_attribute5 => p_wlr_attribute5
488 ,p_wlr_attribute6 => p_wlr_attribute6
489 ,p_wlr_attribute7 => p_wlr_attribute7
490 ,p_wlr_attribute8 => p_wlr_attribute8
491 ,p_wlr_attribute9 => p_wlr_attribute9
492 ,p_wlr_attribute10 => p_wlr_attribute10
493 ,p_wlr_attribute11 => p_wlr_attribute11
494 ,p_wlr_attribute12 => p_wlr_attribute12
495 ,p_wlr_attribute13 => p_wlr_attribute13
496 ,p_wlr_attribute14 => p_wlr_attribute14
497 ,p_wlr_attribute15 => p_wlr_attribute15
498 ,p_wlr_attribute16 => p_wlr_attribute16
499 ,p_wlr_attribute17 => p_wlr_attribute17
500 ,p_wlr_attribute18 => p_wlr_attribute18
501 ,p_wlr_attribute19 => p_wlr_attribute19
502 ,p_wlr_attribute20 => p_wlr_attribute20
503 ,p_wlr_attribute21 => p_wlr_attribute21
504 ,p_wlr_attribute22 => p_wlr_attribute22
505 ,p_wlr_attribute23 => p_wlr_attribute23
506 ,p_wlr_attribute24 => p_wlr_attribute24
507 ,p_wlr_attribute25 => p_wlr_attribute25
511 ,p_wlr_attribute29 => p_wlr_attribute29
508 ,p_wlr_attribute26 => p_wlr_attribute26
509 ,p_wlr_attribute27 => p_wlr_attribute27
510 ,p_wlr_attribute28 => p_wlr_attribute28
512 ,p_wlr_attribute30 => p_wlr_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 exception
518 when hr_api.cannot_find_prog_unit then
519 hr_api.cannot_find_prog_unit_error
520 (p_module_name => 'UPDATE_WORK_LOC_RATE'
521 ,p_hook_type => 'AP'
522 );
523 --
524 -- End of API User Hook for the after hook of update_WORK_LOC_RATE
525 --
526 end;
527 --
528 hr_utility.set_location(l_proc, 60);
529 --
530 -- When in validation only mode raise the Validate_Enabled exception
531 --
532 if p_validate then
533 raise hr_api.validate_enabled;
534 end if;
535 --
536 -- Set all output arguments
537 --
538 p_object_version_number := l_object_version_number;
539 p_effective_start_date := l_effective_start_date;
540 p_effective_end_date := l_effective_end_date;
541 --
542 hr_utility.set_location(' Leaving:'||l_proc, 70);
543 --
544 exception
545 --
546 when hr_api.validate_enabled then
547 --
548 -- As the Validate_Enabled exception has been raised
549 -- we must rollback to the savepoint
550 --
551 ROLLBACK TO update_WORK_LOC_RATE;
552 --
553 -- Only set output warning arguments
554 -- (Any key or derived arguments must be set to null
555 -- when validation only mode is being used.)
556 --
557 hr_utility.set_location(' Leaving:'||l_proc, 80);
558 --
559 when others then
560 --
561 -- A validation or unexpected error has occured
562 --
563 ROLLBACK TO update_WORK_LOC_RATE;
564 p_effective_start_date := null;
565 p_effective_end_date := null;
566 p_object_version_number := l_object_version_number;
567
568 raise;
569 --
570 end update_WORK_LOC_RATE;
571 -- ----------------------------------------------------------------------------
572 -- |------------------------< delete_WORK_LOC_RATE >----------------------|
573 -- ----------------------------------------------------------------------------
574 --
575 procedure delete_WORK_LOC_RATE
576 (p_validate in boolean default false
577 ,p_wk_loc_rt_id in number
578 ,p_effective_start_date out nocopy date
579 ,p_effective_end_date out nocopy date
580 ,p_object_version_number in out nocopy number
581 ,p_effective_date in date
582 ,p_datetrack_mode in varchar2
583 ) is
584 --
585 -- Declare cursors and local variables
586 --
587 l_proc varchar2(72) := g_package||'update_WORK_LOC_RATE';
588 l_object_version_number ben_wk_loc_rt_f.object_version_number%TYPE;
589 l_effective_start_date ben_wk_loc_rt_f.effective_start_date%TYPE;
590 l_effective_end_date ben_wk_loc_rt_f.effective_end_date%TYPE;
591 --
592 begin
593 --
594 hr_utility.set_location('Entering:'|| l_proc, 10);
595 --
596 -- Issue a savepoint if operating in validation only mode
597 --
598 savepoint delete_WORK_LOC_RATE;
599 --
600 hr_utility.set_location(l_proc, 20);
601 --
602 -- Process Logic
603 --
604 l_object_version_number := p_object_version_number;
605 --
606 --
607 begin
608 --
609 -- Start of API User Hook for the before hook of delete_WORK_LOC_RATE
610 --
611 ben_WORK_LOC_RATE_bk3.delete_WORK_LOC_RATE_b
612 (
613 p_wk_loc_rt_id => p_wk_loc_rt_id
614 ,p_object_version_number => p_object_version_number
615 ,p_effective_date => trunc(p_effective_date)
616 ,p_datetrack_mode => p_datetrack_mode
617 );
618 exception
619 when hr_api.cannot_find_prog_unit then
620 hr_api.cannot_find_prog_unit_error
621 (p_module_name => 'DELETE_WORK_LOC_RATE'
622 ,p_hook_type => 'BP'
623 );
624 --
625 -- End of API User Hook for the before hook of delete_WORK_LOC_RATE
626 --
627 end;
628 --
629 ben_wlr_del.del
630 (
631 p_wk_loc_rt_id => p_wk_loc_rt_id
632 ,p_effective_start_date => l_effective_start_date
633 ,p_effective_end_date => l_effective_end_date
634 ,p_object_version_number => l_object_version_number
635 ,p_effective_date => p_effective_date
636 ,p_datetrack_mode => p_datetrack_mode
637 );
638 --
639 begin
640 --
641 -- Start of API User Hook for the after hook of delete_WORK_LOC_RATE
642 --
643 ben_WORK_LOC_RATE_bk3.delete_WORK_LOC_RATE_a
644 (
645 p_wk_loc_rt_id => p_wk_loc_rt_id
646 ,p_effective_start_date => l_effective_start_date
647 ,p_effective_end_date => l_effective_end_date
648 ,p_object_version_number => l_object_version_number
652 exception
649 ,p_effective_date => trunc(p_effective_date)
650 ,p_datetrack_mode => p_datetrack_mode
651 );
653 when hr_api.cannot_find_prog_unit then
654 hr_api.cannot_find_prog_unit_error
655 (p_module_name => 'DELETE_WORK_LOC_RATE'
656 ,p_hook_type => 'AP'
657 );
658 --
659 -- End of API User Hook for the after hook of delete_WORK_LOC_RATE
660 --
661 end;
662 --
663 ben_profile_handler.event_handler
664 (p_event => 'DELETE',
665 p_base_table => 'BEN_VRBL_RT_PRFL_F',
666 p_base_table_column => 'VRBL_RT_PRFL_ID',
667 p_base_table_column_value => ben_wlr_shd.g_old_rec.vrbl_rt_prfl_id,
668 p_base_table_reference_column => 'RT_WK_LOC_FLAG',
669 p_reference_table => 'BEN_WK_LOC_RT_F',
670 p_reference_table_column => 'VRBL_RT_PRFL_ID');
671 --
672 hr_utility.set_location(l_proc, 60);
673 --
674 -- When in validation only mode raise the Validate_Enabled exception
675 --
676 if p_validate then
677 raise hr_api.validate_enabled;
678 end if;
679 --
680 hr_utility.set_location(' Leaving:'||l_proc, 70);
681 --
682 exception
683 --
684 when hr_api.validate_enabled then
685 --
686 -- As the Validate_Enabled exception has been raised
687 -- we must rollback to the savepoint
688 --
689 ROLLBACK TO delete_WORK_LOC_RATE;
690 --
691 -- Only set output warning arguments
692 -- (Any key or derived arguments must be set to null
693 -- when validation only mode is being used.)
694 --
695 p_effective_start_date := null;
696 p_effective_end_date := null;
697 --
698 when others then
699 --
700 -- A validation or unexpected error has occured
701 --
702 ROLLBACK TO delete_WORK_LOC_RATE;
703 p_effective_start_date := null;
704 p_effective_end_date := null;
705 p_object_version_number := l_object_version_number;
706 raise;
707 --
708 end delete_WORK_LOC_RATE;
709 --
710 -- ----------------------------------------------------------------------------
711 -- |-------------------------------< lck >------------------------------------|
712 -- ----------------------------------------------------------------------------
713 --
714 procedure lck
715 (
716 p_wk_loc_rt_id in number
717 ,p_object_version_number in number
718 ,p_effective_date in date
719 ,p_datetrack_mode in varchar2
720 ,p_validation_start_date out nocopy date
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_wlr_shd.lck
736 (
737 p_wk_loc_rt_id => p_wk_loc_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_WORK_LOC_RATE_api;