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_FUND_SRCS_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_FUND_SRCS_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_FUND_SRC_PK') Then
20: hr_utility.set_location('Entering:'||l_proc, 5);
21: --
22: If (p_constraint_name = 'PQH_BUDGET_FUND_SRCS_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_FUND_SRC_PK') Then
28: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
21: --
22: If (p_constraint_name = 'PQH_BUDGET_FUND_SRCS_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_FUND_SRC_PK') 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_FUND_SRCS_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_FUND_SRC_PK') 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_FUND_SRC_PK') 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_FUND_SRC_UK') Then
25: hr_utility.set_message_token('STEP','5');
26: hr_utility.raise_error;
27: ElsIf (p_constraint_name = 'PQH_BUDGET_FUND_SRC_PK') 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_FUND_SRC_UK') Then
33: hr_utility.set_message(8302, 'PQH_DUPLICATE_BUDGET_SRCS');
26: hr_utility.raise_error;
27: ElsIf (p_constraint_name = 'PQH_BUDGET_FUND_SRC_PK') 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_FUND_SRC_UK') Then
33: hr_utility.set_message(8302, 'PQH_DUPLICATE_BUDGET_SRCS');
34: hr_utility.raise_error;
27: ElsIf (p_constraint_name = 'PQH_BUDGET_FUND_SRC_PK') 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_FUND_SRC_UK') Then
33: hr_utility.set_message(8302, 'PQH_DUPLICATE_BUDGET_SRCS');
34: hr_utility.raise_error;
35: Else
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_FUND_SRC_UK') Then
33: hr_utility.set_message(8302, 'PQH_DUPLICATE_BUDGET_SRCS');
34: hr_utility.raise_error;
35: Else
36: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
37: 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_FUND_SRC_UK') Then
33: hr_utility.set_message(8302, 'PQH_DUPLICATE_BUDGET_SRCS');
34: hr_utility.raise_error;
35: Else
36: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
37: hr_utility.set_message_token('PROCEDURE', l_proc);
38: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
32: ElsIf (p_constraint_name = 'PQH_BUDGET_FUND_SRC_UK') Then
33: hr_utility.set_message(8302, 'PQH_DUPLICATE_BUDGET_SRCS');
34: hr_utility.raise_error;
35: Else
36: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
37: hr_utility.set_message_token('PROCEDURE', l_proc);
38: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
39: hr_utility.raise_error;
40: End If;
33: hr_utility.set_message(8302, 'PQH_DUPLICATE_BUDGET_SRCS');
34: hr_utility.raise_error;
35: Else
36: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
37: hr_utility.set_message_token('PROCEDURE', l_proc);
38: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
39: hr_utility.raise_error;
40: End If;
41: --
34: hr_utility.raise_error;
35: Else
36: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
37: hr_utility.set_message_token('PROCEDURE', l_proc);
38: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
39: hr_utility.raise_error;
40: End If;
41: --
42: hr_utility.set_location(' Leaving:'||l_proc, 10);
35: Else
36: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
37: hr_utility.set_message_token('PROCEDURE', l_proc);
38: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
39: hr_utility.raise_error;
40: End If;
41: --
42: hr_utility.set_location(' Leaving:'||l_proc, 10);
43: End constraint_error;
38: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
39: hr_utility.raise_error;
40: End If;
41: --
42: hr_utility.set_location(' Leaving:'||l_proc, 10);
43: End constraint_error;
44: --
45: -- ----------------------------------------------------------------------------
46: -- |-----------------------------< api_updating >-----------------------------|
72: l_proc varchar2(72) := g_package||'api_updating';
73: l_fct_ret boolean;
74: --
75: Begin
76: hr_utility.set_location('Entering:'||l_proc, 5);
77: --
78: If (
79: p_budget_fund_src_id is null and
80: p_object_version_number is null
88: If (
89: p_budget_fund_src_id = g_old_rec.budget_fund_src_id and
90: p_object_version_number = g_old_rec.object_version_number
91: ) Then
92: hr_utility.set_location(l_proc, 10);
93: --
94: -- The g_old_rec is current therefore we must
95: -- set the returning function to true
96: --
105: Close C_Sel1;
106: --
107: -- The primary key is invalid therefore we must error
108: --
109: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
110: hr_utility.raise_error;
111: End If;
112: Close C_Sel1;
113: If (p_object_version_number <> g_old_rec.object_version_number) Then
106: --
107: -- The primary key is invalid therefore we must error
108: --
109: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
110: hr_utility.raise_error;
111: End If;
112: Close C_Sel1;
113: If (p_object_version_number <> g_old_rec.object_version_number) Then
114: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
110: hr_utility.raise_error;
111: End If;
112: Close C_Sel1;
113: If (p_object_version_number <> g_old_rec.object_version_number) Then
114: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
115: hr_utility.raise_error;
116: End If;
117: hr_utility.set_location(l_proc, 15);
118: l_fct_ret := true;
111: End If;
112: Close C_Sel1;
113: If (p_object_version_number <> g_old_rec.object_version_number) Then
114: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
115: hr_utility.raise_error;
116: End If;
117: hr_utility.set_location(l_proc, 15);
118: l_fct_ret := true;
119: End If;
113: If (p_object_version_number <> g_old_rec.object_version_number) Then
114: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
115: hr_utility.raise_error;
116: End If;
117: hr_utility.set_location(l_proc, 15);
118: l_fct_ret := true;
119: End If;
120: End If;
121: hr_utility.set_location(' Leaving:'||l_proc, 20);
117: hr_utility.set_location(l_proc, 15);
118: l_fct_ret := true;
119: End If;
120: End If;
121: hr_utility.set_location(' Leaving:'||l_proc, 20);
122: Return (l_fct_ret);
123: --
124: End api_updating;
125: --
151: --
152: l_proc varchar2(72) := g_package||'lck';
153: --
154: Begin
155: hr_utility.set_location('Entering:'||l_proc, 5);
156: --
157: -- Add any mandatory argument checking here:
158: -- Example:
159: -- hr_api.mandatory_arg_error
167: Close C_Sel1;
168: --
169: -- The primary key is invalid therefore we must error
170: --
171: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
172: hr_utility.raise_error;
173: End If;
174: Close C_Sel1;
175: If (p_object_version_number <> g_old_rec.object_version_number) Then
168: --
169: -- The primary key is invalid therefore we must error
170: --
171: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
172: hr_utility.raise_error;
173: End If;
174: Close C_Sel1;
175: If (p_object_version_number <> g_old_rec.object_version_number) Then
176: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
172: hr_utility.raise_error;
173: End If;
174: Close C_Sel1;
175: If (p_object_version_number <> g_old_rec.object_version_number) Then
176: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
177: hr_utility.raise_error;
178: End If;
179: --
180: hr_utility.set_location(' Leaving:'||l_proc, 10);
173: End If;
174: Close C_Sel1;
175: If (p_object_version_number <> g_old_rec.object_version_number) Then
176: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
177: hr_utility.raise_error;
178: End If;
179: --
180: hr_utility.set_location(' Leaving:'||l_proc, 10);
181: --
176: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
177: hr_utility.raise_error;
178: End If;
179: --
180: hr_utility.set_location(' Leaving:'||l_proc, 10);
181: --
182: -- We need to trap the ORA LOCK exception
183: --
184: Exception
186: --
187: -- The object is locked therefore we need to supply a meaningful
188: -- error message.
189: --
190: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
191: hr_utility.set_message_token('TABLE_NAME', 'pqh_budget_fund_srcs');
192: hr_utility.raise_error;
193: End lck;
194: --
187: -- The object is locked therefore we need to supply a meaningful
188: -- error message.
189: --
190: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
191: hr_utility.set_message_token('TABLE_NAME', 'pqh_budget_fund_srcs');
192: hr_utility.raise_error;
193: End lck;
194: --
195: -- ----------------------------------------------------------------------------
188: -- error message.
189: --
190: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
191: hr_utility.set_message_token('TABLE_NAME', 'pqh_budget_fund_srcs');
192: hr_utility.raise_error;
193: End lck;
194: --
195: -- ----------------------------------------------------------------------------
196: -- |-----------------------------< convert_args >-----------------------------|
214: l_proc varchar2(72) := g_package||'convert_args';
215: --
216: Begin
217: --
218: hr_utility.set_location('Entering:'||l_proc, 5);
219: --
220: -- Convert arguments into local l_rec structure.
221: --
222: l_rec.budget_fund_src_id := p_budget_fund_src_id;
231: l_rec.object_version_number := p_object_version_number;
232: --
233: -- Return the plsql record structure.
234: --
235: hr_utility.set_location(' Leaving:'||l_proc, 10);
236: Return(l_rec);
237: --
238: End convert_args;
239: --