52: --
53: -- {End Of Comments}
54: -- ----------------------------------------------------------------------------
55: Procedure update_dml
56: (p_rec in out nocopy ben_ctk_shd.g_rec_type
57: ) is
58: --
59: l_proc varchar2(72) := g_package||'update_dml';
60: --
65: --
66: -- Increment the object version
67: p_rec.object_version_number := p_rec.object_version_number + 1;
68: --
69: ben_ctk_shd.g_api_dml := true; -- Set the api dml status
70: --
71: -- Update the ben_cwb_person_tasks Row
72: --
73: update ben_cwb_person_tasks
81: ,object_version_number = p_rec.object_version_number
82: where group_per_in_ler_id = p_rec.group_per_in_ler_id
83: and task_id = p_rec.task_id;
84: --
85: ben_ctk_shd.g_api_dml := false; -- Unset the api dml status
86: --
87: if g_debug then
88: hr_utility.set_location(' Leaving:'||l_proc, 10);
89: end if;
90: --
91: Exception
92: When hr_api.check_integrity_violated Then
93: -- A check constraint has been violated
94: ben_ctk_shd.g_api_dml := false; -- Unset the api dml status
95: ben_ctk_shd.constraint_error
96: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
97: When hr_api.parent_integrity_violated Then
98: -- Parent integrity has been violated
91: Exception
92: When hr_api.check_integrity_violated Then
93: -- A check constraint has been violated
94: ben_ctk_shd.g_api_dml := false; -- Unset the api dml status
95: ben_ctk_shd.constraint_error
96: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
97: When hr_api.parent_integrity_violated Then
98: -- Parent integrity has been violated
99: ben_ctk_shd.g_api_dml := false; -- Unset the api dml status
95: ben_ctk_shd.constraint_error
96: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
97: When hr_api.parent_integrity_violated Then
98: -- Parent integrity has been violated
99: ben_ctk_shd.g_api_dml := false; -- Unset the api dml status
100: ben_ctk_shd.constraint_error
101: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
102: When hr_api.unique_integrity_violated Then
103: -- Unique integrity has been violated
96: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
97: When hr_api.parent_integrity_violated Then
98: -- Parent integrity has been violated
99: ben_ctk_shd.g_api_dml := false; -- Unset the api dml status
100: ben_ctk_shd.constraint_error
101: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
102: When hr_api.unique_integrity_violated Then
103: -- Unique integrity has been violated
104: ben_ctk_shd.g_api_dml := false; -- Unset the api dml status
100: ben_ctk_shd.constraint_error
101: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
102: When hr_api.unique_integrity_violated Then
103: -- Unique integrity has been violated
104: ben_ctk_shd.g_api_dml := false; -- Unset the api dml status
105: ben_ctk_shd.constraint_error
106: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
107: When Others Then
108: ben_ctk_shd.g_api_dml := false; -- Unset the api dml status
101: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
102: When hr_api.unique_integrity_violated Then
103: -- Unique integrity has been violated
104: ben_ctk_shd.g_api_dml := false; -- Unset the api dml status
105: ben_ctk_shd.constraint_error
106: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
107: When Others Then
108: ben_ctk_shd.g_api_dml := false; -- Unset the api dml status
109: Raise;
104: ben_ctk_shd.g_api_dml := false; -- Unset the api dml status
105: ben_ctk_shd.constraint_error
106: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
107: When Others Then
108: ben_ctk_shd.g_api_dml := false; -- Unset the api dml status
109: Raise;
110: End update_dml;
111: --
112: -- ----------------------------------------------------------------------------
141: --
142: -- {End Of Comments}
143: -- ----------------------------------------------------------------------------
144: Procedure pre_update
145: (p_rec in ben_ctk_shd.g_rec_type
146: ) is
147: --
148: l_proc varchar2(72) := g_package||'pre_update';
149: --
189: --
190: -- {End Of Comments}
191: -- ----------------------------------------------------------------------------
192: Procedure post_update
193: (p_rec in ben_ctk_shd.g_rec_type
194: ) is
195: --
196: l_proc varchar2(72) := g_package||'post_update';
197: --
220: => p_rec.task_last_update_by
221: ,p_object_version_number
222: => p_rec.object_version_number
223: ,p_group_pl_id_o
224: => ben_ctk_shd.g_old_rec.group_pl_id
225: ,p_lf_evt_ocrd_dt_o
226: => ben_ctk_shd.g_old_rec.lf_evt_ocrd_dt
227: ,p_status_cd_o
228: => ben_ctk_shd.g_old_rec.status_cd
222: => p_rec.object_version_number
223: ,p_group_pl_id_o
224: => ben_ctk_shd.g_old_rec.group_pl_id
225: ,p_lf_evt_ocrd_dt_o
226: => ben_ctk_shd.g_old_rec.lf_evt_ocrd_dt
227: ,p_status_cd_o
228: => ben_ctk_shd.g_old_rec.status_cd
229: ,p_access_cd_o
230: => ben_ctk_shd.g_old_rec.access_cd
224: => ben_ctk_shd.g_old_rec.group_pl_id
225: ,p_lf_evt_ocrd_dt_o
226: => ben_ctk_shd.g_old_rec.lf_evt_ocrd_dt
227: ,p_status_cd_o
228: => ben_ctk_shd.g_old_rec.status_cd
229: ,p_access_cd_o
230: => ben_ctk_shd.g_old_rec.access_cd
231: ,p_task_last_update_date_o
232: => ben_ctk_shd.g_old_rec.task_last_update_date
226: => ben_ctk_shd.g_old_rec.lf_evt_ocrd_dt
227: ,p_status_cd_o
228: => ben_ctk_shd.g_old_rec.status_cd
229: ,p_access_cd_o
230: => ben_ctk_shd.g_old_rec.access_cd
231: ,p_task_last_update_date_o
232: => ben_ctk_shd.g_old_rec.task_last_update_date
233: ,p_task_last_update_by_o
234: => ben_ctk_shd.g_old_rec.task_last_update_by
228: => ben_ctk_shd.g_old_rec.status_cd
229: ,p_access_cd_o
230: => ben_ctk_shd.g_old_rec.access_cd
231: ,p_task_last_update_date_o
232: => ben_ctk_shd.g_old_rec.task_last_update_date
233: ,p_task_last_update_by_o
234: => ben_ctk_shd.g_old_rec.task_last_update_by
235: ,p_object_version_number_o
236: => ben_ctk_shd.g_old_rec.object_version_number
230: => ben_ctk_shd.g_old_rec.access_cd
231: ,p_task_last_update_date_o
232: => ben_ctk_shd.g_old_rec.task_last_update_date
233: ,p_task_last_update_by_o
234: => ben_ctk_shd.g_old_rec.task_last_update_by
235: ,p_object_version_number_o
236: => ben_ctk_shd.g_old_rec.object_version_number
237: );
238: --
232: => ben_ctk_shd.g_old_rec.task_last_update_date
233: ,p_task_last_update_by_o
234: => ben_ctk_shd.g_old_rec.task_last_update_by
235: ,p_object_version_number_o
236: => ben_ctk_shd.g_old_rec.object_version_number
237: );
238: --
239: exception
240: --
294: --
295: -- {End Of Comments}
296: -- ----------------------------------------------------------------------------
297: Procedure convert_defs
298: (p_rec in out nocopy ben_ctk_shd.g_rec_type
299: ) is
300: --
301: Begin
302: --
306: -- is being used then we must set to the 'current' argument value.
307: --
308: If (p_rec.group_pl_id = hr_api.g_number) then
309: p_rec.group_pl_id :=
310: ben_ctk_shd.g_old_rec.group_pl_id;
311: End If;
312: If (p_rec.lf_evt_ocrd_dt = hr_api.g_date) then
313: p_rec.lf_evt_ocrd_dt :=
314: ben_ctk_shd.g_old_rec.lf_evt_ocrd_dt;
310: ben_ctk_shd.g_old_rec.group_pl_id;
311: End If;
312: If (p_rec.lf_evt_ocrd_dt = hr_api.g_date) then
313: p_rec.lf_evt_ocrd_dt :=
314: ben_ctk_shd.g_old_rec.lf_evt_ocrd_dt;
315: End If;
316: If (p_rec.status_cd = hr_api.g_varchar2) then
317: p_rec.status_cd :=
318: ben_ctk_shd.g_old_rec.status_cd;
314: ben_ctk_shd.g_old_rec.lf_evt_ocrd_dt;
315: End If;
316: If (p_rec.status_cd = hr_api.g_varchar2) then
317: p_rec.status_cd :=
318: ben_ctk_shd.g_old_rec.status_cd;
319: End If;
320: If (p_rec.access_cd = hr_api.g_varchar2) then
321: p_rec.access_cd :=
322: ben_ctk_shd.g_old_rec.access_cd;
318: ben_ctk_shd.g_old_rec.status_cd;
319: End If;
320: If (p_rec.access_cd = hr_api.g_varchar2) then
321: p_rec.access_cd :=
322: ben_ctk_shd.g_old_rec.access_cd;
323: End If;
324: If (p_rec.task_last_update_date = hr_api.g_date) then
325: p_rec.task_last_update_date :=
326: ben_ctk_shd.g_old_rec.task_last_update_date;
322: ben_ctk_shd.g_old_rec.access_cd;
323: End If;
324: If (p_rec.task_last_update_date = hr_api.g_date) then
325: p_rec.task_last_update_date :=
326: ben_ctk_shd.g_old_rec.task_last_update_date;
327: End If;
328: If (p_rec.task_last_update_by = hr_api.g_number) then
329: p_rec.task_last_update_by :=
330: ben_ctk_shd.g_old_rec.task_last_update_by;
326: ben_ctk_shd.g_old_rec.task_last_update_date;
327: End If;
328: If (p_rec.task_last_update_by = hr_api.g_number) then
329: p_rec.task_last_update_by :=
330: ben_ctk_shd.g_old_rec.task_last_update_by;
331: End If;
332: --
333: End convert_defs;
334: --
335: -- ----------------------------------------------------------------------------
336: -- |---------------------------------< upd >----------------------------------|
337: -- ----------------------------------------------------------------------------
338: Procedure upd
339: (p_rec in out nocopy ben_ctk_shd.g_rec_type
340: ) is
341: --
342: l_proc varchar2(72) := g_package||'upd';
343: --
347: end if;
348: --
349: -- We must lock the row which we need to update.
350: --
351: ben_ctk_shd.lck
352: (p_rec.group_per_in_ler_id
353: ,p_rec.task_id
354: ,p_rec.object_version_number
355: );
400: ,p_task_last_update_date in date default hr_api.g_date
401: ,p_task_last_update_by in number default hr_api.g_number
402: ) is
403: --
404: l_rec ben_ctk_shd.g_rec_type;
405: l_proc varchar2(72) := g_package||'upd';
406: --
407: Begin
408: if g_debug then
412: -- Call conversion function to turn arguments into the
413: -- l_rec structure.
414: --
415: l_rec :=
416: ben_ctk_shd.convert_args
417: (p_group_per_in_ler_id
418: ,p_task_id
419: ,p_group_pl_id
420: ,p_lf_evt_ocrd_dt