DBA Data[Home] [Help]

PACKAGE BODY: APPS.BEN_DPNT_CVG_RQD_RLSHP_API

Source


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