DBA Data[Home] [Help]

PACKAGE BODY: APPS.BEN_ELIG_OPTD_MDCR_PRTE_API

Source


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