44: -- Internal Row Handler Use Only.
45: --
46: -- {End Of Comments}
47: -- ----------------------------------------------------------------------------
48: Procedure update_dml(p_rec in out nocopy pqh_dfs_shd.g_rec_type) is
49: --
50: l_proc varchar2(72) := g_package||'update_dml';
51: --
52: Begin
78: --
79: Exception
80: When hr_api.check_integrity_violated Then
81: -- A check constraint has been violated
82: pqh_dfs_shd.constraint_error
83: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
84: When hr_api.parent_integrity_violated Then
85: -- Parent integrity has been violated
86: pqh_dfs_shd.constraint_error
82: pqh_dfs_shd.constraint_error
83: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
84: When hr_api.parent_integrity_violated Then
85: -- Parent integrity has been violated
86: pqh_dfs_shd.constraint_error
87: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
88: When hr_api.unique_integrity_violated Then
89: -- Unique integrity has been violated
90: pqh_dfs_shd.constraint_error
86: pqh_dfs_shd.constraint_error
87: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
88: When hr_api.unique_integrity_violated Then
89: -- Unique integrity has been violated
90: pqh_dfs_shd.constraint_error
91: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
92: When Others Then
93: Raise;
94: End update_dml;
124: -- Internal Row Handler Use Only.
125: --
126: -- {End Of Comments}
127: -- ----------------------------------------------------------------------------
128: Procedure pre_update(p_rec in pqh_dfs_shd.g_rec_type) is
129: --
130: l_proc varchar2(72) := g_package||'pre_update';
131: --
132: Begin
166: -- Internal Row Handler Use Only.
167: --
168: -- {End Of Comments}
169: -- ----------------------------------------------------------------------------
170: Procedure post_update(p_rec in pqh_dfs_shd.g_rec_type) is
171: --
172: l_proc varchar2(72) := g_package||'post_update';
173: --
174: -- check if sum of percentage is 100
212: ,p_expenditure_type =>p_rec.expenditure_type
213: ,p_organization_id =>p_rec.organization_id
214: ,p_object_version_number =>p_rec.object_version_number
215: ,p_cost_allocation_keyflex_id =>p_rec.cost_allocation_keyflex_id
216: ,p_dflt_budget_element_id_o =>pqh_dfs_shd.g_old_rec.dflt_budget_element_id
217: ,p_dflt_dist_percentage_o =>pqh_dfs_shd.g_old_rec.dflt_dist_percentage
218: ,p_project_id_o =>pqh_dfs_shd.g_old_rec.project_id
219: ,p_award_id_o =>pqh_dfs_shd.g_old_rec.award_id
220: ,p_task_id_o =>pqh_dfs_shd.g_old_rec.task_id
213: ,p_organization_id =>p_rec.organization_id
214: ,p_object_version_number =>p_rec.object_version_number
215: ,p_cost_allocation_keyflex_id =>p_rec.cost_allocation_keyflex_id
216: ,p_dflt_budget_element_id_o =>pqh_dfs_shd.g_old_rec.dflt_budget_element_id
217: ,p_dflt_dist_percentage_o =>pqh_dfs_shd.g_old_rec.dflt_dist_percentage
218: ,p_project_id_o =>pqh_dfs_shd.g_old_rec.project_id
219: ,p_award_id_o =>pqh_dfs_shd.g_old_rec.award_id
220: ,p_task_id_o =>pqh_dfs_shd.g_old_rec.task_id
221: ,p_expenditure_type_o =>pqh_dfs_shd.g_old_rec.expenditure_type
214: ,p_object_version_number =>p_rec.object_version_number
215: ,p_cost_allocation_keyflex_id =>p_rec.cost_allocation_keyflex_id
216: ,p_dflt_budget_element_id_o =>pqh_dfs_shd.g_old_rec.dflt_budget_element_id
217: ,p_dflt_dist_percentage_o =>pqh_dfs_shd.g_old_rec.dflt_dist_percentage
218: ,p_project_id_o =>pqh_dfs_shd.g_old_rec.project_id
219: ,p_award_id_o =>pqh_dfs_shd.g_old_rec.award_id
220: ,p_task_id_o =>pqh_dfs_shd.g_old_rec.task_id
221: ,p_expenditure_type_o =>pqh_dfs_shd.g_old_rec.expenditure_type
222: ,p_organization_id_o =>pqh_dfs_shd.g_old_rec.organization_id
215: ,p_cost_allocation_keyflex_id =>p_rec.cost_allocation_keyflex_id
216: ,p_dflt_budget_element_id_o =>pqh_dfs_shd.g_old_rec.dflt_budget_element_id
217: ,p_dflt_dist_percentage_o =>pqh_dfs_shd.g_old_rec.dflt_dist_percentage
218: ,p_project_id_o =>pqh_dfs_shd.g_old_rec.project_id
219: ,p_award_id_o =>pqh_dfs_shd.g_old_rec.award_id
220: ,p_task_id_o =>pqh_dfs_shd.g_old_rec.task_id
221: ,p_expenditure_type_o =>pqh_dfs_shd.g_old_rec.expenditure_type
222: ,p_organization_id_o =>pqh_dfs_shd.g_old_rec.organization_id
223: ,p_object_version_number_o =>pqh_dfs_shd.g_old_rec.object_version_number
216: ,p_dflt_budget_element_id_o =>pqh_dfs_shd.g_old_rec.dflt_budget_element_id
217: ,p_dflt_dist_percentage_o =>pqh_dfs_shd.g_old_rec.dflt_dist_percentage
218: ,p_project_id_o =>pqh_dfs_shd.g_old_rec.project_id
219: ,p_award_id_o =>pqh_dfs_shd.g_old_rec.award_id
220: ,p_task_id_o =>pqh_dfs_shd.g_old_rec.task_id
221: ,p_expenditure_type_o =>pqh_dfs_shd.g_old_rec.expenditure_type
222: ,p_organization_id_o =>pqh_dfs_shd.g_old_rec.organization_id
223: ,p_object_version_number_o =>pqh_dfs_shd.g_old_rec.object_version_number
224: ,p_cost_allocation_keyflex_id_o =>pqh_dfs_shd.g_old_rec.cost_allocation_keyflex_id
217: ,p_dflt_dist_percentage_o =>pqh_dfs_shd.g_old_rec.dflt_dist_percentage
218: ,p_project_id_o =>pqh_dfs_shd.g_old_rec.project_id
219: ,p_award_id_o =>pqh_dfs_shd.g_old_rec.award_id
220: ,p_task_id_o =>pqh_dfs_shd.g_old_rec.task_id
221: ,p_expenditure_type_o =>pqh_dfs_shd.g_old_rec.expenditure_type
222: ,p_organization_id_o =>pqh_dfs_shd.g_old_rec.organization_id
223: ,p_object_version_number_o =>pqh_dfs_shd.g_old_rec.object_version_number
224: ,p_cost_allocation_keyflex_id_o =>pqh_dfs_shd.g_old_rec.cost_allocation_keyflex_id
225: );
218: ,p_project_id_o =>pqh_dfs_shd.g_old_rec.project_id
219: ,p_award_id_o =>pqh_dfs_shd.g_old_rec.award_id
220: ,p_task_id_o =>pqh_dfs_shd.g_old_rec.task_id
221: ,p_expenditure_type_o =>pqh_dfs_shd.g_old_rec.expenditure_type
222: ,p_organization_id_o =>pqh_dfs_shd.g_old_rec.organization_id
223: ,p_object_version_number_o =>pqh_dfs_shd.g_old_rec.object_version_number
224: ,p_cost_allocation_keyflex_id_o =>pqh_dfs_shd.g_old_rec.cost_allocation_keyflex_id
225: );
226: --
219: ,p_award_id_o =>pqh_dfs_shd.g_old_rec.award_id
220: ,p_task_id_o =>pqh_dfs_shd.g_old_rec.task_id
221: ,p_expenditure_type_o =>pqh_dfs_shd.g_old_rec.expenditure_type
222: ,p_organization_id_o =>pqh_dfs_shd.g_old_rec.organization_id
223: ,p_object_version_number_o =>pqh_dfs_shd.g_old_rec.object_version_number
224: ,p_cost_allocation_keyflex_id_o =>pqh_dfs_shd.g_old_rec.cost_allocation_keyflex_id
225: );
226: --
227: exception
220: ,p_task_id_o =>pqh_dfs_shd.g_old_rec.task_id
221: ,p_expenditure_type_o =>pqh_dfs_shd.g_old_rec.expenditure_type
222: ,p_organization_id_o =>pqh_dfs_shd.g_old_rec.organization_id
223: ,p_object_version_number_o =>pqh_dfs_shd.g_old_rec.object_version_number
224: ,p_cost_allocation_keyflex_id_o =>pqh_dfs_shd.g_old_rec.cost_allocation_keyflex_id
225: );
226: --
227: exception
228: --
282: -- Internal Row Handler Use Only.
283: --
284: -- {End Of Comments}
285: -- ----------------------------------------------------------------------------
286: Procedure convert_defs(p_rec in out nocopy pqh_dfs_shd.g_rec_type) is
287: --
288: l_proc varchar2(72) := g_package||'convert_defs';
289: --
290: Begin
297: -- is being used then we must set to the 'current' argument value.
298: --
299: If (p_rec.dflt_budget_element_id = hr_api.g_number) then
300: p_rec.dflt_budget_element_id :=
301: pqh_dfs_shd.g_old_rec.dflt_budget_element_id;
302: End If;
303: If (p_rec.dflt_dist_percentage = hr_api.g_number) then
304: p_rec.dflt_dist_percentage :=
305: pqh_dfs_shd.g_old_rec.dflt_dist_percentage;
301: pqh_dfs_shd.g_old_rec.dflt_budget_element_id;
302: End If;
303: If (p_rec.dflt_dist_percentage = hr_api.g_number) then
304: p_rec.dflt_dist_percentage :=
305: pqh_dfs_shd.g_old_rec.dflt_dist_percentage;
306: End If;
307: If (p_rec.cost_allocation_keyflex_id = hr_api.g_number) then
308: p_rec.cost_allocation_keyflex_id :=
309: pqh_dfs_shd.g_old_rec.cost_allocation_keyflex_id;
305: pqh_dfs_shd.g_old_rec.dflt_dist_percentage;
306: End If;
307: If (p_rec.cost_allocation_keyflex_id = hr_api.g_number) then
308: p_rec.cost_allocation_keyflex_id :=
309: pqh_dfs_shd.g_old_rec.cost_allocation_keyflex_id;
310: End If;
311: If (p_rec.project_id = hr_api.g_number) then
312: p_rec.project_id :=
313: pqh_dfs_shd.g_old_rec.project_id;
309: pqh_dfs_shd.g_old_rec.cost_allocation_keyflex_id;
310: End If;
311: If (p_rec.project_id = hr_api.g_number) then
312: p_rec.project_id :=
313: pqh_dfs_shd.g_old_rec.project_id;
314: End If;
315: If (p_rec.award_id = hr_api.g_number) then
316: p_rec.award_id :=
317: pqh_dfs_shd.g_old_rec.award_id;
313: pqh_dfs_shd.g_old_rec.project_id;
314: End If;
315: If (p_rec.award_id = hr_api.g_number) then
316: p_rec.award_id :=
317: pqh_dfs_shd.g_old_rec.award_id;
318: End If;
319: If (p_rec.task_id = hr_api.g_number) then
320: p_rec.task_id :=
321: pqh_dfs_shd.g_old_rec.task_id;
317: pqh_dfs_shd.g_old_rec.award_id;
318: End If;
319: If (p_rec.task_id = hr_api.g_number) then
320: p_rec.task_id :=
321: pqh_dfs_shd.g_old_rec.task_id;
322: End If;
323: If (p_rec.expenditure_type = hr_api.g_varchar2) then
324: p_rec.expenditure_type :=
325: pqh_dfs_shd.g_old_rec.expenditure_type;
321: pqh_dfs_shd.g_old_rec.task_id;
322: End If;
323: If (p_rec.expenditure_type = hr_api.g_varchar2) then
324: p_rec.expenditure_type :=
325: pqh_dfs_shd.g_old_rec.expenditure_type;
326: End If;
327: If (p_rec.organization_id = hr_api.g_number) then
328: p_rec.organization_id :=
329: pqh_dfs_shd.g_old_rec.organization_id;
325: pqh_dfs_shd.g_old_rec.expenditure_type;
326: End If;
327: If (p_rec.organization_id = hr_api.g_number) then
328: p_rec.organization_id :=
329: pqh_dfs_shd.g_old_rec.organization_id;
330: End If;
331: --
332: hr_utility.set_location(' Leaving:'||l_proc, 10);
333: --
337: -- |---------------------------------< upd >----------------------------------|
338: -- ----------------------------------------------------------------------------
339: Procedure upd
340: (
341: p_rec in out nocopy pqh_dfs_shd.g_rec_type
342: ) is
343: --
344: l_proc varchar2(72) := g_package||'upd';
345: --
347: hr_utility.set_location('Entering:'||l_proc, 5);
348: --
349: -- We must lock the row which we need to update.
350: --
351: pqh_dfs_shd.lck
352: (
353: p_rec.dflt_fund_src_id,
354: p_rec.object_version_number
355: );
392: p_object_version_number in out nocopy number,
393: p_cost_allocation_keyflex_id in number default hr_api.g_number
394: ) is
395: --
396: l_rec pqh_dfs_shd.g_rec_type;
397: l_proc varchar2(72) := g_package||'upd';
398: --
399: Begin
400: hr_utility.set_location('Entering:'||l_proc, 5);
402: -- Call conversion function to turn arguments into the
403: -- l_rec structure.
404: --
405: l_rec :=
406: pqh_dfs_shd.convert_args
407: (
408: p_dflt_fund_src_id,
409: p_dflt_budget_element_id,
410: p_dflt_dist_percentage,