[Home] [Help]
PACKAGE BODY: APPS.OTA_FINANCE_HEADER_API
Source
1 PACKAGE BODY OTA_FINANCE_HEADER_API as
2 /* $Header: ottfhapi.pkb 120.0 2005/05/29 07:40:55 appldev noship $ */
3 --
4 -- Package Variables
5 --
6 g_package varchar2(33) := 'OTA_FINANCE_HEADER_API.';
7 --
8 -- ----------------------------------------------------------------------------
9 -- |-------------------------< CREATE_FINANCE_HEADER >------------------------------|
10 -- ----------------------------------------------------------------------------
11 --
12 procedure CREATE_FINANCE_HEADER
13 (
14 p_finance_header_id out nocopy number,
15 p_object_version_number out nocopy number ,
16 p_superceding_header_id in number,
17 p_authorizer_person_id in number,
18 p_organization_id in number,
19 p_administrator in number,
20 p_cancelled_flag in varchar2,
21 p_currency_code in varchar2,
22 p_date_raised in date,
23 p_payment_status_flag in varchar2,
24 p_transfer_status in varchar2,
25 p_type in varchar2,
26 p_receivable_type in varchar2,
27 p_comments in varchar2,
28 p_external_reference in varchar2,
29 p_invoice_address in varchar2,
30 p_invoice_contact in varchar2,
31 p_payment_method in varchar2,
32 p_pym_information_category in varchar2,
33 p_pym_attribute1 in varchar2,
34 p_pym_attribute2 in varchar2,
35 p_pym_attribute3 in varchar2,
36 p_pym_attribute4 in varchar2,
37 p_pym_attribute5 in varchar2,
38 p_pym_attribute6 in varchar2,
39 p_pym_attribute7 in varchar2,
40 p_pym_attribute8 in varchar2,
41 p_pym_attribute9 in varchar2,
42 p_pym_attribute10 in varchar2,
43 p_pym_attribute11 in varchar2,
44 p_pym_attribute12 in varchar2,
45 p_pym_attribute13 in varchar2,
46 p_pym_attribute14 in varchar2,
47 p_pym_attribute15 in varchar2,
48 p_pym_attribute16 in varchar2,
49 p_pym_attribute17 in varchar2,
50 p_pym_attribute18 in varchar2,
51 p_pym_attribute19 in varchar2,
52 p_pym_attribute20 in varchar2,
53 p_transfer_date in date,
54 p_transfer_message in varchar2,
55 p_vendor_id in number ,
56 p_contact_id in number ,
57 p_address_id in number ,
58 p_customer_id in number ,
59 p_tfh_information_category in varchar2,
60 p_tfh_information1 in varchar2,
61 p_tfh_information2 in varchar2,
62 p_tfh_information3 in varchar2,
63 p_tfh_information4 in varchar2,
64 p_tfh_information5 in varchar2,
65 p_tfh_information6 in varchar2,
66 p_tfh_information7 in varchar2,
67 p_tfh_information8 in varchar2,
68 p_tfh_information9 in varchar2,
69 p_tfh_information10 in varchar2,
70 p_tfh_information11 in varchar2,
71 p_tfh_information12 in varchar2,
72 p_tfh_information13 in varchar2,
73 p_tfh_information14 in varchar2,
74 p_tfh_information15 in varchar2,
75 p_tfh_information16 in varchar2,
76 p_tfh_information17 in varchar2,
77 p_tfh_information18 in varchar2,
78 p_tfh_information19 in varchar2,
79 p_tfh_information20 in varchar2,
80 p_paying_cost_center in varchar2,
81 p_receiving_cost_center in varchar2,
82 p_transfer_from_set_of_book_id in number,
83 p_transfer_to_set_of_book_id in number,
84 p_from_segment1 in varchar2,
85 p_from_segment2 in varchar2,
86 p_from_segment3 in varchar2,
87 p_from_segment4 in varchar2,
88 p_from_segment5 in varchar2,
89 p_from_segment6 in varchar2,
90 p_from_segment7 in varchar2,
91 p_from_segment8 in varchar2,
92 p_from_segment9 in varchar2,
93 p_from_segment10 in varchar2,
94 p_from_segment11 in varchar2,
95 p_from_segment12 in varchar2,
96 p_from_segment13 in varchar2,
97 p_from_segment14 in varchar2,
98 p_from_segment15 in varchar2,
99 p_from_segment16 in varchar2,
100 p_from_segment17 in varchar2,
101 p_from_segment18 in varchar2,
102 p_from_segment19 in varchar2,
103 p_from_segment20 in varchar2,
104 p_from_segment21 in varchar2,
105 p_from_segment22 in varchar2,
106 p_from_segment23 in varchar2,
107 p_from_segment24 in varchar2,
108 p_from_segment25 in varchar2,
109 p_from_segment26 in varchar2,
110 p_from_segment27 in varchar2,
111 p_from_segment28 in varchar2,
112 p_from_segment29 in varchar2,
113 p_from_segment30 in varchar2,
114 p_to_segment1 in varchar2,
115 p_to_segment2 in varchar2,
116 p_to_segment3 in varchar2,
117 p_to_segment4 in varchar2,
118 p_to_segment5 in varchar2,
119 p_to_segment6 in varchar2,
120 p_to_segment7 in varchar2,
121 p_to_segment8 in varchar2,
122 p_to_segment9 in varchar2,
123 p_to_segment10 in varchar2,
124 p_to_segment11 in varchar2,
125 p_to_segment12 in varchar2,
126 p_to_segment13 in varchar2,
127 p_to_segment14 in varchar2,
128 p_to_segment15 in varchar2,
129 p_to_segment16 in varchar2,
130 p_to_segment17 in varchar2,
131 p_to_segment18 in varchar2,
132 p_to_segment19 in varchar2,
133 p_to_segment20 in varchar2,
134 p_to_segment21 in varchar2,
135 p_to_segment22 in varchar2,
136 p_to_segment23 in varchar2,
137 p_to_segment24 in varchar2,
138 p_to_segment25 in varchar2,
139 p_to_segment26 in varchar2,
140 p_to_segment27 in varchar2,
141 p_to_segment28 in varchar2,
142 p_to_segment29 in varchar2,
143 p_to_segment30 in varchar2,
144 p_transfer_from_cc_id in number,
145 p_transfer_to_cc_id in number,
146 P_validate in boolean default false,
147 p_effective_date in date
148
149 ) is
150 --
151 -- Declare cursors and local variables
152 --
153 l_proc varchar2(72) := g_package||' Create Training Plan';
154 l_finance_header_id number;
155 l_object_version_number number;
156 l_effective_date date;
157 l_name varchar2(80);
158 begin
159 hr_utility.set_location('Entering:'|| l_proc, 10);
160 --
161 -- Issue a savepoint
162 --
163 savepoint CREATE_FINANCE_HEADER;
164 --
165 -- Truncate the time portion from all IN date parameters
166 --
167 l_effective_date := trunc(p_effective_date);
168 --
169 -- Call Before Process User Hook
170 --
171
172 begin
173 OTA_FINANCE_HEADER_BK1.CREATE_FINANCE_HEADER_B
174 ( P_superceding_header_id => p_superceding_header_id
175 ,P_authorizer_person_id => p_authorizer_person_id
176 ,P_organization_id => p_organization_id
177 ,P_administrator => p_administrator
178 ,P_cancelled_flag => p_cancelled_flag
179 ,P_currency_code => p_currency_code
180 ,P_date_raised => p_date_raised
181 ,P_payment_status_flag => p_payment_status_flag
182 ,P_transfer_status => p_transfer_status
183 ,P_type => p_type
184 ,p_receivable_type => p_receivable_type
185 ,P_comments => p_comments
186 ,P_external_reference => p_external_reference
187 ,P_invoice_address => p_invoice_address
188 ,P_invoice_contact => p_invoice_contact
189 ,P_payment_method => p_payment_method
190 ,P_pym_attribute1 => p_pym_attribute1
191 ,P_pym_attribute2 => p_pym_attribute2
192 ,P_pym_attribute3 => p_pym_attribute3
193 ,P_pym_attribute4 => p_pym_attribute4
194 ,P_pym_attribute5 => p_pym_attribute5
195 ,P_pym_attribute6 => p_pym_attribute6
196 ,P_pym_attribute7 => p_pym_attribute7
197 ,P_pym_attribute8 => p_pym_attribute8
198 ,P_pym_attribute9 => p_pym_attribute9
199 ,P_pym_attribute10 => p_pym_attribute10
200 ,P_pym_attribute11 => p_pym_attribute11
201 ,P_pym_attribute12 => p_pym_attribute12
202 ,P_pym_attribute13 => p_pym_attribute13
203 ,P_pym_attribute14 => p_pym_attribute14
204 ,P_pym_attribute15 => p_pym_attribute15
205 ,P_pym_attribute16 => p_pym_attribute16
206 ,P_pym_attribute17 => p_pym_attribute17
207 ,P_pym_attribute18 => p_pym_attribute18
208 ,P_pym_attribute19 => p_pym_attribute19
209 ,P_pym_attribute20 => p_pym_attribute20
210 ,P_pym_information_category => p_pym_information_category
211 ,P_transfer_date => p_transfer_date
212 ,P_transfer_message => p_transfer_message
213 ,P_vendor_id => p_vendor_id
214 ,P_contact_id => p_contact_id
215 ,P_address_id => p_address_id
216 ,P_customer_id => p_customer_id
217 ,P_tfh_information_category => p_tfh_information_category
218 ,P_tfh_information1 => p_tfh_information1
219 ,P_tfh_information2 => p_tfh_information2
220 ,P_tfh_information3 => p_tfh_information3
221 ,P_tfh_information4 => p_tfh_information4
222 ,P_tfh_information5 => p_tfh_information5
223 ,P_tfh_information6 => p_tfh_information6
224 ,P_tfh_information7 => p_tfh_information7
225 ,P_tfh_information8 => p_tfh_information8
226 ,P_tfh_information9 => p_tfh_information9
227 ,P_tfh_information10 => p_tfh_information10
228 ,P_tfh_information11 => p_tfh_information11
229 ,P_tfh_information12 => p_tfh_information12
230 ,P_tfh_information13 => p_tfh_information13
231 ,P_tfh_information14 => p_tfh_information14
232 ,P_tfh_information15 => p_tfh_information15
233 ,P_tfh_information16 => p_tfh_information16
234 ,P_tfh_information17 => p_tfh_information17
235 ,P_tfh_information18 => p_tfh_information18
236 ,P_tfh_information19 => p_tfh_information19
237 ,P_tfh_information20 => p_tfh_information20
238 ,P_paying_cost_center => p_paying_cost_center
239 ,P_receiving_cost_center => p_receiving_cost_center
240 ,p_transfer_from_set_of_book_id => p_transfer_from_set_of_book_id
241 ,p_transfer_to_set_of_book_id => p_transfer_to_set_of_book_id
242 ,p_from_segment1 => p_from_segment1
243 ,p_from_segment2 => p_from_segment2
244 ,p_from_segment3 => p_from_segment3
245 ,p_from_segment4 => p_from_segment4
246 ,p_from_segment5 => p_from_segment5
247 ,p_from_segment6 => p_from_segment6
248 ,p_from_segment7 => p_from_segment7
249 ,p_from_segment8 => p_from_segment8
250 ,p_from_segment9 => p_from_segment9
251 ,p_from_segment10 => p_from_segment10
252 ,p_from_segment11 => p_from_segment11
253 ,p_from_segment12 => p_from_segment12
254 ,p_from_segment13 => p_from_segment13
255 ,p_from_segment14 => p_from_segment14
256 ,p_from_segment15 => p_from_segment15
257 ,p_from_segment16 => p_from_segment16
258 ,p_from_segment17 => p_from_segment17
259 ,p_from_segment18 => p_from_segment18
260 ,p_from_segment19 => p_from_segment19
261 ,p_from_segment20 => p_from_segment20
262 ,p_from_segment21 => p_from_segment21
263 ,p_from_segment22 => p_from_segment22
264 ,p_from_segment23 => p_from_segment23
265 ,p_from_segment24 => p_from_segment24
266 ,p_from_segment25 => p_from_segment25
267 ,p_from_segment26 => p_from_segment26
268 ,p_from_segment27 => p_from_segment27
269 ,p_from_segment28 => p_from_segment28
270 ,p_from_segment29 => p_from_segment29
271 ,p_from_segment30 => p_from_segment30
272 ,p_to_segment1 => p_to_segment1
273 ,p_to_segment2 => p_to_segment2
274 ,p_to_segment3 => p_to_segment3
275 ,p_to_segment4 => p_to_segment4
276 ,p_to_segment5 => p_to_segment5
277 ,p_to_segment6 => p_to_segment6
278 ,p_to_segment7 => p_to_segment7
279 ,p_to_segment8 => p_to_segment8
280 ,p_to_segment9 => p_to_segment9
281 ,p_to_segment10 => p_to_segment10
282 ,p_to_segment11 => p_to_segment11
283 ,p_to_segment12 => p_to_segment12
284 ,p_to_segment13 => p_to_segment13
285 ,p_to_segment14 => p_to_segment14
286 ,p_to_segment15 => p_to_segment15
287 ,p_to_segment16 => p_to_segment16
288 ,p_to_segment17 => p_to_segment17
289 ,p_to_segment18 => p_to_segment18
290 ,p_to_segment19 => p_to_segment19
291 ,p_to_segment20 => p_to_segment20
292 ,p_to_segment21 => p_to_segment21
293 ,p_to_segment22 => p_to_segment22
294 ,p_to_segment23 => p_to_segment23
295 ,p_to_segment24 => p_to_segment24
296 ,p_to_segment25 => p_to_segment25
297 ,p_to_segment26 => p_to_segment26
298 ,p_to_segment27 => p_to_segment27
299 ,p_to_segment28 => p_to_segment28
300 ,p_to_segment29 => p_to_segment29
301 ,p_to_segment30 => p_to_segment30
302 ,p_transfer_from_cc_id => p_transfer_from_cc_id
303 ,p_transfer_to_cc_id => p_transfer_to_cc_id
304 ,p_effective_date => l_effective_date
305
306 );
307 exception
308 when hr_api.cannot_find_prog_unit then
309 hr_api.cannot_find_prog_unit_error
310 (p_module_name => 'CREATE_FINANCE_HEADER'
311 ,p_hook_type => 'BP'
312 );
313 end;
314
315 ota_tfh_api_ins.ins
316 (
317 P_finance_header_id => p_finance_header_id
318 ,P_object_version_number => p_object_version_number
319 ,P_superceding_header_id => p_superceding_header_id
320 ,P_authorizer_person_id => p_authorizer_person_id
321 ,P_organization_id => p_organization_id
322 ,P_administrator => p_administrator
323 ,P_cancelled_flag => p_cancelled_flag
324 ,P_currency_code => p_currency_code
325 ,P_date_raised => p_date_raised
326 ,P_payment_status_flag => p_payment_status_flag
327 ,P_transfer_status => p_transfer_status
328 ,P_type => p_type
329 ,p_receivable_type => p_receivable_type
330 ,P_comments => p_comments
331 ,P_external_reference => p_external_reference
332 ,P_invoice_address => p_invoice_address
333 ,P_invoice_contact => p_invoice_contact
334 ,P_payment_method => p_payment_method
335 ,P_pym_attribute1 => p_pym_attribute1
336 ,P_pym_attribute2 => p_pym_attribute2
337 ,P_pym_attribute3 => p_pym_attribute3
338 ,P_pym_attribute4 => p_pym_attribute4
339 ,P_pym_attribute5 => p_pym_attribute5
343 ,P_pym_attribute9 => p_pym_attribute9
340 ,P_pym_attribute6 => p_pym_attribute6
341 ,P_pym_attribute7 => p_pym_attribute7
342 ,P_pym_attribute8 => p_pym_attribute8
344 ,P_pym_attribute10 => p_pym_attribute10
345 ,P_pym_attribute11 => p_pym_attribute11
346 ,P_pym_attribute12 => p_pym_attribute12
347 ,P_pym_attribute13 => p_pym_attribute13
348 ,P_pym_attribute14 => p_pym_attribute14
349 ,P_pym_attribute15 => p_pym_attribute15
350 ,P_pym_attribute16 => p_pym_attribute16
351 ,P_pym_attribute17 => p_pym_attribute17
352 ,P_pym_attribute18 => p_pym_attribute18
353 ,P_pym_attribute19 => p_pym_attribute19
354 ,P_pym_attribute20 => p_pym_attribute20
355 ,P_pym_information_category => p_pym_information_category
356 ,P_transfer_date => p_transfer_date
357 ,P_transfer_message => p_transfer_message
358 ,P_vendor_id => p_vendor_id
359 ,P_contact_id => p_contact_id
360 ,P_address_id => p_address_id
361 ,P_customer_id => p_customer_id
362 ,P_tfh_information_category => p_tfh_information_category
363 ,P_tfh_information1 => p_tfh_information1
364 ,P_tfh_information2 => p_tfh_information2
365 ,P_tfh_information3 => p_tfh_information3
366 ,P_tfh_information4 => p_tfh_information4
367 ,P_tfh_information5 => p_tfh_information5
368 ,P_tfh_information6 => p_tfh_information6
369 ,P_tfh_information7 => p_tfh_information7
370 ,P_tfh_information8 => p_tfh_information8
371 ,P_tfh_information9 => p_tfh_information9
372 ,P_tfh_information10 => p_tfh_information10
373 ,P_tfh_information11 => p_tfh_information11
374 ,P_tfh_information12 => p_tfh_information12
375 ,P_tfh_information13 => p_tfh_information13
376 ,P_tfh_information14 => p_tfh_information14
377 ,P_tfh_information15 => p_tfh_information15
378 ,P_tfh_information16 => p_tfh_information16
379 ,P_tfh_information17 => p_tfh_information17
380 ,P_tfh_information18 => p_tfh_information18
381 ,P_tfh_information19 => p_tfh_information19
382 ,P_tfh_information20 => p_tfh_information20
383 ,P_paying_cost_center => p_paying_cost_center
384 ,P_receiving_cost_center => p_receiving_cost_center
385 ,p_transfer_from_set_of_book_id => p_transfer_from_set_of_book_id
386 ,p_transfer_to_set_of_book_id => p_transfer_to_set_of_book_id
387 ,p_from_segment1 => p_from_segment1
388 ,p_from_segment2 => p_from_segment2
389 ,p_from_segment3 => p_from_segment3
390 ,p_from_segment4 => p_from_segment4
391 ,p_from_segment5 => p_from_segment5
392 ,p_from_segment6 => p_from_segment6
393 ,p_from_segment7 => p_from_segment7
394 ,p_from_segment8 => p_from_segment8
395 ,p_from_segment9 => p_from_segment9
396 ,p_from_segment10 => p_from_segment10
397 ,p_from_segment11 => p_from_segment11
398 ,p_from_segment12 => p_from_segment12
399 ,p_from_segment13 => p_from_segment13
400 ,p_from_segment14 => p_from_segment14
401 ,p_from_segment15 => p_from_segment15
402 ,p_from_segment16 => p_from_segment16
403 ,p_from_segment17 => p_from_segment17
404 ,p_from_segment18 => p_from_segment18
405 ,p_from_segment19 => p_from_segment19
406 ,p_from_segment20 => p_from_segment20
407 ,p_from_segment21 => p_from_segment21
408 ,p_from_segment22 => p_from_segment22
409 ,p_from_segment23 => p_from_segment23
410 ,p_from_segment24 => p_from_segment24
411 ,p_from_segment25 => p_from_segment25
412 ,p_from_segment26 => p_from_segment26
413 ,p_from_segment27 => p_from_segment27
414 ,p_from_segment28 => p_from_segment28
415 ,p_from_segment29 => p_from_segment29
416 ,p_from_segment30 => p_from_segment30
417 ,p_to_segment1 => p_to_segment1
418 ,p_to_segment2 => p_to_segment2
419 ,p_to_segment3 => p_to_segment3
420 ,p_to_segment4 => p_to_segment4
421 ,p_to_segment5 => p_to_segment5
422 ,p_to_segment6 => p_to_segment6
423 ,p_to_segment7 => p_to_segment7
424 ,p_to_segment8 => p_to_segment8
425 ,p_to_segment9 => p_to_segment9
426 ,p_to_segment10 => p_to_segment10
427 ,p_to_segment11 => p_to_segment11
428 ,p_to_segment12 => p_to_segment12
429 ,p_to_segment13 => p_to_segment13
430 ,p_to_segment14 => p_to_segment14
431 ,p_to_segment15 => p_to_segment15
432 ,p_to_segment16 => p_to_segment16
433 ,p_to_segment17 => p_to_segment17
434 ,p_to_segment18 => p_to_segment18
435 ,p_to_segment19 => p_to_segment19
436 ,p_to_segment20 => p_to_segment20
437 ,p_to_segment21 => p_to_segment21
438 ,p_to_segment22 => p_to_segment22
439 ,p_to_segment23 => p_to_segment23
443 ,p_to_segment27 => p_to_segment27
440 ,p_to_segment24 => p_to_segment24
441 ,p_to_segment25 => p_to_segment25
442 ,p_to_segment26 => p_to_segment26
444 ,p_to_segment28 => p_to_segment28
445 ,p_to_segment29 => p_to_segment29
446 ,p_to_segment30 => p_to_segment30
447 ,p_transfer_from_cc_id => p_transfer_from_cc_id
448 ,p_transfer_to_cc_id => p_transfer_to_cc_id
449 ,p_validate => false
450 ,P_transaction_type => 'INSERT'
451 );
452
453 --
454 -- Call After Process User Hook
455 --
456
457 begin
458 OTA_FINANCE_HEADER_BK1.CREATE_FINANCE_HEADER_A
459 (
460 P_finance_header_id => p_finance_header_id
461 ,P_object_version_number => p_object_version_number
462 ,P_superceding_header_id => p_superceding_header_id
463 ,P_authorizer_person_id => p_authorizer_person_id
464 ,P_organization_id => p_organization_id
465 ,P_administrator => p_administrator
466 ,P_cancelled_flag => p_cancelled_flag
467 ,P_currency_code => p_currency_code
468 ,P_date_raised => p_date_raised
469 ,P_payment_status_flag => p_payment_status_flag
470 ,P_transfer_status => p_transfer_status
471 ,P_type => p_type
472 ,p_receivable_type => p_receivable_type
473 ,P_comments => p_comments
474 ,P_external_reference => p_external_reference
475 ,P_invoice_address => p_invoice_address
476 ,P_invoice_contact => p_invoice_contact
477 ,P_payment_method => p_payment_method
478 ,P_pym_attribute1 => p_pym_attribute1
479 ,P_pym_attribute2 => p_pym_attribute2
480 ,P_pym_attribute3 => p_pym_attribute3
481 ,P_pym_attribute4 => p_pym_attribute4
482 ,P_pym_attribute5 => p_pym_attribute5
483 ,P_pym_attribute6 => p_pym_attribute6
484 ,P_pym_attribute7 => p_pym_attribute7
485 ,P_pym_attribute8 => p_pym_attribute8
486 ,P_pym_attribute9 => p_pym_attribute9
487 ,P_pym_attribute10 => p_pym_attribute10
488 ,P_pym_attribute11 => p_pym_attribute11
489 ,P_pym_attribute12 => p_pym_attribute12
490 ,P_pym_attribute13 => p_pym_attribute13
491 ,P_pym_attribute14 => p_pym_attribute14
492 ,P_pym_attribute15 => p_pym_attribute15
493 ,P_pym_attribute16 => p_pym_attribute16
494 ,P_pym_attribute17 => p_pym_attribute17
495 ,P_pym_attribute18 => p_pym_attribute18
496 ,P_pym_attribute19 => p_pym_attribute19
497 ,P_pym_attribute20 => p_pym_attribute20
498 ,P_pym_information_category => p_pym_information_category
499 ,P_transfer_date => p_transfer_date
500 ,P_transfer_message => p_transfer_message
501 ,P_vendor_id => p_vendor_id
502 ,P_contact_id => p_contact_id
503 ,P_address_id => p_address_id
504 ,P_customer_id => p_customer_id
505 ,P_tfh_information_category => p_tfh_information_category
506 ,P_tfh_information1 => p_tfh_information1
507 ,P_tfh_information2 => p_tfh_information2
508 ,P_tfh_information3 => p_tfh_information3
509 ,P_tfh_information4 => p_tfh_information4
510 ,P_tfh_information5 => p_tfh_information5
511 ,P_tfh_information6 => p_tfh_information6
512 ,P_tfh_information7 => p_tfh_information7
513 ,P_tfh_information8 => p_tfh_information8
514 ,P_tfh_information9 => p_tfh_information9
515 ,P_tfh_information10 => p_tfh_information10
516 ,P_tfh_information11 => p_tfh_information11
517 ,P_tfh_information12 => p_tfh_information12
518 ,P_tfh_information13 => p_tfh_information13
519 ,P_tfh_information14 => p_tfh_information14
520 ,P_tfh_information15 => p_tfh_information15
521 ,P_tfh_information16 => p_tfh_information16
522 ,P_tfh_information17 => p_tfh_information17
523 ,P_tfh_information18 => p_tfh_information18
524 ,P_tfh_information19 => p_tfh_information19
525 ,P_tfh_information20 => p_tfh_information20
526 ,P_paying_cost_center => p_paying_cost_center
527 ,P_receiving_cost_center => p_receiving_cost_center
528 ,p_transfer_from_set_of_book_id => p_transfer_from_set_of_book_id
529 ,p_transfer_to_set_of_book_id => p_transfer_to_set_of_book_id
530 ,p_from_segment1 => p_from_segment1
531 ,p_from_segment2 => p_from_segment2
532 ,p_from_segment3 => p_from_segment3
533 ,p_from_segment4 => p_from_segment4
534 ,p_from_segment5 => p_from_segment5
535 ,p_from_segment6 => p_from_segment6
536 ,p_from_segment7 => p_from_segment7
537 ,p_from_segment8 => p_from_segment8
538 ,p_from_segment9 => p_from_segment9
539 ,p_from_segment10 => p_from_segment10
540 ,p_from_segment11 => p_from_segment11
541 ,p_from_segment12 => p_from_segment12
542 ,p_from_segment13 => p_from_segment13
543 ,p_from_segment14 => p_from_segment14
544 ,p_from_segment15 => p_from_segment15
548 ,p_from_segment19 => p_from_segment19
545 ,p_from_segment16 => p_from_segment16
546 ,p_from_segment17 => p_from_segment17
547 ,p_from_segment18 => p_from_segment18
549 ,p_from_segment20 => p_from_segment20
550 ,p_from_segment21 => p_from_segment21
551 ,p_from_segment22 => p_from_segment22
552 ,p_from_segment23 => p_from_segment23
553 ,p_from_segment24 => p_from_segment24
554 ,p_from_segment25 => p_from_segment25
555 ,p_from_segment26 => p_from_segment26
556 ,p_from_segment27 => p_from_segment27
557 ,p_from_segment28 => p_from_segment28
558 ,p_from_segment29 => p_from_segment29
559 ,p_from_segment30 => p_from_segment30
560 ,p_to_segment1 => p_to_segment1
561 ,p_to_segment2 => p_to_segment2
562 ,p_to_segment3 => p_to_segment3
563 ,p_to_segment4 => p_to_segment4
564 ,p_to_segment5 => p_to_segment5
565 ,p_to_segment6 => p_to_segment6
566 ,p_to_segment7 => p_to_segment7
567 ,p_to_segment8 => p_to_segment8
568 ,p_to_segment9 => p_to_segment9
569 ,p_to_segment10 => p_to_segment10
570 ,p_to_segment11 => p_to_segment11
571 ,p_to_segment12 => p_to_segment12
572 ,p_to_segment13 => p_to_segment13
573 ,p_to_segment14 => p_to_segment14
574 ,p_to_segment15 => p_to_segment15
575 ,p_to_segment16 => p_to_segment16
576 ,p_to_segment17 => p_to_segment17
577 ,p_to_segment18 => p_to_segment18
578 ,p_to_segment19 => p_to_segment19
579 ,p_to_segment20 => p_to_segment20
580 ,p_to_segment21 => p_to_segment21
581 ,p_to_segment22 => p_to_segment22
582 ,p_to_segment23 => p_to_segment23
583 ,p_to_segment24 => p_to_segment24
584 ,p_to_segment25 => p_to_segment25
585 ,p_to_segment26 => p_to_segment26
586 ,p_to_segment27 => p_to_segment27
587 ,p_to_segment28 => p_to_segment28
588 ,p_to_segment29 => p_to_segment29
589 ,p_to_segment30 => p_to_segment30
590 ,p_transfer_from_cc_id => p_transfer_from_cc_id
591 ,p_transfer_to_cc_id => p_transfer_to_cc_id
592 ,p_effective_date => l_effective_date
593
594
595
596
597 );
598 exception
599 when hr_api.cannot_find_prog_unit then
600 hr_api.cannot_find_prog_unit_error
601 (p_module_name => 'CREATE_FINANCE_HEADER'
602 ,p_hook_type => 'AP'
603 );
604 end;
605
606 --
607 -- When in validation only mode raise the Validate_Enabled exception
608 --
609 if p_validate then
610 raise hr_api.validate_enabled;
611 end if;
612 --
613 -- Set all output arguments
614 --
615 p_finance_header_id := l_finance_header_id;
616 p_object_version_number := l_object_version_number;
617
618
619 hr_utility.set_location(' Leaving:'||l_proc, 70);
620 exception
621 when hr_api.validate_enabled then
622 --
623 -- As the Validate_Enabled exception has been raised
624 -- we must rollback to the savepoint
625 --
626 rollback to CREATE_FINANCE_HEADER;
627 --
628 -- Only set output warning arguments
629 -- (Any key or derived arguments must be set to null
630 -- when validation only mode is being used.)
631 --
632 p_finance_header_id := null;
633 p_object_version_number := null;
634 hr_utility.set_location(' Leaving:'||l_proc, 80);
635 when others then
636 --
637 -- A validation or unexpected error has occured
638 --
639 rollback to CREATE_FINANCE_HEADER;
640 p_finance_header_id := null;
641 p_object_version_number := null;
642 hr_utility.set_location(' Leaving:'||l_proc, 90);
643 raise;
644 end create_FINANCE_HEADER;
645 -- ----------------------------------------------------------------------------
646 -- |----------------------------< UPDATE_FINANCE_HEADER >---------------------------|
647 -- ----------------------------------------------------------------------------
648 --
649 procedure UPDATE_FINANCE_HEADER
650 (
651 p_finance_header_id in number,
652 p_object_version_number in out nocopy number ,
653 p_new_object_version_number out nocopy number,
654 p_superceding_header_id in number ,
655 p_authorizer_person_id in number ,
656 p_organization_id in number,
657 p_administrator in number,
658 p_cancelled_flag in varchar2,
659 p_currency_code in varchar2,
660 p_date_raised in date,
661 p_payment_status_flag in varchar2,
662 p_transfer_status in varchar2,
663 p_type in varchar2,
664 p_receivable_type in varchar2,
665 p_comments in varchar2,
666 p_external_reference in varchar2,
667 p_invoice_address in varchar2,
668 p_invoice_contact in varchar2,
669 p_payment_method in varchar2,
670 p_pym_information_category in varchar2,
671 p_pym_attribute1 in varchar2,
672 p_pym_attribute2 in varchar2,
673 p_pym_attribute3 in varchar2,
677 p_pym_attribute7 in varchar2,
674 p_pym_attribute4 in varchar2,
675 p_pym_attribute5 in varchar2,
676 p_pym_attribute6 in varchar2,
678 p_pym_attribute8 in varchar2,
679 p_pym_attribute9 in varchar2,
680 p_pym_attribute10 in varchar2,
681 p_pym_attribute11 in varchar2,
682 p_pym_attribute12 in varchar2,
683 p_pym_attribute13 in varchar2,
684 p_pym_attribute14 in varchar2,
685 p_pym_attribute15 in varchar2,
686 p_pym_attribute16 in varchar2,
687 p_pym_attribute17 in varchar2,
688 p_pym_attribute18 in varchar2,
689 p_pym_attribute19 in varchar2,
690 p_pym_attribute20 in varchar2,
691 p_transfer_date in date ,
692 p_transfer_message in varchar2,
693 p_vendor_id in number ,
694 p_contact_id in number ,
695 p_address_id in number ,
696 p_customer_id in number ,
697 p_tfh_information_category in varchar2,
698 p_tfh_information1 in varchar2,
699 p_tfh_information2 in varchar2,
700 p_tfh_information3 in varchar2,
701 p_tfh_information4 in varchar2,
702 p_tfh_information5 in varchar2,
703 p_tfh_information6 in varchar2,
704 p_tfh_information7 in varchar2,
705 p_tfh_information8 in varchar2,
706 p_tfh_information9 in varchar2,
707 p_tfh_information10 in varchar2,
708 p_tfh_information11 in varchar2,
709 p_tfh_information12 in varchar2,
710 p_tfh_information13 in varchar2,
711 p_tfh_information14 in varchar2,
712 p_tfh_information15 in varchar2,
713 p_tfh_information16 in varchar2,
714 p_tfh_information17 in varchar2,
715 p_tfh_information18 in varchar2,
716 p_tfh_information19 in varchar2,
717 p_tfh_information20 in varchar2,
718 p_paying_cost_center in varchar2,
719 p_receiving_cost_center in varchar2,
720 p_transfer_from_set_of_book_id in number,
721 p_transfer_to_set_of_book_id in number,
722 p_from_segment1 in varchar2,
723 p_from_segment2 in varchar2,
724 p_from_segment3 in varchar2,
725 p_from_segment4 in varchar2,
726 p_from_segment5 in varchar2,
727 p_from_segment6 in varchar2,
728 p_from_segment7 in varchar2,
729 p_from_segment8 in varchar2,
730 p_from_segment9 in varchar2,
731 p_from_segment10 in varchar2,
732 p_from_segment11 in varchar2,
733 p_from_segment12 in varchar2,
734 p_from_segment13 in varchar2,
735 p_from_segment14 in varchar2,
736 p_from_segment15 in varchar2,
737 p_from_segment16 in varchar2,
738 p_from_segment17 in varchar2,
739 p_from_segment18 in varchar2,
740 p_from_segment19 in varchar2,
741 p_from_segment20 in varchar2,
742 p_from_segment21 in varchar2,
743 p_from_segment22 in varchar2,
744 p_from_segment23 in varchar2,
745 p_from_segment24 in varchar2,
746 p_from_segment25 in varchar2,
747 p_from_segment26 in varchar2,
748 p_from_segment27 in varchar2,
749 p_from_segment28 in varchar2,
750 p_from_segment29 in varchar2,
751 p_from_segment30 in varchar2,
752 p_to_segment1 in varchar2,
753 p_to_segment2 in varchar2,
754 p_to_segment3 in varchar2,
755 p_to_segment4 in varchar2,
756 p_to_segment5 in varchar2,
757 p_to_segment6 in varchar2,
758 p_to_segment7 in varchar2,
759 p_to_segment8 in varchar2,
760 p_to_segment9 in varchar2,
761 p_to_segment10 in varchar2,
762 p_to_segment11 in varchar2,
763 p_to_segment12 in varchar2,
764 p_to_segment13 in varchar2,
765 p_to_segment14 in varchar2,
766 p_to_segment15 in varchar2,
767 p_to_segment16 in varchar2,
768 p_to_segment17 in varchar2,
769 p_to_segment18 in varchar2,
770 p_to_segment19 in varchar2,
771 p_to_segment20 in varchar2,
772 p_to_segment21 in varchar2,
773 p_to_segment22 in varchar2,
774 p_to_segment23 in varchar2,
775 p_to_segment24 in varchar2,
776 p_to_segment25 in varchar2,
777 p_to_segment26 in varchar2,
778 p_to_segment27 in varchar2,
779 p_to_segment28 in varchar2,
780 p_to_segment29 in varchar2,
781 p_to_segment30 in varchar2,
782 p_transfer_from_cc_id in number,
783 p_transfer_to_cc_id in number,
784 P_validate in boolean default false,
785 p_effective_date in date
786 ) is
787 --
788 -- Declare cursors and local variables
789 --
790 l_proc varchar2(72) := g_package||' Update Training Plan';
791 l_effective_date date;
792 l_object_version_number number := p_object_version_number;
796 --
793 l_name varchar2(80);
794 begin
795 hr_utility.set_location('Entering:'|| l_proc, 10);
797 -- Issue a savepoint
798 --
799 savepoint UPDATE_FINANCE_HEADER;
800 --
801 -- Truncate the time portion from all IN date parameters
802 --
803 l_effective_date := trunc(p_effective_date);
804 --
805 -- Call Before Process User Hook
806 --
807
808 begin
809 OTA_FINANCE_HEADER_BK2.UPDATE_FINANCE_HEADER_B
810 ( P_finance_header_id => p_finance_header_id
811 ,P_object_version_number => l_object_version_number
812 ,P_superceding_header_id => p_superceding_header_id
813 ,P_authorizer_person_id => p_authorizer_person_id
814 ,P_organization_id => p_organization_id
815 ,P_administrator => p_administrator
816 ,P_cancelled_flag => p_cancelled_flag
817 ,P_currency_code => p_currency_code
818 ,P_date_raised => p_date_raised
819 ,P_payment_status_flag => p_payment_status_flag
820 ,P_transfer_status => p_transfer_status
821 ,P_type => p_type
822 ,p_receivable_type => p_receivable_type
823 ,P_comments => p_comments
824 ,P_external_reference => p_external_reference
825 ,P_invoice_address => p_invoice_address
826 ,P_invoice_contact => p_invoice_contact
827 ,P_payment_method => p_payment_method
828 ,P_pym_attribute1 => p_pym_attribute1
829 ,P_pym_attribute2 => p_pym_attribute2
830 ,P_pym_attribute3 => p_pym_attribute3
831 ,P_pym_attribute4 => p_pym_attribute4
832 ,P_pym_attribute5 => p_pym_attribute5
833 ,P_pym_attribute6 => p_pym_attribute6
834 ,P_pym_attribute7 => p_pym_attribute7
835 ,P_pym_attribute8 => p_pym_attribute8
836 ,P_pym_attribute9 => p_pym_attribute9
837 ,P_pym_attribute10 => p_pym_attribute10
838 ,P_pym_attribute11 => p_pym_attribute11
839 ,P_pym_attribute12 => p_pym_attribute12
840 ,P_pym_attribute13 => p_pym_attribute13
841 ,P_pym_attribute14 => p_pym_attribute14
842 ,P_pym_attribute15 => p_pym_attribute15
843 ,P_pym_attribute16 => p_pym_attribute16
844 ,P_pym_attribute17 => p_pym_attribute17
845 ,P_pym_attribute18 => p_pym_attribute18
846 ,P_pym_attribute19 => p_pym_attribute19
847 ,P_pym_attribute20 => p_pym_attribute20
848 ,P_pym_information_category => p_pym_information_category
849 ,P_transfer_date => p_transfer_date
850 ,P_transfer_message => p_transfer_message
851 ,P_vendor_id => p_vendor_id
852 ,P_contact_id => p_contact_id
853 ,P_address_id => p_address_id
854 ,P_customer_id => p_customer_id
855 ,P_tfh_information_category => p_tfh_information_category
856 ,P_tfh_information1 => p_tfh_information1
857 ,P_tfh_information2 => p_tfh_information2
858 ,P_tfh_information3 => p_tfh_information3
859 ,P_tfh_information4 => p_tfh_information4
860 ,P_tfh_information5 => p_tfh_information5
861 ,P_tfh_information6 => p_tfh_information6
862 ,P_tfh_information7 => p_tfh_information7
863 ,P_tfh_information8 => p_tfh_information8
864 ,P_tfh_information9 => p_tfh_information9
865 ,P_tfh_information10 => p_tfh_information10
866 ,P_tfh_information11 => p_tfh_information11
867 ,P_tfh_information12 => p_tfh_information12
868 ,P_tfh_information13 => p_tfh_information13
869 ,P_tfh_information14 => p_tfh_information14
870 ,P_tfh_information15 => p_tfh_information15
871 ,P_tfh_information16 => p_tfh_information16
872 ,P_tfh_information17 => p_tfh_information17
873 ,P_tfh_information18 => p_tfh_information18
874 ,P_tfh_information19 => p_tfh_information19
875 ,P_tfh_information20 => p_tfh_information20
876 ,P_paying_cost_center => p_paying_cost_center
877 ,P_receiving_cost_center => p_receiving_cost_center
878 ,p_transfer_from_set_of_book_id => p_transfer_from_set_of_book_id
879 ,p_transfer_to_set_of_book_id => p_transfer_to_set_of_book_id
880 ,p_from_segment1 => p_from_segment1
881 ,p_from_segment2 => p_from_segment2
882 ,p_from_segment3 => p_from_segment3
883 ,p_from_segment4 => p_from_segment4
884 ,p_from_segment5 => p_from_segment5
885 ,p_from_segment6 => p_from_segment6
886 ,p_from_segment7 => p_from_segment7
887 ,p_from_segment8 => p_from_segment8
888 ,p_from_segment9 => p_from_segment9
889 ,p_from_segment10 => p_from_segment10
890 ,p_from_segment11 => p_from_segment11
891 ,p_from_segment12 => p_from_segment12
892 ,p_from_segment13 => p_from_segment13
893 ,p_from_segment14 => p_from_segment14
894 ,p_from_segment15 => p_from_segment15
895 ,p_from_segment16 => p_from_segment16
896 ,p_from_segment17 => p_from_segment17
897 ,p_from_segment18 => p_from_segment18
898 ,p_from_segment19 => p_from_segment19
899 ,p_from_segment20 => p_from_segment20
900 ,p_from_segment21 => p_from_segment21
904 ,p_from_segment25 => p_from_segment25
901 ,p_from_segment22 => p_from_segment22
902 ,p_from_segment23 => p_from_segment23
903 ,p_from_segment24 => p_from_segment24
905 ,p_from_segment26 => p_from_segment26
906 ,p_from_segment27 => p_from_segment27
907 ,p_from_segment28 => p_from_segment28
908 ,p_from_segment29 => p_from_segment29
909 ,p_from_segment30 => p_from_segment30
910 ,p_to_segment1 => p_to_segment1
911 ,p_to_segment2 => p_to_segment2
912 ,p_to_segment3 => p_to_segment3
913 ,p_to_segment4 => p_to_segment4
914 ,p_to_segment5 => p_to_segment5
915 ,p_to_segment6 => p_to_segment6
916 ,p_to_segment7 => p_to_segment7
917 ,p_to_segment8 => p_to_segment8
918 ,p_to_segment9 => p_to_segment9
919 ,p_to_segment10 => p_to_segment10
920 ,p_to_segment11 => p_to_segment11
921 ,p_to_segment12 => p_to_segment12
922 ,p_to_segment13 => p_to_segment13
923 ,p_to_segment14 => p_to_segment14
924 ,p_to_segment15 => p_to_segment15
925 ,p_to_segment16 => p_to_segment16
926 ,p_to_segment17 => p_to_segment17
927 ,p_to_segment18 => p_to_segment18
928 ,p_to_segment19 => p_to_segment19
929 ,p_to_segment20 => p_to_segment20
930 ,p_to_segment21 => p_to_segment21
931 ,p_to_segment22 => p_to_segment22
932 ,p_to_segment23 => p_to_segment23
933 ,p_to_segment24 => p_to_segment24
934 ,p_to_segment25 => p_to_segment25
935 ,p_to_segment26 => p_to_segment26
936 ,p_to_segment27 => p_to_segment27
937 ,p_to_segment28 => p_to_segment28
938 ,p_to_segment29 => p_to_segment29
939 ,p_to_segment30 => p_to_segment30
940 ,p_transfer_from_cc_id => p_transfer_from_cc_id
941 ,p_transfer_to_cc_id => p_transfer_to_cc_id
942 ,p_effective_date => l_effective_date
943
944
945 );
946 exception
947 when hr_api.cannot_find_prog_unit then
948 hr_api.cannot_find_prog_unit_error
949 (p_module_name => 'UPDATE_FINANCE_HEADER'
950 ,p_hook_type => 'BP'
951 );
952 end;
953 --
954 -- Validation in addition to Row Handlers
955 --
956 --
957 -- Process Logic
958 --
959 ota_tfh_api_upd.Upd
960
961 (
962 P_finance_header_id => p_finance_header_id
963 ,P_object_version_number => l_object_version_number
964 ,P_superceding_header_id => p_superceding_header_id
965 ,P_authorizer_person_id => p_authorizer_person_id
966 ,P_organization_id => p_organization_id
967 ,P_administrator => p_administrator
968 ,P_cancelled_flag => p_cancelled_flag
969 ,P_currency_code => p_currency_code
970 ,P_date_raised => p_date_raised
971 ,P_payment_status_flag => p_payment_status_flag
972 ,P_transfer_status => p_transfer_status
973 ,P_type => p_type
974 ,p_receivable_type => p_receivable_type
975 ,P_comments => p_comments
976 ,P_external_reference => p_external_reference
977 ,P_invoice_address => p_invoice_address
978 ,P_invoice_contact => p_invoice_contact
979 ,P_payment_method => p_payment_method
980 ,P_pym_attribute1 => p_pym_attribute1
981 ,P_pym_attribute2 => p_pym_attribute2
982 ,P_pym_attribute3 => p_pym_attribute3
983 ,P_pym_attribute4 => p_pym_attribute4
984 ,P_pym_attribute5 => p_pym_attribute5
985 ,P_pym_attribute6 => p_pym_attribute6
986 ,P_pym_attribute7 => p_pym_attribute7
987 ,P_pym_attribute8 => p_pym_attribute8
988 ,P_pym_attribute9 => p_pym_attribute9
989 ,P_pym_attribute10 => p_pym_attribute10
990 ,P_pym_attribute11 => p_pym_attribute11
991 ,P_pym_attribute12 => p_pym_attribute12
992 ,P_pym_attribute13 => p_pym_attribute13
993 ,P_pym_attribute14 => p_pym_attribute14
994 ,P_pym_attribute15 => p_pym_attribute15
995 ,P_pym_attribute16 => p_pym_attribute16
996 ,P_pym_attribute17 => p_pym_attribute17
997 ,P_pym_attribute18 => p_pym_attribute18
998 ,P_pym_attribute19 => p_pym_attribute19
999 ,P_pym_attribute20 => p_pym_attribute20
1000 ,P_pym_information_category => p_pym_information_category
1001 ,P_transfer_date => p_transfer_date
1002 ,P_transfer_message => p_transfer_message
1003 ,P_vendor_id => p_vendor_id
1004 ,P_contact_id => p_contact_id
1005 ,P_address_id => p_address_id
1006 ,P_customer_id => p_customer_id
1007 ,P_tfh_information_category => p_tfh_information_category
1008 ,P_tfh_information1 => p_tfh_information1
1009 ,P_tfh_information2 => p_tfh_information2
1010 ,P_tfh_information3 => p_tfh_information3
1011 ,P_tfh_information4 => p_tfh_information4
1012 ,P_tfh_information5 => p_tfh_information5
1016 ,P_tfh_information9 => p_tfh_information9
1013 ,P_tfh_information6 => p_tfh_information6
1014 ,P_tfh_information7 => p_tfh_information7
1015 ,P_tfh_information8 => p_tfh_information8
1017 ,P_tfh_information10 => p_tfh_information10
1018 ,P_tfh_information11 => p_tfh_information11
1019 ,P_tfh_information12 => p_tfh_information12
1020 ,P_tfh_information13 => p_tfh_information13
1021 ,P_tfh_information14 => p_tfh_information14
1022 ,P_tfh_information15 => p_tfh_information15
1023 ,P_tfh_information16 => p_tfh_information16
1024 ,P_tfh_information17 => p_tfh_information17
1025 ,P_tfh_information18 => p_tfh_information18
1026 ,P_tfh_information19 => p_tfh_information19
1027 ,P_tfh_information20 => p_tfh_information20
1028 ,P_paying_cost_center => p_paying_cost_center
1029 ,P_receiving_cost_center => p_receiving_cost_center
1030 ,p_transfer_from_set_of_book_id => p_transfer_from_set_of_book_id
1031 ,p_transfer_to_set_of_book_id => p_transfer_to_set_of_book_id
1032 ,p_from_segment1 => p_from_segment1
1033 ,p_from_segment2 => p_from_segment2
1034 ,p_from_segment3 => p_from_segment3
1035 ,p_from_segment4 => p_from_segment4
1036 ,p_from_segment5 => p_from_segment5
1037 ,p_from_segment6 => p_from_segment6
1038 ,p_from_segment7 => p_from_segment7
1039 ,p_from_segment8 => p_from_segment8
1040 ,p_from_segment9 => p_from_segment9
1041 ,p_from_segment10 => p_from_segment10
1042 ,p_from_segment11 => p_from_segment11
1043 ,p_from_segment12 => p_from_segment12
1044 ,p_from_segment13 => p_from_segment13
1045 ,p_from_segment14 => p_from_segment14
1046 ,p_from_segment15 => p_from_segment15
1047 ,p_from_segment16 => p_from_segment16
1048 ,p_from_segment17 => p_from_segment17
1049 ,p_from_segment18 => p_from_segment18
1050 ,p_from_segment19 => p_from_segment19
1051 ,p_from_segment20 => p_from_segment20
1052 ,p_from_segment21 => p_from_segment21
1053 ,p_from_segment22 => p_from_segment22
1054 ,p_from_segment23 => p_from_segment23
1055 ,p_from_segment24 => p_from_segment24
1056 ,p_from_segment25 => p_from_segment25
1057 ,p_from_segment26 => p_from_segment26
1058 ,p_from_segment27 => p_from_segment27
1059 ,p_from_segment28 => p_from_segment28
1060 ,p_from_segment29 => p_from_segment29
1061 ,p_from_segment30 => p_from_segment30
1062 ,p_to_segment1 => p_to_segment1
1063 ,p_to_segment2 => p_to_segment2
1064 ,p_to_segment3 => p_to_segment3
1065 ,p_to_segment4 => p_to_segment4
1066 ,p_to_segment5 => p_to_segment5
1067 ,p_to_segment6 => p_to_segment6
1068 ,p_to_segment7 => p_to_segment7
1069 ,p_to_segment8 => p_to_segment8
1070 ,p_to_segment9 => p_to_segment9
1071 ,p_to_segment10 => p_to_segment10
1072 ,p_to_segment11 => p_to_segment11
1073 ,p_to_segment12 => p_to_segment12
1074 ,p_to_segment13 => p_to_segment13
1075 ,p_to_segment14 => p_to_segment14
1076 ,p_to_segment15 => p_to_segment15
1077 ,p_to_segment16 => p_to_segment16
1078 ,p_to_segment17 => p_to_segment17
1079 ,p_to_segment18 => p_to_segment18
1080 ,p_to_segment19 => p_to_segment19
1081 ,p_to_segment20 => p_to_segment20
1082 ,p_to_segment21 => p_to_segment21
1083 ,p_to_segment22 => p_to_segment22
1084 ,p_to_segment23 => p_to_segment23
1085 ,p_to_segment24 => p_to_segment24
1086 ,p_to_segment25 => p_to_segment25
1087 ,p_to_segment26 => p_to_segment26
1088 ,p_to_segment27 => p_to_segment27
1089 ,p_to_segment28 => p_to_segment28
1090 ,p_to_segment29 => p_to_segment29
1091 ,p_to_segment30 => p_to_segment30
1092 ,p_transfer_from_cc_id => p_transfer_from_cc_id
1093 ,p_transfer_to_cc_id => p_transfer_to_cc_id
1094 ,P_validate => false
1095
1096 ,P_transaction_type => 'UPDATE'
1097 );
1098
1099 begin
1100 OTA_FINANCE_HEADER_BK2.UPDATE_FINANCE_HEADER_A
1101 ( P_finance_header_id => p_finance_header_id
1102 ,P_object_version_number => l_object_version_number
1103 ,P_superceding_header_id => p_superceding_header_id
1104 ,P_authorizer_person_id => p_authorizer_person_id
1105 ,P_organization_id => p_organization_id
1106 ,P_administrator => p_administrator
1107 ,P_cancelled_flag => p_cancelled_flag
1108 ,P_currency_code => p_currency_code
1109 ,P_date_raised => p_date_raised
1110 ,P_payment_status_flag => p_payment_status_flag
1111 ,P_transfer_status => p_transfer_status
1112 ,P_type => p_type
1113 ,p_receivable_type => p_receivable_type
1114 ,P_comments => p_comments
1115 ,P_external_reference => p_external_reference
1116 ,P_invoice_address => p_invoice_address
1120 ,P_pym_attribute2 => p_pym_attribute2
1117 ,P_invoice_contact => p_invoice_contact
1118 ,P_payment_method => p_payment_method
1119 ,P_pym_attribute1 => p_pym_attribute1
1121 ,P_pym_attribute3 => p_pym_attribute3
1122 ,P_pym_attribute4 => p_pym_attribute4
1123 ,P_pym_attribute5 => p_pym_attribute5
1124 ,P_pym_attribute6 => p_pym_attribute6
1125 ,P_pym_attribute7 => p_pym_attribute7
1126 ,P_pym_attribute8 => p_pym_attribute8
1127 ,P_pym_attribute9 => p_pym_attribute9
1128 ,P_pym_attribute10 => p_pym_attribute10
1129 ,P_pym_attribute11 => p_pym_attribute11
1130 ,P_pym_attribute12 => p_pym_attribute12
1131 ,P_pym_attribute13 => p_pym_attribute13
1132 ,P_pym_attribute14 => p_pym_attribute14
1133 ,P_pym_attribute15 => p_pym_attribute15
1134 ,P_pym_attribute16 => p_pym_attribute16
1135 ,P_pym_attribute17 => p_pym_attribute17
1136 ,P_pym_attribute18 => p_pym_attribute18
1137 ,P_pym_attribute19 => p_pym_attribute19
1138 ,P_pym_attribute20 => p_pym_attribute20
1139 ,P_pym_information_category => p_pym_information_category
1140 ,P_transfer_date => p_transfer_date
1141 ,P_transfer_message => p_transfer_message
1142 ,P_vendor_id => p_vendor_id
1143 ,P_contact_id => p_contact_id
1144 ,P_address_id => p_address_id
1145 ,P_customer_id => p_customer_id
1146 ,P_tfh_information_category => p_tfh_information_category
1147 ,P_tfh_information1 => p_tfh_information1
1148 ,P_tfh_information2 => p_tfh_information2
1149 ,P_tfh_information3 => p_tfh_information3
1150 ,P_tfh_information4 => p_tfh_information4
1151 ,P_tfh_information5 => p_tfh_information5
1152 ,P_tfh_information6 => p_tfh_information6
1153 ,P_tfh_information7 => p_tfh_information7
1154 ,P_tfh_information8 => p_tfh_information8
1155 ,P_tfh_information9 => p_tfh_information9
1156 ,P_tfh_information10 => p_tfh_information10
1157 ,P_tfh_information11 => p_tfh_information11
1158 ,P_tfh_information12 => p_tfh_information12
1159 ,P_tfh_information13 => p_tfh_information13
1160 ,P_tfh_information14 => p_tfh_information14
1161 ,P_tfh_information15 => p_tfh_information15
1162 ,P_tfh_information16 => p_tfh_information16
1163 ,P_tfh_information17 => p_tfh_information17
1164 ,P_tfh_information18 => p_tfh_information18
1165 ,P_tfh_information19 => p_tfh_information19
1166 ,P_tfh_information20 => p_tfh_information20
1167 ,P_paying_cost_center => p_paying_cost_center
1168 ,P_receiving_cost_center => p_receiving_cost_center
1169 ,p_transfer_from_set_of_book_id => p_transfer_from_set_of_book_id
1170 ,p_transfer_to_set_of_book_id => p_transfer_to_set_of_book_id
1171 ,p_from_segment1 => p_from_segment1
1172 ,p_from_segment2 => p_from_segment2
1173 ,p_from_segment3 => p_from_segment3
1174 ,p_from_segment4 => p_from_segment4
1175 ,p_from_segment5 => p_from_segment5
1176 ,p_from_segment6 => p_from_segment6
1177 ,p_from_segment7 => p_from_segment7
1178 ,p_from_segment8 => p_from_segment8
1179 ,p_from_segment9 => p_from_segment9
1180 ,p_from_segment10 => p_from_segment10
1181 ,p_from_segment11 => p_from_segment11
1182 ,p_from_segment12 => p_from_segment12
1183 ,p_from_segment13 => p_from_segment13
1184 ,p_from_segment14 => p_from_segment14
1185 ,p_from_segment15 => p_from_segment15
1186 ,p_from_segment16 => p_from_segment16
1187 ,p_from_segment17 => p_from_segment17
1188 ,p_from_segment18 => p_from_segment18
1189 ,p_from_segment19 => p_from_segment19
1190 ,p_from_segment20 => p_from_segment20
1191 ,p_from_segment21 => p_from_segment21
1192 ,p_from_segment22 => p_from_segment22
1193 ,p_from_segment23 => p_from_segment23
1194 ,p_from_segment24 => p_from_segment24
1195 ,p_from_segment25 => p_from_segment25
1196 ,p_from_segment26 => p_from_segment26
1197 ,p_from_segment27 => p_from_segment27
1198 ,p_from_segment28 => p_from_segment28
1199 ,p_from_segment29 => p_from_segment29
1200 ,p_from_segment30 => p_from_segment30
1201 ,p_to_segment1 => p_to_segment1
1202 ,p_to_segment2 => p_to_segment2
1203 ,p_to_segment3 => p_to_segment3
1204 ,p_to_segment4 => p_to_segment4
1205 ,p_to_segment5 => p_to_segment5
1206 ,p_to_segment6 => p_to_segment6
1207 ,p_to_segment7 => p_to_segment7
1208 ,p_to_segment8 => p_to_segment8
1209 ,p_to_segment9 => p_to_segment9
1210 ,p_to_segment10 => p_to_segment10
1211 ,p_to_segment11 => p_to_segment11
1212 ,p_to_segment12 => p_to_segment12
1213 ,p_to_segment13 => p_to_segment13
1214 ,p_to_segment14 => p_to_segment14
1215 ,p_to_segment15 => p_to_segment15
1216 ,p_to_segment16 => p_to_segment16
1220 ,p_to_segment20 => p_to_segment20
1217 ,p_to_segment17 => p_to_segment17
1218 ,p_to_segment18 => p_to_segment18
1219 ,p_to_segment19 => p_to_segment19
1221 ,p_to_segment21 => p_to_segment21
1222 ,p_to_segment22 => p_to_segment22
1223 ,p_to_segment23 => p_to_segment23
1224 ,p_to_segment24 => p_to_segment24
1225 ,p_to_segment25 => p_to_segment25
1226 ,p_to_segment26 => p_to_segment26
1227 ,p_to_segment27 => p_to_segment27
1228 ,p_to_segment28 => p_to_segment28
1229 ,p_to_segment29 => p_to_segment29
1230 ,p_to_segment30 => p_to_segment30
1231 ,p_transfer_from_cc_id => p_transfer_from_cc_id
1232 ,p_transfer_to_cc_id => p_transfer_to_cc_id
1233 ,p_effective_date => l_effective_date
1234
1235 );
1236 exception
1237 when hr_api.cannot_find_prog_unit then
1238 hr_api.cannot_find_prog_unit_error
1239 (p_module_name => 'UPDATE_FINANCE_HEADER'
1240 ,p_hook_type => 'AP'
1241 );
1242 end;
1243
1244 --
1245 -- When in validation only mode raise the Validate_Enabled exception
1246 --
1247 if p_validate then
1248 raise hr_api.validate_enabled;
1249 end if;
1250 --
1251 -- Set all output arguments
1252 --
1253 hr_utility.set_location(' Leaving:'||l_proc, 70);
1254 exception
1255 when hr_api.validate_enabled then
1256 --
1257 -- As the Validate_Enabled exception has been raised
1258 -- we must rollback to the savepoint
1259 --
1260 rollback to UPDATE_FINANCE_HEADER;
1261 --
1262 -- Only set output warning arguments
1263 -- (Any key or derived arguments must be set to null
1264 -- when validation only mode is being used.)
1265 --
1266 p_object_version_number := null;
1267 hr_utility.set_location(' Leaving:'||l_proc, 80);
1268 when others then
1269 --
1270 -- A validation or unexpected error has occured
1271 --
1272 rollback to UPDATE_FINANCE_HEADER;
1273 p_object_version_number := l_object_version_number;
1274 hr_utility.set_location(' Leaving:'||l_proc, 90);
1275 raise;
1276 end update_FINANCE_HEADER;
1277 --
1278 -- ----------------------------------------------------------------------------
1279 -- |-------------------------< DELETE_FINANCE_HEADER >------------------------------|
1280 -- ----------------------------------------------------------------------------
1281 --
1282 procedure delete_FINANCE_HEADER
1283 (p_validate in boolean default false
1284 ,p_finance_header_id in number
1285 ,p_object_version_number in number
1286 ) is
1287 --
1288 -- Declare cursors and local variables
1289 --
1290 l_proc varchar2(72) := g_package||' Delete Training Plan';
1291 l_object_version_id number;
1292 --
1293 --
1294 begin
1295 hr_utility.set_location('Entering:'|| l_proc, 10);
1296 --
1297 -- Issue a savepoint
1298 --
1299 savepoint DELETE_FINANCE_HEADER;
1300 --
1301 -- Truncate the time portion from all IN date parameters
1302 --
1303 --
1304
1305 -- Call Before Process User Hook
1306 --
1307 begin
1308 OTA_FINANCE_HEADER_BK3.DELETE_FINANCE_HEADER_B
1309 (p_finance_header_id => p_finance_header_id
1310 ,p_object_version_number => p_object_version_number
1311 );
1312 exception
1313 when hr_api.cannot_find_prog_unit then
1314 hr_api.cannot_find_prog_unit_error
1315 (p_module_name => 'DELETE_FINANCE_HEADER'
1316 ,p_hook_type => 'BP'
1317 );
1318 end;
1319 --
1320 -- Validation in addition to Row Handlers
1321 --
1322 --
1323 -- Process Logic
1324 --
1325 ota_tfh_api_del.del
1326 (p_finance_header_id => p_finance_header_id
1327 ,p_object_version_number => p_object_version_number
1328 );
1329
1330 --
1331 -- Call After Process User Hook
1332 --
1333 begin
1334 OTA_FINANCE_HEADER_BK3.DELETE_FINANCE_HEADER_A
1335 (p_finance_header_id => p_finance_header_id
1336 ,p_object_version_number => p_object_version_number
1337 );
1338 exception
1339 when hr_api.cannot_find_prog_unit then
1340 hr_api.cannot_find_prog_unit_error
1341 (p_module_name => 'DELETE_FINANCE_HEADER'
1342 ,p_hook_type => 'AP'
1343 );
1344 end;
1345
1346 --
1347 -- When in validation only mode raise the Validate_Enabled exception
1348 --
1349 if p_validate then
1350 raise hr_api.validate_enabled;
1351 end if;
1352 --
1353 -- Set all output arguments
1354 --
1355 --
1356 hr_utility.set_location(' Leaving:'||l_proc, 170);
1357 exception
1358 when hr_api.validate_enabled then
1359 --
1360 -- As the Validate_Enabled exception has been raised
1361 -- we must rollback to the savepoint
1362 --
1363 rollback to DELETE_FINANCE_HEADER;
1364 --
1365 -- Only set output warning arguments
1366 -- (Any key or derived arguments must be set to null
1367 -- when validation only mode is being used.)
1368 --
1369 hr_utility.set_location(' Leaving:'||l_proc, 180);
1370 when others then
1371 --
1372 -- A validation or unexpected error has occured
1373 --
1374 rollback to DELETE_FINANCE_HEADER;
1375 hr_utility.set_location(' Leaving:'||l_proc, 190);
1376 raise;
1380
1377 end delete_FINANCE_HEADER;
1378 --
1379
1381 END OTA_FINANCE_HEADER_API;