155: or (pgp.segment30 is null
156: and p_segment30 is null));
157: --
158: begin
159: hr_utility.set_location('Entering:'||l_proc, 5);
160: hr_api.validate_bus_grp_id(p_business_group_id);
161: --
162: -- Determine if all the segments are null
163: --
194: --
195: -- as the segments are null set the p_id_flex_num
196: -- explicitly to null.
197: --
198: hr_utility.set_location(l_proc, 10);
199: p_id_flex_num := null;
200: else
201: --
202: -- segments exists therefore select the id_flex_num
200: else
201: --
202: -- segments exists therefore select the id_flex_num
203: --
204: hr_utility.set_location(l_proc, 15);
205: open idsel;
206: fetch idsel into l_id_flex_num;
207: if idsel%notfound then
208: close idsel;
208: close idsel;
209: --
210: -- the flex structure has not been found therefore we must error
211: --
212: hr_utility.set_message(801, 'HR_7471_FLEX_PEA_INVALID_ID');
213: hr_utility.raise_error;
214: end if;
215: close idsel;
216: hr_utility.set_location(l_proc, 10);
209: --
210: -- the flex structure has not been found therefore we must error
211: --
212: hr_utility.set_message(801, 'HR_7471_FLEX_PEA_INVALID_ID');
213: hr_utility.raise_error;
214: end if;
215: close idsel;
216: hr_utility.set_location(l_proc, 10);
217: p_id_flex_num := l_id_flex_num;
212: hr_utility.set_message(801, 'HR_7471_FLEX_PEA_INVALID_ID');
213: hr_utility.raise_error;
214: end if;
215: close idsel;
216: hr_utility.set_location(l_proc, 10);
217: p_id_flex_num := l_id_flex_num;
218: --
219: -- open and execute the partial segment cursor. if no rows are returned
220: -- then p_people_group_id must be set to -1 (indicating a
219: -- open and execute the partial segment cursor. if no rows are returned
220: -- then p_people_group_id must be set to -1 (indicating a
221: -- new combination needs to be inserted.
222: --
223: hr_utility.set_location(l_proc, 20);
224: open pgsel;
225: fetch pgsel into p_people_group_id, p_group_name;
226: if pgsel%notfound then
227: hr_utility.set_location(l_proc, 25);
223: hr_utility.set_location(l_proc, 20);
224: open pgsel;
225: fetch pgsel into p_people_group_id, p_group_name;
226: if pgsel%notfound then
227: hr_utility.set_location(l_proc, 25);
228: p_people_group_id := -1;
229: p_group_name := null;
230: end if;
231: close pgsel;
231: close pgsel;
232: end if;
233: --
234: --
235: hr_utility.set_location(' Leaving:'||l_proc, 30);
236: end segment_combination_check;
237: --
238: -- ----------------------------------------------------------------------------
239: -- |------------------------< return_api_dml_status >-------------------------|
242: --
243: l_proc varchar2(72) := g_package||'return_api_dml_status';
244: --
245: Begin
246: hr_utility.set_location('Entering:'||l_proc, 5);
247: --
248: Return (nvl(g_api_dml, false));
249: --
250: hr_utility.set_location(' Leaving:'||l_proc, 10);
246: hr_utility.set_location('Entering:'||l_proc, 5);
247: --
248: Return (nvl(g_api_dml, false));
249: --
250: hr_utility.set_location(' Leaving:'||l_proc, 10);
251: End return_api_dml_status;
252: --
253: -- ----------------------------------------------------------------------------
254: -- |---------------------------< constraint_error >---------------------------|
258: --
259: l_proc varchar2(72) := g_package||'constraint_error';
260: --
261: Begin
262: hr_utility.set_location('Entering:'||l_proc, 5);
263: --
264: If (p_constraint_name = 'PAY_PEOPLE_GROUPS_PK') Then
265: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
266: hr_utility.set_message_token('PROCEDURE', l_proc);
261: Begin
262: hr_utility.set_location('Entering:'||l_proc, 5);
263: --
264: If (p_constraint_name = 'PAY_PEOPLE_GROUPS_PK') Then
265: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
266: hr_utility.set_message_token('PROCEDURE', l_proc);
267: hr_utility.set_message_token('STEP','5');
268: hr_utility.raise_error;
269: Else
262: hr_utility.set_location('Entering:'||l_proc, 5);
263: --
264: If (p_constraint_name = 'PAY_PEOPLE_GROUPS_PK') Then
265: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
266: hr_utility.set_message_token('PROCEDURE', l_proc);
267: hr_utility.set_message_token('STEP','5');
268: hr_utility.raise_error;
269: Else
270: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
263: --
264: If (p_constraint_name = 'PAY_PEOPLE_GROUPS_PK') Then
265: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
266: hr_utility.set_message_token('PROCEDURE', l_proc);
267: hr_utility.set_message_token('STEP','5');
268: hr_utility.raise_error;
269: Else
270: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
271: hr_utility.set_message_token('PROCEDURE', l_proc);
264: If (p_constraint_name = 'PAY_PEOPLE_GROUPS_PK') Then
265: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
266: hr_utility.set_message_token('PROCEDURE', l_proc);
267: hr_utility.set_message_token('STEP','5');
268: hr_utility.raise_error;
269: Else
270: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
271: hr_utility.set_message_token('PROCEDURE', l_proc);
272: hr_utility.set_message_token('STEP','10');
266: hr_utility.set_message_token('PROCEDURE', l_proc);
267: hr_utility.set_message_token('STEP','5');
268: hr_utility.raise_error;
269: Else
270: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
271: hr_utility.set_message_token('PROCEDURE', l_proc);
272: hr_utility.set_message_token('STEP','10');
273: hr_utility.raise_error;
274: End If;
267: hr_utility.set_message_token('STEP','5');
268: hr_utility.raise_error;
269: Else
270: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
271: hr_utility.set_message_token('PROCEDURE', l_proc);
272: hr_utility.set_message_token('STEP','10');
273: hr_utility.raise_error;
274: End If;
275: --
268: hr_utility.raise_error;
269: Else
270: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
271: hr_utility.set_message_token('PROCEDURE', l_proc);
272: hr_utility.set_message_token('STEP','10');
273: hr_utility.raise_error;
274: End If;
275: --
276: hr_utility.set_location(' Leaving:'||l_proc, 10);
269: Else
270: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
271: hr_utility.set_message_token('PROCEDURE', l_proc);
272: hr_utility.set_message_token('STEP','10');
273: hr_utility.raise_error;
274: End If;
275: --
276: hr_utility.set_location(' Leaving:'||l_proc, 10);
277: End constraint_error;
272: hr_utility.set_message_token('STEP','10');
273: hr_utility.raise_error;
274: End If;
275: --
276: hr_utility.set_location(' Leaving:'||l_proc, 10);
277: End constraint_error;
278: --
279: -- ----------------------------------------------------------------------------
280: -- |-----------------------------< api_updating >-----------------------------|
329: l_proc varchar2(72) := g_package||'api_updating';
330: l_fct_ret boolean;
331: --
332: Begin
333: hr_utility.set_location('Entering:'||l_proc, 5);
334: --
335: If (p_people_group_id is null) Then
336: --
337: -- One of the primary key arguments is null therefore we must
339: --
340: l_fct_ret := false;
341: Else
342: If (p_people_group_id = g_old_rec.people_group_id) Then
343: hr_utility.set_location(l_proc, 10);
344: --
345: -- The g_old_rec is current therefore we must
346: -- set the returning function to true
347: --
356: Close C_Sel1;
357: --
358: -- The primary key is invalid therefore we must error
359: --
360: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
361: hr_utility.raise_error;
362: End If;
363: Close C_Sel1;
364: hr_utility.set_location(l_proc, 15);
357: --
358: -- The primary key is invalid therefore we must error
359: --
360: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
361: hr_utility.raise_error;
362: End If;
363: Close C_Sel1;
364: hr_utility.set_location(l_proc, 15);
365: l_fct_ret := true;
360: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
361: hr_utility.raise_error;
362: End If;
363: Close C_Sel1;
364: hr_utility.set_location(l_proc, 15);
365: l_fct_ret := true;
366: End If;
367: End If;
368: hr_utility.set_location(' Leaving:'||l_proc, 20);
364: hr_utility.set_location(l_proc, 15);
365: l_fct_ret := true;
366: End If;
367: End If;
368: hr_utility.set_location(' Leaving:'||l_proc, 20);
369: Return (l_fct_ret);
370: --
371: End api_updating;
372: --
419: l_proc varchar2(72) := g_package||'convert_args';
420: --
421: Begin
422: --
423: hr_utility.set_location('Entering:'||l_proc, 5);
424: --
425: -- Convert arguments into local l_rec structure.
426: --
427: l_rec.people_group_id := p_people_group_id;
463: l_rec.segment30 := p_segment30;
464: --
465: -- Return the plsql record structure.
466: --
467: hr_utility.set_location(' Leaving:'||l_proc, 10);
468: Return(l_rec);
469: --
470: End convert_args;
471: --