DBA Data[Home] [Help]

PACKAGE BODY: APPS.BEN_ELIG_HRS_WKD_PRTE_API

Source


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