DBA Data[Home] [Help]

PACKAGE BODY: APPS.BEN_PERIOD_LIMIT_API

Source


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