[Home] [Help]
PACKAGE BODY: APPS.PAY_PRT_INS
Source
1 Package Body pay_prt_ins as
2 /* $Header: pyprtrhi.pkb 120.1 2011/03/10 05:48:33 abdash ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' pay_prt_ins.'; -- Global package name
9 --
10 -- The following global variables are only to be used by
11 -- the set_base_key_value and pre_insert procedures.
12 --
13 g_run_type_id_i number default null;
14 --
15 -- ----------------------------------------------------------------------------
16 -- |------------------------< set_base_key_value >----------------------------|
17 -- ----------------------------------------------------------------------------
18 procedure set_base_key_value
19 (p_run_type_id in number) is
20 --
21 l_proc varchar2(72) := g_package||'set_base_key_value';
22 --
23 Begin
24 hr_utility.set_location('Entering:'||l_proc, 10);
25 --
26 pay_prt_ins.g_run_type_id_i := p_run_type_id;
27 --
28 hr_utility.set_location(' Leaving:'||l_proc, 20);
29 End set_base_key_value;
30 --
31 -- ----------------------------------------------------------------------------
32 -- |----------------------------<dt_insert_dml >-----------------------------|
33 -- ----------------------------------------------------------------------------
34 -- {Start Of Comments}
35 --
36 -- Description:
37 -- This procedure controls the actual dml insert logic for datetrack. The
38 -- functions of this procedure are as follows:
39 -- 1) Get the object_version_number.
40 -- 2) To set the effective start and end dates to the corresponding
41 -- validation start and end dates. Also, the object version number
42 -- record attribute is set.
43 -- perform dml).
44 -- 4) To insert the row into the schema with the derived effective start
45 -- and end dates and the object version number.
46 -- 5) To trap any constraint violations that may have occurred.
47 -- 6) To raise any other errors.
48 --
49 -- Prerequisites:
50 -- This is an internal private procedure which must be called from the
51 -- insert_dml and pre_update (logic permitting) procedure and must have
52 -- all mandatory arguments set.
53 --
54 -- In Parameters:
55 -- A Pl/Sql record structure.
56 --
57 -- Post Success:
58 -- The specified row will be inserted into the schema.
59 --
60 -- Post Failure:
61 -- On the insert dml failure it is important to note that we always reset the
62 -- g_api_dml status to false.
63 -- If a check or unique integrity constraint violation is raised the
64 -- constraint_error procedure will be called.
65 -- If any other error is reported, the error will be raised after the
66 -- g_api_dml status is reset.
67 --
68 -- Developer Implementation Notes:
69 -- This is an internal datetrack maintenance procedure which should
70 -- not be modified in anyway.
71 --
72 -- Access Status:
73 -- Internal Row Handler Use Only.
74 --
75 -- {End Of Comments}
76 -- ----------------------------------------------------------------------------
77 Procedure dt_insert_dml
78 (p_rec in out nocopy pay_prt_shd.g_rec_type
79 ,p_effective_date in date
80 ,p_datetrack_mode in varchar2
81 ,p_validation_start_date in date
82 ,p_validation_end_date in date
83 ) is
84 -- Cursor to select 'old' created AOL who column values
85 --
86 Cursor C_Sel1 Is
87 select t.created_by,
88 t.creation_date
89 from pay_run_types_f t
90 where t.run_type_id = p_rec.run_type_id
91 and t.effective_start_date =
92 pay_prt_shd.g_old_rec.effective_start_date
93 and t.effective_end_date = (p_validation_start_date - 1);
94 --
95 l_proc varchar2(72) := g_package||'dt_insert_dml';
96 l_created_by pay_run_types_f.created_by%TYPE;
97 l_creation_date pay_run_types_f.creation_date%TYPE;
98 l_last_update_date pay_run_types_f.last_update_date%TYPE;
99 l_last_updated_by pay_run_types_f.last_updated_by%TYPE;
100 l_last_update_login pay_run_types_f.last_update_login%TYPE;
101 --
102 Begin
103 hr_utility.set_location('Entering:'||l_proc, 5);
104 --
105 -- Get the object version number for the insert
106 --
107 p_rec.object_version_number :=
108 dt_api.get_object_version_number
109 (p_base_table_name => 'pay_run_types_f'
110 ,p_base_key_column => 'run_type_id'
111 ,p_base_key_value => p_rec.run_type_id
112 );
113 --
114 -- Set the effective start and end dates to the corresponding
115 -- validation start and end dates
116 --
117 p_rec.effective_start_date := p_validation_start_date;
118 p_rec.effective_end_date := p_validation_end_date;
119 --
120 -- If the datetrack_mode is not INSERT then we must populate the WHO
121 -- columns with the 'old' creation values and 'new' updated values.
122 --
123 If (p_datetrack_mode <> hr_api.g_insert) then
124 hr_utility.set_location(l_proc, 10);
125 --
126 -- Select the 'old' created values
127 --
128 Open C_Sel1;
129 Fetch C_Sel1 Into l_created_by, l_creation_date;
130 If C_Sel1%notfound Then
131 --
132 -- The previous 'old' created row has not been found. We need
133 -- to error as an internal datetrack problem exists.
134 --
135 Close C_Sel1;
136 fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
137 fnd_message.set_token('PROCEDURE', l_proc);
138 fnd_message.set_token('STEP','10');
139 fnd_message.raise_error;
140 End If;
141 Close C_Sel1;
142 --
143 -- Set the AOL updated WHO values
144 --
145 l_last_update_date := sysdate;
146 l_last_updated_by := fnd_global.user_id;
147 l_last_update_login := fnd_global.login_id;
148 End If;
149 --
150 -- Insert the row into: pay_run_types_f
151 --
152 insert into pay_run_types_f
153 (run_type_id
154 ,run_type_name
155 ,run_method
156 ,effective_start_date
157 ,effective_end_date
158 ,business_group_id
159 ,legislation_code
160 ,shortname
161 ,srs_flag
162 ,run_information_category
163 ,run_information1
164 ,run_information2
165 ,run_information3
166 ,run_information4
167 ,run_information5
168 ,run_information6
169 ,run_information7
170 ,run_information8
171 ,run_information9
172 ,run_information10
173 ,run_information11
174 ,run_information12
175 ,run_information13
176 ,run_information14
177 ,run_information15
178 ,run_information16
179 ,run_information17
180 ,run_information18
181 ,run_information19
182 ,run_information20
183 ,run_information21
184 ,run_information22
185 ,run_information23
186 ,run_information24
187 ,run_information25
188 ,run_information26
189 ,run_information27
190 ,run_information28
191 ,run_information29
192 ,run_information30
193 ,object_version_number
194 ,created_by
195 ,creation_date
196 ,last_update_date
197 ,last_updated_by
198 ,last_update_login
199 )
200 Values
201 (p_rec.run_type_id
202 ,p_rec.run_type_name
203 ,p_rec.run_method
204 ,p_rec.effective_start_date
205 ,p_rec.effective_end_date
206 ,p_rec.business_group_id
207 ,p_rec.legislation_code
208 ,p_rec.shortname
209 ,p_rec.srs_flag
210 ,p_rec.run_information_category
211 ,p_rec.run_information1
212 ,p_rec.run_information2
213 ,p_rec.run_information3
214 ,p_rec.run_information4
215 ,p_rec.run_information5
216 ,p_rec.run_information6
217 ,p_rec.run_information7
218 ,p_rec.run_information8
219 ,p_rec.run_information9
220 ,p_rec.run_information10
221 ,p_rec.run_information11
222 ,p_rec.run_information12
223 ,p_rec.run_information13
224 ,p_rec.run_information14
225 ,p_rec.run_information15
226 ,p_rec.run_information16
227 ,p_rec.run_information17
228 ,p_rec.run_information18
229 ,p_rec.run_information19
230 ,p_rec.run_information20
231 ,p_rec.run_information21
232 ,p_rec.run_information22
233 ,p_rec.run_information23
234 ,p_rec.run_information24
235 ,p_rec.run_information25
236 ,p_rec.run_information26
237 ,p_rec.run_information27
238 ,p_rec.run_information28
239 ,p_rec.run_information29
240 ,p_rec.run_information30
241 ,p_rec.object_version_number
242 ,l_created_by
243 ,l_creation_date
244 ,l_last_update_date
245 ,l_last_updated_by
246 ,l_last_update_login
247 );
248 --
249 hr_utility.set_location(' Leaving:'||l_proc, 15);
250 --
251 Exception
252 When hr_api.check_integrity_violated Then
253 -- A check constraint has been violated
254 --
255 pay_prt_shd.constraint_error
256 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
257 When hr_api.unique_integrity_violated Then
258 -- Unique integrity has been violated
259 --
260 pay_prt_shd.constraint_error
261 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
262 When Others Then
263 --
264 Raise;
265 End dt_insert_dml;
266 --
267 -- ----------------------------------------------------------------------------
268 -- |-----------------------< create_app_ownerships >--------------------------|
269 -- ----------------------------------------------------------------------------
270 --
271 -- Description:
272 -- This procedure inserts a row into the HR_APPLICATION_OWNERSHIPS table
273 -- when the row handler is called in the appropriate mode.
274 --
275 -- ----------------------------------------------------------------------------
276 PROCEDURE create_app_ownerships(p_pk_column IN varchar2
277 ,p_pk_value IN varchar2) IS
278 --
279 CURSOR csr_definition (p_session_id number) IS
280 SELECT product_short_name
281 FROM hr_owner_definitions
282 WHERE session_id = p_session_id;
283 --
284 l_session_id number;
285 --
286 BEGIN
287 --
288 IF (hr_startup_data_api_support.return_startup_mode IN
289 ('STARTUP','GENERIC')) THEN
290 --
291 l_session_id := nvl(hr_startup_data_api_support.g_startup_session_id
292 ,hr_startup_data_api_support.g_session_id);
293 --
294 FOR c1 IN csr_definition(l_session_id) LOOP
295 --
296 INSERT INTO hr_application_ownerships
297 (key_name
298 ,key_value
299 ,product_name
300 )
301 VALUES
302 (p_pk_column
303 ,fnd_number.number_to_canonical(p_pk_value)
304 ,c1.product_short_name
305 );
306 END LOOP;
307 END IF;
308 END create_app_ownerships;
309 --
310 -- ----------------------------------------------------------------------------
311 -- |-----------------------< create_app_ownerships >--------------------------|
312 -- ----------------------------------------------------------------------------
313 PROCEDURE create_app_ownerships(p_pk_column IN varchar2
314 ,p_pk_value IN number) IS
315 --
316 BEGIN
317 create_app_ownerships(p_pk_column, to_char(p_pk_value));
318 END create_app_ownerships;
319 --
320 -- ----------------------------------------------------------------------------
321 -- |------------------------------< insert_dml >------------------------------|
322 -- ----------------------------------------------------------------------------
323 Procedure insert_dml
324 (p_rec in out nocopy pay_prt_shd.g_rec_type
325 ,p_effective_date in date
326 ,p_datetrack_mode in varchar2
327 ,p_validation_start_date in date
328 ,p_validation_end_date in date
329 ) is
330 --
331 l_proc varchar2(72) := g_package||'insert_dml';
332 --
333 Begin
334 hr_utility.set_location('Entering:'||l_proc, 5);
335 --
336 pay_prt_ins.dt_insert_dml
337 (p_rec => p_rec
338 ,p_effective_date => p_effective_date
339 ,p_datetrack_mode => p_datetrack_mode
340 ,p_validation_start_date => p_validation_start_date
341 ,p_validation_end_date => p_validation_end_date
342 );
343 --
344 hr_utility.set_location(' Leaving:'||l_proc, 10);
345 End insert_dml;
346 --
347 -- ----------------------------------------------------------------------------
348 -- |------------------------------< pre_insert >------------------------------|
349 -- ----------------------------------------------------------------------------
350 -- {Start Of Comments}
351 --
352 -- Description:
353 -- This private procedure contains any processing which is required before
354 -- the insert dml. Presently, if the entity has a corresponding primary
355 -- key which is maintained by an associating sequence, the primary key for
356 -- the entity will be populated with the next sequence value in
357 -- preparation for the insert dml.
358 -- Also, if comments are defined for this entity, the comments insert
359 -- logic will also be called, generating a comment_id if required.
360 --
361 -- Prerequisites:
362 -- This is an internal procedure which is called from the ins procedure.
363 --
364 -- In Parameters:
365 -- A Pl/Sql record structure.
366 --
367 -- Post Success:
368 -- Processing continues.
369 --
370 -- Post Failure:
371 -- If an error has occurred, an error message and exception will be raised
372 -- but not handled.
373 --
374 -- Developer Implementation Notes:
375 -- Any pre-processing required before the insert dml is issued should be
376 -- coded within this procedure. As stated above, a good example is the
377 -- generation of a primary key number via a corresponding sequence.
378 -- It is important to note that any 3rd party maintenance should be reviewed
379 -- before placing in this procedure.
380 --
381 -- Access Status:
382 -- Internal Row Handler Use Only.
383 --
384 -- {End Of Comments}
385 -- ----------------------------------------------------------------------------
386 Procedure pre_insert
387 (p_rec in out nocopy pay_prt_shd.g_rec_type
388 ,p_effective_date in date
389 ,p_datetrack_mode in varchar2
390 ,p_validation_start_date in date
391 ,p_validation_end_date in date
392 ) is
393 --
394 Cursor C_Sel1 is select pay_run_types_s.nextval from sys.dual;
395 --
396 Cursor C_Sel2 is
397 Select null
398 from pay_run_types_f
399 where run_type_id =
400 pay_prt_ins.g_run_type_id_i;
401 --
402 l_proc varchar2(72) := g_package||'pre_insert';
403 l_exists varchar2(1);
404 Begin
405 hr_utility.set_location('Entering:'||l_proc, 5);
406 --
407 If (pay_prt_ins.g_run_type_id_i is not null) Then
408 --
409 -- Verify registered primary key values not already in use
410 --
411 Open C_Sel2;
412 Fetch C_Sel2 into l_exists;
413 If C_Sel2%found Then
414 Close C_Sel2;
415 --
416 -- The primary key values are already in use.
417 --
418 fnd_message.set_name('PER','PER_289391_KEY_ALREADY_USED');
419 fnd_message.set_token('TABLE_NAME','pay_run_types_f');
420 fnd_message.raise_error;
421 End If;
422 Close C_Sel2;
423 --
424 -- Use registered key values and clear globals
425 --
426 p_rec.run_type_id :=
427 pay_prt_ins.g_run_type_id_i;
428 pay_prt_ins.g_run_type_id_i := null;
429 Else
430 --
431 -- No registerd key values, so select the next sequence number
432 --
433 -- Select the next sequence number
434 --
435 Open C_Sel1;
436 Fetch C_Sel1 Into p_rec.run_type_id;
437 Close C_Sel1;
438 --
439 end if;
440 --
441 hr_utility.set_location(' Leaving:'||l_proc, 10);
442 End pre_insert;
443 --
444 -- ----------------------------------------------------------------------------
445 -- |----------------------------< post_insert >-------------------------------|
446 -- ----------------------------------------------------------------------------
447 -- {Start Of Comments}
448 --
449 -- Description:
450 -- This private procedure contains any processing which is required after the
451 -- insert dml.
452 --
453 -- Prerequisites:
454 -- This is an internal procedure which is called from the ins procedure.
455 --
456 -- In Parameters:
457 -- A Pl/Sql record structure.
458 --
459 -- Post Success:
460 -- Processing continues.
461 --
462 -- Post Failure:
463 -- If an error has occurred, an error message and exception will be raised
464 -- but not handled.
465 --
466 -- Developer Implementation Notes:
467 -- Any post-processing required after the insert dml is issued should be
468 -- coded within this procedure. It is important to note that any 3rd party
469 -- maintenance should be reviewed before placing in this procedure.
470 --
471 -- Access Status:
472 -- Internal Row Handler Use Only.
473 --
474 -- {End Of Comments}
475 -- ----------------------------------------------------------------------------
476 Procedure post_insert
477 (p_rec in pay_prt_shd.g_rec_type
478 ,p_effective_date in date
479 ,p_datetrack_mode in varchar2
480 ,p_validation_start_date in date
481 ,p_validation_end_date in date
482 ) is
483 --
484 l_proc varchar2(72) := g_package||'post_insert';
485 --
486 Begin
487 hr_utility.set_location('Entering:'||l_proc, 5);
488 begin
489 --
490 -- RET added call to create_app_ownerships
491 --
492 -- insert ownerships if applicable
493 --
494 create_app_ownerships('RUN_TYPE_ID', p_rec.run_type_id);
495 --
496 pay_prt_rki.after_insert
497 (p_effective_date
498 => p_effective_date
499 ,p_validation_start_date
500 => p_validation_start_date
501 ,p_validation_end_date
502 => p_validation_end_date
503 ,p_run_type_id
504 => p_rec.run_type_id
505 ,p_run_type_name
506 => p_rec.run_type_name
507 ,p_run_method
508 => p_rec.run_method
509 ,p_effective_start_date
510 => p_rec.effective_start_date
511 ,p_effective_end_date
512 => p_rec.effective_end_date
513 ,p_business_group_id
514 => p_rec.business_group_id
515 ,p_legislation_code
516 => p_rec.legislation_code
517 ,p_shortname
518 => p_rec.shortname
519 ,p_srs_flag
520 => p_rec.srs_flag
521 ,p_run_information_category
522 => p_rec.run_information_category
523 ,p_run_information1
524 => p_rec.run_information1
525 ,p_run_information2
526 => p_rec.run_information2
527 ,p_run_information3
528 => p_rec.run_information3
529 ,p_run_information4
530 => p_rec.run_information4
531 ,p_run_information5
532 => p_rec.run_information5
533 ,p_run_information6
534 => p_rec.run_information6
535 ,p_run_information7
536 => p_rec.run_information7
537 ,p_run_information8
538 => p_rec.run_information8
539 ,p_run_information9
540 => p_rec.run_information9
541 ,p_run_information10
542 => p_rec.run_information10
543 ,p_run_information11
544 => p_rec.run_information11
545 ,p_run_information12
546 => p_rec.run_information12
547 ,p_run_information13
548 => p_rec.run_information13
549 ,p_run_information14
550 => p_rec.run_information14
551 ,p_run_information15
552 => p_rec.run_information15
553 ,p_run_information16
554 => p_rec.run_information16
555 ,p_run_information17
556 => p_rec.run_information17
557 ,p_run_information18
558 => p_rec.run_information18
559 ,p_run_information19
560 => p_rec.run_information19
561 ,p_run_information20
562 => p_rec.run_information20
563 ,p_run_information21
564 => p_rec.run_information21
565 ,p_run_information22
566 => p_rec.run_information22
567 ,p_run_information23
568 => p_rec.run_information23
569 ,p_run_information24
570 => p_rec.run_information24
571 ,p_run_information25
572 => p_rec.run_information25
573 ,p_run_information26
574 => p_rec.run_information26
575 ,p_run_information27
576 => p_rec.run_information27
577 ,p_run_information28
578 => p_rec.run_information28
579 ,p_run_information29
580 => p_rec.run_information29
581 ,p_run_information30
582 => p_rec.run_information30
583 ,p_object_version_number
584 => p_rec.object_version_number
585 );
586 --
587 exception
588 --
589 when hr_api.cannot_find_prog_unit then
590 --
591 hr_api.cannot_find_prog_unit_error
592 (p_module_name => 'PAY_RUN_TYPES_F'
593 ,p_hook_type => 'AI');
594 --
595 end;
596 --
597 hr_utility.set_location(' Leaving:'||l_proc, 10);
598 End post_insert;
599 --
600 -- ----------------------------------------------------------------------------
601 -- |-------------------------------< ins_lck >--------------------------------|
602 -- ----------------------------------------------------------------------------
603 -- {Start Of Comments}
604 --
605 -- Description:
606 -- The ins_lck process has one main function to perform. When inserting
607 -- a datetracked row, we must validate the DT mode.
608 --
609 -- Prerequisites:
610 -- This procedure can only be called for the datetrack mode of INSERT.
611 --
612 -- In Parameters:
613 --
614 -- Post Success:
615 -- On successful completion of the ins_lck process the parental
616 -- datetracked rows will be locked providing the p_enforce_foreign_locking
617 -- argument value is TRUE.
618 -- If the p_enforce_foreign_locking argument value is FALSE then the
619 -- parential rows are not locked.
620 --
621 -- Post Failure:
622 -- The Lck process can fail for:
623 -- 1) When attempting to lock the row the row could already be locked by
624 -- another user. This will raise the HR_Api.Object_Locked exception.
625 -- 2) When attempting to the lock the parent which doesn't exist.
626 -- For the entity to be locked the parent must exist!
627 --
628 -- Developer Implementation Notes:
629 -- None.
630 --
631 -- Access Status:
632 -- Internal Row Handler Use Only.
633 --
634 -- {End Of Comments}
635 -- ----------------------------------------------------------------------------
636 Procedure ins_lck
637 (p_effective_date in date
638 ,p_datetrack_mode in varchar2
639 ,p_rec in pay_prt_shd.g_rec_type
640 ,p_validation_start_date out nocopy date
641 ,p_validation_end_date out nocopy date
642 ) is
643 --
644 l_proc varchar2(72) := g_package||'ins_lck';
645 l_validation_start_date date;
646 l_validation_end_date date;
647 --
648 Begin
649 hr_utility.set_location('Entering:'||l_proc, 5);
650 --
651 -- Validate the datetrack mode mode getting the validation start
652 -- and end dates for the specified datetrack operation.
653 --
654 dt_api.validate_dt_mode
655 (p_effective_date => p_effective_date
656 ,p_datetrack_mode => p_datetrack_mode
657 ,p_base_table_name => 'pay_run_types_f'
658 ,p_base_key_column => 'run_type_id'
659 ,p_base_key_value => p_rec.run_type_id
660 ,p_enforce_foreign_locking => true
661 ,p_validation_start_date => l_validation_start_date
662 ,p_validation_end_date => l_validation_end_date
663 );
664 --
665 -- Set the validation start and end date OUT arguments
666 --
667 p_validation_start_date := l_validation_start_date;
668 p_validation_end_date := l_validation_end_date;
669 --
670 hr_utility.set_location(' Leaving:'||l_proc, 10);
671 --
672 End ins_lck;
673 --
674 -- ----------------------------------------------------------------------------
675 -- |---------------------------------< ins >----------------------------------|
676 -- ----------------------------------------------------------------------------
677 Procedure ins
678 (p_effective_date in date
679 ,p_rec in out nocopy pay_prt_shd.g_rec_type
680 ) is
681 --
682 l_proc varchar2(72) := g_package||'ins';
683 l_datetrack_mode varchar2(30) := hr_api.g_insert;
684 l_validation_start_date date;
685 l_validation_end_date date;
686 --
687 Begin
688 hr_utility.set_location('Entering:'||l_proc, 5);
689 --
690 -- Call the lock operation
691 --
692 pay_prt_ins.ins_lck
693 (p_effective_date => p_effective_date
694 ,p_datetrack_mode => l_datetrack_mode
695 ,p_rec => p_rec
696 ,p_validation_start_date => l_validation_start_date
697 ,p_validation_end_date => l_validation_end_date
698 );
699 --
700 -- Call the supporting insert validate operations
701 --
702 pay_prt_bus.insert_validate
703 (p_rec => p_rec
704 ,p_effective_date => p_effective_date
705 ,p_datetrack_mode => l_datetrack_mode
706 ,p_validation_start_date => l_validation_start_date
707 ,p_validation_end_date => l_validation_end_date
708 );
709 --
710 -- Call the supporting pre-insert operation
711 --
712 pay_prt_ins.pre_insert
713 (p_rec => p_rec
714 ,p_effective_date => p_effective_date
715 ,p_datetrack_mode => l_datetrack_mode
716 ,p_validation_start_date => l_validation_start_date
717 ,p_validation_end_date => l_validation_end_date
718 );
719 --
720 -- Insert the row
721 --
722 pay_prt_ins.insert_dml
723 (p_rec => p_rec
724 ,p_effective_date => p_effective_date
725 ,p_datetrack_mode => l_datetrack_mode
726 ,p_validation_start_date => l_validation_start_date
727 ,p_validation_end_date => l_validation_end_date
728 );
729 --
730 -- Call the supporting post-insert operation
731 --
732 pay_prt_ins.post_insert
733 (p_rec => p_rec
734 ,p_effective_date => p_effective_date
735 ,p_datetrack_mode => l_datetrack_mode
736 ,p_validation_start_date => l_validation_start_date
737 ,p_validation_end_date => l_validation_end_date
738 );
739 --
740 hr_utility.set_location('Leaving:'||l_proc,10);
741 end ins;
742 --
743 -- ----------------------------------------------------------------------------
744 -- |---------------------------------< ins >----------------------------------|
745 -- ----------------------------------------------------------------------------
746 Procedure ins
747 (p_effective_date in date
748 ,p_run_type_name in varchar2
749 ,p_run_method in varchar2
750 ,p_business_group_id in number default null
751 ,p_legislation_code in varchar2 default null
752 ,p_shortname in varchar2 default null
753 ,p_srs_flag in varchar2 default null
754 ,p_run_information_category in varchar2 default null
755 ,p_run_information1 in varchar2 default null
756 ,p_run_information2 in varchar2 default null
757 ,p_run_information3 in varchar2 default null
758 ,p_run_information4 in varchar2 default null
759 ,p_run_information5 in varchar2 default null
760 ,p_run_information6 in varchar2 default null
761 ,p_run_information7 in varchar2 default null
762 ,p_run_information8 in varchar2 default null
763 ,p_run_information9 in varchar2 default null
764 ,p_run_information10 in varchar2 default null
765 ,p_run_information11 in varchar2 default null
766 ,p_run_information12 in varchar2 default null
767 ,p_run_information13 in varchar2 default null
768 ,p_run_information14 in varchar2 default null
769 ,p_run_information15 in varchar2 default null
770 ,p_run_information16 in varchar2 default null
771 ,p_run_information17 in varchar2 default null
772 ,p_run_information18 in varchar2 default null
773 ,p_run_information19 in varchar2 default null
774 ,p_run_information20 in varchar2 default null
775 ,p_run_information21 in varchar2 default null
776 ,p_run_information22 in varchar2 default null
777 ,p_run_information23 in varchar2 default null
778 ,p_run_information24 in varchar2 default null
779 ,p_run_information25 in varchar2 default null
780 ,p_run_information26 in varchar2 default null
781 ,p_run_information27 in varchar2 default null
782 ,p_run_information28 in varchar2 default null
783 ,p_run_information29 in varchar2 default null
784 ,p_run_information30 in varchar2 default null
785 ,p_run_type_id out nocopy number
786 ,p_object_version_number out nocopy number
787 ,p_effective_start_date out nocopy date
788 ,p_effective_end_date out nocopy date
789 ) is
790 --
791 l_rec pay_prt_shd.g_rec_type;
792 l_proc varchar2(72) := g_package||'ins';
793 --
794 Begin
795 hr_utility.set_location('Entering:'||l_proc, 5);
796 --
797 -- Call conversion function to turn arguments into the
798 -- p_rec structure.
799 --
800 l_rec :=
801 pay_prt_shd.convert_args
802 (null
803 ,p_run_type_name
804 ,p_run_method
805 ,null
806 ,null
807 ,p_business_group_id
808 ,p_legislation_code
809 ,p_shortname
810 ,p_srs_flag
811 ,p_run_information_category
812 ,p_run_information1
813 ,p_run_information2
814 ,p_run_information3
815 ,p_run_information4
816 ,p_run_information5
817 ,p_run_information6
818 ,p_run_information7
819 ,p_run_information8
820 ,p_run_information9
821 ,p_run_information10
822 ,p_run_information11
823 ,p_run_information12
824 ,p_run_information13
825 ,p_run_information14
826 ,p_run_information15
827 ,p_run_information16
828 ,p_run_information17
829 ,p_run_information18
830 ,p_run_information19
831 ,p_run_information20
832 ,p_run_information21
833 ,p_run_information22
834 ,p_run_information23
835 ,p_run_information24
836 ,p_run_information25
837 ,p_run_information26
838 ,p_run_information27
839 ,p_run_information28
840 ,p_run_information29
841 ,p_run_information30
842 ,null
843 );
844 --
845 -- Having converted the arguments into the pay_prt_rec
846 -- plsql record structure we call the corresponding record
847 -- business process.
848 --
849 pay_prt_ins.ins
850 (p_effective_date
851 ,l_rec
852 );
853 --
854 -- Set the OUT arguments.
855 --
856 p_run_type_id := l_rec.run_type_id;
857 p_effective_start_date := l_rec.effective_start_date;
858 p_effective_end_date := l_rec.effective_end_date;
859 p_object_version_number := l_rec.object_version_number;
860 --
861 --
862 hr_utility.set_location(' Leaving:'||l_proc, 10);
863 End ins;
864 --
865 end pay_prt_ins;