DBA Data[Home] [Help]

PACKAGE BODY: APPS.BEN_ELIG_AGE_PRTE_API

Source


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