DBA Data[Home] [Help]

PACKAGE BODY: APPS.BEN_CMBN_PTIP_OPT_API

Source


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