DBA Data[Home] [Help]

PACKAGE BODY: APPS.BEN_PL_R_OIPL_PREM_BY_MO_API

Source


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