DBA Data[Home] [Help]

PACKAGE BODY: APPS.BEN_ELIG_DSBLTY_RSN_PRTE_API

Source


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