DBA Data[Home] [Help]

PACKAGE BODY: APPS.BEN_PRT_INS

Source


1 Package Body ben_prt_ins as
2 /* $Header: beprtrhi.pkb 120.0.12010000.3 2008/08/25 13:51:57 ppentapa ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                     Private Global Definitions                           |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package  varchar2(33)	:= '  ben_prt_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_prt_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_poe_rt_f t
70     where  t.poe_rt_id       = p_rec.poe_rt_id
71     and    t.effective_start_date =
72              ben_prt_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_poe_rt_f.created_by%TYPE;
77   l_creation_date       ben_poe_rt_f.creation_date%TYPE;
78   l_last_update_date   	ben_poe_rt_f.last_update_date%TYPE;
79   l_last_updated_by     ben_poe_rt_f.last_updated_by%TYPE;
80   l_last_update_login   ben_poe_rt_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_poe_rt_f',
90 	 p_base_key_column => 'poe_rt_id',
91 	 p_base_key_value  => p_rec.poe_rt_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_prt_shd.g_api_dml := true;  -- Set the api dml status
130   --
131   -- Insert the row into: ben_poe_rt_f
132   --
133   insert into ben_poe_rt_f
134   (	poe_rt_id,
135 	effective_start_date,
136 	effective_end_date,
137 	mn_poe_num,
138 	mx_poe_num,
139 	no_mn_poe_flag,
140 	no_mx_poe_flag,
141 	rndg_cd,
142 	rndg_rl,
143 	poe_nnmntry_uom,
144 	vrbl_rt_prfl_id,
145 	business_group_id,
146 	prt_attribute_category,
147 	prt_attribute1,
148 	prt_attribute2,
149 	prt_attribute3,
150 	prt_attribute4,
151 	prt_attribute5,
152 	prt_attribute6,
153 	prt_attribute7,
154 	prt_attribute8,
155 	prt_attribute9,
156 	prt_attribute10,
157 	prt_attribute11,
158 	prt_attribute12,
159 	prt_attribute13,
160 	prt_attribute14,
161 	prt_attribute15,
162 	prt_attribute16,
163 	prt_attribute17,
164 	prt_attribute18,
165 	prt_attribute19,
166 	prt_attribute20,
167 	prt_attribute21,
168 	prt_attribute22,
169 	prt_attribute23,
170 	prt_attribute24,
171 	prt_attribute25,
172 	prt_attribute26,
173 	prt_attribute27,
174 	prt_attribute28,
175 	prt_attribute29,
176 	prt_attribute30,
177 	object_version_number,
178 	cbr_dsblty_apls_flag
179    	, created_by,
180    	creation_date,
181    	last_update_date,
182    	last_updated_by,
183    	last_update_login
184   )
185   Values
186   (	p_rec.poe_rt_id,
187 	p_rec.effective_start_date,
188 	p_rec.effective_end_date,
189 	p_rec.mn_poe_num,
190 	p_rec.mx_poe_num,
191 	p_rec.no_mn_poe_flag,
192 	p_rec.no_mx_poe_flag,
193 	p_rec.rndg_cd,
194 	p_rec.rndg_rl,
195 	p_rec.poe_nnmntry_uom,
196 	p_rec.vrbl_rt_prfl_id,
197 	p_rec.business_group_id,
198 	p_rec.prt_attribute_category,
199 	p_rec.prt_attribute1,
200 	p_rec.prt_attribute2,
201 	p_rec.prt_attribute3,
202 	p_rec.prt_attribute4,
203 	p_rec.prt_attribute5,
204 	p_rec.prt_attribute6,
205 	p_rec.prt_attribute7,
206 	p_rec.prt_attribute8,
207 	p_rec.prt_attribute9,
208 	p_rec.prt_attribute10,
209 	p_rec.prt_attribute11,
210 	p_rec.prt_attribute12,
211 	p_rec.prt_attribute13,
212 	p_rec.prt_attribute14,
213 	p_rec.prt_attribute15,
214 	p_rec.prt_attribute16,
215 	p_rec.prt_attribute17,
216 	p_rec.prt_attribute18,
217 	p_rec.prt_attribute19,
218 	p_rec.prt_attribute20,
219 	p_rec.prt_attribute21,
220 	p_rec.prt_attribute22,
221 	p_rec.prt_attribute23,
222 	p_rec.prt_attribute24,
223 	p_rec.prt_attribute25,
224 	p_rec.prt_attribute26,
225 	p_rec.prt_attribute27,
226 	p_rec.prt_attribute28,
227 	p_rec.prt_attribute29,
228 	p_rec.prt_attribute30,
229 	p_rec.object_version_number,
230 	p_rec.cbr_dsblty_apls_flag
231 	, l_created_by,
232    	l_creation_date,
233    	l_last_update_date,
234    	l_last_updated_by,
235    	l_last_update_login
236   );
237   --
238   ben_prt_shd.g_api_dml := false;   -- Unset the api dml status
239   hr_utility.set_location(' Leaving:'||l_proc, 15);
240 --
241 Exception
242   When hr_api.check_integrity_violated Then
243     -- A check constraint has been violated
244     ben_prt_shd.g_api_dml := false;   -- Unset the api dml status
245     ben_prt_shd.constraint_error
246       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
247   When hr_api.unique_integrity_violated Then
248     -- Unique integrity has been violated
249     ben_prt_shd.g_api_dml := false;   -- Unset the api dml status
250     ben_prt_shd.constraint_error
251       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
252   When Others Then
253     ben_prt_shd.g_api_dml := false;   -- Unset the api dml status
254     Raise;
255 End dt_insert_dml;
256 --
257 -- ----------------------------------------------------------------------------
258 -- |------------------------------< insert_dml >------------------------------|
259 -- ----------------------------------------------------------------------------
260 Procedure insert_dml
261 	(p_rec 			 in out nocopy ben_prt_shd.g_rec_type,
262 	 p_effective_date	 in	date,
263 	 p_datetrack_mode	 in	varchar2,
264 	 p_validation_start_date in	date,
265 	 p_validation_end_date	 in	date) is
266 --
267   l_proc	varchar2(72) := g_package||'insert_dml';
268 --
269 Begin
270   hr_utility.set_location('Entering:'||l_proc, 5);
271   --
272   dt_insert_dml(p_rec			=> p_rec,
273 		p_effective_date	=> p_effective_date,
274 		p_datetrack_mode	=> p_datetrack_mode,
275        		p_validation_start_date	=> p_validation_start_date,
276 		p_validation_end_date	=> p_validation_end_date);
277   --
278   hr_utility.set_location(' Leaving:'||l_proc, 10);
279 End insert_dml;
280 --
281 -- ----------------------------------------------------------------------------
282 -- |------------------------------< pre_insert >------------------------------|
283 -- ----------------------------------------------------------------------------
284 -- {Start Of Comments}
285 --
286 -- Description:
287 --   This private procedure contains any processing which is required before
288 --   the insert dml. Presently, if the entity has a corresponding primary
289 --   key which is maintained by an associating sequence, the primary key for
290 --   the entity will be populated with the next sequence value in
291 --   preparation for the insert dml.
292 --   Also, if comments are defined for this entity, the comments insert
293 --   logic will also be called, generating a comment_id if required.
294 --
295 -- Prerequisites:
296 --   This is an internal procedure which is called from the ins procedure.
297 --
298 -- In Parameters:
299 --   A Pl/Sql record structre.
300 --
301 -- Post Success:
302 --   Processing continues.
303 --
304 -- Post Failure:
305 --   If an error has occurred, an error message and exception will be raised
306 --   but not handled.
307 --
308 -- Developer Implementation Notes:
309 --   Any pre-processing required before the insert dml is issued should be
310 --   coded within this procedure. As stated above, a good example is the
311 --   generation of a primary key number via a corresponding sequence.
312 --   It is important to note that any 3rd party maintenance should be reviewed
313 --   before placing in this procedure.
314 --
315 -- Access Status:
316 --   Internal Row Handler Use Only.
317 --
318 -- {End Of Comments}
319 -- ----------------------------------------------------------------------------
320 Procedure pre_insert
321 	(p_rec  			in out nocopy ben_prt_shd.g_rec_type,
322 	 p_effective_date		in date,
323 	 p_datetrack_mode		in varchar2,
324 	 p_validation_start_date	in date,
325 	 p_validation_end_date		in date) is
326 --
327   l_proc	varchar2(72) := g_package||'pre_insert';
328 --
329   cursor c1 is
330     select ben_poe_rt_f_s.nextval
331     from   sys.dual;
332   --
333   --
334 Begin
335   hr_utility.set_location('Entering:'||l_proc, 5);
336   --
337   open c1;
338     --
339     fetch c1 into p_rec.poe_rt_id;
340     --
341   close c1;
342   --
343   hr_utility.set_location(' Leaving:'||l_proc, 10);
344 End pre_insert;
345 --
346 -- ----------------------------------------------------------------------------
347 -- |-----------------------------< post_insert >------------------------------|
348 -- ----------------------------------------------------------------------------
349 -- {Start Of Comments}
350 --
351 -- Description:
352 --   This private procedure contains any processing which is required after the
353 --   insert dml.
354 --
355 -- Prerequisites:
356 --   This is an internal procedure which is called from the ins procedure.
357 --
358 -- In Parameters:
359 --   A Pl/Sql record structre.
360 --
361 -- Post Success:
362 --   Processing continues.
363 --
364 -- Post Failure:
365 --   If an error has occurred, an error message and exception will be raised
366 --   but not handled.
367 --
368 -- Developer Implementation Notes:
369 --   Any post-processing required after the insert dml is issued should be
370 --   coded within this procedure. It is important to note that any 3rd party
371 --   maintenance should be reviewed before placing in this procedure.
372 --
373 -- Access Status:
374 --   Internal Row Handler Use Only.
375 --
376 -- {End Of Comments}
377 -- ----------------------------------------------------------------------------
378 Procedure post_insert
379 	(p_rec 			 in ben_prt_shd.g_rec_type,
380 	 p_effective_date	 in date,
381 	 p_datetrack_mode	 in varchar2,
382 	 p_validation_start_date in date,
383 	 p_validation_end_date	 in date) is
384 --
385   l_proc	varchar2(72) := g_package||'post_insert';
386 --
387 Begin
388   hr_utility.set_location('Entering:'||l_proc, 5);
389 --
390   --
391   -- Start of API User Hook for post_insert.
392   --
393   begin
394     --
395     ben_prt_rki.after_insert
396       (
397   p_poe_rt_id                     =>p_rec.poe_rt_id
398  ,p_effective_start_date          =>p_rec.effective_start_date
399  ,p_effective_end_date            =>p_rec.effective_end_date
400  ,p_mn_poe_num                    =>p_rec.mn_poe_num
401  ,p_mx_poe_num                    =>p_rec.mx_poe_num
402  ,p_no_mn_poe_flag                =>p_rec.no_mn_poe_flag
403  ,p_no_mx_poe_flag                =>p_rec.no_mx_poe_flag
404  ,p_rndg_cd                       =>p_rec.rndg_cd
405  ,p_rndg_rl                       =>p_rec.rndg_rl
406  ,p_poe_nnmntry_uom               =>p_rec.poe_nnmntry_uom
407  ,p_vrbl_rt_prfl_id               =>p_rec.vrbl_rt_prfl_id
408  ,p_business_group_id             =>p_rec.business_group_id
409  ,p_prt_attribute_category        =>p_rec.prt_attribute_category
410  ,p_prt_attribute1                =>p_rec.prt_attribute1
411  ,p_prt_attribute2                =>p_rec.prt_attribute2
412  ,p_prt_attribute3                =>p_rec.prt_attribute3
413  ,p_prt_attribute4                =>p_rec.prt_attribute4
414  ,p_prt_attribute5                =>p_rec.prt_attribute5
415  ,p_prt_attribute6                =>p_rec.prt_attribute6
416  ,p_prt_attribute7                =>p_rec.prt_attribute7
417  ,p_prt_attribute8                =>p_rec.prt_attribute8
418  ,p_prt_attribute9                =>p_rec.prt_attribute9
419  ,p_prt_attribute10               =>p_rec.prt_attribute10
420  ,p_prt_attribute11               =>p_rec.prt_attribute11
421  ,p_prt_attribute12               =>p_rec.prt_attribute12
422  ,p_prt_attribute13               =>p_rec.prt_attribute13
423  ,p_prt_attribute14               =>p_rec.prt_attribute14
424  ,p_prt_attribute15               =>p_rec.prt_attribute15
425  ,p_prt_attribute16               =>p_rec.prt_attribute16
429  ,p_prt_attribute20               =>p_rec.prt_attribute20
426  ,p_prt_attribute17               =>p_rec.prt_attribute17
427  ,p_prt_attribute18               =>p_rec.prt_attribute18
428  ,p_prt_attribute19               =>p_rec.prt_attribute19
430  ,p_prt_attribute21               =>p_rec.prt_attribute21
431  ,p_prt_attribute22               =>p_rec.prt_attribute22
432  ,p_prt_attribute23               =>p_rec.prt_attribute23
433  ,p_prt_attribute24               =>p_rec.prt_attribute24
434  ,p_prt_attribute25               =>p_rec.prt_attribute25
435  ,p_prt_attribute26               =>p_rec.prt_attribute26
436  ,p_prt_attribute27               =>p_rec.prt_attribute27
437  ,p_prt_attribute28               =>p_rec.prt_attribute28
438  ,p_prt_attribute29               =>p_rec.prt_attribute29
439  ,p_prt_attribute30               =>p_rec.prt_attribute30
440  ,p_object_version_number         =>p_rec.object_version_number
441  ,p_cbr_dsblty_apls_flag          =>p_rec.cbr_dsblty_apls_flag
442  ,p_effective_date                =>p_effective_date
443  ,p_validation_start_date         =>p_validation_start_date
444  ,p_validation_end_date           =>p_validation_end_date
445       );
446     --
447   exception
448     --
449     when hr_api.cannot_find_prog_unit then
450       --
451       hr_api.cannot_find_prog_unit_error
452         (p_module_name => 'ben_poe_rt_f'
453         ,p_hook_type   => 'AI');
454       --
455   end;
456   --
457   -- End of API User Hook for post_insert.
458   --
459   --
460   hr_utility.set_location(' Leaving:'||l_proc, 10);
461 End post_insert;
462 --
463 -- ----------------------------------------------------------------------------
464 -- |-------------------------------< ins_lck >--------------------------------|
465 -- ----------------------------------------------------------------------------
466 -- {Start Of Comments}
467 --
468 -- Description:
469 --   The ins_lck process has one main function to perform. When inserting
470 --   a datetracked row, we must validate the DT mode.
471 --   be manipulated.
472 --
473 -- Prerequisites:
474 --   This procedure can only be called for the datetrack mode of INSERT.
475 --
476 -- In Parameters:
477 --
478 -- Post Success:
479 --   On successful completion of the ins_lck process the parental
480 --   datetracked rows will be locked providing the p_enforce_foreign_locking
481 --   argument value is TRUE.
482 --   If the p_enforce_foreign_locking argument value is FALSE then the
483 --   parential rows are not locked.
484 --
485 -- Post Failure:
486 --   The Lck process can fail for:
487 --   1) When attempting to lock the row the row could already be locked by
488 --      another user. This will raise the HR_Api.Object_Locked exception.
489 --   2) When attempting to the lock the parent which doesn't exist.
490 --      For the entity to be locked the parent must exist!
491 --
492 -- Developer Implementation Notes:
493 --   None.
494 --
495 -- Access Status:
496 --   Internal Row Handler Use Only.
497 --
498 -- {End Of Comments}
499 -- ----------------------------------------------------------------------------
500 Procedure ins_lck
501 	(p_effective_date	 in  date,
502 	 p_datetrack_mode	 in  varchar2,
503 	 p_rec	 		 in  ben_prt_shd.g_rec_type,
504 	 p_validation_start_date out nocopy date,
505 	 p_validation_end_date	 out nocopy date) is
506 --
507   l_proc		  varchar2(72) := g_package||'ins_lck';
508   l_validation_start_date date;
509   l_validation_end_date	  date;
510 --
511 Begin
512   hr_utility.set_location('Entering:'||l_proc, 5);
513   --
514   -- Validate the datetrack mode mode getting the validation start
515   -- and end dates for the specified datetrack operation.
516   --
517   dt_api.validate_dt_mode
518 	(p_effective_date	   => p_effective_date,
519 	 p_datetrack_mode	   => p_datetrack_mode,
520 	 p_base_table_name	   => 'ben_poe_rt_f',
521 	 p_base_key_column	   => 'poe_rt_id',
522 	 p_base_key_value 	   => p_rec.poe_rt_id,
523 	 p_parent_table_name1      => 'ben_vrbl_rt_prfl_f',
524 	 p_parent_key_column1      => 'vrbl_rt_prfl_id',
525 	 p_parent_key_value1       => p_rec.vrbl_rt_prfl_id,
526          p_enforce_foreign_locking => true,
527 	 p_validation_start_date   => l_validation_start_date,
528  	 p_validation_end_date	   => l_validation_end_date);
529   --
530   -- Set the validation start and end date OUT arguments
531   --
532   p_validation_start_date := l_validation_start_date;
533   p_validation_end_date   := l_validation_end_date;
534   --
535   hr_utility.set_location(' Leaving:'||l_proc, 10);
536 --
537 End ins_lck;
538 --
539 -- ----------------------------------------------------------------------------
540 -- |---------------------------------< ins >----------------------------------|
541 -- ----------------------------------------------------------------------------
542 Procedure ins
543   (
544   p_rec		   in out nocopy ben_prt_shd.g_rec_type,
545   p_effective_date in     date
546   ) is
547 --
548   l_proc			varchar2(72) := g_package||'ins';
549   l_datetrack_mode		varchar2(30) := 'INSERT';
550   l_validation_start_date	date;
551   l_validation_end_date		date;
552 --
553 Begin
554   hr_utility.set_location('Entering:'||l_proc, 5);
558   ins_lck
555   --
556   -- Call the lock operation
557   --
559 	(p_effective_date	 => p_effective_date,
560 	 p_datetrack_mode	 => l_datetrack_mode,
561 	 p_rec	 		 => p_rec,
562 	 p_validation_start_date => l_validation_start_date,
563 	 p_validation_end_date	 => l_validation_end_date);
564   --
565   -- Call the supporting insert validate operations
566   --
567   ben_prt_bus.insert_validate
568 	(p_rec			 => p_rec,
569 	 p_effective_date	 => p_effective_date,
570 	 p_datetrack_mode	 => l_datetrack_mode,
571 	 p_validation_start_date => l_validation_start_date,
572 	 p_validation_end_date	 => l_validation_end_date);
573   --
574   -- Call the supporting pre-insert operation
575   --
576   pre_insert
577  	(p_rec			 => p_rec,
578 	 p_effective_date	 => p_effective_date,
579 	 p_datetrack_mode	 => l_datetrack_mode,
580 	 p_validation_start_date => l_validation_start_date,
581 	 p_validation_end_date	 => l_validation_end_date);
582   --
583   -- Insert the row
584   --
585   insert_dml
586  	(p_rec			 => p_rec,
587 	 p_effective_date	 => p_effective_date,
588 	 p_datetrack_mode	 => l_datetrack_mode,
589 	 p_validation_start_date => l_validation_start_date,
590 	 p_validation_end_date	 => l_validation_end_date);
591   --
592   -- Call the supporting post-insert operation
593   --
594   post_insert
595  	(p_rec			 => p_rec,
596 	 p_effective_date	 => p_effective_date,
597 	 p_datetrack_mode	 => l_datetrack_mode,
598 	 p_validation_start_date => l_validation_start_date,
599 	 p_validation_end_date	 => l_validation_end_date);
600 end ins;
601 --
602 -- ----------------------------------------------------------------------------
603 -- |---------------------------------< ins >----------------------------------|
604 -- ----------------------------------------------------------------------------
605 Procedure ins
606   (
607   p_poe_rt_id                    out nocopy number,
608   p_effective_start_date         out nocopy date,
609   p_effective_end_date           out nocopy date,
610   p_mn_poe_num                   in number           default null,
611   p_mx_poe_num                   in number           default null,
612   p_no_mn_poe_flag               in varchar2,
613   p_no_mx_poe_flag               in varchar2,
614   p_rndg_cd                      in varchar2         default null,
615   p_rndg_rl                      in number           default null,
616   p_poe_nnmntry_uom              in varchar2         default null,
617   p_vrbl_rt_prfl_id              in number,
618   p_business_group_id            in number,
619   p_prt_attribute_category       in varchar2         default null,
620   p_prt_attribute1               in varchar2         default null,
621   p_prt_attribute2               in varchar2         default null,
622   p_prt_attribute3               in varchar2         default null,
623   p_prt_attribute4               in varchar2         default null,
624   p_prt_attribute5               in varchar2         default null,
625   p_prt_attribute6               in varchar2         default null,
626   p_prt_attribute7               in varchar2         default null,
627   p_prt_attribute8               in varchar2         default null,
628   p_prt_attribute9               in varchar2         default null,
629   p_prt_attribute10              in varchar2         default null,
630   p_prt_attribute11              in varchar2         default null,
631   p_prt_attribute12              in varchar2         default null,
632   p_prt_attribute13              in varchar2         default null,
633   p_prt_attribute14              in varchar2         default null,
634   p_prt_attribute15              in varchar2         default null,
635   p_prt_attribute16              in varchar2         default null,
636   p_prt_attribute17              in varchar2         default null,
637   p_prt_attribute18              in varchar2         default null,
638   p_prt_attribute19              in varchar2         default null,
639   p_prt_attribute20              in varchar2         default null,
640   p_prt_attribute21              in varchar2         default null,
641   p_prt_attribute22              in varchar2         default null,
642   p_prt_attribute23              in varchar2         default null,
643   p_prt_attribute24              in varchar2         default null,
644   p_prt_attribute25              in varchar2         default null,
645   p_prt_attribute26              in varchar2         default null,
646   p_prt_attribute27              in varchar2         default null,
647   p_prt_attribute28              in varchar2         default null,
648   p_prt_attribute29              in varchar2         default null,
649   p_prt_attribute30              in varchar2         default null,
650   p_object_version_number        out nocopy number,
651   p_cbr_dsblty_apls_flag         in varchar2,
652   p_effective_date		 in date
653   ) is
654 --
655   l_rec		ben_prt_shd.g_rec_type;
656   l_proc	varchar2(72) := g_package||'ins';
657 --
658 Begin
659   hr_utility.set_location('Entering:'||l_proc, 5);
660   --
661   -- Call conversion function to turn arguments into the
662   -- p_rec structure.
663   --
664   l_rec :=
665   ben_prt_shd.convert_args
666   (
667   null,
668   null,
669   null,
670   p_mn_poe_num,
671   p_mx_poe_num,
672   p_no_mn_poe_flag,
673   p_no_mx_poe_flag,
674   p_rndg_cd,
675   p_rndg_rl,
676   p_poe_nnmntry_uom,
677   p_vrbl_rt_prfl_id,
678   p_business_group_id,
679   p_prt_attribute_category,
680   p_prt_attribute1,
681   p_prt_attribute2,
682   p_prt_attribute3,
683   p_prt_attribute4,
684   p_prt_attribute5,
685   p_prt_attribute6,
686   p_prt_attribute7,
687   p_prt_attribute8,
688   p_prt_attribute9,
689   p_prt_attribute10,
690   p_prt_attribute11,
691   p_prt_attribute12,
692   p_prt_attribute13,
693   p_prt_attribute14,
694   p_prt_attribute15,
695   p_prt_attribute16,
696   p_prt_attribute17,
697   p_prt_attribute18,
698   p_prt_attribute19,
699   p_prt_attribute20,
700   p_prt_attribute21,
701   p_prt_attribute22,
702   p_prt_attribute23,
703   p_prt_attribute24,
704   p_prt_attribute25,
705   p_prt_attribute26,
706   p_prt_attribute27,
707   p_prt_attribute28,
708   p_prt_attribute29,
709   p_prt_attribute30,
710   null,
711   p_cbr_dsblty_apls_flag
712   );
713   --
714   -- Having converted the arguments into the ben_prt_rec
715   -- plsql record structure we call the corresponding record
716   -- business process.
717   --
718   ins(l_rec, p_effective_date);
719   --
720   -- Set the OUT arguments.
721   --
722   p_poe_rt_id        	:= l_rec.poe_rt_id;
723   p_effective_start_date  	:= l_rec.effective_start_date;
724   p_effective_end_date    	:= l_rec.effective_end_date;
725   p_object_version_number 	:= l_rec.object_version_number;
726   --
727   --
728   hr_utility.set_location(' Leaving:'||l_proc, 10);
729 End ins;
730 --
731 end ben_prt_ins;