DBA Data[Home] [Help]

PACKAGE BODY: APPS.BEN_ELIG_CRIT_DPNT_API

Source


1 Package Body ben_elig_crit_dpnt_api as
2 /* $Header: beecdapi.pkb 120.1 2010/05/17 11:56:33 sgnanama noship $ */
3 --
4 -- Package Variables
5 --
6 g_package  varchar2(33) := '  ben_elig_crit_dpnt_api.';
7 --
8 -- ----------------------------------------------------------------------------
9 -- |------------------------< create_dpnt_eligy_criteria >----------------------|
10 -- ----------------------------------------------------------------------------
11 --
12 procedure create_dpnt_eligy_criteria
13   (
14    p_validate                       in boolean       default false
15   ,p_eligy_criteria_dpnt_id              out nocopy number
16   ,p_name                           in  varchar2     default null
17   ,p_short_code                     in  varchar2     default null
18   ,p_description                    in  varchar2     default null
19   ,p_criteria_type		    in  varchar2     default null
20   ,p_crit_col1_val_type_cd	    in  varchar2     default null
21   ,p_crit_col1_datatype	    	    in  varchar2     default null
22   ,p_col1_lookup_type		    in  varchar2     default null
23   ,p_col1_value_set_id              in  number	     default null
24   ,p_access_table_name1             in  varchar2     default null
25   ,p_access_column_name1	    in  varchar2     default null
26   ,p_time_entry_access_tab_nam1     in  varchar2     default null
27   ,p_time_entry_access_col_nam1     in  varchar2     default null
28   ,p_crit_col2_val_type_cd	    in	varchar2     default null
29   ,p_crit_col2_datatype		    in  varchar2     default null
30   ,p_col2_lookup_type		    in  varchar2     default null
31   ,p_col2_value_set_id              in  number	     default null
32   ,p_access_table_name2		    in  varchar2     default null
33   ,p_access_column_name2	    in  varchar2     default null
34   ,p_time_entry_access_tab_nam2     in	varchar2     default null
35   ,p_time_entry_access_col_nam2     in  varchar2     default null
36   ,p_allow_range_validation_flg     in  varchar2     default 'N'
37   ,p_user_defined_flag              in  varchar2     default 'N'
38   ,p_business_group_id 	    	    in  number       default null
39   ,p_egd_attribute_category         in  varchar2     default null
40   ,p_egd_attribute1                 in  varchar2     default null
41   ,p_egd_attribute2                 in  varchar2     default null
42   ,p_egd_attribute3                 in  varchar2     default null
43   ,p_egd_attribute4                 in  varchar2     default null
44   ,p_egd_attribute5                 in  varchar2     default null
45   ,p_egd_attribute6                 in  varchar2     default null
46   ,p_egd_attribute7                 in  varchar2     default null
47   ,p_egd_attribute8                 in  varchar2     default null
48   ,p_egd_attribute9                 in  varchar2     default null
49   ,p_egd_attribute10                in  varchar2     default null
50   ,p_egd_attribute11                in  varchar2     default null
51   ,p_egd_attribute12                in  varchar2     default null
52   ,p_egd_attribute13                in  varchar2     default null
53   ,p_egd_attribute14                in  varchar2     default null
54   ,p_egd_attribute15                in  varchar2     default null
55   ,p_egd_attribute16                in  varchar2     default null
56   ,p_egd_attribute17                in  varchar2     default null
57   ,p_egd_attribute18                in  varchar2     default null
58   ,p_egd_attribute19                in  varchar2     default null
59   ,p_egd_attribute20                in  varchar2     default null
60   ,p_egd_attribute21                in  varchar2     default null
61   ,p_egd_attribute22                in  varchar2     default null
62   ,p_egd_attribute23                in  varchar2     default null
63   ,p_egd_attribute24                in  varchar2     default null
64   ,p_egd_attribute25                in  varchar2     default null
65   ,p_egd_attribute26                in  varchar2     default null
66   ,p_egd_attribute27                in  varchar2     default null
67   ,p_egd_attribute28                in  varchar2     default null
68   ,p_egd_attribute29                in  varchar2     default null
69   ,p_egd_attribute30                in  varchar2     default null
70   ,p_object_version_number          out nocopy number
71   ,p_effective_date                 in  date
72   ,p_allow_range_validation_flag2   in  varchar2     default null
73   ,p_time_access_calc_rule1         in  number	     default null
74   ,p_time_access_calc_rule2         in  number	     default null
75   ) is
76   --
77   -- Declare cursors and local variables
78   --
79   l_eligy_criteria_dpnt_id       ben_eligy_criteria_dpnt.eligy_criteria_dpnt_id%TYPE;
80   l_proc varchar2(72) :=    g_package||'create_dpnt_eligy_criteria';
81   l_object_version_number   ben_eligy_criteria_dpnt.object_version_number%TYPE;
82   --
83 begin
84   --
85   hr_utility.set_location('Entering:'|| l_proc, 10);
86   --
87   -- Issue a savepoint if operating in validation only mode
88   --
89   savepoint create_eligy_criteria_dpnt;
90   --
91   hr_utility.set_location(l_proc, 20);
92   --
93   -- Process Logic
94   --
95   begin
96     --
97     -- Start of API User Hook for the before hook of create_eligy_criteria
98     --
99     ben_elig_crit_dpnt_bk1.create_dpnt_eligy_criteria_b
100       (
101         p_name                               => p_name
102        ,p_short_code                         => p_short_code
103        ,p_description                        => p_description
104        ,p_criteria_type		             => p_criteria_type
105        ,p_crit_col1_val_type_cd	             => p_crit_col1_val_type_cd
106        ,p_crit_col1_datatype	    	     => p_crit_col1_datatype
107        ,p_col1_lookup_type		     => p_col1_lookup_type
108        ,p_col1_value_set_id                  => p_col1_value_set_id
109        ,p_access_table_name1                 => p_access_table_name1
110        ,p_access_column_name1	             => p_access_column_name1
111        ,p_time_entry_access_tab_nam1         => p_time_entry_access_tab_nam1
112        ,p_time_entry_access_col_nam1         => p_time_entry_access_col_nam1
113        ,p_crit_col2_val_type_cd	             => p_crit_col2_val_type_cd
114        ,p_crit_col2_datatype		     => p_crit_col2_datatype
115        ,p_col2_lookup_type		     => p_col2_lookup_type
116        ,p_col2_value_set_id                  => p_col2_value_set_id
117        ,p_access_table_name2		     => p_access_table_name2
118        ,p_access_column_name2	             => p_access_column_name2
119        ,p_time_entry_access_tab_nam2         => p_time_entry_access_tab_nam2
120        ,p_time_entry_access_col_nam2         => p_time_entry_access_col_nam2
121        ,p_allow_range_validation_flg         => p_allow_range_validation_flg
122        ,p_user_defined_flag                  => p_user_defined_flag
123        ,p_business_group_id 	    	     => p_business_group_id
124        ,p_egd_attribute_category             => p_egd_attribute_category
125        ,p_egd_attribute1                     => p_egd_attribute1
126        ,p_egd_attribute2                     => p_egd_attribute2
127        ,p_egd_attribute3                     => p_egd_attribute3
128        ,p_egd_attribute4                     => p_egd_attribute4
129        ,p_egd_attribute5                     => p_egd_attribute5
130        ,p_egd_attribute6                     => p_egd_attribute6
131        ,p_egd_attribute7                     => p_egd_attribute7
132        ,p_egd_attribute8                     => p_egd_attribute8
133        ,p_egd_attribute9                     => p_egd_attribute9
134        ,p_egd_attribute10                    => p_egd_attribute10
135        ,p_egd_attribute11                    => p_egd_attribute11
136        ,p_egd_attribute12                    => p_egd_attribute12
137        ,p_egd_attribute13                    => p_egd_attribute13
138        ,p_egd_attribute14                    => p_egd_attribute14
139        ,p_egd_attribute15                    => p_egd_attribute15
140        ,p_egd_attribute16                    => p_egd_attribute16
141        ,p_egd_attribute17                    => p_egd_attribute17
142        ,p_egd_attribute18                    => p_egd_attribute18
143        ,p_egd_attribute19                    => p_egd_attribute19
144        ,p_egd_attribute20                    => p_egd_attribute20
145        ,p_egd_attribute21                    => p_egd_attribute21
146        ,p_egd_attribute22                    => p_egd_attribute22
147        ,p_egd_attribute23                    => p_egd_attribute23
148        ,p_egd_attribute24                    => p_egd_attribute24
149        ,p_egd_attribute25                    => p_egd_attribute25
150        ,p_egd_attribute26                    => p_egd_attribute26
151        ,p_egd_attribute27                    => p_egd_attribute27
152        ,p_egd_attribute28                    => p_egd_attribute28
153        ,p_egd_attribute29                    =>	p_egd_attribute29
154        ,p_egd_attribute30                    =>	p_egd_attribute30
155        ,p_effective_date                     => trunc(p_effective_date)
156        ,p_allow_range_validation_flag2       => p_allow_range_validation_flag2
157        ,p_time_access_calc_rule1             => p_time_access_calc_rule1
158        ,p_time_access_calc_rule2             => p_time_access_calc_rule2
159        );
160   exception
161     when hr_api.cannot_find_prog_unit then
162       hr_api.cannot_find_prog_unit_error
163         (
164          p_module_name => 'CREATE_dpnt_eligy_criteria'
165         ,p_hook_type   => 'BP'
166         );
167     --
168     -- End of API User Hook for the before hook of create_eligy_criteria
169     --
170   end;
171   --
172   ben_dpnt_egd_ins.ins
173     (
174      p_eligy_criteria_dpnt_id             => l_eligy_criteria_dpnt_id
175     ,p_name                          => p_name
176     ,p_short_code                    => p_short_code
177     ,p_description                   => p_description
178     ,p_criteria_type		     => p_criteria_type
179     ,p_crit_col1_val_type_cd	     => p_crit_col1_val_type_cd
180     ,p_crit_col1_datatype	     => p_crit_col1_datatype
181     ,p_col1_lookup_type		     => p_col1_lookup_type
182     ,p_col1_value_set_id             => p_col1_value_set_id
183     ,p_access_table_name1            => p_access_table_name1
184     ,p_access_column_name1	     => p_access_column_name1
185     ,p_time_entry_access_tab_nam1    => p_time_entry_access_tab_nam1
186     ,p_time_entry_access_col_nam1    => p_time_entry_access_col_nam1
187     ,p_crit_col2_val_type_cd	     => p_crit_col2_val_type_cd
188     ,p_crit_col2_datatype	     => p_crit_col2_datatype
189     ,p_col2_lookup_type		     => p_col2_lookup_type
190     ,p_col2_value_set_id             => p_col2_value_set_id
191     ,p_access_table_name2	     => p_access_table_name2
192     ,p_access_column_name2	     => p_access_column_name2
193     ,p_time_entry_access_tab_nam2    => p_time_entry_access_tab_nam2
194     ,p_time_entry_access_col_nam2    => p_time_entry_access_col_nam2
195     ,p_allow_range_validation_flg    => p_allow_range_validation_flg
196     ,p_user_defined_flag             => p_user_defined_flag
197     ,p_business_group_id 	     => p_business_group_id
198     ,p_egd_attribute_category        => p_egd_attribute_category
199     ,p_egd_attribute1                => p_egd_attribute1
200     ,p_egd_attribute2                => p_egd_attribute2
201     ,p_egd_attribute3                => p_egd_attribute3
202     ,p_egd_attribute4                => p_egd_attribute4
203     ,p_egd_attribute5                => p_egd_attribute5
204     ,p_egd_attribute6                => p_egd_attribute6
205     ,p_egd_attribute7                => p_egd_attribute7
206     ,p_egd_attribute8                => p_egd_attribute8
207     ,p_egd_attribute9                => p_egd_attribute9
208     ,p_egd_attribute10               => p_egd_attribute10
209     ,p_egd_attribute11               => p_egd_attribute11
210     ,p_egd_attribute12               => p_egd_attribute12
211     ,p_egd_attribute13               => p_egd_attribute13
212     ,p_egd_attribute14               => p_egd_attribute14
213     ,p_egd_attribute15               => p_egd_attribute15
214     ,p_egd_attribute16               => p_egd_attribute16
215     ,p_egd_attribute17               => p_egd_attribute17
216     ,p_egd_attribute18               => p_egd_attribute18
217     ,p_egd_attribute19               => p_egd_attribute19
218     ,p_egd_attribute20               => p_egd_attribute20
219     ,p_egd_attribute21               => p_egd_attribute21
220     ,p_egd_attribute22               => p_egd_attribute22
221     ,p_egd_attribute23               => p_egd_attribute23
222     ,p_egd_attribute24               => p_egd_attribute24
223     ,p_egd_attribute25               => p_egd_attribute25
224     ,p_egd_attribute26               => p_egd_attribute26
225     ,p_egd_attribute27               => p_egd_attribute27
226     ,p_egd_attribute28               => p_egd_attribute28
227     ,p_egd_attribute29               => p_egd_attribute29
228     ,p_egd_attribute30               => p_egd_attribute30
229     ,p_object_version_number         => l_object_version_number
230     ,p_effective_date                => trunc(p_effective_date)
231     ,p_allow_range_validation_flag2  => p_allow_range_validation_flag2
232     ,p_time_access_calc_rule1        => p_time_access_calc_rule1
233     ,p_time_access_calc_rule2        => p_time_access_calc_rule2
234     );
235   --
236   begin
237     --
238     -- Start of API User Hook for the after hook of create_eligy_criteria
239     --
240     ben_elig_crit_dpnt_bk1.create_dpnt_eligy_criteria_a
241       (
242      p_eligy_criteria_dpnt_id             => l_eligy_criteria_dpnt_id
243     ,p_name                          => p_name
244     ,p_short_code                    => p_short_code
245     ,p_description                   => p_description
246     ,p_criteria_type		     => p_criteria_type
247     ,p_crit_col1_val_type_cd	     => p_crit_col1_val_type_cd
248     ,p_crit_col1_datatype	     => p_crit_col1_datatype
249     ,p_col1_lookup_type		     => p_col1_lookup_type
250     ,p_col1_value_set_id             => p_col1_value_set_id
251     ,p_access_table_name1            => p_access_table_name1
252     ,p_access_column_name1	     => p_access_column_name1
253     ,p_time_entry_access_tab_nam1    => p_time_entry_access_tab_nam1
254     ,p_time_entry_access_col_nam1    => p_time_entry_access_col_nam1
255     ,p_crit_col2_val_type_cd	     => p_crit_col2_val_type_cd
256     ,p_crit_col2_datatype	     => p_crit_col2_datatype
257     ,p_col2_lookup_type		     => p_col2_lookup_type
258     ,p_col2_value_set_id             => p_col2_value_set_id
259     ,p_access_table_name2	     => p_access_table_name2
260     ,p_access_column_name2	     => p_access_column_name2
261     ,p_time_entry_access_tab_nam2    => p_time_entry_access_tab_nam2
262     ,p_time_entry_access_col_nam2    => p_time_entry_access_col_nam2
263     ,p_allow_range_validation_flg    => p_allow_range_validation_flg
264     ,p_user_defined_flag             => p_user_defined_flag
265     ,p_business_group_id 	     => p_business_group_id
266     ,p_egd_attribute_category        => p_egd_attribute_category
267     ,p_egd_attribute1                => p_egd_attribute1
268     ,p_egd_attribute2                => p_egd_attribute2
269     ,p_egd_attribute3                => p_egd_attribute3
270     ,p_egd_attribute4                => p_egd_attribute4
271     ,p_egd_attribute5                => p_egd_attribute5
272     ,p_egd_attribute6                => p_egd_attribute6
273     ,p_egd_attribute7                => p_egd_attribute7
274     ,p_egd_attribute8                => p_egd_attribute8
275     ,p_egd_attribute9                => p_egd_attribute9
276     ,p_egd_attribute10               => p_egd_attribute10
277     ,p_egd_attribute11               => p_egd_attribute11
278     ,p_egd_attribute12               => p_egd_attribute12
279     ,p_egd_attribute13               => p_egd_attribute13
280     ,p_egd_attribute14               => p_egd_attribute14
281     ,p_egd_attribute15               => p_egd_attribute15
282     ,p_egd_attribute16               => p_egd_attribute16
283     ,p_egd_attribute17               => p_egd_attribute17
284     ,p_egd_attribute18               => p_egd_attribute18
285     ,p_egd_attribute19               => p_egd_attribute19
286     ,p_egd_attribute20               => p_egd_attribute20
287     ,p_egd_attribute21               => p_egd_attribute21
288     ,p_egd_attribute22               => p_egd_attribute22
289     ,p_egd_attribute23               => p_egd_attribute23
290     ,p_egd_attribute24               => p_egd_attribute24
291     ,p_egd_attribute25               => p_egd_attribute25
292     ,p_egd_attribute26               => p_egd_attribute26
293     ,p_egd_attribute27               => p_egd_attribute27
294     ,p_egd_attribute28               => p_egd_attribute28
295     ,p_egd_attribute29               => p_egd_attribute29
296     ,p_egd_attribute30               => p_egd_attribute30
297     ,p_object_version_number         => l_object_version_number
298     ,p_effective_date                 => trunc(p_effective_date)
299     ,p_allow_range_validation_flag2  => p_allow_range_validation_flag2
300     ,p_time_access_calc_rule1        => p_time_access_calc_rule1
301     ,p_time_access_calc_rule2        => p_time_access_calc_rule2
302     );
303 
304   exception
305     when hr_api.cannot_find_prog_unit then
306       hr_api.cannot_find_prog_unit_error
307         (p_module_name => 'CREATE_dpnt_eligy_criteria'
308         ,p_hook_type   => 'AP'
309         );
310     --
311     -- End of API User Hook for the after hook of create_eligy_criteria
312     --
313   end;
314   --
315 
316   --
317   -- When in validation only mode raise the Validate_Enabled exception
318   --
319   if p_validate then
320     raise hr_api.validate_enabled;
321   end if;
322   --
323   -- Set all output arguments
324   --
325   p_eligy_criteria_dpnt_id     := l_eligy_criteria_dpnt_id;
326   p_object_version_number := l_object_version_number;
327   --
328 
329   --
330 exception
331   --
332   when hr_api.validate_enabled then
333     --
334     -- As the Validate_Enabled exception has been raised
335     -- we must rollback to the savepoint
336     --
337     ROLLBACK TO create_eligy_criteria_dpnt;
338     --
339     -- Only set output warning arguments
340     -- (Any key or derived arguments must be set to null
341     -- when validation only mode is being used.)
342     --
343     p_eligy_criteria_dpnt_id      := null;
344     p_object_version_number  := null;
345 
346     --
347   when others then
348     --
349     -- A validation or unexpected error has occured
350     --
351     ROLLBACK TO create_eligy_criteria_dpnt;
352     p_eligy_criteria_dpnt_id      := null;
353     p_object_version_number  := null;
354     raise;
355     --
356 end create_dpnt_eligy_criteria;
357 -- ----------------------------------------------------------------------------
358 -- |------------------------< update_dpnt_eligy_criteria >--- ------------------|
359 -- ----------------------------------------------------------------------------
360 --
361 procedure update_dpnt_eligy_criteria
362   (
363      p_validate                        in boolean    default false
364      ,p_eligy_criteria_dpnt_id              in  number
365      ,p_name                           in  varchar2  default hr_api.g_varchar2
366      ,p_short_code                     in  varchar2  default hr_api.g_varchar2
367      ,p_description                    in  varchar2  default hr_api.g_varchar2
368      ,p_criteria_type		       in  varchar2  default hr_api.g_varchar2
369      ,p_crit_col1_val_type_cd	       in  varchar2  default hr_api.g_varchar2
370      ,p_crit_col1_datatype	       in  varchar2  default hr_api.g_varchar2
371      ,p_col1_lookup_type	       in  varchar2  default hr_api.g_varchar2
372      ,p_col1_value_set_id              in  number    default hr_api.g_number
373      ,p_access_table_name1             in  varchar2  default hr_api.g_varchar2
374      ,p_access_column_name1	       in  varchar2  default hr_api.g_varchar2
375      ,p_time_entry_access_tab_nam1     in  varchar2  default hr_api.g_varchar2
376      ,p_time_entry_access_col_nam1     in  varchar2  default hr_api.g_varchar2
377      ,p_crit_col2_val_type_cd	       in  varchar2  default hr_api.g_varchar2
378      ,p_crit_col2_datatype	       in  varchar2  default hr_api.g_varchar2
379      ,p_col2_lookup_type	       in  varchar2  default hr_api.g_varchar2
380      ,p_col2_value_set_id              in  number    default hr_api.g_number
381      ,p_access_table_name2	       in  varchar2  default hr_api.g_varchar2
382      ,p_access_column_name2	       in  varchar2  default hr_api.g_varchar2
383      ,p_time_entry_access_tab_nam2     in  varchar2  default hr_api.g_varchar2
384      ,p_time_entry_access_col_nam2     in  varchar2  default hr_api.g_varchar2
385      ,p_allow_range_validation_flg     in  varchar2  default hr_api.g_varchar2
386      ,p_user_defined_flag              in  varchar2  default hr_api.g_varchar2
387      ,p_business_group_id 	       in  number    default hr_api.g_number
388      ,p_egd_attribute_category         in  varchar2  default hr_api.g_varchar2
389      ,p_egd_attribute1                 in  varchar2  default hr_api.g_varchar2
390      ,p_egd_attribute2                 in  varchar2  default hr_api.g_varchar2
391      ,p_egd_attribute3                 in  varchar2  default hr_api.g_varchar2
392      ,p_egd_attribute4                 in  varchar2  default hr_api.g_varchar2
393      ,p_egd_attribute5                 in  varchar2  default hr_api.g_varchar2
394      ,p_egd_attribute6                 in  varchar2  default hr_api.g_varchar2
395      ,p_egd_attribute7                 in  varchar2  default hr_api.g_varchar2
396      ,p_egd_attribute8                 in  varchar2  default hr_api.g_varchar2
397      ,p_egd_attribute9                 in  varchar2  default hr_api.g_varchar2
398      ,p_egd_attribute10                in  varchar2  default hr_api.g_varchar2
399      ,p_egd_attribute11                in  varchar2  default hr_api.g_varchar2
400      ,p_egd_attribute12                in  varchar2  default hr_api.g_varchar2
401      ,p_egd_attribute13                in  varchar2  default hr_api.g_varchar2
402      ,p_egd_attribute14                in  varchar2  default hr_api.g_varchar2
403      ,p_egd_attribute15                in  varchar2  default hr_api.g_varchar2
404      ,p_egd_attribute16                in  varchar2  default hr_api.g_varchar2
405      ,p_egd_attribute17                in  varchar2  default hr_api.g_varchar2
406      ,p_egd_attribute18                in  varchar2  default hr_api.g_varchar2
407      ,p_egd_attribute19                in  varchar2  default hr_api.g_varchar2
408      ,p_egd_attribute20                in  varchar2  default hr_api.g_varchar2
409      ,p_egd_attribute21                in  varchar2  default hr_api.g_varchar2
410      ,p_egd_attribute22                in  varchar2  default hr_api.g_varchar2
411      ,p_egd_attribute23                in  varchar2  default hr_api.g_varchar2
412      ,p_egd_attribute24                in  varchar2  default hr_api.g_varchar2
413      ,p_egd_attribute25                in  varchar2  default hr_api.g_varchar2
414      ,p_egd_attribute26                in  varchar2  default hr_api.g_varchar2
415      ,p_egd_attribute27                in  varchar2  default hr_api.g_varchar2
416      ,p_egd_attribute28                in  varchar2  default hr_api.g_varchar2
417      ,p_egd_attribute29                in  varchar2  default hr_api.g_varchar2
418      ,p_egd_attribute30                in  varchar2  default hr_api.g_varchar2
419      ,p_object_version_number          in out nocopy number
420      ,p_effective_date                 in  date
421      ,p_allow_range_validation_flag2   in  varchar2  default hr_api.g_varchar2
422      ,p_time_access_calc_rule1         in  number    default hr_api.g_number
423      ,p_time_access_calc_rule2         in  number    default hr_api.g_number
424   ) is
425   --
426   -- Declare cursors and local variables
427   --
428   l_eligy_criteria_dpnt_id       ben_eligy_criteria_dpnt.eligy_criteria_dpnt_id%TYPE;
429   l_proc varchar2(72)      := g_package||'update_dpnt_eligy_criteria';
430   l_object_version_number  ben_eligy_criteria_dpnt.object_version_number%TYPE;
431   --
432 begin
433 
434 ----hr_utility.trace_on(null,'TRACE-file');
435   --
436   hr_utility.set_location('Entering:'|| l_proc, 10);
437 
438   --
439   -- Issue a savepoint if operating in validation only mode
440   --
441   savepoint update_dpnt_eligy_criteria;
442   --
443 
444   --
445   -- Process Logic
446   --
447   l_eligy_criteria_dpnt_id     := p_eligy_criteria_dpnt_id;
448   l_object_version_number := p_object_version_number;
449   --
450   begin
451     --
452     -- Start of API User Hook for the before hook of update_dpnt_eligy_criteria
453     --
454     ben_elig_crit_dpnt_bk2.update_dpnt_eligy_criteria_b
455       (
456             p_eligy_criteria_dpnt_id             => l_eligy_criteria_dpnt_id
457            ,p_name                          => p_name
458            ,p_short_code                    => p_short_code
459            ,p_description                   => p_description
460            ,p_criteria_type		    => p_criteria_type
461            ,p_crit_col1_val_type_cd	    => p_crit_col1_val_type_cd
462            ,p_crit_col1_datatype	    => p_crit_col1_datatype
463            ,p_col1_lookup_type		    => p_col1_lookup_type
464            ,p_col1_value_set_id             => p_col1_value_set_id
465            ,p_access_table_name1            => p_access_table_name1
466            ,p_access_column_name1	    => p_access_column_name1
467            ,p_time_entry_access_tab_nam1    => p_time_entry_access_tab_nam1
468            ,p_time_entry_access_col_nam1    => p_time_entry_access_col_nam1
469            ,p_crit_col2_val_type_cd	    => p_crit_col2_val_type_cd
470            ,p_crit_col2_datatype	    => p_crit_col2_datatype
471            ,p_col2_lookup_type		    => p_col2_lookup_type
472            ,p_col2_value_set_id             => p_col2_value_set_id
473            ,p_access_table_name2	    => p_access_table_name2
474            ,p_access_column_name2	    => p_access_column_name2
475            ,p_time_entry_access_tab_nam2    => p_time_entry_access_tab_nam2
476            ,p_time_entry_access_col_nam2    => p_time_entry_access_col_nam2
477            ,p_allow_range_validation_flg    => p_allow_range_validation_flg
478            ,p_user_defined_flag             => p_user_defined_flag
479            ,p_business_group_id 	    => p_business_group_id
480            ,p_egd_attribute_category        => p_egd_attribute_category
481            ,p_egd_attribute1                => p_egd_attribute1
482            ,p_egd_attribute2                => p_egd_attribute2
483            ,p_egd_attribute3                => p_egd_attribute3
484            ,p_egd_attribute4                => p_egd_attribute4
485            ,p_egd_attribute5                => p_egd_attribute5
486            ,p_egd_attribute6                => p_egd_attribute6
487            ,p_egd_attribute7                => p_egd_attribute7
488            ,p_egd_attribute8                => p_egd_attribute8
489            ,p_egd_attribute9                => p_egd_attribute9
490            ,p_egd_attribute10               => p_egd_attribute10
491            ,p_egd_attribute11               => p_egd_attribute11
492            ,p_egd_attribute12               => p_egd_attribute12
493            ,p_egd_attribute13               => p_egd_attribute13
494            ,p_egd_attribute14               => p_egd_attribute14
495            ,p_egd_attribute15               => p_egd_attribute15
496            ,p_egd_attribute16               => p_egd_attribute16
497            ,p_egd_attribute17               => p_egd_attribute17
498            ,p_egd_attribute18               => p_egd_attribute18
499            ,p_egd_attribute19               => p_egd_attribute19
500            ,p_egd_attribute20               => p_egd_attribute20
501            ,p_egd_attribute21               => p_egd_attribute21
502            ,p_egd_attribute22               => p_egd_attribute22
503            ,p_egd_attribute23               => p_egd_attribute23
504            ,p_egd_attribute24               => p_egd_attribute24
505            ,p_egd_attribute25               => p_egd_attribute25
506            ,p_egd_attribute26               => p_egd_attribute26
507            ,p_egd_attribute27               => p_egd_attribute27
508            ,p_egd_attribute28               => p_egd_attribute28
509            ,p_egd_attribute29               => p_egd_attribute29
510            ,p_egd_attribute30               => p_egd_attribute30
511           ,p_object_version_number          => l_object_version_number
512           ,p_effective_date                 => trunc(p_effective_date)
513            ,p_allow_range_validation_flag2  =>  p_allow_range_validation_flag2
514            ,p_time_access_calc_rule1        =>  p_time_access_calc_rule1
515            ,p_time_access_calc_rule2        =>  p_time_access_calc_rule2
516       );
517   exception
518     when hr_api.cannot_find_prog_unit then
519       hr_api.cannot_find_prog_unit_error
520         (p_module_name => 'UPDATE_dpnt_eligy_criteria'
521         ,p_hook_type   => 'BP'
522         );
523     --
524     -- End of API User Hook for the before hook of update_eligy_criteria
525     --
526   end;
527   --
528   ben_dpnt_egd_upd.upd
529     (
530           p_eligy_criteria_dpnt_id             => l_eligy_criteria_dpnt_id
531          ,p_name                          => p_name
532          ,p_short_code                    => p_short_code
533          ,p_description                   => p_description
534          ,p_criteria_type		  => p_criteria_type
535          ,p_crit_col1_val_type_cd	  => p_crit_col1_val_type_cd
536          ,p_crit_col1_datatype	          => p_crit_col1_datatype
537          ,p_col1_lookup_type		  => p_col1_lookup_type
538          ,p_col1_value_set_id             => p_col1_value_set_id
539          ,p_access_table_name1            => p_access_table_name1
540          ,p_access_column_name1	          => p_access_column_name1
541          ,p_time_entry_access_tab_nam1    => p_time_entry_access_tab_nam1
542          ,p_time_entry_access_col_nam1    => p_time_entry_access_col_nam1
543          ,p_crit_col2_val_type_cd	  => p_crit_col2_val_type_cd
544          ,p_crit_col2_datatype	          => p_crit_col2_datatype
545          ,p_col2_lookup_type		  => p_col2_lookup_type
546          ,p_col2_value_set_id             => p_col2_value_set_id
547          ,p_access_table_name2	          => p_access_table_name2
548          ,p_access_column_name2	          => p_access_column_name2
549          ,p_time_entry_access_tab_nam2    => p_time_entry_access_tab_nam2
550          ,p_time_entry_access_col_nam2    => p_time_entry_access_col_nam2
551          ,p_allow_range_validation_flg    => p_allow_range_validation_flg
552          ,p_user_defined_flag             => p_user_defined_flag
553          ,p_business_group_id 	          => p_business_group_id
554          ,p_egd_attribute_category        => p_egd_attribute_category
555          ,p_egd_attribute1                => p_egd_attribute1
556          ,p_egd_attribute2                => p_egd_attribute2
557          ,p_egd_attribute3                => p_egd_attribute3
558          ,p_egd_attribute4                => p_egd_attribute4
559          ,p_egd_attribute5                => p_egd_attribute5
560          ,p_egd_attribute6                => p_egd_attribute6
561          ,p_egd_attribute7                => p_egd_attribute7
562          ,p_egd_attribute8                => p_egd_attribute8
563          ,p_egd_attribute9                => p_egd_attribute9
564          ,p_egd_attribute10               => p_egd_attribute10
565          ,p_egd_attribute11               => p_egd_attribute11
566          ,p_egd_attribute12               => p_egd_attribute12
567          ,p_egd_attribute13               => p_egd_attribute13
568          ,p_egd_attribute14               => p_egd_attribute14
569          ,p_egd_attribute15               => p_egd_attribute15
570          ,p_egd_attribute16               => p_egd_attribute16
571          ,p_egd_attribute17               => p_egd_attribute17
572          ,p_egd_attribute18               => p_egd_attribute18
573          ,p_egd_attribute19               => p_egd_attribute19
574          ,p_egd_attribute20               => p_egd_attribute20
575          ,p_egd_attribute21               => p_egd_attribute21
576          ,p_egd_attribute22               => p_egd_attribute22
577          ,p_egd_attribute23               => p_egd_attribute23
578          ,p_egd_attribute24               => p_egd_attribute24
579          ,p_egd_attribute25               => p_egd_attribute25
580          ,p_egd_attribute26               => p_egd_attribute26
581          ,p_egd_attribute27               => p_egd_attribute27
582          ,p_egd_attribute28               => p_egd_attribute28
583          ,p_egd_attribute29               => p_egd_attribute29
584          ,p_egd_attribute30               => p_egd_attribute30
585          ,p_object_version_number         => l_object_version_number
586 	 ,p_effective_date                => trunc(p_effective_date)
587          ,p_allow_range_validation_flag2  =>  p_allow_range_validation_flag2
588          ,p_time_access_calc_rule1        =>  p_time_access_calc_rule1
589          ,p_time_access_calc_rule2        =>  p_time_access_calc_rule2
590     );
591   --
592   begin
593     --
594     -- Start of API User Hook for the after hook of update_eligy_criteria
595     --
596     ben_elig_crit_dpnt_bk2.update_dpnt_eligy_criteria_a
597       (
598             p_eligy_criteria_dpnt_id             => l_eligy_criteria_dpnt_id
599            ,p_name                          => p_name
600            ,p_short_code                    => p_short_code
601            ,p_description                   => p_description
602            ,p_criteria_type		    => p_criteria_type
603            ,p_crit_col1_val_type_cd	    => p_crit_col1_val_type_cd
604            ,p_crit_col1_datatype	    => p_crit_col1_datatype
605            ,p_col1_lookup_type		    => p_col1_lookup_type
606            ,p_col1_value_set_id             => p_col1_value_set_id
607            ,p_access_table_name1            => p_access_table_name1
608            ,p_access_column_name1	    => p_access_column_name1
609            ,p_time_entry_access_tab_nam1    => p_time_entry_access_tab_nam1
610            ,p_time_entry_access_col_nam1    => p_time_entry_access_col_nam1
611            ,p_crit_col2_val_type_cd	    => p_crit_col2_val_type_cd
612            ,p_crit_col2_datatype	    => p_crit_col2_datatype
613            ,p_col2_lookup_type		    => p_col2_lookup_type
614            ,p_col2_value_set_id             => p_col2_value_set_id
615            ,p_access_table_name2	    => p_access_table_name2
616            ,p_access_column_name2	    => p_access_column_name2
617            ,p_time_entry_access_tab_nam2    => p_time_entry_access_tab_nam2
618            ,p_time_entry_access_col_nam2    => p_time_entry_access_col_nam2
619            ,p_allow_range_validation_flg    => p_allow_range_validation_flg
620            ,p_user_defined_flag             => p_user_defined_flag
621            ,p_business_group_id 	    => p_business_group_id
622            ,p_egd_attribute_category        => p_egd_attribute_category
623            ,p_egd_attribute1                => p_egd_attribute1
624            ,p_egd_attribute2                => p_egd_attribute2
625            ,p_egd_attribute3                => p_egd_attribute3
626            ,p_egd_attribute4                => p_egd_attribute4
627            ,p_egd_attribute5                => p_egd_attribute5
628            ,p_egd_attribute6                => p_egd_attribute6
629            ,p_egd_attribute7                => p_egd_attribute7
630            ,p_egd_attribute8                => p_egd_attribute8
631            ,p_egd_attribute9                => p_egd_attribute9
632            ,p_egd_attribute10               => p_egd_attribute10
633            ,p_egd_attribute11               => p_egd_attribute11
634            ,p_egd_attribute12               => p_egd_attribute12
635            ,p_egd_attribute13               => p_egd_attribute13
636            ,p_egd_attribute14               => p_egd_attribute14
637            ,p_egd_attribute15               => p_egd_attribute15
638            ,p_egd_attribute16               => p_egd_attribute16
639            ,p_egd_attribute17               => p_egd_attribute17
640            ,p_egd_attribute18               => p_egd_attribute18
641            ,p_egd_attribute19               => p_egd_attribute19
642            ,p_egd_attribute20               => p_egd_attribute20
643            ,p_egd_attribute21               => p_egd_attribute21
644            ,p_egd_attribute22               => p_egd_attribute22
645            ,p_egd_attribute23               => p_egd_attribute23
646            ,p_egd_attribute24               => p_egd_attribute24
647            ,p_egd_attribute25               => p_egd_attribute25
648            ,p_egd_attribute26               => p_egd_attribute26
649            ,p_egd_attribute27               => p_egd_attribute27
650            ,p_egd_attribute28               => p_egd_attribute28
651            ,p_egd_attribute29               => p_egd_attribute29
652            ,p_egd_attribute30               => p_egd_attribute30
653            ,p_object_version_number         => l_object_version_number
654 	   ,p_effective_date                => trunc(p_effective_date)
655            ,p_allow_range_validation_flag2  =>  p_allow_range_validation_flag2
656            ,p_time_access_calc_rule1        =>  p_time_access_calc_rule1
657            ,p_time_access_calc_rule2        =>  p_time_access_calc_rule2
658       );
659   exception
660     when hr_api.cannot_find_prog_unit then
661       hr_api.cannot_find_prog_unit_error
662         (p_module_name => 'UPDATE_dpnt_eligy_criteria'
663         ,p_hook_type   => 'AP'
664         );
665     --
666     -- End of API User Hook for the after hook of update_eligy_criteria
667     --
668   end;
669   --
670 
671   --
672   -- When in validation only mode raise the Validate_Enabled exception
673   --
674   if p_validate then
675     raise hr_api.validate_enabled;
676   end if;
677   --
678   -- Set all output arguments
679   --
680   p_object_version_number := l_object_version_number;
681   --
682 
683   --
684 exception
685   --
686   when hr_api.validate_enabled then
687     --
688     -- As the Validate_Enabled exception has been raised
689     -- we must rollback to the savepoint
690     --
691     ROLLBACK TO update_dpnt_eligy_criteria;
692     --
693     -- Only set output warning arguments
694     -- (Any key or derived arguments must be set to null
695     -- when validation only mode is being used.)
696     --
697 
698     --
699   when others then
700     --
701     -- A validation or unexpected error has occured
702     --
703     ROLLBACK TO update_dpnt_eligy_criteria;
704     raise;
705     --
706 end update_dpnt_eligy_criteria;
707 -- ----------------------------------------------------------------------------
708 -- |------------------------< delete_dpnt_eligy_criteria >----------------------|
709 -- ----------------------------------------------------------------------------
710 --
711 procedure delete_dpnt_eligy_criteria
712   (p_validate                       in  boolean  default false
713   ,p_eligy_criteria_dpnt_id              in  number
714   ,p_object_version_number          in out nocopy number
715   ,p_effective_date                 in  date
716   ) is
717   --
718   -- Declare cursors and local variables
719   --
720   l_proc varchar2(72) := g_package||'delete_dpnt_eligy_criteria';
721   l_object_version_number ben_eligy_criteria_dpnt.object_version_number%TYPE;
722   --
723 begin
724   --
725   hr_utility.set_location('Entering:'|| l_proc, 10);
726   --
727   -- Issue a savepoint if operating in validation only mode
728   --
729   savepoint delete_dpnt_eligy_criteria;
730   --
731 
732   --
733   -- Process Logic
734   --
735   l_object_version_number := p_object_version_number;
736   --
737   --
738   begin
739     --
740     -- Start of API User Hook for the before hook of delete_eligy_criteria
741     --
742     ben_elig_crit_dpnt_bk3.delete_dpnt_eligy_criteria_b
743       (
744        p_eligy_criteria_dpnt_id              =>  p_eligy_criteria_dpnt_id
745       ,p_object_version_number          =>  p_object_version_number
746       ,p_effective_date                 => trunc(p_effective_date)
747       );
748   exception
749     when hr_api.cannot_find_prog_unit then
750       hr_api.cannot_find_prog_unit_error
751         (p_module_name => 'DELETE_dpnt_eligy_criteria'
752         ,p_hook_type   => 'BP'
753         );
754     --
755     -- End of API User Hook for the before hook of delete_eligy_criteria
756     --
757   end;
758   --
759   ben_dpnt_egd_del.del
760     (
761      p_eligy_criteria_dpnt_id             => p_eligy_criteria_dpnt_id
762     ,p_object_version_number         => l_object_version_number
763     ,p_effective_date                => p_effective_date
764     );
765   --
766   begin
767     --
768     -- Start of API User Hook for the after hook of delete_eligy_criteria
769     --
770     ben_elig_crit_dpnt_bk3.delete_dpnt_eligy_criteria_a
771       (
772        p_eligy_criteria_dpnt_id              =>  p_eligy_criteria_dpnt_id
773       ,p_object_version_number          =>  l_object_version_number
774       ,p_effective_date                 => trunc(p_effective_date)
775       );
776   exception
777     when hr_api.cannot_find_prog_unit then
778       hr_api.cannot_find_prog_unit_error
779         (p_module_name => 'DELETE_dpnt_eligy_criteria'
780         ,p_hook_type   => 'AP'
781         );
782     --
783     -- End of API User Hook for the after hook of delete_eligy_criteria
784     --
785   end;
786   --
787 
788   --
789   -- When in validation only mode raise the Validate_Enabled exception
790   --
791   if p_validate then
792     raise hr_api.validate_enabled;
793   end if;
794   --
795 
796   --
797 exception
798   --
799   when hr_api.validate_enabled then
800     --
801     -- As the Validate_Enabled exception has been raised
802     -- we must rollback to the savepoint
803     --
804     ROLLBACK TO delete_dpnt_eligy_criteria;
805     --
806     -- Only set output warning arguments
807     -- (Any key or derived arguments must be set to null
808     -- when validation only mode is being used.)
809     --
810     --
811   when others then
812     --
813     -- A validation or unexpected error has occured
814     --
815     ROLLBACK TO delete_dpnt_eligy_criteria;
816     raise;
817     --
818 end delete_dpnt_eligy_criteria;
819 --
820 -- ----------------------------------------------------------------------------
821 -- |-------------------------------< lck >------------------------------------|
822 -- ----------------------------------------------------------------------------
823 --
824 procedure lck
825   (
826    p_eligy_criteria_dpnt_id              in     number
827   ,p_object_version_number          in     number
828   ) is
829   --
830   --
831   -- Declare cursors and local variables
832   --
833   l_proc varchar2(72) := g_package||'lck';
834   --
835 begin
836   --
837   hr_utility.set_location('Entering:'|| l_proc, 10);
838   --
839   ben_dpnt_egd_shd.lck
840     (
841       p_eligy_criteria_dpnt_id          => p_eligy_criteria_dpnt_id
842      ,p_object_version_number      => p_object_version_number
843     );
844   --
845   hr_utility.set_location(' Leaving:'||l_proc, 20);
846   --
847 end lck;
848 --
849 end ben_elig_crit_dpnt_api;