15: --
16: l_proc varchar2(72) := g_package||'constraint_error';
17: --
18: Begin
19: hr_utility.set_location('Entering:'||l_proc, 5);
20: hr_utility.set_location(p_constraint_name,9999);
21: --
22: If (p_constraint_name = 'PER_COMPETENCES_FK1') Then
23: hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
16: l_proc varchar2(72) := g_package||'constraint_error';
17: --
18: Begin
19: hr_utility.set_location('Entering:'||l_proc, 5);
20: hr_utility.set_location(p_constraint_name,9999);
21: --
22: If (p_constraint_name = 'PER_COMPETENCES_FK1') Then
23: hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
24: hr_utility.set_message_token('PROCEDURE', l_proc);
19: hr_utility.set_location('Entering:'||l_proc, 5);
20: hr_utility.set_location(p_constraint_name,9999);
21: --
22: If (p_constraint_name = 'PER_COMPETENCES_FK1') Then
23: hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
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 = 'PER_COMPETENCES_FK2') Then
20: hr_utility.set_location(p_constraint_name,9999);
21: --
22: If (p_constraint_name = 'PER_COMPETENCES_FK1') Then
23: hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
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 = 'PER_COMPETENCES_FK2') Then
28: hr_utility.set_message(801, 'HR_51452_COMP_RAT_SC_NOT_EXIST');
21: --
22: If (p_constraint_name = 'PER_COMPETENCES_FK1') Then
23: hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
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 = 'PER_COMPETENCES_FK2') Then
28: hr_utility.set_message(801, 'HR_51452_COMP_RAT_SC_NOT_EXIST');
29: hr_utility.raise_error;
22: If (p_constraint_name = 'PER_COMPETENCES_FK1') Then
23: hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
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 = 'PER_COMPETENCES_FK2') Then
28: hr_utility.set_message(801, 'HR_51452_COMP_RAT_SC_NOT_EXIST');
29: hr_utility.raise_error;
30: ElsIf (p_constraint_name = 'PER_COMPETENCES_PK') 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 = 'PER_COMPETENCES_FK2') Then
28: hr_utility.set_message(801, 'HR_51452_COMP_RAT_SC_NOT_EXIST');
29: hr_utility.raise_error;
30: ElsIf (p_constraint_name = 'PER_COMPETENCES_PK') Then
31: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
32: 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 = 'PER_COMPETENCES_FK2') Then
28: hr_utility.set_message(801, 'HR_51452_COMP_RAT_SC_NOT_EXIST');
29: hr_utility.raise_error;
30: ElsIf (p_constraint_name = 'PER_COMPETENCES_PK') Then
31: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
32: hr_utility.set_message_token('PROCEDURE', l_proc);
33: hr_utility.set_message_token('STEP','15');
27: ElsIf (p_constraint_name = 'PER_COMPETENCES_FK2') Then
28: hr_utility.set_message(801, 'HR_51452_COMP_RAT_SC_NOT_EXIST');
29: hr_utility.raise_error;
30: ElsIf (p_constraint_name = 'PER_COMPETENCES_PK') Then
31: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
32: hr_utility.set_message_token('PROCEDURE', l_proc);
33: hr_utility.set_message_token('STEP','15');
34: hr_utility.raise_error;
35: --
28: hr_utility.set_message(801, 'HR_51452_COMP_RAT_SC_NOT_EXIST');
29: hr_utility.raise_error;
30: ElsIf (p_constraint_name = 'PER_COMPETENCES_PK') Then
31: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
32: hr_utility.set_message_token('PROCEDURE', l_proc);
33: hr_utility.set_message_token('STEP','15');
34: hr_utility.raise_error;
35: --
36: -- pmfletch - Replaced with procedure chk_definition_id
29: hr_utility.raise_error;
30: ElsIf (p_constraint_name = 'PER_COMPETENCES_PK') Then
31: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
32: hr_utility.set_message_token('PROCEDURE', l_proc);
33: hr_utility.set_message_token('STEP','15');
34: hr_utility.raise_error;
35: --
36: -- pmfletch - Replaced with procedure chk_definition_id
37: --ElsIf (p_constraint_name = 'PER_COMPETENCES_UK2') Then
30: ElsIf (p_constraint_name = 'PER_COMPETENCES_PK') Then
31: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
32: hr_utility.set_message_token('PROCEDURE', l_proc);
33: hr_utility.set_message_token('STEP','15');
34: hr_utility.raise_error;
35: --
36: -- pmfletch - Replaced with procedure chk_definition_id
37: --ElsIf (p_constraint_name = 'PER_COMPETENCES_UK2') Then
38: -- hr_utility.set_message(801, 'HR_51436_COMP_NOT_UNIQUE');
34: hr_utility.raise_error;
35: --
36: -- pmfletch - Replaced with procedure chk_definition_id
37: --ElsIf (p_constraint_name = 'PER_COMPETENCES_UK2') Then
38: -- hr_utility.set_message(801, 'HR_51436_COMP_NOT_UNIQUE');
39: -- hr_utility.raise_error;
40: --
41: ElsIf (p_constraint_name = 'PER_CPN_CERT_REQ_CHK') Then
42: hr_utility.set_message(801, 'HR_51432_COMP_CERTIFY_FLAG');
35: --
36: -- pmfletch - Replaced with procedure chk_definition_id
37: --ElsIf (p_constraint_name = 'PER_COMPETENCES_UK2') Then
38: -- hr_utility.set_message(801, 'HR_51436_COMP_NOT_UNIQUE');
39: -- hr_utility.raise_error;
40: --
41: ElsIf (p_constraint_name = 'PER_CPN_CERT_REQ_CHK') Then
42: hr_utility.set_message(801, 'HR_51432_COMP_CERTIFY_FLAG');
43: hr_utility.raise_error;
38: -- hr_utility.set_message(801, 'HR_51436_COMP_NOT_UNIQUE');
39: -- hr_utility.raise_error;
40: --
41: ElsIf (p_constraint_name = 'PER_CPN_CERT_REQ_CHK') Then
42: hr_utility.set_message(801, 'HR_51432_COMP_CERTIFY_FLAG');
43: hr_utility.raise_error;
44: ElsIf (p_constraint_name = 'PER_CPN_RENEWAL_CHK') Then
45: hr_utility.set_message(801, 'HR_51435_COMP_DEPENDENT_FIELDS');
46: hr_utility.set_message_token('PROCEDURE', l_proc);
39: -- hr_utility.raise_error;
40: --
41: ElsIf (p_constraint_name = 'PER_CPN_CERT_REQ_CHK') Then
42: hr_utility.set_message(801, 'HR_51432_COMP_CERTIFY_FLAG');
43: hr_utility.raise_error;
44: ElsIf (p_constraint_name = 'PER_CPN_RENEWAL_CHK') Then
45: hr_utility.set_message(801, 'HR_51435_COMP_DEPENDENT_FIELDS');
46: hr_utility.set_message_token('PROCEDURE', l_proc);
47: hr_utility.set_message_token('STEP','35');
41: ElsIf (p_constraint_name = 'PER_CPN_CERT_REQ_CHK') Then
42: hr_utility.set_message(801, 'HR_51432_COMP_CERTIFY_FLAG');
43: hr_utility.raise_error;
44: ElsIf (p_constraint_name = 'PER_CPN_RENEWAL_CHK') Then
45: hr_utility.set_message(801, 'HR_51435_COMP_DEPENDENT_FIELDS');
46: hr_utility.set_message_token('PROCEDURE', l_proc);
47: hr_utility.set_message_token('STEP','35');
48: hr_utility.raise_error;
49: --
42: hr_utility.set_message(801, 'HR_51432_COMP_CERTIFY_FLAG');
43: hr_utility.raise_error;
44: ElsIf (p_constraint_name = 'PER_CPN_RENEWAL_CHK') Then
45: hr_utility.set_message(801, 'HR_51435_COMP_DEPENDENT_FIELDS');
46: hr_utility.set_message_token('PROCEDURE', l_proc);
47: hr_utility.set_message_token('STEP','35');
48: hr_utility.raise_error;
49: --
50: -- pmfletch Replaced with procedure chk_alias in TL row handler
43: hr_utility.raise_error;
44: ElsIf (p_constraint_name = 'PER_CPN_RENEWAL_CHK') Then
45: hr_utility.set_message(801, 'HR_51435_COMP_DEPENDENT_FIELDS');
46: hr_utility.set_message_token('PROCEDURE', l_proc);
47: hr_utility.set_message_token('STEP','35');
48: hr_utility.raise_error;
49: --
50: -- pmfletch Replaced with procedure chk_alias in TL row handler
51: -- -- ngundura changes done for pa requirements
44: ElsIf (p_constraint_name = 'PER_CPN_RENEWAL_CHK') Then
45: hr_utility.set_message(801, 'HR_51435_COMP_DEPENDENT_FIELDS');
46: hr_utility.set_message_token('PROCEDURE', l_proc);
47: hr_utility.set_message_token('STEP','35');
48: hr_utility.raise_error;
49: --
50: -- pmfletch Replaced with procedure chk_alias in TL row handler
51: -- -- ngundura changes done for pa requirements
52: -- ElsIf (p_constraint_name = 'PER_COMPETENCES_UK3') Then
50: -- pmfletch Replaced with procedure chk_alias in TL row handler
51: -- -- ngundura changes done for pa requirements
52: -- ElsIf (p_constraint_name = 'PER_COMPETENCES_UK3') Then
53: -- fnd_message.set_name('PER', 'HR_52700_ALIAS_NOT_UNIQUE');
54: -- --hr_utility.set_message_token('PROCEDURE', l_proc);
55: -- --hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
56: -- fnd_message.raise_error;
57: -- -- ngundura end of changes
58: Else
51: -- -- ngundura changes done for pa requirements
52: -- ElsIf (p_constraint_name = 'PER_COMPETENCES_UK3') Then
53: -- fnd_message.set_name('PER', 'HR_52700_ALIAS_NOT_UNIQUE');
54: -- --hr_utility.set_message_token('PROCEDURE', l_proc);
55: -- --hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
56: -- fnd_message.raise_error;
57: -- -- ngundura end of changes
58: Else
59: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
55: -- --hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
56: -- fnd_message.raise_error;
57: -- -- ngundura end of changes
58: Else
59: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
60: hr_utility.set_message_token('PROCEDURE', l_proc);
61: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
62: hr_utility.raise_error;
63: End If;
56: -- fnd_message.raise_error;
57: -- -- ngundura end of changes
58: Else
59: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
60: hr_utility.set_message_token('PROCEDURE', l_proc);
61: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
62: hr_utility.raise_error;
63: End If;
64: --
57: -- -- ngundura end of changes
58: Else
59: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
60: hr_utility.set_message_token('PROCEDURE', l_proc);
61: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
62: hr_utility.raise_error;
63: End If;
64: --
65: hr_utility.set_location(' Leaving:'||l_proc, 10);
58: Else
59: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
60: hr_utility.set_message_token('PROCEDURE', l_proc);
61: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
62: hr_utility.raise_error;
63: End If;
64: --
65: hr_utility.set_location(' Leaving:'||l_proc, 10);
66: End constraint_error;
61: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
62: hr_utility.raise_error;
63: End If;
64: --
65: hr_utility.set_location(' Leaving:'||l_proc, 10);
66: End constraint_error;
67: --
68: -- ----------------------------------------------------------------------------
69: -- |-----------------------------< api_updating >-----------------------------|
154: l_proc varchar2(72) := g_package||'api_updating';
155: l_fct_ret boolean;
156: --
157: Begin
158: hr_utility.set_location('Entering:'||l_proc, 5);
159: --
160: If (
161: p_competence_id is null and
162: p_object_version_number is null
170: If (
171: p_competence_id = g_old_rec.competence_id and
172: p_object_version_number = g_old_rec.object_version_number
173: ) Then
174: hr_utility.set_location(l_proc, 10);
175: --
176: -- The g_old_rec is current therefore we must
177: -- set the returning function to true
178: --
187: Close C_Sel1;
188: --
189: -- The primary key is invalid therefore we must error
190: --
191: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
192: hr_utility.raise_error;
193: End If;
194: Close C_Sel1;
195: If (p_object_version_number <> g_old_rec.object_version_number) Then
188: --
189: -- The primary key is invalid therefore we must error
190: --
191: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
192: hr_utility.raise_error;
193: End If;
194: Close C_Sel1;
195: If (p_object_version_number <> g_old_rec.object_version_number) Then
196: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
192: hr_utility.raise_error;
193: End If;
194: Close C_Sel1;
195: If (p_object_version_number <> g_old_rec.object_version_number) Then
196: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
197: hr_utility.raise_error;
198: End If;
199: hr_utility.set_location(l_proc, 15);
200: l_fct_ret := true;
193: End If;
194: Close C_Sel1;
195: If (p_object_version_number <> g_old_rec.object_version_number) Then
196: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
197: hr_utility.raise_error;
198: End If;
199: hr_utility.set_location(l_proc, 15);
200: l_fct_ret := true;
201: End If;
195: If (p_object_version_number <> g_old_rec.object_version_number) Then
196: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
197: hr_utility.raise_error;
198: End If;
199: hr_utility.set_location(l_proc, 15);
200: l_fct_ret := true;
201: End If;
202: End If;
203: hr_utility.set_location(' Leaving:'||l_proc, 20);
199: hr_utility.set_location(l_proc, 15);
200: l_fct_ret := true;
201: End If;
202: End If;
203: hr_utility.set_location(' Leaving:'||l_proc, 20);
204: Return (l_fct_ret);
205: --
206: End api_updating;
207: --
292: --
293: l_proc varchar2(72) := g_package||'lck';
294: --
295: Begin
296: hr_utility.set_location('Entering:'||l_proc, 5);
297: --
298: -- Add any mandatory argument checking here:
299: -- Example:
300: -- hr_api.mandatory_arg_error
308: Close C_Sel1;
309: --
310: -- The primary key is invalid therefore we must error
311: --
312: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
313: hr_utility.raise_error;
314: End If;
315: Close C_Sel1;
316: If (p_object_version_number <> g_old_rec.object_version_number) Then
309: --
310: -- The primary key is invalid therefore we must error
311: --
312: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
313: hr_utility.raise_error;
314: End If;
315: Close C_Sel1;
316: If (p_object_version_number <> g_old_rec.object_version_number) Then
317: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
313: hr_utility.raise_error;
314: End If;
315: Close C_Sel1;
316: If (p_object_version_number <> g_old_rec.object_version_number) Then
317: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
318: hr_utility.raise_error;
319: End If;
320: --
321: hr_utility.set_location(' Leaving:'||l_proc, 10);
314: End If;
315: Close C_Sel1;
316: If (p_object_version_number <> g_old_rec.object_version_number) Then
317: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
318: hr_utility.raise_error;
319: End If;
320: --
321: hr_utility.set_location(' Leaving:'||l_proc, 10);
322: --
317: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
318: hr_utility.raise_error;
319: End If;
320: --
321: hr_utility.set_location(' Leaving:'||l_proc, 10);
322: --
323: -- We need to trap the ORA LOCK exception
324: --
325: Exception
327: --
328: -- The object is locked therefore we need to supply a meaningful
329: -- error message.
330: --
331: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
332: hr_utility.set_message_token('TABLE_NAME', 'per_competences');
333: hr_utility.raise_error;
334: End lck;
335: --
328: -- The object is locked therefore we need to supply a meaningful
329: -- error message.
330: --
331: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
332: hr_utility.set_message_token('TABLE_NAME', 'per_competences');
333: hr_utility.raise_error;
334: End lck;
335: --
336: -- ----------------------------------------------------------------------------
329: -- error message.
330: --
331: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
332: hr_utility.set_message_token('TABLE_NAME', 'per_competences');
333: hr_utility.raise_error;
334: End lck;
335: --
336: -- ----------------------------------------------------------------------------
337: -- |-----------------------------< convert_args >-----------------------------|
414: l_proc varchar2(72) := g_package||'convert_args';
415: --
416: Begin
417: --
418: hr_utility.set_location('Entering:'||l_proc, 5);
419: --
420: -- Convert arguments into local l_rec structure.
421: --
422: l_rec.competence_id := p_competence_id;
491: l_rec.information20 := p_information20;
492: --
493: -- Return the plsql record structure.
494: --
495: hr_utility.set_location(' Leaving:'||l_proc, 10);
496: Return(l_rec);
497: --
498: End convert_args;
499: --