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_DFLT_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_DFLT_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_FK1') Then
20: hr_utility.set_location('Entering:'||l_proc, 5);
21: --
22: If (p_constraint_name = 'PQH_DFLT_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_FK1') Then
28: hr_utility.set_message(8302, 'PQH_DEL_DFLT_BUDGET_SETS');
21: --
22: If (p_constraint_name = 'PQH_DFLT_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_FK1') Then
28: hr_utility.set_message(8302, 'PQH_DEL_DFLT_BUDGET_SETS');
29: hr_utility.raise_error;
22: If (p_constraint_name = 'PQH_DFLT_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_FK1') Then
28: hr_utility.set_message(8302, 'PQH_DEL_DFLT_BUDGET_SETS');
29: hr_utility.raise_error;
30: ElsIf (p_constraint_name = 'PQH_DFLT_BUDGET_SETS_PK') Then
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_FK1') Then
28: hr_utility.set_message(8302, 'PQH_DEL_DFLT_BUDGET_SETS');
29: hr_utility.raise_error;
30: ElsIf (p_constraint_name = 'PQH_DFLT_BUDGET_SETS_PK') Then
31: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
32: 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_FK1') Then
28: hr_utility.set_message(8302, 'PQH_DEL_DFLT_BUDGET_SETS');
29: hr_utility.raise_error;
30: ElsIf (p_constraint_name = 'PQH_DFLT_BUDGET_SETS_PK') Then
31: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
32: hr_utility.set_message_token('PROCEDURE', l_proc);
33: hr_utility.set_message_token('STEP','10');
27: ElsIf (p_constraint_name = 'PQH_BUDGET_SETS_FK1') Then
28: hr_utility.set_message(8302, 'PQH_DEL_DFLT_BUDGET_SETS');
29: hr_utility.raise_error;
30: ElsIf (p_constraint_name = 'PQH_DFLT_BUDGET_SETS_PK') Then
31: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
32: hr_utility.set_message_token('PROCEDURE', l_proc);
33: hr_utility.set_message_token('STEP','10');
34: hr_utility.raise_error;
35: ElsIf (p_constraint_name = 'PQH_DFLT_BUDGET_ELEMENTS_FK1') Then
28: hr_utility.set_message(8302, 'PQH_DEL_DFLT_BUDGET_SETS');
29: hr_utility.raise_error;
30: ElsIf (p_constraint_name = 'PQH_DFLT_BUDGET_SETS_PK') Then
31: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
32: hr_utility.set_message_token('PROCEDURE', l_proc);
33: hr_utility.set_message_token('STEP','10');
34: hr_utility.raise_error;
35: ElsIf (p_constraint_name = 'PQH_DFLT_BUDGET_ELEMENTS_FK1') Then
36: hr_utility.set_message(8302,'PQH_BUDGET_ELEMENTS_EXISTS');
29: hr_utility.raise_error;
30: ElsIf (p_constraint_name = 'PQH_DFLT_BUDGET_SETS_PK') Then
31: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
32: hr_utility.set_message_token('PROCEDURE', l_proc);
33: hr_utility.set_message_token('STEP','10');
34: hr_utility.raise_error;
35: ElsIf (p_constraint_name = 'PQH_DFLT_BUDGET_ELEMENTS_FK1') Then
36: hr_utility.set_message(8302,'PQH_BUDGET_ELEMENTS_EXISTS');
37: hr_utility.raise_error;
30: ElsIf (p_constraint_name = 'PQH_DFLT_BUDGET_SETS_PK') Then
31: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
32: hr_utility.set_message_token('PROCEDURE', l_proc);
33: hr_utility.set_message_token('STEP','10');
34: hr_utility.raise_error;
35: ElsIf (p_constraint_name = 'PQH_DFLT_BUDGET_ELEMENTS_FK1') Then
36: hr_utility.set_message(8302,'PQH_BUDGET_ELEMENTS_EXISTS');
37: hr_utility.raise_error;
38: Else
32: hr_utility.set_message_token('PROCEDURE', l_proc);
33: hr_utility.set_message_token('STEP','10');
34: hr_utility.raise_error;
35: ElsIf (p_constraint_name = 'PQH_DFLT_BUDGET_ELEMENTS_FK1') Then
36: hr_utility.set_message(8302,'PQH_BUDGET_ELEMENTS_EXISTS');
37: hr_utility.raise_error;
38: Else
39: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
40: hr_utility.set_message_token('PROCEDURE', l_proc);
33: hr_utility.set_message_token('STEP','10');
34: hr_utility.raise_error;
35: ElsIf (p_constraint_name = 'PQH_DFLT_BUDGET_ELEMENTS_FK1') Then
36: hr_utility.set_message(8302,'PQH_BUDGET_ELEMENTS_EXISTS');
37: hr_utility.raise_error;
38: Else
39: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
40: hr_utility.set_message_token('PROCEDURE', l_proc);
41: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
35: ElsIf (p_constraint_name = 'PQH_DFLT_BUDGET_ELEMENTS_FK1') Then
36: hr_utility.set_message(8302,'PQH_BUDGET_ELEMENTS_EXISTS');
37: hr_utility.raise_error;
38: Else
39: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
40: hr_utility.set_message_token('PROCEDURE', l_proc);
41: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
42: hr_utility.raise_error;
43: End If;
36: hr_utility.set_message(8302,'PQH_BUDGET_ELEMENTS_EXISTS');
37: hr_utility.raise_error;
38: Else
39: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
40: hr_utility.set_message_token('PROCEDURE', l_proc);
41: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
42: hr_utility.raise_error;
43: End If;
44: --
37: hr_utility.raise_error;
38: Else
39: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
40: hr_utility.set_message_token('PROCEDURE', l_proc);
41: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
42: hr_utility.raise_error;
43: End If;
44: --
45: hr_utility.set_location(' Leaving:'||l_proc, 10);
38: Else
39: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
40: hr_utility.set_message_token('PROCEDURE', l_proc);
41: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
42: hr_utility.raise_error;
43: End If;
44: --
45: hr_utility.set_location(' Leaving:'||l_proc, 10);
46: End constraint_error;
41: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
42: hr_utility.raise_error;
43: End If;
44: --
45: hr_utility.set_location(' Leaving:'||l_proc, 10);
46: End constraint_error;
47: --
48: -- ----------------------------------------------------------------------------
49: -- |-----------------------------< api_updating >-----------------------------|
69: l_proc varchar2(72) := g_package||'api_updating';
70: l_fct_ret boolean;
71: --
72: Begin
73: hr_utility.set_location('Entering:'||l_proc, 5);
74: --
75: If (
76: p_dflt_budget_set_id is null and
77: p_object_version_number is null
85: If (
86: p_dflt_budget_set_id = g_old_rec.dflt_budget_set_id and
87: p_object_version_number = g_old_rec.object_version_number
88: ) Then
89: hr_utility.set_location(l_proc, 10);
90: --
91: -- The g_old_rec is current therefore we must
92: -- set the returning function to true
93: --
102: Close C_Sel1;
103: --
104: -- The primary key is invalid therefore we must error
105: --
106: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
107: hr_utility.raise_error;
108: End If;
109: Close C_Sel1;
110: If (p_object_version_number <> g_old_rec.object_version_number) Then
103: --
104: -- The primary key is invalid therefore we must error
105: --
106: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
107: hr_utility.raise_error;
108: End If;
109: Close C_Sel1;
110: If (p_object_version_number <> g_old_rec.object_version_number) Then
111: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
107: hr_utility.raise_error;
108: End If;
109: Close C_Sel1;
110: If (p_object_version_number <> g_old_rec.object_version_number) Then
111: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
112: hr_utility.raise_error;
113: End If;
114: hr_utility.set_location(l_proc, 15);
115: l_fct_ret := true;
108: End If;
109: Close C_Sel1;
110: If (p_object_version_number <> g_old_rec.object_version_number) Then
111: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
112: hr_utility.raise_error;
113: End If;
114: hr_utility.set_location(l_proc, 15);
115: l_fct_ret := true;
116: End If;
110: If (p_object_version_number <> g_old_rec.object_version_number) Then
111: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
112: hr_utility.raise_error;
113: End If;
114: hr_utility.set_location(l_proc, 15);
115: l_fct_ret := true;
116: End If;
117: End If;
118: hr_utility.set_location(' Leaving:'||l_proc, 20);
114: hr_utility.set_location(l_proc, 15);
115: l_fct_ret := true;
116: End If;
117: End If;
118: hr_utility.set_location(' Leaving:'||l_proc, 20);
119: Return (l_fct_ret);
120: --
121: End api_updating;
122: --
142: --
143: l_proc varchar2(72) := g_package||'lck';
144: --
145: Begin
146: hr_utility.set_location('Entering:'||l_proc, 5);
147: --
148: -- Add any mandatory argument checking here:
149: -- Example:
150: -- hr_api.mandatory_arg_error
158: Close C_Sel1;
159: --
160: -- The primary key is invalid therefore we must error
161: --
162: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
163: hr_utility.raise_error;
164: End If;
165: Close C_Sel1;
166: If (p_object_version_number <> g_old_rec.object_version_number) Then
159: --
160: -- The primary key is invalid therefore we must error
161: --
162: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
163: hr_utility.raise_error;
164: End If;
165: Close C_Sel1;
166: If (p_object_version_number <> g_old_rec.object_version_number) Then
167: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
163: hr_utility.raise_error;
164: End If;
165: Close C_Sel1;
166: If (p_object_version_number <> g_old_rec.object_version_number) Then
167: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
168: hr_utility.raise_error;
169: End If;
170: --
171: hr_utility.set_location(' Leaving:'||l_proc, 10);
164: End If;
165: Close C_Sel1;
166: If (p_object_version_number <> g_old_rec.object_version_number) Then
167: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
168: hr_utility.raise_error;
169: End If;
170: --
171: hr_utility.set_location(' Leaving:'||l_proc, 10);
172: --
167: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
168: hr_utility.raise_error;
169: End If;
170: --
171: hr_utility.set_location(' Leaving:'||l_proc, 10);
172: --
173: -- We need to trap the ORA LOCK exception
174: --
175: Exception
177: --
178: -- The object is locked therefore we need to supply a meaningful
179: -- error message.
180: --
181: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
182: hr_utility.set_message_token('TABLE_NAME', 'pqh_dflt_budget_sets');
183: hr_utility.raise_error;
184: End lck;
185: --
178: -- The object is locked therefore we need to supply a meaningful
179: -- error message.
180: --
181: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
182: hr_utility.set_message_token('TABLE_NAME', 'pqh_dflt_budget_sets');
183: hr_utility.raise_error;
184: End lck;
185: --
186: -- ----------------------------------------------------------------------------
179: -- error message.
180: --
181: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
182: hr_utility.set_message_token('TABLE_NAME', 'pqh_dflt_budget_sets');
183: hr_utility.raise_error;
184: End lck;
185: --
186: -- ----------------------------------------------------------------------------
187: -- |-----------------------------< convert_args >-----------------------------|
199: l_proc varchar2(72) := g_package||'convert_args';
200: --
201: Begin
202: --
203: hr_utility.set_location('Entering:'||l_proc, 5);
204: --
205: -- Convert arguments into local l_rec structure.
206: --
207: l_rec.dflt_budget_set_id := p_dflt_budget_set_id;
210: l_rec.object_version_number := p_object_version_number;
211: --
212: -- Return the plsql record structure.
213: --
214: hr_utility.set_location(' Leaving:'||l_proc, 10);
215: Return(l_rec);
216: --
217: End convert_args;
218: --