DBA Data[Home] [Help]

PACKAGE BODY: APPS.BEN_EXT_DEFN_API

Source


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