28: fetch csr_exists into l_dummy;
29: l_exists := csr_exists%found;
30: close csr_exists;
31: if l_exists then
32: hr_utility.set_message(800,'PER_POS_GRD_DATES_EXISTS');
33: hr_utility.raise_error;
34: end if;
35:
36: end check_duplicate_valid_grade;
29: l_exists := csr_exists%found;
30: close csr_exists;
31: if l_exists then
32: hr_utility.set_message(800,'PER_POS_GRD_DATES_EXISTS');
33: hr_utility.raise_error;
34: end if;
35:
36: end check_duplicate_valid_grade;
37:
55:
56: -- valid grade date_to can not exceed position date_to.
57:
58: if nvl(X_Date_To,x_end_of_time) > nvl(x_pst1_date_end,x_end_of_time) then
59: hr_utility.set_message(801,'PER_7826_DEF_GRD_JOB_END_JOB');
60: hr_utility.set_message_token('DATE',x_pst1_date_end);
61: hr_utility.raise_error;
62: end if;
63:
56: -- valid grade date_to can not exceed position date_to.
57:
58: if nvl(X_Date_To,x_end_of_time) > nvl(x_pst1_date_end,x_end_of_time) then
59: hr_utility.set_message(801,'PER_7826_DEF_GRD_JOB_END_JOB');
60: hr_utility.set_message_token('DATE',x_pst1_date_end);
61: hr_utility.raise_error;
62: end if;
63:
64: -- valid grade date_to can not exceed grade date_to.
57:
58: if nvl(X_Date_To,x_end_of_time) > nvl(x_pst1_date_end,x_end_of_time) then
59: hr_utility.set_message(801,'PER_7826_DEF_GRD_JOB_END_JOB');
60: hr_utility.set_message_token('DATE',x_pst1_date_end);
61: hr_utility.raise_error;
62: end if;
63:
64: -- valid grade date_to can not exceed grade date_to.
65:
67: fetch csr_exists into l_date_to;
68: l_exists := csr_exists%found;
69: close csr_exists;
70: if l_exists then
71: hr_utility.set_message(801,'PER_7872_DEF_GRD_POS_END_POS');
72: hr_utility.set_message_token('DATE',l_date_to);
73: hr_utility.raise_error;
74: end if;
75:
68: l_exists := csr_exists%found;
69: close csr_exists;
70: if l_exists then
71: hr_utility.set_message(801,'PER_7872_DEF_GRD_POS_END_POS');
72: hr_utility.set_message_token('DATE',l_date_to);
73: hr_utility.raise_error;
74: end if;
75:
76: end check_valid_grade_date_to;
69: close csr_exists;
70: if l_exists then
71: hr_utility.set_message(801,'PER_7872_DEF_GRD_POS_END_POS');
72: hr_utility.set_message_token('DATE',l_date_to);
73: hr_utility.raise_error;
74: end if;
75:
76: end check_valid_grade_date_to;
77:
99:
100: -- valid grade date_from can not preceed grade date_from.
101:
102: if l_exists then
103: hr_utility.set_message(801,'PER_7871_DEF_POS_GRD_START_GRD');
104: hr_utility.set_message_token('DATE',l_date_from);
105: hr_utility.raise_error;
106: end if;
107:
100: -- valid grade date_from can not preceed grade date_from.
101:
102: if l_exists then
103: hr_utility.set_message(801,'PER_7871_DEF_POS_GRD_START_GRD');
104: hr_utility.set_message_token('DATE',l_date_from);
105: hr_utility.raise_error;
106: end if;
107:
108: -- valid grade date_from can not preceed position date_from.
101:
102: if l_exists then
103: hr_utility.set_message(801,'PER_7871_DEF_POS_GRD_START_GRD');
104: hr_utility.set_message_token('DATE',l_date_from);
105: hr_utility.raise_error;
106: end if;
107:
108: -- valid grade date_from can not preceed position date_from.
109:
107:
108: -- valid grade date_from can not preceed position date_from.
109:
110: else
111: hr_utility.set_message(801,'PER_7870_DEF_POS_GRD_START_POS');
112: hr_utility.set_message_token('DATE',x_pst1_date_effective);
113: hr_utility.raise_error;
114: end if;
115:
108: -- valid grade date_from can not preceed position date_from.
109:
110: else
111: hr_utility.set_message(801,'PER_7870_DEF_POS_GRD_START_POS');
112: hr_utility.set_message_token('DATE',x_pst1_date_effective);
113: hr_utility.raise_error;
114: end if;
115:
116: end check_valid_grade_date_from;
109:
110: else
111: hr_utility.set_message(801,'PER_7870_DEF_POS_GRD_START_POS');
112: hr_utility.set_message_token('DATE',x_pst1_date_effective);
113: hr_utility.raise_error;
114: end if;
115:
116: end check_valid_grade_date_from;
117:
162:
163: -- date to must be greater than date from.
164:
165: if x_date_from > nvl(x_date_to,x_end_of_time) then
166: hr_utility.set_message(801,'HR_6021_ALL_START_END_DATE');
167: hr_utility.raise_error;
168: end if;
169:
170: check_duplicate_valid_grade(X_Rowid ,
163: -- date to must be greater than date from.
164:
165: if x_date_from > nvl(x_date_to,x_end_of_time) then
166: hr_utility.set_message(801,'HR_6021_ALL_START_END_DATE');
167: hr_utility.raise_error;
168: end if;
169:
170: check_duplicate_valid_grade(X_Rowid ,
171: X_Business_Group_Id ,
254: OPEN C;
255: FETCH C INTO X_Rowid;
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','Insert_row');
260: hr_utility.set_message_token('STEP','1');
261: hr_utility.raise_error;
262: end if;
255: FETCH C INTO X_Rowid;
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','Insert_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','Insert_row');
260: hr_utility.set_message_token('STEP','1');
261: hr_utility.raise_error;
262: end if;
263: CLOSE C;
264: END Insert_Row;
257: CLOSE C;
258: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
259: hr_utility.set_message_token('PROCEDURE','Insert_row');
260: hr_utility.set_message_token('STEP','1');
261: hr_utility.raise_error;
262: end if;
263: CLOSE C;
264: END Insert_Row;
265: PROCEDURE Lock_Row(X_Rowid VARCHAR2,
304: OPEN C;
305: FETCH C INTO Recinfo;
306: if (C%NOTFOUND) then
307: CLOSE C;
308: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
309: hr_utility.set_message_token('PROCEDURE','lock_row');
310: hr_utility.set_message_token('STEP','1');
311: hr_utility.raise_error;
312: end if;
305: FETCH C INTO Recinfo;
306: if (C%NOTFOUND) then
307: CLOSE C;
308: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
309: hr_utility.set_message_token('PROCEDURE','lock_row');
310: hr_utility.set_message_token('STEP','1');
311: hr_utility.raise_error;
312: end if;
313: CLOSE C;
306: if (C%NOTFOUND) then
307: CLOSE C;
308: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
309: hr_utility.set_message_token('PROCEDURE','lock_row');
310: hr_utility.set_message_token('STEP','1');
311: hr_utility.raise_error;
312: end if;
313: CLOSE C;
314: --
307: CLOSE C;
308: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
309: hr_utility.set_message_token('PROCEDURE','lock_row');
310: hr_utility.set_message_token('STEP','1');
311: hr_utility.raise_error;
312: end if;
313: CLOSE C;
314: --
315: Recinfo.comments := rtrim(Recinfo.comments);
469:
470: -- date to must be greater than date from.
471:
472: if x_date_from > nvl(x_date_to,x_end_of_time) then
473: hr_utility.set_message(801,'HR_6021_ALL_START_END_DATE');
474: hr_utility.raise_error;
475: end if;
476:
477: check_duplicate_valid_grade(X_Rowid ,
470: -- date to must be greater than date from.
471:
472: if x_date_from > nvl(x_date_to,x_end_of_time) then
473: hr_utility.set_message(801,'HR_6021_ALL_START_END_DATE');
474: hr_utility.raise_error;
475: end if;
476:
477: check_duplicate_valid_grade(X_Rowid ,
478: X_Business_Group_Id ,
525: attribute20 = X_Attribute20
526: WHERE rowid = X_rowid;
527:
528: if (SQL%NOTFOUND) then
529: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
530: hr_utility.set_message_token('PROCEDURE','update_row');
531: hr_utility.set_message_token('STEP','1');
532: hr_utility.raise_error;
533: end if;
526: WHERE rowid = X_rowid;
527:
528: if (SQL%NOTFOUND) then
529: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
530: hr_utility.set_message_token('PROCEDURE','update_row');
531: hr_utility.set_message_token('STEP','1');
532: hr_utility.raise_error;
533: end if;
534:
527:
528: if (SQL%NOTFOUND) then
529: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
530: hr_utility.set_message_token('PROCEDURE','update_row');
531: hr_utility.set_message_token('STEP','1');
532: hr_utility.raise_error;
533: end if;
534:
535: END Update_Row;
528: if (SQL%NOTFOUND) then
529: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
530: hr_utility.set_message_token('PROCEDURE','update_row');
531: hr_utility.set_message_token('STEP','1');
532: hr_utility.raise_error;
533: end if;
534:
535: END Update_Row;
536:
539: DELETE FROM PER_VALID_GRADES
540: WHERE rowid = X_Rowid;
541:
542: if (SQL%NOTFOUND) then
543: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
544: hr_utility.set_message_token('PROCEDURE','delete_row');
545: hr_utility.set_message_token('STEP','1');
546: hr_utility.raise_error;
547: end if;
540: WHERE rowid = X_Rowid;
541:
542: if (SQL%NOTFOUND) then
543: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
544: hr_utility.set_message_token('PROCEDURE','delete_row');
545: hr_utility.set_message_token('STEP','1');
546: hr_utility.raise_error;
547: end if;
548: END Delete_Row;
541:
542: if (SQL%NOTFOUND) then
543: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
544: hr_utility.set_message_token('PROCEDURE','delete_row');
545: hr_utility.set_message_token('STEP','1');
546: hr_utility.raise_error;
547: end if;
548: END Delete_Row;
549:
542: if (SQL%NOTFOUND) then
543: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
544: hr_utility.set_message_token('PROCEDURE','delete_row');
545: hr_utility.set_message_token('STEP','1');
546: hr_utility.raise_error;
547: end if;
548: END Delete_Row;
549:
550: END PER_VALID_GRADES_PKG2;