51: -- Internal Table Handler Use Only.
52: --
53: -- {End Of Comments}
54: -- ----------------------------------------------------------------------------
55: Procedure update_dml(p_rec in out nocopy hr_trn_shd.g_rec_type) is
56: --
57: l_proc varchar2(72) := g_package||'update_dml';
58: --
59: Begin
59: Begin
60: hr_utility.set_location('Entering:'||l_proc, 5);
61: --
62: --
63: hr_trn_shd.g_api_dml := true; -- Set the api dml status
64: --
65: -- Update the hr_api_transactions Row
66: --
67: update hr_api_transactions
97: where transaction_id = p_rec.transaction_id;
98: --
99: -- p_plan_id, p_rptg_grp_id, p_effective_date_option added by sanej
100: --
101: hr_trn_shd.g_api_dml := false; -- Unset the api dml status
102: --
103: hr_utility.set_location(' Leaving:'||l_proc, 10);
104: --
105: Exception
104: --
105: Exception
106: When hr_api.check_integrity_violated Then
107: -- A check constraint has been violated
108: hr_trn_shd.g_api_dml := false; -- Unset the api dml status
109: hr_trn_shd.constraint_error
110: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
111: When hr_api.parent_integrity_violated Then
112: -- Parent integrity has been violated
105: Exception
106: When hr_api.check_integrity_violated Then
107: -- A check constraint has been violated
108: hr_trn_shd.g_api_dml := false; -- Unset the api dml status
109: hr_trn_shd.constraint_error
110: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
111: When hr_api.parent_integrity_violated Then
112: -- Parent integrity has been violated
113: hr_trn_shd.g_api_dml := false; -- Unset the api dml status
109: hr_trn_shd.constraint_error
110: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
111: When hr_api.parent_integrity_violated Then
112: -- Parent integrity has been violated
113: hr_trn_shd.g_api_dml := false; -- Unset the api dml status
114: hr_trn_shd.constraint_error
115: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
116: When hr_api.unique_integrity_violated Then
117: -- Unique integrity has been violated
110: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
111: When hr_api.parent_integrity_violated Then
112: -- Parent integrity has been violated
113: hr_trn_shd.g_api_dml := false; -- Unset the api dml status
114: hr_trn_shd.constraint_error
115: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
116: When hr_api.unique_integrity_violated Then
117: -- Unique integrity has been violated
118: hr_trn_shd.g_api_dml := false; -- Unset the api dml status
114: hr_trn_shd.constraint_error
115: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
116: When hr_api.unique_integrity_violated Then
117: -- Unique integrity has been violated
118: hr_trn_shd.g_api_dml := false; -- Unset the api dml status
119: hr_trn_shd.constraint_error
120: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
121: When Others Then
122: hr_trn_shd.g_api_dml := false; -- Unset the api dml status
115: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
116: When hr_api.unique_integrity_violated Then
117: -- Unique integrity has been violated
118: hr_trn_shd.g_api_dml := false; -- Unset the api dml status
119: hr_trn_shd.constraint_error
120: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
121: When Others Then
122: hr_trn_shd.g_api_dml := false; -- Unset the api dml status
123: Raise;
118: hr_trn_shd.g_api_dml := false; -- Unset the api dml status
119: hr_trn_shd.constraint_error
120: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
121: When Others Then
122: hr_trn_shd.g_api_dml := false; -- Unset the api dml status
123: Raise;
124: End update_dml;
125: --
126: -- ----------------------------------------------------------------------------
154: -- Internal Table Handler Use Only.
155: --
156: -- {End Of Comments}
157: -- ----------------------------------------------------------------------------
158: Procedure pre_update(p_rec in hr_trn_shd.g_rec_type) is
159: --
160: l_proc varchar2(72) := g_package||'pre_update';
161: --
162: Begin
196: -- Internal Table Handler Use Only.
197: --
198: -- {End Of Comments}
199: -- ----------------------------------------------------------------------------
200: Procedure post_update(p_rec in hr_trn_shd.g_rec_type) is
201: --
202: l_proc varchar2(72) := g_package||'post_update';
203: --
204: Begin
252: -- {End Of Comments}
253: -- ----------------------------------------------------------------------------
254:
255: /*
256: Procedure convert_defs(p_rec in out nocopy hr_trn_shd.g_rec_type) is
257: --
258: l_proc varchar2(72) := g_package||'convert_defs';
259: --
260: Begin
267: -- is being used then we must set to the 'current' argument value.
268: --
269: If (p_rec.creator_person_id = hr_api.g_number) then
270: p_rec.creator_person_id :=
271: hr_trn_shd.g_old_rec.creator_person_id;
272: End If;
273: If (p_rec.transaction_privilege = hr_api.g_varchar2) then
274: p_rec.transaction_privilege :=
275: hr_trn_shd.g_old_rec.transaction_privilege;
271: hr_trn_shd.g_old_rec.creator_person_id;
272: End If;
273: If (p_rec.transaction_privilege = hr_api.g_varchar2) then
274: p_rec.transaction_privilege :=
275: hr_trn_shd.g_old_rec.transaction_privilege;
276: End If;
277: --
278: hr_utility.set_location(' Leaving:'||l_proc, 10);
279: --
279: --
280: End convert_defs;
281: */
282:
283: Procedure convert_defs(p_rec in out nocopy hr_trn_shd.g_rec_type) is
284: --
285: l_proc varchar2(72) := g_package||'convert_defs';
286: --
287: Begin
294: -- is being used then we must set to the 'current' argument value.
295: --
296: If (p_rec.creator_person_id = hr_api.g_number) then
297: p_rec.creator_person_id :=
298: hr_trn_shd.g_old_rec.creator_person_id;
299: End If;
300: If (p_rec.transaction_privilege = hr_api.g_varchar2) then
301: p_rec.transaction_privilege :=
302: hr_trn_shd.g_old_rec.transaction_privilege;
298: hr_trn_shd.g_old_rec.creator_person_id;
299: End If;
300: If (p_rec.transaction_privilege = hr_api.g_varchar2) then
301: p_rec.transaction_privilege :=
302: hr_trn_shd.g_old_rec.transaction_privilege;
303: End If;
304: If (p_rec.product_code = hr_api.g_varchar2) then
305: p_rec.product_code :=
306: hr_trn_shd.g_old_rec.product_code;
302: hr_trn_shd.g_old_rec.transaction_privilege;
303: End If;
304: If (p_rec.product_code = hr_api.g_varchar2) then
305: p_rec.product_code :=
306: hr_trn_shd.g_old_rec.product_code;
307: End If;
308: If (p_rec.url = hr_api.g_varchar2) then
309: p_rec.url :=
310: hr_trn_shd.g_old_rec.url;
306: hr_trn_shd.g_old_rec.product_code;
307: End If;
308: If (p_rec.url = hr_api.g_varchar2) then
309: p_rec.url :=
310: hr_trn_shd.g_old_rec.url;
311: End If;
312: If (p_rec.status = hr_api.g_varchar2) then
313: p_rec.status :=
314: hr_trn_shd.g_old_rec.status;
310: hr_trn_shd.g_old_rec.url;
311: End If;
312: If (p_rec.status = hr_api.g_varchar2) then
313: p_rec.status :=
314: hr_trn_shd.g_old_rec.status;
315: End If;
316: If (p_rec.section_display_name = hr_api.g_varchar2) then
317: p_rec.section_display_name :=
318: hr_trn_shd.g_old_rec.section_display_name;
314: hr_trn_shd.g_old_rec.status;
315: End If;
316: If (p_rec.section_display_name = hr_api.g_varchar2) then
317: p_rec.section_display_name :=
318: hr_trn_shd.g_old_rec.section_display_name;
319: End If;
320: If (p_rec.function_id = hr_api.g_number) then
321: p_rec.function_id :=
322: hr_trn_shd.g_old_rec.function_id;
318: hr_trn_shd.g_old_rec.section_display_name;
319: End If;
320: If (p_rec.function_id = hr_api.g_number) then
321: p_rec.function_id :=
322: hr_trn_shd.g_old_rec.function_id;
323: End If;
324: If (p_rec.transaction_ref_table = hr_api.g_varchar2) then
325: p_rec.transaction_ref_table :=
326: hr_trn_shd.g_old_rec.transaction_ref_table;
322: hr_trn_shd.g_old_rec.function_id;
323: End If;
324: If (p_rec.transaction_ref_table = hr_api.g_varchar2) then
325: p_rec.transaction_ref_table :=
326: hr_trn_shd.g_old_rec.transaction_ref_table;
327: End If;
328: If (p_rec.transaction_ref_id = hr_api.g_number) then
329: p_rec.transaction_ref_id :=
330: hr_trn_shd.g_old_rec.transaction_ref_id;
326: hr_trn_shd.g_old_rec.transaction_ref_table;
327: End If;
328: If (p_rec.transaction_ref_id = hr_api.g_number) then
329: p_rec.transaction_ref_id :=
330: hr_trn_shd.g_old_rec.transaction_ref_id;
331: End If;
332: If (p_rec.transaction_type = hr_api.g_varchar2) then
333: p_rec.transaction_type :=
334: hr_trn_shd.g_old_rec.transaction_type;
330: hr_trn_shd.g_old_rec.transaction_ref_id;
331: End If;
332: If (p_rec.transaction_type = hr_api.g_varchar2) then
333: p_rec.transaction_type :=
334: hr_trn_shd.g_old_rec.transaction_type;
335: End If;
336: If (p_rec.assignment_id = hr_api.g_number) then
337: p_rec.assignment_id :=
338: hr_trn_shd.g_old_rec.assignment_id;
334: hr_trn_shd.g_old_rec.transaction_type;
335: End If;
336: If (p_rec.assignment_id = hr_api.g_number) then
337: p_rec.assignment_id :=
338: hr_trn_shd.g_old_rec.assignment_id;
339: End If;
340: If (p_rec.api_addtnl_info = hr_api.g_varchar2) then
341: p_rec.api_addtnl_info :=
342: hr_trn_shd.g_old_rec.api_addtnl_info;
338: hr_trn_shd.g_old_rec.assignment_id;
339: End If;
340: If (p_rec.api_addtnl_info = hr_api.g_varchar2) then
341: p_rec.api_addtnl_info :=
342: hr_trn_shd.g_old_rec.api_addtnl_info;
343: End If;
344: If (p_rec.selected_person_id = hr_api.g_number) then
345: p_rec.selected_person_id :=
346: hr_trn_shd.g_old_rec.selected_person_id;
342: hr_trn_shd.g_old_rec.api_addtnl_info;
343: End If;
344: If (p_rec.selected_person_id = hr_api.g_number) then
345: p_rec.selected_person_id :=
346: hr_trn_shd.g_old_rec.selected_person_id;
347: End If;
348: If (p_rec.item_type = hr_api.g_varchar2) then
349: p_rec.item_type :=
350: hr_trn_shd.g_old_rec.item_type;
346: hr_trn_shd.g_old_rec.selected_person_id;
347: End If;
348: If (p_rec.item_type = hr_api.g_varchar2) then
349: p_rec.item_type :=
350: hr_trn_shd.g_old_rec.item_type;
351: End If;
352: If (p_rec.item_key = hr_api.g_varchar2) then
353: p_rec.item_key :=
354: hr_trn_shd.g_old_rec.item_key;
350: hr_trn_shd.g_old_rec.item_type;
351: End If;
352: If (p_rec.item_key = hr_api.g_varchar2) then
353: p_rec.item_key :=
354: hr_trn_shd.g_old_rec.item_key;
355: End If;
356: If (p_rec.transaction_effective_date = hr_api.g_date) then
357: p_rec.transaction_effective_date :=
358: hr_trn_shd.g_old_rec.transaction_effective_date;
354: hr_trn_shd.g_old_rec.item_key;
355: End If;
356: If (p_rec.transaction_effective_date = hr_api.g_date) then
357: p_rec.transaction_effective_date :=
358: hr_trn_shd.g_old_rec.transaction_effective_date;
359: End If;
360: If (p_rec.process_name = hr_api.g_varchar2) then
361: p_rec.process_name :=
362: hr_trn_shd.g_old_rec.process_name;
358: hr_trn_shd.g_old_rec.transaction_effective_date;
359: End If;
360: If (p_rec.process_name = hr_api.g_varchar2) then
361: p_rec.process_name :=
362: hr_trn_shd.g_old_rec.process_name;
363: End If;
364: If (p_rec.plan_id = hr_api.g_number) then
365: p_rec.plan_id :=
366: hr_trn_shd.g_old_rec.plan_id;
362: hr_trn_shd.g_old_rec.process_name;
363: End If;
364: If (p_rec.plan_id = hr_api.g_number) then
365: p_rec.plan_id :=
366: hr_trn_shd.g_old_rec.plan_id;
367: End If;
368: If (p_rec.rptg_grp_id = hr_api.g_number) then
369: p_rec.rptg_grp_id :=
370: hr_trn_shd.g_old_rec.rptg_grp_id;
366: hr_trn_shd.g_old_rec.plan_id;
367: End If;
368: If (p_rec.rptg_grp_id = hr_api.g_number) then
369: p_rec.rptg_grp_id :=
370: hr_trn_shd.g_old_rec.rptg_grp_id;
371: End If;
372: If (p_rec.effective_date_option = hr_api.g_varchar2) then
373: p_rec.effective_date_option :=
374: hr_trn_shd.g_old_rec.effective_date_option;
370: hr_trn_shd.g_old_rec.rptg_grp_id;
371: End If;
372: If (p_rec.effective_date_option = hr_api.g_varchar2) then
373: p_rec.effective_date_option :=
374: hr_trn_shd.g_old_rec.effective_date_option;
375: End If;
376: If (p_rec.parent_transaction_id = hr_api.g_number) then
377: p_rec.parent_transaction_id :=
378: hr_trn_shd.g_old_rec.parent_transaction_id;
374: hr_trn_shd.g_old_rec.effective_date_option;
375: End If;
376: If (p_rec.parent_transaction_id = hr_api.g_number) then
377: p_rec.parent_transaction_id :=
378: hr_trn_shd.g_old_rec.parent_transaction_id;
379: End If;
380: If (p_rec.relaunch_function = hr_api.g_varchar2) then
381: p_rec.relaunch_function :=
382: hr_trn_shd.g_old_rec.relaunch_function;
378: hr_trn_shd.g_old_rec.parent_transaction_id;
379: End If;
380: If (p_rec.relaunch_function = hr_api.g_varchar2) then
381: p_rec.relaunch_function :=
382: hr_trn_shd.g_old_rec.relaunch_function;
383: End If;
384: If (p_rec.transaction_group = hr_api.g_varchar2) then
385: p_rec.transaction_group :=
386: hr_trn_shd.g_old_rec.transaction_group;
382: hr_trn_shd.g_old_rec.relaunch_function;
383: End If;
384: If (p_rec.transaction_group = hr_api.g_varchar2) then
385: p_rec.transaction_group :=
386: hr_trn_shd.g_old_rec.transaction_group;
387: End If;
388: If (p_rec.transaction_identifier = hr_api.g_varchar2) then
389: p_rec.transaction_identifier :=
390: hr_trn_shd.g_old_rec.transaction_identifier;
386: hr_trn_shd.g_old_rec.transaction_group;
387: End If;
388: If (p_rec.transaction_identifier = hr_api.g_varchar2) then
389: p_rec.transaction_identifier :=
390: hr_trn_shd.g_old_rec.transaction_identifier;
391: End If;
392:
393: -- If the new value is null then set it to its original value.
394: If (p_rec.transaction_document is null) then
392:
393: -- If the new value is null then set it to its original value.
394: If (p_rec.transaction_document is null) then
395: p_rec.transaction_document :=
396: hr_trn_shd.g_old_rec.transaction_document;
397: End If;
398: --
399: -- plan_id, rptg_grp_id, effective_date_option added by sanej
400: --
400: --
401: --ns start
402: -- Set the transaction state to wip if it's not a new transaction
403: IF (p_rec.transaction_state = hr_api.g_varchar2 ) THEN
404: p_rec.transaction_state := hr_trn_shd.g_old_rec.transaction_state;
405: END IF;
406: --ns end
407: --
408:
415: -- |---------------------------------< upd >----------------------------------|
416: -- ----------------------------------------------------------------------------
417: Procedure upd
418: (
419: p_rec in out nocopy hr_trn_shd.g_rec_type,
420: p_validate in boolean default false
421: ) is
422: --
423: l_proc varchar2(72) := g_package||'upd';
435: End If;
436: --
437: -- We must lock the row which we need to update.
438: --
439: hr_trn_shd.lck
440: (
441: p_rec.transaction_id
442: );
443: --
488: p_transaction_privilege in varchar2 default hr_api.g_varchar2,
489: p_validate in boolean default false
490: ) is
491: --
492: l_rec hr_trn_shd.g_rec_type;
493: l_proc varchar2(72) := g_package||'upd';
494: --
495: Begin
496: hr_utility.set_location('Entering:'||l_proc, 5);
498: -- Call conversion function to turn arguments into the
499: -- l_rec structure.
500: --
501: l_rec :=
502: hr_trn_shd.convert_args
503: (
504: p_transaction_id,
505: p_creator_person_id,
506: p_transaction_privilege
554: ) is
555: --
556: -- p_plan_id, p_rptg_grp_id, p_effective_date_option added by sanej
557: --
558: l_rec hr_trn_shd.g_rec_type;
559: l_proc varchar2(72) := g_package||'upd';
560: --
561: Begin
562: hr_utility.set_location('Entering:'||l_proc, 5);
566: --
567:
568:
569: l_rec :=
570: hr_trn_shd.convert_args
571: (
572: p_transaction_id,
573: p_creator_person_id,
574: p_transaction_privilege,