DBA Data[Home] [Help]

PACKAGE BODY: APPS.BEN_DESIGN_RQMT_API

Source


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