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_WORKSHEETS_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_WORKSHEETS_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_WORKSHEETS_FK2') Then
19: hr_utility.set_location('Entering:'||l_proc, 5);
20: --
21: If (p_constraint_name = 'PQH_WORKSHEETS_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_WORKSHEETS_FK2') Then
27: hr_utility.set_message(8302, 'PQH_WKS_REC_EXISTS');
20: --
21: If (p_constraint_name = 'PQH_WORKSHEETS_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_WORKSHEETS_FK2') Then
27: hr_utility.set_message(8302, 'PQH_WKS_REC_EXISTS');
28: hr_utility.raise_error;
21: If (p_constraint_name = 'PQH_WORKSHEETS_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_WORKSHEETS_FK2') Then
27: hr_utility.set_message(8302, 'PQH_WKS_REC_EXISTS');
28: hr_utility.raise_error;
29: ElsIf (p_constraint_name = 'PQH_WORKSHEETS_PK') Then
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_WORKSHEETS_FK2') Then
27: hr_utility.set_message(8302, 'PQH_WKS_REC_EXISTS');
28: hr_utility.raise_error;
29: ElsIf (p_constraint_name = 'PQH_WORKSHEETS_PK') Then
30: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
31: 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_WORKSHEETS_FK2') Then
27: hr_utility.set_message(8302, 'PQH_WKS_REC_EXISTS');
28: hr_utility.raise_error;
29: ElsIf (p_constraint_name = 'PQH_WORKSHEETS_PK') Then
30: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
31: hr_utility.set_message_token('PROCEDURE', l_proc);
32: hr_utility.set_message_token('STEP','15');
26: ElsIf (p_constraint_name = 'PQH_WORKSHEETS_FK2') Then
27: hr_utility.set_message(8302, 'PQH_WKS_REC_EXISTS');
28: hr_utility.raise_error;
29: ElsIf (p_constraint_name = 'PQH_WORKSHEETS_PK') Then
30: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
31: hr_utility.set_message_token('PROCEDURE', l_proc);
32: hr_utility.set_message_token('STEP','15');
33: hr_utility.raise_error;
34: Else
27: hr_utility.set_message(8302, 'PQH_WKS_REC_EXISTS');
28: hr_utility.raise_error;
29: ElsIf (p_constraint_name = 'PQH_WORKSHEETS_PK') Then
30: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
31: hr_utility.set_message_token('PROCEDURE', l_proc);
32: hr_utility.set_message_token('STEP','15');
33: hr_utility.raise_error;
34: Else
35: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
28: hr_utility.raise_error;
29: ElsIf (p_constraint_name = 'PQH_WORKSHEETS_PK') Then
30: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
31: hr_utility.set_message_token('PROCEDURE', l_proc);
32: hr_utility.set_message_token('STEP','15');
33: hr_utility.raise_error;
34: Else
35: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
36: hr_utility.set_message_token('PROCEDURE', l_proc);
29: ElsIf (p_constraint_name = 'PQH_WORKSHEETS_PK') Then
30: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
31: hr_utility.set_message_token('PROCEDURE', l_proc);
32: hr_utility.set_message_token('STEP','15');
33: hr_utility.raise_error;
34: Else
35: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
36: hr_utility.set_message_token('PROCEDURE', l_proc);
37: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
31: hr_utility.set_message_token('PROCEDURE', l_proc);
32: hr_utility.set_message_token('STEP','15');
33: hr_utility.raise_error;
34: Else
35: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
36: hr_utility.set_message_token('PROCEDURE', l_proc);
37: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
38: hr_utility.raise_error;
39: End If;
32: hr_utility.set_message_token('STEP','15');
33: hr_utility.raise_error;
34: Else
35: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
36: hr_utility.set_message_token('PROCEDURE', l_proc);
37: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
38: hr_utility.raise_error;
39: End If;
40: --
33: hr_utility.raise_error;
34: Else
35: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
36: hr_utility.set_message_token('PROCEDURE', l_proc);
37: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
38: hr_utility.raise_error;
39: End If;
40: --
41: hr_utility.set_location(' Leaving:'||l_proc, 10);
34: Else
35: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
36: hr_utility.set_message_token('PROCEDURE', l_proc);
37: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
38: hr_utility.raise_error;
39: End If;
40: --
41: hr_utility.set_location(' Leaving:'||l_proc, 10);
42: End constraint_error;
37: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
38: hr_utility.raise_error;
39: End If;
40: --
41: hr_utility.set_location(' Leaving:'||l_proc, 10);
42: End constraint_error;
43: --
44: -- ----------------------------------------------------------------------------
45: -- |-----------------------------< api_updating >-----------------------------|
74: l_proc varchar2(72) := g_package||'api_updating';
75: l_fct_ret boolean;
76: --
77: Begin
78: hr_utility.set_location('Entering:'||l_proc, 5);
79: --
80: If (
81: p_worksheet_id is null and
82: p_object_version_number is null
90: If (
91: p_worksheet_id = g_old_rec.worksheet_id and
92: p_object_version_number = g_old_rec.object_version_number
93: ) Then
94: hr_utility.set_location(l_proc, 10);
95: --
96: -- The g_old_rec is current therefore we must
97: -- set the returning function to true
98: --
107: Close C_Sel1;
108: --
109: -- The primary key is invalid therefore we must error
110: --
111: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
112: hr_utility.raise_error;
113: End If;
114: Close C_Sel1;
115: If (p_object_version_number <> g_old_rec.object_version_number) Then
108: --
109: -- The primary key is invalid therefore we must error
110: --
111: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
112: hr_utility.raise_error;
113: End If;
114: Close C_Sel1;
115: If (p_object_version_number <> g_old_rec.object_version_number) Then
116: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
112: hr_utility.raise_error;
113: End If;
114: Close C_Sel1;
115: If (p_object_version_number <> g_old_rec.object_version_number) Then
116: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
117: hr_utility.raise_error;
118: End If;
119: hr_utility.set_location(l_proc, 15);
120: l_fct_ret := true;
113: End If;
114: Close C_Sel1;
115: If (p_object_version_number <> g_old_rec.object_version_number) Then
116: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
117: hr_utility.raise_error;
118: End If;
119: hr_utility.set_location(l_proc, 15);
120: l_fct_ret := true;
121: End If;
115: If (p_object_version_number <> g_old_rec.object_version_number) Then
116: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
117: hr_utility.raise_error;
118: End If;
119: hr_utility.set_location(l_proc, 15);
120: l_fct_ret := true;
121: End If;
122: End If;
123: hr_utility.set_location(' Leaving:'||l_proc, 20);
119: hr_utility.set_location(l_proc, 15);
120: l_fct_ret := true;
121: End If;
122: End If;
123: hr_utility.set_location(' Leaving:'||l_proc, 20);
124: Return (l_fct_ret);
125: --
126: End api_updating;
127: --
156: --
157: l_proc varchar2(72) := g_package||'lck';
158: --
159: Begin
160: hr_utility.set_location('Entering:'||l_proc, 5);
161: --
162: -- Add any mandatory argument checking here:
163: -- Example:
164: -- hr_api.mandatory_arg_error
172: Close C_Sel1;
173: --
174: -- The primary key is invalid therefore we must error
175: --
176: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
177: hr_utility.raise_error;
178: End If;
179: Close C_Sel1;
180: If (p_object_version_number <> g_old_rec.object_version_number) Then
173: --
174: -- The primary key is invalid therefore we must error
175: --
176: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
177: hr_utility.raise_error;
178: End If;
179: Close C_Sel1;
180: If (p_object_version_number <> g_old_rec.object_version_number) Then
181: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
177: hr_utility.raise_error;
178: End If;
179: Close C_Sel1;
180: If (p_object_version_number <> g_old_rec.object_version_number) Then
181: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
182: hr_utility.raise_error;
183: End If;
184: --
185: hr_utility.set_location(' Leaving:'||l_proc, 10);
178: End If;
179: Close C_Sel1;
180: If (p_object_version_number <> g_old_rec.object_version_number) Then
181: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
182: hr_utility.raise_error;
183: End If;
184: --
185: hr_utility.set_location(' Leaving:'||l_proc, 10);
186: --
181: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
182: hr_utility.raise_error;
183: End If;
184: --
185: hr_utility.set_location(' Leaving:'||l_proc, 10);
186: --
187: -- We need to trap the ORA LOCK exception
188: --
189: Exception
191: --
192: -- The object is locked therefore we need to supply a meaningful
193: -- error message.
194: --
195: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
196: hr_utility.set_message_token('TABLE_NAME', 'pqh_worksheets');
197: hr_utility.raise_error;
198: End lck;
199: --
192: -- The object is locked therefore we need to supply a meaningful
193: -- error message.
194: --
195: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
196: hr_utility.set_message_token('TABLE_NAME', 'pqh_worksheets');
197: hr_utility.raise_error;
198: End lck;
199: --
200: -- ----------------------------------------------------------------------------
193: -- error message.
194: --
195: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
196: hr_utility.set_message_token('TABLE_NAME', 'pqh_worksheets');
197: hr_utility.raise_error;
198: End lck;
199: --
200: -- ----------------------------------------------------------------------------
201: -- |-----------------------------< convert_args >-----------------------------|
222: l_proc varchar2(72) := g_package||'convert_args';
223: --
224: Begin
225: --
226: hr_utility.set_location('Entering:'||l_proc, 5);
227: --
228: -- Convert arguments into local l_rec structure.
229: --
230: l_rec.worksheet_id := p_worksheet_id;
242: l_rec.wf_transaction_category_id := p_wf_transaction_category_id;
243: --
244: -- Return the plsql record structure.
245: --
246: hr_utility.set_location(' Leaving:'||l_proc, 10);
247: Return(l_rec);
248: --
249: End convert_args;
250: --