15: --
16: l_proc varchar2(72) := g_package||'constraint_error';
17: --
18: Begin
19: hr_utility.set_location('Entering:'||l_proc, 5);
20: --
21: If (p_constraint_name = 'PQH_BUDGET_DETAILS_FK2') Then
22: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
23: hr_utility.set_message_token('PROCEDURE', l_proc);
18: Begin
19: hr_utility.set_location('Entering:'||l_proc, 5);
20: --
21: If (p_constraint_name = 'PQH_BUDGET_DETAILS_FK2') Then
22: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
23: hr_utility.set_message_token('PROCEDURE', l_proc);
24: hr_utility.set_message_token('STEP','5');
25: hr_utility.raise_error;
26: ElsIf (p_constraint_name = 'PQH_BUDGET_DETAILS_FK3') Then
19: hr_utility.set_location('Entering:'||l_proc, 5);
20: --
21: If (p_constraint_name = 'PQH_BUDGET_DETAILS_FK2') Then
22: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
23: hr_utility.set_message_token('PROCEDURE', l_proc);
24: hr_utility.set_message_token('STEP','5');
25: hr_utility.raise_error;
26: ElsIf (p_constraint_name = 'PQH_BUDGET_DETAILS_FK3') Then
27: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
20: --
21: If (p_constraint_name = 'PQH_BUDGET_DETAILS_FK2') Then
22: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
23: hr_utility.set_message_token('PROCEDURE', l_proc);
24: hr_utility.set_message_token('STEP','5');
25: hr_utility.raise_error;
26: ElsIf (p_constraint_name = 'PQH_BUDGET_DETAILS_FK3') Then
27: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
28: hr_utility.set_message_token('PROCEDURE', l_proc);
21: If (p_constraint_name = 'PQH_BUDGET_DETAILS_FK2') Then
22: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
23: hr_utility.set_message_token('PROCEDURE', l_proc);
24: hr_utility.set_message_token('STEP','5');
25: hr_utility.raise_error;
26: ElsIf (p_constraint_name = 'PQH_BUDGET_DETAILS_FK3') Then
27: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
28: hr_utility.set_message_token('PROCEDURE', l_proc);
29: hr_utility.set_message_token('STEP','10');
23: hr_utility.set_message_token('PROCEDURE', l_proc);
24: hr_utility.set_message_token('STEP','5');
25: hr_utility.raise_error;
26: ElsIf (p_constraint_name = 'PQH_BUDGET_DETAILS_FK3') Then
27: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
28: hr_utility.set_message_token('PROCEDURE', l_proc);
29: hr_utility.set_message_token('STEP','10');
30: hr_utility.raise_error;
31: ElsIf (p_constraint_name = 'PQH_BUDGET_PERIODS_FK1') Then
24: hr_utility.set_message_token('STEP','5');
25: hr_utility.raise_error;
26: ElsIf (p_constraint_name = 'PQH_BUDGET_DETAILS_FK3') Then
27: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
28: hr_utility.set_message_token('PROCEDURE', l_proc);
29: hr_utility.set_message_token('STEP','10');
30: hr_utility.raise_error;
31: ElsIf (p_constraint_name = 'PQH_BUDGET_PERIODS_FK1') Then
32: hr_utility.set_message(8302,'PQH_BUDGET_PERIODS_EXISTS');
25: hr_utility.raise_error;
26: ElsIf (p_constraint_name = 'PQH_BUDGET_DETAILS_FK3') Then
27: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
28: hr_utility.set_message_token('PROCEDURE', l_proc);
29: hr_utility.set_message_token('STEP','10');
30: hr_utility.raise_error;
31: ElsIf (p_constraint_name = 'PQH_BUDGET_PERIODS_FK1') Then
32: hr_utility.set_message(8302,'PQH_BUDGET_PERIODS_EXISTS');
33: hr_utility.raise_error;
26: ElsIf (p_constraint_name = 'PQH_BUDGET_DETAILS_FK3') Then
27: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
28: hr_utility.set_message_token('PROCEDURE', l_proc);
29: hr_utility.set_message_token('STEP','10');
30: hr_utility.raise_error;
31: ElsIf (p_constraint_name = 'PQH_BUDGET_PERIODS_FK1') Then
32: hr_utility.set_message(8302,'PQH_BUDGET_PERIODS_EXISTS');
33: hr_utility.raise_error;
34: ElsIf (p_constraint_name = 'PQH_BUDGET_DETAILS_FK4') Then
28: hr_utility.set_message_token('PROCEDURE', l_proc);
29: hr_utility.set_message_token('STEP','10');
30: hr_utility.raise_error;
31: ElsIf (p_constraint_name = 'PQH_BUDGET_PERIODS_FK1') Then
32: hr_utility.set_message(8302,'PQH_BUDGET_PERIODS_EXISTS');
33: hr_utility.raise_error;
34: ElsIf (p_constraint_name = 'PQH_BUDGET_DETAILS_FK4') Then
35: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
36: hr_utility.set_message_token('PROCEDURE', l_proc);
29: hr_utility.set_message_token('STEP','10');
30: hr_utility.raise_error;
31: ElsIf (p_constraint_name = 'PQH_BUDGET_PERIODS_FK1') Then
32: hr_utility.set_message(8302,'PQH_BUDGET_PERIODS_EXISTS');
33: hr_utility.raise_error;
34: ElsIf (p_constraint_name = 'PQH_BUDGET_DETAILS_FK4') Then
35: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
36: hr_utility.set_message_token('PROCEDURE', l_proc);
37: hr_utility.set_message_token('STEP','15');
31: ElsIf (p_constraint_name = 'PQH_BUDGET_PERIODS_FK1') Then
32: hr_utility.set_message(8302,'PQH_BUDGET_PERIODS_EXISTS');
33: hr_utility.raise_error;
34: ElsIf (p_constraint_name = 'PQH_BUDGET_DETAILS_FK4') Then
35: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
36: hr_utility.set_message_token('PROCEDURE', l_proc);
37: hr_utility.set_message_token('STEP','15');
38: hr_utility.raise_error;
39: ElsIf (p_constraint_name = 'PQH_BUDGET_DETAILS_FK5') Then
32: hr_utility.set_message(8302,'PQH_BUDGET_PERIODS_EXISTS');
33: hr_utility.raise_error;
34: ElsIf (p_constraint_name = 'PQH_BUDGET_DETAILS_FK4') Then
35: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
36: hr_utility.set_message_token('PROCEDURE', l_proc);
37: hr_utility.set_message_token('STEP','15');
38: hr_utility.raise_error;
39: ElsIf (p_constraint_name = 'PQH_BUDGET_DETAILS_FK5') Then
40: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
33: hr_utility.raise_error;
34: ElsIf (p_constraint_name = 'PQH_BUDGET_DETAILS_FK4') Then
35: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
36: hr_utility.set_message_token('PROCEDURE', l_proc);
37: hr_utility.set_message_token('STEP','15');
38: hr_utility.raise_error;
39: ElsIf (p_constraint_name = 'PQH_BUDGET_DETAILS_FK5') Then
40: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
41: hr_utility.set_message_token('PROCEDURE', l_proc);
34: ElsIf (p_constraint_name = 'PQH_BUDGET_DETAILS_FK4') Then
35: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
36: hr_utility.set_message_token('PROCEDURE', l_proc);
37: hr_utility.set_message_token('STEP','15');
38: hr_utility.raise_error;
39: ElsIf (p_constraint_name = 'PQH_BUDGET_DETAILS_FK5') Then
40: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
41: hr_utility.set_message_token('PROCEDURE', l_proc);
42: hr_utility.set_message_token('STEP','20');
36: hr_utility.set_message_token('PROCEDURE', l_proc);
37: hr_utility.set_message_token('STEP','15');
38: hr_utility.raise_error;
39: ElsIf (p_constraint_name = 'PQH_BUDGET_DETAILS_FK5') Then
40: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
41: hr_utility.set_message_token('PROCEDURE', l_proc);
42: hr_utility.set_message_token('STEP','20');
43: hr_utility.raise_error;
44: ElsIf (p_constraint_name = 'PQH_BUDGET_DETAILS_PK') Then
37: hr_utility.set_message_token('STEP','15');
38: hr_utility.raise_error;
39: ElsIf (p_constraint_name = 'PQH_BUDGET_DETAILS_FK5') Then
40: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
41: hr_utility.set_message_token('PROCEDURE', l_proc);
42: hr_utility.set_message_token('STEP','20');
43: hr_utility.raise_error;
44: ElsIf (p_constraint_name = 'PQH_BUDGET_DETAILS_PK') Then
45: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
38: hr_utility.raise_error;
39: ElsIf (p_constraint_name = 'PQH_BUDGET_DETAILS_FK5') Then
40: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
41: hr_utility.set_message_token('PROCEDURE', l_proc);
42: hr_utility.set_message_token('STEP','20');
43: hr_utility.raise_error;
44: ElsIf (p_constraint_name = 'PQH_BUDGET_DETAILS_PK') Then
45: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
46: hr_utility.set_message_token('PROCEDURE', l_proc);
39: ElsIf (p_constraint_name = 'PQH_BUDGET_DETAILS_FK5') Then
40: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
41: hr_utility.set_message_token('PROCEDURE', l_proc);
42: hr_utility.set_message_token('STEP','20');
43: hr_utility.raise_error;
44: ElsIf (p_constraint_name = 'PQH_BUDGET_DETAILS_PK') Then
45: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
46: hr_utility.set_message_token('PROCEDURE', l_proc);
47: hr_utility.set_message_token('STEP','25');
41: hr_utility.set_message_token('PROCEDURE', l_proc);
42: hr_utility.set_message_token('STEP','20');
43: hr_utility.raise_error;
44: ElsIf (p_constraint_name = 'PQH_BUDGET_DETAILS_PK') Then
45: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
46: hr_utility.set_message_token('PROCEDURE', l_proc);
47: hr_utility.set_message_token('STEP','25');
48: hr_utility.raise_error;
49: ElsIf (p_constraint_name = 'PQH_BUDGET_DETAILS_UK') Then
42: hr_utility.set_message_token('STEP','20');
43: hr_utility.raise_error;
44: ElsIf (p_constraint_name = 'PQH_BUDGET_DETAILS_PK') Then
45: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
46: hr_utility.set_message_token('PROCEDURE', l_proc);
47: hr_utility.set_message_token('STEP','25');
48: hr_utility.raise_error;
49: ElsIf (p_constraint_name = 'PQH_BUDGET_DETAILS_UK') Then
50: --
43: hr_utility.raise_error;
44: ElsIf (p_constraint_name = 'PQH_BUDGET_DETAILS_PK') Then
45: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
46: hr_utility.set_message_token('PROCEDURE', l_proc);
47: hr_utility.set_message_token('STEP','25');
48: hr_utility.raise_error;
49: ElsIf (p_constraint_name = 'PQH_BUDGET_DETAILS_UK') Then
50: --
51: -- Code Changed to provide a more meaningful message on
44: ElsIf (p_constraint_name = 'PQH_BUDGET_DETAILS_PK') Then
45: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
46: hr_utility.set_message_token('PROCEDURE', l_proc);
47: hr_utility.set_message_token('STEP','25');
48: hr_utility.raise_error;
49: ElsIf (p_constraint_name = 'PQH_BUDGET_DETAILS_UK') Then
50: --
51: -- Code Changed to provide a more meaningful message on
52: -- unique constraint failure.
50: --
51: -- Code Changed to provide a more meaningful message on
52: -- unique constraint failure.
53: --
54: hr_utility.set_message(8302, 'PQH_DUPLICATE_WORKSHEET_DETAIL');
55: hr_utility.raise_error;
56: /*
57: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
58: hr_utility.set_message_token('PROCEDURE', l_proc);
51: -- Code Changed to provide a more meaningful message on
52: -- unique constraint failure.
53: --
54: hr_utility.set_message(8302, 'PQH_DUPLICATE_WORKSHEET_DETAIL');
55: hr_utility.raise_error;
56: /*
57: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
58: hr_utility.set_message_token('PROCEDURE', l_proc);
59: hr_utility.set_message_token('STEP','25');
53: --
54: hr_utility.set_message(8302, 'PQH_DUPLICATE_WORKSHEET_DETAIL');
55: hr_utility.raise_error;
56: /*
57: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
58: hr_utility.set_message_token('PROCEDURE', l_proc);
59: hr_utility.set_message_token('STEP','25');
60: hr_utility.raise_error;
61: */
54: hr_utility.set_message(8302, 'PQH_DUPLICATE_WORKSHEET_DETAIL');
55: hr_utility.raise_error;
56: /*
57: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
58: hr_utility.set_message_token('PROCEDURE', l_proc);
59: hr_utility.set_message_token('STEP','25');
60: hr_utility.raise_error;
61: */
62: Else
55: hr_utility.raise_error;
56: /*
57: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
58: hr_utility.set_message_token('PROCEDURE', l_proc);
59: hr_utility.set_message_token('STEP','25');
60: hr_utility.raise_error;
61: */
62: Else
63: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
56: /*
57: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
58: hr_utility.set_message_token('PROCEDURE', l_proc);
59: hr_utility.set_message_token('STEP','25');
60: hr_utility.raise_error;
61: */
62: Else
63: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
64: hr_utility.set_message_token('PROCEDURE', l_proc);
59: hr_utility.set_message_token('STEP','25');
60: hr_utility.raise_error;
61: */
62: Else
63: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
64: hr_utility.set_message_token('PROCEDURE', l_proc);
65: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
66: hr_utility.raise_error;
67: End If;
60: hr_utility.raise_error;
61: */
62: Else
63: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
64: hr_utility.set_message_token('PROCEDURE', l_proc);
65: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
66: hr_utility.raise_error;
67: End If;
68: --
61: */
62: Else
63: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
64: hr_utility.set_message_token('PROCEDURE', l_proc);
65: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
66: hr_utility.raise_error;
67: End If;
68: --
69: hr_utility.set_location(' Leaving:'||l_proc, 10);
62: Else
63: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
64: hr_utility.set_message_token('PROCEDURE', l_proc);
65: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
66: hr_utility.raise_error;
67: End If;
68: --
69: hr_utility.set_location(' Leaving:'||l_proc, 10);
70: End constraint_error;
65: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
66: hr_utility.raise_error;
67: End If;
68: --
69: hr_utility.set_location(' Leaving:'||l_proc, 10);
70: End constraint_error;
71: --
72: -- ----------------------------------------------------------------------------
73: -- |-----------------------------< api_updating >-----------------------------|
109: l_proc varchar2(72) := g_package||'api_updating';
110: l_fct_ret boolean;
111: --
112: Begin
113: hr_utility.set_location('Entering:'||l_proc, 5);
114: --
115: If (
116: p_budget_detail_id is null and
117: p_object_version_number is null
125: If (
126: p_budget_detail_id = g_old_rec.budget_detail_id and
127: p_object_version_number = g_old_rec.object_version_number
128: ) Then
129: hr_utility.set_location(l_proc, 10);
130: --
131: -- The g_old_rec is current therefore we must
132: -- set the returning function to true
133: --
142: Close C_Sel1;
143: --
144: -- The primary key is invalid therefore we must error
145: --
146: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
147: hr_utility.raise_error;
148: End If;
149: Close C_Sel1;
150: If (p_object_version_number <> g_old_rec.object_version_number) Then
143: --
144: -- The primary key is invalid therefore we must error
145: --
146: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
147: hr_utility.raise_error;
148: End If;
149: Close C_Sel1;
150: If (p_object_version_number <> g_old_rec.object_version_number) Then
151: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
147: hr_utility.raise_error;
148: End If;
149: Close C_Sel1;
150: If (p_object_version_number <> g_old_rec.object_version_number) Then
151: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
152: hr_utility.raise_error;
153: End If;
154: hr_utility.set_location(l_proc, 15);
155: l_fct_ret := true;
148: End If;
149: Close C_Sel1;
150: If (p_object_version_number <> g_old_rec.object_version_number) Then
151: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
152: hr_utility.raise_error;
153: End If;
154: hr_utility.set_location(l_proc, 15);
155: l_fct_ret := true;
156: End If;
150: If (p_object_version_number <> g_old_rec.object_version_number) Then
151: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
152: hr_utility.raise_error;
153: End If;
154: hr_utility.set_location(l_proc, 15);
155: l_fct_ret := true;
156: End If;
157: End If;
158: hr_utility.set_location(' Leaving:'||l_proc, 20);
154: hr_utility.set_location(l_proc, 15);
155: l_fct_ret := true;
156: End If;
157: End If;
158: hr_utility.set_location(' Leaving:'||l_proc, 20);
159: Return (l_fct_ret);
160: --
161: End api_updating;
162: --
198: --
199: l_proc varchar2(72) := g_package||'lck';
200: --
201: Begin
202: hr_utility.set_location('Entering:'||l_proc, 5);
203: --
204: -- Add any mandatory argument checking here:
205: -- Example:
206: -- hr_api.mandatory_arg_error
214: Close C_Sel1;
215: --
216: -- The primary key is invalid therefore we must error
217: --
218: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
219: hr_utility.raise_error;
220: End If;
221: Close C_Sel1;
222: If (p_object_version_number <> g_old_rec.object_version_number) Then
215: --
216: -- The primary key is invalid therefore we must error
217: --
218: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
219: hr_utility.raise_error;
220: End If;
221: Close C_Sel1;
222: If (p_object_version_number <> g_old_rec.object_version_number) Then
223: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
219: hr_utility.raise_error;
220: End If;
221: Close C_Sel1;
222: If (p_object_version_number <> g_old_rec.object_version_number) Then
223: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
224: hr_utility.raise_error;
225: End If;
226: --
227: hr_utility.set_location(' Leaving:'||l_proc, 10);
220: End If;
221: Close C_Sel1;
222: If (p_object_version_number <> g_old_rec.object_version_number) Then
223: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
224: hr_utility.raise_error;
225: End If;
226: --
227: hr_utility.set_location(' Leaving:'||l_proc, 10);
228: --
223: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
224: hr_utility.raise_error;
225: End If;
226: --
227: hr_utility.set_location(' Leaving:'||l_proc, 10);
228: --
229: -- We need to trap the ORA LOCK exception
230: --
231: Exception
233: --
234: -- The object is locked therefore we need to supply a meaningful
235: -- error message.
236: --
237: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
238: hr_utility.set_message_token('TABLE_NAME', 'pqh_budget_details');
239: hr_utility.raise_error;
240: End lck;
241: --
234: -- The object is locked therefore we need to supply a meaningful
235: -- error message.
236: --
237: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
238: hr_utility.set_message_token('TABLE_NAME', 'pqh_budget_details');
239: hr_utility.raise_error;
240: End lck;
241: --
242: -- ----------------------------------------------------------------------------
235: -- error message.
236: --
237: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
238: hr_utility.set_message_token('TABLE_NAME', 'pqh_budget_details');
239: hr_utility.raise_error;
240: End lck;
241: --
242: -- ----------------------------------------------------------------------------
243: -- |-----------------------------< convert_args >-----------------------------|
271: l_proc varchar2(72) := g_package||'convert_args';
272: --
273: Begin
274: --
275: hr_utility.set_location('Entering:'||l_proc, 5);
276: --
277: -- Convert arguments into local l_rec structure.
278: --
279: l_rec.budget_detail_id := p_budget_detail_id;
298: l_rec.object_version_number := p_object_version_number;
299: --
300: -- Return the plsql record structure.
301: --
302: hr_utility.set_location(' Leaving:'||l_proc, 10);
303: Return(l_rec);
304: --
305: End convert_args;
306: --