DBA Data[Home] [Help]

PACKAGE BODY: APPS.BEN_APLD_DPNT_CVG_PRFL_API

Source


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