44: fetch csr_p into l_dummy;
45: l_bool := csr_p%found;
46: close csr_p;
47: if l_bool then
48: hr_utility.set_message(801,'HR_6012_ROW_INSERTED');
49: hr_utility.raise_error;
50: end if;
51:
52: end Check_Unique_Row;
45: l_bool := csr_p%found;
46: close csr_p;
47: if l_bool then
48: hr_utility.set_message(801,'HR_6012_ROW_INSERTED');
49: hr_utility.raise_error;
50: end if;
51:
52: end Check_Unique_Row;
53:
68: fetch csr_pd into l_dummy;
69: l_bool := csr_pd%found;
70: close csr_pd;
71: if l_bool then
72: hr_utility.set_message(801,'PER_7415_POS_EXISTS');
73: hr_utility.raise_error;
74: end if;
75:
76: end Check_Descriptor;
69: l_bool := csr_pd%found;
70: close csr_pd;
71: if l_bool then
72: hr_utility.set_message(801,'PER_7415_POS_EXISTS');
73: hr_utility.raise_error;
74: end if;
75:
76: end Check_Descriptor;
77:
100: exception when no_data_found then
101: null;
102: end;
103: if l_exists = '1' then
104: hr_utility.set_message(801,'PER_7417_POS_ASSIGNMENT');
105: hr_utility.raise_error;
106: end if;
107:
108: l_exists := NULL;
101: null;
102: end;
103: if l_exists = '1' then
104: hr_utility.set_message(801,'PER_7417_POS_ASSIGNMENT');
105: hr_utility.raise_error;
106: end if;
107:
108: l_exists := NULL;
109:
119: null;
120: end;
121:
122: if l_exists = '1' then
123: hr_utility.set_message(801,'PER_7863_DEL_POS_LINK');
124: hr_utility.set_message_token('FORM','PERWSDPO');
125: hr_utility.set_message_token('BLOCK','PST1');
126: hr_utility.set_message_token('TRIGGER','on-delete');
127: hr_utility.set_message_token('STEP','4');
120: end;
121:
122: if l_exists = '1' then
123: hr_utility.set_message(801,'PER_7863_DEL_POS_LINK');
124: hr_utility.set_message_token('FORM','PERWSDPO');
125: hr_utility.set_message_token('BLOCK','PST1');
126: hr_utility.set_message_token('TRIGGER','on-delete');
127: hr_utility.set_message_token('STEP','4');
128: hr_utility.raise_error;
121:
122: if l_exists = '1' then
123: hr_utility.set_message(801,'PER_7863_DEL_POS_LINK');
124: hr_utility.set_message_token('FORM','PERWSDPO');
125: hr_utility.set_message_token('BLOCK','PST1');
126: hr_utility.set_message_token('TRIGGER','on-delete');
127: hr_utility.set_message_token('STEP','4');
128: hr_utility.raise_error;
129: end if;
122: if l_exists = '1' then
123: hr_utility.set_message(801,'PER_7863_DEL_POS_LINK');
124: hr_utility.set_message_token('FORM','PERWSDPO');
125: hr_utility.set_message_token('BLOCK','PST1');
126: hr_utility.set_message_token('TRIGGER','on-delete');
127: hr_utility.set_message_token('STEP','4');
128: hr_utility.raise_error;
129: end if;
130:
123: hr_utility.set_message(801,'PER_7863_DEL_POS_LINK');
124: hr_utility.set_message_token('FORM','PERWSDPO');
125: hr_utility.set_message_token('BLOCK','PST1');
126: hr_utility.set_message_token('TRIGGER','on-delete');
127: hr_utility.set_message_token('STEP','4');
128: hr_utility.raise_error;
129: end if;
130:
131: l_exists := NULL;
124: hr_utility.set_message_token('FORM','PERWSDPO');
125: hr_utility.set_message_token('BLOCK','PST1');
126: hr_utility.set_message_token('TRIGGER','on-delete');
127: hr_utility.set_message_token('STEP','4');
128: hr_utility.raise_error;
129: end if;
130:
131: l_exists := NULL;
132:
140: exception when no_data_found then
141: null;
142: end;
143: if l_exists = '1' then
144: hr_utility.set_message(801,'PER_7862_DEL_POS_BUD');
145: hr_utility.set_message_token('FORM','PERWSDPO');
146: hr_utility.set_message_token('BLOCK','PST1');
147: hr_utility.set_message_token('TRIGGER','on-delete');
148: hr_utility.set_message_token('STEP','6');
141: null;
142: end;
143: if l_exists = '1' then
144: hr_utility.set_message(801,'PER_7862_DEL_POS_BUD');
145: hr_utility.set_message_token('FORM','PERWSDPO');
146: hr_utility.set_message_token('BLOCK','PST1');
147: hr_utility.set_message_token('TRIGGER','on-delete');
148: hr_utility.set_message_token('STEP','6');
149: hr_utility.raise_error;
142: end;
143: if l_exists = '1' then
144: hr_utility.set_message(801,'PER_7862_DEL_POS_BUD');
145: hr_utility.set_message_token('FORM','PERWSDPO');
146: hr_utility.set_message_token('BLOCK','PST1');
147: hr_utility.set_message_token('TRIGGER','on-delete');
148: hr_utility.set_message_token('STEP','6');
149: hr_utility.raise_error;
150: end if;
143: if l_exists = '1' then
144: hr_utility.set_message(801,'PER_7862_DEL_POS_BUD');
145: hr_utility.set_message_token('FORM','PERWSDPO');
146: hr_utility.set_message_token('BLOCK','PST1');
147: hr_utility.set_message_token('TRIGGER','on-delete');
148: hr_utility.set_message_token('STEP','6');
149: hr_utility.raise_error;
150: end if;
151: l_exists := NULL;
144: hr_utility.set_message(801,'PER_7862_DEL_POS_BUD');
145: hr_utility.set_message_token('FORM','PERWSDPO');
146: hr_utility.set_message_token('BLOCK','PST1');
147: hr_utility.set_message_token('TRIGGER','on-delete');
148: hr_utility.set_message_token('STEP','6');
149: hr_utility.raise_error;
150: end if;
151: l_exists := NULL;
152: begin
145: hr_utility.set_message_token('FORM','PERWSDPO');
146: hr_utility.set_message_token('BLOCK','PST1');
147: hr_utility.set_message_token('TRIGGER','on-delete');
148: hr_utility.set_message_token('STEP','6');
149: hr_utility.raise_error;
150: end if;
151: l_exists := NULL;
152: begin
153: select '1'
159: exception when no_data_found then
160: null;
161: end;
162: if l_exists = '1' then
163: hr_utility.set_message(801,'PER_7861_DEL_POS_REC_ACT');
164: hr_utility.set_message_token('FORM','PERWSDPO');
165: hr_utility.set_message_token('BLOCK','PST1');
166: hr_utility.set_message_token('STEP','8');
167: hr_utility.raise_error;
160: null;
161: end;
162: if l_exists = '1' then
163: hr_utility.set_message(801,'PER_7861_DEL_POS_REC_ACT');
164: hr_utility.set_message_token('FORM','PERWSDPO');
165: hr_utility.set_message_token('BLOCK','PST1');
166: hr_utility.set_message_token('STEP','8');
167: hr_utility.raise_error;
168: end if;
161: end;
162: if l_exists = '1' then
163: hr_utility.set_message(801,'PER_7861_DEL_POS_REC_ACT');
164: hr_utility.set_message_token('FORM','PERWSDPO');
165: hr_utility.set_message_token('BLOCK','PST1');
166: hr_utility.set_message_token('STEP','8');
167: hr_utility.raise_error;
168: end if;
169:
162: if l_exists = '1' then
163: hr_utility.set_message(801,'PER_7861_DEL_POS_REC_ACT');
164: hr_utility.set_message_token('FORM','PERWSDPO');
165: hr_utility.set_message_token('BLOCK','PST1');
166: hr_utility.set_message_token('STEP','8');
167: hr_utility.raise_error;
168: end if;
169:
170: begin
163: hr_utility.set_message(801,'PER_7861_DEL_POS_REC_ACT');
164: hr_utility.set_message_token('FORM','PERWSDPO');
165: hr_utility.set_message_token('BLOCK','PST1');
166: hr_utility.set_message_token('STEP','8');
167: hr_utility.raise_error;
168: end if;
169:
170: begin
171: select e.pos_structure_element_id
199: null;
200: end;
201:
202: if l_exists = '1' then
203: hr_utility.set_message(801,'PER_7416_POS_IN_POS_HIER');
204: hr_utility.raise_error;
205: end if;
206: end if;
207:
200: end;
201:
202: if l_exists = '1' then
203: hr_utility.set_message(801,'PER_7416_POS_IN_POS_HIER');
204: hr_utility.raise_error;
205: end if;
206: end if;
207:
208: l_exists := NULL;
219: null;
220: end;
221:
222: if l_exists = '1' then
223: hr_utility.set_message(801,'PER_7865_DEF_POS_DEL_GRADE');
224: hr_utility.raise_error;
225: end if;
226:
227: l_exists := NULL;
220: end;
221:
222: if l_exists = '1' then
223: hr_utility.set_message(801,'PER_7865_DEF_POS_DEL_GRADE');
224: hr_utility.raise_error;
225: end if;
226:
227: l_exists := NULL;
228:
237: null;
238: end;
239:
240: if l_exists = '1' then
241: hr_utility.set_message(801,'PER_7866_DEF_POS_DEL_REQ');
242: hr_utility.raise_error;
243: end if;
244:
245:
238: end;
239:
240: if l_exists = '1' then
241: hr_utility.set_message(801,'PER_7866_DEF_POS_DEL_REQ');
242: hr_utility.raise_error;
243: end if;
244:
245:
246: l_exists := NULL;
256: null;
257: end;
258:
259: if l_exists = '1' then
260: hr_utility.set_message(801,'PER_7867_DEF_POS_DEL_EVAL');
261: hr_utility.raise_error;
262: end if;
263:
264: l_exists := NULL;
257: end;
258:
259: if l_exists = '1' then
260: hr_utility.set_message(801,'PER_7867_DEF_POS_DEL_EVAL');
261: hr_utility.raise_error;
262: end if;
263:
264: l_exists := NULL;
265:
274: null;
275: end;
276:
277: if l_exists = '1' then
278: hr_utility.set_message(801,'PER_7996_POS_SUCCESSOR_REF');
279: hr_utility.raise_error;
280: end if;
281:
282: l_exists := NULL;
275: end;
276:
277: if l_exists = '1' then
278: hr_utility.set_message(801,'PER_7996_POS_SUCCESSOR_REF');
279: hr_utility.raise_error;
280: end if;
281:
282: l_exists := NULL;
283:
292: null;
293: end;
294:
295: if l_exists = '1' then
296: hr_utility.set_message(801,'PER_7997_POS_RELIEF_REF');
297: hr_utility.raise_error;
298: end if;
299:
300: l_exists := NULL;
293: end;
294:
295: if l_exists = '1' then
296: hr_utility.set_message(801,'PER_7997_POS_RELIEF_REF');
297: hr_utility.raise_error;
298: end if;
299:
300: l_exists := NULL;
301:
310: null;
311: end;
312:
313: if l_exists = '1' then
314: hr_utility.set_message(800,'HR_52776_NOT_DEL_MM_POSITIONS');
315: hr_utility.raise_error;
316: end if;
317:
318: end if;
311: end;
312:
313: if l_exists = '1' then
314: hr_utility.set_message(800,'HR_52776_NOT_DEL_MM_POSITIONS');
315: hr_utility.raise_error;
316: end if;
317:
318: end if;
319:
527: OPEN C;
528: FETCH C INTO X_Rowid;
529: if (C%NOTFOUND) then
530: CLOSE C;
531: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
532: hr_utility.set_message_token('PROCEDURE','Insert_row');
533: hr_utility.set_message_token('STEP','1');
534: hr_utility.raise_error;
535: end if;
528: FETCH C INTO X_Rowid;
529: if (C%NOTFOUND) then
530: CLOSE C;
531: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
532: hr_utility.set_message_token('PROCEDURE','Insert_row');
533: hr_utility.set_message_token('STEP','1');
534: hr_utility.raise_error;
535: end if;
536: CLOSE C;
529: if (C%NOTFOUND) then
530: CLOSE C;
531: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
532: hr_utility.set_message_token('PROCEDURE','Insert_row');
533: hr_utility.set_message_token('STEP','1');
534: hr_utility.raise_error;
535: end if;
536: CLOSE C;
537:
530: CLOSE C;
531: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
532: hr_utility.set_message_token('PROCEDURE','Insert_row');
533: hr_utility.set_message_token('STEP','1');
534: hr_utility.raise_error;
535: end if;
536: CLOSE C;
537:
538: if X_View_All_Psts <> 'Y' then
646: OPEN C;
647: FETCH C INTO Recinfo;
648: if (C%NOTFOUND) then
649: CLOSE C;
650: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
651: hr_utility.set_message_token('PROCEDURE','Lock_row');
652: hr_utility.set_message_token('STEP','1');
653: hr_utility.raise_error;
654: end if;
647: FETCH C INTO Recinfo;
648: if (C%NOTFOUND) then
649: CLOSE C;
650: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
651: hr_utility.set_message_token('PROCEDURE','Lock_row');
652: hr_utility.set_message_token('STEP','1');
653: hr_utility.raise_error;
654: end if;
655: CLOSE C;
648: if (C%NOTFOUND) then
649: CLOSE C;
650: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
651: hr_utility.set_message_token('PROCEDURE','Lock_row');
652: hr_utility.set_message_token('STEP','1');
653: hr_utility.raise_error;
654: end if;
655: CLOSE C;
656: --
649: CLOSE C;
650: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
651: hr_utility.set_message_token('PROCEDURE','Lock_row');
652: hr_utility.set_message_token('STEP','1');
653: hr_utility.raise_error;
654: end if;
655: CLOSE C;
656: --
657: Recinfo.attribute15 := rtrim(Recinfo.attribute15);
912: attribute20 = X_Attribute20
913: WHERE rowid = X_rowid;
914:
915: if (SQL%NOTFOUND) then
916: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
917: hr_utility.set_message_token('PROCEDURE','Update_Row');
918: hr_utility.set_message_token('STEP','1');
919: hr_utility.raise_error;
920: end if;
913: WHERE rowid = X_rowid;
914:
915: if (SQL%NOTFOUND) then
916: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
917: hr_utility.set_message_token('PROCEDURE','Update_Row');
918: hr_utility.set_message_token('STEP','1');
919: hr_utility.raise_error;
920: end if;
921: */
914:
915: if (SQL%NOTFOUND) then
916: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
917: hr_utility.set_message_token('PROCEDURE','Update_Row');
918: hr_utility.set_message_token('STEP','1');
919: hr_utility.raise_error;
920: end if;
921: */
922: END Update_Row;
915: if (SQL%NOTFOUND) then
916: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
917: hr_utility.set_message_token('PROCEDURE','Update_Row');
918: hr_utility.set_message_token('STEP','1');
919: hr_utility.raise_error;
920: end if;
921: */
922: END Update_Row;
923:
945: DELETE FROM PER_POSITIONS
946: WHERE rowid = X_Rowid;
947:
948: if (SQL%NOTFOUND) then
949: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
950: hr_utility.set_message_token('PROCEDURE','Delete_Row');
951: hr_utility.set_message_token('STEP','1');
952: hr_utility.raise_error;
953: end if;
946: WHERE rowid = X_Rowid;
947:
948: if (SQL%NOTFOUND) then
949: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
950: hr_utility.set_message_token('PROCEDURE','Delete_Row');
951: hr_utility.set_message_token('STEP','1');
952: hr_utility.raise_error;
953: end if;
954: */
947:
948: if (SQL%NOTFOUND) then
949: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
950: hr_utility.set_message_token('PROCEDURE','Delete_Row');
951: hr_utility.set_message_token('STEP','1');
952: hr_utility.raise_error;
953: end if;
954: */
955: END Delete_Row;
948: if (SQL%NOTFOUND) then
949: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
950: hr_utility.set_message_token('PROCEDURE','Delete_Row');
951: hr_utility.set_message_token('STEP','1');
952: hr_utility.raise_error;
953: end if;
954: */
955: END Delete_Row;
956: --
1024: THEN
1025: --
1026: -- error and abort
1027: --
1028: hr_utility.set_message(801,'PER_7995_POS_GRADE_BEFORE_POS');
1029: hr_utility.raise_error;
1030: --
1031: END IF;
1032: --
1025: --
1026: -- error and abort
1027: --
1028: hr_utility.set_message(801,'PER_7995_POS_GRADE_BEFORE_POS');
1029: hr_utility.raise_error;
1030: --
1031: END IF;
1032: --
1033: END check_date_effective;
1088: fetch csr_date_to into g_dummy_number;
1089: p_before_date_to := csr_date_to%FOUND;
1090: close csr_date_to;
1091: --
1092: hr_utility.set_location('per_positions_pkg.check_valid_grades', 1);
1093: --
1094: open csr_date_from;
1095: fetch csr_date_from into g_dummy_number;
1096: p_before_date_from := csr_date_from%FOUND;
1095: fetch csr_date_from into g_dummy_number;
1096: p_before_date_from := csr_date_from%FOUND;
1097: close csr_date_from;
1098: --
1099: hr_utility.set_location('per_positions_pkg.check_valid_grades', 2);
1100: --
1101: open csr_end_date_blank;
1102: fetch csr_end_date_blank into g_dummy_number;
1103: p_end_date_blank := csr_end_date_blank%FOUND;
1102: fetch csr_end_date_blank into g_dummy_number;
1103: p_end_date_blank := csr_end_date_blank%FOUND;
1104: close csr_end_date_blank;
1105: --
1106: hr_utility.set_location('per_positions_pkg.check_valid_grades', 3);
1107: --
1108: open csr_after_date_to;
1109: fetch csr_after_date_to into g_dummy_number;
1110: p_after_date_to := csr_after_date_to%FOUND;
1109: fetch csr_after_date_to into g_dummy_number;
1110: p_after_date_to := csr_after_date_to%FOUND;
1111: close csr_after_date_to;
1112: --
1113: hr_utility.set_location('per_positions_pkg.check_valid_grades', 4);
1114: --
1115: end check_valid_grades;
1116: --
1117: PROCEDURE maintain_valid_grades(p_position_id NUMBER,
1140: vg.position_id = p_position_id
1141: and nvl(vg.date_to, p_end_of_time) > p_date_end;
1142: --
1143: if (SQL%NOTFOUND) then
1144: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
1145: hr_utility.set_message_token('PROCEDURE','maintain_valid_grades');
1146: hr_utility.set_message_token('STEP','1');
1147: hr_utility.raise_error;
1148: end if;
1141: and nvl(vg.date_to, p_end_of_time) > p_date_end;
1142: --
1143: if (SQL%NOTFOUND) then
1144: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
1145: hr_utility.set_message_token('PROCEDURE','maintain_valid_grades');
1146: hr_utility.set_message_token('STEP','1');
1147: hr_utility.raise_error;
1148: end if;
1149: --
1142: --
1143: if (SQL%NOTFOUND) then
1144: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
1145: hr_utility.set_message_token('PROCEDURE','maintain_valid_grades');
1146: hr_utility.set_message_token('STEP','1');
1147: hr_utility.raise_error;
1148: end if;
1149: --
1150: END IF;
1143: if (SQL%NOTFOUND) then
1144: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
1145: hr_utility.set_message_token('PROCEDURE','maintain_valid_grades');
1146: hr_utility.set_message_token('STEP','1');
1147: hr_utility.raise_error;
1148: end if;
1149: --
1150: END IF;
1151: --
1160: where position_id = p_position_id
1161: and date_from > p_date_end;
1162: --
1163: if (SQL%NOTFOUND) then
1164: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
1165: hr_utility.set_message_token('PROCEDURE','maintain_valid_grades');
1166: hr_utility.set_message_token('STEP','2');
1167: hr_utility.raise_error;
1168: end if;
1161: and date_from > p_date_end;
1162: --
1163: if (SQL%NOTFOUND) then
1164: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
1165: hr_utility.set_message_token('PROCEDURE','maintain_valid_grades');
1166: hr_utility.set_message_token('STEP','2');
1167: hr_utility.raise_error;
1168: end if;
1169: --
1162: --
1163: if (SQL%NOTFOUND) then
1164: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
1165: hr_utility.set_message_token('PROCEDURE','maintain_valid_grades');
1166: hr_utility.set_message_token('STEP','2');
1167: hr_utility.raise_error;
1168: end if;
1169: --
1170: END IF;
1163: if (SQL%NOTFOUND) then
1164: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
1165: hr_utility.set_message_token('PROCEDURE','maintain_valid_grades');
1166: hr_utility.set_message_token('STEP','2');
1167: hr_utility.raise_error;
1168: end if;
1169: --
1170: END IF;
1171: --
1196: from per_positions p
1197: where p.position_id = p_position_id);
1198: --
1199: if (SQL%NOTFOUND) then
1200: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
1201: hr_utility.set_message_token('PROCEDURE','maintain_valid_grades');
1202: hr_utility.set_message_token('STEP','3');
1203: hr_utility.raise_error;
1204: end if;
1197: where p.position_id = p_position_id);
1198: --
1199: if (SQL%NOTFOUND) then
1200: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
1201: hr_utility.set_message_token('PROCEDURE','maintain_valid_grades');
1202: hr_utility.set_message_token('STEP','3');
1203: hr_utility.raise_error;
1204: end if;
1205: END IF;
1198: --
1199: if (SQL%NOTFOUND) then
1200: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
1201: hr_utility.set_message_token('PROCEDURE','maintain_valid_grades');
1202: hr_utility.set_message_token('STEP','3');
1203: hr_utility.raise_error;
1204: end if;
1205: END IF;
1206: --
1199: if (SQL%NOTFOUND) then
1200: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
1201: hr_utility.set_message_token('PROCEDURE','maintain_valid_grades');
1202: hr_utility.set_message_token('STEP','3');
1203: hr_utility.raise_error;
1204: end if;
1205: END IF;
1206: --
1207: end maintain_valid_grades;