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_BDGT_ELMNTS_FK2') 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_BDGT_ELMNTS_FK2') 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_BDGT_ELMNTS_PK') Then
19: hr_utility.set_location('Entering:'||l_proc, 5);
20: --
21: If (p_constraint_name = 'PQH_WORKSHEET_BDGT_ELMNTS_FK2') 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_BDGT_ELMNTS_PK') Then
27: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
20: --
21: If (p_constraint_name = 'PQH_WORKSHEET_BDGT_ELMNTS_FK2') 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_BDGT_ELMNTS_PK') 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_BDGT_ELMNTS_FK2') 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_BDGT_ELMNTS_PK') 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_BDGT_ELMNTS_PK') 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_BDGT_ELMNTS_UK') Then
24: hr_utility.set_message_token('STEP','5');
25: hr_utility.raise_error;
26: ElsIf (p_constraint_name = 'PQH_WORKSHEET_BDGT_ELMNTS_PK') 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_BDGT_ELMNTS_UK') Then
32: --
25: hr_utility.raise_error;
26: ElsIf (p_constraint_name = 'PQH_WORKSHEET_BDGT_ELMNTS_PK') 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_BDGT_ELMNTS_UK') Then
32: --
33: -- Code Changed to provide a more meaningful message on
26: ElsIf (p_constraint_name = 'PQH_WORKSHEET_BDGT_ELMNTS_PK') 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_BDGT_ELMNTS_UK') Then
32: --
33: -- Code Changed to provide a more meaningful message on
34: -- unique constraint failure.
32: --
33: -- Code Changed to provide a more meaningful message on
34: -- unique constraint failure.
35: --
36: hr_utility.set_message(8302, 'PQH_DUPLICATE_BUDGET_ELEMENTS');
37: hr_utility.raise_error;
38: /**
39: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
40: hr_utility.set_message_token('PROCEDURE', l_proc);
33: -- Code Changed to provide a more meaningful message on
34: -- unique constraint failure.
35: --
36: hr_utility.set_message(8302, 'PQH_DUPLICATE_BUDGET_ELEMENTS');
37: hr_utility.raise_error;
38: /**
39: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
40: hr_utility.set_message_token('PROCEDURE', l_proc);
41: hr_utility.set_message_token('STEP','15');
35: --
36: hr_utility.set_message(8302, 'PQH_DUPLICATE_BUDGET_ELEMENTS');
37: hr_utility.raise_error;
38: /**
39: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
40: hr_utility.set_message_token('PROCEDURE', l_proc);
41: hr_utility.set_message_token('STEP','15');
42: hr_utility.raise_error;
43: **/
36: hr_utility.set_message(8302, 'PQH_DUPLICATE_BUDGET_ELEMENTS');
37: hr_utility.raise_error;
38: /**
39: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
40: hr_utility.set_message_token('PROCEDURE', l_proc);
41: hr_utility.set_message_token('STEP','15');
42: hr_utility.raise_error;
43: **/
44: Else
37: hr_utility.raise_error;
38: /**
39: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
40: hr_utility.set_message_token('PROCEDURE', l_proc);
41: hr_utility.set_message_token('STEP','15');
42: hr_utility.raise_error;
43: **/
44: Else
45: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
38: /**
39: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
40: hr_utility.set_message_token('PROCEDURE', l_proc);
41: hr_utility.set_message_token('STEP','15');
42: hr_utility.raise_error;
43: **/
44: Else
45: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
46: hr_utility.set_message_token('PROCEDURE', l_proc);
41: hr_utility.set_message_token('STEP','15');
42: hr_utility.raise_error;
43: **/
44: Else
45: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
46: hr_utility.set_message_token('PROCEDURE', l_proc);
47: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
48: hr_utility.raise_error;
49: End If;
42: hr_utility.raise_error;
43: **/
44: Else
45: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
46: hr_utility.set_message_token('PROCEDURE', l_proc);
47: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
48: hr_utility.raise_error;
49: End If;
50: --
43: **/
44: Else
45: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
46: hr_utility.set_message_token('PROCEDURE', l_proc);
47: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
48: hr_utility.raise_error;
49: End If;
50: --
51: hr_utility.set_location(' Leaving:'||l_proc, 10);
44: Else
45: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
46: hr_utility.set_message_token('PROCEDURE', l_proc);
47: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
48: hr_utility.raise_error;
49: End If;
50: --
51: hr_utility.set_location(' Leaving:'||l_proc, 10);
52: End constraint_error;
47: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
48: hr_utility.raise_error;
49: End If;
50: --
51: hr_utility.set_location(' Leaving:'||l_proc, 10);
52: End constraint_error;
53: --
54: -- ----------------------------------------------------------------------------
55: -- |-----------------------------< api_updating >-----------------------------|
76: l_proc varchar2(72) := g_package||'api_updating';
77: l_fct_ret boolean;
78: --
79: Begin
80: hr_utility.set_location('Entering:'||l_proc, 5);
81: --
82: If (
83: p_worksheet_bdgt_elmnt_id is null and
84: p_object_version_number is null
92: If (
93: p_worksheet_bdgt_elmnt_id = g_old_rec.worksheet_bdgt_elmnt_id and
94: p_object_version_number = g_old_rec.object_version_number
95: ) Then
96: hr_utility.set_location(l_proc, 10);
97: --
98: -- The g_old_rec is current therefore we must
99: -- set the returning function to true
100: --
109: Close C_Sel1;
110: --
111: -- The primary key is invalid therefore we must error
112: --
113: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
114: hr_utility.raise_error;
115: End If;
116: Close C_Sel1;
117: If (p_object_version_number <> g_old_rec.object_version_number) Then
110: --
111: -- The primary key is invalid therefore we must error
112: --
113: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
114: hr_utility.raise_error;
115: End If;
116: Close C_Sel1;
117: If (p_object_version_number <> g_old_rec.object_version_number) Then
118: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
114: hr_utility.raise_error;
115: End If;
116: Close C_Sel1;
117: If (p_object_version_number <> g_old_rec.object_version_number) Then
118: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
119: hr_utility.raise_error;
120: End If;
121: hr_utility.set_location(l_proc, 15);
122: l_fct_ret := true;
115: End If;
116: Close C_Sel1;
117: If (p_object_version_number <> g_old_rec.object_version_number) Then
118: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
119: hr_utility.raise_error;
120: End If;
121: hr_utility.set_location(l_proc, 15);
122: l_fct_ret := true;
123: End If;
117: If (p_object_version_number <> g_old_rec.object_version_number) Then
118: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
119: hr_utility.raise_error;
120: End If;
121: hr_utility.set_location(l_proc, 15);
122: l_fct_ret := true;
123: End If;
124: End If;
125: hr_utility.set_location(' Leaving:'||l_proc, 20);
121: hr_utility.set_location(l_proc, 15);
122: l_fct_ret := true;
123: End If;
124: End If;
125: hr_utility.set_location(' Leaving:'||l_proc, 20);
126: Return (l_fct_ret);
127: --
128: End api_updating;
129: --
150: --
151: l_proc varchar2(72) := g_package||'lck';
152: --
153: Begin
154: hr_utility.set_location('Entering:'||l_proc, 5);
155: --
156: -- Add any mandatory argument checking here:
157: -- Example:
158: -- hr_api.mandatory_arg_error
166: Close C_Sel1;
167: --
168: -- The primary key is invalid therefore we must error
169: --
170: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
171: hr_utility.raise_error;
172: End If;
173: Close C_Sel1;
174: If (p_object_version_number <> g_old_rec.object_version_number) Then
167: --
168: -- The primary key is invalid therefore we must error
169: --
170: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
171: hr_utility.raise_error;
172: End If;
173: Close C_Sel1;
174: If (p_object_version_number <> g_old_rec.object_version_number) Then
175: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
171: hr_utility.raise_error;
172: End If;
173: Close C_Sel1;
174: If (p_object_version_number <> g_old_rec.object_version_number) Then
175: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
176: hr_utility.raise_error;
177: End If;
178: --
179: hr_utility.set_location(' Leaving:'||l_proc, 10);
172: End If;
173: Close C_Sel1;
174: If (p_object_version_number <> g_old_rec.object_version_number) Then
175: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
176: hr_utility.raise_error;
177: End If;
178: --
179: hr_utility.set_location(' Leaving:'||l_proc, 10);
180: --
175: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
176: hr_utility.raise_error;
177: End If;
178: --
179: hr_utility.set_location(' Leaving:'||l_proc, 10);
180: --
181: -- We need to trap the ORA LOCK exception
182: --
183: Exception
185: --
186: -- The object is locked therefore we need to supply a meaningful
187: -- error message.
188: --
189: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
190: hr_utility.set_message_token('TABLE_NAME', 'pqh_worksheet_bdgt_elmnts');
191: hr_utility.raise_error;
192: End lck;
193: --
186: -- The object is locked therefore we need to supply a meaningful
187: -- error message.
188: --
189: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
190: hr_utility.set_message_token('TABLE_NAME', 'pqh_worksheet_bdgt_elmnts');
191: hr_utility.raise_error;
192: End lck;
193: --
194: -- ----------------------------------------------------------------------------
187: -- error message.
188: --
189: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
190: hr_utility.set_message_token('TABLE_NAME', 'pqh_worksheet_bdgt_elmnts');
191: hr_utility.raise_error;
192: End lck;
193: --
194: -- ----------------------------------------------------------------------------
195: -- |-----------------------------< convert_args >-----------------------------|
208: l_proc varchar2(72) := g_package||'convert_args';
209: --
210: Begin
211: --
212: hr_utility.set_location('Entering:'||l_proc, 5);
213: --
214: -- Convert arguments into local l_rec structure.
215: --
216: l_rec.worksheet_bdgt_elmnt_id := p_worksheet_bdgt_elmnt_id;
220: l_rec.object_version_number := p_object_version_number;
221: --
222: -- Return the plsql record structure.
223: --
224: hr_utility.set_location(' Leaving:'||l_proc, 10);
225: Return(l_rec);
226: --
227: End convert_args;
228: --