DBA Data[Home] [Help]

PACKAGE BODY: APPS.BEN_SHR_INS

Source


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