1: package body hrentmnt as
2: /* $Header: pyentmnt.pkb 120.72.12020000.11 2013/02/25 06:53:45 vmaripal ship $ */
3: --
4: g_debug boolean := hr_utility.debug_enabled;
5: indent varchar2 (32767) := null;
6: g_package constant varchar2 (32) := 'hrentmnt.';
7: g_original_entry_id pay_element_entries_f.original_entry_id%type := null;
8: --
238: --
239: procedure check_parameters is
240: begin
241: --
242: hr_utility.trace('In min_eligibility_date');
243: hr_utility.trace ('');
244: hr_utility.trace (' p_element_link_id = '
245: ||to_char (p_element_link_id));
246: hr_utility.trace (' p_assignment_id'
239: procedure check_parameters is
240: begin
241: --
242: hr_utility.trace('In min_eligibility_date');
243: hr_utility.trace ('');
244: hr_utility.trace (' p_element_link_id = '
245: ||to_char (p_element_link_id));
246: hr_utility.trace (' p_assignment_id'
247: ||to_char (p_assignment_id));
240: begin
241: --
242: hr_utility.trace('In min_eligibility_date');
243: hr_utility.trace ('');
244: hr_utility.trace (' p_element_link_id = '
245: ||to_char (p_element_link_id));
246: hr_utility.trace (' p_assignment_id'
247: ||to_char (p_assignment_id));
248: hr_utility.trace (' p_range_start_date'
242: hr_utility.trace('In min_eligibility_date');
243: hr_utility.trace ('');
244: hr_utility.trace (' p_element_link_id = '
245: ||to_char (p_element_link_id));
246: hr_utility.trace (' p_assignment_id'
247: ||to_char (p_assignment_id));
248: hr_utility.trace (' p_range_start_date'
249: ||to_char (p_range_start_date));
250: hr_utility.trace (' p_range_end_date'
244: hr_utility.trace (' p_element_link_id = '
245: ||to_char (p_element_link_id));
246: hr_utility.trace (' p_assignment_id'
247: ||to_char (p_assignment_id));
248: hr_utility.trace (' p_range_start_date'
249: ||to_char (p_range_start_date));
250: hr_utility.trace (' p_range_end_date'
251: ||to_char (p_range_end_date));
252: hr_utility.trace ('');
246: hr_utility.trace (' p_assignment_id'
247: ||to_char (p_assignment_id));
248: hr_utility.trace (' p_range_start_date'
249: ||to_char (p_range_start_date));
250: hr_utility.trace (' p_range_end_date'
251: ||to_char (p_range_end_date));
252: hr_utility.trace ('');
253: --
254: end check_parameters;
248: hr_utility.trace (' p_range_start_date'
249: ||to_char (p_range_start_date));
250: hr_utility.trace (' p_range_end_date'
251: ||to_char (p_range_end_date));
252: hr_utility.trace ('');
253: --
254: end check_parameters;
255: --
256: begin
267: open csr_link(p_element_link_id);
268: fetch csr_link into v_link_rec;
269: if csr_link%notfound then
270: close csr_link;
271: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
272: hr_utility.set_message_token('PROCEDURE', 'hrentmnt.min_eligibility_date');
273: hr_utility.set_message_token('STEP','1');
274: hr_utility.raise_error;
275: end if;
268: fetch csr_link into v_link_rec;
269: if csr_link%notfound then
270: close csr_link;
271: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
272: hr_utility.set_message_token('PROCEDURE', 'hrentmnt.min_eligibility_date');
273: hr_utility.set_message_token('STEP','1');
274: hr_utility.raise_error;
275: end if;
276: close csr_link;
269: if csr_link%notfound then
270: close csr_link;
271: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
272: hr_utility.set_message_token('PROCEDURE', 'hrentmnt.min_eligibility_date');
273: hr_utility.set_message_token('STEP','1');
274: hr_utility.raise_error;
275: end if;
276: close csr_link;
277: --
270: close csr_link;
271: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
272: hr_utility.set_message_token('PROCEDURE', 'hrentmnt.min_eligibility_date');
273: hr_utility.set_message_token('STEP','1');
274: hr_utility.raise_error;
275: end if;
276: close csr_link;
277: --
278: --
303: --
304: fetch csr_assignment into v_asg_rec;
305: if csr_assignment%notfound then
306: close csr_assignment;
307: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
308: hr_utility.set_message_token('PROCEDURE', 'hrentmnt.min_eligibility_date');
309: hr_utility.set_message_token('STEP','2');
310: hr_utility.raise_error;
311: end if;
304: fetch csr_assignment into v_asg_rec;
305: if csr_assignment%notfound then
306: close csr_assignment;
307: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
308: hr_utility.set_message_token('PROCEDURE', 'hrentmnt.min_eligibility_date');
309: hr_utility.set_message_token('STEP','2');
310: hr_utility.raise_error;
311: end if;
312: --
305: if csr_assignment%notfound then
306: close csr_assignment;
307: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
308: hr_utility.set_message_token('PROCEDURE', 'hrentmnt.min_eligibility_date');
309: hr_utility.set_message_token('STEP','2');
310: hr_utility.raise_error;
311: end if;
312: --
313: --
306: close csr_assignment;
307: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
308: hr_utility.set_message_token('PROCEDURE', 'hrentmnt.min_eligibility_date');
309: hr_utility.set_message_token('STEP','2');
310: hr_utility.raise_error;
311: end if;
312: --
313: --
314: -- Initialise variables holding the start and end dates of the current
468: --
469: procedure check_parameters is
470: begin
471: --
472: hr_utility.trace('In '||l_proc);
473: hr_utility.trace ('');
474: hr_utility.trace (' p_assignment_id = '
475: ||to_char (p_assignment_id));
476: --
469: procedure check_parameters is
470: begin
471: --
472: hr_utility.trace('In '||l_proc);
473: hr_utility.trace ('');
474: hr_utility.trace (' p_assignment_id = '
475: ||to_char (p_assignment_id));
476: --
477: hr_utility.trace (' p_business_group_id = '
470: begin
471: --
472: hr_utility.trace('In '||l_proc);
473: hr_utility.trace ('');
474: hr_utility.trace (' p_assignment_id = '
475: ||to_char (p_assignment_id));
476: --
477: hr_utility.trace (' p_business_group_id = '
478: ||to_char (p_business_group_id));
473: hr_utility.trace ('');
474: hr_utility.trace (' p_assignment_id = '
475: ||to_char (p_assignment_id));
476: --
477: hr_utility.trace (' p_business_group_id = '
478: ||to_char (p_business_group_id));
479: --
480: hr_utility.trace (' p_dt_mode = '
481: ||p_dt_mode);
476: --
477: hr_utility.trace (' p_business_group_id = '
478: ||to_char (p_business_group_id));
479: --
480: hr_utility.trace (' p_dt_mode = '
481: ||p_dt_mode);
482: --
483: hr_utility.trace (' p_old_people_group_id = '
484: ||to_char (p_old_people_group_id));
479: --
480: hr_utility.trace (' p_dt_mode = '
481: ||p_dt_mode);
482: --
483: hr_utility.trace (' p_old_people_group_id = '
484: ||to_char (p_old_people_group_id));
485: --
486: hr_utility.trace (' p_new_people_group_id = '
487: ||to_char (p_new_people_group_id));
482: --
483: hr_utility.trace (' p_old_people_group_id = '
484: ||to_char (p_old_people_group_id));
485: --
486: hr_utility.trace (' p_new_people_group_id = '
487: ||to_char (p_new_people_group_id));
488: hr_utility.trace (' p_old_organization_id = '
489: ||to_char (p_old_organization_id));
490: hr_utility.trace (' p_new_organization_id = '
484: ||to_char (p_old_people_group_id));
485: --
486: hr_utility.trace (' p_new_people_group_id = '
487: ||to_char (p_new_people_group_id));
488: hr_utility.trace (' p_old_organization_id = '
489: ||to_char (p_old_organization_id));
490: hr_utility.trace (' p_new_organization_id = '
491: ||to_char (p_new_organization_id));
492: hr_utility.trace (' p_old_employment_category = '
486: hr_utility.trace (' p_new_people_group_id = '
487: ||to_char (p_new_people_group_id));
488: hr_utility.trace (' p_old_organization_id = '
489: ||to_char (p_old_organization_id));
490: hr_utility.trace (' p_new_organization_id = '
491: ||to_char (p_new_organization_id));
492: hr_utility.trace (' p_old_employment_category = '
493: ||p_old_employment_category);
494: hr_utility.trace (' p_new_employment_category = '
488: hr_utility.trace (' p_old_organization_id = '
489: ||to_char (p_old_organization_id));
490: hr_utility.trace (' p_new_organization_id = '
491: ||to_char (p_new_organization_id));
492: hr_utility.trace (' p_old_employment_category = '
493: ||p_old_employment_category);
494: hr_utility.trace (' p_new_employment_category = '
495: ||p_new_employment_category);
496: hr_utility.trace (' p_old_payroll_id = '
490: hr_utility.trace (' p_new_organization_id = '
491: ||to_char (p_new_organization_id));
492: hr_utility.trace (' p_old_employment_category = '
493: ||p_old_employment_category);
494: hr_utility.trace (' p_new_employment_category = '
495: ||p_new_employment_category);
496: hr_utility.trace (' p_old_payroll_id = '
497: ||p_old_payroll_id);
498: hr_utility.trace (' p_new_payroll_id = '
492: hr_utility.trace (' p_old_employment_category = '
493: ||p_old_employment_category);
494: hr_utility.trace (' p_new_employment_category = '
495: ||p_new_employment_category);
496: hr_utility.trace (' p_old_payroll_id = '
497: ||p_old_payroll_id);
498: hr_utility.trace (' p_new_payroll_id = '
499: ||p_new_payroll_id);
500: --
494: hr_utility.trace (' p_new_employment_category = '
495: ||p_new_employment_category);
496: hr_utility.trace (' p_old_payroll_id = '
497: ||p_old_payroll_id);
498: hr_utility.trace (' p_new_payroll_id = '
499: ||p_new_payroll_id);
500: --
501: hr_utility.trace ('');
502: --
497: ||p_old_payroll_id);
498: hr_utility.trace (' p_new_payroll_id = '
499: ||p_new_payroll_id);
500: --
501: hr_utility.trace ('');
502: --
503: end check_parameters;
504: --
505: begin
550: --
551: end if; --} dt operation
552: --
553: if g_debug then
554: hr_utility.trace('Out '||l_proc);
555: end if;
556: --
557: end maintain_alu_asg;
558: --
759: procedure check_parameters is
760: --
761: begin
762: --
763: hr_utility.trace('In check_payroll_changes_asg');
764: hr_utility.trace ('');
765: hr_utility.trace (' p_assignment_id = '
766: ||to_char (p_assignment_id));
767: hr_utility.trace (' p_payroll_id = '
760: --
761: begin
762: --
763: hr_utility.trace('In check_payroll_changes_asg');
764: hr_utility.trace ('');
765: hr_utility.trace (' p_assignment_id = '
766: ||to_char (p_assignment_id));
767: hr_utility.trace (' p_payroll_id = '
768: ||to_char (p_payroll_id));
761: begin
762: --
763: hr_utility.trace('In check_payroll_changes_asg');
764: hr_utility.trace ('');
765: hr_utility.trace (' p_assignment_id = '
766: ||to_char (p_assignment_id));
767: hr_utility.trace (' p_payroll_id = '
768: ||to_char (p_payroll_id));
769: hr_utility.trace (' p_dt_mode = '
763: hr_utility.trace('In check_payroll_changes_asg');
764: hr_utility.trace ('');
765: hr_utility.trace (' p_assignment_id = '
766: ||to_char (p_assignment_id));
767: hr_utility.trace (' p_payroll_id = '
768: ||to_char (p_payroll_id));
769: hr_utility.trace (' p_dt_mode = '
770: ||p_dt_mode);
771: hr_utility.trace (' p_validation_start_date = '
765: hr_utility.trace (' p_assignment_id = '
766: ||to_char (p_assignment_id));
767: hr_utility.trace (' p_payroll_id = '
768: ||to_char (p_payroll_id));
769: hr_utility.trace (' p_dt_mode = '
770: ||p_dt_mode);
771: hr_utility.trace (' p_validation_start_date = '
772: ||to_char (p_validation_start_date));
773: hr_utility.trace (' p_validation_end_date = '
767: hr_utility.trace (' p_payroll_id = '
768: ||to_char (p_payroll_id));
769: hr_utility.trace (' p_dt_mode = '
770: ||p_dt_mode);
771: hr_utility.trace (' p_validation_start_date = '
772: ||to_char (p_validation_start_date));
773: hr_utility.trace (' p_validation_end_date = '
774: ||to_char (p_validation_end_date));
775: hr_utility.trace ('');
769: hr_utility.trace (' p_dt_mode = '
770: ||p_dt_mode);
771: hr_utility.trace (' p_validation_start_date = '
772: ||to_char (p_validation_start_date));
773: hr_utility.trace (' p_validation_end_date = '
774: ||to_char (p_validation_end_date));
775: hr_utility.trace ('');
776: --
777: end check_parameters;
771: hr_utility.trace (' p_validation_start_date = '
772: ||to_char (p_validation_start_date));
773: hr_utility.trace (' p_validation_end_date = '
774: ||to_char (p_validation_end_date));
775: hr_utility.trace ('');
776: --
777: end check_parameters;
778: --
779: --
778: --
779: --
780: begin
781: --
782: g_debug := hr_utility.debug_enabled;
783: if g_debug then
784: check_parameters;
785: end if;
786: --
805: from pay_payrolls_f pay2
806: where pay2.payroll_id = pay.payroll_id));
807: --
808: if v_check_failed = 'Y' then
809: hr_utility.set_message(801,'HR_6590_ASS_PYRLL_NOT_EXIST');
810: hr_utility.raise_error;
811: end if;
812: --
813: exception
806: where pay2.payroll_id = pay.payroll_id));
807: --
808: if v_check_failed = 'Y' then
809: hr_utility.set_message(801,'HR_6590_ASS_PYRLL_NOT_EXIST');
810: hr_utility.raise_error;
811: end if;
812: --
813: exception
814: when no_data_found then null;
851: l_date := l_rec.effective_date;
852: v_check_failed := 'Y';
853: exit;
854: else
855: hr_utility.set_message(801,'PAY_449682_RUN_EXISTS_FOR_DE');
856: hr_utility.set_warning;
857: end if;
858: --
859: end loop;
852: v_check_failed := 'Y';
853: exit;
854: else
855: hr_utility.set_message(801,'PAY_449682_RUN_EXISTS_FOR_DE');
856: hr_utility.set_warning;
857: end if;
858: --
859: end loop;
860: --
925: v_check_failed := 'Y';
926: exit;
927: else
928: --
929: hr_utility.set_message(801,'PAY_449682_RUN_EXISTS_FOR_DE');
930: hr_utility.set_warning;
931: --
932: end if;
933: close csr_valid_payroll;
926: exit;
927: else
928: --
929: hr_utility.set_message(801,'PAY_449682_RUN_EXISTS_FOR_DE');
930: hr_utility.set_warning;
931: --
932: end if;
933: close csr_valid_payroll;
934: --
933: close csr_valid_payroll;
934: --
935: else
936: --
937: hr_utility.set_message(801,'PAY_449682_RUN_EXISTS_FOR_DE');
938: hr_utility.set_warning;
939: --
940: end if;
941: --
934: --
935: else
936: --
937: hr_utility.set_message(801,'PAY_449682_RUN_EXISTS_FOR_DE');
938: hr_utility.set_warning;
939: --
940: end if;
941: --
942: end loop;
943: --
944: end if;
945: --
946: if v_check_failed = 'Y' then
947: hr_utility.set_message(801,'HR_449757_ASS_ACTIONS_EXIST');
948: hr_utility.set_message_token('1', pay_wrapper_pkg.date_to_displaydate(l_date));
949: hr_utility.raise_error;
950: end if;
951: --
944: end if;
945: --
946: if v_check_failed = 'Y' then
947: hr_utility.set_message(801,'HR_449757_ASS_ACTIONS_EXIST');
948: hr_utility.set_message_token('1', pay_wrapper_pkg.date_to_displaydate(l_date));
949: hr_utility.raise_error;
950: end if;
951: --
952: end check_payroll_changes_asg;
945: --
946: if v_check_failed = 'Y' then
947: hr_utility.set_message(801,'HR_449757_ASS_ACTIONS_EXIST');
948: hr_utility.set_message_token('1', pay_wrapper_pkg.date_to_displaydate(l_date));
949: hr_utility.raise_error;
950: end if;
951: --
952: end check_payroll_changes_asg;
953: --
1010: procedure check_parameters is
1011: --
1012: begin
1013: --
1014: hr_utility.trace('In hrentmnt.cache_element_entry');
1015: --
1016: hr_utility.trace ('');
1017: hr_utility.trace (' p_element_entry_id = '
1018: ||to_char (p_element_entry_id));
1012: begin
1013: --
1014: hr_utility.trace('In hrentmnt.cache_element_entry');
1015: --
1016: hr_utility.trace ('');
1017: hr_utility.trace (' p_element_entry_id = '
1018: ||to_char (p_element_entry_id));
1019: hr_utility.trace (' p_date = '
1020: ||to_char (p_date));
1013: --
1014: hr_utility.trace('In hrentmnt.cache_element_entry');
1015: --
1016: hr_utility.trace ('');
1017: hr_utility.trace (' p_element_entry_id = '
1018: ||to_char (p_element_entry_id));
1019: hr_utility.trace (' p_date = '
1020: ||to_char (p_date));
1021: hr_utility.trace ('');
1015: --
1016: hr_utility.trace ('');
1017: hr_utility.trace (' p_element_entry_id = '
1018: ||to_char (p_element_entry_id));
1019: hr_utility.trace (' p_date = '
1020: ||to_char (p_date));
1021: hr_utility.trace ('');
1022: --
1023: end check_parameters;
1017: hr_utility.trace (' p_element_entry_id = '
1018: ||to_char (p_element_entry_id));
1019: hr_utility.trace (' p_date = '
1020: ||to_char (p_date));
1021: hr_utility.trace ('');
1022: --
1023: end check_parameters;
1024: --
1025: begin
1107: and p_date between ee.effective_start_date
1108: and ee.effective_end_date;
1109: exception
1110: when no_data_found then
1111: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
1112: hr_utility.set_message_token('PROCEDURE',
1113: 'hrentmnt.cache_element_entry');
1114: hr_utility.set_message_token('STEP','1');
1115: hr_utility.raise_error;
1108: and ee.effective_end_date;
1109: exception
1110: when no_data_found then
1111: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
1112: hr_utility.set_message_token('PROCEDURE',
1113: 'hrentmnt.cache_element_entry');
1114: hr_utility.set_message_token('STEP','1');
1115: hr_utility.raise_error;
1116: end;
1110: when no_data_found then
1111: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
1112: hr_utility.set_message_token('PROCEDURE',
1113: 'hrentmnt.cache_element_entry');
1114: hr_utility.set_message_token('STEP','1');
1115: hr_utility.raise_error;
1116: end;
1117: --
1118: -- Retrieve all entry values for the element entry and convert into screen
1111: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
1112: hr_utility.set_message_token('PROCEDURE',
1113: 'hrentmnt.cache_element_entry');
1114: hr_utility.set_message_token('STEP','1');
1115: hr_utility.raise_error;
1116: end;
1117: --
1118: -- Retrieve all entry values for the element entry and convert into screen
1119: -- format. Store these in a table to be used later by the element entry
1129: v_db_format := v_entry_value.screen_entry_value;
1130:
1131: -- start of change 115.30
1132: if g_debug then
1133: hr_utility.trace('*****before*****');
1134: hr_utility.trace('*****v_entry_value.lookup_type>' ||
1135: v_entry_value.lookup_type || '<');
1136: hr_utility.trace('*****v_entry_value.value_set_id>' ||
1137: v_entry_value.value_set_id || '<');
1130:
1131: -- start of change 115.30
1132: if g_debug then
1133: hr_utility.trace('*****before*****');
1134: hr_utility.trace('*****v_entry_value.lookup_type>' ||
1135: v_entry_value.lookup_type || '<');
1136: hr_utility.trace('*****v_entry_value.value_set_id>' ||
1137: v_entry_value.value_set_id || '<');
1138: hr_utility.trace('*****v_entry_value.screen_entry_value>' ||
1132: if g_debug then
1133: hr_utility.trace('*****before*****');
1134: hr_utility.trace('*****v_entry_value.lookup_type>' ||
1135: v_entry_value.lookup_type || '<');
1136: hr_utility.trace('*****v_entry_value.value_set_id>' ||
1137: v_entry_value.value_set_id || '<');
1138: hr_utility.trace('*****v_entry_value.screen_entry_value>' ||
1139: v_entry_value.screen_entry_value || '<');
1140: end if;
1134: hr_utility.trace('*****v_entry_value.lookup_type>' ||
1135: v_entry_value.lookup_type || '<');
1136: hr_utility.trace('*****v_entry_value.value_set_id>' ||
1137: v_entry_value.value_set_id || '<');
1138: hr_utility.trace('*****v_entry_value.screen_entry_value>' ||
1139: v_entry_value.screen_entry_value || '<');
1140: end if;
1141: --
1142: -- if entry has lookup and the entry_value is not null,
1173: v_entry_value.input_currency_code);
1174: end if;
1175:
1176: if g_debug then
1177: hr_utility.trace('*****v_screen_format>' || v_screen_format || '<');
1178: hr_utility.trace('*****v_db_format>' || v_db_format || '<');
1179: hr_utility.trace('*****after*****');
1180: end if;
1181: -- end of change 115.30
1174: end if;
1175:
1176: if g_debug then
1177: hr_utility.trace('*****v_screen_format>' || v_screen_format || '<');
1178: hr_utility.trace('*****v_db_format>' || v_db_format || '<');
1179: hr_utility.trace('*****after*****');
1180: end if;
1181: -- end of change 115.30
1182:
1175:
1176: if g_debug then
1177: hr_utility.trace('*****v_screen_format>' || v_screen_format || '<');
1178: hr_utility.trace('*****v_db_format>' || v_db_format || '<');
1179: hr_utility.trace('*****after*****');
1180: end if;
1181: -- end of change 115.30
1182:
1183: --
1194: p_input_value_id_tbl := v_input_value_id_tbl;
1195: p_entry_value_tbl := v_entry_value_tbl;
1196: --
1197: if g_debug then
1198: hr_utility.trace('Out hrentmnt.cache_element_entry');
1199: end if;
1200: --
1201: end cache_element_entry;
1202: --
1225: procedure check_parameters is
1226: --
1227: begin
1228: --
1229: hr_utility.trace('In hrentmnt.check_entry_overridden');
1230: hr_utility.trace ('');
1231: hr_utility.trace(' p_assignment_id = '
1232: ||to_char (p_assignment_id));
1233: hr_utility.trace(' p_element_entry_id = '
1226: --
1227: begin
1228: --
1229: hr_utility.trace('In hrentmnt.check_entry_overridden');
1230: hr_utility.trace ('');
1231: hr_utility.trace(' p_assignment_id = '
1232: ||to_char (p_assignment_id));
1233: hr_utility.trace(' p_element_entry_id = '
1234: ||to_char (p_element_entry_id));
1227: begin
1228: --
1229: hr_utility.trace('In hrentmnt.check_entry_overridden');
1230: hr_utility.trace ('');
1231: hr_utility.trace(' p_assignment_id = '
1232: ||to_char (p_assignment_id));
1233: hr_utility.trace(' p_element_entry_id = '
1234: ||to_char (p_element_entry_id));
1235: hr_utility.trace(' p_validation_start_date = '
1229: hr_utility.trace('In hrentmnt.check_entry_overridden');
1230: hr_utility.trace ('');
1231: hr_utility.trace(' p_assignment_id = '
1232: ||to_char (p_assignment_id));
1233: hr_utility.trace(' p_element_entry_id = '
1234: ||to_char (p_element_entry_id));
1235: hr_utility.trace(' p_validation_start_date = '
1236: ||to_char (p_validation_start_date));
1237: hr_utility.trace(' p_validation_end_date = '
1231: hr_utility.trace(' p_assignment_id = '
1232: ||to_char (p_assignment_id));
1233: hr_utility.trace(' p_element_entry_id = '
1234: ||to_char (p_element_entry_id));
1235: hr_utility.trace(' p_validation_start_date = '
1236: ||to_char (p_validation_start_date));
1237: hr_utility.trace(' p_validation_end_date = '
1238: ||to_char (p_validation_end_date));
1239: hr_utility.trace ('');
1233: hr_utility.trace(' p_element_entry_id = '
1234: ||to_char (p_element_entry_id));
1235: hr_utility.trace(' p_validation_start_date = '
1236: ||to_char (p_validation_start_date));
1237: hr_utility.trace(' p_validation_end_date = '
1238: ||to_char (p_validation_end_date));
1239: hr_utility.trace ('');
1240: --
1241: end check_parameters;
1235: hr_utility.trace(' p_validation_start_date = '
1236: ||to_char (p_validation_start_date));
1237: hr_utility.trace(' p_validation_end_date = '
1238: ||to_char (p_validation_end_date));
1239: hr_utility.trace ('');
1240: --
1241: end check_parameters;
1242: --
1243: begin
1267: when no_data_found then null;
1268: end;
1269: --
1270: if v_entry_overridden = 'Y' then
1271: hr_utility.set_message(801, 'HR_6304_ELE_ENTRY_DT_DEL_ADJ');
1272: hr_utility.raise_error;
1273: end if;
1274: --
1275: end check_entry_overridden;
1268: end;
1269: --
1270: if v_entry_overridden = 'Y' then
1271: hr_utility.set_message(801, 'HR_6304_ELE_ENTRY_DT_DEL_ADJ');
1272: hr_utility.raise_error;
1273: end if;
1274: --
1275: end check_entry_overridden;
1276: --
1395: l_datetrack_mode varchar2(10);
1396: l_effective_date date;
1397:
1398: begin
1399: hr_utility.set_location(l_proc, 10);
1400: hr_utility.trace('p_element_entry_id => '||p_element_entry_id);
1401: hr_utility.trace('p_start_or_end_date => '||p_start_or_end_date);
1402: hr_utility.trace('p_old_date => '||p_old_date);
1403: hr_utility.trace('p_new_date => '||p_new_date);
1396: l_effective_date date;
1397:
1398: begin
1399: hr_utility.set_location(l_proc, 10);
1400: hr_utility.trace('p_element_entry_id => '||p_element_entry_id);
1401: hr_utility.trace('p_start_or_end_date => '||p_start_or_end_date);
1402: hr_utility.trace('p_old_date => '||p_old_date);
1403: hr_utility.trace('p_new_date => '||p_new_date);
1404: hr_utility.trace('p_old_start_date => '||p_old_start_date);
1397:
1398: begin
1399: hr_utility.set_location(l_proc, 10);
1400: hr_utility.trace('p_element_entry_id => '||p_element_entry_id);
1401: hr_utility.trace('p_start_or_end_date => '||p_start_or_end_date);
1402: hr_utility.trace('p_old_date => '||p_old_date);
1403: hr_utility.trace('p_new_date => '||p_new_date);
1404: hr_utility.trace('p_old_start_date => '||p_old_start_date);
1405: hr_utility.trace('p_old_end_date => '||p_old_end_date);
1398: begin
1399: hr_utility.set_location(l_proc, 10);
1400: hr_utility.trace('p_element_entry_id => '||p_element_entry_id);
1401: hr_utility.trace('p_start_or_end_date => '||p_start_or_end_date);
1402: hr_utility.trace('p_old_date => '||p_old_date);
1403: hr_utility.trace('p_new_date => '||p_new_date);
1404: hr_utility.trace('p_old_start_date => '||p_old_start_date);
1405: hr_utility.trace('p_old_end_date => '||p_old_end_date);
1406:
1399: hr_utility.set_location(l_proc, 10);
1400: hr_utility.trace('p_element_entry_id => '||p_element_entry_id);
1401: hr_utility.trace('p_start_or_end_date => '||p_start_or_end_date);
1402: hr_utility.trace('p_old_date => '||p_old_date);
1403: hr_utility.trace('p_new_date => '||p_new_date);
1404: hr_utility.trace('p_old_start_date => '||p_old_start_date);
1405: hr_utility.trace('p_old_end_date => '||p_old_end_date);
1406:
1407: /*Get the old entry data*/
1400: hr_utility.trace('p_element_entry_id => '||p_element_entry_id);
1401: hr_utility.trace('p_start_or_end_date => '||p_start_or_end_date);
1402: hr_utility.trace('p_old_date => '||p_old_date);
1403: hr_utility.trace('p_new_date => '||p_new_date);
1404: hr_utility.trace('p_old_start_date => '||p_old_start_date);
1405: hr_utility.trace('p_old_end_date => '||p_old_end_date);
1406:
1407: /*Get the old entry data*/
1408: open csr_entry;
1401: hr_utility.trace('p_start_or_end_date => '||p_start_or_end_date);
1402: hr_utility.trace('p_old_date => '||p_old_date);
1403: hr_utility.trace('p_new_date => '||p_new_date);
1404: hr_utility.trace('p_old_start_date => '||p_old_start_date);
1405: hr_utility.trace('p_old_end_date => '||p_old_end_date);
1406:
1407: /*Get the old entry data*/
1408: open csr_entry;
1409: fetch csr_entry into v_entry_rec;
1408: open csr_entry;
1409: fetch csr_entry into v_entry_rec;
1410: if (csr_entry%NOTFOUND) then
1411: close csr_entry;
1412: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
1413: hr_utility.set_message_token('PROCEDURE','hrentmnt.log_entry_event');
1414: hr_utility.set_message_token('STEP','1');
1415: hr_utility.raise_error;
1416: end if;
1409: fetch csr_entry into v_entry_rec;
1410: if (csr_entry%NOTFOUND) then
1411: close csr_entry;
1412: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
1413: hr_utility.set_message_token('PROCEDURE','hrentmnt.log_entry_event');
1414: hr_utility.set_message_token('STEP','1');
1415: hr_utility.raise_error;
1416: end if;
1417: l_updating_action_id := p_old_upd_action_id;
1410: if (csr_entry%NOTFOUND) then
1411: close csr_entry;
1412: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
1413: hr_utility.set_message_token('PROCEDURE','hrentmnt.log_entry_event');
1414: hr_utility.set_message_token('STEP','1');
1415: hr_utility.raise_error;
1416: end if;
1417: l_updating_action_id := p_old_upd_action_id;
1418: l_updating_action_type := p_old_upd_action_type;
1411: close csr_entry;
1412: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
1413: hr_utility.set_message_token('PROCEDURE','hrentmnt.log_entry_event');
1414: hr_utility.set_message_token('STEP','1');
1415: hr_utility.raise_error;
1416: end if;
1417: l_updating_action_id := p_old_upd_action_id;
1418: l_updating_action_type := p_old_upd_action_type;
1419:
1450: exception
1451: when no_data_found then
1452: l_effective_date := p_new_date;
1453: end;
1454: hr_utility.trace('l_session_date => '||l_effective_date);
1455: hr_utility.trace('l_datetrack_mode => '||l_datetrack_mode);
1456: if (p_start_or_end_date = 'START' or p_start_or_end_date = 'END') then
1457: begin
1458: /*Calling the AFTER-UPDATE API call to log the event in
1451: when no_data_found then
1452: l_effective_date := p_new_date;
1453: end;
1454: hr_utility.trace('l_session_date => '||l_effective_date);
1455: hr_utility.trace('l_datetrack_mode => '||l_datetrack_mode);
1456: if (p_start_or_end_date = 'START' or p_start_or_end_date = 'END') then
1457: begin
1458: /*Calling the AFTER-UPDATE API call to log the event in
1459: PAY_PROCESS_EVENTS.*/
1705: procedure check_parameters is
1706: --
1707: begin
1708: --
1709: hr_utility.trace('In hrentmnt.validate_adjust_entry');
1710: hr_utility.trace ('');
1711: hr_utility.trace (' p_mode = '
1712: ||p_mode);
1713: hr_utility.trace (' p_assignment_id = '
1706: --
1707: begin
1708: --
1709: hr_utility.trace('In hrentmnt.validate_adjust_entry');
1710: hr_utility.trace ('');
1711: hr_utility.trace (' p_mode = '
1712: ||p_mode);
1713: hr_utility.trace (' p_assignment_id = '
1714: ||to_char (p_assignment_id));
1707: begin
1708: --
1709: hr_utility.trace('In hrentmnt.validate_adjust_entry');
1710: hr_utility.trace ('');
1711: hr_utility.trace (' p_mode = '
1712: ||p_mode);
1713: hr_utility.trace (' p_assignment_id = '
1714: ||to_char (p_assignment_id));
1715: hr_utility.trace (' p_element_entry_id = '
1709: hr_utility.trace('In hrentmnt.validate_adjust_entry');
1710: hr_utility.trace ('');
1711: hr_utility.trace (' p_mode = '
1712: ||p_mode);
1713: hr_utility.trace (' p_assignment_id = '
1714: ||to_char (p_assignment_id));
1715: hr_utility.trace (' p_element_entry_id = '
1716: ||to_char (p_element_entry_id));
1717: hr_utility.trace (' p_start_or_end_date = '
1711: hr_utility.trace (' p_mode = '
1712: ||p_mode);
1713: hr_utility.trace (' p_assignment_id = '
1714: ||to_char (p_assignment_id));
1715: hr_utility.trace (' p_element_entry_id = '
1716: ||to_char (p_element_entry_id));
1717: hr_utility.trace (' p_start_or_end_date = '
1718: ||p_start_or_end_date);
1719: hr_utility.trace (' p_old_date = '
1713: hr_utility.trace (' p_assignment_id = '
1714: ||to_char (p_assignment_id));
1715: hr_utility.trace (' p_element_entry_id = '
1716: ||to_char (p_element_entry_id));
1717: hr_utility.trace (' p_start_or_end_date = '
1718: ||p_start_or_end_date);
1719: hr_utility.trace (' p_old_date = '
1720: ||to_char (p_old_date));
1721: hr_utility.trace (' p_new_date = '
1715: hr_utility.trace (' p_element_entry_id = '
1716: ||to_char (p_element_entry_id));
1717: hr_utility.trace (' p_start_or_end_date = '
1718: ||p_start_or_end_date);
1719: hr_utility.trace (' p_old_date = '
1720: ||to_char (p_old_date));
1721: hr_utility.trace (' p_new_date = '
1722: ||to_char (p_new_date));
1723: hr_utility.trace (' p_effective_start_date = '
1717: hr_utility.trace (' p_start_or_end_date = '
1718: ||p_start_or_end_date);
1719: hr_utility.trace (' p_old_date = '
1720: ||to_char (p_old_date));
1721: hr_utility.trace (' p_new_date = '
1722: ||to_char (p_new_date));
1723: hr_utility.trace (' p_effective_start_date = '
1724: ||to_char (p_effective_start_date));
1725: hr_utility.trace (' p_effective_end_date = '
1719: hr_utility.trace (' p_old_date = '
1720: ||to_char (p_old_date));
1721: hr_utility.trace (' p_new_date = '
1722: ||to_char (p_new_date));
1723: hr_utility.trace (' p_effective_start_date = '
1724: ||to_char (p_effective_start_date));
1725: hr_utility.trace (' p_effective_end_date = '
1726: ||to_char (p_effective_end_date));
1727: hr_utility.trace (' p_entries_changed = '
1721: hr_utility.trace (' p_new_date = '
1722: ||to_char (p_new_date));
1723: hr_utility.trace (' p_effective_start_date = '
1724: ||to_char (p_effective_start_date));
1725: hr_utility.trace (' p_effective_end_date = '
1726: ||to_char (p_effective_end_date));
1727: hr_utility.trace (' p_entries_changed = '
1728: ||p_entries_changed);
1729: hr_utility.trace ('');
1723: hr_utility.trace (' p_effective_start_date = '
1724: ||to_char (p_effective_start_date));
1725: hr_utility.trace (' p_effective_end_date = '
1726: ||to_char (p_effective_end_date));
1727: hr_utility.trace (' p_entries_changed = '
1728: ||p_entries_changed);
1729: hr_utility.trace ('');
1730: --
1731: end check_parameters;
1725: hr_utility.trace (' p_effective_end_date = '
1726: ||to_char (p_effective_end_date));
1727: hr_utility.trace (' p_entries_changed = '
1728: ||p_entries_changed);
1729: hr_utility.trace ('');
1730: --
1731: end check_parameters;
1732: --
1733: begin
1746: -- The cursor unexpectedly returned no rows. Present an error message
1747: -- which includes all the procedure's parameters to assist diagnosis of
1748: -- why this error occurred.
1749: --
1750: hr_utility.set_message(801, 'HR_51058_PAY_VALIDATE_ADJUST');
1751: hr_utility.set_message_token('P_MODE',p_mode);
1752: hr_utility.set_message_token('P_ASSIGNMENT_ID',p_assignment_id);
1753: hr_utility.set_message_token('P_ELEMENT_ENTRY_ID',p_element_entry_id);
1754: hr_utility.set_message_token('P_START_OR_END_DATE',p_start_or_end_date);
1747: -- which includes all the procedure's parameters to assist diagnosis of
1748: -- why this error occurred.
1749: --
1750: hr_utility.set_message(801, 'HR_51058_PAY_VALIDATE_ADJUST');
1751: hr_utility.set_message_token('P_MODE',p_mode);
1752: hr_utility.set_message_token('P_ASSIGNMENT_ID',p_assignment_id);
1753: hr_utility.set_message_token('P_ELEMENT_ENTRY_ID',p_element_entry_id);
1754: hr_utility.set_message_token('P_START_OR_END_DATE',p_start_or_end_date);
1755: hr_utility.set_message_token('P_OLD_DATE',p_old_date);
1748: -- why this error occurred.
1749: --
1750: hr_utility.set_message(801, 'HR_51058_PAY_VALIDATE_ADJUST');
1751: hr_utility.set_message_token('P_MODE',p_mode);
1752: hr_utility.set_message_token('P_ASSIGNMENT_ID',p_assignment_id);
1753: hr_utility.set_message_token('P_ELEMENT_ENTRY_ID',p_element_entry_id);
1754: hr_utility.set_message_token('P_START_OR_END_DATE',p_start_or_end_date);
1755: hr_utility.set_message_token('P_OLD_DATE',p_old_date);
1756: hr_utility.set_message_token('P_NEW_DATE',p_new_date);
1749: --
1750: hr_utility.set_message(801, 'HR_51058_PAY_VALIDATE_ADJUST');
1751: hr_utility.set_message_token('P_MODE',p_mode);
1752: hr_utility.set_message_token('P_ASSIGNMENT_ID',p_assignment_id);
1753: hr_utility.set_message_token('P_ELEMENT_ENTRY_ID',p_element_entry_id);
1754: hr_utility.set_message_token('P_START_OR_END_DATE',p_start_or_end_date);
1755: hr_utility.set_message_token('P_OLD_DATE',p_old_date);
1756: hr_utility.set_message_token('P_NEW_DATE',p_new_date);
1757: hr_utility.set_message_token('P_EFFECTIVE_START_DATE',p_effective_start_date);
1750: hr_utility.set_message(801, 'HR_51058_PAY_VALIDATE_ADJUST');
1751: hr_utility.set_message_token('P_MODE',p_mode);
1752: hr_utility.set_message_token('P_ASSIGNMENT_ID',p_assignment_id);
1753: hr_utility.set_message_token('P_ELEMENT_ENTRY_ID',p_element_entry_id);
1754: hr_utility.set_message_token('P_START_OR_END_DATE',p_start_or_end_date);
1755: hr_utility.set_message_token('P_OLD_DATE',p_old_date);
1756: hr_utility.set_message_token('P_NEW_DATE',p_new_date);
1757: hr_utility.set_message_token('P_EFFECTIVE_START_DATE',p_effective_start_date);
1758: hr_utility.set_message_token('P_EFFECTIVE_END_DATE',p_effective_end_date);
1751: hr_utility.set_message_token('P_MODE',p_mode);
1752: hr_utility.set_message_token('P_ASSIGNMENT_ID',p_assignment_id);
1753: hr_utility.set_message_token('P_ELEMENT_ENTRY_ID',p_element_entry_id);
1754: hr_utility.set_message_token('P_START_OR_END_DATE',p_start_or_end_date);
1755: hr_utility.set_message_token('P_OLD_DATE',p_old_date);
1756: hr_utility.set_message_token('P_NEW_DATE',p_new_date);
1757: hr_utility.set_message_token('P_EFFECTIVE_START_DATE',p_effective_start_date);
1758: hr_utility.set_message_token('P_EFFECTIVE_END_DATE',p_effective_end_date);
1759: hr_utility.set_message_token('P_ENTRIES_CHANGED',p_entries_changed);
1752: hr_utility.set_message_token('P_ASSIGNMENT_ID',p_assignment_id);
1753: hr_utility.set_message_token('P_ELEMENT_ENTRY_ID',p_element_entry_id);
1754: hr_utility.set_message_token('P_START_OR_END_DATE',p_start_or_end_date);
1755: hr_utility.set_message_token('P_OLD_DATE',p_old_date);
1756: hr_utility.set_message_token('P_NEW_DATE',p_new_date);
1757: hr_utility.set_message_token('P_EFFECTIVE_START_DATE',p_effective_start_date);
1758: hr_utility.set_message_token('P_EFFECTIVE_END_DATE',p_effective_end_date);
1759: hr_utility.set_message_token('P_ENTRIES_CHANGED',p_entries_changed);
1760: hr_utility.raise_error;
1753: hr_utility.set_message_token('P_ELEMENT_ENTRY_ID',p_element_entry_id);
1754: hr_utility.set_message_token('P_START_OR_END_DATE',p_start_or_end_date);
1755: hr_utility.set_message_token('P_OLD_DATE',p_old_date);
1756: hr_utility.set_message_token('P_NEW_DATE',p_new_date);
1757: hr_utility.set_message_token('P_EFFECTIVE_START_DATE',p_effective_start_date);
1758: hr_utility.set_message_token('P_EFFECTIVE_END_DATE',p_effective_end_date);
1759: hr_utility.set_message_token('P_ENTRIES_CHANGED',p_entries_changed);
1760: hr_utility.raise_error;
1761: end if;
1754: hr_utility.set_message_token('P_START_OR_END_DATE',p_start_or_end_date);
1755: hr_utility.set_message_token('P_OLD_DATE',p_old_date);
1756: hr_utility.set_message_token('P_NEW_DATE',p_new_date);
1757: hr_utility.set_message_token('P_EFFECTIVE_START_DATE',p_effective_start_date);
1758: hr_utility.set_message_token('P_EFFECTIVE_END_DATE',p_effective_end_date);
1759: hr_utility.set_message_token('P_ENTRIES_CHANGED',p_entries_changed);
1760: hr_utility.raise_error;
1761: end if;
1762: close csr_ele_info;
1755: hr_utility.set_message_token('P_OLD_DATE',p_old_date);
1756: hr_utility.set_message_token('P_NEW_DATE',p_new_date);
1757: hr_utility.set_message_token('P_EFFECTIVE_START_DATE',p_effective_start_date);
1758: hr_utility.set_message_token('P_EFFECTIVE_END_DATE',p_effective_end_date);
1759: hr_utility.set_message_token('P_ENTRIES_CHANGED',p_entries_changed);
1760: hr_utility.raise_error;
1761: end if;
1762: close csr_ele_info;
1763: --
1756: hr_utility.set_message_token('P_NEW_DATE',p_new_date);
1757: hr_utility.set_message_token('P_EFFECTIVE_START_DATE',p_effective_start_date);
1758: hr_utility.set_message_token('P_EFFECTIVE_END_DATE',p_effective_end_date);
1759: hr_utility.set_message_token('P_ENTRIES_CHANGED',p_entries_changed);
1760: hr_utility.raise_error;
1761: end if;
1762: close csr_ele_info;
1763: --
1764: -- Set the dates over which the change is taking place.
1875: --
1876: -- Bug#9197105 : As we are calling DML so this event is not logging into the
1877: -- PAY_PROCESS_EVENTS table. So, after the DML is executed, we are calling
1878: -- AFTER-UPDATE API of element entries to log this event.
1879: hr_utility.trace('Mode => '||p_mode);
1880: if p_mode = 'UPDATE' then
1881: --
1882: if p_start_or_end_date = 'START' then
1883: --
1881: --
1882: if p_start_or_end_date = 'START' then
1883: --
1884: /*Collecting old data to push the details into PAY_PROCESS_EVENTS*/
1885: hr_utility.trace('Collecting the old data : For back-dating the start date');
1886: select ee.effective_start_date,
1887: ee.effective_end_date,
1888: ee.updating_action_id,
1889: ee.updating_action_type
1895: where ee.element_entry_id = p_element_entry_id
1896: and ee.effective_start_date = p_old_date;
1897:
1898: /*Back-dating the start date of the entry.*/
1899: hr_utility.trace('Calling actual DML to back-date the effective start date');
1900: update pay_element_entries_f ee
1901: set ee.effective_start_date = p_new_date,
1902: ee.updating_action_id = decode(ee.updating_action_type, 'S', ee.updating_action_id,
1903: null),
1913: elsif p_start_or_end_date = 'END' then
1914: --
1915: --
1916: /*Collecting old data to push the details into PAY_PROCESS_EVENTS*/
1917: hr_utility.trace('Collecting the old data : For extending the end date');
1918: select ee.effective_start_date,
1919: ee.effective_end_date,
1920: ee.updating_action_id,
1921: ee.updating_action_type
1927: where ee.element_entry_id = p_element_entry_id
1928: and ee.effective_end_date = p_old_date;
1929:
1930: /*Extending the effective_end_date of the entry.*/
1931: hr_utility.trace('Calling actual DML to extend the effective end date');
1932: update pay_element_entries_f ee
1933: set ee.effective_end_date = p_new_date,
1934: ee.updating_action_id = decode(ee.updating_action_type, 'U', ee.updating_action_id,
1935: null),
1945: end if;
1946: if p_start_or_end_date = 'START' or p_start_or_end_date = 'END' then
1947: /*As we have back-dated the entry's start date/extended the entry's end date,
1948: we need to log this event by calling AFTER-UPDATE trigger.*/
1949: hr_utility.trace('Calling LOG_ENTRY_EVENT to log the event of above date change');
1950: log_entry_event( p_element_entry_id => p_element_entry_id
1951: ,p_old_date => p_old_date
1952: ,p_new_date => p_new_date
1953: ,p_start_or_end_date => p_start_or_end_date
1958: end if;
1959: end if;
1960: --
1961: if g_debug then
1962: hr_utility.trace('Out hrentmnt.validate_adjust_entry');
1963: end if;
1964: --
1965: end validate_adjust_entry;
1966: --
2021: (l_prof_value = 'I' and l_non_payments_flag = 'N')
2022: then
2023: -- Either no entries can be purged or attempting to
2024: -- purge a payments type of entry when we shouldn't.
2025: hr_utility.set_message (800,'HR_33000_ENTRY_CANT_PURGE');
2026: hr_utility.raise_error;
2027: end if;
2028: --
2029: end if;
2022: then
2023: -- Either no entries can be purged or attempting to
2024: -- purge a payments type of entry when we shouldn't.
2025: hr_utility.set_message (800,'HR_33000_ENTRY_CANT_PURGE');
2026: hr_utility.raise_error;
2027: end if;
2028: --
2029: end if;
2030: --
2038: p_new_element_entry_ESD in date,
2039: p_new_element_entry_EED in date)
2040: is
2041: begin
2042: hr_utility.trace('> hrentmnt.maintain_dependent_entities');
2043:
2044: if g_debug then
2045: hr_utility.trace('p_element_entry_id >' || p_element_entry_id || '<');
2046: hr_utility.trace('p_element_entry_ESD >' || p_element_entry_ESD || '<');
2041: begin
2042: hr_utility.trace('> hrentmnt.maintain_dependent_entities');
2043:
2044: if g_debug then
2045: hr_utility.trace('p_element_entry_id >' || p_element_entry_id || '<');
2046: hr_utility.trace('p_element_entry_ESD >' || p_element_entry_ESD || '<');
2047: hr_utility.trace('p_element_entry_EED >' || p_element_entry_EED || '<');
2048:
2049: hr_utility.trace('p_new_element_entry_id >' || p_new_element_entry_id || '<');
2042: hr_utility.trace('> hrentmnt.maintain_dependent_entities');
2043:
2044: if g_debug then
2045: hr_utility.trace('p_element_entry_id >' || p_element_entry_id || '<');
2046: hr_utility.trace('p_element_entry_ESD >' || p_element_entry_ESD || '<');
2047: hr_utility.trace('p_element_entry_EED >' || p_element_entry_EED || '<');
2048:
2049: hr_utility.trace('p_new_element_entry_id >' || p_new_element_entry_id || '<');
2050: hr_utility.trace('p_new_element_entry_ESD>' || p_new_element_entry_ESD || '<');
2043:
2044: if g_debug then
2045: hr_utility.trace('p_element_entry_id >' || p_element_entry_id || '<');
2046: hr_utility.trace('p_element_entry_ESD >' || p_element_entry_ESD || '<');
2047: hr_utility.trace('p_element_entry_EED >' || p_element_entry_EED || '<');
2048:
2049: hr_utility.trace('p_new_element_entry_id >' || p_new_element_entry_id || '<');
2050: hr_utility.trace('p_new_element_entry_ESD>' || p_new_element_entry_ESD || '<');
2051: hr_utility.trace('p_new_element_entry_EED>' || p_new_element_entry_EED || '<');
2045: hr_utility.trace('p_element_entry_id >' || p_element_entry_id || '<');
2046: hr_utility.trace('p_element_entry_ESD >' || p_element_entry_ESD || '<');
2047: hr_utility.trace('p_element_entry_EED >' || p_element_entry_EED || '<');
2048:
2049: hr_utility.trace('p_new_element_entry_id >' || p_new_element_entry_id || '<');
2050: hr_utility.trace('p_new_element_entry_ESD>' || p_new_element_entry_ESD || '<');
2051: hr_utility.trace('p_new_element_entry_EED>' || p_new_element_entry_EED || '<');
2052: end if;
2053:
2046: hr_utility.trace('p_element_entry_ESD >' || p_element_entry_ESD || '<');
2047: hr_utility.trace('p_element_entry_EED >' || p_element_entry_EED || '<');
2048:
2049: hr_utility.trace('p_new_element_entry_id >' || p_new_element_entry_id || '<');
2050: hr_utility.trace('p_new_element_entry_ESD>' || p_new_element_entry_ESD || '<');
2051: hr_utility.trace('p_new_element_entry_EED>' || p_new_element_entry_EED || '<');
2052: end if;
2053:
2054: hr_entry.maintain_covered_dependants(
2047: hr_utility.trace('p_element_entry_EED >' || p_element_entry_EED || '<');
2048:
2049: hr_utility.trace('p_new_element_entry_id >' || p_new_element_entry_id || '<');
2050: hr_utility.trace('p_new_element_entry_ESD>' || p_new_element_entry_ESD || '<');
2051: hr_utility.trace('p_new_element_entry_EED>' || p_new_element_entry_EED || '<');
2052: end if;
2053:
2054: hr_entry.maintain_covered_dependants(
2055: p_element_entry_id => p_element_entry_id
2292:
2293: sp_exists :=0;
2294: --
2295: if g_debug then
2296: hr_utility.set_location(l_proc,10);
2297: hr_utility.trace('********** BEFORE OAB **********');
2298: end if;
2299:
2300: /*Bug 9295968 Begin */
2293: sp_exists :=0;
2294: --
2295: if g_debug then
2296: hr_utility.set_location(l_proc,10);
2297: hr_utility.trace('********** BEFORE OAB **********');
2298: end if;
2299:
2300: /*Bug 9295968 Begin */
2301: begin
2314: -- Read the prof value
2315: --
2316: fnd_profile.get('PAY_ORIG_EL_BEHAVE', l_prof_value);
2317: if g_debug then
2318: hr_utility.trace('l_prof_value>' || l_prof_value || '<');
2319: end if;
2320: --
2321: -- Check if any other entries can be created up to the REE's EED,
2322: -- create REE from VSD to REE's EED
2329: -- and p_ee_creator_type <> 'SP' then (Commented for the bug fix 8779392,
2330: -- so that we check for SP EE also.)
2331: --
2332: if g_debug then
2333: hr_utility.set_location(l_proc,20);
2334: hr_utility.trace('EE being updated>' || p_element_entry_id || '<');
2335: hr_utility.trace('VSD>' || p_validation_start_date || '<');
2336: hr_utility.trace('VED>' || p_validation_end_date || '<');
2337: hr_utility.trace('EE ESD>' || p_ee_effective_start_date || '<');
2330: -- so that we check for SP EE also.)
2331: --
2332: if g_debug then
2333: hr_utility.set_location(l_proc,20);
2334: hr_utility.trace('EE being updated>' || p_element_entry_id || '<');
2335: hr_utility.trace('VSD>' || p_validation_start_date || '<');
2336: hr_utility.trace('VED>' || p_validation_end_date || '<');
2337: hr_utility.trace('EE ESD>' || p_ee_effective_start_date || '<');
2338: hr_utility.trace('EE EED>' || p_ee_effective_end_date || '<');
2331: --
2332: if g_debug then
2333: hr_utility.set_location(l_proc,20);
2334: hr_utility.trace('EE being updated>' || p_element_entry_id || '<');
2335: hr_utility.trace('VSD>' || p_validation_start_date || '<');
2336: hr_utility.trace('VED>' || p_validation_end_date || '<');
2337: hr_utility.trace('EE ESD>' || p_ee_effective_start_date || '<');
2338: hr_utility.trace('EE EED>' || p_ee_effective_end_date || '<');
2339: end if;
2332: if g_debug then
2333: hr_utility.set_location(l_proc,20);
2334: hr_utility.trace('EE being updated>' || p_element_entry_id || '<');
2335: hr_utility.trace('VSD>' || p_validation_start_date || '<');
2336: hr_utility.trace('VED>' || p_validation_end_date || '<');
2337: hr_utility.trace('EE ESD>' || p_ee_effective_start_date || '<');
2338: hr_utility.trace('EE EED>' || p_ee_effective_end_date || '<');
2339: end if;
2340: --
2333: hr_utility.set_location(l_proc,20);
2334: hr_utility.trace('EE being updated>' || p_element_entry_id || '<');
2335: hr_utility.trace('VSD>' || p_validation_start_date || '<');
2336: hr_utility.trace('VED>' || p_validation_end_date || '<');
2337: hr_utility.trace('EE ESD>' || p_ee_effective_start_date || '<');
2338: hr_utility.trace('EE EED>' || p_ee_effective_end_date || '<');
2339: end if;
2340: --
2341: -- Fetch the assignment criteria
2334: hr_utility.trace('EE being updated>' || p_element_entry_id || '<');
2335: hr_utility.trace('VSD>' || p_validation_start_date || '<');
2336: hr_utility.trace('VED>' || p_validation_end_date || '<');
2337: hr_utility.trace('EE ESD>' || p_ee_effective_start_date || '<');
2338: hr_utility.trace('EE EED>' || p_ee_effective_end_date || '<');
2339: end if;
2340: --
2341: -- Fetch the assignment criteria
2342: open_asg_criteria_cur(p_assignment_id, p_validation_start_date, l_asg_criteria_cv);
2364: --
2365: loop
2366: --
2367: if g_debug then
2368: hr_utility.set_location(l_proc,25);
2369: end if;
2370: --
2371: fetch l_eligible_links_cv into rec_eligible_links;
2372: exit when l_eligible_links_cv%notfound;
2371: fetch l_eligible_links_cv into rec_eligible_links;
2372: exit when l_eligible_links_cv%notfound;
2373: --
2374: if g_debug then
2375: hr_utility.set_location(l_proc,30);
2376: hr_utility.trace('***** element_link_id>' ||
2377: rec_eligible_links.element_link_id || '<');
2378: hr_utility.trace('***** ESD of EL>' ||
2379: rec_eligible_links.effective_start_date || '<');
2372: exit when l_eligible_links_cv%notfound;
2373: --
2374: if g_debug then
2375: hr_utility.set_location(l_proc,30);
2376: hr_utility.trace('***** element_link_id>' ||
2377: rec_eligible_links.element_link_id || '<');
2378: hr_utility.trace('***** ESD of EL>' ||
2379: rec_eligible_links.effective_start_date || '<');
2380: hr_utility.trace('***** EED of EL>' ||
2374: if g_debug then
2375: hr_utility.set_location(l_proc,30);
2376: hr_utility.trace('***** element_link_id>' ||
2377: rec_eligible_links.element_link_id || '<');
2378: hr_utility.trace('***** ESD of EL>' ||
2379: rec_eligible_links.effective_start_date || '<');
2380: hr_utility.trace('***** EED of EL>' ||
2381: rec_eligible_links.effective_end_date || '<');
2382: end if;
2376: hr_utility.trace('***** element_link_id>' ||
2377: rec_eligible_links.element_link_id || '<');
2378: hr_utility.trace('***** ESD of EL>' ||
2379: rec_eligible_links.effective_start_date || '<');
2380: hr_utility.trace('***** EED of EL>' ||
2381: rec_eligible_links.effective_end_date || '<');
2382: end if;
2383: --
2384: l_calc_ee_esd := greatest(p_ee_effective_start_date,
2386: l_calc_ee_eed := least(p_ee_effective_end_date,
2387: rec_eligible_links.effective_end_date);
2388: /* Bug 14184639 Changes start */
2389: l_original_entry_id := p_element_entry_id;
2390: hr_utility.trace('Before:l_original_entry_id: '||l_original_entry_id);
2391: begin
2392: select 1
2393: into v_original_entry_exists
2394: from sys.dual
2410: exception
2411: when no_data_found then
2412: l_original_entry_id := g_original_entry_id;
2413: end;
2414: hr_utility.trace('After:l_original_entry_id: '||l_original_entry_id);
2415: /* Bug 14184639 Changes end */
2416: --
2417: hr_entry_api.insert_element_entry(
2418: p_effective_start_date => l_calc_ee_esd,
2497: end if;
2498: --
2499: if g_debug then
2500: --
2501: hr_utility.set_location(l_proc,40);
2502: hr_utility.trace('***** new EE>' || l_eeid_out || '<');
2503: hr_utility.trace('***** actual ESD of new EE>' ||
2504: l_calc_ee_esd || '<');
2505: hr_utility.trace('***** actual EED of new EE>' ||
2498: --
2499: if g_debug then
2500: --
2501: hr_utility.set_location(l_proc,40);
2502: hr_utility.trace('***** new EE>' || l_eeid_out || '<');
2503: hr_utility.trace('***** actual ESD of new EE>' ||
2504: l_calc_ee_esd || '<');
2505: hr_utility.trace('***** actual EED of new EE>' ||
2506: l_ee_eed_out || '<');
2499: if g_debug then
2500: --
2501: hr_utility.set_location(l_proc,40);
2502: hr_utility.trace('***** new EE>' || l_eeid_out || '<');
2503: hr_utility.trace('***** actual ESD of new EE>' ||
2504: l_calc_ee_esd || '<');
2505: hr_utility.trace('***** actual EED of new EE>' ||
2506: l_ee_eed_out || '<');
2507: --
2501: hr_utility.set_location(l_proc,40);
2502: hr_utility.trace('***** new EE>' || l_eeid_out || '<');
2503: hr_utility.trace('***** actual ESD of new EE>' ||
2504: l_calc_ee_esd || '<');
2505: hr_utility.trace('***** actual EED of new EE>' ||
2506: l_ee_eed_out || '<');
2507: --
2508: end if;
2509: --
2518: -- nb. only 1 EE exists at this stage, therefore no need
2519: -- to use ESD and EED
2520: --
2521: if g_debug then
2522: hr_utility.set_location(l_proc,50);
2523: hr_utility.trace('***** bring EED of new EE back');
2524: end if;
2525: --
2526: -- Change l_ee_eed_out here, for separate update to
2519: -- to use ESD and EED
2520: --
2521: if g_debug then
2522: hr_utility.set_location(l_proc,50);
2523: hr_utility.trace('***** bring EED of new EE back');
2524: end if;
2525: --
2526: -- Change l_ee_eed_out here, for separate update to
2527: -- pay_element_entries_f, below, which *always* occurs.
2561: -- call routine to maintain entities with FKs to element entry
2562: -- row just date ended and newly created
2563: --
2564: if g_debug then
2565: hr_utility.set_location(l_proc,60);
2566: hr_utility.trace('***** maintain dependent entities');
2567: end if;
2568: --
2569: maintain_dependent_entities(
2562: -- row just date ended and newly created
2563: --
2564: if g_debug then
2565: hr_utility.set_location(l_proc,60);
2566: hr_utility.trace('***** maintain dependent entities');
2567: end if;
2568: --
2569: maintain_dependent_entities(
2570: p_element_entry_id,
2575: l_calc_ee_eed
2576: );
2577: --
2578: if g_debug then
2579: hr_utility.set_location(l_proc,70);
2580: hr_utility.trace('********** AFTER OAB **********');
2581: end if;
2582: --
2583: p_entry_recreated := l_entry_recreated;
2576: );
2577: --
2578: if g_debug then
2579: hr_utility.set_location(l_proc,70);
2580: hr_utility.trace('********** AFTER OAB **********');
2581: end if;
2582: --
2583: p_entry_recreated := l_entry_recreated;
2584: --
2752: is
2753: --
2754: begin
2755: --
2756: hr_utility.trace('In hrentmnt.remove_ineligible_recurring');
2757: hr_utility.trace ('');
2758: hr_utility.trace (' p_assignment_id = '||to_char (p_assignment_id));
2759: hr_utility.trace (' p_entries_changed = '||p_entries_changed);
2760: hr_utility.trace (' p_validation_start_date = '||to_char(p_validation_start_date,'DD-MON-YYYY'));
2753: --
2754: begin
2755: --
2756: hr_utility.trace('In hrentmnt.remove_ineligible_recurring');
2757: hr_utility.trace ('');
2758: hr_utility.trace (' p_assignment_id = '||to_char (p_assignment_id));
2759: hr_utility.trace (' p_entries_changed = '||p_entries_changed);
2760: hr_utility.trace (' p_validation_start_date = '||to_char(p_validation_start_date,'DD-MON-YYYY'));
2761: hr_utility.trace (' p_validation_end_date = '||to_char(p_validation_end_date,'DD-MON-YYYY'));
2754: begin
2755: --
2756: hr_utility.trace('In hrentmnt.remove_ineligible_recurring');
2757: hr_utility.trace ('');
2758: hr_utility.trace (' p_assignment_id = '||to_char (p_assignment_id));
2759: hr_utility.trace (' p_entries_changed = '||p_entries_changed);
2760: hr_utility.trace (' p_validation_start_date = '||to_char(p_validation_start_date,'DD-MON-YYYY'));
2761: hr_utility.trace (' p_validation_end_date = '||to_char(p_validation_end_date,'DD-MON-YYYY'));
2762: hr_utility.trace (' p_dt_mode = '||p_dt_mode);
2755: --
2756: hr_utility.trace('In hrentmnt.remove_ineligible_recurring');
2757: hr_utility.trace ('');
2758: hr_utility.trace (' p_assignment_id = '||to_char (p_assignment_id));
2759: hr_utility.trace (' p_entries_changed = '||p_entries_changed);
2760: hr_utility.trace (' p_validation_start_date = '||to_char(p_validation_start_date,'DD-MON-YYYY'));
2761: hr_utility.trace (' p_validation_end_date = '||to_char(p_validation_end_date,'DD-MON-YYYY'));
2762: hr_utility.trace (' p_dt_mode = '||p_dt_mode);
2763: hr_utility.trace ('');
2756: hr_utility.trace('In hrentmnt.remove_ineligible_recurring');
2757: hr_utility.trace ('');
2758: hr_utility.trace (' p_assignment_id = '||to_char (p_assignment_id));
2759: hr_utility.trace (' p_entries_changed = '||p_entries_changed);
2760: hr_utility.trace (' p_validation_start_date = '||to_char(p_validation_start_date,'DD-MON-YYYY'));
2761: hr_utility.trace (' p_validation_end_date = '||to_char(p_validation_end_date,'DD-MON-YYYY'));
2762: hr_utility.trace (' p_dt_mode = '||p_dt_mode);
2763: hr_utility.trace ('');
2764: --
2757: hr_utility.trace ('');
2758: hr_utility.trace (' p_assignment_id = '||to_char (p_assignment_id));
2759: hr_utility.trace (' p_entries_changed = '||p_entries_changed);
2760: hr_utility.trace (' p_validation_start_date = '||to_char(p_validation_start_date,'DD-MON-YYYY'));
2761: hr_utility.trace (' p_validation_end_date = '||to_char(p_validation_end_date,'DD-MON-YYYY'));
2762: hr_utility.trace (' p_dt_mode = '||p_dt_mode);
2763: hr_utility.trace ('');
2764: --
2765: end check_parameters;
2758: hr_utility.trace (' p_assignment_id = '||to_char (p_assignment_id));
2759: hr_utility.trace (' p_entries_changed = '||p_entries_changed);
2760: hr_utility.trace (' p_validation_start_date = '||to_char(p_validation_start_date,'DD-MON-YYYY'));
2761: hr_utility.trace (' p_validation_end_date = '||to_char(p_validation_end_date,'DD-MON-YYYY'));
2762: hr_utility.trace (' p_dt_mode = '||p_dt_mode);
2763: hr_utility.trace ('');
2764: --
2765: end check_parameters;
2766: --
2759: hr_utility.trace (' p_entries_changed = '||p_entries_changed);
2760: hr_utility.trace (' p_validation_start_date = '||to_char(p_validation_start_date,'DD-MON-YYYY'));
2761: hr_utility.trace (' p_validation_end_date = '||to_char(p_validation_end_date,'DD-MON-YYYY'));
2762: hr_utility.trace (' p_dt_mode = '||p_dt_mode);
2763: hr_utility.trace ('');
2764: --
2765: end check_parameters;
2766: --
2767: --
2810: l_legislation_code varchar2(10);
2811: begin
2812: --
2813: if g_debug then
2814: hr_utility.trace ('***** doing normal delete of REE');
2815: hr_utility.trace ('***** caching EE before delete');
2816: end if;
2817: --
2818: hrentmnt.cache_element_entry(
2811: begin
2812: --
2813: if g_debug then
2814: hr_utility.trace ('***** doing normal delete of REE');
2815: hr_utility.trace ('***** caching EE before delete');
2816: end if;
2817: --
2818: hrentmnt.cache_element_entry(
2819: p_element_entry_id,
2874: if not l_entry_recreated then
2875: --
2876: -- Cached entry was not recreated so proceed with deletes
2877: if g_debug then
2878: hr_utility.trace(' Cached entry not recreated. Continuing with delete.');
2879: end if;
2880: --
2881: -- Only delete grossup balance exclusion rows if we are purging the
2882: -- entry.
2978: --
2979: begin
2980: --
2981: if g_debug then
2982: hr_utility.trace ('***** updating "end" date of current REE backwards *****');
2983: hr_utility.trace ('***** VSD|<----- |VED *****');
2984: hr_utility.trace ('***** current |-----------------| *****');
2985: end if;
2986: --
2979: begin
2980: --
2981: if g_debug then
2982: hr_utility.trace ('***** updating "end" date of current REE backwards *****');
2983: hr_utility.trace ('***** VSD|<----- |VED *****');
2984: hr_utility.trace ('***** current |-----------------| *****');
2985: end if;
2986: --
2987: hrentmnt.validate_adjust_entry
2980: --
2981: if g_debug then
2982: hr_utility.trace ('***** updating "end" date of current REE backwards *****');
2983: hr_utility.trace ('***** VSD|<----- |VED *****');
2984: hr_utility.trace ('***** current |-----------------| *****');
2985: end if;
2986: --
2987: hrentmnt.validate_adjust_entry
2988: ('DELETE',
3134:
3135: begin
3136: --
3137: if g_debug then
3138: hr_utility.trace ('***** updating "start" date of current REE forwards *****');
3139: hr_utility.trace ('***** VSD| ----->|VED *****');
3140: hr_utility.trace ('***** current |-----------------> *****');
3141: end if;
3142: --
3135: begin
3136: --
3137: if g_debug then
3138: hr_utility.trace ('***** updating "start" date of current REE forwards *****');
3139: hr_utility.trace ('***** VSD| ----->|VED *****');
3140: hr_utility.trace ('***** current |-----------------> *****');
3141: end if;
3142: --
3143: hrentmnt.validate_adjust_entry
3136: --
3137: if g_debug then
3138: hr_utility.trace ('***** updating "start" date of current REE forwards *****');
3139: hr_utility.trace ('***** VSD| ----->|VED *****');
3140: hr_utility.trace ('***** current |-----------------> *****');
3141: end if;
3142: --
3143: hrentmnt.validate_adjust_entry
3144: ('DELETE',
3183: -- also maintain salary proposal change date
3184: --
3185: if p_ee_creator_type = 'SP' then
3186: if g_debug then
3187: hr_utility.trace ('***** maintain end date of PP >' ||
3188: (p_validation_end_date + 1) || '<');
3189: end if;
3190: UPDATE PER_PAY_PROPOSALS pp
3191: SET pp.change_date = p_validation_end_date + 1
3209: fetch csr_ele_entry_details into l_ele_ent_rec;
3210: close csr_ele_entry_details;
3211: exception
3212: when no_data_found then
3213: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
3214: hr_utility.set_message_token('PROCEDURE',
3215: 'hrentmnt.bring_ree_start_date_forwards');
3216: hr_utility.set_message_token('STEP','1');
3217: hr_utility.raise_error;
3210: close csr_ele_entry_details;
3211: exception
3212: when no_data_found then
3213: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
3214: hr_utility.set_message_token('PROCEDURE',
3215: 'hrentmnt.bring_ree_start_date_forwards');
3216: hr_utility.set_message_token('STEP','1');
3217: hr_utility.raise_error;
3218: end;
3212: when no_data_found then
3213: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
3214: hr_utility.set_message_token('PROCEDURE',
3215: 'hrentmnt.bring_ree_start_date_forwards');
3216: hr_utility.set_message_token('STEP','1');
3217: hr_utility.raise_error;
3218: end;
3219: hr_utility.trace('Debug p_validation_end_date:'||p_validation_end_date);
3220: hr_utility.trace('Debug p_ee_effective_start_date:'||p_ee_effective_start_date);
3213: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
3214: hr_utility.set_message_token('PROCEDURE',
3215: 'hrentmnt.bring_ree_start_date_forwards');
3216: hr_utility.set_message_token('STEP','1');
3217: hr_utility.raise_error;
3218: end;
3219: hr_utility.trace('Debug p_validation_end_date:'||p_validation_end_date);
3220: hr_utility.trace('Debug p_ee_effective_start_date:'||p_ee_effective_start_date);
3221: hr_utility.trace('Debug pay_dyn_triggers.g_dyt_mode:'||pay_dyn_triggers.g_dyt_mode);
3215: 'hrentmnt.bring_ree_start_date_forwards');
3216: hr_utility.set_message_token('STEP','1');
3217: hr_utility.raise_error;
3218: end;
3219: hr_utility.trace('Debug p_validation_end_date:'||p_validation_end_date);
3220: hr_utility.trace('Debug p_ee_effective_start_date:'||p_ee_effective_start_date);
3221: hr_utility.trace('Debug pay_dyn_triggers.g_dyt_mode:'||pay_dyn_triggers.g_dyt_mode);
3222:
3223: l_dyt_mode := pay_dyn_triggers.g_dyt_mode;
3216: hr_utility.set_message_token('STEP','1');
3217: hr_utility.raise_error;
3218: end;
3219: hr_utility.trace('Debug p_validation_end_date:'||p_validation_end_date);
3220: hr_utility.trace('Debug p_ee_effective_start_date:'||p_ee_effective_start_date);
3221: hr_utility.trace('Debug pay_dyn_triggers.g_dyt_mode:'||pay_dyn_triggers.g_dyt_mode);
3222:
3223: l_dyt_mode := pay_dyn_triggers.g_dyt_mode;
3224: pay_dyn_triggers.g_dyt_mode := 'UPDATE';
3217: hr_utility.raise_error;
3218: end;
3219: hr_utility.trace('Debug p_validation_end_date:'||p_validation_end_date);
3220: hr_utility.trace('Debug p_ee_effective_start_date:'||p_ee_effective_start_date);
3221: hr_utility.trace('Debug pay_dyn_triggers.g_dyt_mode:'||pay_dyn_triggers.g_dyt_mode);
3222:
3223: l_dyt_mode := pay_dyn_triggers.g_dyt_mode;
3224: pay_dyn_triggers.g_dyt_mode := 'UPDATE';
3225:
3374: if p_dt_mode = 'ZAP' then
3375: --
3376: if g_debug then
3377: --
3378: hr_utility.trace('ZAP orphaned entries and entry values');
3379: --
3380: end if;
3381: --
3382: -- Remove orphaned entries and entry values
3392: end loop;
3393: --
3394: if g_debug then
3395: --
3396: hr_utility.trace('Out hrentmnt.remove_ineligible_recurring');
3397: --
3398: end if;
3399: --
3400: return;
3484: --
3485: else
3486: -- start of change 115.23 --
3487: if g_debug then
3488: hr_utility.trace ('***** not adjusting, REE outside validation range *****');
3489: hr_utility.trace ('***** VSD| |VED *****');
3490: hr_utility.trace ('***** current |----| *****');
3491: hr_utility.trace ('***** or *****');
3492: hr_utility.trace ('***** current |-------> *****');
3485: else
3486: -- start of change 115.23 --
3487: if g_debug then
3488: hr_utility.trace ('***** not adjusting, REE outside validation range *****');
3489: hr_utility.trace ('***** VSD| |VED *****');
3490: hr_utility.trace ('***** current |----| *****');
3491: hr_utility.trace ('***** or *****');
3492: hr_utility.trace ('***** current |-------> *****');
3493: end if;
3486: -- start of change 115.23 --
3487: if g_debug then
3488: hr_utility.trace ('***** not adjusting, REE outside validation range *****');
3489: hr_utility.trace ('***** VSD| |VED *****');
3490: hr_utility.trace ('***** current |----| *****');
3491: hr_utility.trace ('***** or *****');
3492: hr_utility.trace ('***** current |-------> *****');
3493: end if;
3494: -- end of change 115.23 --
3487: if g_debug then
3488: hr_utility.trace ('***** not adjusting, REE outside validation range *****');
3489: hr_utility.trace ('***** VSD| |VED *****');
3490: hr_utility.trace ('***** current |----| *****');
3491: hr_utility.trace ('***** or *****');
3492: hr_utility.trace ('***** current |-------> *****');
3493: end if;
3494: -- end of change 115.23 --
3495: end if;
3488: hr_utility.trace ('***** not adjusting, REE outside validation range *****');
3489: hr_utility.trace ('***** VSD| |VED *****');
3490: hr_utility.trace ('***** current |----| *****');
3491: hr_utility.trace ('***** or *****');
3492: hr_utility.trace ('***** current |-------> *****');
3493: end if;
3494: -- end of change 115.23 --
3495: end if;
3496: end loop;
3495: end if;
3496: end loop;
3497: --
3498: if g_debug then
3499: hr_utility.trace('Out hrentmnt.remove_ineligible_recurring');
3500: end if;
3501: --
3502: end remove_ineligible_recurring;
3503: --
3602: asg.effective_start_date)));
3603: --
3604: procedure check_parameters is
3605: begin
3606: hr_utility.trace('In hrentmnt.remove_ineligible_nonrecurring');
3607: --
3608: hr_utility.trace ('');
3609: hr_utility.trace (' p_assignment_id = '
3610: ||to_char(p_assignment_id));
3604: procedure check_parameters is
3605: begin
3606: hr_utility.trace('In hrentmnt.remove_ineligible_nonrecurring');
3607: --
3608: hr_utility.trace ('');
3609: hr_utility.trace (' p_assignment_id = '
3610: ||to_char(p_assignment_id));
3611: hr_utility.trace (' p_validation_start_date = '
3612: ||to_char(p_validation_start_date));
3605: begin
3606: hr_utility.trace('In hrentmnt.remove_ineligible_nonrecurring');
3607: --
3608: hr_utility.trace ('');
3609: hr_utility.trace (' p_assignment_id = '
3610: ||to_char(p_assignment_id));
3611: hr_utility.trace (' p_validation_start_date = '
3612: ||to_char(p_validation_start_date));
3613: hr_utility.trace (' p_validation_end_date = '
3607: --
3608: hr_utility.trace ('');
3609: hr_utility.trace (' p_assignment_id = '
3610: ||to_char(p_assignment_id));
3611: hr_utility.trace (' p_validation_start_date = '
3612: ||to_char(p_validation_start_date));
3613: hr_utility.trace (' p_validation_end_date = '
3614: ||to_char(p_validation_end_date));
3615: hr_utility.trace (' p_entries_changed = '
3609: hr_utility.trace (' p_assignment_id = '
3610: ||to_char(p_assignment_id));
3611: hr_utility.trace (' p_validation_start_date = '
3612: ||to_char(p_validation_start_date));
3613: hr_utility.trace (' p_validation_end_date = '
3614: ||to_char(p_validation_end_date));
3615: hr_utility.trace (' p_entries_changed = '
3616: ||p_entries_changed);
3617: hr_utility.trace ('');
3611: hr_utility.trace (' p_validation_start_date = '
3612: ||to_char(p_validation_start_date));
3613: hr_utility.trace (' p_validation_end_date = '
3614: ||to_char(p_validation_end_date));
3615: hr_utility.trace (' p_entries_changed = '
3616: ||p_entries_changed);
3617: hr_utility.trace ('');
3618: --
3619: end check_parameters;
3613: hr_utility.trace (' p_validation_end_date = '
3614: ||to_char(p_validation_end_date));
3615: hr_utility.trace (' p_entries_changed = '
3616: ||p_entries_changed);
3617: hr_utility.trace ('');
3618: --
3619: end check_parameters;
3620: --
3621: begin
3676: from pay_element_entries_f
3677: where element_entry_id=v_entry.element_entry_id;
3678:
3679: if g_debug then
3680: hr_utility.trace(' obj vber no : '||l_obj_ver_num);
3681: hr_utility.trace(' p_validation_start_date : '||p_validation_start_date);
3682: end if;
3683:
3684: if(v_entry.effective_start_date>= p_validation_start_date) THEN
3677: where element_entry_id=v_entry.element_entry_id;
3678:
3679: if g_debug then
3680: hr_utility.trace(' obj vber no : '||l_obj_ver_num);
3681: hr_utility.trace(' p_validation_start_date : '||p_validation_start_date);
3682: end if;
3683:
3684: if(v_entry.effective_start_date>= p_validation_start_date) THEN
3685:
3691: p_processing_type => 'N',
3692: p_entry_type => null ,
3693: p_effective_date => null);
3694: if g_debug then
3695: hr_utility.trace('l_prof_value : '|| l_prof_value);
3696: hr_utility.trace('l_entry_processed : '|| l_entry_processed);
3697: end if;
3698:
3699: if (l_prof_value = 'PN' and l_entry_processed = 'N') then
3692: p_entry_type => null ,
3693: p_effective_date => null);
3694: if g_debug then
3695: hr_utility.trace('l_prof_value : '|| l_prof_value);
3696: hr_utility.trace('l_entry_processed : '|| l_entry_processed);
3697: end if;
3698:
3699: if (l_prof_value = 'PN' and l_entry_processed = 'N') then
3700: hr_utility.set_message (800,'PAY_33469_UNPROC_NONREC_PURGE');
3696: hr_utility.trace('l_entry_processed : '|| l_entry_processed);
3697: end if;
3698:
3699: if (l_prof_value = 'PN' and l_entry_processed = 'N') then
3700: hr_utility.set_message (800,'PAY_33469_UNPROC_NONREC_PURGE');
3701: hr_utility.raise_error;
3702: end if;
3703:
3704: if g_debug then
3697: end if;
3698:
3699: if (l_prof_value = 'PN' and l_entry_processed = 'N') then
3700: hr_utility.set_message (800,'PAY_33469_UNPROC_NONREC_PURGE');
3701: hr_utility.raise_error;
3702: end if;
3703:
3704: if g_debug then
3705: hr_utility.trace(' ZAP element entry ');
3701: hr_utility.raise_error;
3702: end if;
3703:
3704: if g_debug then
3705: hr_utility.trace(' ZAP element entry ');
3706: end if;
3707:
3708: If lv_asg_exists = 0 then
3709: /*Bug 9710104 If assignment doesnt exists delete the entries */
3727: end if;
3728: else
3729:
3730: if g_debug then
3731: hr_utility.trace(' DELETE element entry ');
3732: end if;
3733:
3734: pay_element_entry_api.delete_element_entry
3735: (p_datetrack_delete_mode => 'DELETE'
3755: --
3756: end loop;
3757: --
3758: if g_debug then
3759: hr_utility.trace('Out hrentmnt.remove_ineligible_nonrecurring');
3760: end if;
3761: --
3762: end remove_ineligible_nonrecurring;
3763: --
3796: procedure check_parameters is
3797: --
3798: begin
3799: --
3800: hr_utility.trace('In hrentmnt.return_entry_dates');
3801: hr_utility.trace ('');
3802: hr_utility.trace (' p_assignment_id = '
3803: ||to_char (p_assignment_id));
3804: hr_utility.trace (' p_asg_start_date = '
3797: --
3798: begin
3799: --
3800: hr_utility.trace('In hrentmnt.return_entry_dates');
3801: hr_utility.trace ('');
3802: hr_utility.trace (' p_assignment_id = '
3803: ||to_char (p_assignment_id));
3804: hr_utility.trace (' p_asg_start_date = '
3805: ||to_char (p_asg_start_date));
3798: begin
3799: --
3800: hr_utility.trace('In hrentmnt.return_entry_dates');
3801: hr_utility.trace ('');
3802: hr_utility.trace (' p_assignment_id = '
3803: ||to_char (p_assignment_id));
3804: hr_utility.trace (' p_asg_start_date = '
3805: ||to_char (p_asg_start_date));
3806: hr_utility.trace (' p_element_link_id = '
3800: hr_utility.trace('In hrentmnt.return_entry_dates');
3801: hr_utility.trace ('');
3802: hr_utility.trace (' p_assignment_id = '
3803: ||to_char (p_assignment_id));
3804: hr_utility.trace (' p_asg_start_date = '
3805: ||to_char (p_asg_start_date));
3806: hr_utility.trace (' p_element_link_id = '
3807: ||to_char (p_element_link_id));
3808: hr_utility.trace (' p_link_start_date = '
3802: hr_utility.trace (' p_assignment_id = '
3803: ||to_char (p_assignment_id));
3804: hr_utility.trace (' p_asg_start_date = '
3805: ||to_char (p_asg_start_date));
3806: hr_utility.trace (' p_element_link_id = '
3807: ||to_char (p_element_link_id));
3808: hr_utility.trace (' p_link_start_date = '
3809: ||to_char (p_link_start_date));
3810: hr_utility.trace (' p_standard_link_flag = '
3804: hr_utility.trace (' p_asg_start_date = '
3805: ||to_char (p_asg_start_date));
3806: hr_utility.trace (' p_element_link_id = '
3807: ||to_char (p_element_link_id));
3808: hr_utility.trace (' p_link_start_date = '
3809: ||to_char (p_link_start_date));
3810: hr_utility.trace (' p_standard_link_flag = '
3811: ||p_standard_link_flag);
3812: hr_utility.trace ('');
3806: hr_utility.trace (' p_element_link_id = '
3807: ||to_char (p_element_link_id));
3808: hr_utility.trace (' p_link_start_date = '
3809: ||to_char (p_link_start_date));
3810: hr_utility.trace (' p_standard_link_flag = '
3811: ||p_standard_link_flag);
3812: hr_utility.trace ('');
3813: --
3814: end check_parameters;
3808: hr_utility.trace (' p_link_start_date = '
3809: ||to_char (p_link_start_date));
3810: hr_utility.trace (' p_standard_link_flag = '
3811: ||p_standard_link_flag);
3812: hr_utility.trace ('');
3813: --
3814: end check_parameters;
3815: --
3816: begin
3869: p_entry_end_date := v_entry_end_date;
3870: end if;
3871: --
3872: if g_debug then
3873: hr_utility.trace('Out hrentmnt.return_entry_dates');
3874: end if;
3875: --
3876: end return_entry_dates;
3877: --
3908: procedure check_parameters is
3909: --
3910: begin
3911: --
3912: hr_utility.trace('In hrentmnt.mult_ent_allowed_flag');
3913: hr_utility.trace ('');
3914: hr_utility.trace (' p_element_link_id = '
3915: ||to_char (p_element_link_id));
3916: hr_utility.trace ('');
3909: --
3910: begin
3911: --
3912: hr_utility.trace('In hrentmnt.mult_ent_allowed_flag');
3913: hr_utility.trace ('');
3914: hr_utility.trace (' p_element_link_id = '
3915: ||to_char (p_element_link_id));
3916: hr_utility.trace ('');
3917: --
3910: begin
3911: --
3912: hr_utility.trace('In hrentmnt.mult_ent_allowed_flag');
3913: hr_utility.trace ('');
3914: hr_utility.trace (' p_element_link_id = '
3915: ||to_char (p_element_link_id));
3916: hr_utility.trace ('');
3917: --
3918: end check_parameters;
3912: hr_utility.trace('In hrentmnt.mult_ent_allowed_flag');
3913: hr_utility.trace ('');
3914: hr_utility.trace (' p_element_link_id = '
3915: ||to_char (p_element_link_id));
3916: hr_utility.trace ('');
3917: --
3918: end check_parameters;
3919: --
3920: begin
3926: open csr_element(p_element_link_id);
3927: fetch csr_element into v_mult_ent_allowed_flag;
3928: if csr_element%notfound then
3929: close csr_element;
3930: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
3931: hr_utility.set_message_token('PROCEDURE',
3932: 'hrentmnt.mult_ent_allowed_flag');
3933: hr_utility.set_message_token('STEP','1');
3934: hr_utility.raise_error;
3927: fetch csr_element into v_mult_ent_allowed_flag;
3928: if csr_element%notfound then
3929: close csr_element;
3930: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
3931: hr_utility.set_message_token('PROCEDURE',
3932: 'hrentmnt.mult_ent_allowed_flag');
3933: hr_utility.set_message_token('STEP','1');
3934: hr_utility.raise_error;
3935: end if;
3929: close csr_element;
3930: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
3931: hr_utility.set_message_token('PROCEDURE',
3932: 'hrentmnt.mult_ent_allowed_flag');
3933: hr_utility.set_message_token('STEP','1');
3934: hr_utility.raise_error;
3935: end if;
3936: close csr_element;
3937: --
3930: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
3931: hr_utility.set_message_token('PROCEDURE',
3932: 'hrentmnt.mult_ent_allowed_flag');
3933: hr_utility.set_message_token('STEP','1');
3934: hr_utility.raise_error;
3935: end if;
3936: close csr_element;
3937: --
3938: return v_mult_ent_allowed_flag;
4105: l_cnt NUMBER := 0;
4106: begin
4107: --
4108: if g_debug then
4109: hr_utility.set_location(l_proc, 10);
4110: hr_utility.trace(' p_assignment_id = ' ||to_char(p_assignment_id));
4111: hr_utility.trace(' p_validation_start_date = ' ||to_char(p_validation_start_date));
4112: hr_utility.trace(' p_validation_end_date = ' ||to_char(p_validation_end_date));
4113: end if;
4106: begin
4107: --
4108: if g_debug then
4109: hr_utility.set_location(l_proc, 10);
4110: hr_utility.trace(' p_assignment_id = ' ||to_char(p_assignment_id));
4111: hr_utility.trace(' p_validation_start_date = ' ||to_char(p_validation_start_date));
4112: hr_utility.trace(' p_validation_end_date = ' ||to_char(p_validation_end_date));
4113: end if;
4114: --
4107: --
4108: if g_debug then
4109: hr_utility.set_location(l_proc, 10);
4110: hr_utility.trace(' p_assignment_id = ' ||to_char(p_assignment_id));
4111: hr_utility.trace(' p_validation_start_date = ' ||to_char(p_validation_start_date));
4112: hr_utility.trace(' p_validation_end_date = ' ||to_char(p_validation_end_date));
4113: end if;
4114: --
4115: -- Get the assignment criteria
4108: if g_debug then
4109: hr_utility.set_location(l_proc, 10);
4110: hr_utility.trace(' p_assignment_id = ' ||to_char(p_assignment_id));
4111: hr_utility.trace(' p_validation_start_date = ' ||to_char(p_validation_start_date));
4112: hr_utility.trace(' p_validation_end_date = ' ||to_char(p_validation_end_date));
4113: end if;
4114: --
4115: -- Get the assignment criteria
4116: open_asg_criteria_cur(p_assignment_id, p_validation_start_date, l_asg_criteria_cv);
4121: --
4122: begin
4123: --
4124: if g_debug then
4125: hr_utility.set_location(l_proc, 20);
4126: end if;
4127: --
4128: select /*+ INDEX(paf PER_ASSIGNMENTS_F_PK)*/ plr.rule_mode
4129: into l_adjust_ee_source
4142: l_adjust_ee_source := 'A';
4143: end;
4144: --
4145: if g_debug then
4146: hr_utility.trace(' l_adjust_ee_source: '||l_adjust_ee_source);
4147: end if;
4148: --
4149: -- Bugfix 5584631
4150: -- Loop through all invalidated nonrecurring entries.
4162: l_adjust_ee_source
4163: ) loop
4164: --
4165: if g_debug then
4166: hr_utility.set_location(l_proc, 30);
4167: end if;
4168: --
4169: -- Look for an alternative element link based on the invalidated entry's
4170: -- element type and the assignment criteria
4201: --
4202: if not l_link_suitable then
4203: --
4204: if g_debug then
4205: hr_utility.set_location(l_proc, 40);
4206: end if;
4207: --
4208: -- No alternative link found.
4209: -- Clear down l_entry_table and raise error.
4218: -- Special entry was invalidated eg. Balance Adjustment, Quickpay etc .
4219: -- Lookup the entry type for reporting in error.
4220: --
4221: if g_debug then
4222: hr_utility.set_location(l_proc, 50);
4223: end if;
4224: --
4225: select hl.meaning
4226: into l_creator_type_meaning
4227: from hr_lookups hl
4228: where hl.lookup_type = 'CREATOR_TYPE'
4229: and hl.lookup_code = r_entry.creator_type;
4230: --
4231: hr_utility.set_message(801,'HR_6589_ASS_SPCL_NONREC_EXIST');
4232: hr_utility.set_message_token('TYPE',l_creator_type_meaning);
4233: hr_utility.raise_error;
4234: --
4235: else
4228: where hl.lookup_type = 'CREATOR_TYPE'
4229: and hl.lookup_code = r_entry.creator_type;
4230: --
4231: hr_utility.set_message(801,'HR_6589_ASS_SPCL_NONREC_EXIST');
4232: hr_utility.set_message_token('TYPE',l_creator_type_meaning);
4233: hr_utility.raise_error;
4234: --
4235: else
4236: --
4229: and hl.lookup_code = r_entry.creator_type;
4230: --
4231: hr_utility.set_message(801,'HR_6589_ASS_SPCL_NONREC_EXIST');
4232: hr_utility.set_message_token('TYPE',l_creator_type_meaning);
4233: hr_utility.raise_error;
4234: --
4235: else
4236: --
4237: -- An unprocessed nonrecurring entry was invalidated. Includes
4237: -- An unprocessed nonrecurring entry was invalidated. Includes
4238: -- overrides etc .
4239: --
4240: if g_debug then
4241: hr_utility.set_location(l_proc, 60);
4242: end if;
4243:
4244: -- 8230599 removed delete logic as val_nonrec is not supposed to delete any entries. All the deletes
4245: -- are done in remove_ineligible_nonrecurring
4246:
4247: -- 8311681
4248: p_entries_changed := 'I';
4249:
4250: -- hr_utility.set_message(801,'HR_6588_ASS_UNPROC_NONREC');
4251: -- hr_utility.raise_error;
4252:
4253: --
4254: end if;
4247: -- 8311681
4248: p_entries_changed := 'I';
4249:
4250: -- hr_utility.set_message(801,'HR_6588_ASS_UNPROC_NONREC');
4251: -- hr_utility.raise_error;
4252:
4253: --
4254: end if;
4255: --
4258: -- A suitable alternative link was found
4259: -- Store the new link id with the entry details for a bulk update later
4260: --
4261: if g_debug then
4262: hr_utility.set_location(l_proc, 70);
4263: hr_utility.trace(' Alt element_link_id found for entry '||to_char(r_entry.element_entry_id));
4264: hr_utility.trace(' Old element_link_id: '||to_char(r_entry.element_link_id)||', new element_link_id: '||to_char(l_eligible_links_rec.element_link_id));
4265: end if;
4266: --
4259: -- Store the new link id with the entry details for a bulk update later
4260: --
4261: if g_debug then
4262: hr_utility.set_location(l_proc, 70);
4263: hr_utility.trace(' Alt element_link_id found for entry '||to_char(r_entry.element_entry_id));
4264: hr_utility.trace(' Old element_link_id: '||to_char(r_entry.element_link_id)||', new element_link_id: '||to_char(l_eligible_links_rec.element_link_id));
4265: end if;
4266: --
4267: l_entry_table.element_entry_id(l_counter) := r_entry.element_entry_id;
4260: --
4261: if g_debug then
4262: hr_utility.set_location(l_proc, 70);
4263: hr_utility.trace(' Alt element_link_id found for entry '||to_char(r_entry.element_entry_id));
4264: hr_utility.trace(' Old element_link_id: '||to_char(r_entry.element_link_id)||', new element_link_id: '||to_char(l_eligible_links_rec.element_link_id));
4265: end if;
4266: --
4267: l_entry_table.element_entry_id(l_counter) := r_entry.element_entry_id;
4268: l_entry_table.element_link_id(l_counter) := l_eligible_links_rec.element_link_id;
4277: --
4278: if l_entry_table.element_entry_id.count > 0 then
4279: --
4280: if g_debug then
4281: hr_utility.set_location(l_proc, 80);
4282: hr_utility.trace('Doing bulk update of element_link_id');
4283: end if;
4284: --
4285: -- Do bulk update of element entries, to point to their respective new
4278: if l_entry_table.element_entry_id.count > 0 then
4279: --
4280: if g_debug then
4281: hr_utility.set_location(l_proc, 80);
4282: hr_utility.trace('Doing bulk update of element_link_id');
4283: end if;
4284: --
4285: -- Do bulk update of element entries, to point to their respective new
4286: -- alternative links
4294: --
4295: end if;
4296: --
4297: if g_debug then
4298: hr_utility.set_location(l_proc, 90);
4299: end if;
4300: --
4301: end val_nonrec_entries;
4302: --
4331: and pee.effective_end_date between ptp.start_date and ptp.end_date
4332: group by pee.target_entry_id ,ptp.time_period_id
4333: having count(*) > 1);
4334: begin
4335: hr_utility.set_location('hrentmnt.validate_adjustment_entries',10);
4336: for csr_cae_rec in csr_cae loop
4337: -- any record fetched is an error
4338: hr_utility.set_message(801, 'PAY_34196_INVALID_ADJUSTMENTS');
4339: hr_utility.raise_error;
4334: begin
4335: hr_utility.set_location('hrentmnt.validate_adjustment_entries',10);
4336: for csr_cae_rec in csr_cae loop
4337: -- any record fetched is an error
4338: hr_utility.set_message(801, 'PAY_34196_INVALID_ADJUSTMENTS');
4339: hr_utility.raise_error;
4340: end loop;
4341: hr_utility.set_location('hrentmnt.validate_adjustment_entries',20);
4342: return;
4335: hr_utility.set_location('hrentmnt.validate_adjustment_entries',10);
4336: for csr_cae_rec in csr_cae loop
4337: -- any record fetched is an error
4338: hr_utility.set_message(801, 'PAY_34196_INVALID_ADJUSTMENTS');
4339: hr_utility.raise_error;
4340: end loop;
4341: hr_utility.set_location('hrentmnt.validate_adjustment_entries',20);
4342: return;
4343: end validate_adjustment_entries;
4337: -- any record fetched is an error
4338: hr_utility.set_message(801, 'PAY_34196_INVALID_ADJUSTMENTS');
4339: hr_utility.raise_error;
4340: end loop;
4341: hr_utility.set_location('hrentmnt.validate_adjustment_entries',20);
4342: return;
4343: end validate_adjustment_entries;
4344: --
4345: ------------------------------------------------------------------------------
4418: procedure check_parameters is
4419: --
4420: begin
4421: --
4422: hr_utility.trace ('In hrentmnt.adjust_nonrecurring_entries');
4423: hr_utility.trace ('');
4424: hr_utility.trace (' p_assignment_id = '
4425: ||to_char (p_assignment_id));
4426: hr_utility.trace (' p_val_start_date_minus_one = '
4419: --
4420: begin
4421: --
4422: hr_utility.trace ('In hrentmnt.adjust_nonrecurring_entries');
4423: hr_utility.trace ('');
4424: hr_utility.trace (' p_assignment_id = '
4425: ||to_char (p_assignment_id));
4426: hr_utility.trace (' p_val_start_date_minus_one = '
4427: ||to_char (p_val_start_date_minus_one));
4420: begin
4421: --
4422: hr_utility.trace ('In hrentmnt.adjust_nonrecurring_entries');
4423: hr_utility.trace ('');
4424: hr_utility.trace (' p_assignment_id = '
4425: ||to_char (p_assignment_id));
4426: hr_utility.trace (' p_val_start_date_minus_one = '
4427: ||to_char (p_val_start_date_minus_one));
4428: hr_utility.trace (' p_val_end_date_plus_one = '
4422: hr_utility.trace ('In hrentmnt.adjust_nonrecurring_entries');
4423: hr_utility.trace ('');
4424: hr_utility.trace (' p_assignment_id = '
4425: ||to_char (p_assignment_id));
4426: hr_utility.trace (' p_val_start_date_minus_one = '
4427: ||to_char (p_val_start_date_minus_one));
4428: hr_utility.trace (' p_val_end_date_plus_one = '
4429: ||to_char (p_val_end_date_plus_one));
4430: hr_utility.trace (' p_entries_changed = '
4424: hr_utility.trace (' p_assignment_id = '
4425: ||to_char (p_assignment_id));
4426: hr_utility.trace (' p_val_start_date_minus_one = '
4427: ||to_char (p_val_start_date_minus_one));
4428: hr_utility.trace (' p_val_end_date_plus_one = '
4429: ||to_char (p_val_end_date_plus_one));
4430: hr_utility.trace (' p_entries_changed = '
4431: ||p_entries_changed);
4432: hr_utility.trace ('');
4426: hr_utility.trace (' p_val_start_date_minus_one = '
4427: ||to_char (p_val_start_date_minus_one));
4428: hr_utility.trace (' p_val_end_date_plus_one = '
4429: ||to_char (p_val_end_date_plus_one));
4430: hr_utility.trace (' p_entries_changed = '
4431: ||p_entries_changed);
4432: hr_utility.trace ('');
4433: --
4434: end check_parameters;
4428: hr_utility.trace (' p_val_end_date_plus_one = '
4429: ||to_char (p_val_end_date_plus_one));
4430: hr_utility.trace (' p_entries_changed = '
4431: ||p_entries_changed);
4432: hr_utility.trace ('');
4433: --
4434: end check_parameters;
4435: --
4436: begin
4445: properly in case of people group change in assignment information*/
4446: --Start
4447: if p_dt_mode in ('DELETE_NEXT_CHANGE','FUTURE_CHANGE') then
4448: if g_debug then
4449: hr_utility.trace ('1');
4450: end if;
4451: --
4452: select count(*) into v_start_date_check from per_time_periods where payroll_id in(
4453: select payroll_id from per_all_assignments_f where assignment_id=p_assignment_id
4459: and p_val_end_date_plus_one between effective_start_date and effective_end_date)
4460: and p_val_end_date_plus_one between start_date and end_date;
4461:
4462: if g_debug then
4463: hr_utility.trace ('2');
4464: end if;
4465: --
4466: if v_start_date_check=0 and v_end_date_check=0 then
4467: v_chng_date:=p_val_start_date_minus_one;
4470: else
4471: v_chng_date:=p_val_start_date_minus_one;
4472: end if;
4473: if g_debug then
4474: hr_utility.trace ('3');
4475: end if;
4476: --
4477: if v_start_date_check<>0 or v_end_date_check<>0 then
4478: select end_date into v_vale_start_date from per_time_periods where payroll_id in(
4481: and v_chng_date between start_date and end_date;
4482: end if;
4483:
4484: if g_debug then
4485: hr_utility.trace ('4');
4486: end if;
4487: --
4488: if v_vale_start_date<>p_val_start_date_minus_one then /*Bug 8798020 Removed query to get v_alu_cnt and the condition v_alu_cnt = 0 */
4489: v_vale_start_date:=p_val_start_date_minus_one;
4499: fetch get_asg_start_date into v_asg_start_date;
4500: close get_asg_start_date;
4501:
4502: if g_debug then
4503: hr_utility.trace('v_asg_start_date : '|| v_asg_start_date);
4504: end if;
4505:
4506: --End
4507: for v_entry in csr_entry(p_assignment_id,
4550: v_session_date := v_asg_start_date;
4551: end if;
4552:
4553: if g_debug then
4554: hr_utility.trace('Before calling get_nonrecurring_dates, v_session_date : '|| v_session_date);
4555: end if;
4556: v_min_eligible_date := null;
4557: v_max_eligible_date := null;
4558: --
4589: p_processing_type => 'N',
4590: p_entry_type => null ,
4591: p_effective_date => v_session_date);
4592: if g_debug then
4593: hr_utility.trace('HR_ADJUST_PROCESSED_NONREC_ENTRIES l_prof_value : '|| l_prof_value);
4594: hr_utility.trace('l_entry_processed : '|| l_entry_processed);
4595: end if;
4596: else
4597: l_entry_processed := 'N';
4590: p_entry_type => null ,
4591: p_effective_date => v_session_date);
4592: if g_debug then
4593: hr_utility.trace('HR_ADJUST_PROCESSED_NONREC_ENTRIES l_prof_value : '|| l_prof_value);
4594: hr_utility.trace('l_entry_processed : '|| l_entry_processed);
4595: end if;
4596: else
4597: l_entry_processed := 'N';
4598: end if;
4632: --
4633: end loop;
4634: --
4635: if g_debug then
4636: hr_utility.trace ('Out hrentmnt.adjust_nonrecurring_entries');
4637: end if;
4638: --
4639: end adjust_nonrecurring_entries;
4640: --
4824: procedure check_parameters is
4825: --
4826: begin
4827: --
4828: hr_utility.trace('In hrentmnt.adjust_recurring_entries');
4829: hr_utility.trace ('');
4830: hr_utility.trace (' p_dt_mode = '
4831: ||p_dt_mode);
4832: hr_utility.trace (' p_assignment_id = '
4825: --
4826: begin
4827: --
4828: hr_utility.trace('In hrentmnt.adjust_recurring_entries');
4829: hr_utility.trace ('');
4830: hr_utility.trace (' p_dt_mode = '
4831: ||p_dt_mode);
4832: hr_utility.trace (' p_assignment_id = '
4833: ||to_char (p_assignment_id));
4826: begin
4827: --
4828: hr_utility.trace('In hrentmnt.adjust_recurring_entries');
4829: hr_utility.trace ('');
4830: hr_utility.trace (' p_dt_mode = '
4831: ||p_dt_mode);
4832: hr_utility.trace (' p_assignment_id = '
4833: ||to_char (p_assignment_id));
4834: hr_utility.trace (' p_element_link_id = '
4828: hr_utility.trace('In hrentmnt.adjust_recurring_entries');
4829: hr_utility.trace ('');
4830: hr_utility.trace (' p_dt_mode = '
4831: ||p_dt_mode);
4832: hr_utility.trace (' p_assignment_id = '
4833: ||to_char (p_assignment_id));
4834: hr_utility.trace (' p_element_link_id = '
4835: ||to_char (p_element_link_id));
4836: hr_utility.trace (' p_standard_link_flag = '
4830: hr_utility.trace (' p_dt_mode = '
4831: ||p_dt_mode);
4832: hr_utility.trace (' p_assignment_id = '
4833: ||to_char (p_assignment_id));
4834: hr_utility.trace (' p_element_link_id = '
4835: ||to_char (p_element_link_id));
4836: hr_utility.trace (' p_standard_link_flag = '
4837: ||p_standard_link_flag);
4838: hr_utility.trace (' p_mult_ent_allowed_flag = '
4832: hr_utility.trace (' p_assignment_id = '
4833: ||to_char (p_assignment_id));
4834: hr_utility.trace (' p_element_link_id = '
4835: ||to_char (p_element_link_id));
4836: hr_utility.trace (' p_standard_link_flag = '
4837: ||p_standard_link_flag);
4838: hr_utility.trace (' p_mult_ent_allowed_flag = '
4839: ||p_mult_ent_allowed_flag);
4840: hr_utility.trace (' p_validation_start_date = '
4834: hr_utility.trace (' p_element_link_id = '
4835: ||to_char (p_element_link_id));
4836: hr_utility.trace (' p_standard_link_flag = '
4837: ||p_standard_link_flag);
4838: hr_utility.trace (' p_mult_ent_allowed_flag = '
4839: ||p_mult_ent_allowed_flag);
4840: hr_utility.trace (' p_validation_start_date = '
4841: ||to_char (p_validation_start_date));
4842: hr_utility.trace (' p_validation_end_date = '
4836: hr_utility.trace (' p_standard_link_flag = '
4837: ||p_standard_link_flag);
4838: hr_utility.trace (' p_mult_ent_allowed_flag = '
4839: ||p_mult_ent_allowed_flag);
4840: hr_utility.trace (' p_validation_start_date = '
4841: ||to_char (p_validation_start_date));
4842: hr_utility.trace (' p_validation_end_date = '
4843: ||to_char (p_validation_end_date));
4844: hr_utility.trace (' p_val_start_date_minus_one = '
4838: hr_utility.trace (' p_mult_ent_allowed_flag = '
4839: ||p_mult_ent_allowed_flag);
4840: hr_utility.trace (' p_validation_start_date = '
4841: ||to_char (p_validation_start_date));
4842: hr_utility.trace (' p_validation_end_date = '
4843: ||to_char (p_validation_end_date));
4844: hr_utility.trace (' p_val_start_date_minus_one = '
4845: ||to_char (p_val_start_date_minus_one));
4846: hr_utility.trace (' p_val_end_date_plus_one = '
4840: hr_utility.trace (' p_validation_start_date = '
4841: ||to_char (p_validation_start_date));
4842: hr_utility.trace (' p_validation_end_date = '
4843: ||to_char (p_validation_end_date));
4844: hr_utility.trace (' p_val_start_date_minus_one = '
4845: ||to_char (p_val_start_date_minus_one));
4846: hr_utility.trace (' p_val_end_date_plus_one = '
4847: ||to_char (p_val_end_date_plus_one));
4848: --
4842: hr_utility.trace (' p_validation_end_date = '
4843: ||to_char (p_validation_end_date));
4844: hr_utility.trace (' p_val_start_date_minus_one = '
4845: ||to_char (p_val_start_date_minus_one));
4846: hr_utility.trace (' p_val_end_date_plus_one = '
4847: ||to_char (p_val_end_date_plus_one));
4848: --
4849: hr_utility.trace (' p_entry_count = '
4850: ||to_char (p_entry_count));
4845: ||to_char (p_val_start_date_minus_one));
4846: hr_utility.trace (' p_val_end_date_plus_one = '
4847: ||to_char (p_val_end_date_plus_one));
4848: --
4849: hr_utility.trace (' p_entry_count = '
4850: ||to_char (p_entry_count));
4851: hr_utility.trace (' p_entries_changed = '
4852: ||p_entries_changed);
4853: hr_utility.trace ('');
4847: ||to_char (p_val_end_date_plus_one));
4848: --
4849: hr_utility.trace (' p_entry_count = '
4850: ||to_char (p_entry_count));
4851: hr_utility.trace (' p_entries_changed = '
4852: ||p_entries_changed);
4853: hr_utility.trace ('');
4854: --
4855: end check_parameters;
4849: hr_utility.trace (' p_entry_count = '
4850: ||to_char (p_entry_count));
4851: hr_utility.trace (' p_entries_changed = '
4852: ||p_entries_changed);
4853: hr_utility.trace ('');
4854: --
4855: end check_parameters;
4856: --
4857: function standard_element (
4946: --
4947: -- Continue for all distinct current element entries.
4948: --
4949: if g_debug then
4950: hr_utility.trace('Distinct entries found');
4951: end if;
4952: --
4953: while csr_distinct_entries%found loop
4954: --
4969: v_calc_entry_start_date := p_entry_start_date_tbl(v_loop);
4970: v_calc_entry_end_date := p_entry_end_date_tbl(v_loop);
4971: --
4972: if g_debug then
4973: hr_utility.trace('esd : ' || v_calc_entry_start_date);
4974: hr_utility.trace('eed : ' || v_calc_entry_end_date);
4975: end if;
4976: --
4977: -- Initialise the flag.
4970: v_calc_entry_end_date := p_entry_end_date_tbl(v_loop);
4971: --
4972: if g_debug then
4973: hr_utility.trace('esd : ' || v_calc_entry_start_date);
4974: hr_utility.trace('eed : ' || v_calc_entry_end_date);
4975: end if;
4976: --
4977: -- Initialise the flag.
4978: --
5057: v_calc_entry_start_date <= p_val_end_date_plus_one and
5058: not v_first_entry_adjusted then
5059:
5060: if g_debug then
5061: hr_utility.trace ('***** bringing "start" date of current REE forwards *****');
5062: hr_utility.trace ('***** calc |-------------> *****');
5063: hr_utility.trace ('***** -----> *****');
5064: hr_utility.trace ('***** current |--------------------> *****');
5065: end if;
5058: not v_first_entry_adjusted then
5059:
5060: if g_debug then
5061: hr_utility.trace ('***** bringing "start" date of current REE forwards *****');
5062: hr_utility.trace ('***** calc |-------------> *****');
5063: hr_utility.trace ('***** -----> *****');
5064: hr_utility.trace ('***** current |--------------------> *****');
5065: end if;
5066: --
5059:
5060: if g_debug then
5061: hr_utility.trace ('***** bringing "start" date of current REE forwards *****');
5062: hr_utility.trace ('***** calc |-------------> *****');
5063: hr_utility.trace ('***** -----> *****');
5064: hr_utility.trace ('***** current |--------------------> *****');
5065: end if;
5066: --
5067: -- Validate the adjustment, maintain referential integrity,
5060: if g_debug then
5061: hr_utility.trace ('***** bringing "start" date of current REE forwards *****');
5062: hr_utility.trace ('***** calc |-------------> *****');
5063: hr_utility.trace ('***** -----> *****');
5064: hr_utility.trace ('***** current |--------------------> *****');
5065: end if;
5066: --
5067: -- Validate the adjustment, maintain referential integrity,
5068: -- and adjust the element entry.
5114: )
5115: then
5116:
5117: if g_debug then
5118: hr_utility.trace ('***** bringing "start" date of current REE backwards *****');
5119: hr_utility.trace ('***** calc |--------------------> *****');
5120: hr_utility.trace ('***** <----- *****');
5121: hr_utility.trace ('***** current |-------------> *****');
5122: end if;
5115: then
5116:
5117: if g_debug then
5118: hr_utility.trace ('***** bringing "start" date of current REE backwards *****');
5119: hr_utility.trace ('***** calc |--------------------> *****');
5120: hr_utility.trace ('***** <----- *****');
5121: hr_utility.trace ('***** current |-------------> *****');
5122: end if;
5123: --
5116:
5117: if g_debug then
5118: hr_utility.trace ('***** bringing "start" date of current REE backwards *****');
5119: hr_utility.trace ('***** calc |--------------------> *****');
5120: hr_utility.trace ('***** <----- *****');
5121: hr_utility.trace ('***** current |-------------> *****');
5122: end if;
5123: --
5124: -- Validate the adjustment, maintain referential integrity,
5117: if g_debug then
5118: hr_utility.trace ('***** bringing "start" date of current REE backwards *****');
5119: hr_utility.trace ('***** calc |--------------------> *****');
5120: hr_utility.trace ('***** <----- *****');
5121: hr_utility.trace ('***** current |-------------> *****');
5122: end if;
5123: --
5124: -- Validate the adjustment, maintain referential integrity,
5125: -- and adjust the element entry.
5150: --
5151: if v_entry_end_date > v_calc_entry_end_date then
5152:
5153: if g_debug then
5154: hr_utility.trace ('***** bringing "end" date of current REE backwards *****');
5155: hr_utility.trace ('***** calc |-------------| *****');
5156: hr_utility.trace ('***** <----- *****');
5157: hr_utility.trace ('***** current |--------------------> *****');
5158: end if;
5151: if v_entry_end_date > v_calc_entry_end_date then
5152:
5153: if g_debug then
5154: hr_utility.trace ('***** bringing "end" date of current REE backwards *****');
5155: hr_utility.trace ('***** calc |-------------| *****');
5156: hr_utility.trace ('***** <----- *****');
5157: hr_utility.trace ('***** current |--------------------> *****');
5158: end if;
5159: hrentmnt.validate_adjust_entry
5152:
5153: if g_debug then
5154: hr_utility.trace ('***** bringing "end" date of current REE backwards *****');
5155: hr_utility.trace ('***** calc |-------------| *****');
5156: hr_utility.trace ('***** <----- *****');
5157: hr_utility.trace ('***** current |--------------------> *****');
5158: end if;
5159: hrentmnt.validate_adjust_entry
5160: ('UPDATE',
5153: if g_debug then
5154: hr_utility.trace ('***** bringing "end" date of current REE backwards *****');
5155: hr_utility.trace ('***** calc |-------------| *****');
5156: hr_utility.trace ('***** <----- *****');
5157: hr_utility.trace ('***** current |--------------------> *****');
5158: end if;
5159: hrentmnt.validate_adjust_entry
5160: ('UPDATE',
5161: p_assignment_id,
5313: (p_dt_mode <> 'INSERT')
5314: ) then
5315:
5316: if g_debug then
5317: hr_utility.trace ('***** bringing "end" date of current REE forwards *****');
5318: hr_utility.trace ('***** calc |--------------------> *****');
5319: hr_utility.trace ('***** -----> *****');
5320: hr_utility.trace ('***** current |--------------| *****');
5321: end if;
5314: ) then
5315:
5316: if g_debug then
5317: hr_utility.trace ('***** bringing "end" date of current REE forwards *****');
5318: hr_utility.trace ('***** calc |--------------------> *****');
5319: hr_utility.trace ('***** -----> *****');
5320: hr_utility.trace ('***** current |--------------| *****');
5321: end if;
5322: --
5315:
5316: if g_debug then
5317: hr_utility.trace ('***** bringing "end" date of current REE forwards *****');
5318: hr_utility.trace ('***** calc |--------------------> *****');
5319: hr_utility.trace ('***** -----> *****');
5320: hr_utility.trace ('***** current |--------------| *****');
5321: end if;
5322: --
5323: -- Another current entry exists in the future so only move the
5316: if g_debug then
5317: hr_utility.trace ('***** bringing "end" date of current REE forwards *****');
5318: hr_utility.trace ('***** calc |--------------------> *****');
5319: hr_utility.trace ('***** -----> *****');
5320: hr_utility.trace ('***** current |--------------| *****');
5321: end if;
5322: --
5323: -- Another current entry exists in the future so only move the
5324: -- end date to the day before the this element entry.
5399: elsif (v_calc_entry_start_date >= p_validation_start_date and
5400: v_ele_entry_rec.creator_type <> 'SP') then
5401: --
5402: if g_debug then
5403: hr_utility.trace('Original_entry_id : ' || v_distinct_entry_id);
5404: end if;
5405: hr_entry_api.insert_element_entry
5406: (p_effective_start_date => v_calc_entry_start_date,
5407: p_effective_end_date => v_dummy_date,
5524: --
5525: if v_calc_entry_start_date >= p_validation_start_date then
5526: --
5527: if g_debug then
5528: hr_utility.trace('********** ASG criteria delta');
5529: hr_utility.trace('********** for SL call EE insert interface');
5530: end if;
5531: hr_entry_api.insert_element_entry
5532: (p_effective_start_date => v_calc_entry_start_date,
5525: if v_calc_entry_start_date >= p_validation_start_date then
5526: --
5527: if g_debug then
5528: hr_utility.trace('********** ASG criteria delta');
5529: hr_utility.trace('********** for SL call EE insert interface');
5530: end if;
5531: hr_entry_api.insert_element_entry
5532: (p_effective_start_date => v_calc_entry_start_date,
5533: p_effective_end_date => v_dummy_date,
5553: -- and these may have validation set up
5554: --
5555: if l_category is not null then
5556: if g_debug then
5557: hr_utility.trace('********** ASG criteria delta');
5558: hr_utility.trace('********** l_category>' || l_category || '<');
5559: end if;
5560:
5561: --
5554: --
5555: if l_category is not null then
5556: if g_debug then
5557: hr_utility.trace('********** ASG criteria delta');
5558: hr_utility.trace('********** l_category>' || l_category || '<');
5559: end if;
5560:
5561: --
5562: -- only single element entry row exists, no need for effective dates
5574: --
5575: close csr_distinct_entries;
5576: --
5577: if g_debug then
5578: hr_utility.trace('Out hrentmnt.adjust_recurring_entries');
5579: end if;
5580: --
5581: end adjust_recurring_entries;
5582: --
5637: procedure check_parameters is
5638: --
5639: begin
5640: --
5641: hr_utility.trace('In hrentmnt.adjust_entries_pqc');
5642: hr_utility.trace ('');
5643: hr_utility.trace (' p_assignment_id = '
5644: ||to_char (p_assignment_id));
5645: hr_utility.trace (' p_entries_changed = '
5638: --
5639: begin
5640: --
5641: hr_utility.trace('In hrentmnt.adjust_entries_pqc');
5642: hr_utility.trace ('');
5643: hr_utility.trace (' p_assignment_id = '
5644: ||to_char (p_assignment_id));
5645: hr_utility.trace (' p_entries_changed = '
5646: ||p_entries_changed);
5639: begin
5640: --
5641: hr_utility.trace('In hrentmnt.adjust_entries_pqc');
5642: hr_utility.trace ('');
5643: hr_utility.trace (' p_assignment_id = '
5644: ||to_char (p_assignment_id));
5645: hr_utility.trace (' p_entries_changed = '
5646: ||p_entries_changed);
5647: hr_utility.trace ('');
5641: hr_utility.trace('In hrentmnt.adjust_entries_pqc');
5642: hr_utility.trace ('');
5643: hr_utility.trace (' p_assignment_id = '
5644: ||to_char (p_assignment_id));
5645: hr_utility.trace (' p_entries_changed = '
5646: ||p_entries_changed);
5647: hr_utility.trace ('');
5648: --
5649: end check_parameters;
5643: hr_utility.trace (' p_assignment_id = '
5644: ||to_char (p_assignment_id));
5645: hr_utility.trace (' p_entries_changed = '
5646: ||p_entries_changed);
5647: hr_utility.trace ('');
5648: --
5649: end check_parameters;
5650: --
5651: begin
5885: --
5886: end loop;
5887: --
5888: if g_debug then
5889: hr_utility.trace('Out hrentmnt.adjust_entries_pqc');
5890: end if;
5891: --
5892: end adjust_entries_pqc;
5893: --
5998: procedure check_parameters is
5999: --
6000: begin
6001: --
6002: hr_utility.trace('In hrentmnt.adjust_entries_cncl_term');
6003: hr_utility.trace ('');
6004: hr_utility.trace (' p_business_group_id = '
6005: ||to_char (p_business_group_id));
6006: hr_utility.trace (' p_assignment_id = '
5999: --
6000: begin
6001: --
6002: hr_utility.trace('In hrentmnt.adjust_entries_cncl_term');
6003: hr_utility.trace ('');
6004: hr_utility.trace (' p_business_group_id = '
6005: ||to_char (p_business_group_id));
6006: hr_utility.trace (' p_assignment_id = '
6007: ||to_char (p_assignment_id));
6000: begin
6001: --
6002: hr_utility.trace('In hrentmnt.adjust_entries_cncl_term');
6003: hr_utility.trace ('');
6004: hr_utility.trace (' p_business_group_id = '
6005: ||to_char (p_business_group_id));
6006: hr_utility.trace (' p_assignment_id = '
6007: ||to_char (p_assignment_id));
6008: hr_utility.trace (' p_actual_term_date = '
6002: hr_utility.trace('In hrentmnt.adjust_entries_cncl_term');
6003: hr_utility.trace ('');
6004: hr_utility.trace (' p_business_group_id = '
6005: ||to_char (p_business_group_id));
6006: hr_utility.trace (' p_assignment_id = '
6007: ||to_char (p_assignment_id));
6008: hr_utility.trace (' p_actual_term_date = '
6009: ||to_char (p_actual_term_date));
6010: hr_utility.trace (' p_last_standard_date = '
6004: hr_utility.trace (' p_business_group_id = '
6005: ||to_char (p_business_group_id));
6006: hr_utility.trace (' p_assignment_id = '
6007: ||to_char (p_assignment_id));
6008: hr_utility.trace (' p_actual_term_date = '
6009: ||to_char (p_actual_term_date));
6010: hr_utility.trace (' p_last_standard_date = '
6011: ||to_char (p_last_standard_date));
6012: hr_utility.trace (' p_final_process_date = '
6006: hr_utility.trace (' p_assignment_id = '
6007: ||to_char (p_assignment_id));
6008: hr_utility.trace (' p_actual_term_date = '
6009: ||to_char (p_actual_term_date));
6010: hr_utility.trace (' p_last_standard_date = '
6011: ||to_char (p_last_standard_date));
6012: hr_utility.trace (' p_final_process_date = '
6013: ||to_char (p_final_process_date));
6014: hr_utility.trace (' p_entries_changed = '
6008: hr_utility.trace (' p_actual_term_date = '
6009: ||to_char (p_actual_term_date));
6010: hr_utility.trace (' p_last_standard_date = '
6011: ||to_char (p_last_standard_date));
6012: hr_utility.trace (' p_final_process_date = '
6013: ||to_char (p_final_process_date));
6014: hr_utility.trace (' p_entries_changed = '
6015: ||p_entries_changed);
6016: hr_utility.trace ('');
6010: hr_utility.trace (' p_last_standard_date = '
6011: ||to_char (p_last_standard_date));
6012: hr_utility.trace (' p_final_process_date = '
6013: ||to_char (p_final_process_date));
6014: hr_utility.trace (' p_entries_changed = '
6015: ||p_entries_changed);
6016: hr_utility.trace ('');
6017: --
6018: end check_parameters;
6012: hr_utility.trace (' p_final_process_date = '
6013: ||to_char (p_final_process_date));
6014: hr_utility.trace (' p_entries_changed = '
6015: ||p_entries_changed);
6016: hr_utility.trace ('');
6017: --
6018: end check_parameters;
6019: --
6020: begin
6056: open csr_period_start_date( p_assignment_id, p_final_process_date);
6057: fetch csr_period_start_date into v_period_start_date;
6058: If csr_period_start_date%FOUND then
6059: if g_debug then
6060: hr_utility.trace(' hrentmnt.adjust_entries_cncl_term period_start_date'||to_char(v_period_start_date));
6061: end if;
6062:
6063: --
6064: hrentmnt.adjust_nonrecurring_entries
6114: --
6115: end loop;
6116: --
6117: if g_debug then
6118: hr_utility.trace('Out hrentmnt.adjust_entries_cncl_term');
6119: end if;
6120: --
6121: end adjust_entries_cncl_term;
6122: --
6150: procedure check_parameters is
6151: --
6152: begin
6153: --
6154: hr_utility.trace('In hrentmnt.adjust_entries_cncl_hire');
6155: hr_utility.trace ('');
6156: hr_utility.trace (' p_business_group_id = '
6157: ||to_char (p_business_group_id));
6158: hr_utility.trace (' p_assignment_id = '
6151: --
6152: begin
6153: --
6154: hr_utility.trace('In hrentmnt.adjust_entries_cncl_hire');
6155: hr_utility.trace ('');
6156: hr_utility.trace (' p_business_group_id = '
6157: ||to_char (p_business_group_id));
6158: hr_utility.trace (' p_assignment_id = '
6159: ||to_char (p_assignment_id));
6152: begin
6153: --
6154: hr_utility.trace('In hrentmnt.adjust_entries_cncl_hire');
6155: hr_utility.trace ('');
6156: hr_utility.trace (' p_business_group_id = '
6157: ||to_char (p_business_group_id));
6158: hr_utility.trace (' p_assignment_id = '
6159: ||to_char (p_assignment_id));
6160: hr_utility.trace (' p_validation_start_date = '
6154: hr_utility.trace('In hrentmnt.adjust_entries_cncl_hire');
6155: hr_utility.trace ('');
6156: hr_utility.trace (' p_business_group_id = '
6157: ||to_char (p_business_group_id));
6158: hr_utility.trace (' p_assignment_id = '
6159: ||to_char (p_assignment_id));
6160: hr_utility.trace (' p_validation_start_date = '
6161: ||to_char (p_validation_start_date));
6162: hr_utility.trace (' p_validation_end_date = '
6156: hr_utility.trace (' p_business_group_id = '
6157: ||to_char (p_business_group_id));
6158: hr_utility.trace (' p_assignment_id = '
6159: ||to_char (p_assignment_id));
6160: hr_utility.trace (' p_validation_start_date = '
6161: ||to_char (p_validation_start_date));
6162: hr_utility.trace (' p_validation_end_date = '
6163: ||to_char (p_validation_end_date));
6164: hr_utility.trace (' p_entries_changed = '
6158: hr_utility.trace (' p_assignment_id = '
6159: ||to_char (p_assignment_id));
6160: hr_utility.trace (' p_validation_start_date = '
6161: ||to_char (p_validation_start_date));
6162: hr_utility.trace (' p_validation_end_date = '
6163: ||to_char (p_validation_end_date));
6164: hr_utility.trace (' p_entries_changed = '
6165: ||p_entries_changed);
6166: hr_utility.trace ('');
6160: hr_utility.trace (' p_validation_start_date = '
6161: ||to_char (p_validation_start_date));
6162: hr_utility.trace (' p_validation_end_date = '
6163: ||to_char (p_validation_end_date));
6164: hr_utility.trace (' p_entries_changed = '
6165: ||p_entries_changed);
6166: hr_utility.trace ('');
6167: --
6168: end check_parameters;
6162: hr_utility.trace (' p_validation_end_date = '
6163: ||to_char (p_validation_end_date));
6164: hr_utility.trace (' p_entries_changed = '
6165: ||p_entries_changed);
6166: hr_utility.trace ('');
6167: --
6168: end check_parameters;
6169: --
6170: begin
6221: p_validation_end_date,
6222: p_entries_changed);
6223: --
6224: if g_debug then
6225: hr_utility.trace('Out hrentmnt.adjust_entries_cncl_hire');
6226: end if;
6227: --
6228: end adjust_entries_cncl_hire;
6229: --
6537: procedure check_parameters is
6538: --
6539: begin
6540: --
6541: hr_utility.trace('In '||l_proc);
6542: hr_utility.trace ('');
6543: hr_utility.trace (' p_business_group_id = '
6544: ||to_char (p_business_group_id));
6545: --
6538: --
6539: begin
6540: --
6541: hr_utility.trace('In '||l_proc);
6542: hr_utility.trace ('');
6543: hr_utility.trace (' p_business_group_id = '
6544: ||to_char (p_business_group_id));
6545: --
6546: hr_utility.trace (' p_assignment_id = '
6539: begin
6540: --
6541: hr_utility.trace('In '||l_proc);
6542: hr_utility.trace ('');
6543: hr_utility.trace (' p_business_group_id = '
6544: ||to_char (p_business_group_id));
6545: --
6546: hr_utility.trace (' p_assignment_id = '
6547: ||to_char (p_assignment_id));
6542: hr_utility.trace ('');
6543: hr_utility.trace (' p_business_group_id = '
6544: ||to_char (p_business_group_id));
6545: --
6546: hr_utility.trace (' p_assignment_id = '
6547: ||to_char (p_assignment_id));
6548: --
6549: hr_utility.trace (' p_dt_mode = '
6550: ||p_dt_mode);
6545: --
6546: hr_utility.trace (' p_assignment_id = '
6547: ||to_char (p_assignment_id));
6548: --
6549: hr_utility.trace (' p_dt_mode = '
6550: ||p_dt_mode);
6551: --
6552: hr_utility.trace (' p_old_payroll_id = '
6553: ||to_char (p_old_payroll_id));
6548: --
6549: hr_utility.trace (' p_dt_mode = '
6550: ||p_dt_mode);
6551: --
6552: hr_utility.trace (' p_old_payroll_id = '
6553: ||to_char (p_old_payroll_id));
6554: --
6555: hr_utility.trace (' p_new_payroll_id = '
6556: ||to_char (p_new_payroll_id));
6551: --
6552: hr_utility.trace (' p_old_payroll_id = '
6553: ||to_char (p_old_payroll_id));
6554: --
6555: hr_utility.trace (' p_new_payroll_id = '
6556: ||to_char (p_new_payroll_id));
6557: --
6558: hr_utility.trace (' p_validation_start_date = '
6559: ||to_char (p_validation_start_date));
6554: --
6555: hr_utility.trace (' p_new_payroll_id = '
6556: ||to_char (p_new_payroll_id));
6557: --
6558: hr_utility.trace (' p_validation_start_date = '
6559: ||to_char (p_validation_start_date));
6560: --
6561: hr_utility.trace (' p_validation_end_date = '
6562: ||to_char (p_validation_end_date));
6557: --
6558: hr_utility.trace (' p_validation_start_date = '
6559: ||to_char (p_validation_start_date));
6560: --
6561: hr_utility.trace (' p_validation_end_date = '
6562: ||to_char (p_validation_end_date));
6563: --
6564: hr_utility.trace (' p_entries_changed = '
6565: ||p_entries_changed);
6560: --
6561: hr_utility.trace (' p_validation_end_date = '
6562: ||to_char (p_validation_end_date));
6563: --
6564: hr_utility.trace (' p_entries_changed = '
6565: ||p_entries_changed);
6566: --
6567: hr_utility.trace (' p_old_hire_date = '
6568: ||to_char(p_old_hire_date));
6563: --
6564: hr_utility.trace (' p_entries_changed = '
6565: ||p_entries_changed);
6566: --
6567: hr_utility.trace (' p_old_hire_date = '
6568: ||to_char(p_old_hire_date));
6569: --
6570: hr_utility.trace (' p_old_people_group_id = '
6571: ||to_char(p_old_people_group_id));
6566: --
6567: hr_utility.trace (' p_old_hire_date = '
6568: ||to_char(p_old_hire_date));
6569: --
6570: hr_utility.trace (' p_old_people_group_id = '
6571: ||to_char(p_old_people_group_id));
6572: --
6573: hr_utility.trace (' p_new_people_group_id = '
6574: ||to_char(p_new_people_group_id));
6569: --
6570: hr_utility.trace (' p_old_people_group_id = '
6571: ||to_char(p_old_people_group_id));
6572: --
6573: hr_utility.trace (' p_new_people_group_id = '
6574: ||to_char(p_new_people_group_id));
6575: --
6576: hr_utility.trace ('');
6577: --
6572: --
6573: hr_utility.trace (' p_new_people_group_id = '
6574: ||to_char(p_new_people_group_id));
6575: --
6576: hr_utility.trace ('');
6577: --
6578: end check_parameters;
6579: --
6580: begin
6743: v_entry_end_date);
6744: --
6745: exception
6746: --
6747: when hr_utility.hr_error then
6748: --
6749: hr_utility.get_message_details(v_message_name,v_appl_short_name);
6750: --
6751: if v_message_name = 'HR_6370_ELE_ENTRY_NO_TERM' then
6745: exception
6746: --
6747: when hr_utility.hr_error then
6748: --
6749: hr_utility.get_message_details(v_message_name,v_appl_short_name);
6750: --
6751: if v_message_name = 'HR_6370_ELE_ENTRY_NO_TERM' then
6752: --
6753: v_entry_start_date := null;
6798: -- Compare the calculated element entries with those on the system
6799: -- and adjust as necessary.
6800: --
6801: if g_debug then
6802: hr_utility.trace('v_entry_count : ' || v_entry_count);
6803: end if;
6804: --
6805: -- See if multiple entries are allowed.
6806: --
6834: --
6835: end loop;
6836: --
6837: if g_debug then
6838: hr_utility.trace('Out hrentmnt.adjust_entries_asg_criteria');
6839: end if;
6840: --
6841: end adjust_entries_asg_criteria;
6842: --
6926: procedure check_parameters is
6927: --
6928: begin
6929: --
6930: hr_utility.trace ('hrentmnt.maintain_entries_el');
6931: hr_utility.trace ('');
6932: hr_utility.trace (' p_business_group_id = '
6933: ||to_char (p_business_group_id));
6934: hr_utility.trace (' p_element_link_id = '
6927: --
6928: begin
6929: --
6930: hr_utility.trace ('hrentmnt.maintain_entries_el');
6931: hr_utility.trace ('');
6932: hr_utility.trace (' p_business_group_id = '
6933: ||to_char (p_business_group_id));
6934: hr_utility.trace (' p_element_link_id = '
6935: ||to_char (p_element_link_id));
6928: begin
6929: --
6930: hr_utility.trace ('hrentmnt.maintain_entries_el');
6931: hr_utility.trace ('');
6932: hr_utility.trace (' p_business_group_id = '
6933: ||to_char (p_business_group_id));
6934: hr_utility.trace (' p_element_link_id = '
6935: ||to_char (p_element_link_id));
6936: hr_utility.trace (' p_element_type_id = '
6930: hr_utility.trace ('hrentmnt.maintain_entries_el');
6931: hr_utility.trace ('');
6932: hr_utility.trace (' p_business_group_id = '
6933: ||to_char (p_business_group_id));
6934: hr_utility.trace (' p_element_link_id = '
6935: ||to_char (p_element_link_id));
6936: hr_utility.trace (' p_element_type_id = '
6937: ||to_char (p_element_type_id));
6938: hr_utility.trace (' p_effective_start_date = '
6932: hr_utility.trace (' p_business_group_id = '
6933: ||to_char (p_business_group_id));
6934: hr_utility.trace (' p_element_link_id = '
6935: ||to_char (p_element_link_id));
6936: hr_utility.trace (' p_element_type_id = '
6937: ||to_char (p_element_type_id));
6938: hr_utility.trace (' p_effective_start_date = '
6939: ||to_char (p_effective_start_date));
6940: hr_utility.trace (' p_effective_end_date = '
6934: hr_utility.trace (' p_element_link_id = '
6935: ||to_char (p_element_link_id));
6936: hr_utility.trace (' p_element_type_id = '
6937: ||to_char (p_element_type_id));
6938: hr_utility.trace (' p_effective_start_date = '
6939: ||to_char (p_effective_start_date));
6940: hr_utility.trace (' p_effective_end_date = '
6941: ||to_char (p_effective_end_date));
6942: hr_utility.trace (' p_payroll_id = '
6936: hr_utility.trace (' p_element_type_id = '
6937: ||to_char (p_element_type_id));
6938: hr_utility.trace (' p_effective_start_date = '
6939: ||to_char (p_effective_start_date));
6940: hr_utility.trace (' p_effective_end_date = '
6941: ||to_char (p_effective_end_date));
6942: hr_utility.trace (' p_payroll_id = '
6943: ||to_char (p_payroll_id));
6944: hr_utility.trace (' p_link_to_all_payrolls_flag = '
6938: hr_utility.trace (' p_effective_start_date = '
6939: ||to_char (p_effective_start_date));
6940: hr_utility.trace (' p_effective_end_date = '
6941: ||to_char (p_effective_end_date));
6942: hr_utility.trace (' p_payroll_id = '
6943: ||to_char (p_payroll_id));
6944: hr_utility.trace (' p_link_to_all_payrolls_flag = '
6945: ||p_link_to_all_payrolls_flag);
6946: hr_utility.trace (' p_job_id = '
6940: hr_utility.trace (' p_effective_end_date = '
6941: ||to_char (p_effective_end_date));
6942: hr_utility.trace (' p_payroll_id = '
6943: ||to_char (p_payroll_id));
6944: hr_utility.trace (' p_link_to_all_payrolls_flag = '
6945: ||p_link_to_all_payrolls_flag);
6946: hr_utility.trace (' p_job_id = '
6947: ||to_char (p_job_id));
6948: hr_utility.trace (' p_grade_id = '
6942: hr_utility.trace (' p_payroll_id = '
6943: ||to_char (p_payroll_id));
6944: hr_utility.trace (' p_link_to_all_payrolls_flag = '
6945: ||p_link_to_all_payrolls_flag);
6946: hr_utility.trace (' p_job_id = '
6947: ||to_char (p_job_id));
6948: hr_utility.trace (' p_grade_id = '
6949: ||to_char (p_grade_id));
6950: hr_utility.trace (' p_position_id = '
6944: hr_utility.trace (' p_link_to_all_payrolls_flag = '
6945: ||p_link_to_all_payrolls_flag);
6946: hr_utility.trace (' p_job_id = '
6947: ||to_char (p_job_id));
6948: hr_utility.trace (' p_grade_id = '
6949: ||to_char (p_grade_id));
6950: hr_utility.trace (' p_position_id = '
6951: ||to_char (p_position_id));
6952: hr_utility.trace (' p_organization_id = '
6946: hr_utility.trace (' p_job_id = '
6947: ||to_char (p_job_id));
6948: hr_utility.trace (' p_grade_id = '
6949: ||to_char (p_grade_id));
6950: hr_utility.trace (' p_position_id = '
6951: ||to_char (p_position_id));
6952: hr_utility.trace (' p_organization_id = '
6953: ||to_char (p_organization_id));
6954: hr_utility.trace (' p_location_id = '
6948: hr_utility.trace (' p_grade_id = '
6949: ||to_char (p_grade_id));
6950: hr_utility.trace (' p_position_id = '
6951: ||to_char (p_position_id));
6952: hr_utility.trace (' p_organization_id = '
6953: ||to_char (p_organization_id));
6954: hr_utility.trace (' p_location_id = '
6955: ||to_char (p_location_id));
6956: hr_utility.trace (' p_pay_basis_id = '
6950: hr_utility.trace (' p_position_id = '
6951: ||to_char (p_position_id));
6952: hr_utility.trace (' p_organization_id = '
6953: ||to_char (p_organization_id));
6954: hr_utility.trace (' p_location_id = '
6955: ||to_char (p_location_id));
6956: hr_utility.trace (' p_pay_basis_id = '
6957: ||to_char (p_pay_basis_id));
6958: hr_utility.trace (' p_employment_category = '
6952: hr_utility.trace (' p_organization_id = '
6953: ||to_char (p_organization_id));
6954: hr_utility.trace (' p_location_id = '
6955: ||to_char (p_location_id));
6956: hr_utility.trace (' p_pay_basis_id = '
6957: ||to_char (p_pay_basis_id));
6958: hr_utility.trace (' p_employment_category = '
6959: ||p_employment_category);
6960: hr_utility.trace (' p_people_group_id = '
6954: hr_utility.trace (' p_location_id = '
6955: ||to_char (p_location_id));
6956: hr_utility.trace (' p_pay_basis_id = '
6957: ||to_char (p_pay_basis_id));
6958: hr_utility.trace (' p_employment_category = '
6959: ||p_employment_category);
6960: hr_utility.trace (' p_people_group_id = '
6961: ||to_char (p_people_group_id));
6962: hr_utility.trace ('');
6956: hr_utility.trace (' p_pay_basis_id = '
6957: ||to_char (p_pay_basis_id));
6958: hr_utility.trace (' p_employment_category = '
6959: ||p_employment_category);
6960: hr_utility.trace (' p_people_group_id = '
6961: ||to_char (p_people_group_id));
6962: hr_utility.trace ('');
6963: --
6964: end check_parameters;
6958: hr_utility.trace (' p_employment_category = '
6959: ||p_employment_category);
6960: hr_utility.trace (' p_people_group_id = '
6961: ||to_char (p_people_group_id));
6962: hr_utility.trace ('');
6963: --
6964: end check_parameters;
6965: --
6966: begin
6963: --
6964: end check_parameters;
6965: --
6966: begin
6967: g_debug := hr_utility.debug_enabled;
6968: --
6969: if g_debug then
6970: check_parameters;
6971: end if;
7117: when hr_api.object_locked then
7118: --
7119: -- Failed to lock the assignment.
7120: --
7121: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
7122: hr_utility.set_message_token('TABLE_NAME', 'per_all_assignments_f');
7123: hr_utility.raise_error;
7124: end;
7125: --
7118: --
7119: -- Failed to lock the assignment.
7120: --
7121: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
7122: hr_utility.set_message_token('TABLE_NAME', 'per_all_assignments_f');
7123: hr_utility.raise_error;
7124: end;
7125: --
7126: -- Get first assignment piece matching the standard link.
7119: -- Failed to lock the assignment.
7120: --
7121: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
7122: hr_utility.set_message_token('TABLE_NAME', 'per_all_assignments_f');
7123: hr_utility.raise_error;
7124: end;
7125: --
7126: -- Get first assignment piece matching the standard link.
7127: --
7144: fetch csr_sec_asg into v_asg_visible;
7145: if csr_sec_asg%notfound then
7146: --
7147: if g_debug then
7148: hr_utility.trace('Assignment ID Not Found: '||v_asg_id);
7149: end if;
7150: --
7151: -- The user is not authorized to process this assignment.
7152: --
7152: --
7153: close csr_sec_asg;
7154: close csr_assignment;
7155: --
7156: hr_utility.set_message(801,'PAY_33449_STD_LINK_SEC_ASG');
7157: hr_utility.raise_error;
7158: end if;
7159: close csr_sec_asg;
7160:
7153: close csr_sec_asg;
7154: close csr_assignment;
7155: --
7156: hr_utility.set_message(801,'PAY_33449_STD_LINK_SEC_ASG');
7157: hr_utility.raise_error;
7158: end if;
7159: close csr_sec_asg;
7160:
7161: --
7189: 'Y',
7190: v_entry_start_date,
7191: v_entry_end_date);
7192: exception
7193: when hr_utility.hr_error then
7194: hr_utility.get_message_details(v_message_name,v_appl_short_name);
7195: if v_message_name = 'HR_6370_ELE_ENTRY_NO_TERM' then
7196: v_entry_start_date := null;
7197: v_message_name := null;
7190: v_entry_start_date,
7191: v_entry_end_date);
7192: exception
7193: when hr_utility.hr_error then
7194: hr_utility.get_message_details(v_message_name,v_appl_short_name);
7195: if v_message_name = 'HR_6370_ELE_ENTRY_NO_TERM' then
7196: v_entry_start_date := null;
7197: v_message_name := null;
7198: v_appl_short_name := null;
7207: --
7208: -- Create new element netry for standard link.
7209: --
7210: if g_debug then
7211: hr_utility.trace('********** SL creation');
7212: hr_utility.trace('********** for SL call EE insert interface');
7213: end if;
7214: hr_entry_api.insert_element_entry
7215: (p_effective_start_date => v_entry_start_date,
7208: -- Create new element netry for standard link.
7209: --
7210: if g_debug then
7211: hr_utility.trace('********** SL creation');
7212: hr_utility.trace('********** for SL call EE insert interface');
7213: end if;
7214: hr_entry_api.insert_element_entry
7215: (p_effective_start_date => v_entry_start_date,
7216: p_effective_end_date => v_entry_end_date,
7225: v_entry_start_date,
7226: p_element_link_id);
7227: if l_category is not null then
7228: if g_debug then
7229: hr_utility.trace('********** SL creation');
7230: hr_utility.trace('********** l_category>' || l_category || '<');
7231: end if;
7232:
7233: UPDATE pay_element_entries_f
7226: p_element_link_id);
7227: if l_category is not null then
7228: if g_debug then
7229: hr_utility.trace('********** SL creation');
7230: hr_utility.trace('********** l_category>' || l_category || '<');
7231: end if;
7232:
7233: UPDATE pay_element_entries_f
7234: SET entry_information_category = l_category
7265: --
7266: close csr_assignment;
7267: --
7268: if g_debug then
7269: hr_utility.trace ('Out hrentmnt.maintain_entries_el');
7270: end if;
7271: --
7272: end maintain_entries_el;
7273: --
7329: where pee.assignment_id = p_assignment_id
7330: and pel.element_link_id = pee.element_link_id;
7331:
7332: begin
7333: hr_utility.trace('***** dump start *****');
7334:
7335: for rec_assignment in csr_assignment(p_assignment_id,
7336: p_business_group_id) loop
7337: hr_utility.trace('rec_assignment.assignment_id>' ||
7333: hr_utility.trace('***** dump start *****');
7334:
7335: for rec_assignment in csr_assignment(p_assignment_id,
7336: p_business_group_id) loop
7337: hr_utility.trace('rec_assignment.assignment_id>' ||
7338: rec_assignment.assignment_id || '<');
7339: hr_utility.trace(' rec_assignment.effective_start_date>' ||
7340: rec_assignment.effective_start_date || '<');
7341: hr_utility.trace(' rec_assignment.effective_end_date>' ||
7335: for rec_assignment in csr_assignment(p_assignment_id,
7336: p_business_group_id) loop
7337: hr_utility.trace('rec_assignment.assignment_id>' ||
7338: rec_assignment.assignment_id || '<');
7339: hr_utility.trace(' rec_assignment.effective_start_date>' ||
7340: rec_assignment.effective_start_date || '<');
7341: hr_utility.trace(' rec_assignment.effective_end_date>' ||
7342: rec_assignment.effective_end_date || '<');
7343: hr_utility.trace(' rec_assignment.primary_flag>' ||
7337: hr_utility.trace('rec_assignment.assignment_id>' ||
7338: rec_assignment.assignment_id || '<');
7339: hr_utility.trace(' rec_assignment.effective_start_date>' ||
7340: rec_assignment.effective_start_date || '<');
7341: hr_utility.trace(' rec_assignment.effective_end_date>' ||
7342: rec_assignment.effective_end_date || '<');
7343: hr_utility.trace(' rec_assignment.primary_flag>' ||
7344: rec_assignment.primary_flag || '<');
7345: hr_utility.trace(' rec_assignment.organization_id>' ||
7339: hr_utility.trace(' rec_assignment.effective_start_date>' ||
7340: rec_assignment.effective_start_date || '<');
7341: hr_utility.trace(' rec_assignment.effective_end_date>' ||
7342: rec_assignment.effective_end_date || '<');
7343: hr_utility.trace(' rec_assignment.primary_flag>' ||
7344: rec_assignment.primary_flag || '<');
7345: hr_utility.trace(' rec_assignment.organization_id>' ||
7346: rec_assignment.organization_id || '<');
7347: hr_utility.trace(' rec_assignment.people_group_id>' ||
7341: hr_utility.trace(' rec_assignment.effective_end_date>' ||
7342: rec_assignment.effective_end_date || '<');
7343: hr_utility.trace(' rec_assignment.primary_flag>' ||
7344: rec_assignment.primary_flag || '<');
7345: hr_utility.trace(' rec_assignment.organization_id>' ||
7346: rec_assignment.organization_id || '<');
7347: hr_utility.trace(' rec_assignment.people_group_id>' ||
7348: rec_assignment.people_group_id || '<');
7349: hr_utility.trace(' rec_assignment.job_id>' ||
7343: hr_utility.trace(' rec_assignment.primary_flag>' ||
7344: rec_assignment.primary_flag || '<');
7345: hr_utility.trace(' rec_assignment.organization_id>' ||
7346: rec_assignment.organization_id || '<');
7347: hr_utility.trace(' rec_assignment.people_group_id>' ||
7348: rec_assignment.people_group_id || '<');
7349: hr_utility.trace(' rec_assignment.job_id>' ||
7350: rec_assignment.job_id || '<');
7351: hr_utility.trace(' rec_assignment.position_id>' ||
7345: hr_utility.trace(' rec_assignment.organization_id>' ||
7346: rec_assignment.organization_id || '<');
7347: hr_utility.trace(' rec_assignment.people_group_id>' ||
7348: rec_assignment.people_group_id || '<');
7349: hr_utility.trace(' rec_assignment.job_id>' ||
7350: rec_assignment.job_id || '<');
7351: hr_utility.trace(' rec_assignment.position_id>' ||
7352: rec_assignment.position_id || '<');
7353: hr_utility.trace(' rec_assignment.grade_id>' ||
7347: hr_utility.trace(' rec_assignment.people_group_id>' ||
7348: rec_assignment.people_group_id || '<');
7349: hr_utility.trace(' rec_assignment.job_id>' ||
7350: rec_assignment.job_id || '<');
7351: hr_utility.trace(' rec_assignment.position_id>' ||
7352: rec_assignment.position_id || '<');
7353: hr_utility.trace(' rec_assignment.grade_id>' ||
7354: rec_assignment.grade_id || '<');
7355: hr_utility.trace(' rec_assignment.location_id>' ||
7349: hr_utility.trace(' rec_assignment.job_id>' ||
7350: rec_assignment.job_id || '<');
7351: hr_utility.trace(' rec_assignment.position_id>' ||
7352: rec_assignment.position_id || '<');
7353: hr_utility.trace(' rec_assignment.grade_id>' ||
7354: rec_assignment.grade_id || '<');
7355: hr_utility.trace(' rec_assignment.location_id>' ||
7356: rec_assignment.location_id || '<');
7357: hr_utility.trace(' rec_assignment.employment_category>' ||
7351: hr_utility.trace(' rec_assignment.position_id>' ||
7352: rec_assignment.position_id || '<');
7353: hr_utility.trace(' rec_assignment.grade_id>' ||
7354: rec_assignment.grade_id || '<');
7355: hr_utility.trace(' rec_assignment.location_id>' ||
7356: rec_assignment.location_id || '<');
7357: hr_utility.trace(' rec_assignment.employment_category>' ||
7358: rec_assignment.employment_category || '<');
7359: hr_utility.trace(' rec_assignment.payroll_id>' ||
7353: hr_utility.trace(' rec_assignment.grade_id>' ||
7354: rec_assignment.grade_id || '<');
7355: hr_utility.trace(' rec_assignment.location_id>' ||
7356: rec_assignment.location_id || '<');
7357: hr_utility.trace(' rec_assignment.employment_category>' ||
7358: rec_assignment.employment_category || '<');
7359: hr_utility.trace(' rec_assignment.payroll_id>' ||
7360: rec_assignment.payroll_id || '<');
7361: hr_utility.trace(' rec_assignment.pay_basis_id>' ||
7355: hr_utility.trace(' rec_assignment.location_id>' ||
7356: rec_assignment.location_id || '<');
7357: hr_utility.trace(' rec_assignment.employment_category>' ||
7358: rec_assignment.employment_category || '<');
7359: hr_utility.trace(' rec_assignment.payroll_id>' ||
7360: rec_assignment.payroll_id || '<');
7361: hr_utility.trace(' rec_assignment.pay_basis_id>' ||
7362: rec_assignment.pay_basis_id || '<');
7363: end loop;
7357: hr_utility.trace(' rec_assignment.employment_category>' ||
7358: rec_assignment.employment_category || '<');
7359: hr_utility.trace(' rec_assignment.payroll_id>' ||
7360: rec_assignment.payroll_id || '<');
7361: hr_utility.trace(' rec_assignment.pay_basis_id>' ||
7362: rec_assignment.pay_basis_id || '<');
7363: end loop;
7364:
7365: hr_utility.trace('>>> Element Entry info <<<');
7361: hr_utility.trace(' rec_assignment.pay_basis_id>' ||
7362: rec_assignment.pay_basis_id || '<');
7363: end loop;
7364:
7365: hr_utility.trace('>>> Element Entry info <<<');
7366: hr_utility.trace('EEID ET CT ESD EED ELID ETID PYID JOB POS PGRP ORG LOC GRD PBID LFLG SLFLG');
7367:
7368: for eerec in ee loop
7369:
7362: rec_assignment.pay_basis_id || '<');
7363: end loop;
7364:
7365: hr_utility.trace('>>> Element Entry info <<<');
7366: hr_utility.trace('EEID ET CT ESD EED ELID ETID PYID JOB POS PGRP ORG LOC GRD PBID LFLG SLFLG');
7367:
7368: for eerec in ee loop
7369:
7370: hr_utility.trace(
7366: hr_utility.trace('EEID ET CT ESD EED ELID ETID PYID JOB POS PGRP ORG LOC GRD PBID LFLG SLFLG');
7367:
7368: for eerec in ee loop
7369:
7370: hr_utility.trace(
7371: eerec.element_entry_id || ' ' ||
7372: eerec.entry_type || ' ' ||
7373: eerec.creator_type || ' ' ||
7374: eerec.esd || ' ' ||
7387: eerec.standard_link_flag);
7388:
7389: end loop;
7390:
7391: hr_utility.trace('***** dump end *****');
7392: end dump_info;
7393: --
7394: --
7395: --
7444: procedure check_parameters is
7445: --
7446: begin
7447: --
7448: hr_utility.trace('In hrentmnt.maintain_entries_asg');
7449: hr_utility.trace ('');
7450: hr_utility.trace (' p_assignment_id = '
7451: ||to_char (p_assignment_id));
7452: hr_utility.trace (' p_old_payroll_id = '
7445: --
7446: begin
7447: --
7448: hr_utility.trace('In hrentmnt.maintain_entries_asg');
7449: hr_utility.trace ('');
7450: hr_utility.trace (' p_assignment_id = '
7451: ||to_char (p_assignment_id));
7452: hr_utility.trace (' p_old_payroll_id = '
7453: ||to_char (p_old_payroll_id));
7446: begin
7447: --
7448: hr_utility.trace('In hrentmnt.maintain_entries_asg');
7449: hr_utility.trace ('');
7450: hr_utility.trace (' p_assignment_id = '
7451: ||to_char (p_assignment_id));
7452: hr_utility.trace (' p_old_payroll_id = '
7453: ||to_char (p_old_payroll_id));
7454: hr_utility.trace (' p_new_payroll_id = '
7448: hr_utility.trace('In hrentmnt.maintain_entries_asg');
7449: hr_utility.trace ('');
7450: hr_utility.trace (' p_assignment_id = '
7451: ||to_char (p_assignment_id));
7452: hr_utility.trace (' p_old_payroll_id = '
7453: ||to_char (p_old_payroll_id));
7454: hr_utility.trace (' p_new_payroll_id = '
7455: ||to_char (p_new_payroll_id));
7456: hr_utility.trace (' p_business_group_id = '
7450: hr_utility.trace (' p_assignment_id = '
7451: ||to_char (p_assignment_id));
7452: hr_utility.trace (' p_old_payroll_id = '
7453: ||to_char (p_old_payroll_id));
7454: hr_utility.trace (' p_new_payroll_id = '
7455: ||to_char (p_new_payroll_id));
7456: hr_utility.trace (' p_business_group_id = '
7457: ||to_char (p_business_group_id));
7458: hr_utility.trace (' p_operation = '
7452: hr_utility.trace (' p_old_payroll_id = '
7453: ||to_char (p_old_payroll_id));
7454: hr_utility.trace (' p_new_payroll_id = '
7455: ||to_char (p_new_payroll_id));
7456: hr_utility.trace (' p_business_group_id = '
7457: ||to_char (p_business_group_id));
7458: hr_utility.trace (' p_operation = '
7459: ||p_operation);
7460: hr_utility.trace (' p_actual_term_date = '
7454: hr_utility.trace (' p_new_payroll_id = '
7455: ||to_char (p_new_payroll_id));
7456: hr_utility.trace (' p_business_group_id = '
7457: ||to_char (p_business_group_id));
7458: hr_utility.trace (' p_operation = '
7459: ||p_operation);
7460: hr_utility.trace (' p_actual_term_date = '
7461: ||to_char (p_actual_term_date));
7462: hr_utility.trace (' p_last_standard_date = '
7456: hr_utility.trace (' p_business_group_id = '
7457: ||to_char (p_business_group_id));
7458: hr_utility.trace (' p_operation = '
7459: ||p_operation);
7460: hr_utility.trace (' p_actual_term_date = '
7461: ||to_char (p_actual_term_date));
7462: hr_utility.trace (' p_last_standard_date = '
7463: ||to_char (p_last_standard_date));
7464: hr_utility.trace (' p_final_process_date = '
7458: hr_utility.trace (' p_operation = '
7459: ||p_operation);
7460: hr_utility.trace (' p_actual_term_date = '
7461: ||to_char (p_actual_term_date));
7462: hr_utility.trace (' p_last_standard_date = '
7463: ||to_char (p_last_standard_date));
7464: hr_utility.trace (' p_final_process_date = '
7465: ||to_char (p_final_process_date));
7466: hr_utility.trace (' p_dt_mode = '
7460: hr_utility.trace (' p_actual_term_date = '
7461: ||to_char (p_actual_term_date));
7462: hr_utility.trace (' p_last_standard_date = '
7463: ||to_char (p_last_standard_date));
7464: hr_utility.trace (' p_final_process_date = '
7465: ||to_char (p_final_process_date));
7466: hr_utility.trace (' p_dt_mode = '
7467: ||p_dt_mode);
7468: hr_utility.trace (' p_validation_start_date = '
7462: hr_utility.trace (' p_last_standard_date = '
7463: ||to_char (p_last_standard_date));
7464: hr_utility.trace (' p_final_process_date = '
7465: ||to_char (p_final_process_date));
7466: hr_utility.trace (' p_dt_mode = '
7467: ||p_dt_mode);
7468: hr_utility.trace (' p_validation_start_date = '
7469: ||to_char (p_validation_start_date));
7470: hr_utility.trace (' p_validation_end_date = '
7464: hr_utility.trace (' p_final_process_date = '
7465: ||to_char (p_final_process_date));
7466: hr_utility.trace (' p_dt_mode = '
7467: ||p_dt_mode);
7468: hr_utility.trace (' p_validation_start_date = '
7469: ||to_char (p_validation_start_date));
7470: hr_utility.trace (' p_validation_end_date = '
7471: ||to_char (p_validation_end_date));
7472: hr_utility.trace (' p_entries_changed = '
7466: hr_utility.trace (' p_dt_mode = '
7467: ||p_dt_mode);
7468: hr_utility.trace (' p_validation_start_date = '
7469: ||to_char (p_validation_start_date));
7470: hr_utility.trace (' p_validation_end_date = '
7471: ||to_char (p_validation_end_date));
7472: hr_utility.trace (' p_entries_changed = '
7473: ||p_entries_changed);
7474: hr_utility.trace (' p_old_hire_date = '
7468: hr_utility.trace (' p_validation_start_date = '
7469: ||to_char (p_validation_start_date));
7470: hr_utility.trace (' p_validation_end_date = '
7471: ||to_char (p_validation_end_date));
7472: hr_utility.trace (' p_entries_changed = '
7473: ||p_entries_changed);
7474: hr_utility.trace (' p_old_hire_date = '
7475: ||to_char(p_old_hire_date));
7476: hr_utility.trace (' p_old_people_group_id = '
7470: hr_utility.trace (' p_validation_end_date = '
7471: ||to_char (p_validation_end_date));
7472: hr_utility.trace (' p_entries_changed = '
7473: ||p_entries_changed);
7474: hr_utility.trace (' p_old_hire_date = '
7475: ||to_char(p_old_hire_date));
7476: hr_utility.trace (' p_old_people_group_id = '
7477: ||to_char(p_old_people_group_id));
7478: hr_utility.trace (' p_new_people_group_id = '
7472: hr_utility.trace (' p_entries_changed = '
7473: ||p_entries_changed);
7474: hr_utility.trace (' p_old_hire_date = '
7475: ||to_char(p_old_hire_date));
7476: hr_utility.trace (' p_old_people_group_id = '
7477: ||to_char(p_old_people_group_id));
7478: hr_utility.trace (' p_new_people_group_id = '
7479: ||to_char(p_new_people_group_id));
7480: hr_utility.trace (' p_old_organization_id = '
7474: hr_utility.trace (' p_old_hire_date = '
7475: ||to_char(p_old_hire_date));
7476: hr_utility.trace (' p_old_people_group_id = '
7477: ||to_char(p_old_people_group_id));
7478: hr_utility.trace (' p_new_people_group_id = '
7479: ||to_char(p_new_people_group_id));
7480: hr_utility.trace (' p_old_organization_id = '
7481: ||to_char(p_old_organization_id));
7482: hr_utility.trace (' p_new_organization_id = '
7476: hr_utility.trace (' p_old_people_group_id = '
7477: ||to_char(p_old_people_group_id));
7478: hr_utility.trace (' p_new_people_group_id = '
7479: ||to_char(p_new_people_group_id));
7480: hr_utility.trace (' p_old_organization_id = '
7481: ||to_char(p_old_organization_id));
7482: hr_utility.trace (' p_new_organization_id = '
7483: ||to_char(p_new_organization_id));
7484: hr_utility.trace ('');
7478: hr_utility.trace (' p_new_people_group_id = '
7479: ||to_char(p_new_people_group_id));
7480: hr_utility.trace (' p_old_organization_id = '
7481: ||to_char(p_old_organization_id));
7482: hr_utility.trace (' p_new_organization_id = '
7483: ||to_char(p_new_organization_id));
7484: hr_utility.trace ('');
7485: --
7486: end check_parameters;
7480: hr_utility.trace (' p_old_organization_id = '
7481: ||to_char(p_old_organization_id));
7482: hr_utility.trace (' p_new_organization_id = '
7483: ||to_char(p_new_organization_id));
7484: hr_utility.trace ('');
7485: --
7486: end check_parameters;
7487: --
7488: begin
7489: --
7490: null;
7491: -- --
7492: begin
7493: g_debug := hr_utility.debug_enabled;
7494: --
7495: if g_debug then
7496: check_parameters;
7497: end if;
7598: p_new_employment_category);
7599: end if;
7600: --
7601: if g_debug then
7602: hr_utility.trace('Out hrentmnt.maintain_entries_asg');
7603: end if;
7604: --
7605: exception
7606: when others then
7607: --
7608: -- if an error occurs, print the message and raise the error again
7609: if g_debug then
7610:
7611: hr_utility.trace('****************************************');
7612: hr_utility.trace('Sqlcode>' || Sqlcode || '<');
7613: hr_utility.trace('Sqlerrm>' || Sqlerrm || '<');
7614: hr_utility.trace('****************************************');
7615:
7608: -- if an error occurs, print the message and raise the error again
7609: if g_debug then
7610:
7611: hr_utility.trace('****************************************');
7612: hr_utility.trace('Sqlcode>' || Sqlcode || '<');
7613: hr_utility.trace('Sqlerrm>' || Sqlerrm || '<');
7614: hr_utility.trace('****************************************');
7615:
7616: dump_info(p_assignment_id, p_business_group_id);
7609: if g_debug then
7610:
7611: hr_utility.trace('****************************************');
7612: hr_utility.trace('Sqlcode>' || Sqlcode || '<');
7613: hr_utility.trace('Sqlerrm>' || Sqlerrm || '<');
7614: hr_utility.trace('****************************************');
7615:
7616: dump_info(p_assignment_id, p_business_group_id);
7617:
7610:
7611: hr_utility.trace('****************************************');
7612: hr_utility.trace('Sqlcode>' || Sqlcode || '<');
7613: hr_utility.trace('Sqlerrm>' || Sqlerrm || '<');
7614: hr_utility.trace('****************************************');
7615:
7616: dump_info(p_assignment_id, p_business_group_id);
7617:
7618: end if;
7659: procedure check_parameters is
7660: --
7661: begin
7662: --
7663: hr_utility.trace('In hrentmnt.maintain_entries_asg. overload 2 with pg but no org');
7664: --
7665: end check_parameters;
7666: --
7667: begin
7668: --
7669: null;
7670: -- --
7671: begin
7672: g_debug := hr_utility.debug_enabled;
7673: --
7674: if g_debug then
7675: check_parameters;
7676: end if;
7700: --
7701: -- if an error occurs, print the message and raise the error again
7702: if g_debug then
7703:
7704: hr_utility.trace('****************************************');
7705: hr_utility.trace('Sqlcode>' || Sqlcode || '<');
7706: hr_utility.trace('Sqlerrm>' || Sqlerrm || '<');
7707: hr_utility.trace('****************************************');
7708:
7701: -- if an error occurs, print the message and raise the error again
7702: if g_debug then
7703:
7704: hr_utility.trace('****************************************');
7705: hr_utility.trace('Sqlcode>' || Sqlcode || '<');
7706: hr_utility.trace('Sqlerrm>' || Sqlerrm || '<');
7707: hr_utility.trace('****************************************');
7708:
7709: dump_info(p_assignment_id, p_business_group_id);
7702: if g_debug then
7703:
7704: hr_utility.trace('****************************************');
7705: hr_utility.trace('Sqlcode>' || Sqlcode || '<');
7706: hr_utility.trace('Sqlerrm>' || Sqlerrm || '<');
7707: hr_utility.trace('****************************************');
7708:
7709: dump_info(p_assignment_id, p_business_group_id);
7710:
7703:
7704: hr_utility.trace('****************************************');
7705: hr_utility.trace('Sqlcode>' || Sqlcode || '<');
7706: hr_utility.trace('Sqlerrm>' || Sqlerrm || '<');
7707: hr_utility.trace('****************************************');
7708:
7709: dump_info(p_assignment_id, p_business_group_id);
7710:
7711: end if;
7742: procedure check_parameters is
7743: --
7744: begin
7745: --
7746: hr_utility.trace('In hrentmnt.maintain_entries_asg. overload 1 no pg or org');
7747: --
7748: end check_parameters;
7749: --
7750: begin
7750: begin
7751: null;
7752: -- --
7753: begin
7754: g_debug := hr_utility.debug_enabled;
7755: --
7756: if g_debug then
7757: check_parameters;
7758: end if;
7778: --
7779: -- if an error occurs, print the message and raise the error again
7780: --
7781: if g_debug then
7782: hr_utility.trace('***** over');
7783: hr_utility.trace('Sqlcode>' || Sqlcode || '<');
7784: hr_utility.trace('Sqlerrm>' || Sqlerrm || '<');
7785: hr_utility.trace('*****');
7786: end if;
7779: -- if an error occurs, print the message and raise the error again
7780: --
7781: if g_debug then
7782: hr_utility.trace('***** over');
7783: hr_utility.trace('Sqlcode>' || Sqlcode || '<');
7784: hr_utility.trace('Sqlerrm>' || Sqlerrm || '<');
7785: hr_utility.trace('*****');
7786: end if;
7787: raise;
7780: --
7781: if g_debug then
7782: hr_utility.trace('***** over');
7783: hr_utility.trace('Sqlcode>' || Sqlcode || '<');
7784: hr_utility.trace('Sqlerrm>' || Sqlerrm || '<');
7785: hr_utility.trace('*****');
7786: end if;
7787: raise;
7788: end;
7781: if g_debug then
7782: hr_utility.trace('***** over');
7783: hr_utility.trace('Sqlcode>' || Sqlcode || '<');
7784: hr_utility.trace('Sqlerrm>' || Sqlerrm || '<');
7785: hr_utility.trace('*****');
7786: end if;
7787: raise;
7788: end;
7789: -- --
7832: procedure check_parameters is
7833: --
7834: begin
7835: --
7836: hr_utility.trace ('In hrentmnt.check_opmu');
7837: hr_utility.trace ('');
7838: hr_utility.trace (' p_assignment_id = '
7839: ||to_char (p_assignment_id));
7840: hr_utility.trace (' p_payroll_id = '
7833: --
7834: begin
7835: --
7836: hr_utility.trace ('In hrentmnt.check_opmu');
7837: hr_utility.trace ('');
7838: hr_utility.trace (' p_assignment_id = '
7839: ||to_char (p_assignment_id));
7840: hr_utility.trace (' p_payroll_id = '
7841: ||to_char (p_payroll_id));
7834: begin
7835: --
7836: hr_utility.trace ('In hrentmnt.check_opmu');
7837: hr_utility.trace ('');
7838: hr_utility.trace (' p_assignment_id = '
7839: ||to_char (p_assignment_id));
7840: hr_utility.trace (' p_payroll_id = '
7841: ||to_char (p_payroll_id));
7842: hr_utility.trace (' p_dt_mode = '
7836: hr_utility.trace ('In hrentmnt.check_opmu');
7837: hr_utility.trace ('');
7838: hr_utility.trace (' p_assignment_id = '
7839: ||to_char (p_assignment_id));
7840: hr_utility.trace (' p_payroll_id = '
7841: ||to_char (p_payroll_id));
7842: hr_utility.trace (' p_dt_mode = '
7843: ||p_dt_mode);
7844: hr_utility.trace (' p_validation_start_date = '
7838: hr_utility.trace (' p_assignment_id = '
7839: ||to_char (p_assignment_id));
7840: hr_utility.trace (' p_payroll_id = '
7841: ||to_char (p_payroll_id));
7842: hr_utility.trace (' p_dt_mode = '
7843: ||p_dt_mode);
7844: hr_utility.trace (' p_validation_start_date = '
7845: ||to_char (p_validation_start_date));
7846: hr_utility.trace (' p_validation_end_date = '
7840: hr_utility.trace (' p_payroll_id = '
7841: ||to_char (p_payroll_id));
7842: hr_utility.trace (' p_dt_mode = '
7843: ||p_dt_mode);
7844: hr_utility.trace (' p_validation_start_date = '
7845: ||to_char (p_validation_start_date));
7846: hr_utility.trace (' p_validation_end_date = '
7847: ||to_char (p_validation_end_date));
7848: hr_utility.trace ('');
7842: hr_utility.trace (' p_dt_mode = '
7843: ||p_dt_mode);
7844: hr_utility.trace (' p_validation_start_date = '
7845: ||to_char (p_validation_start_date));
7846: hr_utility.trace (' p_validation_end_date = '
7847: ||to_char (p_validation_end_date));
7848: hr_utility.trace ('');
7849: --
7850: end check_parameters;
7844: hr_utility.trace (' p_validation_start_date = '
7845: ||to_char (p_validation_start_date));
7846: hr_utility.trace (' p_validation_end_date = '
7847: ||to_char (p_validation_end_date));
7848: hr_utility.trace ('');
7849: --
7850: end check_parameters;
7851: --
7852: begin
7849: --
7850: end check_parameters;
7851: --
7852: begin
7853: g_debug := hr_utility.debug_enabled;
7854: --
7855: if g_debug then
7856: check_parameters;
7857: end if;
7872: and ppm.effective_end_date >= p_validation_start_date);
7873: exception
7874: when no_data_found then
7875: if g_debug then
7876: hr_utility.trace('No opmu for DELETE or ZAP mode');
7877: end if;
7878: end;
7879: --
7880: -- Otherwise check that the existing PPMs remain valid after the Transfer
7914: end;
7915: --
7916: if no_opmu = 'Y' then
7917: if g_debug then
7918: hr_utility.trace('No opmu from first check.');
7919: end if;
7920: exit;
7921: end if;
7922: --
7962: end;
7963: --
7964: if no_opmu = 'Y' then
7965: if g_debug then
7966: hr_utility.trace('No opmu from second check.');
7967: end if;
7968: exit;
7969: end if;
7970: --
7972: --
7973: end if;
7974: --
7975: if no_opmu = 'Y' then
7976: hr_utility.set_message(801,'HR_6844_ASS_PPM_INVALID');
7977: hr_utility.raise_error;
7978: end if;
7979: --
7980: if g_debug then
7973: end if;
7974: --
7975: if no_opmu = 'Y' then
7976: hr_utility.set_message(801,'HR_6844_ASS_PPM_INVALID');
7977: hr_utility.raise_error;
7978: end if;
7979: --
7980: if g_debug then
7981: hr_utility.trace ('Out hrentmnt.check_opmu');
7977: hr_utility.raise_error;
7978: end if;
7979: --
7980: if g_debug then
7981: hr_utility.trace ('Out hrentmnt.check_opmu');
7982: end if;
7983: --
7984: end check_opmu;
7985: --
8033: and c_old_final_process_date between ee.effective_start_date and ee.effective_end_date
8034: and c_old_final_process_date between et.effective_start_date and et.effective_end_date;
8035:
8036: BEGIN
8037: hr_utility.set_location(l_proc, 10);
8038:
8039: SAVEPOINT move_fpd_entries;
8040:
8041: l_new_final_process_date := p_new_final_process_date;
8048: -- Get all the entries of termination rule type F which could be affected by change in fpd.
8049: for r_entry in process_entries(p_old_final_process_date,p_assignment_id)
8050: loop
8051: --
8052: hr_utility.set_location(l_proc,20);
8053: hr_utility.trace('EE processing type: '||r_entry.processing_type);
8054: hr_utility.trace('Old EE effective end date: '||to_char(r_entry.effective_end_date,'DD-MON-YYYY'));
8055:
8056: l_object_version_number := r_entry.object_version_number;
8049: for r_entry in process_entries(p_old_final_process_date,p_assignment_id)
8050: loop
8051: --
8052: hr_utility.set_location(l_proc,20);
8053: hr_utility.trace('EE processing type: '||r_entry.processing_type);
8054: hr_utility.trace('Old EE effective end date: '||to_char(r_entry.effective_end_date,'DD-MON-YYYY'));
8055:
8056: l_object_version_number := r_entry.object_version_number;
8057: l_new_esd := r_entry.effective_start_date;
8050: loop
8051: --
8052: hr_utility.set_location(l_proc,20);
8053: hr_utility.trace('EE processing type: '||r_entry.processing_type);
8054: hr_utility.trace('Old EE effective end date: '||to_char(r_entry.effective_end_date,'DD-MON-YYYY'));
8055:
8056: l_object_version_number := r_entry.object_version_number;
8057: l_new_esd := r_entry.effective_start_date;
8058: l_new_eed := r_entry.effective_end_date;
8060:
8061: if l_new_final_process_date < r_entry.effective_start_date then
8062:
8063: /* Code to ZAP the element entry*/
8064: hr_utility.set_location(l_proc,30);
8065:
8066: pay_element_entry_api.delete_element_entry
8067: (p_validate => false
8068: ,p_datetrack_delete_mode => 'ZAP'
8075: );
8076:
8077: else
8078: if r_entry.processing_type = 'N' then
8079: hr_utility.set_location(l_proc,40);
8080: -- Non-recurring entry
8081: -- Derive new effective end date using chk_element_entry_main
8082: -- This will ensure the payroll period is considered
8083: hr_entry.chk_element_entry_main
8098: p_target_entry_id => r_entry.target_entry_id,
8099: p_creator_type => r_entry.creator_type
8100: );
8101: else
8102: hr_utility.set_location(l_proc,50);
8103: -- Recurring entry
8104: -- Derive new effective end date using get_eligibility_period
8105: -- This will ensure entry is not extended beyond lifetime of link
8106: hr_entry.get_eligibility_period
8112: p_max_eligibility_date => l_new_eed
8113: );
8114: end if;
8115: --
8116: hr_utility.trace('New EE effective end date: '||to_char(l_new_eed,'DD-MON-YYYY'));
8117: --
8118: -- Now we have the new effective end date
8119: -- Perform checks to make sure we don't move the EED unnecessarily
8120:
8130: OR r_entry.updating_action_type = 'U') THEN -- bug 9069114
8131: --Bug Fix 9069114, Modified condition to check element entries
8132: -- NOT end dated by STOP_RECURRING formula result rules
8133:
8134: hr_utility.set_location(l_proc,60);
8135:
8136: update pay_element_entry_values_f
8137: set effective_end_date = l_new_eed
8138: where element_entry_id = r_entry.element_entry_id
8149: -- Moving FPD backwards
8150: -- Only change effective end date of entry if it is greater than the new FPD
8151: if r_entry.effective_end_date > l_new_final_process_date then
8152:
8153: hr_utility.set_location(l_proc,70);
8154:
8155: update pay_element_entry_values_f
8156: set effective_end_date = l_new_eed
8157: where element_entry_id = r_entry.element_entry_id