16: --
17: l_proc varchar2(72) := g_package||'constraint_error';
18: --
19: Begin
20: hr_utility.set_location('Entering:'||l_proc, 5);
21: --
22: If (p_constraint_name = 'PQH_BUDGET_SETS_FK1') Then
23: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
24: hr_utility.set_message_token('PROCEDURE', l_proc);
19: Begin
20: hr_utility.set_location('Entering:'||l_proc, 5);
21: --
22: If (p_constraint_name = 'PQH_BUDGET_SETS_FK1') Then
23: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
24: hr_utility.set_message_token('PROCEDURE', l_proc);
25: hr_utility.set_message_token('STEP','5');
26: hr_utility.raise_error;
27: ElsIf (p_constraint_name = 'PQH_BUDGET_SETS_FK2') Then
20: hr_utility.set_location('Entering:'||l_proc, 5);
21: --
22: If (p_constraint_name = 'PQH_BUDGET_SETS_FK1') Then
23: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
24: hr_utility.set_message_token('PROCEDURE', l_proc);
25: hr_utility.set_message_token('STEP','5');
26: hr_utility.raise_error;
27: ElsIf (p_constraint_name = 'PQH_BUDGET_SETS_FK2') Then
28: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
21: --
22: If (p_constraint_name = 'PQH_BUDGET_SETS_FK1') Then
23: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
24: hr_utility.set_message_token('PROCEDURE', l_proc);
25: hr_utility.set_message_token('STEP','5');
26: hr_utility.raise_error;
27: ElsIf (p_constraint_name = 'PQH_BUDGET_SETS_FK2') Then
28: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
29: hr_utility.set_message_token('PROCEDURE', l_proc);
22: If (p_constraint_name = 'PQH_BUDGET_SETS_FK1') Then
23: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
24: hr_utility.set_message_token('PROCEDURE', l_proc);
25: hr_utility.set_message_token('STEP','5');
26: hr_utility.raise_error;
27: ElsIf (p_constraint_name = 'PQH_BUDGET_SETS_FK2') Then
28: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
29: hr_utility.set_message_token('PROCEDURE', l_proc);
30: hr_utility.set_message_token('STEP','10');
24: hr_utility.set_message_token('PROCEDURE', l_proc);
25: hr_utility.set_message_token('STEP','5');
26: hr_utility.raise_error;
27: ElsIf (p_constraint_name = 'PQH_BUDGET_SETS_FK2') Then
28: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
29: hr_utility.set_message_token('PROCEDURE', l_proc);
30: hr_utility.set_message_token('STEP','10');
31: hr_utility.raise_error;
32: ElsIf (p_constraint_name = 'PQH_BUDGET_SETS_PK') Then
25: hr_utility.set_message_token('STEP','5');
26: hr_utility.raise_error;
27: ElsIf (p_constraint_name = 'PQH_BUDGET_SETS_FK2') Then
28: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
29: hr_utility.set_message_token('PROCEDURE', l_proc);
30: hr_utility.set_message_token('STEP','10');
31: hr_utility.raise_error;
32: ElsIf (p_constraint_name = 'PQH_BUDGET_SETS_PK') Then
33: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
26: hr_utility.raise_error;
27: ElsIf (p_constraint_name = 'PQH_BUDGET_SETS_FK2') Then
28: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
29: hr_utility.set_message_token('PROCEDURE', l_proc);
30: hr_utility.set_message_token('STEP','10');
31: hr_utility.raise_error;
32: ElsIf (p_constraint_name = 'PQH_BUDGET_SETS_PK') Then
33: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
34: hr_utility.set_message_token('PROCEDURE', l_proc);
27: ElsIf (p_constraint_name = 'PQH_BUDGET_SETS_FK2') Then
28: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
29: hr_utility.set_message_token('PROCEDURE', l_proc);
30: hr_utility.set_message_token('STEP','10');
31: hr_utility.raise_error;
32: ElsIf (p_constraint_name = 'PQH_BUDGET_SETS_PK') Then
33: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
34: hr_utility.set_message_token('PROCEDURE', l_proc);
35: hr_utility.set_message_token('STEP','15');
29: hr_utility.set_message_token('PROCEDURE', l_proc);
30: hr_utility.set_message_token('STEP','10');
31: hr_utility.raise_error;
32: ElsIf (p_constraint_name = 'PQH_BUDGET_SETS_PK') Then
33: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
34: hr_utility.set_message_token('PROCEDURE', l_proc);
35: hr_utility.set_message_token('STEP','15');
36: hr_utility.raise_error;
37: ElsIf (p_constraint_name = 'PQH_BUDGET_SETS_UK') Then
30: hr_utility.set_message_token('STEP','10');
31: hr_utility.raise_error;
32: ElsIf (p_constraint_name = 'PQH_BUDGET_SETS_PK') Then
33: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
34: hr_utility.set_message_token('PROCEDURE', l_proc);
35: hr_utility.set_message_token('STEP','15');
36: hr_utility.raise_error;
37: ElsIf (p_constraint_name = 'PQH_BUDGET_SETS_UK') Then
38: hr_utility.set_message(8302, 'PQH_DUPLICATE_BUDGET_SET_NAME');
31: hr_utility.raise_error;
32: ElsIf (p_constraint_name = 'PQH_BUDGET_SETS_PK') Then
33: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
34: hr_utility.set_message_token('PROCEDURE', l_proc);
35: hr_utility.set_message_token('STEP','15');
36: hr_utility.raise_error;
37: ElsIf (p_constraint_name = 'PQH_BUDGET_SETS_UK') Then
38: hr_utility.set_message(8302, 'PQH_DUPLICATE_BUDGET_SET_NAME');
39: hr_utility.raise_error;
32: ElsIf (p_constraint_name = 'PQH_BUDGET_SETS_PK') Then
33: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
34: hr_utility.set_message_token('PROCEDURE', l_proc);
35: hr_utility.set_message_token('STEP','15');
36: hr_utility.raise_error;
37: ElsIf (p_constraint_name = 'PQH_BUDGET_SETS_UK') Then
38: hr_utility.set_message(8302, 'PQH_DUPLICATE_BUDGET_SET_NAME');
39: hr_utility.raise_error;
40: Else
34: hr_utility.set_message_token('PROCEDURE', l_proc);
35: hr_utility.set_message_token('STEP','15');
36: hr_utility.raise_error;
37: ElsIf (p_constraint_name = 'PQH_BUDGET_SETS_UK') Then
38: hr_utility.set_message(8302, 'PQH_DUPLICATE_BUDGET_SET_NAME');
39: hr_utility.raise_error;
40: Else
41: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
42: hr_utility.set_message_token('PROCEDURE', l_proc);
35: hr_utility.set_message_token('STEP','15');
36: hr_utility.raise_error;
37: ElsIf (p_constraint_name = 'PQH_BUDGET_SETS_UK') Then
38: hr_utility.set_message(8302, 'PQH_DUPLICATE_BUDGET_SET_NAME');
39: hr_utility.raise_error;
40: Else
41: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
42: hr_utility.set_message_token('PROCEDURE', l_proc);
43: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
37: ElsIf (p_constraint_name = 'PQH_BUDGET_SETS_UK') Then
38: hr_utility.set_message(8302, 'PQH_DUPLICATE_BUDGET_SET_NAME');
39: hr_utility.raise_error;
40: Else
41: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
42: hr_utility.set_message_token('PROCEDURE', l_proc);
43: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
44: hr_utility.raise_error;
45: End If;
38: hr_utility.set_message(8302, 'PQH_DUPLICATE_BUDGET_SET_NAME');
39: hr_utility.raise_error;
40: Else
41: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
42: hr_utility.set_message_token('PROCEDURE', l_proc);
43: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
44: hr_utility.raise_error;
45: End If;
46: --
39: hr_utility.raise_error;
40: Else
41: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
42: hr_utility.set_message_token('PROCEDURE', l_proc);
43: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
44: hr_utility.raise_error;
45: End If;
46: --
47: hr_utility.set_location(' Leaving:'||l_proc, 10);
40: Else
41: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
42: hr_utility.set_message_token('PROCEDURE', l_proc);
43: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
44: hr_utility.raise_error;
45: End If;
46: --
47: hr_utility.set_location(' Leaving:'||l_proc, 10);
48: End constraint_error;
43: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
44: hr_utility.raise_error;
45: End If;
46: --
47: hr_utility.set_location(' Leaving:'||l_proc, 10);
48: End constraint_error;
49: --
50: -- ----------------------------------------------------------------------------
51: -- |-----------------------------< api_updating >-----------------------------|
83: l_proc varchar2(72) := g_package||'api_updating';
84: l_fct_ret boolean;
85: --
86: Begin
87: hr_utility.set_location('Entering:'||l_proc, 5);
88: --
89: If (
90: p_budget_set_id is null and
91: p_object_version_number is null
99: If (
100: p_budget_set_id = g_old_rec.budget_set_id and
101: p_object_version_number = g_old_rec.object_version_number
102: ) Then
103: hr_utility.set_location(l_proc, 10);
104: --
105: -- The g_old_rec is current therefore we must
106: -- set the returning function to true
107: --
116: Close C_Sel1;
117: --
118: -- The primary key is invalid therefore we must error
119: --
120: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
121: hr_utility.raise_error;
122: End If;
123: Close C_Sel1;
124: If (p_object_version_number <> g_old_rec.object_version_number) Then
117: --
118: -- The primary key is invalid therefore we must error
119: --
120: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
121: hr_utility.raise_error;
122: End If;
123: Close C_Sel1;
124: If (p_object_version_number <> g_old_rec.object_version_number) Then
125: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
121: hr_utility.raise_error;
122: End If;
123: Close C_Sel1;
124: If (p_object_version_number <> g_old_rec.object_version_number) Then
125: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
126: hr_utility.raise_error;
127: End If;
128: hr_utility.set_location(l_proc, 15);
129: l_fct_ret := true;
122: End If;
123: Close C_Sel1;
124: If (p_object_version_number <> g_old_rec.object_version_number) Then
125: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
126: hr_utility.raise_error;
127: End If;
128: hr_utility.set_location(l_proc, 15);
129: l_fct_ret := true;
130: End If;
124: If (p_object_version_number <> g_old_rec.object_version_number) Then
125: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
126: hr_utility.raise_error;
127: End If;
128: hr_utility.set_location(l_proc, 15);
129: l_fct_ret := true;
130: End If;
131: End If;
132: hr_utility.set_location(' Leaving:'||l_proc, 20);
128: hr_utility.set_location(l_proc, 15);
129: l_fct_ret := true;
130: End If;
131: End If;
132: hr_utility.set_location(' Leaving:'||l_proc, 20);
133: Return (l_fct_ret);
134: --
135: End api_updating;
136: --
168: --
169: l_proc varchar2(72) := g_package||'lck';
170: --
171: Begin
172: hr_utility.set_location('Entering:'||l_proc, 5);
173: --
174: -- Add any mandatory argument checking here:
175: -- Example:
176: -- hr_api.mandatory_arg_error
184: Close C_Sel1;
185: --
186: -- The primary key is invalid therefore we must error
187: --
188: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
189: hr_utility.raise_error;
190: End If;
191: Close C_Sel1;
192: If (p_object_version_number <> g_old_rec.object_version_number) Then
185: --
186: -- The primary key is invalid therefore we must error
187: --
188: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
189: hr_utility.raise_error;
190: End If;
191: Close C_Sel1;
192: If (p_object_version_number <> g_old_rec.object_version_number) Then
193: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
189: hr_utility.raise_error;
190: End If;
191: Close C_Sel1;
192: If (p_object_version_number <> g_old_rec.object_version_number) Then
193: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
194: hr_utility.raise_error;
195: End If;
196: --
197: hr_utility.set_location(' Leaving:'||l_proc, 10);
190: End If;
191: Close C_Sel1;
192: If (p_object_version_number <> g_old_rec.object_version_number) Then
193: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
194: hr_utility.raise_error;
195: End If;
196: --
197: hr_utility.set_location(' Leaving:'||l_proc, 10);
198: --
193: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
194: hr_utility.raise_error;
195: End If;
196: --
197: hr_utility.set_location(' Leaving:'||l_proc, 10);
198: --
199: -- We need to trap the ORA LOCK exception
200: --
201: Exception
203: --
204: -- The object is locked therefore we need to supply a meaningful
205: -- error message.
206: --
207: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
208: hr_utility.set_message_token('TABLE_NAME', 'pqh_budget_sets');
209: hr_utility.raise_error;
210: End lck;
211: --
204: -- The object is locked therefore we need to supply a meaningful
205: -- error message.
206: --
207: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
208: hr_utility.set_message_token('TABLE_NAME', 'pqh_budget_sets');
209: hr_utility.raise_error;
210: End lck;
211: --
212: -- ----------------------------------------------------------------------------
205: -- error message.
206: --
207: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
208: hr_utility.set_message_token('TABLE_NAME', 'pqh_budget_sets');
209: hr_utility.raise_error;
210: End lck;
211: --
212: -- ----------------------------------------------------------------------------
213: -- |-----------------------------< convert_args >-----------------------------|
237: l_proc varchar2(72) := g_package||'convert_args';
238: --
239: Begin
240: --
241: hr_utility.set_location('Entering:'||l_proc, 5);
242: --
243: -- Convert arguments into local l_rec structure.
244: --
245: l_rec.budget_set_id := p_budget_set_id;
260: l_rec.budget_unit3_value_type_cd := p_budget_unit3_value_type_cd;
261: --
262: -- Return the plsql record structure.
263: --
264: hr_utility.set_location(' Leaving:'||l_proc, 10);
265: Return(l_rec);
266: --
267: End convert_args;
268: --