51: --
52: -- {End Of Comments}
53: -- ----------------------------------------------------------------------------
54: Procedure update_dml
55: (p_rec in out nocopy pay_amo_shd.g_rec_type
56: ) is
57: --
58: l_proc varchar2(72);
59: --
64: --
65: -- Increment the object version
66: p_rec.object_version_number := p_rec.object_version_number + 1;
67: --
68: pay_amo_shd.g_api_dml := true; -- Set the api dml status
69: --
70: -- Update the pay_au_modules Row
71: --
72: update pay_au_modules
83: ,formula_name = p_rec.formula_name
84: ,object_version_number = p_rec.object_version_number
85: where module_id = p_rec.module_id;
86: --
87: pay_amo_shd.g_api_dml := false; -- Unset the api dml status
88: --
89: hr_utility.set_location(' Leaving:'||l_proc, 10);
90: --
91: Exception
90: --
91: Exception
92: When hr_api.check_integrity_violated Then
93: -- A check constraint has been violated
94: pay_amo_shd.g_api_dml := false; -- Unset the api dml status
95: pay_amo_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: pay_amo_shd.g_api_dml := false; -- Unset the api dml status
95: pay_amo_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: pay_amo_shd.g_api_dml := false; -- Unset the api dml status
95: pay_amo_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: pay_amo_shd.g_api_dml := false; -- Unset the api dml status
100: pay_amo_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: pay_amo_shd.g_api_dml := false; -- Unset the api dml status
100: pay_amo_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: pay_amo_shd.g_api_dml := false; -- Unset the api dml status
100: pay_amo_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: pay_amo_shd.g_api_dml := false; -- Unset the api dml status
105: pay_amo_shd.constraint_error
106: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
107: When Others Then
108: pay_amo_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: pay_amo_shd.g_api_dml := false; -- Unset the api dml status
105: pay_amo_shd.constraint_error
106: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
107: When Others Then
108: pay_amo_shd.g_api_dml := false; -- Unset the api dml status
109: Raise;
104: pay_amo_shd.g_api_dml := false; -- Unset the api dml status
105: pay_amo_shd.constraint_error
106: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
107: When Others Then
108: pay_amo_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 pay_amo_shd.g_rec_type
146: ) is
147: --
148: l_proc varchar2(72);
149: --
187: --
188: -- {End Of Comments}
189: -- ----------------------------------------------------------------------------
190: Procedure post_update
191: (p_rec in pay_amo_shd.g_rec_type
192: ) is
193: --
194: l_proc varchar2(72);
195: --
244: --
245: -- {End Of Comments}
246: -- ----------------------------------------------------------------------------
247: Procedure convert_defs
248: (p_rec in out nocopy pay_amo_shd.g_rec_type
249: ) is
250: --
251: Begin
252: --
256: -- is being used then we must set to the 'current' argument value.
257: --
258: If (p_rec.name = hr_api.g_varchar2) then
259: p_rec.name :=
260: pay_amo_shd.g_old_rec.name;
261: End If;
262: If (p_rec.enabled_flag = hr_api.g_varchar2) then
263: p_rec.enabled_flag :=
264: pay_amo_shd.g_old_rec.enabled_flag;
260: pay_amo_shd.g_old_rec.name;
261: End If;
262: If (p_rec.enabled_flag = hr_api.g_varchar2) then
263: p_rec.enabled_flag :=
264: pay_amo_shd.g_old_rec.enabled_flag;
265: End If;
266: If (p_rec.module_type_id = hr_api.g_number) then
267: p_rec.module_type_id :=
268: pay_amo_shd.g_old_rec.module_type_id;
264: pay_amo_shd.g_old_rec.enabled_flag;
265: End If;
266: If (p_rec.module_type_id = hr_api.g_number) then
267: p_rec.module_type_id :=
268: pay_amo_shd.g_old_rec.module_type_id;
269: End If;
270: If (p_rec.business_group_id = hr_api.g_number) then
271: p_rec.business_group_id :=
272: pay_amo_shd.g_old_rec.business_group_id;
268: pay_amo_shd.g_old_rec.module_type_id;
269: End If;
270: If (p_rec.business_group_id = hr_api.g_number) then
271: p_rec.business_group_id :=
272: pay_amo_shd.g_old_rec.business_group_id;
273: End If;
274: If (p_rec.legislation_code = hr_api.g_varchar2) then
275: p_rec.legislation_code :=
276: pay_amo_shd.g_old_rec.legislation_code;
272: pay_amo_shd.g_old_rec.business_group_id;
273: End If;
274: If (p_rec.legislation_code = hr_api.g_varchar2) then
275: p_rec.legislation_code :=
276: pay_amo_shd.g_old_rec.legislation_code;
277: End If;
278: If (p_rec.description = hr_api.g_varchar2) then
279: p_rec.description :=
280: pay_amo_shd.g_old_rec.description;
276: pay_amo_shd.g_old_rec.legislation_code;
277: End If;
278: If (p_rec.description = hr_api.g_varchar2) then
279: p_rec.description :=
280: pay_amo_shd.g_old_rec.description;
281: End If;
282: If (p_rec.package_name = hr_api.g_varchar2) then
283: p_rec.package_name :=
284: pay_amo_shd.g_old_rec.package_name;
280: pay_amo_shd.g_old_rec.description;
281: End If;
282: If (p_rec.package_name = hr_api.g_varchar2) then
283: p_rec.package_name :=
284: pay_amo_shd.g_old_rec.package_name;
285: End If;
286: If (p_rec.procedure_function_name = hr_api.g_varchar2) then
287: p_rec.procedure_function_name :=
288: pay_amo_shd.g_old_rec.procedure_function_name;
284: pay_amo_shd.g_old_rec.package_name;
285: End If;
286: If (p_rec.procedure_function_name = hr_api.g_varchar2) then
287: p_rec.procedure_function_name :=
288: pay_amo_shd.g_old_rec.procedure_function_name;
289: End If;
290: If (p_rec.formula_name = hr_api.g_varchar2) then
291: p_rec.formula_name :=
292: pay_amo_shd.g_old_rec.formula_name;
288: pay_amo_shd.g_old_rec.procedure_function_name;
289: End If;
290: If (p_rec.formula_name = hr_api.g_varchar2) then
291: p_rec.formula_name :=
292: pay_amo_shd.g_old_rec.formula_name;
293: End If;
294: --
295: End convert_defs;
296: --
297: -- ----------------------------------------------------------------------------
298: -- |---------------------------------< upd >----------------------------------|
299: -- ----------------------------------------------------------------------------
300: Procedure upd
301: (p_rec in out nocopy pay_amo_shd.g_rec_type
302: ) is
303: --
304: l_proc varchar2(72);
305: --
309: hr_utility.set_location('Entering:'||l_proc, 5);
310: --
311: -- We must lock the row which we need to update.
312: --
313: pay_amo_shd.lck
314: (p_rec.module_id
315: ,p_rec.object_version_number
316: );
317: --
363: ,p_procedure_function_name in varchar2
364: ,p_formula_name in varchar2
365: ) is
366: --
367: l_rec pay_amo_shd.g_rec_type;
368: l_proc varchar2(72);
369: --
370: Begin
371: l_proc := g_package||'upd';
374: -- Call conversion function to turn arguments into the
375: -- l_rec structure.
376: --
377: l_rec :=
378: pay_amo_shd.convert_args
379: (p_module_id
380: ,p_name
381: ,p_enabled_flag
382: ,p_module_type_id