DBA Data[Home] [Help]

PACKAGE BODY: APPS.BEN_PLAN_BENEFICIARY_CTFN_API

Source


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