DBA Data[Home] [Help]

PACKAGE BODY: APPS.BEN_LPR_INS

Source


1 Package Body ben_lpr_ins as
2 /* $Header: belprrhi.pkb 115.11 2004/01/18 23:15:35 abparekh ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                     Private Global Definitions                           |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package  varchar2(33)	:= '  ben_lpr_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_lpr_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_ler_chg_plip_enrt_f t
70     where  t.ler_chg_plip_enrt_id       = p_rec.ler_chg_plip_enrt_id
71     and    t.effective_start_date =
72              ben_lpr_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_ler_chg_plip_enrt_f.created_by%TYPE;
77   l_creation_date       ben_ler_chg_plip_enrt_f.creation_date%TYPE;
78   l_last_update_date   	ben_ler_chg_plip_enrt_f.last_update_date%TYPE;
79   l_last_updated_by     ben_ler_chg_plip_enrt_f.last_updated_by%TYPE;
80   l_last_update_login   ben_ler_chg_plip_enrt_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_ler_chg_plip_enrt_f',
90 	 p_base_key_column => 'ler_chg_plip_enrt_id',
91 	 p_base_key_value  => p_rec.ler_chg_plip_enrt_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_lpr_shd.g_api_dml := true;  -- Set the api dml status
130   --
131   -- Insert the row into: ben_ler_chg_plip_enrt_f
132   --
133   insert into ben_ler_chg_plip_enrt_f
134   (	ler_chg_plip_enrt_id,
135 	effective_start_date,
136 	effective_end_date,
137 	business_group_id,
138 	auto_enrt_mthd_rl,
139 	plip_id,
140 	ler_id,
141 	tco_chg_enrt_cd,
142 	crnt_enrt_prclds_chg_flag,
143 	dflt_flag,
144 	dflt_enrt_rl,
145 	enrt_rl,
146 	dflt_enrt_cd,
147 	enrt_mthd_cd,
148 	stl_elig_cant_chg_flag,
149 	enrt_cd,
150 	lpr_attribute_category,
151 	lpr_attribute1,
152 	lpr_attribute2,
153 	lpr_attribute3,
154 	lpr_attribute4,
155 	lpr_attribute5,
156 	lpr_attribute6,
157 	lpr_attribute7,
158 	lpr_attribute8,
159 	lpr_attribute9,
160 	lpr_attribute10,
161 	lpr_attribute11,
162 	lpr_attribute12,
163 	lpr_attribute13,
164 	lpr_attribute14,
165 	lpr_attribute15,
166 	lpr_attribute16,
167 	lpr_attribute17,
168 	lpr_attribute18,
169 	lpr_attribute19,
170 	lpr_attribute20,
171 	lpr_attribute21,
172 	lpr_attribute22,
173 	lpr_attribute23,
174 	lpr_attribute24,
175 	lpr_attribute25,
176 	lpr_attribute26,
177 	lpr_attribute27,
178 	lpr_attribute28,
179 	lpr_attribute29,
180 	lpr_attribute30,
181 	object_version_number
182    	, created_by,
183    	creation_date,
184    	last_update_date,
185    	last_updated_by,
186    	last_update_login
187   )
188   Values
189   (	p_rec.ler_chg_plip_enrt_id,
190 	p_rec.effective_start_date,
191 	p_rec.effective_end_date,
192 	p_rec.business_group_id,
193 	p_rec.auto_enrt_mthd_rl,
194 	p_rec.plip_id,
195 	p_rec.ler_id,
196 	p_rec.tco_chg_enrt_cd,
197 	p_rec.crnt_enrt_prclds_chg_flag,
198 	p_rec.dflt_flag,
199 	p_rec.dflt_enrt_rl,
200 	p_rec.enrt_rl,
201 	p_rec.dflt_enrt_cd,
202 	p_rec.enrt_mthd_cd,
203 	p_rec.stl_elig_cant_chg_flag,
204 	p_rec.enrt_cd,
205 	p_rec.lpr_attribute_category,
206 	p_rec.lpr_attribute1,
207 	p_rec.lpr_attribute2,
208 	p_rec.lpr_attribute3,
209 	p_rec.lpr_attribute4,
210 	p_rec.lpr_attribute5,
211 	p_rec.lpr_attribute6,
212 	p_rec.lpr_attribute7,
213 	p_rec.lpr_attribute8,
214 	p_rec.lpr_attribute9,
215 	p_rec.lpr_attribute10,
216 	p_rec.lpr_attribute11,
217 	p_rec.lpr_attribute12,
218 	p_rec.lpr_attribute13,
219 	p_rec.lpr_attribute14,
220 	p_rec.lpr_attribute15,
221 	p_rec.lpr_attribute16,
222 	p_rec.lpr_attribute17,
223 	p_rec.lpr_attribute18,
224 	p_rec.lpr_attribute19,
225 	p_rec.lpr_attribute20,
226 	p_rec.lpr_attribute21,
227 	p_rec.lpr_attribute22,
228 	p_rec.lpr_attribute23,
229 	p_rec.lpr_attribute24,
230 	p_rec.lpr_attribute25,
231 	p_rec.lpr_attribute26,
232 	p_rec.lpr_attribute27,
233 	p_rec.lpr_attribute28,
234 	p_rec.lpr_attribute29,
235 	p_rec.lpr_attribute30,
236 	p_rec.object_version_number
237 	, l_created_by,
238    	l_creation_date,
239    	l_last_update_date,
240    	l_last_updated_by,
241    	l_last_update_login
242   );
243   --
244   ben_lpr_shd.g_api_dml := false;   -- Unset the api dml status
245   hr_utility.set_location(' Leaving:'||l_proc, 15);
246 --
247 Exception
248   When hr_api.check_integrity_violated Then
249     -- A check constraint has been violated
250     ben_lpr_shd.g_api_dml := false;   -- Unset the api dml status
251     ben_lpr_shd.constraint_error
252       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
253   When hr_api.unique_integrity_violated Then
254     -- Unique integrity has been violated
255     ben_lpr_shd.g_api_dml := false;   -- Unset the api dml status
256     ben_lpr_shd.constraint_error
257       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
258   When Others Then
259     ben_lpr_shd.g_api_dml := false;   -- Unset the api dml status
260     Raise;
261 End dt_insert_dml;
262 --
263 -- ----------------------------------------------------------------------------
264 -- |------------------------------< insert_dml >------------------------------|
265 -- ----------------------------------------------------------------------------
266 Procedure insert_dml
267 	(p_rec 			 in out nocopy ben_lpr_shd.g_rec_type,
268 	 p_effective_date	 in	date,
269 	 p_datetrack_mode	 in	varchar2,
270 	 p_validation_start_date in	date,
271 	 p_validation_end_date	 in	date) is
272 --
273   l_proc	varchar2(72) := g_package||'insert_dml';
274 --
275 Begin
276   hr_utility.set_location('Entering:'||l_proc, 5);
277   --
278   dt_insert_dml(p_rec			=> p_rec,
279 		p_effective_date	=> p_effective_date,
280 		p_datetrack_mode	=> p_datetrack_mode,
281        		p_validation_start_date	=> p_validation_start_date,
282 		p_validation_end_date	=> p_validation_end_date);
283   --
284   hr_utility.set_location(' Leaving:'||l_proc, 10);
285 End insert_dml;
286 --
287 -- ----------------------------------------------------------------------------
288 -- |------------------------------< pre_insert >------------------------------|
289 -- ----------------------------------------------------------------------------
290 -- {Start Of Comments}
291 --
292 -- Description:
293 --   This private procedure contains any processing which is required before
294 --   the insert dml. Presently, if the entity has a corresponding primary
295 --   key which is maintained by an associating sequence, the primary key for
296 --   the entity will be populated with the next sequence value in
297 --   preparation for the insert dml.
298 --   Also, if comments are defined for this entity, the comments insert
299 --   logic will also be called, generating a comment_id if required.
300 --
301 -- Prerequisites:
302 --   This is an internal procedure which is called from the ins procedure.
303 --
304 -- In Parameters:
305 --   A Pl/Sql record structre.
306 --
307 -- Post Success:
308 --   Processing continues.
309 --
310 -- Post Failure:
311 --   If an error has occurred, an error message and exception will be raised
312 --   but not handled.
313 --
314 -- Developer Implementation Notes:
315 --   Any pre-processing required before the insert dml is issued should be
316 --   coded within this procedure. As stated above, a good example is the
317 --   generation of a primary key number via a corresponding sequence.
321 -- Access Status:
318 --   It is important to note that any 3rd party maintenance should be reviewed
319 --   before placing in this procedure.
320 --
322 --   Internal Row Handler Use Only.
323 --
324 -- {End Of Comments}
325 -- ----------------------------------------------------------------------------
326 Procedure pre_insert
327 	(p_rec  			in out nocopy ben_lpr_shd.g_rec_type,
328 	 p_effective_date		in date,
329 	 p_datetrack_mode		in varchar2,
330 	 p_validation_start_date	in date,
331 	 p_validation_end_date		in date) is
332 --
333   l_proc	varchar2(72) := g_package||'pre_insert';
334 --
335 --
336   Cursor C_Sel1 is select ben_ler_chg_plip_enrt_f_s.nextval from sys.dual;
337 --
338 Begin
339   hr_utility.set_location('Entering:'||l_proc, 5);
340   --
341   --
342   Open C_Sel1;
343   Fetch C_Sel1 Into p_rec.ler_chg_plip_enrt_id;
344   Close C_Sel1;
345   --
346   --
347   hr_utility.set_location(' Leaving:'||l_proc, 10);
348 End pre_insert;
349 --
350 -- ----------------------------------------------------------------------------
351 -- |-----------------------------< post_insert >------------------------------|
352 -- ----------------------------------------------------------------------------
353 -- {Start Of Comments}
354 --
355 -- Description:
356 --   This private procedure contains any processing which is required after the
357 --   insert dml.
358 --
359 -- Prerequisites:
360 --   This is an internal procedure which is called from the ins procedure.
361 --
362 -- In Parameters:
363 --   A Pl/Sql record structre.
364 --
365 -- Post Success:
366 --   Processing continues.
367 --
368 -- Post Failure:
369 --   If an error has occurred, an error message and exception will be raised
370 --   but not handled.
371 --
372 -- Developer Implementation Notes:
373 --   Any post-processing required after the insert dml is issued should be
374 --   coded within this procedure. It is important to note that any 3rd party
375 --   maintenance should be reviewed before placing in this procedure.
376 --
377 -- Access Status:
378 --   Internal Row Handler Use Only.
379 --
380 -- {End Of Comments}
381 -- ----------------------------------------------------------------------------
382 Procedure post_insert
383 	(p_rec 			 in ben_lpr_shd.g_rec_type,
384 	 p_effective_date	 in date,
385 	 p_datetrack_mode	 in varchar2,
386 	 p_validation_start_date in date,
387 	 p_validation_end_date	 in date) is
388 --
389   l_proc	varchar2(72) := g_package||'post_insert';
390 --
391 Begin
392   hr_utility.set_location('Entering:'||l_proc, 5);
393 --
394   --
395   -- Start of API User Hook for post_insert.
396   --
397   begin
398     --
399     ben_lpr_rki.after_insert
400       (
401   p_ler_chg_plip_enrt_id          =>p_rec.ler_chg_plip_enrt_id
402  ,p_effective_start_date          =>p_rec.effective_start_date
403  ,p_effective_end_date            =>p_rec.effective_end_date
404  ,p_business_group_id             =>p_rec.business_group_id
405  ,p_auto_enrt_mthd_rl             =>p_rec.auto_enrt_mthd_rl
406  ,p_plip_id                       =>p_rec.plip_id
407  ,p_ler_id                        =>p_rec.ler_id
408  ,p_tco_chg_enrt_cd               =>p_rec.tco_chg_enrt_cd
409  ,p_crnt_enrt_prclds_chg_flag     =>p_rec.crnt_enrt_prclds_chg_flag
410  ,p_dflt_flag                     =>p_rec.dflt_flag
411  ,p_dflt_enrt_rl                  =>p_rec.dflt_enrt_rl
412  ,p_enrt_rl                       =>p_rec.enrt_rl
413  ,p_dflt_enrt_cd                  =>p_rec.dflt_enrt_cd
414  ,p_enrt_mthd_cd                  =>p_rec.enrt_mthd_cd
415  ,p_stl_elig_cant_chg_flag        =>p_rec.stl_elig_cant_chg_flag
416  ,p_enrt_cd                       =>p_rec.enrt_cd
417  ,p_lpr_attribute_category        =>p_rec.lpr_attribute_category
418  ,p_lpr_attribute1                =>p_rec.lpr_attribute1
419  ,p_lpr_attribute2                =>p_rec.lpr_attribute2
420  ,p_lpr_attribute3                =>p_rec.lpr_attribute3
421  ,p_lpr_attribute4                =>p_rec.lpr_attribute4
422  ,p_lpr_attribute5                =>p_rec.lpr_attribute5
423  ,p_lpr_attribute6                =>p_rec.lpr_attribute6
424  ,p_lpr_attribute7                =>p_rec.lpr_attribute7
425  ,p_lpr_attribute8                =>p_rec.lpr_attribute8
426  ,p_lpr_attribute9                =>p_rec.lpr_attribute9
427  ,p_lpr_attribute10               =>p_rec.lpr_attribute10
428  ,p_lpr_attribute11               =>p_rec.lpr_attribute11
429  ,p_lpr_attribute12               =>p_rec.lpr_attribute12
430  ,p_lpr_attribute13               =>p_rec.lpr_attribute13
431  ,p_lpr_attribute14               =>p_rec.lpr_attribute14
432  ,p_lpr_attribute15               =>p_rec.lpr_attribute15
433  ,p_lpr_attribute16               =>p_rec.lpr_attribute16
434  ,p_lpr_attribute17               =>p_rec.lpr_attribute17
435  ,p_lpr_attribute18               =>p_rec.lpr_attribute18
436  ,p_lpr_attribute19               =>p_rec.lpr_attribute19
437  ,p_lpr_attribute20               =>p_rec.lpr_attribute20
438  ,p_lpr_attribute21               =>p_rec.lpr_attribute21
439  ,p_lpr_attribute22               =>p_rec.lpr_attribute22
440  ,p_lpr_attribute23               =>p_rec.lpr_attribute23
441  ,p_lpr_attribute24               =>p_rec.lpr_attribute24
442  ,p_lpr_attribute25               =>p_rec.lpr_attribute25
443  ,p_lpr_attribute26               =>p_rec.lpr_attribute26
444  ,p_lpr_attribute27               =>p_rec.lpr_attribute27
445  ,p_lpr_attribute28               =>p_rec.lpr_attribute28
446  ,p_lpr_attribute29               =>p_rec.lpr_attribute29
447  ,p_lpr_attribute30               =>p_rec.lpr_attribute30
448  ,p_object_version_number         =>p_rec.object_version_number
449  ,p_effective_date                =>p_effective_date
453     --
450  ,p_validation_start_date         =>p_validation_start_date
451  ,p_validation_end_date           =>p_validation_end_date
452       );
454   exception
455     --
456     when hr_api.cannot_find_prog_unit then
457       --
458       hr_api.cannot_find_prog_unit_error
459         (p_module_name => 'ben_ler_chg_plip_enrt_f'
460         ,p_hook_type   => 'AI');
461       --
462   end;
463   --
464   -- End of API User Hook for post_insert.
465   --
466   --
467   hr_utility.set_location(' Leaving:'||l_proc, 10);
468 End post_insert;
469 --
470 -- ----------------------------------------------------------------------------
471 -- |-------------------------------< ins_lck >--------------------------------|
472 -- ----------------------------------------------------------------------------
473 -- {Start Of Comments}
474 --
475 -- Description:
476 --   The ins_lck process has one main function to perform. When inserting
477 --   a datetracked row, we must validate the DT mode.
478 --   be manipulated.
479 --
480 -- Prerequisites:
481 --   This procedure can only be called for the datetrack mode of INSERT.
482 --
483 -- In Parameters:
484 --
485 -- Post Success:
486 --   On successful completion of the ins_lck process the parental
487 --   datetracked rows will be locked providing the p_enforce_foreign_locking
488 --   argument value is TRUE.
489 --   If the p_enforce_foreign_locking argument value is FALSE then the
490 --   parential rows are not locked.
491 --
492 -- Post Failure:
493 --   The Lck process can fail for:
494 --   1) When attempting to lock the row the row could already be locked by
495 --      another user. This will raise the HR_Api.Object_Locked exception.
496 --   2) When attempting to the lock the parent which doesn't exist.
497 --      For the entity to be locked the parent must exist!
498 --
499 -- Developer Implementation Notes:
500 --   None.
501 --
502 -- Access Status:
503 --   Internal Row Handler Use Only.
504 --
505 -- {End Of Comments}
506 -- ----------------------------------------------------------------------------
507 Procedure ins_lck
508 	(p_effective_date	 in  date,
509 	 p_datetrack_mode	 in  varchar2,
510 	 p_rec	 		 in  ben_lpr_shd.g_rec_type,
511 	 p_validation_start_date out nocopy date,
512 	 p_validation_end_date	 out nocopy date) is
513 --
514   l_proc		  varchar2(72) := g_package||'ins_lck';
515   l_validation_start_date date;
516   l_validation_end_date	  date;
517 --
518 Begin
519   hr_utility.set_location('Entering:'||l_proc, 5);
520   --
521   -- Validate the datetrack mode mode getting the validation start
522   -- and end dates for the specified datetrack operation.
523   --
524   dt_api.validate_dt_mode
525 	(p_effective_date	   => p_effective_date,
526 	 p_datetrack_mode	   => p_datetrack_mode,
527 	 p_base_table_name	   => 'ben_ler_chg_plip_enrt_f',
528 	 p_base_key_column	   => 'ler_chg_plip_enrt_id',
529 	 p_base_key_value 	   => p_rec.ler_chg_plip_enrt_id,
530 	 p_parent_table_name1      => 'ben_plip_f',
531 	 p_parent_key_column1      => 'plip_id',
532 	 p_parent_key_value1       => p_rec.plip_id,
533 	 p_parent_table_name2      => 'ben_ler_f',
534 	 p_parent_key_column2      => 'ler_id',
535 	 p_parent_key_value2       => p_rec.ler_id,
536          p_enforce_foreign_locking => true,
537 	 p_validation_start_date   => l_validation_start_date,
538  	 p_validation_end_date	   => l_validation_end_date);
539   --
540   -- Set the validation start and end date OUT arguments
541   --
542   p_validation_start_date := l_validation_start_date;
543   p_validation_end_date   := l_validation_end_date;
544   --
545   hr_utility.set_location(' Leaving:'||l_proc, 10);
546 --
547 End ins_lck;
548 --
549 -- ----------------------------------------------------------------------------
550 -- |---------------------------------< ins >----------------------------------|
551 -- ----------------------------------------------------------------------------
552 Procedure ins
553   (
554   p_rec		   in out nocopy ben_lpr_shd.g_rec_type,
555   p_effective_date in     date
556   ) is
557 --
558   l_proc			varchar2(72) := g_package||'ins';
559   l_datetrack_mode		varchar2(30) := 'INSERT';
560   l_validation_start_date	date;
561   l_validation_end_date		date;
562 --
563 Begin
564   hr_utility.set_location('Entering:'||l_proc, 5);
565   --
566   -- Call the lock operation
567   --
568   ins_lck
569 	(p_effective_date	 => p_effective_date,
570 	 p_datetrack_mode	 => l_datetrack_mode,
571 	 p_rec	 		 => p_rec,
572 	 p_validation_start_date => l_validation_start_date,
573 	 p_validation_end_date	 => l_validation_end_date);
574   --
575   -- Call the supporting insert validate operations
576   --
577   ben_lpr_bus.insert_validate
578 	(p_rec			 => p_rec,
579 	 p_effective_date	 => p_effective_date,
580 	 p_datetrack_mode	 => l_datetrack_mode,
581 	 p_validation_start_date => l_validation_start_date,
582 	 p_validation_end_date	 => l_validation_end_date);
583   --
584   -- Call the supporting pre-insert operation
585   --
586   pre_insert
587  	(p_rec			 => p_rec,
588 	 p_effective_date	 => p_effective_date,
589 	 p_datetrack_mode	 => l_datetrack_mode,
590 	 p_validation_start_date => l_validation_start_date,
591 	 p_validation_end_date	 => l_validation_end_date);
592   --
593   -- Insert the row
594   --
595   insert_dml
596  	(p_rec			 => p_rec,
597 	 p_effective_date	 => p_effective_date,
598 	 p_datetrack_mode	 => l_datetrack_mode,
599 	 p_validation_start_date => l_validation_start_date,
600 	 p_validation_end_date	 => l_validation_end_date);
604   post_insert
601   --
602   -- Call the supporting post-insert operation
603   --
605  	(p_rec			 => p_rec,
606 	 p_effective_date	 => p_effective_date,
607 	 p_datetrack_mode	 => l_datetrack_mode,
608 	 p_validation_start_date => l_validation_start_date,
609 	 p_validation_end_date	 => l_validation_end_date);
610 end ins;
611 --
612 -- ----------------------------------------------------------------------------
613 -- |---------------------------------< ins >----------------------------------|
614 -- ----------------------------------------------------------------------------
615 Procedure ins
616   (
617   p_ler_chg_plip_enrt_id         out nocopy number,
618   p_effective_start_date         out nocopy date,
619   p_effective_end_date           out nocopy date,
620   p_business_group_id            in number,
621   p_auto_enrt_mthd_rl            in number,
622   p_plip_id                      in number,
623   p_ler_id                       in number,
624   p_tco_chg_enrt_cd              in varchar2,
625   p_crnt_enrt_prclds_chg_flag    in varchar2         default null,
626   p_dflt_flag                    in varchar2         default null,
627   p_dflt_enrt_rl                 in number           default null,
628   p_enrt_rl                      in number           default null,
629   p_dflt_enrt_cd                 in varchar2         default null,
630   p_enrt_mthd_cd                 in varchar2         default null,
631   p_stl_elig_cant_chg_flag       in varchar2         default null,
632   p_enrt_cd                      in varchar2         default null,
633   p_lpr_attribute_category       in varchar2         default null,
634   p_lpr_attribute1               in varchar2         default null,
635   p_lpr_attribute2               in varchar2         default null,
636   p_lpr_attribute3               in varchar2         default null,
637   p_lpr_attribute4               in varchar2         default null,
638   p_lpr_attribute5               in varchar2         default null,
639   p_lpr_attribute6               in varchar2         default null,
640   p_lpr_attribute7               in varchar2         default null,
641   p_lpr_attribute8               in varchar2         default null,
642   p_lpr_attribute9               in varchar2         default null,
643   p_lpr_attribute10              in varchar2         default null,
644   p_lpr_attribute11              in varchar2         default null,
645   p_lpr_attribute12              in varchar2         default null,
646   p_lpr_attribute13              in varchar2         default null,
647   p_lpr_attribute14              in varchar2         default null,
648   p_lpr_attribute15              in varchar2         default null,
649   p_lpr_attribute16              in varchar2         default null,
650   p_lpr_attribute17              in varchar2         default null,
651   p_lpr_attribute18              in varchar2         default null,
652   p_lpr_attribute19              in varchar2         default null,
653   p_lpr_attribute20              in varchar2         default null,
654   p_lpr_attribute21              in varchar2         default null,
655   p_lpr_attribute22              in varchar2         default null,
656   p_lpr_attribute23              in varchar2         default null,
657   p_lpr_attribute24              in varchar2         default null,
658   p_lpr_attribute25              in varchar2         default null,
659   p_lpr_attribute26              in varchar2         default null,
660   p_lpr_attribute27              in varchar2         default null,
661   p_lpr_attribute28              in varchar2         default null,
662   p_lpr_attribute29              in varchar2         default null,
663   p_lpr_attribute30              in varchar2         default null,
664   p_object_version_number        out nocopy number,
665   p_effective_date		 in date
666   ) is
667 --
668   l_rec		ben_lpr_shd.g_rec_type;
669   l_proc	varchar2(72) := g_package||'ins';
670 --
671 Begin
672   hr_utility.set_location('Entering:'||l_proc, 5);
673   --
674   -- Call conversion function to turn arguments into the
675   -- p_rec structure.
676   --
677   l_rec :=
678   ben_lpr_shd.convert_args
679   (
680   null,
681   null,
682   null,
683   p_business_group_id,
684   p_auto_enrt_mthd_rl,
685   p_plip_id,
686   p_ler_id,
687   p_tco_chg_enrt_cd,
688   p_crnt_enrt_prclds_chg_flag,
689   p_dflt_flag,
690   p_dflt_enrt_rl,
691   p_enrt_rl,
692   p_dflt_enrt_cd,
693   p_enrt_mthd_cd,
694   p_stl_elig_cant_chg_flag,
695   p_enrt_cd,
696   p_lpr_attribute_category,
697   p_lpr_attribute1,
698   p_lpr_attribute2,
699   p_lpr_attribute3,
700   p_lpr_attribute4,
701   p_lpr_attribute5,
702   p_lpr_attribute6,
703   p_lpr_attribute7,
704   p_lpr_attribute8,
705   p_lpr_attribute9,
706   p_lpr_attribute10,
707   p_lpr_attribute11,
708   p_lpr_attribute12,
709   p_lpr_attribute13,
710   p_lpr_attribute14,
711   p_lpr_attribute15,
712   p_lpr_attribute16,
713   p_lpr_attribute17,
714   p_lpr_attribute18,
715   p_lpr_attribute19,
716   p_lpr_attribute20,
717   p_lpr_attribute21,
718   p_lpr_attribute22,
719   p_lpr_attribute23,
720   p_lpr_attribute24,
721   p_lpr_attribute25,
722   p_lpr_attribute26,
723   p_lpr_attribute27,
724   p_lpr_attribute28,
725   p_lpr_attribute29,
726   p_lpr_attribute30,
727   null
728   );
729   --
730   -- Having converted the arguments into the ben_lpr_rec
731   -- plsql record structure we call the corresponding record
732   -- business process.
733   --
734   ins(l_rec, p_effective_date);
735   --
736   -- Set the OUT arguments.
737   --
738   p_ler_chg_plip_enrt_id        	:= l_rec.ler_chg_plip_enrt_id;
742   --
739   p_effective_start_date  	:= l_rec.effective_start_date;
740   p_effective_end_date    	:= l_rec.effective_end_date;
741   p_object_version_number 	:= l_rec.object_version_number;
743   --
744   hr_utility.set_location(' Leaving:'||l_proc, 10);
745 End ins;
746 --
747 end ben_lpr_ins;