[Home] [Help]
PACKAGE BODY: APPS.BEN_PGM_OR_PL_YR_PERD_API
Source
1 Package Body ben_pgm_or_pl_yr_perd_api as
2 /* $Header: beyrpapi.pkb 115.3 2002/12/16 17:56:39 glingapp ship $ */
3 --
4 -- Package Variables
5 --
6 g_package varchar2(33) := ' ben_pgm_or_pl_yr_perd_api.';
7 --
8 -- ----------------------------------------------------------------------------
9 -- |------------------------< create_pgm_or_pl_yr_perd >----------------------|
10 -- ----------------------------------------------------------------------------
11 --
12 procedure create_pgm_or_pl_yr_perd
13 (p_validate in boolean default false
14 ,p_yr_perd_id out nocopy number
15 ,p_perds_in_yr_num in number default null
16 ,p_perd_tm_uom_cd in varchar2 default null
17 ,p_perd_typ_cd in varchar2 default null
18 ,p_end_date in date default null
19 ,p_start_date in date default null
20 ,p_lmtn_yr_strt_dt in date default null
21 ,p_lmtn_yr_end_dt in date default null
22 ,p_business_group_id in number default null
23 ,p_yrp_attribute_category in varchar2 default null
24 ,p_yrp_attribute1 in varchar2 default null
25 ,p_yrp_attribute2 in varchar2 default null
26 ,p_yrp_attribute3 in varchar2 default null
27 ,p_yrp_attribute4 in varchar2 default null
28 ,p_yrp_attribute5 in varchar2 default null
29 ,p_yrp_attribute6 in varchar2 default null
30 ,p_yrp_attribute7 in varchar2 default null
31 ,p_yrp_attribute8 in varchar2 default null
32 ,p_yrp_attribute9 in varchar2 default null
33 ,p_yrp_attribute10 in varchar2 default null
34 ,p_yrp_attribute11 in varchar2 default null
35 ,p_yrp_attribute12 in varchar2 default null
36 ,p_yrp_attribute13 in varchar2 default null
37 ,p_yrp_attribute14 in varchar2 default null
38 ,p_yrp_attribute15 in varchar2 default null
39 ,p_yrp_attribute16 in varchar2 default null
40 ,p_yrp_attribute17 in varchar2 default null
41 ,p_yrp_attribute18 in varchar2 default null
42 ,p_yrp_attribute19 in varchar2 default null
43 ,p_yrp_attribute20 in varchar2 default null
44 ,p_yrp_attribute21 in varchar2 default null
45 ,p_yrp_attribute22 in varchar2 default null
46 ,p_yrp_attribute23 in varchar2 default null
47 ,p_yrp_attribute24 in varchar2 default null
48 ,p_yrp_attribute25 in varchar2 default null
49 ,p_yrp_attribute26 in varchar2 default null
50 ,p_yrp_attribute27 in varchar2 default null
51 ,p_yrp_attribute28 in varchar2 default null
52 ,p_yrp_attribute29 in varchar2 default null
53 ,p_yrp_attribute30 in varchar2 default null
54 ,p_object_version_number out nocopy number
55 ,p_effective_date in date
56 ) is
57 --
58 -- Declare cursors and local variables
59 --
60 l_yr_perd_id ben_yr_perd.yr_perd_id%TYPE;
61 l_proc varchar2(72) := g_package||'create_pgm_or_pl_yr_perd';
62 l_object_version_number ben_yr_perd.object_version_number%TYPE;
63 --
64 begin
65 --
66 hr_utility.set_location('Entering:'|| l_proc, 10);
67 --
68 -- Issue a savepoint if operating in validation only mode
69 --
70 savepoint create_pgm_or_pl_yr_perd;
71 --
72 hr_utility.set_location(l_proc, 20);
73 --
74 -- Process Logic
75 --
76 begin
77 --
78 -- Start of API User Hook for the before hook of create_pgm_or_pl_yr_perd
79 --
80 ben_pgm_or_pl_yr_perd_bk1.create_pgm_or_pl_yr_perd_b
81 (
82 p_perds_in_yr_num => p_perds_in_yr_num
83 ,p_perd_tm_uom_cd => p_perd_tm_uom_cd
84 ,p_perd_typ_cd => p_perd_typ_cd
85 ,p_end_date => p_end_date
86 ,p_start_date => p_start_date
87 ,p_lmtn_yr_strt_dt => p_lmtn_yr_strt_dt
88 ,p_lmtn_yr_end_dt => p_lmtn_yr_end_dt
89 ,p_business_group_id => p_business_group_id
90 ,p_yrp_attribute_category => p_yrp_attribute_category
91 ,p_yrp_attribute1 => p_yrp_attribute1
92 ,p_yrp_attribute2 => p_yrp_attribute2
93 ,p_yrp_attribute3 => p_yrp_attribute3
94 ,p_yrp_attribute4 => p_yrp_attribute4
95 ,p_yrp_attribute5 => p_yrp_attribute5
96 ,p_yrp_attribute6 => p_yrp_attribute6
97 ,p_yrp_attribute7 => p_yrp_attribute7
98 ,p_yrp_attribute8 => p_yrp_attribute8
99 ,p_yrp_attribute9 => p_yrp_attribute9
100 ,p_yrp_attribute10 => p_yrp_attribute10
101 ,p_yrp_attribute11 => p_yrp_attribute11
102 ,p_yrp_attribute12 => p_yrp_attribute12
103 ,p_yrp_attribute13 => p_yrp_attribute13
104 ,p_yrp_attribute14 => p_yrp_attribute14
105 ,p_yrp_attribute15 => p_yrp_attribute15
106 ,p_yrp_attribute16 => p_yrp_attribute16
107 ,p_yrp_attribute17 => p_yrp_attribute17
108 ,p_yrp_attribute18 => p_yrp_attribute18
109 ,p_yrp_attribute19 => p_yrp_attribute19
110 ,p_yrp_attribute20 => p_yrp_attribute20
111 ,p_yrp_attribute21 => p_yrp_attribute21
112 ,p_yrp_attribute22 => p_yrp_attribute22
113 ,p_yrp_attribute23 => p_yrp_attribute23
114 ,p_yrp_attribute24 => p_yrp_attribute24
115 ,p_yrp_attribute25 => p_yrp_attribute25
116 ,p_yrp_attribute26 => p_yrp_attribute26
117 ,p_yrp_attribute27 => p_yrp_attribute27
118 ,p_yrp_attribute28 => p_yrp_attribute28
119 ,p_yrp_attribute29 => p_yrp_attribute29
120 ,p_yrp_attribute30 => p_yrp_attribute30
121 ,p_effective_date => trunc(p_effective_date)
122 );
123 exception
124 when hr_api.cannot_find_prog_unit then
125 hr_api.cannot_find_prog_unit_error
126 (
127 p_module_name => 'CREATE_pgm_or_pl_yr_perd'
128 ,p_hook_type => 'BP'
129 );
130 --
131 -- End of API User Hook for the before hook of create_pgm_or_pl_yr_perd
132 --
133 end;
134 --
135 ben_yrp_ins.ins
136 (
137 p_yr_perd_id => l_yr_perd_id
138 ,p_perds_in_yr_num => p_perds_in_yr_num
139 ,p_perd_tm_uom_cd => p_perd_tm_uom_cd
140 ,p_perd_typ_cd => p_perd_typ_cd
141 ,p_end_date => p_end_date
142 ,p_start_date => p_start_date
143 ,p_lmtn_yr_strt_dt => p_lmtn_yr_strt_dt
144 ,p_lmtn_yr_end_dt => p_lmtn_yr_end_dt
145 ,p_business_group_id => p_business_group_id
146 ,p_yrp_attribute_category => p_yrp_attribute_category
147 ,p_yrp_attribute1 => p_yrp_attribute1
148 ,p_yrp_attribute2 => p_yrp_attribute2
149 ,p_yrp_attribute3 => p_yrp_attribute3
150 ,p_yrp_attribute4 => p_yrp_attribute4
151 ,p_yrp_attribute5 => p_yrp_attribute5
152 ,p_yrp_attribute6 => p_yrp_attribute6
153 ,p_yrp_attribute7 => p_yrp_attribute7
154 ,p_yrp_attribute8 => p_yrp_attribute8
155 ,p_yrp_attribute9 => p_yrp_attribute9
156 ,p_yrp_attribute10 => p_yrp_attribute10
157 ,p_yrp_attribute11 => p_yrp_attribute11
158 ,p_yrp_attribute12 => p_yrp_attribute12
159 ,p_yrp_attribute13 => p_yrp_attribute13
160 ,p_yrp_attribute14 => p_yrp_attribute14
161 ,p_yrp_attribute15 => p_yrp_attribute15
162 ,p_yrp_attribute16 => p_yrp_attribute16
163 ,p_yrp_attribute17 => p_yrp_attribute17
164 ,p_yrp_attribute18 => p_yrp_attribute18
165 ,p_yrp_attribute19 => p_yrp_attribute19
166 ,p_yrp_attribute20 => p_yrp_attribute20
167 ,p_yrp_attribute21 => p_yrp_attribute21
168 ,p_yrp_attribute22 => p_yrp_attribute22
169 ,p_yrp_attribute23 => p_yrp_attribute23
170 ,p_yrp_attribute24 => p_yrp_attribute24
171 ,p_yrp_attribute25 => p_yrp_attribute25
172 ,p_yrp_attribute26 => p_yrp_attribute26
173 ,p_yrp_attribute27 => p_yrp_attribute27
174 ,p_yrp_attribute28 => p_yrp_attribute28
175 ,p_yrp_attribute29 => p_yrp_attribute29
176 ,p_yrp_attribute30 => p_yrp_attribute30
177 ,p_object_version_number => l_object_version_number
178 ,p_effective_date => trunc(p_effective_date)
179 );
180 --
181 begin
182 --
183 -- Start of API User Hook for the after hook of create_pgm_or_pl_yr_perd
184 --
185 ben_pgm_or_pl_yr_perd_bk1.create_pgm_or_pl_yr_perd_a
186 (
187 p_yr_perd_id => l_yr_perd_id
188 ,p_perds_in_yr_num => p_perds_in_yr_num
189 ,p_perd_tm_uom_cd => p_perd_tm_uom_cd
190 ,p_perd_typ_cd => p_perd_typ_cd
191 ,p_end_date => p_end_date
192 ,p_start_date => p_start_date
193 ,p_lmtn_yr_strt_dt => p_lmtn_yr_strt_dt
194 ,p_lmtn_yr_end_dt => p_lmtn_yr_end_dt
195 ,p_business_group_id => p_business_group_id
196 ,p_yrp_attribute_category => p_yrp_attribute_category
197 ,p_yrp_attribute1 => p_yrp_attribute1
198 ,p_yrp_attribute2 => p_yrp_attribute2
199 ,p_yrp_attribute3 => p_yrp_attribute3
200 ,p_yrp_attribute4 => p_yrp_attribute4
201 ,p_yrp_attribute5 => p_yrp_attribute5
202 ,p_yrp_attribute6 => p_yrp_attribute6
203 ,p_yrp_attribute7 => p_yrp_attribute7
204 ,p_yrp_attribute8 => p_yrp_attribute8
205 ,p_yrp_attribute9 => p_yrp_attribute9
206 ,p_yrp_attribute10 => p_yrp_attribute10
207 ,p_yrp_attribute11 => p_yrp_attribute11
208 ,p_yrp_attribute12 => p_yrp_attribute12
209 ,p_yrp_attribute13 => p_yrp_attribute13
210 ,p_yrp_attribute14 => p_yrp_attribute14
211 ,p_yrp_attribute15 => p_yrp_attribute15
212 ,p_yrp_attribute16 => p_yrp_attribute16
213 ,p_yrp_attribute17 => p_yrp_attribute17
214 ,p_yrp_attribute18 => p_yrp_attribute18
215 ,p_yrp_attribute19 => p_yrp_attribute19
216 ,p_yrp_attribute20 => p_yrp_attribute20
217 ,p_yrp_attribute21 => p_yrp_attribute21
218 ,p_yrp_attribute22 => p_yrp_attribute22
219 ,p_yrp_attribute23 => p_yrp_attribute23
220 ,p_yrp_attribute24 => p_yrp_attribute24
221 ,p_yrp_attribute25 => p_yrp_attribute25
222 ,p_yrp_attribute26 => p_yrp_attribute26
223 ,p_yrp_attribute27 => p_yrp_attribute27
224 ,p_yrp_attribute28 => p_yrp_attribute28
225 ,p_yrp_attribute29 => p_yrp_attribute29
226 ,p_yrp_attribute30 => p_yrp_attribute30
227 ,p_object_version_number => l_object_version_number
228 ,p_effective_date => trunc(p_effective_date)
229 );
230 exception
231 when hr_api.cannot_find_prog_unit then
232 hr_api.cannot_find_prog_unit_error
233 (p_module_name => 'CREATE_pgm_or_pl_yr_perd'
234 ,p_hook_type => 'AP'
235 );
236 --
237 -- End of API User Hook for the after hook of create_pgm_or_pl_yr_perd
238 --
239 end;
240 --
241 hr_utility.set_location(l_proc, 60);
242 --
243 -- When in validation only mode raise the Validate_Enabled exception
244 --
245 if p_validate then
246 raise hr_api.validate_enabled;
247 end if;
248 --
249 -- Set all output arguments
250 --
251 p_yr_perd_id := l_yr_perd_id;
252 p_object_version_number := l_object_version_number;
253 --
254 hr_utility.set_location(' Leaving:'||l_proc, 70);
255 --
256 exception
257 --
258 when hr_api.validate_enabled then
259 --
260 -- As the Validate_Enabled exception has been raised
261 -- we must rollback to the savepoint
262 --
263 ROLLBACK TO create_pgm_or_pl_yr_perd;
264 --
265 -- Only set output warning arguments
266 -- (Any key or derived arguments must be set to null
267 -- when validation only mode is being used.)
268 --
269 p_yr_perd_id := null;
270 p_object_version_number := null;
271 hr_utility.set_location(' Leaving:'||l_proc, 80);
272 --
273 when others then
274 --
275 -- A validation or unexpected error has occured
276 --
277 ROLLBACK TO create_pgm_or_pl_yr_perd;
278 p_yr_perd_id := null;
279 p_object_version_number := null;
280 raise;
281 --
282 end create_pgm_or_pl_yr_perd;
283 -- ----------------------------------------------------------------------------
284 -- |------------------------< update_pgm_or_pl_yr_perd >--- ------------------|
285 -- ----------------------------------------------------------------------------
286 --
287 procedure update_pgm_or_pl_yr_perd
288 (p_validate in boolean default false
289 ,p_yr_perd_id in number
290 ,p_perds_in_yr_num in number default hr_api.g_number
291 ,p_perd_tm_uom_cd in varchar2 default hr_api.g_varchar2
292 ,p_perd_typ_cd in varchar2 default hr_api.g_varchar2
293 ,p_end_date in date default hr_api.g_date
294 ,p_start_date in date default hr_api.g_date
295 ,p_lmtn_yr_strt_dt in date default hr_api.g_date
296 ,p_lmtn_yr_end_dt in date default hr_api.g_date
297 ,p_business_group_id in number default hr_api.g_number
298 ,p_yrp_attribute_category in varchar2 default hr_api.g_varchar2
299 ,p_yrp_attribute1 in varchar2 default hr_api.g_varchar2
300 ,p_yrp_attribute2 in varchar2 default hr_api.g_varchar2
301 ,p_yrp_attribute3 in varchar2 default hr_api.g_varchar2
302 ,p_yrp_attribute4 in varchar2 default hr_api.g_varchar2
303 ,p_yrp_attribute5 in varchar2 default hr_api.g_varchar2
304 ,p_yrp_attribute6 in varchar2 default hr_api.g_varchar2
305 ,p_yrp_attribute7 in varchar2 default hr_api.g_varchar2
306 ,p_yrp_attribute8 in varchar2 default hr_api.g_varchar2
307 ,p_yrp_attribute9 in varchar2 default hr_api.g_varchar2
308 ,p_yrp_attribute10 in varchar2 default hr_api.g_varchar2
309 ,p_yrp_attribute11 in varchar2 default hr_api.g_varchar2
310 ,p_yrp_attribute12 in varchar2 default hr_api.g_varchar2
311 ,p_yrp_attribute13 in varchar2 default hr_api.g_varchar2
312 ,p_yrp_attribute14 in varchar2 default hr_api.g_varchar2
313 ,p_yrp_attribute15 in varchar2 default hr_api.g_varchar2
314 ,p_yrp_attribute16 in varchar2 default hr_api.g_varchar2
315 ,p_yrp_attribute17 in varchar2 default hr_api.g_varchar2
316 ,p_yrp_attribute18 in varchar2 default hr_api.g_varchar2
320 ,p_yrp_attribute22 in varchar2 default hr_api.g_varchar2
317 ,p_yrp_attribute19 in varchar2 default hr_api.g_varchar2
318 ,p_yrp_attribute20 in varchar2 default hr_api.g_varchar2
319 ,p_yrp_attribute21 in varchar2 default hr_api.g_varchar2
321 ,p_yrp_attribute23 in varchar2 default hr_api.g_varchar2
322 ,p_yrp_attribute24 in varchar2 default hr_api.g_varchar2
323 ,p_yrp_attribute25 in varchar2 default hr_api.g_varchar2
324 ,p_yrp_attribute26 in varchar2 default hr_api.g_varchar2
325 ,p_yrp_attribute27 in varchar2 default hr_api.g_varchar2
326 ,p_yrp_attribute28 in varchar2 default hr_api.g_varchar2
327 ,p_yrp_attribute29 in varchar2 default hr_api.g_varchar2
328 ,p_yrp_attribute30 in varchar2 default hr_api.g_varchar2
329 ,p_object_version_number in out nocopy number
330 ,p_effective_date in date
331 ) is
332 --
333 -- Declare cursors and local variables
334 --
335 l_proc varchar2(72) := g_package||'update_pgm_or_pl_yr_perd';
336 l_object_version_number ben_yr_perd.object_version_number%TYPE;
337 --
338 begin
339 --
340 hr_utility.set_location('Entering:'|| l_proc, 10);
341 --
342 -- Issue a savepoint if operating in validation only mode
343 --
344 savepoint update_pgm_or_pl_yr_perd;
345 --
346 hr_utility.set_location(l_proc, 20);
347 --
348 -- Process Logic
349 --
350 l_object_version_number := p_object_version_number;
351 --
352 begin
353 --
354 -- Start of API User Hook for the before hook of update_pgm_or_pl_yr_perd
355 --
356 ben_pgm_or_pl_yr_perd_bk2.update_pgm_or_pl_yr_perd_b
357 (
358 p_yr_perd_id => p_yr_perd_id
359 ,p_perds_in_yr_num => p_perds_in_yr_num
360 ,p_perd_tm_uom_cd => p_perd_tm_uom_cd
361 ,p_perd_typ_cd => p_perd_typ_cd
362 ,p_end_date => p_end_date
363 ,p_start_date => p_start_date
364 ,p_lmtn_yr_strt_dt => p_lmtn_yr_strt_dt
365 ,p_lmtn_yr_end_dt => p_lmtn_yr_end_dt
366 ,p_business_group_id => p_business_group_id
367 ,p_yrp_attribute_category => p_yrp_attribute_category
368 ,p_yrp_attribute1 => p_yrp_attribute1
369 ,p_yrp_attribute2 => p_yrp_attribute2
370 ,p_yrp_attribute3 => p_yrp_attribute3
371 ,p_yrp_attribute4 => p_yrp_attribute4
372 ,p_yrp_attribute5 => p_yrp_attribute5
373 ,p_yrp_attribute6 => p_yrp_attribute6
374 ,p_yrp_attribute7 => p_yrp_attribute7
375 ,p_yrp_attribute8 => p_yrp_attribute8
376 ,p_yrp_attribute9 => p_yrp_attribute9
377 ,p_yrp_attribute10 => p_yrp_attribute10
378 ,p_yrp_attribute11 => p_yrp_attribute11
379 ,p_yrp_attribute12 => p_yrp_attribute12
380 ,p_yrp_attribute13 => p_yrp_attribute13
381 ,p_yrp_attribute14 => p_yrp_attribute14
382 ,p_yrp_attribute15 => p_yrp_attribute15
383 ,p_yrp_attribute16 => p_yrp_attribute16
384 ,p_yrp_attribute17 => p_yrp_attribute17
385 ,p_yrp_attribute18 => p_yrp_attribute18
386 ,p_yrp_attribute19 => p_yrp_attribute19
387 ,p_yrp_attribute20 => p_yrp_attribute20
388 ,p_yrp_attribute21 => p_yrp_attribute21
389 ,p_yrp_attribute22 => p_yrp_attribute22
390 ,p_yrp_attribute23 => p_yrp_attribute23
391 ,p_yrp_attribute24 => p_yrp_attribute24
392 ,p_yrp_attribute25 => p_yrp_attribute25
393 ,p_yrp_attribute26 => p_yrp_attribute26
394 ,p_yrp_attribute27 => p_yrp_attribute27
395 ,p_yrp_attribute28 => p_yrp_attribute28
396 ,p_yrp_attribute29 => p_yrp_attribute29
397 ,p_yrp_attribute30 => p_yrp_attribute30
398 ,p_object_version_number => p_object_version_number
399 ,p_effective_date => trunc(p_effective_date)
400 );
401 exception
402 when hr_api.cannot_find_prog_unit then
403 hr_api.cannot_find_prog_unit_error
404 (p_module_name => 'UPDATE_pgm_or_pl_yr_perd'
405 ,p_hook_type => 'BP'
406 );
407 --
408 -- End of API User Hook for the before hook of update_pgm_or_pl_yr_perd
409 --
410 end;
411 --
412 ben_yrp_upd.upd
413 (
414 p_yr_perd_id => p_yr_perd_id
415 ,p_perds_in_yr_num => p_perds_in_yr_num
416 ,p_perd_tm_uom_cd => p_perd_tm_uom_cd
417 ,p_perd_typ_cd => p_perd_typ_cd
418 ,p_end_date => p_end_date
419 ,p_start_date => p_start_date
420 ,p_lmtn_yr_strt_dt => p_lmtn_yr_strt_dt
421 ,p_lmtn_yr_end_dt => p_lmtn_yr_end_dt
422 ,p_business_group_id => p_business_group_id
423 ,p_yrp_attribute_category => p_yrp_attribute_category
427 ,p_yrp_attribute4 => p_yrp_attribute4
424 ,p_yrp_attribute1 => p_yrp_attribute1
425 ,p_yrp_attribute2 => p_yrp_attribute2
426 ,p_yrp_attribute3 => p_yrp_attribute3
428 ,p_yrp_attribute5 => p_yrp_attribute5
429 ,p_yrp_attribute6 => p_yrp_attribute6
430 ,p_yrp_attribute7 => p_yrp_attribute7
431 ,p_yrp_attribute8 => p_yrp_attribute8
432 ,p_yrp_attribute9 => p_yrp_attribute9
433 ,p_yrp_attribute10 => p_yrp_attribute10
434 ,p_yrp_attribute11 => p_yrp_attribute11
435 ,p_yrp_attribute12 => p_yrp_attribute12
436 ,p_yrp_attribute13 => p_yrp_attribute13
437 ,p_yrp_attribute14 => p_yrp_attribute14
438 ,p_yrp_attribute15 => p_yrp_attribute15
439 ,p_yrp_attribute16 => p_yrp_attribute16
440 ,p_yrp_attribute17 => p_yrp_attribute17
441 ,p_yrp_attribute18 => p_yrp_attribute18
442 ,p_yrp_attribute19 => p_yrp_attribute19
443 ,p_yrp_attribute20 => p_yrp_attribute20
444 ,p_yrp_attribute21 => p_yrp_attribute21
445 ,p_yrp_attribute22 => p_yrp_attribute22
446 ,p_yrp_attribute23 => p_yrp_attribute23
447 ,p_yrp_attribute24 => p_yrp_attribute24
448 ,p_yrp_attribute25 => p_yrp_attribute25
449 ,p_yrp_attribute26 => p_yrp_attribute26
450 ,p_yrp_attribute27 => p_yrp_attribute27
451 ,p_yrp_attribute28 => p_yrp_attribute28
452 ,p_yrp_attribute29 => p_yrp_attribute29
453 ,p_yrp_attribute30 => p_yrp_attribute30
454 ,p_object_version_number => l_object_version_number
455 ,p_effective_date => trunc(p_effective_date)
456 );
457 --
458 begin
459 --
460 -- Start of API User Hook for the after hook of update_pgm_or_pl_yr_perd
461 --
462 ben_pgm_or_pl_yr_perd_bk2.update_pgm_or_pl_yr_perd_a
463 (
464 p_yr_perd_id => p_yr_perd_id
465 ,p_perds_in_yr_num => p_perds_in_yr_num
466 ,p_perd_tm_uom_cd => p_perd_tm_uom_cd
467 ,p_perd_typ_cd => p_perd_typ_cd
468 ,p_end_date => p_end_date
469 ,p_start_date => p_start_date
470 ,p_lmtn_yr_strt_dt => p_lmtn_yr_strt_dt
471 ,p_lmtn_yr_end_dt => p_lmtn_yr_end_dt
472 ,p_business_group_id => p_business_group_id
473 ,p_yrp_attribute_category => p_yrp_attribute_category
474 ,p_yrp_attribute1 => p_yrp_attribute1
475 ,p_yrp_attribute2 => p_yrp_attribute2
476 ,p_yrp_attribute3 => p_yrp_attribute3
477 ,p_yrp_attribute4 => p_yrp_attribute4
478 ,p_yrp_attribute5 => p_yrp_attribute5
479 ,p_yrp_attribute6 => p_yrp_attribute6
480 ,p_yrp_attribute7 => p_yrp_attribute7
481 ,p_yrp_attribute8 => p_yrp_attribute8
482 ,p_yrp_attribute9 => p_yrp_attribute9
483 ,p_yrp_attribute10 => p_yrp_attribute10
484 ,p_yrp_attribute11 => p_yrp_attribute11
485 ,p_yrp_attribute12 => p_yrp_attribute12
486 ,p_yrp_attribute13 => p_yrp_attribute13
487 ,p_yrp_attribute14 => p_yrp_attribute14
488 ,p_yrp_attribute15 => p_yrp_attribute15
489 ,p_yrp_attribute16 => p_yrp_attribute16
490 ,p_yrp_attribute17 => p_yrp_attribute17
491 ,p_yrp_attribute18 => p_yrp_attribute18
492 ,p_yrp_attribute19 => p_yrp_attribute19
493 ,p_yrp_attribute20 => p_yrp_attribute20
494 ,p_yrp_attribute21 => p_yrp_attribute21
495 ,p_yrp_attribute22 => p_yrp_attribute22
496 ,p_yrp_attribute23 => p_yrp_attribute23
497 ,p_yrp_attribute24 => p_yrp_attribute24
498 ,p_yrp_attribute25 => p_yrp_attribute25
499 ,p_yrp_attribute26 => p_yrp_attribute26
500 ,p_yrp_attribute27 => p_yrp_attribute27
501 ,p_yrp_attribute28 => p_yrp_attribute28
502 ,p_yrp_attribute29 => p_yrp_attribute29
503 ,p_yrp_attribute30 => p_yrp_attribute30
504 ,p_object_version_number => l_object_version_number
505 ,p_effective_date => trunc(p_effective_date)
506 );
507 exception
508 when hr_api.cannot_find_prog_unit then
509 hr_api.cannot_find_prog_unit_error
510 (p_module_name => 'UPDATE_pgm_or_pl_yr_perd'
511 ,p_hook_type => 'AP'
512 );
513 --
514 -- End of API User Hook for the after hook of update_pgm_or_pl_yr_perd
515 --
516 end;
517 --
518 hr_utility.set_location(l_proc, 60);
519 --
520 -- When in validation only mode raise the Validate_Enabled exception
521 --
522 if p_validate then
523 raise hr_api.validate_enabled;
524 end if;
525 --
526 -- Set all output arguments
527 --
528 p_object_version_number := l_object_version_number;
529 --
530 hr_utility.set_location(' Leaving:'||l_proc, 70);
531 --
532 exception
533 --
534 when hr_api.validate_enabled then
535 --
541 -- Only set output warning arguments
536 -- As the Validate_Enabled exception has been raised
537 -- we must rollback to the savepoint
538 --
539 ROLLBACK TO update_pgm_or_pl_yr_perd;
540 --
542 -- (Any key or derived arguments must be set to null
543 -- when validation only mode is being used.)
544 --
545 hr_utility.set_location(' Leaving:'||l_proc, 80);
546 --
547 when others then
548 --
549 -- A validation or unexpected error has occured
550 --
551 ROLLBACK TO update_pgm_or_pl_yr_perd;
552 raise;
553 --
554 end update_pgm_or_pl_yr_perd;
555 -- ----------------------------------------------------------------------------
556 -- |------------------------< delete_pgm_or_pl_yr_perd >----------------------|
557 -- ----------------------------------------------------------------------------
558 --
559 procedure delete_pgm_or_pl_yr_perd
560 (p_validate in boolean default false
561 ,p_yr_perd_id in number
562 ,p_object_version_number in out nocopy number
563 ,p_effective_date in date
564 ) is
565 --
566 -- Declare cursors and local variables
567 --
568 l_proc varchar2(72) := g_package||'update_pgm_or_pl_yr_perd';
569 l_object_version_number ben_yr_perd.object_version_number%TYPE;
573 hr_utility.set_location('Entering:'|| l_proc, 10);
570 --
571 begin
572 --
574 --
575 -- Issue a savepoint if operating in validation only mode
576 --
577 savepoint delete_pgm_or_pl_yr_perd;
578 --
579 hr_utility.set_location(l_proc, 20);
580 --
581 -- Process Logic
582 --
583 l_object_version_number := p_object_version_number;
584 --
585 --
586 begin
587 --
588 -- Start of API User Hook for the before hook of delete_pgm_or_pl_yr_perd
589 --
590 ben_pgm_or_pl_yr_perd_bk3.delete_pgm_or_pl_yr_perd_b
591 (
592 p_yr_perd_id => p_yr_perd_id
593 ,p_object_version_number => p_object_version_number
594 ,p_effective_date => trunc(p_effective_date)
595 );
596 exception
597 when hr_api.cannot_find_prog_unit then
598 hr_api.cannot_find_prog_unit_error
599 (p_module_name => 'DELETE_pgm_or_pl_yr_perd'
600 ,p_hook_type => 'BP'
601 );
602 --
603 -- End of API User Hook for the before hook of delete_pgm_or_pl_yr_perd
604 --
605 end;
606 --
607 ben_yrp_del.del
608 (
609 p_yr_perd_id => p_yr_perd_id
610 ,p_object_version_number => l_object_version_number
611 ,p_effective_date => p_effective_date
612 );
613 --
614 begin
615 --
616 -- Start of API User Hook for the after hook of delete_pgm_or_pl_yr_perd
617 --
618 ben_pgm_or_pl_yr_perd_bk3.delete_pgm_or_pl_yr_perd_a
619 (
620 p_yr_perd_id => p_yr_perd_id
621 ,p_object_version_number => l_object_version_number
622 ,p_effective_date => trunc(p_effective_date)
623 );
624 exception
625 when hr_api.cannot_find_prog_unit then
626 hr_api.cannot_find_prog_unit_error
627 (p_module_name => 'DELETE_pgm_or_pl_yr_perd'
628 ,p_hook_type => 'AP'
629 );
630 --
631 -- End of API User Hook for the after hook of delete_pgm_or_pl_yr_perd
632 --
633 end;
634 --
635 hr_utility.set_location(l_proc, 60);
636 --
637 -- When in validation only mode raise the Validate_Enabled exception
638 --
639 if p_validate then
640 raise hr_api.validate_enabled;
641 end if;
642 --
643 hr_utility.set_location(' Leaving:'||l_proc, 70);
644 --
645 exception
646 --
647 when hr_api.validate_enabled then
648 --
649 -- As the Validate_Enabled exception has been raised
650 -- we must rollback to the savepoint
651 --
652 ROLLBACK TO delete_pgm_or_pl_yr_perd;
653 --
654 -- Only set output warning arguments
655 -- (Any key or derived arguments must be set to null
656 -- when validation only mode is being used.)
657 --
658 --
659 when others then
660 --
661 -- A validation or unexpected error has occured
662 --
663 ROLLBACK TO delete_pgm_or_pl_yr_perd;
664 raise;
665 --
666 end delete_pgm_or_pl_yr_perd;
667 --
668 -- ----------------------------------------------------------------------------
669 -- |-------------------------------< lck >------------------------------------|
670 -- ----------------------------------------------------------------------------
671 --
672 procedure lck
673 (
674 p_yr_perd_id in number
675 ,p_object_version_number in number
676 ) is
677 --
678 --
679 -- Declare cursors and local variables
680 --
681 l_proc varchar2(72) := g_package||'lck';
682 --
683 begin
684 --
685 hr_utility.set_location('Entering:'|| l_proc, 10);
686 --
687 ben_yrp_shd.lck
688 (
689 p_yr_perd_id => p_yr_perd_id
690 ,p_object_version_number => p_object_version_number
691 );
692 --
693 hr_utility.set_location(' Leaving:'||l_proc, 70);
694 --
695 end lck;
696 --
697 end ben_pgm_or_pl_yr_perd_api;