15: l_result VARCHAR2(255);
16: l_proc VARCHAR2(72) := g_package||'Chk_Unique';
17: BEGIN
18: --
19: hr_utility.set_location('Entering:'||l_proc, 5);
20: --
21: SELECT NULL
22: INTO l_result
23: FROM per_budget_values bv
26: AND X_Business_group_Id = bv.Business_Group_Id + 0
27: AND (bv.Rowid <> X_Rowid or X_Rowid is null);
28:
29: IF (SQL%FOUND) then
30: hr_utility.set_message(801,'PER_7228_BUDGET_ONE_PER_PERIOD');
31: hr_utility.raise_error;
32: end if;
33: --
34: hr_utility.set_location(' Leaving:'||l_proc, 10);
27: AND (bv.Rowid <> X_Rowid or X_Rowid is null);
28:
29: IF (SQL%FOUND) then
30: hr_utility.set_message(801,'PER_7228_BUDGET_ONE_PER_PERIOD');
31: hr_utility.raise_error;
32: end if;
33: --
34: hr_utility.set_location(' Leaving:'||l_proc, 10);
35: --
30: hr_utility.set_message(801,'PER_7228_BUDGET_ONE_PER_PERIOD');
31: hr_utility.raise_error;
32: end if;
33: --
34: hr_utility.set_location(' Leaving:'||l_proc, 10);
35: --
36: EXCEPTION
37: when NO_DATA_FOUND then
38: null;
47: l_result VARCHAR2(255);
48: l_proc VARCHAR2(72) := g_package||'chk_budget_element_id';
49: BEGIN
50: --
51: hr_utility.set_location('Entering:'||l_proc, 5);
52: --
53: SELECT budget_version_id
54: INTO x_budget_version_id
55: FROM per_budget_elements pbe
55: FROM per_budget_elements pbe
56: WHERE pbe.budget_element_id = x_budget_element_id
57: AND pbe.business_group_id = x_business_group_id;
58: --
59: hr_utility.set_location(' Leaving:'||l_proc, 10);
60: --
61: EXCEPTION
62: WHEN NO_DATA_FOUND THEN
63: hr_utility.set_message(800,'PER_52866_INV_BUD_ELE');
59: hr_utility.set_location(' Leaving:'||l_proc, 10);
60: --
61: EXCEPTION
62: WHEN NO_DATA_FOUND THEN
63: hr_utility.set_message(800,'PER_52866_INV_BUD_ELE');
64: hr_utility.raise_error;
65: END chk_budget_element_id;
66:
67: -- ----------------------------------------------------------------------------
60: --
61: EXCEPTION
62: WHEN NO_DATA_FOUND THEN
63: hr_utility.set_message(800,'PER_52866_INV_BUD_ELE');
64: hr_utility.raise_error;
65: END chk_budget_element_id;
66:
67: -- ----------------------------------------------------------------------------
68: -- |----------------------< chk_budget_value_id >-------------------------------|
72: l_result VARCHAR2(255);
73: l_proc VARCHAR2(72) := g_package||'chk_budget_value_id';
74: BEGIN
75: --
76: hr_utility.set_location('Entering:'||l_proc, 5);
77: --
78: SELECT NULL
79: INTO l_result
80: FROM per_budget_values pbv
80: FROM per_budget_values pbv
81: WHERE pbv.budget_value_id = x_budget_value_id
82: AND (pbv.rowid <> X_rowid OR X_rowid IS NULL);
83: --
84: hr_utility.set_location(' Leaving:'||l_proc, 10);
85: --
86: IF SQL%FOUND THEN
87: hr_utility.set_message(800,'PER_52888_BUD_VAL_EXISTS');
88: hr_utility.raise_error;
83: --
84: hr_utility.set_location(' Leaving:'||l_proc, 10);
85: --
86: IF SQL%FOUND THEN
87: hr_utility.set_message(800,'PER_52888_BUD_VAL_EXISTS');
88: hr_utility.raise_error;
89: END IF;
90: --
91: EXCEPTION
84: hr_utility.set_location(' Leaving:'||l_proc, 10);
85: --
86: IF SQL%FOUND THEN
87: hr_utility.set_message(800,'PER_52888_BUD_VAL_EXISTS');
88: hr_utility.raise_error;
89: END IF;
90: --
91: EXCEPTION
92: when NO_DATA_FOUND then
129: l_dyn_rows integer;
130:
131: BEGIN
132: --
133: hr_utility.set_location('Entering:'||l_proc, 5);
134: --
135: -- if OTA is installed,
136: -- check if training measurement type record exists with multiple values
137: l_dyn_curs := dbms_sql.open_cursor;
158: end if;
159: --
160: RETURN FALSE;
161:
162: hr_utility.set_location(' Leaving:'||l_proc, 10);
163: --
164: EXCEPTION
165: WHEN NO_DATA_FOUND THEN
166: RETURN FALSE;
206: l_proc VARCHAR2(72) := g_package||'Chk_df';
207:
208: BEGIN
209: --
210: hr_utility.set_location('Entering:'||l_proc, 5);
211: --
212: hr_dflex_utility.ins_or_upd_descflex_attribs
213: (p_appl_short_name => 'PER'
214: ,p_descflex_name => 'PER_BUDGET_VALUES'
273: ,p_attribute29_value => x_attribute29
274: ,p_attribute30_name => 'ATTRIBUTE30'
275: ,p_attribute30_value => x_attribute30);
276: --
277: hr_utility.set_location(' Leaving:'||l_proc, 10);
278: --
279: END Chk_df;
280:
281: -- ----------------------------------------------------------------------------
316: l_proc VARCHAR2(72) := g_package||'Chk_ddf';
317:
318: BEGIN
319: --
320: hr_utility.set_location('Entering:'||l_proc, 5);
321: --
322: hr_dflex_utility.ins_or_upd_descflex_attribs
323: (p_appl_short_name => 'PER'
324: ,p_descflex_name => 'Budget Values Developer DF'
383: ,p_attribute29_value => x_information29
384: ,p_attribute30_name => 'BUDGET_INFORMATION30'
385: ,p_attribute30_value => x_information30);
386: --
387: hr_utility.set_location(' Leaving:'||l_proc, 10);
388: --
389: END Chk_ddf;
390:
391:
475: l_budget_version_id NUMBER(15);
476: l_result VARCHAR2(255);
477: BEGIN
478: --
479: hr_utility.set_location('Entering:'||l_proc, 5);
480: --
481: -- validate mandatory business_group
482: hr_api.validate_bus_grp_id(X_Business_Group_Id);
483: --
502: OPEN C3;
503: FETCH C3 into l_result;
504: IF C3%FOUND THEN
505: IF get_many_budget_values(x_business_group_id, l_budget_version_id) = FALSE THEN
506: hr_utility.set_message(800,'PER_52865_SINGLE_BDGT_VAL');
507: hr_utility.raise_error;
508: END IF;
509: END IF;
510: ELSE
503: FETCH C3 into l_result;
504: IF C3%FOUND THEN
505: IF get_many_budget_values(x_business_group_id, l_budget_version_id) = FALSE THEN
506: hr_utility.set_message(800,'PER_52865_SINGLE_BDGT_VAL');
507: hr_utility.raise_error;
508: END IF;
509: END IF;
510: ELSE
511: -- only allow 1 record to exist for the business_group, budget_element_id, and time_period
729: OPEN C1;
730: FETCH C1 INTO X_Rowid;
731: if (C1%NOTFOUND) then
732: CLOSE C1;
733: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
734: hr_utility.set_message_token('PROCEDURE','Insert_Row');
735: hr_utility.set_message_token('STEP','1');
736: hr_utility.raise_error;
737: end if;
730: FETCH C1 INTO X_Rowid;
731: if (C1%NOTFOUND) then
732: CLOSE C1;
733: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
734: hr_utility.set_message_token('PROCEDURE','Insert_Row');
735: hr_utility.set_message_token('STEP','1');
736: hr_utility.raise_error;
737: end if;
738: CLOSE C1;
731: if (C1%NOTFOUND) then
732: CLOSE C1;
733: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
734: hr_utility.set_message_token('PROCEDURE','Insert_Row');
735: hr_utility.set_message_token('STEP','1');
736: hr_utility.raise_error;
737: end if;
738: CLOSE C1;
739: --
732: CLOSE C1;
733: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
734: hr_utility.set_message_token('PROCEDURE','Insert_Row');
735: hr_utility.set_message_token('STEP','1');
736: hr_utility.raise_error;
737: end if;
738: CLOSE C1;
739: --
740: hr_utility.set_location(' Leaving:'||l_proc, 10);
736: hr_utility.raise_error;
737: end if;
738: CLOSE C1;
739: --
740: hr_utility.set_location(' Leaving:'||l_proc, 10);
741: --
742: END Insert_Row;
743: --
744: -- ----------------------------------------------------------------------------
821: Recinfo C%ROWTYPE;
822: l_proc VARCHAR2(72) := g_package||'Lock_Row';
823: BEGIN
824: --
825: hr_utility.set_location('Entering:'||l_proc, 5);
826: --
827: OPEN C;
828: FETCH C INTO Recinfo;
829: if (C%NOTFOUND) then
827: OPEN C;
828: FETCH C INTO Recinfo;
829: if (C%NOTFOUND) then
830: CLOSE C;
831: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
832: hr_utility.set_message_token('PROCEDURE','Lock_Row');
833: hr_utility.set_message_token('STEP','1');
834: hr_utility.raise_error;
835: end if;
828: FETCH C INTO Recinfo;
829: if (C%NOTFOUND) then
830: CLOSE C;
831: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
832: hr_utility.set_message_token('PROCEDURE','Lock_Row');
833: hr_utility.set_message_token('STEP','1');
834: hr_utility.raise_error;
835: end if;
836: CLOSE C;
829: if (C%NOTFOUND) then
830: CLOSE C;
831: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
832: hr_utility.set_message_token('PROCEDURE','Lock_Row');
833: hr_utility.set_message_token('STEP','1');
834: hr_utility.raise_error;
835: end if;
836: CLOSE C;
837: if (
830: CLOSE C;
831: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
832: hr_utility.set_message_token('PROCEDURE','Lock_Row');
833: hr_utility.set_message_token('STEP','1');
834: hr_utility.raise_error;
835: end if;
836: CLOSE C;
837: if (
838: ( (Recinfo.budget_value_id = X_Budget_Value_Id)
1042: FND_MESSAGE.Set_Name('FND', 'FORM_RECORD_CHANGED');
1043: APP_EXCEPTION.RAISE_EXCEPTION;
1044: end if;
1045: --
1046: hr_utility.set_location(' Leaving:'||l_proc, 10);
1047: --
1048: END Lock_Row;
1049:
1050: -- ----------------------------------------------------------------------------
1129: l_result VARCHAR2(255);
1130: l_budget_version_id NUMBER(15);
1131: BEGIN
1132: --
1133: hr_utility.set_location('Entering:'||l_proc, 5);
1134: --
1135: -- validate mandatory business_group
1136: hr_api.validate_bus_grp_id(X_Business_Group_Id);
1137: --
1322: budget_information30 = X_information30
1323: WHERE rowid = X_rowid;
1324:
1325: if (SQL%NOTFOUND) then
1326: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
1327: hr_utility.set_message_token('PROCEDURE','Update_Row');
1328: hr_utility.set_message_token('STEP','1');
1329: hr_utility.raise_error;
1330: end if;
1323: WHERE rowid = X_rowid;
1324:
1325: if (SQL%NOTFOUND) then
1326: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
1327: hr_utility.set_message_token('PROCEDURE','Update_Row');
1328: hr_utility.set_message_token('STEP','1');
1329: hr_utility.raise_error;
1330: end if;
1331: --
1324:
1325: if (SQL%NOTFOUND) then
1326: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
1327: hr_utility.set_message_token('PROCEDURE','Update_Row');
1328: hr_utility.set_message_token('STEP','1');
1329: hr_utility.raise_error;
1330: end if;
1331: --
1332: hr_utility.set_location(' Leaving:'||l_proc, 10);
1325: if (SQL%NOTFOUND) then
1326: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
1327: hr_utility.set_message_token('PROCEDURE','Update_Row');
1328: hr_utility.set_message_token('STEP','1');
1329: hr_utility.raise_error;
1330: end if;
1331: --
1332: hr_utility.set_location(' Leaving:'||l_proc, 10);
1333: --
1328: hr_utility.set_message_token('STEP','1');
1329: hr_utility.raise_error;
1330: end if;
1331: --
1332: hr_utility.set_location(' Leaving:'||l_proc, 10);
1333: --
1334: END Update_Row;
1335:
1336: -- ----------------------------------------------------------------------------
1343: l_ele_rowid VARCHAR2(255) := NULL;
1344:
1345: BEGIN
1346: --
1347: hr_utility.set_location('Entering:'||l_proc, 5);
1348: --
1349: -- Determine the budget_type of the parent record
1350: SELECT budget_version_id
1351: INTO l_budget_version_id
1376: END IF;
1377: --
1378: EXCEPTION
1379: WHEN NO_DATA_FOUND THEN
1380: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
1381: hr_utility.set_message_token('PROCEDURE','Delete_Row');
1382: hr_utility.set_message_token('STEP','1');
1383: hr_utility.raise_error;
1384: END;
1377: --
1378: EXCEPTION
1379: WHEN NO_DATA_FOUND THEN
1380: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
1381: hr_utility.set_message_token('PROCEDURE','Delete_Row');
1382: hr_utility.set_message_token('STEP','1');
1383: hr_utility.raise_error;
1384: END;
1385: END IF;
1378: EXCEPTION
1379: WHEN NO_DATA_FOUND THEN
1380: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
1381: hr_utility.set_message_token('PROCEDURE','Delete_Row');
1382: hr_utility.set_message_token('STEP','1');
1383: hr_utility.raise_error;
1384: END;
1385: END IF;
1386: --
1379: WHEN NO_DATA_FOUND THEN
1380: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
1381: hr_utility.set_message_token('PROCEDURE','Delete_Row');
1382: hr_utility.set_message_token('STEP','1');
1383: hr_utility.raise_error;
1384: END;
1385: END IF;
1386: --
1387: -- delete the value record
1388: DELETE FROM per_budget_values
1389: WHERE rowid = X_Rowid;
1390: --
1391: if (SQL%NOTFOUND) then
1392: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
1393: hr_utility.set_message_token('PROCEDURE','Delete_Row');
1394: hr_utility.set_message_token('STEP','1');
1395: hr_utility.raise_error;
1396: end if;
1389: WHERE rowid = X_Rowid;
1390: --
1391: if (SQL%NOTFOUND) then
1392: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
1393: hr_utility.set_message_token('PROCEDURE','Delete_Row');
1394: hr_utility.set_message_token('STEP','1');
1395: hr_utility.raise_error;
1396: end if;
1397: --
1390: --
1391: if (SQL%NOTFOUND) then
1392: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
1393: hr_utility.set_message_token('PROCEDURE','Delete_Row');
1394: hr_utility.set_message_token('STEP','1');
1395: hr_utility.raise_error;
1396: end if;
1397: --
1398: -- delete the parent record also
1391: if (SQL%NOTFOUND) then
1392: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
1393: hr_utility.set_message_token('PROCEDURE','Delete_Row');
1394: hr_utility.set_message_token('STEP','1');
1395: hr_utility.raise_error;
1396: end if;
1397: --
1398: -- delete the parent record also
1399: IF l_ele_rowid IS NOT NULL THEN
1401: DELETE FROM per_budget_elements
1402: WHERE rowid = l_ele_rowid;
1403: --
1404: IF (SQL%NOTFOUND) then
1405: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
1406: hr_utility.set_message_token('PROCEDURE','Delete_Row');
1407: hr_utility.set_message_token('STEP','1');
1408: hr_utility.raise_error;
1409: END IF;
1402: WHERE rowid = l_ele_rowid;
1403: --
1404: IF (SQL%NOTFOUND) then
1405: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
1406: hr_utility.set_message_token('PROCEDURE','Delete_Row');
1407: hr_utility.set_message_token('STEP','1');
1408: hr_utility.raise_error;
1409: END IF;
1410: END IF;
1403: --
1404: IF (SQL%NOTFOUND) then
1405: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
1406: hr_utility.set_message_token('PROCEDURE','Delete_Row');
1407: hr_utility.set_message_token('STEP','1');
1408: hr_utility.raise_error;
1409: END IF;
1410: END IF;
1411: --
1404: IF (SQL%NOTFOUND) then
1405: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
1406: hr_utility.set_message_token('PROCEDURE','Delete_Row');
1407: hr_utility.set_message_token('STEP','1');
1408: hr_utility.raise_error;
1409: END IF;
1410: END IF;
1411: --
1412: hr_utility.set_location(' Leaving:'||l_proc, 10);
1408: hr_utility.raise_error;
1409: END IF;
1410: END IF;
1411: --
1412: hr_utility.set_location(' Leaving:'||l_proc, 10);
1413: --
1414: END Delete_Row;
1415:
1416: END PER_BUDGET_VALUES_PKG;