DBA Data[Home] [Help]

PACKAGE BODY: APPS.BEN_PEA_INS

Source


1 Package Body ben_pea_ins as
2 /* $Header: bepearhi.pkb 120.2 2005/08/09 06:07:35 nhunur noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                     Private Global Definitions                           |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package  varchar2(33)	:= '  ben_pea_ins.';  -- Global package name
9 --
10 -- ----------------------------------------------------------------------------
11 -- |----------------------------< dt_insert_dml >-----------------------------|
12 -- ----------------------------------------------------------------------------
13 -- {Start Of Comments}
14 --
15 -- Description:
16 --   This procedure controls the actual dml insert logic for datetrack. The
17 --   functions of this procedure are as follows:
18 --   1) Get the object_version_number.
19 --   2) To set the effective start and end dates to the corresponding
20 --      validation start and end dates. Also, the object version number
21 --      record attribute is set.
22 --   3) To set and unset the g_api_dml status as required (as we are about to
23 --      perform dml).
24 --   4) To insert the row into the schema with the derived effective start
25 --      and end dates and the object version number.
26 --   5) To trap any constraint violations that may have occurred.
27 --   6) To raise any other errors.
28 --
29 -- Prerequisites:
30 --   This is an internal private procedure which must be called from the
31 --   insert_dml and pre_update (logic permitting) procedure and must have
32 --   all mandatory arguments set.
33 --
34 -- In Parameters:
35 --   A Pl/Sql record structre.
36 --
37 -- Post Success:
38 --   The specified row will be inserted into the schema.
39 --
40 -- Post Failure:
41 --   On the insert dml failure it is important to note that we always reset the
42 --   g_api_dml status to false.
43 --   If a check or unique integrity constraint violation is raised the
44 --   constraint_error procedure will be called.
45 --   If any other error is reported, the error will be raised after the
46 --   g_api_dml status is reset.
47 --
48 -- Developer Implementation Notes:
49 --   This is an internal datetrack maintenance procedure which should
50 --   not be modified in anyway.
51 --
52 -- Access Status:
53 --   Internal Row Handler Use Only.
54 --
55 -- {End Of Comments}
56 -- ----------------------------------------------------------------------------
57 Procedure dt_insert_dml
58 	(p_rec 			 in out nocopy ben_pea_shd.g_rec_type,
59 	 p_effective_date	 in	date,
60 	 p_datetrack_mode	 in	varchar2,
61 	 p_validation_start_date in	date,
62 	 p_validation_end_date	 in	date) is
63 --
64 -- Cursor to select 'old' created AOL who column values
65 --
66   Cursor C_Sel1 Is
67     select t.created_by,
68            t.creation_date
69     from   ben_prtt_enrt_actn_f t
70     where  t.prtt_enrt_actn_id       = p_rec.prtt_enrt_actn_id
71     and    t.effective_start_date =
72              ben_pea_shd.g_old_rec.effective_start_date
73     and    t.effective_end_date   = (p_validation_start_date - 1);
74 --
75   l_proc		varchar2(72) := g_package||'dt_insert_dml';
76   l_created_by          ben_prtt_enrt_actn_f.created_by%TYPE;
77   l_creation_date       ben_prtt_enrt_actn_f.creation_date%TYPE;
78   l_last_update_date   	ben_prtt_enrt_actn_f.last_update_date%TYPE;
79   l_last_updated_by     ben_prtt_enrt_actn_f.last_updated_by%TYPE;
80   l_last_update_login   ben_prtt_enrt_actn_f.last_update_login%TYPE;
81 --
82 Begin
83   hr_utility.set_location('Entering:'||l_proc, 5);
84   --
85   -- Get the object version number for the insert
86   --
87   p_rec.object_version_number :=
88     dt_api.get_object_version_number
89 	(p_base_table_name => 'ben_prtt_enrt_actn_f',
90 	 p_base_key_column => 'prtt_enrt_actn_id',
91 	 p_base_key_value  => p_rec.prtt_enrt_actn_id);
92   --
93   -- Set the effective start and end dates to the corresponding
94   -- validation start and end dates
95   --
96   p_rec.effective_start_date := p_validation_start_date;
97   p_rec.effective_end_date   := p_validation_end_date;
98   --
99   -- If the datetrack_mode is not INSERT then we must populate the WHO
100   -- columns with the 'old' creation values and 'new' updated values.
101   --
102   If (p_datetrack_mode <> 'INSERT') then
103     hr_utility.set_location(l_proc, 10);
104     --
105     -- Select the 'old' created values
106     --
107     Open C_Sel1;
108     Fetch C_Sel1 Into l_created_by, l_creation_date;
109     If C_Sel1%notfound Then
110       --
111       -- The previous 'old' created row has not been found. We need
112       -- to error as an internal datetrack problem exists.
113       --
114       Close C_Sel1;
115       hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
116       hr_utility.set_message_token('PROCEDURE', l_proc);
117       hr_utility.set_message_token('STEP','10');
118       hr_utility.raise_error;
119     End If;
120     Close C_Sel1;
121     --
122     -- Set the AOL updated WHO values
123     --
124     l_last_update_date   := sysdate;
125     l_last_updated_by    := fnd_global.user_id;
126     l_last_update_login  := fnd_global.login_id;
127   End If;
128   --
129   ben_pea_shd.g_api_dml := true;  -- Set the api dml status
130   --
131   -- Insert the row into: ben_prtt_enrt_actn_f
132   --
133   insert into ben_prtt_enrt_actn_f
134   (	prtt_enrt_actn_id,
135 	effective_start_date,
136 	effective_end_date,
137 	cmpltd_dt,
138 	due_dt,
139 	rqd_flag,
140 	prtt_enrt_rslt_id,
141 	per_in_ler_id,
142 	actn_typ_id,
143 	elig_cvrd_dpnt_id,
144 	pl_bnf_id,
145 	business_group_id,
146 	pea_attribute_category,
147 	pea_attribute1,
148 	pea_attribute2,
149 	pea_attribute3,
150 	pea_attribute4,
151 	pea_attribute5,
152 	pea_attribute6,
153 	pea_attribute7,
154 	pea_attribute8,
155 	pea_attribute9,
156 	pea_attribute10,
157 	pea_attribute11,
158 	pea_attribute12,
159 	pea_attribute13,
160 	pea_attribute14,
161 	pea_attribute15,
162 	pea_attribute16,
163 	pea_attribute17,
164 	pea_attribute18,
165 	pea_attribute19,
166 	pea_attribute20,
167 	pea_attribute21,
168 	pea_attribute22,
169 	pea_attribute23,
170 	pea_attribute24,
171 	pea_attribute25,
172 	pea_attribute26,
173 	pea_attribute27,
174 	pea_attribute28,
175 	pea_attribute29,
176 	pea_attribute30,
177 	object_version_number
178    	, created_by,
179    	creation_date,
180    	last_update_date,
181    	last_updated_by,
182    	last_update_login
183   )
184   Values
185   (	p_rec.prtt_enrt_actn_id,
186 	p_rec.effective_start_date,
187 	p_rec.effective_end_date,
188 	p_rec.cmpltd_dt,
189 	p_rec.due_dt,
190 	p_rec.rqd_flag,
191 	p_rec.prtt_enrt_rslt_id,
192 	p_rec.per_in_ler_id,
193 	p_rec.actn_typ_id,
194 	p_rec.elig_cvrd_dpnt_id,
195 	p_rec.pl_bnf_id,
196 	p_rec.business_group_id,
197 	p_rec.pea_attribute_category,
198 	p_rec.pea_attribute1,
199 	p_rec.pea_attribute2,
200 	p_rec.pea_attribute3,
201 	p_rec.pea_attribute4,
202 	p_rec.pea_attribute5,
203 	p_rec.pea_attribute6,
204 	p_rec.pea_attribute7,
205 	p_rec.pea_attribute8,
206 	p_rec.pea_attribute9,
207 	p_rec.pea_attribute10,
208 	p_rec.pea_attribute11,
209 	p_rec.pea_attribute12,
210 	p_rec.pea_attribute13,
211 	p_rec.pea_attribute14,
212 	p_rec.pea_attribute15,
213 	p_rec.pea_attribute16,
214 	p_rec.pea_attribute17,
215 	p_rec.pea_attribute18,
216 	p_rec.pea_attribute19,
217 	p_rec.pea_attribute20,
218 	p_rec.pea_attribute21,
219 	p_rec.pea_attribute22,
220 	p_rec.pea_attribute23,
221 	p_rec.pea_attribute24,
222 	p_rec.pea_attribute25,
223 	p_rec.pea_attribute26,
224 	p_rec.pea_attribute27,
225 	p_rec.pea_attribute28,
226 	p_rec.pea_attribute29,
227 	p_rec.pea_attribute30,
228 	p_rec.object_version_number
229 	, l_created_by,
230    	l_creation_date,
231    	l_last_update_date,
232    	l_last_updated_by,
233    	l_last_update_login
234   );
235   --
236   ben_pea_shd.g_api_dml := false;   -- Unset the api dml status
237   hr_utility.set_location(' Leaving:'||l_proc, 15);
238 --
239 Exception
240   When hr_api.check_integrity_violated Then
241     -- A check constraint has been violated
242     ben_pea_shd.g_api_dml := false;   -- Unset the api dml status
243     ben_pea_shd.constraint_error
244       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
245   When hr_api.unique_integrity_violated Then
246     -- Unique integrity has been violated
247     ben_pea_shd.g_api_dml := false;   -- Unset the api dml status
248     ben_pea_shd.constraint_error
249       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
250   When Others Then
251     ben_pea_shd.g_api_dml := false;   -- Unset the api dml status
252     Raise;
253 End dt_insert_dml;
254 --
255 -- ----------------------------------------------------------------------------
256 -- |------------------------------< insert_dml >------------------------------|
257 -- ----------------------------------------------------------------------------
258 Procedure insert_dml
259 	(p_rec 			 in out nocopy ben_pea_shd.g_rec_type,
260 	 p_effective_date	 in	date,
261 	 p_datetrack_mode	 in	varchar2,
262 	 p_validation_start_date in	date,
263 	 p_validation_end_date	 in	date) is
264 --
265   l_proc	varchar2(72) := g_package||'insert_dml';
266 --
267 Begin
268   hr_utility.set_location('Entering:'||l_proc, 5);
269   --
270   dt_insert_dml(p_rec			=> p_rec,
271 		p_effective_date	=> p_effective_date,
272 		p_datetrack_mode	=> p_datetrack_mode,
273        		p_validation_start_date	=> p_validation_start_date,
274 		p_validation_end_date	=> p_validation_end_date);
275   --
276   hr_utility.set_location(' Leaving:'||l_proc, 10);
277 End insert_dml;
278 --
279 -- ----------------------------------------------------------------------------
280 -- |------------------------------< pre_insert >------------------------------|
281 -- ----------------------------------------------------------------------------
282 -- {Start Of Comments}
283 --
284 -- Description:
285 --   This private procedure contains any processing which is required before
286 --   the insert dml. Presently, if the entity has a corresponding primary
287 --   key which is maintained by an associating sequence, the primary key for
288 --   the entity will be populated with the next sequence value in
289 --   preparation for the insert dml.
290 --   Also, if comments are defined for this entity, the comments insert
291 --   logic will also be called, generating a comment_id if required.
292 --
293 -- Prerequisites:
294 --   This is an internal procedure which is called from the ins procedure.
295 --
296 -- In Parameters:
297 --   A Pl/Sql record structre.
298 --
299 -- Post Success:
300 --   Processing continues.
301 --
302 -- Post Failure:
303 --   If an error has occurred, an error message and exception will be raised
304 --   but not handled.
305 --
306 -- Developer Implementation Notes:
307 --   Any pre-processing required before the insert dml is issued should be
308 --   coded within this procedure. As stated above, a good example is the
309 --   generation of a primary key number via a corresponding sequence.
310 --   It is important to note that any 3rd party maintenance should be reviewed
311 --   before placing in this procedure.
312 --
313 -- Access Status:
314 --   Internal Row Handler Use Only.
315 --
316 -- {End Of Comments}
317 -- ----------------------------------------------------------------------------
318 Procedure pre_insert
319 	(p_rec  			in out nocopy ben_pea_shd.g_rec_type,
320 	 p_effective_date		in date,
321 	 p_datetrack_mode		in varchar2,
322 	 p_validation_start_date	in date,
323 	 p_validation_end_date		in date) is
324 --
325   l_proc	varchar2(72) := g_package||'pre_insert';
326   --
327   cursor c1 is
328      select ben_prtt_enrt_actn_f_s.nextval
329      from dual;
330 --
331 --
332 --
333 Begin
334   hr_utility.set_location('Entering:'||l_proc, 5);
335   --
336   --
337   open c1;
338   fetch c1 into p_rec.prtt_enrt_actn_id;
339   close c1;
340   --
341   --
342   hr_utility.set_location(' Leaving:'||l_proc, 10);
343 End pre_insert;
344 --
345 -- ----------------------------------------------------------------------------
346 -- |-----------------------------< post_insert >------------------------------|
347 -- ----------------------------------------------------------------------------
348 -- {Start Of Comments}
349 --
350 -- Description:
351 --   This private procedure contains any processing which is required after the
352 --   insert dml.
353 --
354 -- Prerequisites:
355 --   This is an internal procedure which is called from the ins procedure.
356 --
357 -- In Parameters:
358 --   A Pl/Sql record structre.
359 --
360 -- Post Success:
361 --   Processing continues.
362 --
363 -- Post Failure:
364 --   If an error has occurred, an error message and exception will be raised
365 --   but not handled.
366 --
367 -- Developer Implementation Notes:
368 --   Any post-processing required after the insert dml is issued should be
369 --   coded within this procedure. It is important to note that any 3rd party
370 --   maintenance should be reviewed before placing in this procedure.
371 --
372 -- Access Status:
373 --   Internal Row Handler Use Only.
374 --
375 -- {End Of Comments}
376 -- ----------------------------------------------------------------------------
377 Procedure post_insert
378 	(p_rec 			 in ben_pea_shd.g_rec_type,
379 	 p_effective_date	 in date,
380 	 p_datetrack_mode	 in varchar2,
381 	 p_validation_start_date in date,
382 	 p_validation_end_date	 in date) is
383 --
384   l_proc	varchar2(72) := g_package||'post_insert';
385 --
386 Begin
387   hr_utility.set_location('Entering:'||l_proc, 5);
388 --
389   --
390   -- Start of API User Hook for post_insert.
391   --
392   begin
393     --
394     ben_pea_rki.after_insert
395       (
396   p_prtt_enrt_actn_id             =>p_rec.prtt_enrt_actn_id
397  ,p_effective_start_date          =>p_rec.effective_start_date
398  ,p_effective_end_date            =>p_rec.effective_end_date
399  ,p_cmpltd_dt                     =>p_rec.cmpltd_dt
400  ,p_due_dt                        =>p_rec.due_dt
401  ,p_rqd_flag                      =>p_rec.rqd_flag
402  ,p_prtt_enrt_rslt_id             =>p_rec.prtt_enrt_rslt_id
403  ,p_per_in_ler_id             =>p_rec.per_in_ler_id
404  ,p_actn_typ_id                   =>p_rec.actn_typ_id
405  ,p_elig_cvrd_dpnt_id             =>p_rec.elig_cvrd_dpnt_id
406  ,p_pl_bnf_id                     =>p_rec.pl_bnf_id
407  ,p_business_group_id             =>p_rec.business_group_id
408  ,p_pea_attribute_category        =>p_rec.pea_attribute_category
409  ,p_pea_attribute1                =>p_rec.pea_attribute1
410  ,p_pea_attribute2                =>p_rec.pea_attribute2
411  ,p_pea_attribute3                =>p_rec.pea_attribute3
412  ,p_pea_attribute4                =>p_rec.pea_attribute4
413  ,p_pea_attribute5                =>p_rec.pea_attribute5
414  ,p_pea_attribute6                =>p_rec.pea_attribute6
415  ,p_pea_attribute7                =>p_rec.pea_attribute7
416  ,p_pea_attribute8                =>p_rec.pea_attribute8
417  ,p_pea_attribute9                =>p_rec.pea_attribute9
418  ,p_pea_attribute10               =>p_rec.pea_attribute10
419  ,p_pea_attribute11               =>p_rec.pea_attribute11
420  ,p_pea_attribute12               =>p_rec.pea_attribute12
421  ,p_pea_attribute13               =>p_rec.pea_attribute13
422  ,p_pea_attribute14               =>p_rec.pea_attribute14
423  ,p_pea_attribute15               =>p_rec.pea_attribute15
424  ,p_pea_attribute16               =>p_rec.pea_attribute16
425  ,p_pea_attribute17               =>p_rec.pea_attribute17
426  ,p_pea_attribute18               =>p_rec.pea_attribute18
427  ,p_pea_attribute19               =>p_rec.pea_attribute19
428  ,p_pea_attribute20               =>p_rec.pea_attribute20
429  ,p_pea_attribute21               =>p_rec.pea_attribute21
430  ,p_pea_attribute22               =>p_rec.pea_attribute22
431  ,p_pea_attribute23               =>p_rec.pea_attribute23
432  ,p_pea_attribute24               =>p_rec.pea_attribute24
433  ,p_pea_attribute25               =>p_rec.pea_attribute25
434  ,p_pea_attribute26               =>p_rec.pea_attribute26
435  ,p_pea_attribute27               =>p_rec.pea_attribute27
436  ,p_pea_attribute28               =>p_rec.pea_attribute28
437  ,p_pea_attribute29               =>p_rec.pea_attribute29
438  ,p_pea_attribute30               =>p_rec.pea_attribute30
439  ,p_object_version_number         =>p_rec.object_version_number
440  ,p_effective_date                =>p_effective_date
441  ,p_validation_start_date         =>p_validation_start_date
442  ,p_validation_end_date           =>p_validation_end_date
443       );
444     --
445   exception
446     --
447     when hr_api.cannot_find_prog_unit then
448       --
449       hr_api.cannot_find_prog_unit_error
450         (p_module_name => 'ben_prtt_enrt_actn_f'
451         ,p_hook_type   => 'AI');
452       --
453   end;
454   --
455   -- End of API User Hook for post_insert.
456   --
457   --
458   hr_utility.set_location(' Leaving:'||l_proc, 10);
459 End post_insert;
460 --
461 -- ----------------------------------------------------------------------------
462 -- |-------------------------------< ins_lck >--------------------------------|
463 -- ----------------------------------------------------------------------------
464 -- {Start Of Comments}
465 --
466 -- Description:
467 --   The ins_lck process has one main function to perform. When inserting
468 --   a datetracked row, we must validate the DT mode.
469 --   be manipulated.
470 --
471 -- Prerequisites:
472 --   This procedure can only be called for the datetrack mode of INSERT.
473 --
474 -- In Parameters:
475 --
476 -- Post Success:
477 --   On successful completion of the ins_lck process the parental
478 --   datetracked rows will be locked providing the p_enforce_foreign_locking
479 --   argument value is TRUE.
480 --   If the p_enforce_foreign_locking argument value is FALSE then the
481 --   parential rows are not locked.
482 --
483 -- Post Failure:
484 --   The Lck process can fail for:
485 --   1) When attempting to lock the row the row could already be locked by
486 --      another user. This will raise the HR_Api.Object_Locked exception.
487 --   2) When attempting to the lock the parent which doesn't exist.
488 --      For the entity to be locked the parent must exist!
489 --
490 -- Developer Implementation Notes:
491 --   None.
492 --
493 -- Access Status:
494 --   Internal Row Handler Use Only.
495 --
496 -- {End Of Comments}
497 -- ----------------------------------------------------------------------------
498 Procedure ins_lck
499 	(p_effective_date	 in  date,
500 	 p_datetrack_mode	 in  varchar2,
501 	 p_rec	 		 in  ben_pea_shd.g_rec_type,
502 	 p_validation_start_date out nocopy date,
503 	 p_validation_end_date	 out nocopy date) is
504 --
505   l_proc		  varchar2(72) := g_package||'ins_lck';
506   l_validation_start_date date;
507   l_validation_end_date	  date;
508 --
509 Begin
510   hr_utility.set_location('Entering:'||l_proc, 5);
511   --
512   -- Validate the datetrack mode mode getting the validation start
513   -- and end dates for the specified datetrack operation.
514   --
515   dt_api.validate_dt_mode
516 	(p_effective_date	   => p_effective_date,
517 	 p_datetrack_mode	   => p_datetrack_mode,
518 	 p_base_table_name	   => 'ben_prtt_enrt_actn_f',
519 	 p_base_key_column	   => 'prtt_enrt_actn_id',
520 	 p_base_key_value 	   => p_rec.prtt_enrt_actn_id,
521 	 p_parent_table_name1      => 'ben_prtt_enrt_rslt_f',
522 	 p_parent_key_column1      => 'prtt_enrt_rslt_id',
523 	 p_parent_key_value1       => p_rec.prtt_enrt_rslt_id,
524          p_enforce_foreign_locking => false,
525 	 p_validation_start_date   => l_validation_start_date,
526  	 p_validation_end_date	   => l_validation_end_date);
527   --
528   -- Set the validation start and end date OUT arguments
529   --
530   p_validation_start_date := l_validation_start_date;
531   p_validation_end_date   := l_validation_end_date;
532   --
533   hr_utility.set_location(' Leaving:'||l_proc, 10);
534 --
535 End ins_lck;
536 --
537 -- ----------------------------------------------------------------------------
538 -- |---------------------------------< ins >----------------------------------|
539 -- ----------------------------------------------------------------------------
540 Procedure ins
541   (
542   p_rec		   in out nocopy ben_pea_shd.g_rec_type,
543   p_effective_date in     date
544   ) is
545 --
546   l_proc			varchar2(72) := g_package||'ins';
547   l_datetrack_mode		varchar2(30) := 'INSERT';
548   l_validation_start_date	date;
549   l_validation_end_date		date;
550 --
551 Begin
552   hr_utility.set_location('Entering:'||l_proc, 5);
553   --
554   -- Call the lock operation
555   --
556   ins_lck
557 	(p_effective_date	 => p_effective_date,
558 	 p_datetrack_mode	 => l_datetrack_mode,
559 	 p_rec	 		 => p_rec,
560 	 p_validation_start_date => l_validation_start_date,
561 	 p_validation_end_date	 => l_validation_end_date);
562   --
563   -- Call the supporting insert validate operations
564   --
565   ben_pea_bus.insert_validate
566 	(p_rec			 => p_rec,
567 	 p_effective_date	 => p_effective_date,
568 	 p_datetrack_mode	 => l_datetrack_mode,
569 	 p_validation_start_date => l_validation_start_date,
570 	 p_validation_end_date	 => l_validation_end_date);
571   --
572   -- Call the supporting pre-insert operation
573   --
574   pre_insert
575  	(p_rec			 => p_rec,
576 	 p_effective_date	 => p_effective_date,
577 	 p_datetrack_mode	 => l_datetrack_mode,
578 	 p_validation_start_date => l_validation_start_date,
579 	 p_validation_end_date	 => l_validation_end_date);
580   --
581   -- Insert the row
582   --
583   insert_dml
584  	(p_rec			 => p_rec,
585 	 p_effective_date	 => p_effective_date,
586 	 p_datetrack_mode	 => l_datetrack_mode,
587 	 p_validation_start_date => l_validation_start_date,
588 	 p_validation_end_date	 => l_validation_end_date);
589   --
590   -- Call the supporting post-insert operation
591   --
592   post_insert
593  	(p_rec			 => p_rec,
594 	 p_effective_date	 => p_effective_date,
595 	 p_datetrack_mode	 => l_datetrack_mode,
596 	 p_validation_start_date => l_validation_start_date,
597 	 p_validation_end_date	 => l_validation_end_date);
598   --
599   -- Added for DBI to capture insert event
600   --
601   if HRI_BPL_BEN_UTIL.enable_ben_col_evt_que then
602      HRI_OPL_BEN_ENRLACTN_EQ.insert_event (p_rec 	=> p_rec ,
603                            		   p_effective_date => p_effective_date,
604                             		   p_datetrack_mode => l_datetrack_mode );
605 
606   end if;
607   --
608 end ins;
609 --
610 -- ----------------------------------------------------------------------------
611 -- |---------------------------------< ins >----------------------------------|
612 -- ----------------------------------------------------------------------------
613 Procedure ins
614   (
615   p_prtt_enrt_actn_id            out nocopy number,
616   p_effective_start_date         out nocopy date,
617   p_effective_end_date           out nocopy date,
618   p_cmpltd_dt                    in date             default null,
619   p_due_dt                       in date             default null,
620   p_rqd_flag                     in varchar2         default 'Y',
621   p_prtt_enrt_rslt_id            in number,
622   p_per_in_ler_id            in number,
623   p_actn_typ_id                  in number,
624   p_elig_cvrd_dpnt_id            in number           default null,
625   p_pl_bnf_id                    in number           default null,
626   p_business_group_id            in number           default null,
627   p_pea_attribute_category       in varchar2         default null,
628   p_pea_attribute1               in varchar2         default null,
629   p_pea_attribute2               in varchar2         default null,
630   p_pea_attribute3               in varchar2         default null,
631   p_pea_attribute4               in varchar2         default null,
632   p_pea_attribute5               in varchar2         default null,
633   p_pea_attribute6               in varchar2         default null,
634   p_pea_attribute7               in varchar2         default null,
635   p_pea_attribute8               in varchar2         default null,
636   p_pea_attribute9               in varchar2         default null,
637   p_pea_attribute10              in varchar2         default null,
638   p_pea_attribute11              in varchar2         default null,
639   p_pea_attribute12              in varchar2         default null,
640   p_pea_attribute13              in varchar2         default null,
641   p_pea_attribute14              in varchar2         default null,
642   p_pea_attribute15              in varchar2         default null,
643   p_pea_attribute16              in varchar2         default null,
644   p_pea_attribute17              in varchar2         default null,
645   p_pea_attribute18              in varchar2         default null,
646   p_pea_attribute19              in varchar2         default null,
647   p_pea_attribute20              in varchar2         default null,
648   p_pea_attribute21              in varchar2         default null,
649   p_pea_attribute22              in varchar2         default null,
650   p_pea_attribute23              in varchar2         default null,
651   p_pea_attribute24              in varchar2         default null,
652   p_pea_attribute25              in varchar2         default null,
653   p_pea_attribute26              in varchar2         default null,
654   p_pea_attribute27              in varchar2         default null,
655   p_pea_attribute28              in varchar2         default null,
656   p_pea_attribute29              in varchar2         default null,
657   p_pea_attribute30              in varchar2         default null,
658   p_object_version_number        out nocopy number,
659   p_effective_date		 in date
660   ) is
661 --
662   l_rec		ben_pea_shd.g_rec_type;
663   l_proc	varchar2(72) := g_package||'ins';
664 --
665 Begin
666   hr_utility.set_location('Entering:'||l_proc, 5);
667   --
668   -- Call conversion function to turn arguments into the
669   -- p_rec structure.
670   --
671   l_rec :=
672   ben_pea_shd.convert_args
673   (
674   null,
675   null,
676   null,
677   p_cmpltd_dt,
678   p_due_dt,
679   p_rqd_flag,
680   p_prtt_enrt_rslt_id,
681   p_per_in_ler_id,
682   p_actn_typ_id,
683   p_elig_cvrd_dpnt_id,
684   p_pl_bnf_id,
685   p_business_group_id,
686   p_pea_attribute_category,
687   p_pea_attribute1,
688   p_pea_attribute2,
689   p_pea_attribute3,
690   p_pea_attribute4,
691   p_pea_attribute5,
692   p_pea_attribute6,
693   p_pea_attribute7,
694   p_pea_attribute8,
695   p_pea_attribute9,
696   p_pea_attribute10,
697   p_pea_attribute11,
698   p_pea_attribute12,
699   p_pea_attribute13,
700   p_pea_attribute14,
701   p_pea_attribute15,
702   p_pea_attribute16,
703   p_pea_attribute17,
704   p_pea_attribute18,
705   p_pea_attribute19,
706   p_pea_attribute20,
707   p_pea_attribute21,
708   p_pea_attribute22,
709   p_pea_attribute23,
710   p_pea_attribute24,
711   p_pea_attribute25,
712   p_pea_attribute26,
713   p_pea_attribute27,
714   p_pea_attribute28,
715   p_pea_attribute29,
716   p_pea_attribute30,
717   null
718   );
719   --
720   -- Having converted the arguments into the ben_pea_rec
721   -- plsql record structure we call the corresponding record
722   -- business process.
723   --
724   ins(l_rec, p_effective_date);
725   --
726   -- Set the OUT arguments.
727   --
728   p_prtt_enrt_actn_id        	:= l_rec.prtt_enrt_actn_id;
729   p_effective_start_date  	:= l_rec.effective_start_date;
730   p_effective_end_date    	:= l_rec.effective_end_date;
731   p_object_version_number 	:= l_rec.object_version_number;
732   --
733   --
734   hr_utility.set_location(' Leaving:'||l_proc, 10);
735 End ins;
736 --
737 end ben_pea_ins;