51: --
52: -- {End Of Comments}
53: -- ----------------------------------------------------------------------------
54: Procedure update_dml
55: (p_rec in out nocopy pqh_bpl_shd.g_rec_type
56: ) is
57: --
58: l_proc varchar2(72) := g_package||'update_dml';
59: --
62: --
63: -- Increment the object version
64: p_rec.object_version_number := p_rec.object_version_number + 1;
65: --
66: pqh_bpl_shd.g_api_dml := true; -- Set the api dml status
67: --
68: -- Update the pqh_budget_pools Row
69: --
70: update pqh_budget_pools
80: ,approval_status = p_rec.approval_status
81: ,wf_transaction_category_id =p_rec.wf_transaction_category_id
82: where pool_id = p_rec.pool_id;
83: --
84: pqh_bpl_shd.g_api_dml := false; -- Unset the api dml status
85: --
86: hr_utility.set_location(' Leaving:'||l_proc, 10);
87: --
88: Exception
87: --
88: Exception
89: When hr_api.check_integrity_violated Then
90: -- A check constraint has been violated
91: pqh_bpl_shd.g_api_dml := false; -- Unset the api dml status
92: pqh_bpl_shd.constraint_error
93: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
94: When hr_api.parent_integrity_violated Then
95: -- Parent integrity has been violated
88: Exception
89: When hr_api.check_integrity_violated Then
90: -- A check constraint has been violated
91: pqh_bpl_shd.g_api_dml := false; -- Unset the api dml status
92: pqh_bpl_shd.constraint_error
93: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
94: When hr_api.parent_integrity_violated Then
95: -- Parent integrity has been violated
96: pqh_bpl_shd.g_api_dml := false; -- Unset the api dml status
92: pqh_bpl_shd.constraint_error
93: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
94: When hr_api.parent_integrity_violated Then
95: -- Parent integrity has been violated
96: pqh_bpl_shd.g_api_dml := false; -- Unset the api dml status
97: pqh_bpl_shd.constraint_error
98: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
99: When hr_api.unique_integrity_violated Then
100: -- Unique integrity has been violated
93: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
94: When hr_api.parent_integrity_violated Then
95: -- Parent integrity has been violated
96: pqh_bpl_shd.g_api_dml := false; -- Unset the api dml status
97: pqh_bpl_shd.constraint_error
98: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
99: When hr_api.unique_integrity_violated Then
100: -- Unique integrity has been violated
101: pqh_bpl_shd.g_api_dml := false; -- Unset the api dml status
97: pqh_bpl_shd.constraint_error
98: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
99: When hr_api.unique_integrity_violated Then
100: -- Unique integrity has been violated
101: pqh_bpl_shd.g_api_dml := false; -- Unset the api dml status
102: pqh_bpl_shd.constraint_error
103: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
104: When Others Then
105: pqh_bpl_shd.g_api_dml := false; -- Unset the api dml status
98: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
99: When hr_api.unique_integrity_violated Then
100: -- Unique integrity has been violated
101: pqh_bpl_shd.g_api_dml := false; -- Unset the api dml status
102: pqh_bpl_shd.constraint_error
103: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
104: When Others Then
105: pqh_bpl_shd.g_api_dml := false; -- Unset the api dml status
106: Raise;
101: pqh_bpl_shd.g_api_dml := false; -- Unset the api dml status
102: pqh_bpl_shd.constraint_error
103: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
104: When Others Then
105: pqh_bpl_shd.g_api_dml := false; -- Unset the api dml status
106: Raise;
107: End update_dml;
108: --
109: -- ----------------------------------------------------------------------------
138: --
139: -- {End Of Comments}
140: -- ----------------------------------------------------------------------------
141: Procedure pre_update
142: (p_rec in pqh_bpl_shd.g_rec_type
143: ) is
144: --
145: l_proc varchar2(72) := g_package||'pre_update';
146: --
183: -- {End Of Comments}
184: -- ----------------------------------------------------------------------------
185: Procedure post_update
186: (p_effective_date in date
187: ,p_rec in pqh_bpl_shd.g_rec_type
188: ) is
189: --
190: l_proc varchar2(72) := g_package||'post_update';
191: --
215: => p_rec.approval_status
216: ,p_wf_transaction_category_id
217: =>p_rec.wf_transaction_category_id
218: ,p_name_o
219: => pqh_bpl_shd.g_old_rec.name
220: ,p_budget_version_id_o
221: => pqh_bpl_shd.g_old_rec.budget_version_id
222: ,p_budget_unit_id_o
223: => pqh_bpl_shd.g_old_rec.budget_unit_id
217: =>p_rec.wf_transaction_category_id
218: ,p_name_o
219: => pqh_bpl_shd.g_old_rec.name
220: ,p_budget_version_id_o
221: => pqh_bpl_shd.g_old_rec.budget_version_id
222: ,p_budget_unit_id_o
223: => pqh_bpl_shd.g_old_rec.budget_unit_id
224: ,p_object_version_number_o
225: => pqh_bpl_shd.g_old_rec.object_version_number
219: => pqh_bpl_shd.g_old_rec.name
220: ,p_budget_version_id_o
221: => pqh_bpl_shd.g_old_rec.budget_version_id
222: ,p_budget_unit_id_o
223: => pqh_bpl_shd.g_old_rec.budget_unit_id
224: ,p_object_version_number_o
225: => pqh_bpl_shd.g_old_rec.object_version_number
226: ,p_entity_type_o
227: => pqh_bpl_shd.g_old_rec.entity_type
221: => pqh_bpl_shd.g_old_rec.budget_version_id
222: ,p_budget_unit_id_o
223: => pqh_bpl_shd.g_old_rec.budget_unit_id
224: ,p_object_version_number_o
225: => pqh_bpl_shd.g_old_rec.object_version_number
226: ,p_entity_type_o
227: => pqh_bpl_shd.g_old_rec.entity_type
228: ,p_parent_pool_id_o
229: => pqh_bpl_shd.g_old_rec.parent_pool_id
223: => pqh_bpl_shd.g_old_rec.budget_unit_id
224: ,p_object_version_number_o
225: => pqh_bpl_shd.g_old_rec.object_version_number
226: ,p_entity_type_o
227: => pqh_bpl_shd.g_old_rec.entity_type
228: ,p_parent_pool_id_o
229: => pqh_bpl_shd.g_old_rec.parent_pool_id
230: ,p_business_group_id_o
231: => pqh_bpl_shd.g_old_rec.business_group_id
225: => pqh_bpl_shd.g_old_rec.object_version_number
226: ,p_entity_type_o
227: => pqh_bpl_shd.g_old_rec.entity_type
228: ,p_parent_pool_id_o
229: => pqh_bpl_shd.g_old_rec.parent_pool_id
230: ,p_business_group_id_o
231: => pqh_bpl_shd.g_old_rec.business_group_id
232: ,p_approval_status_o
233: => pqh_bpl_shd.g_old_rec.approval_status
227: => pqh_bpl_shd.g_old_rec.entity_type
228: ,p_parent_pool_id_o
229: => pqh_bpl_shd.g_old_rec.parent_pool_id
230: ,p_business_group_id_o
231: => pqh_bpl_shd.g_old_rec.business_group_id
232: ,p_approval_status_o
233: => pqh_bpl_shd.g_old_rec.approval_status
234: ,p_wf_transaction_category_id_o
235: => pqh_bpl_shd.g_old_rec.wf_transaction_category_id
229: => pqh_bpl_shd.g_old_rec.parent_pool_id
230: ,p_business_group_id_o
231: => pqh_bpl_shd.g_old_rec.business_group_id
232: ,p_approval_status_o
233: => pqh_bpl_shd.g_old_rec.approval_status
234: ,p_wf_transaction_category_id_o
235: => pqh_bpl_shd.g_old_rec.wf_transaction_category_id
236: );
237: --
231: => pqh_bpl_shd.g_old_rec.business_group_id
232: ,p_approval_status_o
233: => pqh_bpl_shd.g_old_rec.approval_status
234: ,p_wf_transaction_category_id_o
235: => pqh_bpl_shd.g_old_rec.wf_transaction_category_id
236: );
237: --
238: exception
239: --
291: --
292: -- {End Of Comments}
293: -- ----------------------------------------------------------------------------
294: Procedure convert_defs
295: (p_rec in out nocopy pqh_bpl_shd.g_rec_type
296: ) is
297: --
298: Begin
299: --
303: -- is being used then we must set to the 'current' argument value.
304: --
305: If (p_rec.name = hr_api.g_varchar2) then
306: p_rec.name :=
307: pqh_bpl_shd.g_old_rec.name;
308: End If;
309: If (p_rec.budget_version_id = hr_api.g_number) then
310: p_rec.budget_version_id :=
311: pqh_bpl_shd.g_old_rec.budget_version_id;
307: pqh_bpl_shd.g_old_rec.name;
308: End If;
309: If (p_rec.budget_version_id = hr_api.g_number) then
310: p_rec.budget_version_id :=
311: pqh_bpl_shd.g_old_rec.budget_version_id;
312: End If;
313: If (p_rec.budget_unit_id = hr_api.g_number) then
314: p_rec.budget_unit_id :=
315: pqh_bpl_shd.g_old_rec.budget_unit_id;
311: pqh_bpl_shd.g_old_rec.budget_version_id;
312: End If;
313: If (p_rec.budget_unit_id = hr_api.g_number) then
314: p_rec.budget_unit_id :=
315: pqh_bpl_shd.g_old_rec.budget_unit_id;
316: End If;
317: If (p_rec.entity_type = hr_api.g_varchar2) then
318: p_rec.entity_type :=
319: pqh_bpl_shd.g_old_rec.entity_type;
315: pqh_bpl_shd.g_old_rec.budget_unit_id;
316: End If;
317: If (p_rec.entity_type = hr_api.g_varchar2) then
318: p_rec.entity_type :=
319: pqh_bpl_shd.g_old_rec.entity_type;
320: End If;
321: If (p_rec.parent_pool_id = hr_api.g_number) then
322: p_rec.parent_pool_id :=
323: pqh_bpl_shd.g_old_rec.parent_pool_id;
319: pqh_bpl_shd.g_old_rec.entity_type;
320: End If;
321: If (p_rec.parent_pool_id = hr_api.g_number) then
322: p_rec.parent_pool_id :=
323: pqh_bpl_shd.g_old_rec.parent_pool_id;
324: End If;
325: If (p_rec.business_group_id = hr_api.g_number) then
326: p_rec.business_group_id :=
327: pqh_bpl_shd.g_old_rec.business_group_id;
323: pqh_bpl_shd.g_old_rec.parent_pool_id;
324: End If;
325: If (p_rec.business_group_id = hr_api.g_number) then
326: p_rec.business_group_id :=
327: pqh_bpl_shd.g_old_rec.business_group_id;
328: End If;
329: If (p_rec.approval_status = hr_api.g_varchar2) then
330: p_rec.approval_status :=
331: pqh_bpl_shd.g_old_rec.approval_status;
327: pqh_bpl_shd.g_old_rec.business_group_id;
328: End If;
329: If (p_rec.approval_status = hr_api.g_varchar2) then
330: p_rec.approval_status :=
331: pqh_bpl_shd.g_old_rec.approval_status;
332: End If;
333: If (p_rec.wf_transaction_category_id= hr_api.g_number) then
334: p_rec.wf_transaction_category_id:=
335: pqh_bpl_shd.g_old_rec.wf_transaction_category_id;
331: pqh_bpl_shd.g_old_rec.approval_status;
332: End If;
333: If (p_rec.wf_transaction_category_id= hr_api.g_number) then
334: p_rec.wf_transaction_category_id:=
335: pqh_bpl_shd.g_old_rec.wf_transaction_category_id;
336: End If;
337:
338: --
339: End convert_defs;
342: -- |---------------------------------< upd >----------------------------------|
343: -- ----------------------------------------------------------------------------
344: Procedure upd
345: (p_effective_date in date
346: ,p_rec in out nocopy pqh_bpl_shd.g_rec_type
347: ) is
348: --
349: l_proc varchar2(72) := g_package||'upd';
350: --
352: hr_utility.set_location('Entering:'||l_proc, 5);
353: --
354: -- We must lock the row which we need to update.
355: --
356: pqh_bpl_shd.lck
357: (p_rec.pool_id
358: ,p_rec.object_version_number
359: );
360: --
408: ,p_approval_status in varchar2 default hr_api.g_varchar2
409: ,p_wf_transaction_category_id in number default hr_api.g_number
410: ) is
411: --
412: l_rec pqh_bpl_shd.g_rec_type;
413: l_proc varchar2(72) := g_package||'upd';
414: --
415: Begin
416: hr_utility.set_location('Entering:'||l_proc, 5);
418: -- Call conversion function to turn arguments into the
419: -- l_rec structure.
420: --
421: l_rec :=
422: pqh_bpl_shd.convert_args
423: (p_pool_id
424: ,p_name
425: ,p_budget_version_id
426: ,p_budget_unit_id