DBA Data[Home] [Help]

PACKAGE BODY: APPS.BEN_PBN_INS

Source


1 Package Body ben_pbn_ins as
2 /* $Header: bepbnrhi.pkb 120.1.12010000.3 2008/11/19 05:57:39 sagnanas ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                     Private Global Definitions                           |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package  varchar2(33)	:= '  ben_pbn_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_pbn_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_pl_bnf_f t
70     where  t.pl_bnf_id       = p_rec.pl_bnf_id
71     and    t.effective_start_date =
72              ben_pbn_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_pl_bnf_f.created_by%TYPE;
77   l_creation_date       ben_pl_bnf_f.creation_date%TYPE;
78   l_last_update_date   	ben_pl_bnf_f.last_update_date%TYPE;
79   l_last_updated_by     ben_pl_bnf_f.last_updated_by%TYPE;
80   l_last_update_login   ben_pl_bnf_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_pl_bnf_f',
90 	 p_base_key_column => 'pl_bnf_id',
91 	 p_base_key_value  => p_rec.pl_bnf_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       fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
116       fnd_message.set_token('PROCEDURE', l_proc);
117       fnd_message.set_token('STEP','10');
118       fnd_message.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_pbn_shd.g_api_dml := true;  -- Set the api dml status
130   --
131   -- Insert the row into: ben_pl_bnf_f
132   --
133   insert into ben_pl_bnf_f
134   (	pl_bnf_id,
135 	effective_start_date,
136 	effective_end_date,
137 	business_group_id,
138 	prtt_enrt_rslt_id,
139 	bnf_person_id,
140 	organization_id,
141 	ttee_person_id,
142 	prmry_cntngnt_cd,
143 	pct_dsgd_num,
144 	amt_dsgd_val,
145 	amt_dsgd_uom,
146         dsgn_strt_dt,
147         dsgn_thru_dt,
148 	addl_instrn_txt,
149 	pbn_attribute_category,
150 	pbn_attribute1,
151 	pbn_attribute2,
152 	pbn_attribute3,
153 	pbn_attribute4,
154 	pbn_attribute5,
155 	pbn_attribute6,
156 	pbn_attribute7,
157 	pbn_attribute8,
158 	pbn_attribute9,
159 	pbn_attribute10,
160 	pbn_attribute11,
161 	pbn_attribute12,
162 	pbn_attribute13,
163 	pbn_attribute14,
164 	pbn_attribute15,
165 	pbn_attribute16,
166 	pbn_attribute17,
167 	pbn_attribute18,
168 	pbn_attribute19,
169 	pbn_attribute20,
170 	pbn_attribute21,
171 	pbn_attribute22,
172 	pbn_attribute23,
173 	pbn_attribute24,
174 	pbn_attribute25,
175 	pbn_attribute26,
176 	pbn_attribute27,
177 	pbn_attribute28,
178 	pbn_attribute29,
179 	pbn_attribute30,
180       request_id,
181       program_application_id,
182       program_id,
183       program_update_date,
184  	object_version_number,
185       per_in_ler_id,
186       created_by,
187    	creation_date,
188    	last_update_date,
189    	last_updated_by,
190    	last_update_login
191   )
192   Values
193   (	p_rec.pl_bnf_id,
194 	p_rec.effective_start_date,
195 	p_rec.effective_end_date,
196 	p_rec.business_group_id,
197 	p_rec.prtt_enrt_rslt_id,
198 	p_rec.bnf_person_id,
199 	p_rec.organization_id,
200 	p_rec.ttee_person_id,
201 	p_rec.prmry_cntngnt_cd,
202 	p_rec.pct_dsgd_num,
203 	p_rec.amt_dsgd_val,
204 	p_rec.amt_dsgd_uom,
205         p_rec.dsgn_strt_dt,
206         p_rec.dsgn_thru_dt,
207 	p_rec.addl_instrn_txt,
208 	p_rec.pbn_attribute_category,
209 	p_rec.pbn_attribute1,
210 	p_rec.pbn_attribute2,
211 	p_rec.pbn_attribute3,
212 	p_rec.pbn_attribute4,
213 	p_rec.pbn_attribute5,
214 	p_rec.pbn_attribute6,
215 	p_rec.pbn_attribute7,
216 	p_rec.pbn_attribute8,
217 	p_rec.pbn_attribute9,
218 	p_rec.pbn_attribute10,
219 	p_rec.pbn_attribute11,
220 	p_rec.pbn_attribute12,
221 	p_rec.pbn_attribute13,
222 	p_rec.pbn_attribute14,
223 	p_rec.pbn_attribute15,
224 	p_rec.pbn_attribute16,
225 	p_rec.pbn_attribute17,
226 	p_rec.pbn_attribute18,
227 	p_rec.pbn_attribute19,
228 	p_rec.pbn_attribute20,
229 	p_rec.pbn_attribute21,
230 	p_rec.pbn_attribute22,
231 	p_rec.pbn_attribute23,
232 	p_rec.pbn_attribute24,
233 	p_rec.pbn_attribute25,
234 	p_rec.pbn_attribute26,
235 	p_rec.pbn_attribute27,
236 	p_rec.pbn_attribute28,
237 	p_rec.pbn_attribute29,
238 	p_rec.pbn_attribute30,
239       p_rec.request_id,
240       p_rec.program_application_id,
241       p_rec.program_id,
242       p_rec.program_update_date,
243 	p_rec.object_version_number,
244         p_rec.per_in_ler_id,
245 	l_created_by,
246    	l_creation_date,
247    	l_last_update_date,
248    	l_last_updated_by,
249    	l_last_update_login
250   );
251   --
252   ben_pbn_shd.g_api_dml := false;   -- Unset the api dml status
253   hr_utility.set_location(' Leaving:'||l_proc, 15);
254 --
255 Exception
256   When hr_api.check_integrity_violated Then
257     -- A check constraint has been violated
258     ben_pbn_shd.g_api_dml := false;   -- Unset the api dml status
259     ben_pbn_shd.constraint_error
260       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
261   When hr_api.unique_integrity_violated Then
262     -- Unique integrity has been violated
263     ben_pbn_shd.g_api_dml := false;   -- Unset the api dml status
264     ben_pbn_shd.constraint_error
265       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
266   When Others Then
267     ben_pbn_shd.g_api_dml := false;   -- Unset the api dml status
268     Raise;
269 End dt_insert_dml;
270 --
271 -- ----------------------------------------------------------------------------
272 -- |------------------------------< insert_dml >------------------------------|
273 -- ----------------------------------------------------------------------------
274 Procedure insert_dml
275 	(p_rec 			 in out nocopy ben_pbn_shd.g_rec_type,
276 	 p_effective_date	 in	date,
277 	 p_datetrack_mode	 in	varchar2,
278 	 p_validation_start_date in	date,
279 	 p_validation_end_date	 in	date) is
280 --
281   l_proc	varchar2(72) := g_package||'insert_dml';
282 --
283 Begin
284   hr_utility.set_location('Entering:'||l_proc, 5);
285   --
286   dt_insert_dml(p_rec			=> p_rec,
287 		p_effective_date	=> p_effective_date,
288 		p_datetrack_mode	=> p_datetrack_mode,
289        		p_validation_start_date	=> p_validation_start_date,
290 		p_validation_end_date	=> p_validation_end_date);
291   --
292   hr_utility.set_location(' Leaving:'||l_proc, 10);
293 End insert_dml;
294 --
295 -- ----------------------------------------------------------------------------
296 -- |------------------------------< pre_insert >------------------------------|
297 -- ----------------------------------------------------------------------------
298 -- {Start Of Comments}
299 --
300 -- Description:
301 --   This private procedure contains any processing which is required before
302 --   the insert dml. Presently, if the entity has a corresponding primary
303 --   key which is maintained by an associating sequence, the primary key for
304 --   the entity will be populated with the next sequence value in
305 --   preparation for the insert dml.
306 --   Also, if comments are defined for this entity, the comments insert
307 --   logic will also be called, generating a comment_id if required.
308 --
309 -- Prerequisites:
310 --   This is an internal procedure which is called from the ins procedure.
311 --
312 -- In Parameters:
313 --   A Pl/Sql record structre.
314 --
315 -- Post Success:
316 --   Processing continues.
317 --
318 -- Post Failure:
319 --   If an error has occurred, an error message and exception will be raised
320 --   but not handled.
321 --
322 -- Developer Implementation Notes:
323 --   Any pre-processing required before the insert dml is issued should be
324 --   coded within this procedure. As stated above, a good example is the
325 --   generation of a primary key number via a corresponding sequence.
326 --   It is important to note that any 3rd party maintenance should be reviewed
327 --   before placing in this procedure.
328 --
329 -- Access Status:
330 --   Internal Row Handler Use Only.
331 --
332 -- {End Of Comments}
333 -- ----------------------------------------------------------------------------
334 Procedure pre_insert
335 	(p_rec  			in out nocopy ben_pbn_shd.g_rec_type,
336 	 p_effective_date		in date,
337 	 p_datetrack_mode		in varchar2,
338 	 p_validation_start_date	in date,
339 	 p_validation_end_date		in date) is
340 --
341   l_proc	varchar2(72) := g_package||'pre_insert';
342 --
343 cursor c1 is
344     select ben_pl_bnf_f_s.nextval from sys.dual;
345 --
346 --
347 Begin
348   hr_utility.set_location('Entering:'||l_proc, 5);
349   --
350   open c1;
351   fetch c1 into p_rec.pl_bnf_id;
352   close c1;
353   --
354   hr_utility.set_location(' Leaving:'||l_proc, 10);
355   --
356 End pre_insert;
357 --
358 -- ----------------------------------------------------------------------------
359 -- |-----------------------------< post_insert >------------------------------|
360 -- ----------------------------------------------------------------------------
361 -- {Start Of Comments}
362 --
363 -- Description:
364 --   This private procedure contains any processing which is required after the
365 --   insert dml.
366 --
367 -- Prerequisites:
368 --   This is an internal procedure which is called from the ins procedure.
369 --
370 -- In Parameters:
371 --   A Pl/Sql record structre.
372 --
373 -- Post Success:
374 --   Processing continues.
375 --
376 -- Post Failure:
377 --   If an error has occurred, an error message and exception will be raised
378 --   but not handled.
379 --
380 -- Developer Implementation Notes:
381 --   Any post-processing required after the insert dml is issued should be
385 -- Access Status:
382 --   coded within this procedure. It is important to note that any 3rd party
383 --   maintenance should be reviewed before placing in this procedure.
384 --
386 --   Internal Row Handler Use Only.
387 --
388 -- {End Of Comments}
389 -- ----------------------------------------------------------------------------
390 Procedure post_insert
391 	(p_rec 			 in ben_pbn_shd.g_rec_type,
392 	 p_effective_date	 in date,
393 	 p_datetrack_mode	 in varchar2,
394 	 p_validation_start_date in date,
395 	 p_validation_end_date	 in date) is
396 --
397   l_proc	varchar2(72) := g_package||'post_insert';
398 --
399 Begin
400   hr_utility.set_location('Entering:'||l_proc, 5);
401 --
402   --
403   -- Start of API User Hook for post_insert.
404   --
405   begin
406     --
407     ben_pbn_rki.after_insert
408       (
409   p_pl_bnf_id                     =>p_rec.pl_bnf_id
410  ,p_effective_start_date          =>p_rec.effective_start_date
411  ,p_effective_end_date            =>p_rec.effective_end_date
412  ,p_business_group_id             =>p_rec.business_group_id
413  ,p_prtt_enrt_rslt_id             =>p_rec.prtt_enrt_rslt_id
414  ,p_bnf_person_id                 =>p_rec.bnf_person_id
415  ,p_organization_id               =>p_rec.organization_id
416  ,p_ttee_person_id                =>p_rec.ttee_person_id
417  ,p_prmry_cntngnt_cd              =>p_rec.prmry_cntngnt_cd
418  ,p_pct_dsgd_num                  =>p_rec.pct_dsgd_num
419  ,p_amt_dsgd_val                  =>p_rec.amt_dsgd_val
420  ,p_amt_dsgd_uom                  =>p_rec.amt_dsgd_uom
421  ,p_dsgn_strt_dt                  =>p_rec.dsgn_strt_dt
422  ,p_dsgn_thru_dt                  =>p_rec.dsgn_thru_dt
423  ,p_addl_instrn_txt               =>p_rec.addl_instrn_txt
424  ,p_pbn_attribute_category        =>p_rec.pbn_attribute_category
425  ,p_pbn_attribute1                =>p_rec.pbn_attribute1
426  ,p_pbn_attribute2                =>p_rec.pbn_attribute2
427  ,p_pbn_attribute3                =>p_rec.pbn_attribute3
428  ,p_pbn_attribute4                =>p_rec.pbn_attribute4
429  ,p_pbn_attribute5                =>p_rec.pbn_attribute5
430  ,p_pbn_attribute6                =>p_rec.pbn_attribute6
431  ,p_pbn_attribute7                =>p_rec.pbn_attribute7
432  ,p_pbn_attribute8                =>p_rec.pbn_attribute8
433  ,p_pbn_attribute9                =>p_rec.pbn_attribute9
434  ,p_pbn_attribute10               =>p_rec.pbn_attribute10
435  ,p_pbn_attribute11               =>p_rec.pbn_attribute11
436  ,p_pbn_attribute12               =>p_rec.pbn_attribute12
437  ,p_pbn_attribute13               =>p_rec.pbn_attribute13
438  ,p_pbn_attribute14               =>p_rec.pbn_attribute14
439  ,p_pbn_attribute15               =>p_rec.pbn_attribute15
440  ,p_pbn_attribute16               =>p_rec.pbn_attribute16
441  ,p_pbn_attribute17               =>p_rec.pbn_attribute17
442  ,p_pbn_attribute18               =>p_rec.pbn_attribute18
443  ,p_pbn_attribute19               =>p_rec.pbn_attribute19
444  ,p_pbn_attribute20               =>p_rec.pbn_attribute20
445  ,p_pbn_attribute21               =>p_rec.pbn_attribute21
446  ,p_pbn_attribute22               =>p_rec.pbn_attribute22
447  ,p_pbn_attribute23               =>p_rec.pbn_attribute23
448  ,p_pbn_attribute24               =>p_rec.pbn_attribute24
449  ,p_pbn_attribute25               =>p_rec.pbn_attribute25
450  ,p_pbn_attribute26               =>p_rec.pbn_attribute26
451  ,p_pbn_attribute27               =>p_rec.pbn_attribute27
452  ,p_pbn_attribute28               =>p_rec.pbn_attribute28
453  ,p_pbn_attribute29               =>p_rec.pbn_attribute29
454  ,p_pbn_attribute30               =>p_rec.pbn_attribute30
455  ,p_request_id                    =>p_rec.request_id
456  ,p_program_application_id        =>p_rec.program_application_id
457  ,p_program_id                    =>p_rec.program_id
458  ,p_program_update_date           =>p_rec.program_update_date
459  ,p_object_version_number         =>p_rec.object_version_number
460  ,p_per_in_ler_id                 =>p_rec.per_in_ler_id
461  ,p_effective_date                =>p_effective_date
462  ,p_validation_start_date         =>p_validation_start_date
463  ,p_validation_end_date           =>p_validation_end_date
464       );
465     --
466   exception
467     --
468     when hr_api.cannot_find_prog_unit then
469       --
470       hr_api.cannot_find_prog_unit_error
471         (p_module_name => 'ben_pl_bnf_f'
472         ,p_hook_type   => 'AI');
473       --
474   end;
475   --
476   -- End of API User Hook for post_insert.
477   --
478   --
479   hr_utility.set_location(' Leaving:'||l_proc, 10);
480 End post_insert;
481 --
482 -- ----------------------------------------------------------------------------
483 -- |-------------------------------< ins_lck >--------------------------------|
484 -- ----------------------------------------------------------------------------
485 -- {Start Of Comments}
486 --
487 -- Description:
488 --   The ins_lck process has one main function to perform. When inserting
489 --   a datetracked row, we must validate the DT mode.
490 --   be manipulated.
491 --
492 -- Prerequisites:
493 --   This procedure can only be called for the datetrack mode of INSERT.
494 --
495 -- In Parameters:
496 --
497 -- Post Success:
498 --   On successful completion of the ins_lck process the parental
499 --   datetracked rows will be locked providing the p_enforce_foreign_locking
503 --
500 --   argument value is TRUE.
501 --   If the p_enforce_foreign_locking argument value is FALSE then the
502 --   parential rows are not locked.
504 -- Post Failure:
505 --   The Lck process can fail for:
506 --   1) When attempting to lock the row the row could already be locked by
507 --      another user. This will raise the HR_Api.Object_Locked exception.
508 --   2) When attempting to the lock the parent which doesn't exist.
509 --      For the entity to be locked the parent must exist!
510 --
511 -- Developer Implementation Notes:
512 --   None.
513 --
514 -- Access Status:
515 --   Internal Row Handler Use Only.
516 --
517 -- {End Of Comments}
518 -- ----------------------------------------------------------------------------
519 Procedure ins_lck
520 	(p_effective_date	 in  date,
521 	 p_datetrack_mode	 in  varchar2,
522 	 p_rec	 		 in  ben_pbn_shd.g_rec_type,
523 	 p_validation_start_date out nocopy date,
524 	 p_validation_end_date	 out nocopy date) is
525 --
526   l_proc		  varchar2(72) := g_package||'ins_lck';
527   l_validation_start_date date;
528   l_validation_end_date	  date;
529 --
530 Begin
531   hr_utility.set_location('Entering:'||l_proc, 5);
532   --
533   -- Validate the datetrack mode mode getting the validation start
534   -- and end dates for the specified datetrack operation.
535   --
536   dt_api.validate_dt_mode
537 	(p_effective_date	   => p_effective_date,
538 	 p_datetrack_mode	   => p_datetrack_mode,
539 	 p_base_table_name	   => 'ben_pl_bnf_f',
540 	 p_base_key_column	   => 'pl_bnf_id',
541 	 p_base_key_value 	   => p_rec.pl_bnf_id,
542          p_parent_table_name1      => 'ben_prtt_enrt_rslt_f',
543          p_parent_key_column1      => 'prtt_enrt_rslt_id',
544          p_parent_key_value1       => p_rec.prtt_enrt_rslt_id,
545          p_enforce_foreign_locking => false,
546 	 p_validation_start_date   => l_validation_start_date,
547  	 p_validation_end_date	   => l_validation_end_date);
548   --
549   -- Set the validation start and end date OUT arguments
550   --
551   p_validation_start_date := l_validation_start_date;
552   p_validation_end_date   := l_validation_end_date;
553   --
554   hr_utility.set_location(' Leaving:'||l_proc, 10);
555 --
556 End ins_lck;
557 --
558 -- ----------------------------------------------------------------------------
559 -- |---------------------------------< ins >----------------------------------|
560 -- ----------------------------------------------------------------------------
561 Procedure ins
562   (
563   p_rec		   in out nocopy ben_pbn_shd.g_rec_type,
564   p_effective_date in     date
565   ) is
566 --
567   l_proc			varchar2(72) := g_package||'ins';
568   l_datetrack_mode		varchar2(30) := 'INSERT';
569   l_validation_start_date	date;
570   l_validation_end_date		date;
571 --
572 Begin
573   hr_utility.set_location('Entering:'||l_proc, 5);
574   --
575   -- Call the lock operation
576   --
577   ins_lck
578 	(p_effective_date	 => p_effective_date,
579 	 p_datetrack_mode	 => l_datetrack_mode,
580 	 p_rec	 		 => p_rec,
581 	 p_validation_start_date => l_validation_start_date,
582 	 p_validation_end_date	 => l_validation_end_date);
583   --
584   -- Call the supporting insert validate operations
585   --
586    ben_pbn_bus.insert_validate
587 
588 	(p_rec			 => p_rec,
589 	 p_effective_date	 => p_effective_date,
590 	 p_datetrack_mode	 => l_datetrack_mode,
591 	 p_validation_start_date => l_validation_start_date,
592 	 p_validation_end_date	 => l_validation_end_date);
593   --
594   -- Call the supporting pre-insert operation
595   --
596   pre_insert
597  	(p_rec			 => p_rec,
598 	 p_effective_date	 => p_effective_date,
599 	 p_datetrack_mode	 => l_datetrack_mode,
600 	 p_validation_start_date => l_validation_start_date,
601 	 p_validation_end_date	 => l_validation_end_date);
602   --
603   -- Insert the row
604   --
605   insert_dml
606  	(p_rec			 => p_rec,
607 	 p_effective_date	 => p_effective_date,
608 	 p_datetrack_mode	 => l_datetrack_mode,
609 	 p_validation_start_date => l_validation_start_date,
610 	 p_validation_end_date	 => l_validation_end_date);
611   --
612   -- Call the supporting post-insert operation
613   --
614   post_insert
615  	(p_rec			 => p_rec,
616 	 p_effective_date	 => p_effective_date,
617 	 p_datetrack_mode	 => l_datetrack_mode,
618 	 p_validation_start_date => l_validation_start_date,
619 	 p_validation_end_date	 => l_validation_end_date);
620 end ins;
621 --
622 -- ----------------------------------------------------------------------------
623 -- |---------------------------------< ins >----------------------------------|
624 -- ----------------------------------------------------------------------------
625 Procedure ins
626   (
627   p_pl_bnf_id                    out nocopy number,
628   p_effective_start_date         out nocopy date,
629   p_effective_end_date           out nocopy date,
630   p_business_group_id            in number,
631   p_prtt_enrt_rslt_id            in number,
632   p_bnf_person_id                in number,
633   p_organization_id              in number           default null,
637   p_amt_dsgd_val                 in number           default null,
634   p_ttee_person_id               in number           default null,
635   p_prmry_cntngnt_cd             in varchar2,
636   p_pct_dsgd_num                 in number           default null,
638   p_amt_dsgd_uom                 in varchar2         default null,
639   p_dsgn_strt_dt                 in date             default null,
640   p_dsgn_thru_dt                 in date             default null,
641   p_addl_instrn_txt              in varchar2         default null,
642   p_pbn_attribute_category       in varchar2         default null,
643   p_pbn_attribute1               in varchar2         default null,
644   p_pbn_attribute2               in varchar2         default null,
645   p_pbn_attribute3               in varchar2         default null,
646   p_pbn_attribute4               in varchar2         default null,
647   p_pbn_attribute5               in varchar2         default null,
648   p_pbn_attribute6               in varchar2         default null,
649   p_pbn_attribute7               in varchar2         default null,
650   p_pbn_attribute8               in varchar2         default null,
651   p_pbn_attribute9               in varchar2         default null,
652   p_pbn_attribute10              in varchar2         default null,
653   p_pbn_attribute11              in varchar2         default null,
654   p_pbn_attribute12              in varchar2         default null,
655   p_pbn_attribute13              in varchar2         default null,
656   p_pbn_attribute14              in varchar2         default null,
657   p_pbn_attribute15              in varchar2         default null,
658   p_pbn_attribute16              in varchar2         default null,
659   p_pbn_attribute17              in varchar2         default null,
660   p_pbn_attribute18              in varchar2         default null,
661   p_pbn_attribute19              in varchar2         default null,
662   p_pbn_attribute20              in varchar2         default null,
663   p_pbn_attribute21              in varchar2         default null,
664   p_pbn_attribute22              in varchar2         default null,
665   p_pbn_attribute23              in varchar2         default null,
666   p_pbn_attribute24              in varchar2         default null,
667   p_pbn_attribute25              in varchar2         default null,
668   p_pbn_attribute26              in varchar2         default null,
669   p_pbn_attribute27              in varchar2         default null,
670   p_pbn_attribute28              in varchar2         default null,
671   p_pbn_attribute29              in varchar2         default null,
672   p_pbn_attribute30              in varchar2         default null,
673   p_request_id                   in number           default null,
674   p_program_application_id       in number           default null,
675   p_program_id                   in number           default null,
676   p_program_update_date          in date             default null,
677   p_object_version_number        out nocopy number,
678   p_per_in_ler_id                in number           default null,
679   p_effective_date		 in date
680   ) is
681 --
682   l_rec		ben_pbn_shd.g_rec_type;
683   l_proc	varchar2(72) := g_package||'ins';
684 --
685 Begin
686   hr_utility.set_location('Entering:'||l_proc, 5);
687   --
688   -- Call conversion function to turn arguments into the
689   -- p_rec structure.
690   --
691   l_rec :=
692   ben_pbn_shd.convert_args
693   (
694   null,
695   null,
696   null,
697   p_business_group_id,
698   p_prtt_enrt_rslt_id,
699   p_bnf_person_id,
700   p_organization_id,
701   p_ttee_person_id,
702   p_prmry_cntngnt_cd,
703   p_pct_dsgd_num,
704   p_amt_dsgd_val,
705   p_amt_dsgd_uom,
706   p_dsgn_strt_dt,
707   p_dsgn_thru_dt,
708   p_addl_instrn_txt,
709   p_pbn_attribute_category,
710   p_pbn_attribute1,
711   p_pbn_attribute2,
712   p_pbn_attribute3,
713   p_pbn_attribute4,
714   p_pbn_attribute5,
715   p_pbn_attribute6,
716   p_pbn_attribute7,
717   p_pbn_attribute8,
718   p_pbn_attribute9,
719   p_pbn_attribute10,
720   p_pbn_attribute11,
721   p_pbn_attribute12,
722   p_pbn_attribute13,
723   p_pbn_attribute14,
724   p_pbn_attribute15,
725   p_pbn_attribute16,
726   p_pbn_attribute17,
727   p_pbn_attribute18,
728   p_pbn_attribute19,
729   p_pbn_attribute20,
730   p_pbn_attribute21,
731   p_pbn_attribute22,
732   p_pbn_attribute23,
733   p_pbn_attribute24,
734   p_pbn_attribute25,
735   p_pbn_attribute26,
736   p_pbn_attribute27,
737   p_pbn_attribute28,
738   p_pbn_attribute29,
739   p_pbn_attribute30,
740   p_request_id,
741   p_program_application_id,
742   p_program_id,
743   p_program_update_date,
744   null,
745   p_per_in_ler_id
746   );
747   --
748   -- Having converted the arguments into the ben_pbn_rec
749   -- plsql record structure we call the corresponding record
750   -- business process.
751   --
752   ins(l_rec, p_effective_date);
753   --
754   -- Set the OUT arguments.
755   --
756   p_pl_bnf_id        	:= l_rec.pl_bnf_id;
757   p_effective_start_date  	:= l_rec.effective_start_date;
758   p_effective_end_date    	:= l_rec.effective_end_date;
759   p_object_version_number 	:= l_rec.object_version_number;
760   --
761   --
762   hr_utility.set_location(' Leaving:'||l_proc, 10);
763 End ins;
764 --
765 end ben_pbn_ins;