DBA Data[Home] [Help]

PACKAGE BODY: APPS.BEN_ELIG_DPNT_OTHR_PTIP_API

Source


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