53: l_proc VARCHAR2(72) := g_package||'chk_budget_exists';
54: --
55: BEGIN
56: --
57: hr_utility.set_location('Entering:'||l_proc, 5);
58: --
59: OPEN c_budgets;
60: FETCH c_budgets INTO l_result;
61: IF c_budgets%FOUND THEN
59: OPEN c_budgets;
60: FETCH c_budgets INTO l_result;
61: IF c_budgets%FOUND THEN
62: CLOSE c_budgets;
63: hr_utility.set_location(' ota budget exists'||l_proc, 10);
64: hr_utility.set_message(800,'PER_52887_BUD_CAL_DELETE_FAIL');
65: hr_utility.raise_error;
66: END IF;
67: CLOSE c_budgets;
60: FETCH c_budgets INTO l_result;
61: IF c_budgets%FOUND THEN
62: CLOSE c_budgets;
63: hr_utility.set_location(' ota budget exists'||l_proc, 10);
64: hr_utility.set_message(800,'PER_52887_BUD_CAL_DELETE_FAIL');
65: hr_utility.raise_error;
66: END IF;
67: CLOSE c_budgets;
68: --
61: IF c_budgets%FOUND THEN
62: CLOSE c_budgets;
63: hr_utility.set_location(' ota budget exists'||l_proc, 10);
64: hr_utility.set_message(800,'PER_52887_BUD_CAL_DELETE_FAIL');
65: hr_utility.raise_error;
66: END IF;
67: CLOSE c_budgets;
68: --
69: OPEN c_pqh_budgets;
69: OPEN c_pqh_budgets;
70: FETCH c_pqh_budgets INTO l_result;
71: IF c_pqh_budgets%FOUND THEN
72: CLOSE c_pqh_budgets;
73: hr_utility.set_location(' pqh budget exists'||l_proc, 20);
74: hr_utility.set_message(800,'PQH_52887_BUD_CAL_DELETE_FAIL');
75: hr_utility.raise_error;
76: END IF;
77: CLOSE c_pqh_budgets;
70: FETCH c_pqh_budgets INTO l_result;
71: IF c_pqh_budgets%FOUND THEN
72: CLOSE c_pqh_budgets;
73: hr_utility.set_location(' pqh budget exists'||l_proc, 20);
74: hr_utility.set_message(800,'PQH_52887_BUD_CAL_DELETE_FAIL');
75: hr_utility.raise_error;
76: END IF;
77: CLOSE c_pqh_budgets;
78: --
71: IF c_pqh_budgets%FOUND THEN
72: CLOSE c_pqh_budgets;
73: hr_utility.set_location(' pqh budget exists'||l_proc, 20);
74: hr_utility.set_message(800,'PQH_52887_BUD_CAL_DELETE_FAIL');
75: hr_utility.raise_error;
76: END IF;
77: CLOSE c_pqh_budgets;
78: --
79: hr_utility.set_location(' Leaving:'||l_proc, 50);
75: hr_utility.raise_error;
76: END IF;
77: CLOSE c_pqh_budgets;
78: --
79: hr_utility.set_location(' Leaving:'||l_proc, 50);
80: --
81: END chk_budget_exists;
82: --
83: --
187: OPEN C;
188: FETCH C INTO X_Rowid;
189: if (C%NOTFOUND) then
190: CLOSE C;
191: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
192: hr_utility.set_message_token('PROCEDURE','pay_calendars_pkg.insert_row');
193: hr_utility.set_message_token('STEP','1');
194: hr_utility.raise_error;
195: end if;
188: FETCH C INTO X_Rowid;
189: if (C%NOTFOUND) then
190: CLOSE C;
191: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
192: hr_utility.set_message_token('PROCEDURE','pay_calendars_pkg.insert_row');
193: hr_utility.set_message_token('STEP','1');
194: hr_utility.raise_error;
195: end if;
196: CLOSE C;
189: if (C%NOTFOUND) then
190: CLOSE C;
191: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
192: hr_utility.set_message_token('PROCEDURE','pay_calendars_pkg.insert_row');
193: hr_utility.set_message_token('STEP','1');
194: hr_utility.raise_error;
195: end if;
196: CLOSE C;
197: --
190: CLOSE C;
191: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
192: hr_utility.set_message_token('PROCEDURE','pay_calendars_pkg.insert_row');
193: hr_utility.set_message_token('STEP','1');
194: hr_utility.raise_error;
195: end if;
196: CLOSE C;
197: --
198: -- Create a years worth of calendar by default.
254: OPEN C;
255: FETCH C INTO Recinfo;
256: if (C%NOTFOUND) then
257: CLOSE C;
258: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
259: hr_utility.set_message_token('PROCEDURE','pay_calendars_pkg.lock_row');
260: hr_utility.set_message_token('STEP','1');
261: hr_utility.raise_error;
262: end if;
255: FETCH C INTO Recinfo;
256: if (C%NOTFOUND) then
257: CLOSE C;
258: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
259: hr_utility.set_message_token('PROCEDURE','pay_calendars_pkg.lock_row');
260: hr_utility.set_message_token('STEP','1');
261: hr_utility.raise_error;
262: end if;
263: CLOSE C;
256: if (C%NOTFOUND) then
257: CLOSE C;
258: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
259: hr_utility.set_message_token('PROCEDURE','pay_calendars_pkg.lock_row');
260: hr_utility.set_message_token('STEP','1');
261: hr_utility.raise_error;
262: end if;
263: CLOSE C;
264: --
257: CLOSE C;
258: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
259: hr_utility.set_message_token('PROCEDURE','pay_calendars_pkg.lock_row');
260: hr_utility.set_message_token('STEP','1');
261: hr_utility.raise_error;
262: end if;
263: CLOSE C;
264: --
265: -- Remove trailing spaces.
447: attribute20 = X_Attribute20
448: WHERE rowid = X_rowid;
449: --
450: if (SQL%NOTFOUND) then
451: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
452: hr_utility.set_message_token('PROCEDURE','pay_calendars_pkg.update_row');
453: hr_utility.set_message_token('STEP','1');
454: hr_utility.raise_error;
455: end if;
448: WHERE rowid = X_rowid;
449: --
450: if (SQL%NOTFOUND) then
451: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
452: hr_utility.set_message_token('PROCEDURE','pay_calendars_pkg.update_row');
453: hr_utility.set_message_token('STEP','1');
454: hr_utility.raise_error;
455: end if;
456: --
449: --
450: if (SQL%NOTFOUND) then
451: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
452: hr_utility.set_message_token('PROCEDURE','pay_calendars_pkg.update_row');
453: hr_utility.set_message_token('STEP','1');
454: hr_utility.raise_error;
455: end if;
456: --
457: END Update_Row;
450: if (SQL%NOTFOUND) then
451: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
452: hr_utility.set_message_token('PROCEDURE','pay_calendars_pkg.update_row');
453: hr_utility.set_message_token('STEP','1');
454: hr_utility.raise_error;
455: end if;
456: --
457: END Update_Row;
458: --
487: DELETE FROM pay_calendars
488: WHERE rowid = X_Rowid;
489: --
490: if (SQL%NOTFOUND) then
491: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
492: hr_utility.set_message_token('PROCEDURE','pay_calendars_pkg.delete_row');
493: hr_utility.set_message_token('STEP','1');
494: hr_utility.raise_error;
495: end if;
488: WHERE rowid = X_Rowid;
489: --
490: if (SQL%NOTFOUND) then
491: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
492: hr_utility.set_message_token('PROCEDURE','pay_calendars_pkg.delete_row');
493: hr_utility.set_message_token('STEP','1');
494: hr_utility.raise_error;
495: end if;
496: --
489: --
490: if (SQL%NOTFOUND) then
491: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
492: hr_utility.set_message_token('PROCEDURE','pay_calendars_pkg.delete_row');
493: hr_utility.set_message_token('STEP','1');
494: hr_utility.raise_error;
495: end if;
496: --
497: END Delete_Row;
490: if (SQL%NOTFOUND) then
491: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
492: hr_utility.set_message_token('PROCEDURE','pay_calendars_pkg.delete_row');
493: hr_utility.set_message_token('STEP','1');
494: hr_utility.raise_error;
495: end if;
496: --
497: END Delete_Row;
498: --