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_WORKSHEET_BUDGET_SETS_FK1') 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_WORKSHEET_BUDGET_SETS_FK1') 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_WORKSHEET_BUDGET_SETS_FK2') Then
19: hr_utility.set_location('Entering:'||l_proc, 5);
20: --
21: If (p_constraint_name = 'PQH_WORKSHEET_BUDGET_SETS_FK1') 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_WORKSHEET_BUDGET_SETS_FK2') Then
27: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
20: --
21: If (p_constraint_name = 'PQH_WORKSHEET_BUDGET_SETS_FK1') 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_WORKSHEET_BUDGET_SETS_FK2') 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_WORKSHEET_BUDGET_SETS_FK1') 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_WORKSHEET_BUDGET_SETS_FK2') 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_WORKSHEET_BUDGET_SETS_FK2') 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_WORKSHEET_BUDGET_SETS_PK') Then
24: hr_utility.set_message_token('STEP','5');
25: hr_utility.raise_error;
26: ElsIf (p_constraint_name = 'PQH_WORKSHEET_BUDGET_SETS_FK2') 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_WORKSHEET_BUDGET_SETS_PK') Then
32: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
25: hr_utility.raise_error;
26: ElsIf (p_constraint_name = 'PQH_WORKSHEET_BUDGET_SETS_FK2') 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_WORKSHEET_BUDGET_SETS_PK') Then
32: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
33: hr_utility.set_message_token('PROCEDURE', l_proc);
26: ElsIf (p_constraint_name = 'PQH_WORKSHEET_BUDGET_SETS_FK2') 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_WORKSHEET_BUDGET_SETS_PK') Then
32: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
33: hr_utility.set_message_token('PROCEDURE', l_proc);
34: hr_utility.set_message_token('STEP','15');
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_WORKSHEET_BUDGET_SETS_PK') Then
32: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
33: hr_utility.set_message_token('PROCEDURE', l_proc);
34: hr_utility.set_message_token('STEP','15');
35: hr_utility.raise_error;
36: ElsIf (p_constraint_name = 'PQH_WORKSHEET_BUDGET_SETS_UK') Then
29: hr_utility.set_message_token('STEP','10');
30: hr_utility.raise_error;
31: ElsIf (p_constraint_name = 'PQH_WORKSHEET_BUDGET_SETS_PK') Then
32: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
33: hr_utility.set_message_token('PROCEDURE', l_proc);
34: hr_utility.set_message_token('STEP','15');
35: hr_utility.raise_error;
36: ElsIf (p_constraint_name = 'PQH_WORKSHEET_BUDGET_SETS_UK') Then
37: --
30: hr_utility.raise_error;
31: ElsIf (p_constraint_name = 'PQH_WORKSHEET_BUDGET_SETS_PK') Then
32: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
33: hr_utility.set_message_token('PROCEDURE', l_proc);
34: hr_utility.set_message_token('STEP','15');
35: hr_utility.raise_error;
36: ElsIf (p_constraint_name = 'PQH_WORKSHEET_BUDGET_SETS_UK') Then
37: --
38: -- Code Changed to provide a more meaningful message on
31: ElsIf (p_constraint_name = 'PQH_WORKSHEET_BUDGET_SETS_PK') Then
32: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
33: hr_utility.set_message_token('PROCEDURE', l_proc);
34: hr_utility.set_message_token('STEP','15');
35: hr_utility.raise_error;
36: ElsIf (p_constraint_name = 'PQH_WORKSHEET_BUDGET_SETS_UK') Then
37: --
38: -- Code Changed to provide a more meaningful message on
39: -- unique constraint failure.
37: --
38: -- Code Changed to provide a more meaningful message on
39: -- unique constraint failure.
40: --
41: hr_utility.set_message(8302, 'PQH_DUPLICATE_BUDGET_SET_NAME');
42: hr_utility.raise_error;
43: /**
44: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
45: hr_utility.set_message_token('PROCEDURE', l_proc);
38: -- Code Changed to provide a more meaningful message on
39: -- unique constraint failure.
40: --
41: hr_utility.set_message(8302, 'PQH_DUPLICATE_BUDGET_SET_NAME');
42: hr_utility.raise_error;
43: /**
44: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
45: hr_utility.set_message_token('PROCEDURE', l_proc);
46: hr_utility.set_message_token('STEP','20');
40: --
41: hr_utility.set_message(8302, 'PQH_DUPLICATE_BUDGET_SET_NAME');
42: hr_utility.raise_error;
43: /**
44: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
45: hr_utility.set_message_token('PROCEDURE', l_proc);
46: hr_utility.set_message_token('STEP','20');
47: hr_utility.raise_error;
48: **/
41: hr_utility.set_message(8302, 'PQH_DUPLICATE_BUDGET_SET_NAME');
42: hr_utility.raise_error;
43: /**
44: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
45: hr_utility.set_message_token('PROCEDURE', l_proc);
46: hr_utility.set_message_token('STEP','20');
47: hr_utility.raise_error;
48: **/
49: Else
42: hr_utility.raise_error;
43: /**
44: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
45: hr_utility.set_message_token('PROCEDURE', l_proc);
46: hr_utility.set_message_token('STEP','20');
47: hr_utility.raise_error;
48: **/
49: Else
50: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
43: /**
44: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
45: hr_utility.set_message_token('PROCEDURE', l_proc);
46: hr_utility.set_message_token('STEP','20');
47: hr_utility.raise_error;
48: **/
49: Else
50: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
51: hr_utility.set_message_token('PROCEDURE', l_proc);
46: hr_utility.set_message_token('STEP','20');
47: hr_utility.raise_error;
48: **/
49: Else
50: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
51: hr_utility.set_message_token('PROCEDURE', l_proc);
52: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
53: hr_utility.raise_error;
54: End If;
47: hr_utility.raise_error;
48: **/
49: Else
50: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
51: hr_utility.set_message_token('PROCEDURE', l_proc);
52: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
53: hr_utility.raise_error;
54: End If;
55: --
48: **/
49: Else
50: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
51: hr_utility.set_message_token('PROCEDURE', l_proc);
52: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
53: hr_utility.raise_error;
54: End If;
55: --
56: hr_utility.set_location(' Leaving:'||l_proc, 10);
49: Else
50: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
51: hr_utility.set_message_token('PROCEDURE', l_proc);
52: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
53: hr_utility.raise_error;
54: End If;
55: --
56: hr_utility.set_location(' Leaving:'||l_proc, 10);
57: End constraint_error;
52: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
53: hr_utility.raise_error;
54: End If;
55: --
56: hr_utility.set_location(' Leaving:'||l_proc, 10);
57: End constraint_error;
58: --
59: -- ----------------------------------------------------------------------------
60: -- |-----------------------------< api_updating >-----------------------------|
92: l_proc varchar2(72) := g_package||'api_updating';
93: l_fct_ret boolean;
94: --
95: Begin
96: hr_utility.set_location('Entering:'||l_proc, 5);
97: --
98: If (
99: p_worksheet_budget_set_id is null and
100: p_object_version_number is null
108: If (
109: p_worksheet_budget_set_id = g_old_rec.worksheet_budget_set_id and
110: p_object_version_number = g_old_rec.object_version_number
111: ) Then
112: hr_utility.set_location(l_proc, 10);
113: --
114: -- The g_old_rec is current therefore we must
115: -- set the returning function to true
116: --
125: Close C_Sel1;
126: --
127: -- The primary key is invalid therefore we must error
128: --
129: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
130: hr_utility.raise_error;
131: End If;
132: Close C_Sel1;
133: If (p_object_version_number <> g_old_rec.object_version_number) Then
126: --
127: -- The primary key is invalid therefore we must error
128: --
129: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
130: hr_utility.raise_error;
131: End If;
132: Close C_Sel1;
133: If (p_object_version_number <> g_old_rec.object_version_number) Then
134: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
130: hr_utility.raise_error;
131: End If;
132: Close C_Sel1;
133: If (p_object_version_number <> g_old_rec.object_version_number) Then
134: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
135: hr_utility.raise_error;
136: End If;
137: hr_utility.set_location(l_proc, 15);
138: l_fct_ret := true;
131: End If;
132: Close C_Sel1;
133: If (p_object_version_number <> g_old_rec.object_version_number) Then
134: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
135: hr_utility.raise_error;
136: End If;
137: hr_utility.set_location(l_proc, 15);
138: l_fct_ret := true;
139: End If;
133: If (p_object_version_number <> g_old_rec.object_version_number) Then
134: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
135: hr_utility.raise_error;
136: End If;
137: hr_utility.set_location(l_proc, 15);
138: l_fct_ret := true;
139: End If;
140: End If;
141: hr_utility.set_location(' Leaving:'||l_proc, 20);
137: hr_utility.set_location(l_proc, 15);
138: l_fct_ret := true;
139: End If;
140: End If;
141: hr_utility.set_location(' Leaving:'||l_proc, 20);
142: Return (l_fct_ret);
143: --
144: End api_updating;
145: --
177: --
178: l_proc varchar2(72) := g_package||'lck';
179: --
180: Begin
181: hr_utility.set_location('Entering:'||l_proc, 5);
182: --
183: -- Add any mandatory argument checking here:
184: -- Example:
185: -- hr_api.mandatory_arg_error
193: Close C_Sel1;
194: --
195: -- The primary key is invalid therefore we must error
196: --
197: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
198: hr_utility.raise_error;
199: End If;
200: Close C_Sel1;
201: If (p_object_version_number <> g_old_rec.object_version_number) Then
194: --
195: -- The primary key is invalid therefore we must error
196: --
197: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
198: hr_utility.raise_error;
199: End If;
200: Close C_Sel1;
201: If (p_object_version_number <> g_old_rec.object_version_number) Then
202: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
198: hr_utility.raise_error;
199: End If;
200: Close C_Sel1;
201: If (p_object_version_number <> g_old_rec.object_version_number) Then
202: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
203: hr_utility.raise_error;
204: End If;
205: --
206: hr_utility.set_location(' Leaving:'||l_proc, 10);
199: End If;
200: Close C_Sel1;
201: If (p_object_version_number <> g_old_rec.object_version_number) Then
202: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
203: hr_utility.raise_error;
204: End If;
205: --
206: hr_utility.set_location(' Leaving:'||l_proc, 10);
207: --
202: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
203: hr_utility.raise_error;
204: End If;
205: --
206: hr_utility.set_location(' Leaving:'||l_proc, 10);
207: --
208: -- We need to trap the ORA LOCK exception
209: --
210: Exception
212: --
213: -- The object is locked therefore we need to supply a meaningful
214: -- error message.
215: --
216: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
217: hr_utility.set_message_token('TABLE_NAME', 'pqh_worksheet_budget_sets');
218: hr_utility.raise_error;
219: End lck;
220: --
213: -- The object is locked therefore we need to supply a meaningful
214: -- error message.
215: --
216: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
217: hr_utility.set_message_token('TABLE_NAME', 'pqh_worksheet_budget_sets');
218: hr_utility.raise_error;
219: End lck;
220: --
221: -- ----------------------------------------------------------------------------
214: -- error message.
215: --
216: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
217: hr_utility.set_message_token('TABLE_NAME', 'pqh_worksheet_budget_sets');
218: hr_utility.raise_error;
219: End lck;
220: --
221: -- ----------------------------------------------------------------------------
222: -- |-----------------------------< convert_args >-----------------------------|
246: l_proc varchar2(72) := g_package||'convert_args';
247: --
248: Begin
249: --
250: hr_utility.set_location('Entering:'||l_proc, 5);
251: --
252: -- Convert arguments into local l_rec structure.
253: --
254: l_rec.worksheet_budget_set_id := p_worksheet_budget_set_id;
269: l_rec.budget_unit3_available := p_budget_unit3_available;
270: --
271: -- Return the plsql record structure.
272: --
273: hr_utility.set_location(' Leaving:'||l_proc, 10);
274: Return(l_rec);
275: --
276: End convert_args;
277: --