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_PERIODS_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_PERIODS_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_PERIODS_FK2') Then
19: hr_utility.set_location('Entering:'||l_proc, 5);
20: --
21: If (p_constraint_name = 'PQH_WORKSHEET_PERIODS_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_PERIODS_FK2') Then
27: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
20: --
21: If (p_constraint_name = 'PQH_WORKSHEET_PERIODS_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_PERIODS_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_PERIODS_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_PERIODS_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_PERIODS_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_PERIODS_FK3') Then
24: hr_utility.set_message_token('STEP','5');
25: hr_utility.raise_error;
26: ElsIf (p_constraint_name = 'PQH_WORKSHEET_PERIODS_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_PERIODS_FK3') Then
32: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
25: hr_utility.raise_error;
26: ElsIf (p_constraint_name = 'PQH_WORKSHEET_PERIODS_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_PERIODS_FK3') 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_PERIODS_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_PERIODS_FK3') 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_PERIODS_FK3') 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_PERIODS_PK') Then
29: hr_utility.set_message_token('STEP','10');
30: hr_utility.raise_error;
31: ElsIf (p_constraint_name = 'PQH_WORKSHEET_PERIODS_FK3') 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_PERIODS_PK') Then
37: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
30: hr_utility.raise_error;
31: ElsIf (p_constraint_name = 'PQH_WORKSHEET_PERIODS_FK3') 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_PERIODS_PK') Then
37: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
38: hr_utility.set_message_token('PROCEDURE', l_proc);
31: ElsIf (p_constraint_name = 'PQH_WORKSHEET_PERIODS_FK3') 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_PERIODS_PK') Then
37: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
38: hr_utility.set_message_token('PROCEDURE', l_proc);
39: hr_utility.set_message_token('STEP','20');
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_PERIODS_PK') Then
37: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
38: hr_utility.set_message_token('PROCEDURE', l_proc);
39: hr_utility.set_message_token('STEP','20');
40: hr_utility.raise_error;
41: ElsIf (p_constraint_name = 'PQH_WORKSHEET_PERIODS_UK') Then
34: hr_utility.set_message_token('STEP','15');
35: hr_utility.raise_error;
36: ElsIf (p_constraint_name = 'PQH_WORKSHEET_PERIODS_PK') Then
37: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
38: hr_utility.set_message_token('PROCEDURE', l_proc);
39: hr_utility.set_message_token('STEP','20');
40: hr_utility.raise_error;
41: ElsIf (p_constraint_name = 'PQH_WORKSHEET_PERIODS_UK') Then
42: --
35: hr_utility.raise_error;
36: ElsIf (p_constraint_name = 'PQH_WORKSHEET_PERIODS_PK') Then
37: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
38: hr_utility.set_message_token('PROCEDURE', l_proc);
39: hr_utility.set_message_token('STEP','20');
40: hr_utility.raise_error;
41: ElsIf (p_constraint_name = 'PQH_WORKSHEET_PERIODS_UK') Then
42: --
43: -- Code Changed to provide a more meaningful message on
36: ElsIf (p_constraint_name = 'PQH_WORKSHEET_PERIODS_PK') Then
37: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
38: hr_utility.set_message_token('PROCEDURE', l_proc);
39: hr_utility.set_message_token('STEP','20');
40: hr_utility.raise_error;
41: ElsIf (p_constraint_name = 'PQH_WORKSHEET_PERIODS_UK') Then
42: --
43: -- Code Changed to provide a more meaningful message on
44: -- unique constraint failure.
42: --
43: -- Code Changed to provide a more meaningful message on
44: -- unique constraint failure.
45: --
46: hr_utility.set_message(8302,'PQH_WKS_DUPLICATE_PERIOD');
47: hr_utility.raise_error;
48: /**
49: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
50: hr_utility.set_message_token('PROCEDURE', l_proc);
43: -- Code Changed to provide a more meaningful message on
44: -- unique constraint failure.
45: --
46: hr_utility.set_message(8302,'PQH_WKS_DUPLICATE_PERIOD');
47: hr_utility.raise_error;
48: /**
49: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
50: hr_utility.set_message_token('PROCEDURE', l_proc);
51: hr_utility.set_message_token('STEP','25');
45: --
46: hr_utility.set_message(8302,'PQH_WKS_DUPLICATE_PERIOD');
47: hr_utility.raise_error;
48: /**
49: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
50: hr_utility.set_message_token('PROCEDURE', l_proc);
51: hr_utility.set_message_token('STEP','25');
52: hr_utility.raise_error;
53: **/
46: hr_utility.set_message(8302,'PQH_WKS_DUPLICATE_PERIOD');
47: hr_utility.raise_error;
48: /**
49: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
50: hr_utility.set_message_token('PROCEDURE', l_proc);
51: hr_utility.set_message_token('STEP','25');
52: hr_utility.raise_error;
53: **/
54: Else
47: hr_utility.raise_error;
48: /**
49: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
50: hr_utility.set_message_token('PROCEDURE', l_proc);
51: hr_utility.set_message_token('STEP','25');
52: hr_utility.raise_error;
53: **/
54: Else
55: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
48: /**
49: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
50: hr_utility.set_message_token('PROCEDURE', l_proc);
51: hr_utility.set_message_token('STEP','25');
52: hr_utility.raise_error;
53: **/
54: Else
55: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
56: hr_utility.set_message_token('PROCEDURE', l_proc);
51: hr_utility.set_message_token('STEP','25');
52: hr_utility.raise_error;
53: **/
54: Else
55: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
56: hr_utility.set_message_token('PROCEDURE', l_proc);
57: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
58: hr_utility.raise_error;
59: End If;
52: hr_utility.raise_error;
53: **/
54: Else
55: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
56: hr_utility.set_message_token('PROCEDURE', l_proc);
57: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
58: hr_utility.raise_error;
59: End If;
60: --
53: **/
54: Else
55: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
56: hr_utility.set_message_token('PROCEDURE', l_proc);
57: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
58: hr_utility.raise_error;
59: End If;
60: --
61: hr_utility.set_location(' Leaving:'||l_proc, 10);
54: Else
55: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
56: hr_utility.set_message_token('PROCEDURE', l_proc);
57: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
58: hr_utility.raise_error;
59: End If;
60: --
61: hr_utility.set_location(' Leaving:'||l_proc, 10);
62: End constraint_error;
57: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
58: hr_utility.raise_error;
59: End If;
60: --
61: hr_utility.set_location(' Leaving:'||l_proc, 10);
62: End constraint_error;
63: --
64: -- ----------------------------------------------------------------------------
65: -- |-----------------------------< api_updating >-----------------------------|
98: l_proc varchar2(72) := g_package||'api_updating';
99: l_fct_ret boolean;
100: --
101: Begin
102: hr_utility.set_location('Entering:'||l_proc, 5);
103: --
104: If (
105: p_worksheet_period_id is null and
106: p_object_version_number is null
114: If (
115: p_worksheet_period_id = g_old_rec.worksheet_period_id and
116: p_object_version_number = g_old_rec.object_version_number
117: ) Then
118: hr_utility.set_location(l_proc, 10);
119: --
120: -- The g_old_rec is current therefore we must
121: -- set the returning function to true
122: --
131: Close C_Sel1;
132: --
133: -- The primary key is invalid therefore we must error
134: --
135: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
136: hr_utility.raise_error;
137: End If;
138: Close C_Sel1;
139: If (p_object_version_number <> g_old_rec.object_version_number) Then
132: --
133: -- The primary key is invalid therefore we must error
134: --
135: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
136: hr_utility.raise_error;
137: End If;
138: Close C_Sel1;
139: If (p_object_version_number <> g_old_rec.object_version_number) Then
140: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
136: hr_utility.raise_error;
137: End If;
138: Close C_Sel1;
139: If (p_object_version_number <> g_old_rec.object_version_number) Then
140: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
141: hr_utility.raise_error;
142: End If;
143: hr_utility.set_location(l_proc, 15);
144: l_fct_ret := true;
137: End If;
138: Close C_Sel1;
139: If (p_object_version_number <> g_old_rec.object_version_number) Then
140: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
141: hr_utility.raise_error;
142: End If;
143: hr_utility.set_location(l_proc, 15);
144: l_fct_ret := true;
145: End If;
139: If (p_object_version_number <> g_old_rec.object_version_number) Then
140: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
141: hr_utility.raise_error;
142: End If;
143: hr_utility.set_location(l_proc, 15);
144: l_fct_ret := true;
145: End If;
146: End If;
147: hr_utility.set_location(' Leaving:'||l_proc, 20);
143: hr_utility.set_location(l_proc, 15);
144: l_fct_ret := true;
145: End If;
146: End If;
147: hr_utility.set_location(' Leaving:'||l_proc, 20);
148: Return (l_fct_ret);
149: --
150: End api_updating;
151: --
184: --
185: l_proc varchar2(72) := g_package||'lck';
186: --
187: Begin
188: hr_utility.set_location('Entering:'||l_proc, 5);
189: --
190: -- Add any mandatory argument checking here:
191: -- Example:
192: -- hr_api.mandatory_arg_error
200: Close C_Sel1;
201: --
202: -- The primary key is invalid therefore we must error
203: --
204: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
205: hr_utility.raise_error;
206: End If;
207: Close C_Sel1;
208: If (p_object_version_number <> g_old_rec.object_version_number) Then
201: --
202: -- The primary key is invalid therefore we must error
203: --
204: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
205: hr_utility.raise_error;
206: End If;
207: Close C_Sel1;
208: If (p_object_version_number <> g_old_rec.object_version_number) Then
209: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
205: hr_utility.raise_error;
206: End If;
207: Close C_Sel1;
208: If (p_object_version_number <> g_old_rec.object_version_number) Then
209: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
210: hr_utility.raise_error;
211: End If;
212: --
213: hr_utility.set_location(' Leaving:'||l_proc, 10);
206: End If;
207: Close C_Sel1;
208: If (p_object_version_number <> g_old_rec.object_version_number) Then
209: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
210: hr_utility.raise_error;
211: End If;
212: --
213: hr_utility.set_location(' Leaving:'||l_proc, 10);
214: --
209: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
210: hr_utility.raise_error;
211: End If;
212: --
213: hr_utility.set_location(' Leaving:'||l_proc, 10);
214: --
215: -- We need to trap the ORA LOCK exception
216: --
217: Exception
219: --
220: -- The object is locked therefore we need to supply a meaningful
221: -- error message.
222: --
223: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
224: hr_utility.set_message_token('TABLE_NAME', 'pqh_worksheet_periods');
225: hr_utility.raise_error;
226: End lck;
227: --
220: -- The object is locked therefore we need to supply a meaningful
221: -- error message.
222: --
223: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
224: hr_utility.set_message_token('TABLE_NAME', 'pqh_worksheet_periods');
225: hr_utility.raise_error;
226: End lck;
227: --
228: -- ----------------------------------------------------------------------------
221: -- error message.
222: --
223: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
224: hr_utility.set_message_token('TABLE_NAME', 'pqh_worksheet_periods');
225: hr_utility.raise_error;
226: End lck;
227: --
228: -- ----------------------------------------------------------------------------
229: -- |-----------------------------< convert_args >-----------------------------|
254: l_proc varchar2(72) := g_package||'convert_args';
255: --
256: Begin
257: --
258: hr_utility.set_location('Entering:'||l_proc, 5);
259: --
260: -- Convert arguments into local l_rec structure.
261: --
262: l_rec.worksheet_period_id := p_worksheet_period_id;
278: l_rec.budget_unit1_available := p_budget_unit1_available;
279: --
280: -- Return the plsql record structure.
281: --
282: hr_utility.set_location(' Leaving:'||l_proc, 10);
283: Return(l_rec);
284: --
285: End convert_args;
286: --