[Home] [Help]
PACKAGE BODY: APPS.PAY_BTL_INS
Source
1 Package Body pay_btl_ins as
2 /* $Header: pybtlrhi.pkb 120.7 2005/11/09 08:16:09 mkataria noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' pay_btl_ins.'; -- Global package name
9 --
10 -- ----------------------------------------------------------------------------
11 -- |------------------------------< insert_dml >------------------------------|
12 -- ----------------------------------------------------------------------------
13 -- {Start Of Comments}
14 --
15 -- Description:
16 -- This procedure controls the actual dml insert logic. The processing of
17 -- this procedure are as follows:
18 -- 1) Initialise the object_version_number to 1 if the object_version_number
19 -- is defined as an attribute for this entity.
20 -- 2) To set and unset the g_api_dml status as required (as we are about to
21 -- perform dml).
22 -- 3) To insert the row into the schema.
23 -- 4) To trap any constraint violations that may have occurred.
24 -- 5) To raise any other errors.
25 --
26 -- Prerequisites:
27 -- This is an internal private procedure which must be called from the ins
28 -- procedure and must have all mandatory attributes set (except the
29 -- object_version_number which is initialised within this procedure).
30 --
31 -- In Parameters:
32 -- A Pl/Sql record structre.
33 --
34 -- Post Success:
35 -- The specified row will be inserted into the schema.
36 --
37 -- Post Failure:
38 -- On the insert dml failure it is important to note that we always reset the
39 -- g_api_dml status to false.
40 -- If a check, unique or parent integrity constraint violation is raised the
41 -- constraint_error procedure will be called.
42 -- If any other error is reported, the error will be raised after the
43 -- g_api_dml status is reset.
44 --
45 -- Developer Implementation Notes:
46 -- None.
47 --
48 -- Access Status:
49 -- Internal Row Handler Use Only.
50 --
51 -- {End Of Comments}
52 -- ----------------------------------------------------------------------------
53 Procedure insert_dml
54 (p_rec in out nocopy pay_btl_shd.g_rec_type
55 ) is
56 --
57 l_proc varchar2(72) := g_package||'insert_dml';
58 --
59 Begin
60 hr_utility.set_location('Entering:'||l_proc, 5);
61 p_rec.object_version_number := 1; -- Initialise the object version
62 --
63 pay_btl_shd.g_api_dml := true; -- Set the api dml status
64 --
65 -- Insert the row into: pay_batch_lines
66 --
67 insert into pay_batch_lines
68 (batch_line_id
69 ,cost_allocation_keyflex_id
70 ,element_type_id
71 ,assignment_id
72 ,batch_id
73 ,batch_line_status
74 ,assignment_number
75 ,batch_sequence
76 ,concatenated_segments
77 ,effective_date
78 ,element_name
79 ,entry_type
80 ,reason
81 ,segment1
82 ,segment2
83 ,segment3
84 ,segment4
85 ,segment5
86 ,segment6
87 ,segment7
88 ,segment8
89 ,segment9
90 ,segment10
91 ,segment11
92 ,segment12
93 ,segment13
94 ,segment14
95 ,segment15
96 ,segment16
97 ,segment17
98 ,segment18
99 ,segment19
100 ,segment20
101 ,segment21
102 ,segment22
103 ,segment23
104 ,segment24
105 ,segment25
106 ,segment26
107 ,segment27
108 ,segment28
109 ,segment29
110 ,segment30
111 ,value_1
112 ,value_2
113 ,value_3
114 ,value_4
115 ,value_5
116 ,value_6
117 ,value_7
118 ,value_8
119 ,value_9
120 ,value_10
121 ,value_11
122 ,value_12
123 ,value_13
124 ,value_14
125 ,value_15
126 ,attribute_category
127 ,attribute1
128 ,attribute2
129 ,attribute3
130 ,attribute4
131 ,attribute5
132 ,attribute6
133 ,attribute7
134 ,attribute8
135 ,attribute9
136 ,attribute10
137 ,attribute11
138 ,attribute12
139 ,attribute13
140 ,attribute14
141 ,attribute15
142 ,attribute16
143 ,attribute17
144 ,attribute18
145 ,attribute19
146 ,attribute20
147 ,entry_information_category
148 ,entry_information1
149 ,entry_information2
150 ,entry_information3
151 ,entry_information4
152 ,entry_information5
153 ,entry_information6
154 ,entry_information7
155 ,entry_information8
156 ,entry_information9
157 ,entry_information10
158 ,entry_information11
159 ,entry_information12
160 ,entry_information13
161 ,entry_information14
162 ,entry_information15
163 ,entry_information16
164 ,entry_information17
165 ,entry_information18
166 ,entry_information19
167 ,entry_information20
168 ,entry_information21
169 ,entry_information22
170 ,entry_information23
171 ,entry_information24
172 ,entry_information25
173 ,entry_information26
174 ,entry_information27
175 ,entry_information28
176 ,entry_information29
177 ,entry_information30
178 ,date_earned
179 ,personal_payment_method_id
180 ,subpriority
181 ,effective_start_date
182 ,effective_end_date
183 ,object_version_number
184 )
185 Values
186 (p_rec.batch_line_id
187 ,p_rec.cost_allocation_keyflex_id
188 ,p_rec.element_type_id
189 ,p_rec.assignment_id
190 ,p_rec.batch_id
191 ,p_rec.batch_line_status
192 ,p_rec.assignment_number
193 ,p_rec.batch_sequence
194 ,p_rec.concatenated_segments
195 ,p_rec.effective_date
196 ,p_rec.element_name
197 ,p_rec.entry_type
198 ,p_rec.reason
199 ,p_rec.segment1
200 ,p_rec.segment2
201 ,p_rec.segment3
202 ,p_rec.segment4
203 ,p_rec.segment5
204 ,p_rec.segment6
205 ,p_rec.segment7
206 ,p_rec.segment8
207 ,p_rec.segment9
208 ,p_rec.segment10
209 ,p_rec.segment11
210 ,p_rec.segment12
211 ,p_rec.segment13
212 ,p_rec.segment14
213 ,p_rec.segment15
214 ,p_rec.segment16
215 ,p_rec.segment17
216 ,p_rec.segment18
217 ,p_rec.segment19
218 ,p_rec.segment20
219 ,p_rec.segment21
220 ,p_rec.segment22
221 ,p_rec.segment23
222 ,p_rec.segment24
223 ,p_rec.segment25
224 ,p_rec.segment26
225 ,p_rec.segment27
226 ,p_rec.segment28
227 ,p_rec.segment29
228 ,p_rec.segment30
229 ,p_rec.value_1
230 ,p_rec.value_2
231 ,p_rec.value_3
232 ,p_rec.value_4
233 ,p_rec.value_5
234 ,p_rec.value_6
235 ,p_rec.value_7
236 ,p_rec.value_8
237 ,p_rec.value_9
238 ,p_rec.value_10
239 ,p_rec.value_11
240 ,p_rec.value_12
241 ,p_rec.value_13
242 ,p_rec.value_14
243 ,p_rec.value_15
244 ,p_rec.attribute_category
245 ,p_rec.attribute1
246 ,p_rec.attribute2
247 ,p_rec.attribute3
248 ,p_rec.attribute4
249 ,p_rec.attribute5
250 ,p_rec.attribute6
251 ,p_rec.attribute7
252 ,p_rec.attribute8
253 ,p_rec.attribute9
254 ,p_rec.attribute10
255 ,p_rec.attribute11
256 ,p_rec.attribute12
257 ,p_rec.attribute13
258 ,p_rec.attribute14
259 ,p_rec.attribute15
260 ,p_rec.attribute16
261 ,p_rec.attribute17
262 ,p_rec.attribute18
263 ,p_rec.attribute19
264 ,p_rec.attribute20
265 ,p_rec.entry_information_category
266 ,p_rec.entry_information1
267 ,p_rec.entry_information2
268 ,p_rec.entry_information3
269 ,p_rec.entry_information4
270 ,p_rec.entry_information5
271 ,p_rec.entry_information6
272 ,p_rec.entry_information7
273 ,p_rec.entry_information8
274 ,p_rec.entry_information9
275 ,p_rec.entry_information10
276 ,p_rec.entry_information11
277 ,p_rec.entry_information12
278 ,p_rec.entry_information13
279 ,p_rec.entry_information14
280 ,p_rec.entry_information15
281 ,p_rec.entry_information16
282 ,p_rec.entry_information17
283 ,p_rec.entry_information18
284 ,p_rec.entry_information19
285 ,p_rec.entry_information20
286 ,p_rec.entry_information21
287 ,p_rec.entry_information22
288 ,p_rec.entry_information23
289 ,p_rec.entry_information24
290 ,p_rec.entry_information25
291 ,p_rec.entry_information26
292 ,p_rec.entry_information27
293 ,p_rec.entry_information28
294 ,p_rec.entry_information29
295 ,p_rec.entry_information30
296 ,p_rec.date_earned
297 ,p_rec.personal_payment_method_id
298 ,p_rec.subpriority
299 ,p_rec.effective_start_date
300 ,p_rec.effective_end_date
301 ,p_rec.object_version_number
302 );
303 --
304 pay_btl_shd.g_api_dml := false; -- Unset the api dml status
305 --
306 hr_utility.set_location(' Leaving:'||l_proc, 10);
307 Exception
308 When hr_api.check_integrity_violated Then
309 -- A check constraint has been violated
310 pay_btl_shd.g_api_dml := false; -- Unset the api dml status
311 pay_btl_shd.constraint_error
312 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
313 When hr_api.parent_integrity_violated Then
314 -- Parent integrity has been violated
315 pay_btl_shd.g_api_dml := false; -- Unset the api dml status
316 pay_btl_shd.constraint_error
317 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
318 When hr_api.unique_integrity_violated Then
319 -- Unique integrity has been violated
320 pay_btl_shd.g_api_dml := false; -- Unset the api dml status
321 pay_btl_shd.constraint_error
322 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
323 When Others Then
324 pay_btl_shd.g_api_dml := false; -- Unset the api dml status
325 Raise;
326 End insert_dml;
327 --
328 -- ----------------------------------------------------------------------------
329 -- |------------------------------< pre_insert >------------------------------|
330 -- ----------------------------------------------------------------------------
331 -- {Start Of Comments}
332 --
333 -- Description:
334 -- This private procedure contains any processing which is required before
335 -- the insert dml. Presently, if the entity has a corresponding primary
336 -- key which is maintained by an associating sequence, the primary key for
337 -- the entity will be populated with the next sequence value in
338 -- preparation for the insert dml.
339 --
340 -- Prerequisites:
341 -- This is an internal procedure which is called from the ins procedure.
342 --
343 -- In Parameters:
344 -- A Pl/Sql record structre.
345 --
346 -- Post Success:
347 -- Processing continues.
348 --
349 -- Post Failure:
350 -- If an error has occurred, an error message and exception will be raised
351 -- but not handled.
352 --
353 -- Developer Implementation Notes:
354 -- Any pre-processing required before the insert dml is issued should be
355 -- coded within this procedure. As stated above, a good example is the
356 -- generation of a primary key number via a corresponding sequence.
357 -- It is important to note that any 3rd party maintenance should be reviewed
358 -- before placing in this procedure.
359 --
360 -- Access Status:
361 -- Internal Row Handler Use Only.
362 --
363 -- {End Of Comments}
364 -- ----------------------------------------------------------------------------
365 Procedure pre_insert
366 (p_rec in out nocopy pay_btl_shd.g_rec_type
367 ) is
368 --
369 l_proc varchar2(72) := g_package||'pre_insert';
370 --
371 Cursor C_Sel1 is select pay_batch_lines_s.nextval from sys.dual;
372 --
373 Begin
374 hr_utility.set_location('Entering:'||l_proc, 5);
375 --
376 --
377 -- Select the next sequence number
378 --
379 Open C_Sel1;
380 Fetch C_Sel1 Into p_rec.batch_line_id;
381 Close C_Sel1;
382 --
383 hr_utility.set_location(' Leaving:'||l_proc, 10);
384 End pre_insert;
385 --
386 -- ----------------------------------------------------------------------------
387 -- |-----------------------------< post_insert >------------------------------|
388 -- ----------------------------------------------------------------------------
389 -- {Start Of Comments}
390 --
391 -- Description:
392 -- This private procedure contains any processing which is required after the
393 -- insert dml.
394 --
395 -- Prerequisites:
396 -- This is an internal procedure which is called from the ins procedure.
397 --
398 -- In Parameters:
399 -- A Pl/Sql record structre.
400 --
401 -- Post Success:
402 -- Processing continues.
403 --
404 -- Post Failure:
405 -- If an error has occurred, an error message and exception will be raised
406 -- but not handled.
407 --
408 -- Developer Implementation Notes:
409 -- Any post-processing required after the insert dml is issued should be
410 -- coded within this procedure. It is important to note that any 3rd party
411 -- maintenance should be reviewed before placing in this procedure.
412 --
413 -- Access Status:
414 -- Internal Row Handler Use Only.
415 --
416 -- {End Of Comments}
417 -- ----------------------------------------------------------------------------
418 Procedure post_insert
419 (p_session_date in date
420 ,p_rec in pay_btl_shd.g_rec_type
421 ) is
422 --
423 l_proc varchar2(72) := g_package||'post_insert';
424 --
425 Begin
426 hr_utility.set_location('Entering:'||l_proc, 5);
427 begin
428 --
429 pay_btl_rki.after_insert
430 (p_session_date
431 => p_session_date
432 ,p_batch_line_id
433 => p_rec.batch_line_id
434 ,p_cost_allocation_keyflex_id
435 => p_rec.cost_allocation_keyflex_id
436 ,p_element_type_id
437 => p_rec.element_type_id
438 ,p_assignment_id
439 => p_rec.assignment_id
440 ,p_batch_id
441 => p_rec.batch_id
442 ,p_batch_line_status
443 => p_rec.batch_line_status
444 ,p_assignment_number
445 => p_rec.assignment_number
446 ,p_batch_sequence
447 => p_rec.batch_sequence
448 ,p_concatenated_segments
449 => p_rec.concatenated_segments
450 ,p_effective_date
451 => p_rec.effective_date
452 ,p_element_name
453 => p_rec.element_name
454 ,p_entry_type
455 => p_rec.entry_type
456 ,p_reason
457 => p_rec.reason
458 ,p_segment1
459 => p_rec.segment1
460 ,p_segment2
461 => p_rec.segment2
462 ,p_segment3
463 => p_rec.segment3
464 ,p_segment4
465 => p_rec.segment4
466 ,p_segment5
467 => p_rec.segment5
468 ,p_segment6
469 => p_rec.segment6
470 ,p_segment7
471 => p_rec.segment7
472 ,p_segment8
473 => p_rec.segment8
474 ,p_segment9
475 => p_rec.segment9
476 ,p_segment10
477 => p_rec.segment10
478 ,p_segment11
479 => p_rec.segment11
480 ,p_segment12
481 => p_rec.segment12
482 ,p_segment13
483 => p_rec.segment13
484 ,p_segment14
485 => p_rec.segment14
486 ,p_segment15
487 => p_rec.segment15
488 ,p_segment16
489 => p_rec.segment16
490 ,p_segment17
491 => p_rec.segment17
492 ,p_segment18
493 => p_rec.segment18
494 ,p_segment19
495 => p_rec.segment19
496 ,p_segment20
497 => p_rec.segment20
498 ,p_segment21
499 => p_rec.segment21
500 ,p_segment22
501 => p_rec.segment22
502 ,p_segment23
503 => p_rec.segment23
504 ,p_segment24
505 => p_rec.segment24
506 ,p_segment25
507 => p_rec.segment25
508 ,p_segment26
509 => p_rec.segment26
510 ,p_segment27
511 => p_rec.segment27
512 ,p_segment28
513 => p_rec.segment28
514 ,p_segment29
515 => p_rec.segment29
516 ,p_segment30
517 => p_rec.segment30
518 ,p_value_1
519 => p_rec.value_1
520 ,p_value_2
521 => p_rec.value_2
522 ,p_value_3
523 => p_rec.value_3
524 ,p_value_4
525 => p_rec.value_4
526 ,p_value_5
527 => p_rec.value_5
528 ,p_value_6
529 => p_rec.value_6
530 ,p_value_7
531 => p_rec.value_7
532 ,p_value_8
533 => p_rec.value_8
534 ,p_value_9
535 => p_rec.value_9
536 ,p_value_10
537 => p_rec.value_10
538 ,p_value_11
539 => p_rec.value_11
540 ,p_value_12
541 => p_rec.value_12
542 ,p_value_13
543 => p_rec.value_13
544 ,p_value_14
545 => p_rec.value_14
546 ,p_value_15
547 => p_rec.value_15
548 ,p_attribute_category
549 => p_rec.attribute_category
550 ,p_attribute1
551 => p_rec.attribute1
552 ,p_attribute2
553 => p_rec.attribute2
554 ,p_attribute3
555 => p_rec.attribute3
556 ,p_attribute4
557 => p_rec.attribute4
558 ,p_attribute5
559 => p_rec.attribute5
560 ,p_attribute6
561 => p_rec.attribute6
562 ,p_attribute7
563 => p_rec.attribute7
564 ,p_attribute8
565 => p_rec.attribute8
566 ,p_attribute9
567 => p_rec.attribute9
568 ,p_attribute10
569 => p_rec.attribute10
570 ,p_attribute11
571 => p_rec.attribute11
572 ,p_attribute12
573 => p_rec.attribute12
574 ,p_attribute13
575 => p_rec.attribute13
576 ,p_attribute14
577 => p_rec.attribute14
578 ,p_attribute15
579 => p_rec.attribute15
580 ,p_attribute16
581 => p_rec.attribute16
582 ,p_attribute17
583 => p_rec.attribute17
584 ,p_attribute18
585 => p_rec.attribute18
586 ,p_attribute19
587 => p_rec.attribute19
588 ,p_attribute20
589 => p_rec.attribute20
590 ,p_entry_information_category
591 => p_rec.entry_information_category
592 ,p_entry_information1
593 => p_rec.entry_information1
594 ,p_entry_information2
595 => p_rec.entry_information2
596 ,p_entry_information3
597 => p_rec.entry_information3
598 ,p_entry_information4
599 => p_rec.entry_information4
600 ,p_entry_information5
601 => p_rec.entry_information5
602 ,p_entry_information6
603 => p_rec.entry_information6
604 ,p_entry_information7
605 => p_rec.entry_information7
606 ,p_entry_information8
607 => p_rec.entry_information8
608 ,p_entry_information9
609 => p_rec.entry_information9
610 ,p_entry_information10
611 => p_rec.entry_information10
612 ,p_entry_information11
613 => p_rec.entry_information11
614 ,p_entry_information12
615 => p_rec.entry_information12
616 ,p_entry_information13
617 => p_rec.entry_information13
618 ,p_entry_information14
619 => p_rec.entry_information14
620 ,p_entry_information15
621 => p_rec.entry_information15
622 ,p_entry_information16
623 => p_rec.entry_information16
624 ,p_entry_information17
625 => p_rec.entry_information17
626 ,p_entry_information18
627 => p_rec.entry_information18
628 ,p_entry_information19
629 => p_rec.entry_information19
630 ,p_entry_information20
631 => p_rec.entry_information20
632 ,p_entry_information21
633 => p_rec.entry_information21
634 ,p_entry_information22
635 => p_rec.entry_information22
636 ,p_entry_information23
637 => p_rec.entry_information23
638 ,p_entry_information24
639 => p_rec.entry_information24
640 ,p_entry_information25
641 => p_rec.entry_information25
642 ,p_entry_information26
643 => p_rec.entry_information26
644 ,p_entry_information27
645 => p_rec.entry_information27
646 ,p_entry_information28
647 => p_rec.entry_information28
648 ,p_entry_information29
649 => p_rec.entry_information29
650 ,p_entry_information30
651 => p_rec.entry_information30
652 ,p_date_earned
653 => p_rec.date_earned
654 ,p_personal_payment_method_id
655 => p_rec.personal_payment_method_id
656 ,p_subpriority
657 => p_rec.subpriority
658 ,p_effective_start_date
659 => p_rec.effective_start_date
660 ,p_effective_end_date
661 => p_rec.effective_end_date
662 ,p_object_version_number
663 => p_rec.object_version_number
664 );
665 --
666 exception
667 --
668 when hr_api.cannot_find_prog_unit then
669 --
670 hr_api.cannot_find_prog_unit_error
671 (p_module_name => 'PAY_BATCH_LINES'
672 ,p_hook_type => 'AI');
673 --
674 end;
675 --
676 hr_utility.set_location(' Leaving:'||l_proc, 10);
677 End post_insert;
678 --
679 -- ----------------------------------------------------------------------------
680 -- |---------------------------------< ins >----------------------------------|
681 -- ----------------------------------------------------------------------------
682 Procedure ins
683 (p_session_date in date,
684 p_rec in out nocopy pay_btl_shd.g_rec_type
685 ) is
686 --
687 l_proc varchar2(72) := g_package||'ins';
688 l_segment_passed boolean;
689 l_segments pay_btl_shd.segment_value;
690 l_cost_allocation_keyflex_id pay_batch_lines.cost_allocation_keyflex_id%type;
691 l_concat_segments_out pay_batch_lines.concatenated_segments%type;
692 --
693 Begin
694 hr_utility.set_location('Entering:'||l_proc, 5);
695
696
697 l_segment_passed := false;
698
699 if ( p_rec.cost_allocation_keyflex_id is not null ) then
700 l_segments := pay_btl_shd.segment_value( p_rec.segment1, p_rec.segment2, p_rec.segment3, p_rec.segment4,
701 p_rec.segment5, p_rec.segment6, p_rec.segment7, p_rec.segment8,
702 p_rec.segment9, p_rec.segment10,p_rec.segment11,p_rec.segment12,
703 p_rec.segment13,p_rec.segment14,p_rec.segment15,p_rec.segment16,
704 p_rec.segment17,p_rec.segment18,p_rec.segment19,p_rec.segment20,
705 p_rec.segment21,p_rec.segment22,p_rec.segment23,p_rec.segment24,
706 p_rec.segment25,p_rec.segment26,p_rec.segment27,p_rec.segment28,
707 p_rec.segment29,p_rec.segment30);
708 for i in 1..30 loop
709 if (l_segments(i) is null ) then
710 null;
711 else
712 l_segment_passed := true;
713 exit;
714 end if;
715 end loop;
716
717 if ( l_segment_passed = false) then
718 pay_btl_shd.get_flex_segs(p_rec);
719 end if;
720
721 end if;
722
723 pay_btl_bus.insert_validate
724 (p_session_date,
725 p_rec
726 );
727
728
729 -- l_cost_allocation_keyflex_id := p_rec.cost_allocation_keyflex_id;
730 if not (p_rec.segment1 is null and
731 p_rec.segment2 is null and
732 p_rec.segment3 is null and
733 p_rec.segment4 is null and
734 p_rec.segment5 is null and
735 p_rec.segment6 is null and
736 p_rec.segment7 is null and
737 p_rec.segment8 is null and
738 p_rec.segment9 is null and
739 p_rec.segment10 is null and
740 p_rec.segment11 is null and
741 p_rec.segment12 is null and
742 p_rec.segment13 is null and
743 p_rec.segment14 is null and
744 p_rec.segment15 is null and
745 p_rec.segment16 is null and
746 p_rec.segment17 is null and
747 p_rec.segment18 is null and
748 p_rec.segment19 is null and
749 p_rec.segment20 is null and
750 p_rec.segment21 is null and
751 p_rec.segment22 is null and
752 p_rec.segment23 is null and
753 p_rec.segment24 is null and
754 p_rec.segment25 is null and
755 p_rec.segment26 is null and
756 p_rec.segment27 is null and
757 p_rec.segment28 is null and
758 p_rec.segment29 is null and
759 p_rec.segment30 is null) then
760
761 pay_btl_shd.keyflex_comb(
762 p_dml_mode => 'INSERT',
763 p_appl_short_name => 'PAY',
764 p_flex_code => 'COST',
765 p_segment1 => p_rec.segment1,
766 p_segment2 => p_rec.segment2,
767 p_segment3 => p_rec.segment3,
768 p_segment4 => p_rec.segment4,
769 p_segment5 => p_rec.segment5,
770 p_segment6 => p_rec.segment6,
771 p_segment7 => p_rec.segment7,
772 p_segment8 => p_rec.segment8,
773 p_segment9 => p_rec.segment9,
774 p_segment10 => p_rec.segment10,
775 p_segment11 => p_rec.segment11,
776 p_segment12 => p_rec.segment12,
777 p_segment13 => p_rec.segment13,
778 p_segment14 => p_rec.segment14,
779 p_segment15 => p_rec.segment15,
780 p_segment16 => p_rec.segment16,
781 p_segment17 => p_rec.segment17,
782 p_segment18 => p_rec.segment18,
783 p_segment19 => p_rec.segment19,
784 p_segment20 => p_rec.segment20,
785 p_segment21 => p_rec.segment21,
786 p_segment22 => p_rec.segment22,
787 p_segment23 => p_rec.segment23,
788 p_segment24 => p_rec.segment24,
789 p_segment25 => p_rec.segment25,
790 p_segment26 => p_rec.segment26,
791 p_segment27 => p_rec.segment27,
792 p_segment28 => p_rec.segment28,
793 p_segment29 => p_rec.segment29,
794 p_segment30 => p_rec.segment30,
795 p_concat_segments_in => p_rec.concatenated_segments,
796 p_batch_id => p_rec.batch_id,
797 --
798 -- OUT parameter,
799 -- l_rec.cost_allocation_keyflex_id may have a new value
800 --
801 p_ccid => l_cost_allocation_keyflex_id,
802 p_concat_segments_out => l_concat_segments_out
803 );
804
805 end if;
806
807 p_rec.cost_allocation_keyflex_id := l_cost_allocation_keyflex_id;
808 p_rec.concatenated_segments := l_concat_segments_out;
809 --
810 -- Call the supporting pre-insert operation
811 --
812 pay_btl_ins.pre_insert(p_rec);
813 --
814 -- Insert the row
815 --
816 pay_btl_ins.insert_dml(p_rec);
817 --
818 -- Call the supporting post-insert operation
819 --
820 pay_btl_ins.post_insert
821 (p_session_date
822 ,p_rec
823 );
824 --
825 hr_utility.set_location('Leaving:'||l_proc, 20);
826 end ins;
827 --
828 -- ----------------------------------------------------------------------------
829 -- |---------------------------------< ins >----------------------------------|
830 -- ----------------------------------------------------------------------------
831 Procedure ins
832 (p_session_date in date
833 ,p_batch_id in number
834 ,p_batch_line_status in varchar2
835 ,p_cost_allocation_keyflex_id in number default null
836 ,p_element_type_id in number default null
837 ,p_assignment_id in number default null
838 ,p_assignment_number in varchar2 default null
839 ,p_batch_sequence in number default null
840 ,p_concatenated_segments in varchar2 default null
841 ,p_effective_date in date default null
842 ,p_element_name in varchar2 default null
843 ,p_entry_type in varchar2 default null
844 ,p_reason in varchar2 default null
845 ,p_segment1 in varchar2 default null
846 ,p_segment2 in varchar2 default null
847 ,p_segment3 in varchar2 default null
848 ,p_segment4 in varchar2 default null
849 ,p_segment5 in varchar2 default null
850 ,p_segment6 in varchar2 default null
851 ,p_segment7 in varchar2 default null
852 ,p_segment8 in varchar2 default null
853 ,p_segment9 in varchar2 default null
854 ,p_segment10 in varchar2 default null
855 ,p_segment11 in varchar2 default null
856 ,p_segment12 in varchar2 default null
857 ,p_segment13 in varchar2 default null
858 ,p_segment14 in varchar2 default null
859 ,p_segment15 in varchar2 default null
860 ,p_segment16 in varchar2 default null
861 ,p_segment17 in varchar2 default null
862 ,p_segment18 in varchar2 default null
863 ,p_segment19 in varchar2 default null
864 ,p_segment20 in varchar2 default null
865 ,p_segment21 in varchar2 default null
866 ,p_segment22 in varchar2 default null
867 ,p_segment23 in varchar2 default null
868 ,p_segment24 in varchar2 default null
869 ,p_segment25 in varchar2 default null
870 ,p_segment26 in varchar2 default null
871 ,p_segment27 in varchar2 default null
872 ,p_segment28 in varchar2 default null
873 ,p_segment29 in varchar2 default null
874 ,p_segment30 in varchar2 default null
875 ,p_value_1 in varchar2 default null
876 ,p_value_2 in varchar2 default null
877 ,p_value_3 in varchar2 default null
878 ,p_value_4 in varchar2 default null
879 ,p_value_5 in varchar2 default null
880 ,p_value_6 in varchar2 default null
881 ,p_value_7 in varchar2 default null
882 ,p_value_8 in varchar2 default null
883 ,p_value_9 in varchar2 default null
884 ,p_value_10 in varchar2 default null
885 ,p_value_11 in varchar2 default null
886 ,p_value_12 in varchar2 default null
887 ,p_value_13 in varchar2 default null
888 ,p_value_14 in varchar2 default null
889 ,p_value_15 in varchar2 default null
890 ,p_attribute_category in varchar2 default null
891 ,p_attribute1 in varchar2 default null
892 ,p_attribute2 in varchar2 default null
893 ,p_attribute3 in varchar2 default null
894 ,p_attribute4 in varchar2 default null
895 ,p_attribute5 in varchar2 default null
896 ,p_attribute6 in varchar2 default null
897 ,p_attribute7 in varchar2 default null
898 ,p_attribute8 in varchar2 default null
899 ,p_attribute9 in varchar2 default null
900 ,p_attribute10 in varchar2 default null
901 ,p_attribute11 in varchar2 default null
902 ,p_attribute12 in varchar2 default null
903 ,p_attribute13 in varchar2 default null
904 ,p_attribute14 in varchar2 default null
905 ,p_attribute15 in varchar2 default null
906 ,p_attribute16 in varchar2 default null
907 ,p_attribute17 in varchar2 default null
908 ,p_attribute18 in varchar2 default null
909 ,p_attribute19 in varchar2 default null
910 ,p_attribute20 in varchar2 default null
911 ,p_entry_information_category in varchar2 default null
912 ,p_entry_information1 in varchar2 default null
913 ,p_entry_information2 in varchar2 default null
914 ,p_entry_information3 in varchar2 default null
915 ,p_entry_information4 in varchar2 default null
916 ,p_entry_information5 in varchar2 default null
917 ,p_entry_information6 in varchar2 default null
918 ,p_entry_information7 in varchar2 default null
919 ,p_entry_information8 in varchar2 default null
920 ,p_entry_information9 in varchar2 default null
921 ,p_entry_information10 in varchar2 default null
922 ,p_entry_information11 in varchar2 default null
923 ,p_entry_information12 in varchar2 default null
924 ,p_entry_information13 in varchar2 default null
925 ,p_entry_information14 in varchar2 default null
926 ,p_entry_information15 in varchar2 default null
927 ,p_entry_information16 in varchar2 default null
928 ,p_entry_information17 in varchar2 default null
929 ,p_entry_information18 in varchar2 default null
930 ,p_entry_information19 in varchar2 default null
931 ,p_entry_information20 in varchar2 default null
932 ,p_entry_information21 in varchar2 default null
933 ,p_entry_information22 in varchar2 default null
934 ,p_entry_information23 in varchar2 default null
935 ,p_entry_information24 in varchar2 default null
936 ,p_entry_information25 in varchar2 default null
937 ,p_entry_information26 in varchar2 default null
938 ,p_entry_information27 in varchar2 default null
939 ,p_entry_information28 in varchar2 default null
940 ,p_entry_information29 in varchar2 default null
941 ,p_entry_information30 in varchar2 default null
942 ,p_date_earned in date default null
943 ,p_personal_payment_method_id in number default null
944 ,p_subpriority in number default null
945 ,p_effective_start_date in date default null
946 ,p_effective_end_date in date default null
947 ,p_batch_line_id out nocopy number
948 ,p_object_version_number out nocopy number
949 ) is
950 --
951 l_rec pay_btl_shd.g_rec_type;
952 l_proc varchar2(72) := g_package||'ins';
953 l_concat_segments_out varchar2(2000);
954 l_cost_allocation_keyflex_id number;
955 --
956 Begin
957 hr_utility.set_location('Entering:'||l_proc, 5);
958 --
959 -- Call conversion function to turn arguments into the
960 -- p_rec structure.
961 --
962 l_cost_allocation_keyflex_id := p_cost_allocation_keyflex_id;
963 l_rec :=
964 pay_btl_shd.convert_args
965 (null
966 ,p_cost_allocation_keyflex_id
967 ,p_element_type_id
968 ,p_assignment_id
969 ,p_batch_id
970 ,p_batch_line_status
971 ,p_assignment_number
972 ,p_batch_sequence
973 ,p_concatenated_segments
974 ,p_effective_date
975 ,p_element_name
976 ,p_entry_type
977 ,p_reason
978 ,p_segment1
979 ,p_segment2
980 ,p_segment3
981 ,p_segment4
982 ,p_segment5
983 ,p_segment6
984 ,p_segment7
985 ,p_segment8
986 ,p_segment9
987 ,p_segment10
988 ,p_segment11
989 ,p_segment12
990 ,p_segment13
991 ,p_segment14
992 ,p_segment15
993 ,p_segment16
994 ,p_segment17
995 ,p_segment18
996 ,p_segment19
997 ,p_segment20
998 ,p_segment21
999 ,p_segment22
1000 ,p_segment23
1001 ,p_segment24
1002 ,p_segment25
1003 ,p_segment26
1004 ,p_segment27
1005 ,p_segment28
1006 ,p_segment29
1007 ,p_segment30
1008 ,p_value_1
1009 ,p_value_2
1010 ,p_value_3
1011 ,p_value_4
1012 ,p_value_5
1013 ,p_value_6
1014 ,p_value_7
1015 ,p_value_8
1016 ,p_value_9
1017 ,p_value_10
1018 ,p_value_11
1019 ,p_value_12
1020 ,p_value_13
1021 ,p_value_14
1022 ,p_value_15
1023 ,p_attribute_category
1024 ,p_attribute1
1025 ,p_attribute2
1026 ,p_attribute3
1027 ,p_attribute4
1028 ,p_attribute5
1029 ,p_attribute6
1030 ,p_attribute7
1031 ,p_attribute8
1032 ,p_attribute9
1033 ,p_attribute10
1034 ,p_attribute11
1035 ,p_attribute12
1036 ,p_attribute13
1037 ,p_attribute14
1038 ,p_attribute15
1039 ,p_attribute16
1040 ,p_attribute17
1041 ,p_attribute18
1042 ,p_attribute19
1043 ,p_attribute20
1044 ,p_entry_information_category
1045 ,p_entry_information1
1046 ,p_entry_information2
1047 ,p_entry_information3
1048 ,p_entry_information4
1049 ,p_entry_information5
1050 ,p_entry_information6
1051 ,p_entry_information7
1052 ,p_entry_information8
1053 ,p_entry_information9
1054 ,p_entry_information10
1055 ,p_entry_information11
1056 ,p_entry_information12
1057 ,p_entry_information13
1058 ,p_entry_information14
1059 ,p_entry_information15
1060 ,p_entry_information16
1061 ,p_entry_information17
1062 ,p_entry_information18
1063 ,p_entry_information19
1064 ,p_entry_information20
1065 ,p_entry_information21
1066 ,p_entry_information22
1067 ,p_entry_information23
1068 ,p_entry_information24
1069 ,p_entry_information25
1070 ,p_entry_information26
1071 ,p_entry_information27
1072 ,p_entry_information28
1073 ,p_entry_information29
1074 ,p_entry_information30
1075 ,p_date_earned
1076 ,p_personal_payment_method_id
1077 ,p_subpriority
1078 ,p_effective_start_date
1079 ,p_effective_end_date
1080 ,null
1081 );
1082
1083 --
1084 -- Having converted the arguments into the pay_btl_rec
1085 -- plsql record structure we call the corresponding record business process.
1086 --
1087 pay_btl_ins.ins
1088 (p_session_date,
1089 l_rec
1090 );
1091 --
1092 -- As the primary key argument(s)
1093 -- are specified as an OUT's we must set these values.
1094 --
1095 p_batch_line_id := l_rec.batch_line_id;
1096 p_object_version_number := l_rec.object_version_number;
1097 --
1098 hr_utility.set_location(' Leaving:'||l_proc, 10);
1099 End ins;
1100 --
1101 end pay_btl_ins;
1102