162: OPEN C;
163: FETCH C INTO X_Rowid;
164: if (C%NOTFOUND) then
165: CLOSE C;
166: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
167: hr_utility.set_message_token('PROCEDURE','PER_ABT_PKG.Insert_Row');
168: hr_utility.set_message_token('STEP','1');
169: hr_utility.raise_error;
170: end if;
163: FETCH C INTO X_Rowid;
164: if (C%NOTFOUND) then
165: CLOSE C;
166: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
167: hr_utility.set_message_token('PROCEDURE','PER_ABT_PKG.Insert_Row');
168: hr_utility.set_message_token('STEP','1');
169: hr_utility.raise_error;
170: end if;
171: CLOSE C;
164: if (C%NOTFOUND) then
165: CLOSE C;
166: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
167: hr_utility.set_message_token('PROCEDURE','PER_ABT_PKG.Insert_Row');
168: hr_utility.set_message_token('STEP','1');
169: hr_utility.raise_error;
170: end if;
171: CLOSE C;
172: --
165: CLOSE C;
166: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
167: hr_utility.set_message_token('PROCEDURE','PER_ABT_PKG.Insert_Row');
168: hr_utility.set_message_token('STEP','1');
169: hr_utility.raise_error;
170: end if;
171: CLOSE C;
172: --
173: hrdyndbi.create_absence_dict(X_ABSENCE_ATTENDANCE_TYPE_ID);
219: OPEN C;
220: FETCH C INTO Recinfo;
221: if (C%NOTFOUND) then
222: CLOSE C;
223: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
224: hr_utility.set_message_token('PROCEDURE','PER_ABT_PKG.Lock_Row');
225: hr_utility.set_message_token('STEP','1');
226: hr_utility.raise_error;
227: end if;
220: FETCH C INTO Recinfo;
221: if (C%NOTFOUND) then
222: CLOSE C;
223: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
224: hr_utility.set_message_token('PROCEDURE','PER_ABT_PKG.Lock_Row');
225: hr_utility.set_message_token('STEP','1');
226: hr_utility.raise_error;
227: end if;
228: CLOSE C;
221: if (C%NOTFOUND) then
222: CLOSE C;
223: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
224: hr_utility.set_message_token('PROCEDURE','PER_ABT_PKG.Lock_Row');
225: hr_utility.set_message_token('STEP','1');
226: hr_utility.raise_error;
227: end if;
228: CLOSE C;
229: --
222: CLOSE C;
223: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
224: hr_utility.set_message_token('PROCEDURE','PER_ABT_PKG.Lock_Row');
225: hr_utility.set_message_token('STEP','1');
226: hr_utility.raise_error;
227: end if;
228: CLOSE C;
229: --
230: Recinfo.Name := rtrim(Recinfo.Name);
463: attribute20 = X_Attribute20
464: WHERE rowid = X_rowid;
465: --
466: if (SQL%NOTFOUND) then
467: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
468: hr_utility.set_message_token('PROCEDURE','PER_ABT_PKG.Update_Row');
469: hr_utility.set_message_token('STEP','1');
470: hr_utility.raise_error;
471: end if;
464: WHERE rowid = X_rowid;
465: --
466: if (SQL%NOTFOUND) then
467: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
468: hr_utility.set_message_token('PROCEDURE','PER_ABT_PKG.Update_Row');
469: hr_utility.set_message_token('STEP','1');
470: hr_utility.raise_error;
471: end if;
472: --
465: --
466: if (SQL%NOTFOUND) then
467: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
468: hr_utility.set_message_token('PROCEDURE','PER_ABT_PKG.Update_Row');
469: hr_utility.set_message_token('STEP','1');
470: hr_utility.raise_error;
471: end if;
472: --
473: if X_Name <> X_Old_Name then
466: if (SQL%NOTFOUND) then
467: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
468: hr_utility.set_message_token('PROCEDURE','PER_ABT_PKG.Update_Row');
469: hr_utility.set_message_token('STEP','1');
470: hr_utility.raise_error;
471: end if;
472: --
473: if X_Name <> X_Old_Name then
474: hrdyndbi.create_absence_dict(X_ABSENCE_ATTENDANCE_TYPE_ID);
479: PROCEDURE Delete_Row(X_Rowid VARCHAR2
480: ,X_Absence_attendance_type_id NUMBER) IS
481: BEGIN
482: --
483: hr_utility.set_location('per_abt_pkg.delete_row',1);
484: per_abt_pkg.abt_del_validation(X_Absence_attendance_type_id);
485: --
486: hr_utility.set_location('per_abt_pkg.delete_row',2);
487: hrdyndbi.delete_absence_dict(X_Absence_attendance_type_id);
482: --
483: hr_utility.set_location('per_abt_pkg.delete_row',1);
484: per_abt_pkg.abt_del_validation(X_Absence_attendance_type_id);
485: --
486: hr_utility.set_location('per_abt_pkg.delete_row',2);
487: hrdyndbi.delete_absence_dict(X_Absence_attendance_type_id);
488: --
489: hr_utility.set_location('per_abt_pkg.delete_row',3);
490: DELETE FROM PER_ABSENCE_ATTENDANCE_TYPES
485: --
486: hr_utility.set_location('per_abt_pkg.delete_row',2);
487: hrdyndbi.delete_absence_dict(X_Absence_attendance_type_id);
488: --
489: hr_utility.set_location('per_abt_pkg.delete_row',3);
490: DELETE FROM PER_ABSENCE_ATTENDANCE_TYPES
491: WHERE rowid = X_Rowid;
492: --
493: if (SQL%NOTFOUND) then
490: DELETE FROM PER_ABSENCE_ATTENDANCE_TYPES
491: WHERE rowid = X_Rowid;
492: --
493: if (SQL%NOTFOUND) then
494: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
495: hr_utility.set_message_token('PROCEDURE','PER_ABT_PKG.Delete_Row');
496: hr_utility.set_message_token('STEP','1');
497: hr_utility.raise_error;
498: end if;
491: WHERE rowid = X_Rowid;
492: --
493: if (SQL%NOTFOUND) then
494: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
495: hr_utility.set_message_token('PROCEDURE','PER_ABT_PKG.Delete_Row');
496: hr_utility.set_message_token('STEP','1');
497: hr_utility.raise_error;
498: end if;
499: END Delete_Row;
492: --
493: if (SQL%NOTFOUND) then
494: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
495: hr_utility.set_message_token('PROCEDURE','PER_ABT_PKG.Delete_Row');
496: hr_utility.set_message_token('STEP','1');
497: hr_utility.raise_error;
498: end if;
499: END Delete_Row;
500: --
493: if (SQL%NOTFOUND) then
494: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
495: hr_utility.set_message_token('PROCEDURE','PER_ABT_PKG.Delete_Row');
496: hr_utility.set_message_token('STEP','1');
497: hr_utility.raise_error;
498: end if;
499: END Delete_Row;
500: --
501: --
512: abt_rec c%rowtype;
513: --
514: begin
515: --
516: hr_utility.set_location('per_abt_pkg.check_unique_name',1);
517: OPEN C;
518: FETCH C INTO ABT_REC;
519: if (C%FOUND) then
520: CLOSE C;
517: OPEN C;
518: FETCH C INTO ABT_REC;
519: if (C%FOUND) then
520: CLOSE C;
521: hr_utility.set_message(801,'PER_7806_DEF_ABS_EXISTS');
522: hr_utility.raise_error;
523: end if;
524: CLOSE C;
525:
518: FETCH C INTO ABT_REC;
519: if (C%FOUND) then
520: CLOSE C;
521: hr_utility.set_message(801,'PER_7806_DEF_ABS_EXISTS');
522: hr_utility.raise_error;
523: end if;
524: CLOSE C;
525:
526: end check_unique_name;
546: abs_rec c2%rowtype;
547: --
548: begin
549: --
550: hr_utility.set_location('per_abt_pkg.validate_date_effective',1);
551: if p_element_type_id is not null then
552: OPEN C1;
553: FETCH C1 INTO ELT_REC;
554: if (C1%NOTFOUND) then
552: OPEN C1;
553: FETCH C1 INTO ELT_REC;
554: if (C1%NOTFOUND) then
555: CLOSE C1;
556: hr_utility.set_message(801,'HR_6789_ABS_NO_CHANGE_DATE');
557: hr_utility.raise_error;
558: end if;
559: CLOSE C1;
560: end if;
553: FETCH C1 INTO ELT_REC;
554: if (C1%NOTFOUND) then
555: CLOSE C1;
556: hr_utility.set_message(801,'HR_6789_ABS_NO_CHANGE_DATE');
557: hr_utility.raise_error;
558: end if;
559: CLOSE C1;
560: end if;
561: --
558: end if;
559: CLOSE C1;
560: end if;
561: --
562: hr_utility.set_location('per_abt_pkg.validate_date_effective',2);
563: if p_absence_attendance_type_id is not null then
564: OPEN C2;
565: FETCH C2 INTO ABS_REC;
566: if (C2%FOUND) then
564: OPEN C2;
565: FETCH C2 INTO ABS_REC;
566: if (C2%FOUND) then
567: CLOSE C2;
568: hr_utility.set_message(801,'HR_6790_ABS_NO_CHANGE_2');
569: hr_utility.raise_error;
570: end if;
571: CLOSE C2;
572: end if;
565: FETCH C2 INTO ABS_REC;
566: if (C2%FOUND) then
567: CLOSE C2;
568: hr_utility.set_message(801,'HR_6790_ABS_NO_CHANGE_2');
569: hr_utility.raise_error;
570: end if;
571: CLOSE C2;
572: end if;
573: --
619: --
620: /* If there is only one row returned by this statement then default the
621: values otherwise nullify the values */
622: --
623: hr_utility.set_location('per_abt_pkg.validate_element_name',1);
624: p_default_value := 'N';
625: OPEN C;
626: FETCH C INTO IPV_REC2;
627: if (C%FOUND) then
668: LKP_REC c%rowtype;
669: --
670: begin
671: --
672: hr_utility.set_location('per_abt_pkg.get_uom',1);
673: OPEN C;
674: FETCH C INTO LKP_REC;
675: if (C%FOUND) then
676: p_hours_or_days := LKP_REC.lookup_code;
685: ,p_input_value_id NUMBER
686: ,p_element_type_id NUMBER) is
687: begin
688: --
689: hr_utility.set_location('per_abt_pkg.ensure_fields_populated',1);
690: if p_element_type_id is not null then
691: --
692: if p_input_value_id is null then
693: hr_utility.set_message(801,'HR_7572_ALL_MAN_VAL_FIELD');
689: hr_utility.set_location('per_abt_pkg.ensure_fields_populated',1);
690: if p_element_type_id is not null then
691: --
692: if p_input_value_id is null then
693: hr_utility.set_message(801,'HR_7572_ALL_MAN_VAL_FIELD');
694: hr_utility.raise_error;
695: end if;
696: if p_hours_or_days is null then
697: hr_utility.set_message(801,'HR_7582_ALL_MAN_HOU_FIELD');
690: if p_element_type_id is not null then
691: --
692: if p_input_value_id is null then
693: hr_utility.set_message(801,'HR_7572_ALL_MAN_VAL_FIELD');
694: hr_utility.raise_error;
695: end if;
696: if p_hours_or_days is null then
697: hr_utility.set_message(801,'HR_7582_ALL_MAN_HOU_FIELD');
698: hr_utility.raise_error;
693: hr_utility.set_message(801,'HR_7572_ALL_MAN_VAL_FIELD');
694: hr_utility.raise_error;
695: end if;
696: if p_hours_or_days is null then
697: hr_utility.set_message(801,'HR_7582_ALL_MAN_HOU_FIELD');
698: hr_utility.raise_error;
699: end if;
700: if p_inc_or_dec_flag is null then
701: hr_utility.set_message(801,'HR_7583_ALL_MAN_INC_FIELD');
694: hr_utility.raise_error;
695: end if;
696: if p_hours_or_days is null then
697: hr_utility.set_message(801,'HR_7582_ALL_MAN_HOU_FIELD');
698: hr_utility.raise_error;
699: end if;
700: if p_inc_or_dec_flag is null then
701: hr_utility.set_message(801,'HR_7583_ALL_MAN_INC_FIELD');
702: hr_utility.raise_error;
697: hr_utility.set_message(801,'HR_7582_ALL_MAN_HOU_FIELD');
698: hr_utility.raise_error;
699: end if;
700: if p_inc_or_dec_flag is null then
701: hr_utility.set_message(801,'HR_7583_ALL_MAN_INC_FIELD');
702: hr_utility.raise_error;
703: end if;
704: end if;
705: --
698: hr_utility.raise_error;
699: end if;
700: if p_inc_or_dec_flag is null then
701: hr_utility.set_message(801,'HR_7583_ALL_MAN_INC_FIELD');
702: hr_utility.raise_error;
703: end if;
704: end if;
705: --
706: end ensure_fields_populated;
721: ipv_rec c%rowtype;
722: --
723: begin
724: --
725: hr_utility.set_location('per_abt_pkg.check_inputs_required',1);
726: OPEN C;
727: FETCH C INTO IPV_REC;
728: if (C%FOUND) then
729: CLOSE C;
726: OPEN C;
727: FETCH C INTO IPV_REC;
728: if (C%FOUND) then
729: CLOSE C;
730: hr_utility.set_message(801,'PER_7717_ABS_IPVAL_EXISTS');
731: hr_utility.raise_error;
732: end if;
733: CLOSE C;
734: --
727: FETCH C INTO IPV_REC;
728: if (C%FOUND) then
729: CLOSE C;
730: hr_utility.set_message(801,'PER_7717_ABS_IPVAL_EXISTS');
731: hr_utility.raise_error;
732: end if;
733: CLOSE C;
734: --
735: end check_inputs_required;
745: where absence_attendance_type_id = p_absence_attendance_type_id;
746: abs_rec c%rowtype;
747: --
748: begin
749: hr_utility.set_location('per_abt_pkg.check_category',1);
750: if p_old_absence_category is null or
751: p_old_absence_category = p_new_absence_category then
752: null;
753: else
754: OPEN C;
755: FETCH C INTO ABS_REC;
756: if (C%FOUND) then
757: CLOSE C;
758: hr_utility.set_message(801,'HR_6383_ABS_DET_NO_CHANGE');
759: hr_utility.raise_error;
760: end if;
761: CLOSE C;
762: end if;
755: FETCH C INTO ABS_REC;
756: if (C%FOUND) then
757: CLOSE C;
758: hr_utility.set_message(801,'HR_6383_ABS_DET_NO_CHANGE');
759: hr_utility.raise_error;
760: end if;
761: CLOSE C;
762: end if;
763: end check_category;
766: procedure val_date_end(p_date_end IN OUT DATE
767: ,p_element_end_date DATE
768: ,p_end_of_time DATE) is
769: begin
770: hr_utility.set_location('per_abt_pkg.val_date_end',1);
771: if p_date_end is null then
772: if p_element_end_date is null or
773: p_element_end_date = p_end_of_time then
774: null;
777: end if;
778: else
779: if p_element_end_date is not null and p_element_end_date < p_date_end
780: or p_element_end_date is null and p_end_of_time < p_date_end then
781: hr_utility.set_message(801,'PER_7800_DEF_ABS_ELEMENT_ENDS');
782: hr_utility.raise_error;
783: end if;
784: end if;
785: end val_date_end;
778: else
779: if p_element_end_date is not null and p_element_end_date < p_date_end
780: or p_element_end_date is null and p_end_of_time < p_date_end then
781: hr_utility.set_message(801,'PER_7800_DEF_ABS_ELEMENT_ENDS');
782: hr_utility.raise_error;
783: end if;
784: end if;
785: end val_date_end;
786: --
800: where absence_attendance_type_id = p_absence_attendance_type_id;
801: --
802: begin
803: --
804: hr_utility.set_location('per_abt_pkg.abt_del_validation',1);
805: OPEN C1;
806: FETCH C1 INTO l_exists;
807: if (C1%FOUND) then
808: CLOSE C1;
805: OPEN C1;
806: FETCH C1 INTO l_exists;
807: if (C1%FOUND) then
808: CLOSE C1;
809: hr_utility.set_message(801,'PER_7059_EMP_ABS_DEL_TYPE');
810: hr_utility.raise_error;
811: end if;
812: CLOSE C1;
813: --
806: FETCH C1 INTO l_exists;
807: if (C1%FOUND) then
808: CLOSE C1;
809: hr_utility.set_message(801,'PER_7059_EMP_ABS_DEL_TYPE');
810: hr_utility.raise_error;
811: end if;
812: CLOSE C1;
813: --
814: hr_utility.set_location('per_abt_pkg.abt_del_validation',2);
810: hr_utility.raise_error;
811: end if;
812: CLOSE C1;
813: --
814: hr_utility.set_location('per_abt_pkg.abt_del_validation',2);
815: OPEN C2;
816: FETCH C2 INTO l_exists;
817: if (C2%FOUND) then
818: CLOSE C2;
815: OPEN C2;
816: FETCH C2 INTO l_exists;
817: if (C2%FOUND) then
818: CLOSE C2;
819: hr_utility.set_message(801,'PER_7805_DEF_ABS_DEL_REASON');
820: hr_utility.raise_error;
821: end if;
822: CLOSE C2;
823: --
816: FETCH C2 INTO l_exists;
817: if (C2%FOUND) then
818: CLOSE C2;
819: hr_utility.set_message(801,'PER_7805_DEF_ABS_DEL_REASON');
820: hr_utility.raise_error;
821: end if;
822: CLOSE C2;
823: --
824: end abt_del_validation;