[Home] [Help]
PACKAGE BODY: APPS.OTA_TFH_API_INS
Source
1 Package Body ota_tfh_api_ins as
2 /* $Header: ottfh01t.pkb 120.0 2005/05/29 07:40:15 appldev noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' ota_tfh_api_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_finance_header_id_i number default null;
14
15 -- ----------------------------------------------------------------------------
16 -- |------------------------< set_base_key_value >----------------------------|
17 -- ----------------------------------------------------------------------------
18 procedure set_base_key_value
19 (finance_header_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 ota_tfh_api_ins.g_finance_header_id_i := finance_header_id;
27 --
28 hr_utility.set_location(' Leaving:'||l_proc, 20);
29 End set_base_key_value;
30
31 --
32 -- ----------------------------------------------------------------------------
33 -- |------------------------------< insert_dml >------------------------------|
34 -- ----------------------------------------------------------------------------
35 -- {Start Of Comments}
36 --
37 -- Description:
38 -- This procedure controls the actual dml insert logic. The functions of this
39 -- procedure are as follows:
40 -- 1) Initialise the object_version_number to 1 if the object_version_number
41 -- is defined as an attribute for this entity.
42 -- 2) To set and unset the g_api_dml status as required (as we are about to
43 -- perform dml).
44 -- 3) To insert the row into the schema.
45 -- 4) To trap any constraint violations that may have occurred.
46 -- 5) To raise any other errors.
47 --
48 -- Pre Conditions:
49 -- This is an internal private procedure which must be called from the ins
50 -- procedure and must have all mandatory arguments set (except the
51 -- object_version_number which is initialised within this procedure).
52 --
53 -- In Arguments:
54 -- A Pl/Sql record structre.
55 --
56 -- Post Success:
57 -- The specified row will be inserted into the schema.
58 --
59 -- Post Failure:
60 -- On the insert dml failure it is important to note that we always reset the
61 -- g_api_dml status to false.
62 -- If a check, unique or parent integrity constraint violation is raised the
63 -- constraint_error procedure will be called.
64 -- If any other error is reported, the error will be raised after the
65 -- g_api_dml status is reset.
66 --
67 -- Developer Implementation Notes:
68 -- None.
69 --
70 -- Access Status:
71 -- Internal Development Use Only.
72 --
73 -- {End Of Comments}
74 -- ----------------------------------------------------------------------------
75 Procedure insert_dml(p_rec in out nocopy ota_tfh_api_shd.g_rec_type) is
76 --
77 l_proc varchar2(72) := g_package||'insert_dml';
78 --
79 Begin
80 hr_utility.set_location('Entering:'||l_proc, 5);
81 p_rec.object_version_number := 1; -- Initialise the object version
82 --
83 ota_tfh_api_shd.g_api_dml := true; -- Set the api dml status
84 --
85 -- Insert the row into: ota_finance_headers
86 --
87 insert into ota_finance_headers
88 ( finance_header_id,
89 superceding_header_id,
90 authorizer_person_id,
91 organization_id,
92 administrator,
93 cancelled_flag,
94 currency_code,
95 date_raised,
96 object_version_number,
97 payment_status_flag,
98 transfer_status,
99 type,
100 receivable_type,
101 comments,
102 external_reference,
103 invoice_address,
104 invoice_contact,
105 payment_method,
106 pym_attribute1,
107 pym_attribute10,
108 pym_attribute11,
109 pym_attribute12,
110 pym_attribute13,
111 pym_attribute14,
112 pym_attribute15,
113 pym_attribute16,
114 pym_attribute17,
115 pym_attribute18,
116 pym_attribute19,
117 pym_attribute2,
118 pym_attribute20,
119 pym_attribute3,
120 pym_attribute4,
121 pym_attribute5,
122 pym_attribute6,
123 pym_attribute7,
124 pym_attribute8,
125 pym_attribute9,
126 pym_information_category,
127 transfer_date,
128 transfer_message,
129 vendor_id,
130 contact_id,
131 address_id,
132 customer_id,
133 tfh_information_category,
134 tfh_information1,
135 tfh_information2,
136 tfh_information3,
137 tfh_information4,
138 tfh_information5,
139 tfh_information6,
140 tfh_information7,
141 tfh_information8,
142 tfh_information9,
143 tfh_information10,
144 tfh_information11,
145 tfh_information12,
146 tfh_information13,
147 tfh_information14,
148 tfh_information15,
149 tfh_information16,
150 tfh_information17,
151 tfh_information18,
152 tfh_information19,
153 tfh_information20,
154 paying_cost_center,
155 receiving_cost_center,
156 transfer_from_set_of_books_id,
157 transfer_to_set_of_books_id,
158 from_segment1,
159 from_segment2,
160 from_segment3,
161 from_segment4,
162 from_segment5,
163 from_segment6,
164 from_segment7,
165 from_segment8,
166 from_segment9,
167 from_segment10,
168 from_segment11,
169 from_segment12,
170 from_segment13,
171 from_segment14,
172 from_segment15,
173 from_segment16,
174 from_segment17,
175 from_segment18,
176 from_segment19,
177 from_segment20,
178 from_segment21,
179 from_segment22,
180 from_segment23,
181 from_segment24,
182 from_segment25,
183 from_segment26,
184 from_segment27,
185 from_segment28,
186 from_segment29,
187 from_segment30,
188 to_segment1,
189 to_segment2,
190 to_segment3,
191 to_segment4,
192 to_segment5,
193 to_segment6,
194 to_segment7,
195 to_segment8,
196 to_segment9,
197 to_segment10,
198 to_segment11,
199 to_segment12,
200 to_segment13,
201 to_segment14,
202 to_segment15,
203 to_segment16,
204 to_segment17,
205 to_segment18,
206 to_segment19,
207 to_segment20,
208 to_segment21,
209 to_segment22,
210 to_segment23,
211 to_segment24,
212 to_segment25,
213 to_segment26,
214 to_segment27,
215 to_segment28,
216 to_segment29,
217 to_segment30,
218 transfer_from_cc_id,
219 transfer_to_cc_id
220 )
221 Values
222 ( p_rec.finance_header_id,
223 p_rec.superceding_header_id,
224 p_rec.authorizer_person_id,
225 p_rec.organization_id,
226 p_rec.administrator,
227 p_rec.cancelled_flag,
228 p_rec.currency_code,
229 p_rec.date_raised,
230 p_rec.object_version_number,
231 p_rec.payment_status_flag,
232 p_rec.transfer_status,
233 p_rec.type,
234 p_rec.receivable_type,
235 p_rec.comments,
236 p_rec.external_reference,
237 p_rec.invoice_address,
238 p_rec.invoice_contact,
239 p_rec.payment_method,
240 p_rec.pym_attribute1,
241 p_rec.pym_attribute10,
242 p_rec.pym_attribute11,
243 p_rec.pym_attribute12,
244 p_rec.pym_attribute13,
245 p_rec.pym_attribute14,
246 p_rec.pym_attribute15,
247 p_rec.pym_attribute16,
248 p_rec.pym_attribute17,
249 p_rec.pym_attribute18,
250 p_rec.pym_attribute19,
251 p_rec.pym_attribute2,
252 p_rec.pym_attribute20,
253 p_rec.pym_attribute3,
254 p_rec.pym_attribute4,
255 p_rec.pym_attribute5,
256 p_rec.pym_attribute6,
257 p_rec.pym_attribute7,
258 p_rec.pym_attribute8,
259 p_rec.pym_attribute9,
260 p_rec.pym_information_category,
261 p_rec.transfer_date,
262 p_rec.transfer_message,
263 p_rec.vendor_id,
264 p_rec.contact_id,
265 p_rec.address_id,
266 p_rec.customer_id,
267 p_rec.tfh_information_category,
268 p_rec.tfh_information1,
269 p_rec.tfh_information2,
270 p_rec.tfh_information3,
271 p_rec.tfh_information4,
272 p_rec.tfh_information5,
273 p_rec.tfh_information6,
274 p_rec.tfh_information7,
275 p_rec.tfh_information8,
276 p_rec.tfh_information9,
277 p_rec.tfh_information10,
278 p_rec.tfh_information11,
279 p_rec.tfh_information12,
280 p_rec.tfh_information13,
281 p_rec.tfh_information14,
282 p_rec.tfh_information15,
283 p_rec.tfh_information16,
284 p_rec.tfh_information17,
285 p_rec.tfh_information18,
286 p_rec.tfh_information19,
287 p_rec.tfh_information20,
288 p_rec.paying_cost_center,
289 p_rec.receiving_cost_center,
290 p_rec.transfer_from_set_of_book_id,
291 p_rec.transfer_to_set_of_book_id,
292 p_rec.from_segment1,
293 p_rec.from_segment2,
294 p_rec.from_segment3,
295 p_rec.from_segment4,
296 p_rec.from_segment5,
297 p_rec.from_segment6,
298 p_rec.from_segment7,
299 p_rec.from_segment8,
300 p_rec.from_segment9,
301 p_rec.from_segment10,
302 p_rec.from_segment11,
303 p_rec.from_segment12,
304 p_rec.from_segment13,
305 p_rec.from_segment14,
306 p_rec.from_segment15,
307 p_rec.from_segment16,
308 p_rec.from_segment17,
309 p_rec.from_segment18,
310 p_rec.from_segment19,
311 p_rec.from_segment20,
312 p_rec.from_segment21,
313 p_rec.from_segment22,
314 p_rec.from_segment23,
315 p_rec.from_segment24,
316 p_rec.from_segment25,
317 p_rec.from_segment26,
318 p_rec.from_segment27,
319 p_rec.from_segment28,
320 p_rec.from_segment29,
321 p_rec.from_segment30,
322 p_rec.to_segment1,
323 p_rec.to_segment2,
324 p_rec.to_segment3,
325 p_rec.to_segment4,
326 p_rec.to_segment5,
327 p_rec.to_segment6,
328 p_rec.to_segment7,
329 p_rec.to_segment8,
330 p_rec.to_segment9,
331 p_rec.to_segment10,
332 p_rec.to_segment11,
333 p_rec.to_segment12,
334 p_rec.to_segment13,
335 p_rec.to_segment14,
336 p_rec.to_segment15,
337 p_rec.to_segment16,
338 p_rec.to_segment17,
339 p_rec.to_segment18,
340 p_rec.to_segment19,
341 p_rec.to_segment20,
342 p_rec.to_segment21,
343 p_rec.to_segment22,
344 p_rec.to_segment23,
345 p_rec.to_segment24,
346 p_rec.to_segment25,
347 p_rec.to_segment26,
348 p_rec.to_segment27,
349 p_rec.to_segment28,
350 p_rec.to_segment29,
351 p_rec.to_segment30,
352 p_rec.transfer_from_cc_id,
353 p_rec.transfer_to_cc_id
354 );
355 --
356 ota_tfh_api_shd.g_api_dml := false; -- Unset the api dml status
357 --
358 hr_utility.set_location(' Leaving:'||l_proc, 10);
359 Exception
360 When hr_api.check_integrity_violated Then
361 -- A check constraint has been violated
362 ota_tfh_api_shd.g_api_dml := false; -- Unset the api dml status
363 ota_tfh_api_shd.constraint_error
364 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
365 When hr_api.parent_integrity_violated Then
366 -- Parent integrity has been violated
367 ota_tfh_api_shd.g_api_dml := false; -- Unset the api dml status
368 ota_tfh_api_shd.constraint_error
369 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
370 When hr_api.unique_integrity_violated Then
371 -- Unique integrity has been violated
372 ota_tfh_api_shd.g_api_dml := false; -- Unset the api dml status
373 ota_tfh_api_shd.constraint_error
374 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
375 When Others Then
376 ota_tfh_api_shd.g_api_dml := false; -- Unset the api dml status
377 Raise;
378 End insert_dml;
379 --
380 -- ----------------------------------------------------------------------------
381 -- |------------------------------< pre_insert >------------------------------|
382 -- ----------------------------------------------------------------------------
383 -- {Start Of Comments}
384 --
385 -- Description:
386 -- This private procedure contains any processing which is required before
387 -- the insert dml. Presently, if the entity has a corresponding primary
388 -- key which is maintained by an associating sequence, the primary key for
389 -- the entity will be populated with the next sequence value in
390 -- preparation for the insert dml.
391 --
392 -- Pre Conditions:
393 -- This is an internal procedure which is called from the ins procedure.
394 --
395 -- In Arguments:
396 -- A Pl/Sql record structre.
397 --
398 -- Post Success:
399 -- Processing continues.
400 --
401 -- Post Failure:
402 -- If an error has occurred, an error message and exception will be raised
403 -- but not handled.
404 --
405 -- Developer Implementation Notes:
406 -- Any pre-processing required before the insert dml is issued should be
407 -- coded within this procedure. As stated above, a good example is the
408 -- generation of a primary key number via a corresponding sequence.
409 -- It is important to note that any 3rd party maintenance should be reviewed
410 -- before placing in this procedure.
411 --
412 -- Access Status:
413 -- Internal Development Use Only.
414 --
415 -- {End Of Comments}
416 -- ----------------------------------------------------------------------------
417 Procedure pre_insert(p_rec in out nocopy ota_tfh_api_shd.g_rec_type) is
418 --
419 l_proc varchar2(72) := g_package||'pre_insert';
420 --
421 Cursor C_Sel1 is select ota_finance_headers_s.nextval from sys.dual;
422 --
423
424 --
425 Cursor C_Sel2 is
426 Select null
427 from ota_finance_headers
428 where finance_header_id =
429 ota_tfh_api_ins.g_finance_header_id_i;
430 --
431
432 l_exists varchar2(1);
433
434 Begin
435 hr_utility.set_location('Entering:'||l_proc, 5);
436 --
437 If (ota_tfh_api_ins.g_finance_header_id_i is not null) Then
438 --
439 -- Verify registered primary key values not already in use
440 --
441 Open C_Sel2;
442 Fetch C_Sel2 into l_exists;
443 If C_Sel2%found Then
444 Close C_Sel2;
445 --
446 -- The primary key values are already in use.
447 --
448 fnd_message.set_name('PER','PER_289391_KEY_ALREADY_USED');
449 fnd_message.set_token('TABLE_NAME','ota_finance_headers');
450 fnd_message.raise_error;
451 End If;
452 Close C_Sel2;
453 --
454 -- Use registered key values and clear globals
455 --
456 p_rec.finance_header_id :=
457 ota_tfh_api_ins.g_finance_header_id_i;
458 ota_tfh_api_ins.g_finance_header_id_i := null;
459 Else
460 --
461 -- No registerd key values, so select the next sequence number
462 --
463 --
464 -- Select the next sequence number
465 --
466
467 Open C_Sel1;
468 Fetch C_Sel1 Into p_rec.finance_header_id;
469 Close C_Sel1;
470 End if;
471 --
472 hr_utility.set_location(' Leaving:'||l_proc, 10);
473 End pre_insert;
474
475 --
476 -- ----------------------------------------------------------------------------
477 -- |-----------------------------< post_insert >------------------------------|
478 -- ----------------------------------------------------------------------------
479 -- {Start Of Comments}
480 --
481 -- Description:
482 -- This private procedure contains any processing which is required after the
483 -- insert dml.
484 --
485 -- Pre Conditions:
486 -- This is an internal procedure which is called from the ins procedure.
487 --
488 -- In Arguments:
489 -- A Pl/Sql record structre.
490 --
491 -- Post Success:
492 -- Processing continues.
493 --
494 -- Post Failure:
495 -- If an error has occurred, an error message and exception will be raised
496 -- but not handled.
497 --
498 -- Developer Implementation Notes:
499 -- Any post-processing required after the insert dml is issued should be
500 -- coded within this procedure. It is important to note that any 3rd party
501 -- maintenance should be reviewed before placing in this procedure.
502 --
503 -- Access Status:
504 -- Internal Development Use Only.
505 --
506 -- {End Of Comments}
507 -- ----------------------------------------------------------------------------
508 Procedure post_insert(p_rec in ota_tfh_api_shd.g_rec_type) is
509 --
510 l_proc varchar2(72) := g_package||'post_insert';
511 --
512 Begin
513 hr_utility.set_location('Entering:'||l_proc, 5);
514 --
515 hr_utility.set_location(' Leaving:'||l_proc, 10);
516 End post_insert;
517 --
518 -- ----------------------------------------------------------------------------
519 -- |---------------------------------< ins >----------------------------------|
520 -- ----------------------------------------------------------------------------
521 Procedure ins
522 (
523 p_rec in out nocopy ota_tfh_api_shd.g_rec_type,
524 p_validate in boolean default false,
525 p_transaction_type in varchar2 default 'INSERT'
526 ) is
527 --
528 l_proc varchar2(72) := g_package||'ins';
529 --
530 Begin
531 hr_utility.set_location('Entering:'||l_proc, 5);
532 --
533 -- Determine if the business process is to be validated.
534 --
535 If p_validate then
536 --
537 -- Issue the savepoint.
538 --
539 SAVEPOINT ins_ota_api_tfh;
540 End If;
541 --
542 -- Call the supporting insert validate operations
543 --
544 ota_tfh_api_bus.insert_validate(p_rec, p_transaction_type);
545 --
546 -- Call the supporting pre-insert operation
547 --
548 pre_insert(p_rec);
549 --
550 -- Insert the row
551 --
552 insert_dml(p_rec);
553 --
554 -- Call the supporting post-insert operation
555 --
556 post_insert(p_rec);
557 --
558 -- If we are validating then raise the Validate_Enabled exception
559 --
560 If p_validate then
561 Raise HR_Api.Validate_Enabled;
562 End If;
563 --
564 hr_utility.set_location(' Leaving:'||l_proc, 10);
565 Exception
566 When HR_Api.Validate_Enabled Then
567 --
568 -- As the Validate_Enabled exception has been raised
569 -- we must rollback to the savepoint
570 --
571 ROLLBACK TO ins_ota_api_tfh;
572 end ins;
573 --
574 -- ----------------------------------------------------------------------------
575 -- |---------------------------------< ins >----------------------------------|
576 -- ----------------------------------------------------------------------------
577 Procedure ins
578 (
579 p_finance_header_id out nocopy number,
580 p_superceding_header_id in number default null,
581 p_authorizer_person_id in number default null,
582 p_organization_id in number,
583 p_administrator in number,
584 p_cancelled_flag in varchar2,
585 p_currency_code in varchar2,
586 p_date_raised in date,
587 p_object_version_number out nocopy number,
588 p_payment_status_flag in varchar2,
589 p_transfer_status in varchar2,
590 p_type in varchar2,
591 p_receivable_type in varchar2,
592 p_comments in varchar2 default null,
593 p_external_reference in varchar2 default null,
594 p_invoice_address in varchar2 default null,
595 p_invoice_contact in varchar2 default null,
596 p_payment_method in varchar2 default null,
597 p_pym_attribute1 in varchar2 default null,
598 p_pym_attribute10 in varchar2 default null,
599 p_pym_attribute11 in varchar2 default null,
600 p_pym_attribute12 in varchar2 default null,
601 p_pym_attribute13 in varchar2 default null,
602 p_pym_attribute14 in varchar2 default null,
603 p_pym_attribute15 in varchar2 default null,
604 p_pym_attribute16 in varchar2 default null,
605 p_pym_attribute17 in varchar2 default null,
606 p_pym_attribute18 in varchar2 default null,
607 p_pym_attribute19 in varchar2 default null,
608 p_pym_attribute2 in varchar2 default null,
609 p_pym_attribute20 in varchar2 default null,
610 p_pym_attribute3 in varchar2 default null,
611 p_pym_attribute4 in varchar2 default null,
612 p_pym_attribute5 in varchar2 default null,
613 p_pym_attribute6 in varchar2 default null,
614 p_pym_attribute7 in varchar2 default null,
615 p_pym_attribute8 in varchar2 default null,
616 p_pym_attribute9 in varchar2 default null,
617 p_pym_information_category in varchar2 default null,
618 p_transfer_date in date default null,
619 p_transfer_message in varchar2 default null,
620 p_vendor_id in number default null,
621 p_contact_id in number default null,
622 p_address_id in number default null,
623 p_customer_id in number default null,
624 p_tfh_information_category in varchar2 default null,
625 p_tfh_information1 in varchar2 default null,
626 p_tfh_information2 in varchar2 default null,
627 p_tfh_information3 in varchar2 default null,
628 p_tfh_information4 in varchar2 default null,
629 p_tfh_information5 in varchar2 default null,
630 p_tfh_information6 in varchar2 default null,
631 p_tfh_information7 in varchar2 default null,
632 p_tfh_information8 in varchar2 default null,
633 p_tfh_information9 in varchar2 default null,
634 p_tfh_information10 in varchar2 default null,
635 p_tfh_information11 in varchar2 default null,
636 p_tfh_information12 in varchar2 default null,
637 p_tfh_information13 in varchar2 default null,
638 p_tfh_information14 in varchar2 default null,
639 p_tfh_information15 in varchar2 default null,
640 p_tfh_information16 in varchar2 default null,
641 p_tfh_information17 in varchar2 default null,
642 p_tfh_information18 in varchar2 default null,
643 p_tfh_information19 in varchar2 default null,
644 p_tfh_information20 in varchar2 default null,
645 p_paying_cost_center in varchar2 default null,
646 p_receiving_cost_center in varchar2 default null,
647 p_transfer_from_set_of_book_id in number default null,
648 p_transfer_to_set_of_book_id in number default null,
649 p_from_segment1 in varchar2 default null,
650 p_from_segment2 in varchar2 default null,
651 p_from_segment3 in varchar2 default null,
652 p_from_segment4 in varchar2 default null,
653 p_from_segment5 in varchar2 default null,
654 p_from_segment6 in varchar2 default null,
655 p_from_segment7 in varchar2 default null,
656 p_from_segment8 in varchar2 default null,
657 p_from_segment9 in varchar2 default null,
658 p_from_segment10 in varchar2 default null,
659 p_from_segment11 in varchar2 default null,
660 p_from_segment12 in varchar2 default null,
661 p_from_segment13 in varchar2 default null,
662 p_from_segment14 in varchar2 default null,
663 p_from_segment15 in varchar2 default null,
664 p_from_segment16 in varchar2 default null,
665 p_from_segment17 in varchar2 default null,
666 p_from_segment18 in varchar2 default null,
667 p_from_segment19 in varchar2 default null,
668 p_from_segment20 in varchar2 default null,
669 p_from_segment21 in varchar2 default null,
670 p_from_segment22 in varchar2 default null,
671 p_from_segment23 in varchar2 default null,
672 p_from_segment24 in varchar2 default null,
673 p_from_segment25 in varchar2 default null,
674 p_from_segment26 in varchar2 default null,
675 p_from_segment27 in varchar2 default null,
676 p_from_segment28 in varchar2 default null,
677 p_from_segment29 in varchar2 default null,
678 p_from_segment30 in varchar2 default null,
679 p_to_segment1 in varchar2 default null,
680 p_to_segment2 in varchar2 default null,
681 p_to_segment3 in varchar2 default null,
682 p_to_segment4 in varchar2 default null,
683 p_to_segment5 in varchar2 default null,
684 p_to_segment6 in varchar2 default null,
685 p_to_segment7 in varchar2 default null,
686 p_to_segment8 in varchar2 default null,
687 p_to_segment9 in varchar2 default null,
688 p_to_segment10 in varchar2 default null,
689 p_to_segment11 in varchar2 default null,
690 p_to_segment12 in varchar2 default null,
691 p_to_segment13 in varchar2 default null,
692 p_to_segment14 in varchar2 default null,
693 p_to_segment15 in varchar2 default null,
694 p_to_segment16 in varchar2 default null,
695 p_to_segment17 in varchar2 default null,
696 p_to_segment18 in varchar2 default null,
697 p_to_segment19 in varchar2 default null,
698 p_to_segment20 in varchar2 default null,
699 p_to_segment21 in varchar2 default null,
700 p_to_segment22 in varchar2 default null,
701 p_to_segment23 in varchar2 default null,
702 p_to_segment24 in varchar2 default null,
703 p_to_segment25 in varchar2 default null,
704 p_to_segment26 in varchar2 default null,
705 p_to_segment27 in varchar2 default null,
706 p_to_segment28 in varchar2 default null,
707 p_to_segment29 in varchar2 default null,
708 p_to_segment30 in varchar2 default null,
709 p_transfer_from_cc_id in number default null,
710 p_transfer_to_cc_id in number default null,
711 p_validate in boolean default false,
712 p_transaction_type in varchar2 default 'INSERT'
713 ) is
714 --
715 l_rec ota_tfh_api_shd.g_rec_type;
716 l_proc varchar2(72) := g_package||'ins';
717 --
718 Begin
719 hr_utility.set_location('Entering:'||l_proc, 5);
720 --
721 -- Call conversion function to turn arguments into the
722 -- p_rec structure.
723 --
724 l_rec :=
725 ota_tfh_api_shd.convert_args
726 (
727 null,
728 p_superceding_header_id,
729 p_authorizer_person_id,
730 p_organization_id,
731 p_administrator,
732 p_cancelled_flag,
733 p_currency_code,
734 p_date_raised,
735 null,
736 p_payment_status_flag,
737 p_transfer_status,
738 p_type,
739 p_receivable_type,
740 p_comments,
741 p_external_reference,
742 p_invoice_address,
743 p_invoice_contact,
744 p_payment_method,
745 p_pym_attribute1,
746 p_pym_attribute10,
747 p_pym_attribute11,
748 p_pym_attribute12,
749 p_pym_attribute13,
750 p_pym_attribute14,
751 p_pym_attribute15,
752 p_pym_attribute16,
753 p_pym_attribute17,
754 p_pym_attribute18,
755 p_pym_attribute19,
756 p_pym_attribute2,
757 p_pym_attribute20,
758 p_pym_attribute3,
759 p_pym_attribute4,
760 p_pym_attribute5,
761 p_pym_attribute6,
762 p_pym_attribute7,
763 p_pym_attribute8,
764 p_pym_attribute9,
765 p_pym_information_category,
766 p_transfer_date,
767 p_transfer_message,
768 p_vendor_id,
769 p_contact_id,
770 p_address_id,
771 p_customer_id,
772 p_tfh_information_category,
773 p_tfh_information1,
774 p_tfh_information2,
775 p_tfh_information3,
776 p_tfh_information4,
777 p_tfh_information5,
778 p_tfh_information6,
779 p_tfh_information7,
780 p_tfh_information8,
781 p_tfh_information9,
782 p_tfh_information10,
783 p_tfh_information11,
784 p_tfh_information12,
785 p_tfh_information13,
786 p_tfh_information14,
787 p_tfh_information15,
788 p_tfh_information16,
789 p_tfh_information17,
790 p_tfh_information18,
791 p_tfh_information19,
792 p_tfh_information20,
793 p_paying_cost_center,
794 p_receiving_cost_center,
795 p_transfer_from_set_of_book_id,
796 p_transfer_to_set_of_book_id,
797 p_from_segment1,
798 p_from_segment2,
799 p_from_segment3,
800 p_from_segment4,
801 p_from_segment5,
802 p_from_segment6,
803 p_from_segment7,
804 p_from_segment8,
805 p_from_segment9,
806 p_from_segment10,
807 p_from_segment11,
808 p_from_segment12,
809 p_from_segment13,
810 p_from_segment14,
811 p_from_segment15,
812 p_from_segment16,
813 p_from_segment17,
814 p_from_segment18,
815 p_from_segment19,
816 p_from_segment20,
817 p_from_segment21,
818 p_from_segment22,
819 p_from_segment23,
820 p_from_segment24,
821 p_from_segment25,
822 p_from_segment26,
823 p_from_segment27,
824 p_from_segment28,
825 p_from_segment29,
826 p_from_segment30,
827 p_to_segment1,
828 p_to_segment2,
829 p_to_segment3,
830 p_to_segment4,
831 p_to_segment5,
832 p_to_segment6,
833 p_to_segment7,
834 p_to_segment8,
835 p_to_segment9,
836 p_to_segment10,
837 p_to_segment11,
838 p_to_segment12,
839 p_to_segment13,
840 p_to_segment14,
841 p_to_segment15,
842 p_to_segment16,
843 p_to_segment17,
844 p_to_segment18,
845 p_to_segment19,
846 p_to_segment20,
847 p_to_segment21,
848 p_to_segment22,
849 p_to_segment23,
850 p_to_segment24,
851 p_to_segment25,
852 p_to_segment26,
853 p_to_segment27,
854 p_to_segment28,
855 p_to_segment29,
856 p_to_segment30,
857 p_transfer_from_cc_id,
858 p_transfer_to_cc_id
859 );
860 --
861 -- Having converted the arguments into the ota_tfh_api_rec
862 -- plsql record structure we call the corresponding record business process.
863 --
864 ins(l_rec, p_validate,p_transaction_type);
865 --
866 -- As the primary key argument(s)
867 -- are specified as an OUT's we must set these values.
868 --
869 p_finance_header_id := l_rec.finance_header_id;
870 p_object_version_number := l_rec.object_version_number;
871 --
872 hr_utility.set_location(' Leaving:'||l_proc, 10);
873 End ins;
874 --
875 end ota_tfh_api_ins;