DBA Data[Home] [Help]

PACKAGE BODY: APPS.BEN_ELIG_COMPTNCY_PRTE_API

Source


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