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_VERSIONS_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_VERSIONS_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_DETAILS_FK3') Then
20: hr_utility.set_location('Entering:'||l_proc, 5);
21: --
22: If (p_constraint_name = 'PQH_BUDGET_VERSIONS_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_DETAILS_FK3') Then
28: hr_utility.set_message(8302, 'PQH_CHILD_REC_EXISTS');
21: --
22: If (p_constraint_name = 'PQH_BUDGET_VERSIONS_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_DETAILS_FK3') Then
28: hr_utility.set_message(8302, 'PQH_CHILD_REC_EXISTS');
29: hr_utility.raise_error;
22: If (p_constraint_name = 'PQH_BUDGET_VERSIONS_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_DETAILS_FK3') Then
28: hr_utility.set_message(8302, 'PQH_CHILD_REC_EXISTS');
29: hr_utility.raise_error;
30: ElsIf (p_constraint_name = 'PQH_WORKSHEETS_FK2') 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_DETAILS_FK3') Then
28: hr_utility.set_message(8302, 'PQH_CHILD_REC_EXISTS');
29: hr_utility.raise_error;
30: ElsIf (p_constraint_name = 'PQH_WORKSHEETS_FK2') Then
31: hr_utility.set_message(8302, 'PQH_WKS_REC_EXISTS');
32: hr_utility.raise_error;
25: hr_utility.set_message_token('STEP','5');
26: hr_utility.raise_error;
27: ElsIf (p_constraint_name = 'PQH_BUDGET_DETAILS_FK3') Then
28: hr_utility.set_message(8302, 'PQH_CHILD_REC_EXISTS');
29: hr_utility.raise_error;
30: ElsIf (p_constraint_name = 'PQH_WORKSHEETS_FK2') Then
31: hr_utility.set_message(8302, 'PQH_WKS_REC_EXISTS');
32: hr_utility.raise_error;
33: Else
27: ElsIf (p_constraint_name = 'PQH_BUDGET_DETAILS_FK3') Then
28: hr_utility.set_message(8302, 'PQH_CHILD_REC_EXISTS');
29: hr_utility.raise_error;
30: ElsIf (p_constraint_name = 'PQH_WORKSHEETS_FK2') Then
31: hr_utility.set_message(8302, 'PQH_WKS_REC_EXISTS');
32: hr_utility.raise_error;
33: Else
34: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
35: hr_utility.set_message_token('PROCEDURE', l_proc);
28: hr_utility.set_message(8302, 'PQH_CHILD_REC_EXISTS');
29: hr_utility.raise_error;
30: ElsIf (p_constraint_name = 'PQH_WORKSHEETS_FK2') Then
31: hr_utility.set_message(8302, 'PQH_WKS_REC_EXISTS');
32: hr_utility.raise_error;
33: Else
34: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
35: hr_utility.set_message_token('PROCEDURE', l_proc);
36: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
30: ElsIf (p_constraint_name = 'PQH_WORKSHEETS_FK2') Then
31: hr_utility.set_message(8302, 'PQH_WKS_REC_EXISTS');
32: hr_utility.raise_error;
33: Else
34: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
35: hr_utility.set_message_token('PROCEDURE', l_proc);
36: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
37: hr_utility.raise_error;
38: End If;
31: hr_utility.set_message(8302, 'PQH_WKS_REC_EXISTS');
32: hr_utility.raise_error;
33: Else
34: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
35: hr_utility.set_message_token('PROCEDURE', l_proc);
36: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
37: hr_utility.raise_error;
38: End If;
39: --
32: hr_utility.raise_error;
33: Else
34: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
35: hr_utility.set_message_token('PROCEDURE', l_proc);
36: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
37: hr_utility.raise_error;
38: End If;
39: --
40: hr_utility.set_location(' Leaving:'||l_proc, 10);
33: Else
34: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
35: hr_utility.set_message_token('PROCEDURE', l_proc);
36: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
37: hr_utility.raise_error;
38: End If;
39: --
40: hr_utility.set_location(' Leaving:'||l_proc, 10);
41: End constraint_error;
36: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
37: hr_utility.raise_error;
38: End If;
39: --
40: hr_utility.set_location(' Leaving:'||l_proc, 10);
41: End constraint_error;
42: --
43: -- ----------------------------------------------------------------------------
44: -- |-----------------------------< api_updating >-----------------------------|
75: l_proc varchar2(72) := g_package||'api_updating';
76: l_fct_ret boolean;
77: --
78: Begin
79: hr_utility.set_location('Entering:'||l_proc, 5);
80: --
81: If (
82: p_budget_version_id is null and
83: p_object_version_number is null
91: If (
92: p_budget_version_id = g_old_rec.budget_version_id and
93: p_object_version_number = g_old_rec.object_version_number
94: ) Then
95: hr_utility.set_location(l_proc, 10);
96: --
97: -- The g_old_rec is current therefore we must
98: -- set the returning function to true
99: --
108: Close C_Sel1;
109: --
110: -- The primary key is invalid therefore we must error
111: --
112: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
113: hr_utility.raise_error;
114: End If;
115: Close C_Sel1;
116: If (p_object_version_number <> g_old_rec.object_version_number) Then
109: --
110: -- The primary key is invalid therefore we must error
111: --
112: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
113: hr_utility.raise_error;
114: End If;
115: Close C_Sel1;
116: If (p_object_version_number <> g_old_rec.object_version_number) Then
117: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
113: hr_utility.raise_error;
114: End If;
115: Close C_Sel1;
116: If (p_object_version_number <> g_old_rec.object_version_number) Then
117: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
118: hr_utility.raise_error;
119: End If;
120: hr_utility.set_location(l_proc, 15);
121: l_fct_ret := true;
114: End If;
115: Close C_Sel1;
116: If (p_object_version_number <> g_old_rec.object_version_number) Then
117: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
118: hr_utility.raise_error;
119: End If;
120: hr_utility.set_location(l_proc, 15);
121: l_fct_ret := true;
122: End If;
116: If (p_object_version_number <> g_old_rec.object_version_number) Then
117: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
118: hr_utility.raise_error;
119: End If;
120: hr_utility.set_location(l_proc, 15);
121: l_fct_ret := true;
122: End If;
123: End If;
124: hr_utility.set_location(' Leaving:'||l_proc, 20);
120: hr_utility.set_location(l_proc, 15);
121: l_fct_ret := true;
122: End If;
123: End If;
124: hr_utility.set_location(' Leaving:'||l_proc, 20);
125: Return (l_fct_ret);
126: --
127: End api_updating;
128: --
159: --
160: l_proc varchar2(72) := g_package||'lck';
161: --
162: Begin
163: hr_utility.set_location('Entering:'||l_proc, 5);
164: --
165: -- Add any mandatory argument checking here:
166: -- Example:
167: -- hr_api.mandatory_arg_error
175: Close C_Sel1;
176: --
177: -- The primary key is invalid therefore we must error
178: --
179: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
180: hr_utility.raise_error;
181: End If;
182: Close C_Sel1;
183: If (p_object_version_number <> g_old_rec.object_version_number) Then
176: --
177: -- The primary key is invalid therefore we must error
178: --
179: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
180: hr_utility.raise_error;
181: End If;
182: Close C_Sel1;
183: If (p_object_version_number <> g_old_rec.object_version_number) Then
184: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
180: hr_utility.raise_error;
181: End If;
182: Close C_Sel1;
183: If (p_object_version_number <> g_old_rec.object_version_number) Then
184: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
185: hr_utility.raise_error;
186: End If;
187: --
188: hr_utility.set_location(' Leaving:'||l_proc, 10);
181: End If;
182: Close C_Sel1;
183: If (p_object_version_number <> g_old_rec.object_version_number) Then
184: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
185: hr_utility.raise_error;
186: End If;
187: --
188: hr_utility.set_location(' Leaving:'||l_proc, 10);
189: --
184: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
185: hr_utility.raise_error;
186: End If;
187: --
188: hr_utility.set_location(' Leaving:'||l_proc, 10);
189: --
190: -- We need to trap the ORA LOCK exception
191: --
192: Exception
194: --
195: -- The object is locked therefore we need to supply a meaningful
196: -- error message.
197: --
198: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
199: hr_utility.set_message_token('TABLE_NAME', 'pqh_budget_versions');
200: hr_utility.raise_error;
201: End lck;
202: --
195: -- The object is locked therefore we need to supply a meaningful
196: -- error message.
197: --
198: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
199: hr_utility.set_message_token('TABLE_NAME', 'pqh_budget_versions');
200: hr_utility.raise_error;
201: End lck;
202: --
203: -- ----------------------------------------------------------------------------
196: -- error message.
197: --
198: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
199: hr_utility.set_message_token('TABLE_NAME', 'pqh_budget_versions');
200: hr_utility.raise_error;
201: End lck;
202: --
203: -- ----------------------------------------------------------------------------
204: -- |-----------------------------< convert_args >-----------------------------|
227: l_proc varchar2(72) := g_package||'convert_args';
228: --
229: Begin
230: --
231: hr_utility.set_location('Entering:'||l_proc, 5);
232: --
233: -- Convert arguments into local l_rec structure.
234: --
235: l_rec.budget_version_id := p_budget_version_id;
249: l_rec.budget_unit3_available := p_budget_unit3_available;
250: --
251: -- Return the plsql record structure.
252: --
253: hr_utility.set_location(' Leaving:'||l_proc, 10);
254: Return(l_rec);
255: --
256: End convert_args;
257: --