50: -- Internal Development Use Only.
51: --
52: -- {End Of Comments}
53: -- ----------------------------------------------------------------------------
54: Procedure update_dml(p_rec in out ota_tpl_shd.g_rec_type) is
55: --
56: l_proc varchar2(72) := g_package||'update_dml';
57: --
58: Begin
61: -- Increment the object version
62: --
63: p_rec.object_version_number := p_rec.object_version_number + 1;
64: --
65: ota_tpl_shd.g_api_dml := true; -- Set the api dml status
66: --
67: -- Update the ota_price_lists Row
68: --
69: update ota_price_lists
103: tpl_information19 = p_rec.tpl_information19,
104: tpl_information20 = p_rec.tpl_information20
105: where price_list_id = p_rec.price_list_id;
106: --
107: ota_tpl_shd.g_api_dml := false; -- Unset the api dml status
108: --
109: hr_utility.set_location(' Leaving:'||l_proc, 10);
110: --
111: Exception
110: --
111: Exception
112: When hr_api.check_integrity_violated Then
113: -- A check constraint has been violated
114: ota_tpl_shd.g_api_dml := false; -- Unset the api dml status
115: ota_tpl_shd.constraint_error
116: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
117: When hr_api.parent_integrity_violated Then
118: -- Parent integrity has been violated
111: Exception
112: When hr_api.check_integrity_violated Then
113: -- A check constraint has been violated
114: ota_tpl_shd.g_api_dml := false; -- Unset the api dml status
115: ota_tpl_shd.constraint_error
116: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
117: When hr_api.parent_integrity_violated Then
118: -- Parent integrity has been violated
119: ota_tpl_shd.g_api_dml := false; -- Unset the api dml status
115: ota_tpl_shd.constraint_error
116: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
117: When hr_api.parent_integrity_violated Then
118: -- Parent integrity has been violated
119: ota_tpl_shd.g_api_dml := false; -- Unset the api dml status
120: ota_tpl_shd.constraint_error
121: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
122: When hr_api.unique_integrity_violated Then
123: -- Unique integrity has been violated
116: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
117: When hr_api.parent_integrity_violated Then
118: -- Parent integrity has been violated
119: ota_tpl_shd.g_api_dml := false; -- Unset the api dml status
120: ota_tpl_shd.constraint_error
121: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
122: When hr_api.unique_integrity_violated Then
123: -- Unique integrity has been violated
124: ota_tpl_shd.g_api_dml := false; -- Unset the api dml status
120: ota_tpl_shd.constraint_error
121: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
122: When hr_api.unique_integrity_violated Then
123: -- Unique integrity has been violated
124: ota_tpl_shd.g_api_dml := false; -- Unset the api dml status
125: ota_tpl_shd.constraint_error
126: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
127: When Others Then
128: ota_tpl_shd.g_api_dml := false; -- Unset the api dml status
121: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
122: When hr_api.unique_integrity_violated Then
123: -- Unique integrity has been violated
124: ota_tpl_shd.g_api_dml := false; -- Unset the api dml status
125: ota_tpl_shd.constraint_error
126: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
127: When Others Then
128: ota_tpl_shd.g_api_dml := false; -- Unset the api dml status
129: Raise;
124: ota_tpl_shd.g_api_dml := false; -- Unset the api dml status
125: ota_tpl_shd.constraint_error
126: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
127: When Others Then
128: ota_tpl_shd.g_api_dml := false; -- Unset the api dml status
129: Raise;
130: End update_dml;
131: --
132: -- ----------------------------------------------------------------------------
160: -- Internal Development Use Only.
161: --
162: -- {End Of Comments}
163: -- ----------------------------------------------------------------------------
164: Procedure pre_update(p_rec in ota_tpl_shd.g_rec_type) is
165: --
166: l_proc varchar2(72) := g_package||'pre_update';
167: --
168: Begin
202: -- Internal Development Use Only.
203: --
204: -- {End Of Comments}
205: -- ----------------------------------------------------------------------------
206: Procedure post_update(p_rec in ota_tpl_shd.g_rec_type) is
207: --
208: l_proc varchar2(72) := g_package||'post_update';
209: --
210: Begin
255: -- Internal Development Use Only.
256: --
257: -- {End Of Comments}
258: -- ----------------------------------------------------------------------------
259: Function convert_defs(p_rec in out ota_tpl_shd.g_rec_type)
260: Return ota_tpl_shd.g_rec_type is
261: --
262: l_proc varchar2(72) := g_package||'convert_defs';
263: --
256: --
257: -- {End Of Comments}
258: -- ----------------------------------------------------------------------------
259: Function convert_defs(p_rec in out ota_tpl_shd.g_rec_type)
260: Return ota_tpl_shd.g_rec_type is
261: --
262: l_proc varchar2(72) := g_package||'convert_defs';
263: --
264: Begin
271: -- is being used then we must set to the 'current' argument value.
272: --
273: If (p_rec.business_group_id = hr_api.g_number) then
274: p_rec.business_group_id :=
275: ota_tpl_shd.g_old_rec.business_group_id;
276: End If;
277: If (p_rec.currency_code = hr_api.g_varchar2) then
278: p_rec.currency_code :=
279: ota_tpl_shd.g_old_rec.currency_code;
275: ota_tpl_shd.g_old_rec.business_group_id;
276: End If;
277: If (p_rec.currency_code = hr_api.g_varchar2) then
278: p_rec.currency_code :=
279: ota_tpl_shd.g_old_rec.currency_code;
280: End If;
281: If (p_rec.default_flag = hr_api.g_varchar2) then
282: p_rec.default_flag :=
283: ota_tpl_shd.g_old_rec.default_flag;
279: ota_tpl_shd.g_old_rec.currency_code;
280: End If;
281: If (p_rec.default_flag = hr_api.g_varchar2) then
282: p_rec.default_flag :=
283: ota_tpl_shd.g_old_rec.default_flag;
284: End If;
285: If (p_rec.name = hr_api.g_varchar2) then
286: p_rec.name :=
287: ota_tpl_shd.g_old_rec.name;
283: ota_tpl_shd.g_old_rec.default_flag;
284: End If;
285: If (p_rec.name = hr_api.g_varchar2) then
286: p_rec.name :=
287: ota_tpl_shd.g_old_rec.name;
288: End If;
289: If (p_rec.price_list_type = hr_api.g_varchar2) then
290: p_rec.price_list_type :=
291: ota_tpl_shd.g_old_rec.price_list_type;
287: ota_tpl_shd.g_old_rec.name;
288: End If;
289: If (p_rec.price_list_type = hr_api.g_varchar2) then
290: p_rec.price_list_type :=
291: ota_tpl_shd.g_old_rec.price_list_type;
292: End If;
293: If (p_rec.start_date = hr_api.g_date) then
294: p_rec.start_date :=
295: ota_tpl_shd.g_old_rec.start_date;
291: ota_tpl_shd.g_old_rec.price_list_type;
292: End If;
293: If (p_rec.start_date = hr_api.g_date) then
294: p_rec.start_date :=
295: ota_tpl_shd.g_old_rec.start_date;
296: End If;
297: If (p_rec.comments = hr_api.g_varchar2) then
298: p_rec.comments :=
299: ota_tpl_shd.g_old_rec.comments;
295: ota_tpl_shd.g_old_rec.start_date;
296: End If;
297: If (p_rec.comments = hr_api.g_varchar2) then
298: p_rec.comments :=
299: ota_tpl_shd.g_old_rec.comments;
300: End If;
301: If (p_rec.description = hr_api.g_varchar2) then
302: p_rec.description :=
303: ota_tpl_shd.g_old_rec.description;
299: ota_tpl_shd.g_old_rec.comments;
300: End If;
301: If (p_rec.description = hr_api.g_varchar2) then
302: p_rec.description :=
303: ota_tpl_shd.g_old_rec.description;
304: End If;
305: If (p_rec.end_date = hr_api.g_date) then
306: p_rec.end_date :=
307: ota_tpl_shd.g_old_rec.end_date;
303: ota_tpl_shd.g_old_rec.description;
304: End If;
305: If (p_rec.end_date = hr_api.g_date) then
306: p_rec.end_date :=
307: ota_tpl_shd.g_old_rec.end_date;
308: End If;
309: If (p_rec.single_unit_price = hr_api.g_number) then
310: p_rec.single_unit_price :=
311: ota_tpl_shd.g_old_rec.single_unit_price;
307: ota_tpl_shd.g_old_rec.end_date;
308: End If;
309: If (p_rec.single_unit_price = hr_api.g_number) then
310: p_rec.single_unit_price :=
311: ota_tpl_shd.g_old_rec.single_unit_price;
312: End If;
313: If (p_rec.training_unit_type = hr_api.g_varchar2) then
314: p_rec.training_unit_type :=
315: ota_tpl_shd.g_old_rec.training_unit_type;
311: ota_tpl_shd.g_old_rec.single_unit_price;
312: End If;
313: If (p_rec.training_unit_type = hr_api.g_varchar2) then
314: p_rec.training_unit_type :=
315: ota_tpl_shd.g_old_rec.training_unit_type;
316: End If;
317: If (p_rec.tpl_information_category = hr_api.g_varchar2) then
318: p_rec.tpl_information_category :=
319: ota_tpl_shd.g_old_rec.tpl_information_category;
315: ota_tpl_shd.g_old_rec.training_unit_type;
316: End If;
317: If (p_rec.tpl_information_category = hr_api.g_varchar2) then
318: p_rec.tpl_information_category :=
319: ota_tpl_shd.g_old_rec.tpl_information_category;
320: End If;
321: If (p_rec.tpl_information1 = hr_api.g_varchar2) then
322: p_rec.tpl_information1 :=
323: ota_tpl_shd.g_old_rec.tpl_information1;
319: ota_tpl_shd.g_old_rec.tpl_information_category;
320: End If;
321: If (p_rec.tpl_information1 = hr_api.g_varchar2) then
322: p_rec.tpl_information1 :=
323: ota_tpl_shd.g_old_rec.tpl_information1;
324: End If;
325: If (p_rec.tpl_information2 = hr_api.g_varchar2) then
326: p_rec.tpl_information2 :=
327: ota_tpl_shd.g_old_rec.tpl_information2;
323: ota_tpl_shd.g_old_rec.tpl_information1;
324: End If;
325: If (p_rec.tpl_information2 = hr_api.g_varchar2) then
326: p_rec.tpl_information2 :=
327: ota_tpl_shd.g_old_rec.tpl_information2;
328: End If;
329: If (p_rec.tpl_information3 = hr_api.g_varchar2) then
330: p_rec.tpl_information3 :=
331: ota_tpl_shd.g_old_rec.tpl_information3;
327: ota_tpl_shd.g_old_rec.tpl_information2;
328: End If;
329: If (p_rec.tpl_information3 = hr_api.g_varchar2) then
330: p_rec.tpl_information3 :=
331: ota_tpl_shd.g_old_rec.tpl_information3;
332: End If;
333: If (p_rec.tpl_information4 = hr_api.g_varchar2) then
334: p_rec.tpl_information4 :=
335: ota_tpl_shd.g_old_rec.tpl_information4;
331: ota_tpl_shd.g_old_rec.tpl_information3;
332: End If;
333: If (p_rec.tpl_information4 = hr_api.g_varchar2) then
334: p_rec.tpl_information4 :=
335: ota_tpl_shd.g_old_rec.tpl_information4;
336: End If;
337: If (p_rec.tpl_information5 = hr_api.g_varchar2) then
338: p_rec.tpl_information5 :=
339: ota_tpl_shd.g_old_rec.tpl_information5;
335: ota_tpl_shd.g_old_rec.tpl_information4;
336: End If;
337: If (p_rec.tpl_information5 = hr_api.g_varchar2) then
338: p_rec.tpl_information5 :=
339: ota_tpl_shd.g_old_rec.tpl_information5;
340: End If;
341: If (p_rec.tpl_information6 = hr_api.g_varchar2) then
342: p_rec.tpl_information6 :=
343: ota_tpl_shd.g_old_rec.tpl_information6;
339: ota_tpl_shd.g_old_rec.tpl_information5;
340: End If;
341: If (p_rec.tpl_information6 = hr_api.g_varchar2) then
342: p_rec.tpl_information6 :=
343: ota_tpl_shd.g_old_rec.tpl_information6;
344: End If;
345: If (p_rec.tpl_information7 = hr_api.g_varchar2) then
346: p_rec.tpl_information7 :=
347: ota_tpl_shd.g_old_rec.tpl_information7;
343: ota_tpl_shd.g_old_rec.tpl_information6;
344: End If;
345: If (p_rec.tpl_information7 = hr_api.g_varchar2) then
346: p_rec.tpl_information7 :=
347: ota_tpl_shd.g_old_rec.tpl_information7;
348: End If;
349: If (p_rec.tpl_information8 = hr_api.g_varchar2) then
350: p_rec.tpl_information8 :=
351: ota_tpl_shd.g_old_rec.tpl_information8;
347: ota_tpl_shd.g_old_rec.tpl_information7;
348: End If;
349: If (p_rec.tpl_information8 = hr_api.g_varchar2) then
350: p_rec.tpl_information8 :=
351: ota_tpl_shd.g_old_rec.tpl_information8;
352: End If;
353: If (p_rec.tpl_information9 = hr_api.g_varchar2) then
354: p_rec.tpl_information9 :=
355: ota_tpl_shd.g_old_rec.tpl_information9;
351: ota_tpl_shd.g_old_rec.tpl_information8;
352: End If;
353: If (p_rec.tpl_information9 = hr_api.g_varchar2) then
354: p_rec.tpl_information9 :=
355: ota_tpl_shd.g_old_rec.tpl_information9;
356: End If;
357: If (p_rec.tpl_information10 = hr_api.g_varchar2) then
358: p_rec.tpl_information10 :=
359: ota_tpl_shd.g_old_rec.tpl_information10;
355: ota_tpl_shd.g_old_rec.tpl_information9;
356: End If;
357: If (p_rec.tpl_information10 = hr_api.g_varchar2) then
358: p_rec.tpl_information10 :=
359: ota_tpl_shd.g_old_rec.tpl_information10;
360: End If;
361: If (p_rec.tpl_information11 = hr_api.g_varchar2) then
362: p_rec.tpl_information11 :=
363: ota_tpl_shd.g_old_rec.tpl_information11;
359: ota_tpl_shd.g_old_rec.tpl_information10;
360: End If;
361: If (p_rec.tpl_information11 = hr_api.g_varchar2) then
362: p_rec.tpl_information11 :=
363: ota_tpl_shd.g_old_rec.tpl_information11;
364: End If;
365: If (p_rec.tpl_information12 = hr_api.g_varchar2) then
366: p_rec.tpl_information12 :=
367: ota_tpl_shd.g_old_rec.tpl_information12;
363: ota_tpl_shd.g_old_rec.tpl_information11;
364: End If;
365: If (p_rec.tpl_information12 = hr_api.g_varchar2) then
366: p_rec.tpl_information12 :=
367: ota_tpl_shd.g_old_rec.tpl_information12;
368: End If;
369: If (p_rec.tpl_information13 = hr_api.g_varchar2) then
370: p_rec.tpl_information13 :=
371: ota_tpl_shd.g_old_rec.tpl_information13;
367: ota_tpl_shd.g_old_rec.tpl_information12;
368: End If;
369: If (p_rec.tpl_information13 = hr_api.g_varchar2) then
370: p_rec.tpl_information13 :=
371: ota_tpl_shd.g_old_rec.tpl_information13;
372: End If;
373: If (p_rec.tpl_information14 = hr_api.g_varchar2) then
374: p_rec.tpl_information14 :=
375: ota_tpl_shd.g_old_rec.tpl_information14;
371: ota_tpl_shd.g_old_rec.tpl_information13;
372: End If;
373: If (p_rec.tpl_information14 = hr_api.g_varchar2) then
374: p_rec.tpl_information14 :=
375: ota_tpl_shd.g_old_rec.tpl_information14;
376: End If;
377: If (p_rec.tpl_information15 = hr_api.g_varchar2) then
378: p_rec.tpl_information15 :=
379: ota_tpl_shd.g_old_rec.tpl_information15;
375: ota_tpl_shd.g_old_rec.tpl_information14;
376: End If;
377: If (p_rec.tpl_information15 = hr_api.g_varchar2) then
378: p_rec.tpl_information15 :=
379: ota_tpl_shd.g_old_rec.tpl_information15;
380: End If;
381: If (p_rec.tpl_information16 = hr_api.g_varchar2) then
382: p_rec.tpl_information16 :=
383: ota_tpl_shd.g_old_rec.tpl_information16;
379: ota_tpl_shd.g_old_rec.tpl_information15;
380: End If;
381: If (p_rec.tpl_information16 = hr_api.g_varchar2) then
382: p_rec.tpl_information16 :=
383: ota_tpl_shd.g_old_rec.tpl_information16;
384: End If;
385: If (p_rec.tpl_information17 = hr_api.g_varchar2) then
386: p_rec.tpl_information17 :=
387: ota_tpl_shd.g_old_rec.tpl_information17;
383: ota_tpl_shd.g_old_rec.tpl_information16;
384: End If;
385: If (p_rec.tpl_information17 = hr_api.g_varchar2) then
386: p_rec.tpl_information17 :=
387: ota_tpl_shd.g_old_rec.tpl_information17;
388: End If;
389: If (p_rec.tpl_information18 = hr_api.g_varchar2) then
390: p_rec.tpl_information18 :=
391: ota_tpl_shd.g_old_rec.tpl_information18;
387: ota_tpl_shd.g_old_rec.tpl_information17;
388: End If;
389: If (p_rec.tpl_information18 = hr_api.g_varchar2) then
390: p_rec.tpl_information18 :=
391: ota_tpl_shd.g_old_rec.tpl_information18;
392: End If;
393: If (p_rec.tpl_information19 = hr_api.g_varchar2) then
394: p_rec.tpl_information19 :=
395: ota_tpl_shd.g_old_rec.tpl_information19;
391: ota_tpl_shd.g_old_rec.tpl_information18;
392: End If;
393: If (p_rec.tpl_information19 = hr_api.g_varchar2) then
394: p_rec.tpl_information19 :=
395: ota_tpl_shd.g_old_rec.tpl_information19;
396: End If;
397: If (p_rec.tpl_information20 = hr_api.g_varchar2) then
398: p_rec.tpl_information20 :=
399: ota_tpl_shd.g_old_rec.tpl_information20;
395: ota_tpl_shd.g_old_rec.tpl_information19;
396: End If;
397: If (p_rec.tpl_information20 = hr_api.g_varchar2) then
398: p_rec.tpl_information20 :=
399: ota_tpl_shd.g_old_rec.tpl_information20;
400: End If;
401: --
402: -- Return the plsql record structure.
403: --
410: -- |---------------------------------< upd >----------------------------------|
411: -- ----------------------------------------------------------------------------
412: Procedure upd
413: (
414: p_rec in out ota_tpl_shd.g_rec_type,
415: p_validate in boolean default false
416: ) is
417: --
418: l_proc varchar2(72) := g_package||'upd';
430: End If;
431: --
432: -- We must lock the row which we need to update.
433: --
434: ota_tpl_shd.lck
435: (
436: p_rec.price_list_id,
437: p_rec.object_version_number
438: );
514: p_tpl_information20 in varchar2 default hr_api.g_varchar2,
515: p_validate in boolean default false
516: ) is
517: --
518: l_rec ota_tpl_shd.g_rec_type;
519: l_proc varchar2(72) := g_package||'upd';
520: --
521: Begin
522: hr_utility.set_location('Entering:'||l_proc, 5);
524: -- Call conversion function to turn arguments into the
525: -- l_rec structure.
526: --
527: l_rec :=
528: ota_tpl_shd.convert_args
529: (
530: p_price_list_id,
531: p_business_group_id,
532: p_currency_code,