1 Package Body ota_tfl_api_upd as
2 /* $Header: ottfl01t.pkb 120.0 2005/05/29 07:41:43 appldev noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' ota_tfl_api_upd.'; -- Global package name
9 --
10 -- ----------------------------------------------------------------------------
11 -- |------------------------------< update_dml >------------------------------|
12 -- ----------------------------------------------------------------------------
13 -- {Start Of Comments}
14 --
15 -- Description:
16 -- This procedure controls the actual dml update logic. The functions of this
17 -- procedure are as follows:
18 -- 1) Increment the object_version_number by 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 update the specified row in the schema using the primary key in
23 -- the predicates.
24 -- 4) To trap any constraint violations that may have occurred.
25 -- 5) To raise any other errors.
26 --
27 -- Pre Conditions:
28 -- This is an internal private procedure which must be called from the upd
29 -- procedure.
30 --
31 -- In Arguments:
32 -- A Pl/Sql record structre.
33 --
34 -- Post Success:
35 -- The specified row will be updated in the schema.
36 --
37 -- Post Failure:
38 -- On the update 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 -- The update 'set' arguments list should be modified if any of your
47 -- attributes are not updateable.
48 --
49 -- Access Status:
50 -- Internal Development Use Only.
51 --
52 -- {End Of Comments}
53 -- ----------------------------------------------------------------------------
54 Procedure update_dml(p_rec in out nocopy ota_tfl_api_shd.g_rec_type) is
55 --
56 l_proc varchar2(72) := g_package||'update_dml';
57
58 --
59 Begin
60 hr_utility.set_location('Entering:'||l_proc, 5);
61 --
62 -- Increment the object version
63 --
64 p_rec.object_version_number := p_rec.object_version_number + 1;
65 --
66 ota_tfl_api_shd.g_api_dml := true; -- Set the api dml status
67 --
68 -- Update the ota_finance_lines Row
69 --
70 update ota_finance_lines
71 set
72 finance_line_id = p_rec.finance_line_id,
73 finance_header_id = p_rec.finance_header_id,
74 cancelled_flag = p_rec.cancelled_flag,
75 date_raised = p_rec.date_raised,
76 line_type = p_rec.line_type,
77 object_version_number = p_rec.object_version_number,
78 sequence_number = p_rec.sequence_number,
79 transfer_status = p_rec.transfer_status,
80 comments = p_rec.comments,
81 currency_code = p_rec.currency_code,
82 money_amount = p_rec.money_amount,
83 standard_amount = p_rec.standard_amount,
84 trans_information_category = p_rec.trans_information_category,
85 trans_information1 = p_rec.trans_information1,
86 trans_information10 = p_rec.trans_information10,
87 trans_information11 = p_rec.trans_information11,
88 trans_information12 = p_rec.trans_information12,
89 trans_information13 = p_rec.trans_information13,
90 trans_information14 = p_rec.trans_information14,
91 trans_information15 = p_rec.trans_information15,
92 trans_information16 = p_rec.trans_information16,
93 trans_information17 = p_rec.trans_information17,
94 trans_information18 = p_rec.trans_information18,
95 trans_information19 = p_rec.trans_information19,
96 trans_information2 = p_rec.trans_information2,
97 trans_information20 = p_rec.trans_information20,
98 trans_information3 = p_rec.trans_information3,
99 trans_information4 = p_rec.trans_information4,
100 trans_information5 = p_rec.trans_information5,
101 trans_information6 = p_rec.trans_information6,
102 trans_information7 = p_rec.trans_information7,
103 trans_information8 = p_rec.trans_information8,
104 trans_information9 = p_rec.trans_information9,
105 transfer_date = p_rec.transfer_date,
106 transfer_message = p_rec.transfer_message,
107 unitary_amount = p_rec.unitary_amount,
108 booking_deal_id = p_rec.booking_deal_id,
109 booking_id = p_rec.booking_id,
110 resource_allocation_id = p_rec.resource_allocation_id,
111 resource_booking_id = p_rec.resource_booking_id,
112 tfl_information_category = p_rec.tfl_information_category,
113 tfl_information1 = p_rec.tfl_information1,
114 tfl_information2 = p_rec.tfl_information2,
115 tfl_information3 = p_rec.tfl_information3,
116 tfl_information4 = p_rec.tfl_information4,
117 tfl_information5 = p_rec.tfl_information5,
118 tfl_information6 = p_rec.tfl_information6,
119 tfl_information7 = p_rec.tfl_information7,
120 tfl_information8 = p_rec.tfl_information8,
121 tfl_information9 = p_rec.tfl_information9,
122 tfl_information10 = p_rec.tfl_information10,
123 tfl_information11 = p_rec.tfl_information11,
124 tfl_information12 = p_rec.tfl_information12,
125 tfl_information13 = p_rec.tfl_information13,
126 tfl_information14 = p_rec.tfl_information14,
127 tfl_information15 = p_rec.tfl_information15,
128 tfl_information16 = p_rec.tfl_information16,
129 tfl_information17 = p_rec.tfl_information17,
130 tfl_information18 = p_rec.tfl_information18,
131 tfl_information19 = p_rec.tfl_information19,
132 tfl_information20 = p_rec.tfl_information20
133 where finance_line_id = p_rec.finance_line_id;
134 --
135 ota_tfl_api_shd.g_api_dml := false; -- Unset the api dml status
136 --
137 hr_utility.set_location(' Leaving:'||l_proc, 10);
138 --
139 Exception
140 When hr_api.check_integrity_violated Then
141 -- A check constraint has been violated
142 ota_tfl_api_shd.g_api_dml := false; -- Unset the api dml status
143 ota_tfl_api_shd.constraint_error
144 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
145 When hr_api.parent_integrity_violated Then
146 -- Parent integrity has been violated
147 ota_tfl_api_shd.g_api_dml := false; -- Unset the api dml status
148 ota_tfl_api_shd.constraint_error
149 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
150 When hr_api.unique_integrity_violated Then
151 -- Unique integrity has been violated
152 ota_tfl_api_shd.g_api_dml := false; -- Unset the api dml status
153 ota_tfl_api_shd.constraint_error
154 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
155 When Others Then
156 ota_tfl_api_shd.g_api_dml := false; -- Unset the api dml status
157 Raise;
158 End update_dml;
159 --
160 -- ----------------------------------------------------------------------------
161 -- |------------------------------< pre_update >------------------------------|
162 -- ----------------------------------------------------------------------------
163 -- {Start Of Comments}
164 --
165 -- Description:
166 -- This private procedure contains any processing which is required before
167 -- the update dml.
168 --
169 -- Pre Conditions:
170 -- This is an internal procedure which is called from the upd procedure.
171 --
172 -- In Arguments:
173 -- A Pl/Sql record structre.
174 --
175 -- Post Success:
176 -- Processing continues.
177 --
178 -- Post Failure:
179 -- If an error has occurred, an error message and exception will be raised
180 -- but not handled.
181 --
182 -- Developer Implementation Notes:
183 -- Any pre-processing required before the update dml is issued should be
184 -- coded within this procedure. It is important to note that any 3rd party
185 -- maintenance should be reviewed before placing in this procedure.
186 --
187 -- Access Status:
188 -- Internal Development Use Only.
189 --
190 -- {End Of Comments}
191 -- ----------------------------------------------------------------------------
192 Procedure pre_update(p_rec in out nocopy ota_tfl_api_shd.g_rec_type) is
193 --
194 l_proc varchar2(72) := g_package||'pre_update';
195 --
196 Begin
197 hr_utility.set_location('Entering:'||l_proc, 5);
198 --
199 hr_utility.set_location(' Leaving:'||l_proc, 10);
200 End pre_update;
201 --
202 -- ----------------------------------------------------------------------------
203 -- |-----------------------------< post_update >------------------------------|
204 -- ----------------------------------------------------------------------------
205 -- {Start Of Comments}
206 --
207 -- Description:
208 -- This private procedure contains any processing which is required after the
209 -- update dml.
210 --
211 -- Pre Conditions:
212 -- This is an internal procedure which is called from the upd procedure.
213 --
214 -- In Arguments:
215 -- A Pl/Sql record structre.
216 --
217 -- Post Success:
218 -- Processing continues.
219 --
220 -- Post Failure:
221 -- If an error has occurred, an error message and exception will be raised
222 -- but not handled.
223 --
224 -- Developer Implementation Notes:
225 -- Any post-processing required after the update dml is issued should be
226 -- coded within this procedure. It is important to note that any 3rd party
227 -- maintenance should be reviewed before placing in this procedure.
228 --
229 -- Access Status:
230 -- Internal Development Use Only.
231 --
232 -- {End Of Comments}
233 -- ----------------------------------------------------------------------------
234 Procedure post_update(p_rec in ota_tfl_api_shd.g_rec_type) is
235 --
236 l_proc varchar2(72) := g_package||'post_update';
237 --
238 Begin
239 hr_utility.set_location('Entering:'||l_proc, 5);
240 --
241 hr_utility.set_location(' Leaving:'||l_proc, 10);
242 End post_update;
243 --
244 -- ----------------------------------------------------------------------------
245 -- |-----------------------------< convert_defs >-----------------------------|
246 -- ----------------------------------------------------------------------------
247 -- {Start Of Comments}
248 --
249 -- Description:
250 -- The Convert_Defs function has one very important function:
251 -- It must return the record structure for the row with all system defaulted
252 -- values converted into its corresponding argument value for update. When
253 -- we attempt to update a row through the Upd business process , certain
254 -- arguments can be defaulted which enables flexibility in the calling of
255 -- the upd process (e.g. only attributes which need to be updated need to be
256 -- specified). For the upd business process to determine which attributes
257 -- have NOT been specified we need to check if the argument has a reserved
258 -- system default value. Therefore, for all attributes which have a
259 -- corresponding reserved system default mechanism specified we need to
260 -- check if a system default is being used. If a system default is being
261 -- used then we convert the defaulted value into its corresponding attribute
262 -- value held in the g_old_rec data structure.
263 --
264 -- Pre Conditions:
265 -- This private function can only be called from the upd process.
266 --
267 -- In Arguments:
268 -- A Pl/Sql record structre.
269 --
270 -- Post Success:
271 -- The record structure will be returned with all system defaulted argument
272 -- values converted into its current row attribute value.
273 --
274 -- Post Failure:
275 -- No direct error handling is required within this function. Any possible
276 -- errors within this function will be a PL/SQL value error due to conversion
277 -- of datatypes or data lengths.
278 --
279 -- Developer Implementation Notes:
280 -- None.
281 --
282 -- Access Status:
283 -- Internal Development Use Only.
284 --
285 -- {End Of Comments}
286 -- ----------------------------------------------------------------------------
287 Function convert_defs(p_rec in out nocopy ota_tfl_api_shd.g_rec_type)
288 Return ota_tfl_api_shd.g_rec_type is
289 --
290 l_proc varchar2(72) := g_package||'convert_defs';
291 --
292 Begin
293 --
294 hr_utility.set_location('Entering:'||l_proc, 5);
295 --
296 -- We must now examine each argument value in the
297 -- p_rec plsql record structure
298 -- to see if a system default is being used. If a system default
299 -- is being used then we must set to the 'current' argument value.
300 --
301 If (p_rec.finance_header_id = hr_api.g_number) then
302 p_rec.finance_header_id :=
303 ota_tfl_api_shd.g_old_rec.finance_header_id;
304 End If;
305 If (p_rec.cancelled_flag = hr_api.g_varchar2) then
306 p_rec.cancelled_flag :=
307 ota_tfl_api_shd.g_old_rec.cancelled_flag;
308 End If;
309 If (p_rec.date_raised = hr_api.g_date) then
310 p_rec.date_raised :=
311 ota_tfl_api_shd.g_old_rec.date_raised;
312 End If;
313 If (p_rec.line_type = hr_api.g_varchar2) then
314 p_rec.line_type :=
315 ota_tfl_api_shd.g_old_rec.line_type;
316 End If;
317 If (p_rec.sequence_number = hr_api.g_number) then
318 p_rec.sequence_number :=
319 ota_tfl_api_shd.g_old_rec.sequence_number;
320 End If;
321 If (p_rec.transfer_status = hr_api.g_varchar2) then
322 p_rec.transfer_status :=
323 ota_tfl_api_shd.g_old_rec.transfer_status;
324 End If;
325 If (p_rec.comments = hr_api.g_varchar2) then
326 p_rec.comments :=
327 ota_tfl_api_shd.g_old_rec.comments;
328 End If;
329 If (p_rec.currency_code = hr_api.g_varchar2) then
330 p_rec.currency_code :=
331 ota_tfl_api_shd.g_old_rec.currency_code;
332 End If;
333 If (p_rec.money_amount = hr_api.g_number) then
334 p_rec.money_amount :=
335 ota_tfl_api_shd.g_old_rec.money_amount;
336 End If;
337 If (p_rec.standard_amount = hr_api.g_number) then
338 p_rec.standard_amount :=
339 ota_tfl_api_shd.g_old_rec.standard_amount;
340 End If;
341 If (p_rec.trans_information_category = hr_api.g_varchar2) then
342 p_rec.trans_information_category :=
343 ota_tfl_api_shd.g_old_rec.trans_information_category;
344 End If;
345 If (p_rec.trans_information1 = hr_api.g_varchar2) then
346 p_rec.trans_information1 :=
347 ota_tfl_api_shd.g_old_rec.trans_information1;
348 End If;
349 If (p_rec.trans_information10 = hr_api.g_varchar2) then
350 p_rec.trans_information10 :=
351 ota_tfl_api_shd.g_old_rec.trans_information10;
352 End If;
353 If (p_rec.trans_information11 = hr_api.g_varchar2) then
354 p_rec.trans_information11 :=
355 ota_tfl_api_shd.g_old_rec.trans_information11;
356 End If;
357 If (p_rec.trans_information12 = hr_api.g_varchar2) then
358 p_rec.trans_information12 :=
359 ota_tfl_api_shd.g_old_rec.trans_information12;
360 End If;
361 If (p_rec.trans_information13 = hr_api.g_varchar2) then
362 p_rec.trans_information13 :=
363 ota_tfl_api_shd.g_old_rec.trans_information13;
364 End If;
365 If (p_rec.trans_information14 = hr_api.g_varchar2) then
366 p_rec.trans_information14 :=
367 ota_tfl_api_shd.g_old_rec.trans_information14;
368 End If;
369 If (p_rec.trans_information15 = hr_api.g_varchar2) then
370 p_rec.trans_information15 :=
371 ota_tfl_api_shd.g_old_rec.trans_information15;
372 End If;
373 If (p_rec.trans_information16 = hr_api.g_varchar2) then
374 p_rec.trans_information16 :=
375 ota_tfl_api_shd.g_old_rec.trans_information16;
376 End If;
377 If (p_rec.trans_information17 = hr_api.g_varchar2) then
378 p_rec.trans_information17 :=
379 ota_tfl_api_shd.g_old_rec.trans_information17;
380 End If;
381 If (p_rec.trans_information18 = hr_api.g_varchar2) then
382 p_rec.trans_information18 :=
383 ota_tfl_api_shd.g_old_rec.trans_information18;
384 End If;
385 If (p_rec.trans_information19 = hr_api.g_varchar2) then
386 p_rec.trans_information19 :=
387 ota_tfl_api_shd.g_old_rec.trans_information19;
388 End If;
389 If (p_rec.trans_information2 = hr_api.g_varchar2) then
390 p_rec.trans_information2 :=
391 ota_tfl_api_shd.g_old_rec.trans_information2;
392 End If;
393 If (p_rec.trans_information20 = hr_api.g_varchar2) then
394 p_rec.trans_information20 :=
395 ota_tfl_api_shd.g_old_rec.trans_information20;
396 End If;
397 If (p_rec.trans_information3 = hr_api.g_varchar2) then
398 p_rec.trans_information3 :=
399 ota_tfl_api_shd.g_old_rec.trans_information3;
400 End If;
401 If (p_rec.trans_information4 = hr_api.g_varchar2) then
402 p_rec.trans_information4 :=
403 ota_tfl_api_shd.g_old_rec.trans_information4;
404 End If;
405 If (p_rec.trans_information5 = hr_api.g_varchar2) then
406 p_rec.trans_information5 :=
407 ota_tfl_api_shd.g_old_rec.trans_information5;
408 End If;
409 If (p_rec.trans_information6 = hr_api.g_varchar2) then
410 p_rec.trans_information6 :=
411 ota_tfl_api_shd.g_old_rec.trans_information6;
412 End If;
413 If (p_rec.trans_information7 = hr_api.g_varchar2) then
414 p_rec.trans_information7 :=
415 ota_tfl_api_shd.g_old_rec.trans_information7;
416 End If;
417 If (p_rec.trans_information8 = hr_api.g_varchar2) then
418 p_rec.trans_information8 :=
419 ota_tfl_api_shd.g_old_rec.trans_information8;
420 End If;
421 If (p_rec.trans_information9 = hr_api.g_varchar2) then
422 p_rec.trans_information9 :=
423 ota_tfl_api_shd.g_old_rec.trans_information9;
424 End If;
425 If (p_rec.transfer_date = hr_api.g_date) then
426 p_rec.transfer_date :=
427 ota_tfl_api_shd.g_old_rec.transfer_date;
428 End If;
429 If (p_rec.transfer_message = hr_api.g_varchar2) then
430 p_rec.transfer_message :=
431 ota_tfl_api_shd.g_old_rec.transfer_message;
432 End If;
433 If (p_rec.unitary_amount = hr_api.g_number) then
434 p_rec.unitary_amount :=
435 ota_tfl_api_shd.g_old_rec.unitary_amount;
436 End If;
437 If (p_rec.booking_deal_id = hr_api.g_number) then
438 p_rec.booking_deal_id :=
439 ota_tfl_api_shd.g_old_rec.booking_deal_id;
440 End If;
441 If (p_rec.booking_id = hr_api.g_number) then
442 p_rec.booking_id :=
443 ota_tfl_api_shd.g_old_rec.booking_id;
444 End If;
445 If (p_rec.resource_allocation_id = hr_api.g_number) then
446 p_rec.resource_allocation_id :=
447 ota_tfl_api_shd.g_old_rec.resource_allocation_id;
448 End If;
449 If (p_rec.resource_booking_id = hr_api.g_number) then
450 p_rec.resource_booking_id :=
451 ota_tfl_api_shd.g_old_rec.resource_booking_id;
452 End If;
453 If (p_rec.tfl_information_category = hr_api.g_varchar2) then
454 p_rec.tfl_information_category :=
455 ota_tfl_api_shd.g_old_rec.tfl_information_category;
456 End If;
457 If (p_rec.tfl_information1 = hr_api.g_varchar2) then
458 p_rec.tfl_information1 :=
459 ota_tfl_api_shd.g_old_rec.tfl_information1;
460 End If;
461 If (p_rec.tfl_information2 = hr_api.g_varchar2) then
462 p_rec.tfl_information2 :=
463 ota_tfl_api_shd.g_old_rec.tfl_information2;
464 End If;
465 If (p_rec.tfl_information3 = hr_api.g_varchar2) then
466 p_rec.tfl_information3 :=
467 ota_tfl_api_shd.g_old_rec.tfl_information3;
468 End If;
469 If (p_rec.tfl_information4 = hr_api.g_varchar2) then
470 p_rec.tfl_information4 :=
471 ota_tfl_api_shd.g_old_rec.tfl_information4;
472 End If;
473 If (p_rec.tfl_information5 = hr_api.g_varchar2) then
474 p_rec.tfl_information5 :=
475 ota_tfl_api_shd.g_old_rec.tfl_information5;
476 End If;
477 If (p_rec.tfl_information6 = hr_api.g_varchar2) then
478 p_rec.tfl_information6 :=
479 ota_tfl_api_shd.g_old_rec.tfl_information6;
480 End If;
481 If (p_rec.tfl_information7 = hr_api.g_varchar2) then
482 p_rec.tfl_information7 :=
483 ota_tfl_api_shd.g_old_rec.tfl_information7;
484 End If;
485 If (p_rec.tfl_information8 = hr_api.g_varchar2) then
486 p_rec.tfl_information8 :=
487 ota_tfl_api_shd.g_old_rec.tfl_information8;
488 End If;
489 If (p_rec.tfl_information9 = hr_api.g_varchar2) then
490 p_rec.tfl_information9 :=
491 ota_tfl_api_shd.g_old_rec.tfl_information9;
492 End If;
493 If (p_rec.tfl_information10 = hr_api.g_varchar2) then
494 p_rec.tfl_information10 :=
495 ota_tfl_api_shd.g_old_rec.tfl_information10;
496 End If;
497 If (p_rec.tfl_information11 = hr_api.g_varchar2) then
498 p_rec.tfl_information11 :=
499 ota_tfl_api_shd.g_old_rec.tfl_information11;
500 End If;
501 If (p_rec.tfl_information12 = hr_api.g_varchar2) then
502 p_rec.tfl_information12 :=
503 ota_tfl_api_shd.g_old_rec.tfl_information12;
504 End If;
505 If (p_rec.tfl_information13 = hr_api.g_varchar2) then
506 p_rec.tfl_information13 :=
507 ota_tfl_api_shd.g_old_rec.tfl_information13;
508 End If;
509 If (p_rec.tfl_information14 = hr_api.g_varchar2) then
510 p_rec.tfl_information14 :=
511 ota_tfl_api_shd.g_old_rec.tfl_information14;
512 End If;
513 If (p_rec.tfl_information15 = hr_api.g_varchar2) then
514 p_rec.tfl_information15 :=
515 ota_tfl_api_shd.g_old_rec.tfl_information15;
516 End If;
517 If (p_rec.tfl_information16 = hr_api.g_varchar2) then
518 p_rec.tfl_information16 :=
519 ota_tfl_api_shd.g_old_rec.tfl_information16;
520 End If;
521 If (p_rec.tfl_information17 = hr_api.g_varchar2) then
522 p_rec.tfl_information17 :=
523 ota_tfl_api_shd.g_old_rec.tfl_information17;
524 End If;
525 If (p_rec.tfl_information18 = hr_api.g_varchar2) then
526 p_rec.tfl_information18 :=
527 ota_tfl_api_shd.g_old_rec.tfl_information18;
528 End If;
529 If (p_rec.tfl_information19 = hr_api.g_varchar2) then
530 p_rec.tfl_information19 :=
531 ota_tfl_api_shd.g_old_rec.tfl_information19;
532 End If;
533 If (p_rec.tfl_information20 = hr_api.g_varchar2) then
534 p_rec.tfl_information20 :=
535 ota_tfl_api_shd.g_old_rec.tfl_information20;
536 End If;
537 --
538 -- Return the plsql record structure.
539 --
540 hr_utility.set_location(' Leaving:'||l_proc, 10);
541 Return(p_rec);
542 --
543 End convert_defs;
544 --
545 -- ----------------------------------------------------------------------------
546 -- |---------------------------------< upd >----------------------------------|
547 -- ----------------------------------------------------------------------------
548 Procedure upd
549 (
550 p_rec in out nocopy ota_tfl_api_shd.g_rec_type,
551 p_validate in boolean default false,
552 p_transaction_type in varchar2
553 ) is
554 --
555 l_proc varchar2(72) := g_package||'upd';
556
557 -- 06/05/97 Change Begins
558 temp_var ota_tfl_api_shd.g_rec_type;
559 -- 06/05/97 Change Ends
560 --
561 Begin
562 hr_utility.set_location('Entering:'||l_proc, 5);
563 --
564 -- Determine if the business process is to be validated.
565 --
566 If p_validate then
567 --
568 -- Issue the savepoint.
569 --
570 SAVEPOINT upd_ota_tfl_api;
571 End If;
572 --
573 -- We must lock the row which we need to update.
574 --
575 ota_tfl_api_shd.lck
576 (
577 p_rec.finance_line_id,
578 p_rec.object_version_number
579 );
580 --
581 -- 1. During an update system defaults are used to determine if
582 -- arguments have been defaulted or not. We must therefore
583 -- derive the full record structure values to be updated.
584 --
585 -- 2. Call the supporting update validate operations.
586 --
587 -- 06/05/97 Change Begins
588 temp_var := convert_defs(p_rec);
589
590 ota_tfl_api_bus.update_validate( temp_var
591 , p_rec.money_amount
592 , p_rec.unitary_amount
593 , p_rec.date_raised
594 , p_rec.sequence_number
595 , p_transaction_type);
596 -- 06/05/97 Change Ends
597 --
598 -- Call the supporting pre-update operation
599 --
600 pre_update(p_rec);
601 --
602 -- Update the row.
603 --
604 update_dml(p_rec);
605 --
606 -- Call the supporting post-update operation
607 --
608 post_update(p_rec);
609 --
610 -- If we are validating then raise the Validate_Enabled exception
611 --
612 If p_validate then
613 Raise HR_Api.Validate_Enabled;
614 End If;
615 --
616 hr_utility.set_location(' Leaving:'||l_proc, 10);
617 Exception
618 When HR_Api.Validate_Enabled Then
619 --
620 -- As the Validate_Enabled exception has been raised
621 -- we must rollback to the savepoint
622 --
623 ROLLBACK TO upd_ota_tfl_api;
624 End upd;
625 --
626 -- ----------------------------------------------------------------------------
627 -- |---------------------------------< upd >----------------------------------|
628 -- ----------------------------------------------------------------------------
629 Procedure upd
630 (
631 p_finance_line_id in number,
632 p_finance_header_id in number default hr_api.g_number,
633 p_cancelled_flag in varchar2 default hr_api.g_varchar2,
634 p_date_raised in out nocopy date,
635 p_line_type in varchar2 default hr_api.g_varchar2,
636 p_object_version_number in out nocopy number,
637 p_sequence_number in out nocopy number,
638 p_transfer_status in varchar2 default hr_api.g_varchar2,
639 p_comments in varchar2 default hr_api.g_varchar2,
640 p_currency_code in varchar2 default hr_api.g_varchar2,
641 p_money_amount in number default hr_api.g_number,
642 p_standard_amount in number default hr_api.g_number,
643 p_trans_information_category in varchar2 default hr_api.g_varchar2,
644 p_trans_information1 in varchar2 default hr_api.g_varchar2,
645 p_trans_information10 in varchar2 default hr_api.g_varchar2,
646 p_trans_information11 in varchar2 default hr_api.g_varchar2,
647 p_trans_information12 in varchar2 default hr_api.g_varchar2,
648 p_trans_information13 in varchar2 default hr_api.g_varchar2,
649 p_trans_information14 in varchar2 default hr_api.g_varchar2,
650 p_trans_information15 in varchar2 default hr_api.g_varchar2,
651 p_trans_information16 in varchar2 default hr_api.g_varchar2,
652 p_trans_information17 in varchar2 default hr_api.g_varchar2,
653 p_trans_information18 in varchar2 default hr_api.g_varchar2,
654 p_trans_information19 in varchar2 default hr_api.g_varchar2,
655 p_trans_information2 in varchar2 default hr_api.g_varchar2,
656 p_trans_information20 in varchar2 default hr_api.g_varchar2,
657 p_trans_information3 in varchar2 default hr_api.g_varchar2,
658 p_trans_information4 in varchar2 default hr_api.g_varchar2,
659 p_trans_information5 in varchar2 default hr_api.g_varchar2,
660 p_trans_information6 in varchar2 default hr_api.g_varchar2,
661 p_trans_information7 in varchar2 default hr_api.g_varchar2,
662 p_trans_information8 in varchar2 default hr_api.g_varchar2,
663 p_trans_information9 in varchar2 default hr_api.g_varchar2,
664 p_transfer_date in date default hr_api.g_date,
665 p_transfer_message in varchar2 default hr_api.g_varchar2,
666 p_unitary_amount in number default hr_api.g_number,
667 p_booking_deal_id in number default hr_api.g_number,
668 p_booking_id in number default hr_api.g_number,
669 p_resource_allocation_id in number default hr_api.g_number,
670 p_resource_booking_id in number default hr_api.g_number,
671 p_tfl_information_category in varchar2 default hr_api.g_varchar2,
672 p_tfl_information1 in varchar2 default hr_api.g_varchar2,
673 p_tfl_information2 in varchar2 default hr_api.g_varchar2,
674 p_tfl_information3 in varchar2 default hr_api.g_varchar2,
675 p_tfl_information4 in varchar2 default hr_api.g_varchar2,
676 p_tfl_information5 in varchar2 default hr_api.g_varchar2,
677 p_tfl_information6 in varchar2 default hr_api.g_varchar2,
678 p_tfl_information7 in varchar2 default hr_api.g_varchar2,
679 p_tfl_information8 in varchar2 default hr_api.g_varchar2,
680 p_tfl_information9 in varchar2 default hr_api.g_varchar2,
681 p_tfl_information10 in varchar2 default hr_api.g_varchar2,
682 p_tfl_information11 in varchar2 default hr_api.g_varchar2,
683 p_tfl_information12 in varchar2 default hr_api.g_varchar2,
684 p_tfl_information13 in varchar2 default hr_api.g_varchar2,
685 p_tfl_information14 in varchar2 default hr_api.g_varchar2,
686 p_tfl_information15 in varchar2 default hr_api.g_varchar2,
687 p_tfl_information16 in varchar2 default hr_api.g_varchar2,
688 p_tfl_information17 in varchar2 default hr_api.g_varchar2,
689 p_tfl_information18 in varchar2 default hr_api.g_varchar2,
690 p_tfl_information19 in varchar2 default hr_api.g_varchar2,
691 p_tfl_information20 in varchar2 default hr_api.g_varchar2,
692 p_validate in boolean default false,
693 p_transaction_type in varchar2
694 ) is
695 --
696 l_rec ota_tfl_api_shd.g_rec_type;
697 l_proc varchar2(72) := g_package||'upd';
698 --
699 Begin
700 hr_utility.set_location('Entering:'||l_proc, 5);
701 --
702 -- Call conversion function to turn arguments into the
703 -- l_rec structure.
704 --
705 l_rec :=
706 ota_tfl_api_shd.convert_args
707 (
708 p_finance_line_id,
709 p_finance_header_id,
710 p_cancelled_flag,
711 p_date_raised,
712 p_line_type,
713 p_object_version_number,
714 p_sequence_number,
715 p_transfer_status,
716 p_comments,
717 p_currency_code,
718 p_money_amount,
719 p_standard_amount,
720 p_trans_information_category,
721 p_trans_information1,
722 p_trans_information10,
723 p_trans_information11,
724 p_trans_information12,
725 p_trans_information13,
726 p_trans_information14,
727 p_trans_information15,
728 p_trans_information16,
729 p_trans_information17,
730 p_trans_information18,
731 p_trans_information19,
732 p_trans_information2,
733 p_trans_information20,
734 p_trans_information3,
735 p_trans_information4,
736 p_trans_information5,
737 p_trans_information6,
738 p_trans_information7,
739 p_trans_information8,
740 p_trans_information9,
741 p_transfer_date,
742 p_transfer_message,
743 p_unitary_amount,
744 p_booking_deal_id,
745 p_booking_id,
746 p_resource_allocation_id,
747 p_resource_booking_id,
748 p_tfl_information_category,
749 p_tfl_information1,
750 p_tfl_information2,
751 p_tfl_information3,
752 p_tfl_information4,
753 p_tfl_information5,
754 p_tfl_information6,
755 p_tfl_information7,
756 p_tfl_information8,
757 p_tfl_information9,
758 p_tfl_information10,
759 p_tfl_information11,
760 p_tfl_information12,
761 p_tfl_information13,
762 p_tfl_information14,
763 p_tfl_information15,
764 p_tfl_information16,
765 p_tfl_information17,
766 p_tfl_information18,
767 p_tfl_information19,
768 p_tfl_information20
769 );
770 --
771 -- Having converted the arguments into the
772 -- plsql record structure we call the corresponding record
773 -- business process.
774 --
775 upd( l_rec, p_validate, p_transaction_type);
776 p_object_version_number := l_rec.object_version_number;
777 --
778 hr_utility.set_location(' Leaving:'||l_proc, 10);
779 End upd;
780 --
781 end ota_tfl_api_upd;