DBA Data[Home] [Help]

PACKAGE BODY: APPS.BEN_CM_TYP_USG_API

Source


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