63:
64: begin
65:
66: if g_debug then
67: hr_utility.set_location('Entering : archive_item',1);
68: end if;
69:
70: open get_user_entity_id (p_item);
71: fetch get_user_entity_id into v_user_Entity_id,
99: end if;
100: else
101: close get_user_entity_id;
102: if g_debug then
103: hr_utility.set_location('User entity not found :'||p_item,20);
104: end if;
105: end if;
106:
107: if g_debug then
104: end if;
105: end if;
106:
107: if g_debug then
108: hr_utility.set_location('Leaving : archive_item',1);
109: end if;
110:
111: exception
112: when others then
112: when others then
113:
114: if get_user_entity_id%isopen then
115: close get_user_entity_id;
116: hr_utility.set_location('closing..',117);
117: end if;
118:
119: hr_utility.set_location('Error in archive_item',20);
120: raise;
115: close get_user_entity_id;
116: hr_utility.set_location('closing..',117);
117: end if;
118:
119: hr_utility.set_location('Error in archive_item',20);
120: raise;
121: end archive_item;
122:
123: --------------------------------------------------------------------------------+
179: l_arch_tab(9).item := 'X_KR_BP_REP_NI' ;
180: l_arch_tab(10).item := 'X_KR_BP_TAX_OFFICE_CODE' ;
181:
182: if g_debug then
183: hr_utility.set_location('Entering : Archiving corp Details ',1);
184: hr_utility.set_location('Assignments action id is '||p_assignment_action_id,2);
185: end if;
186:
187: open c_corp_details ;
180: l_arch_tab(10).item := 'X_KR_BP_TAX_OFFICE_CODE' ;
181:
182: if g_debug then
183: hr_utility.set_location('Entering : Archiving corp Details ',1);
184: hr_utility.set_location('Assignments action id is '||p_assignment_action_id,2);
185: end if;
186:
187: open c_corp_details ;
188: fetch c_corp_details
199:
200: close c_corp_details ;
201:
202: if g_debug then
203: hr_utility.set_location('Creating Archive Item ',3);
204: end if;
205:
206: for i in 1..l_arch_tab.count loop
207:
212: end loop;
213:
214:
215: if g_debug then
216: hr_utility.set_location('Exiting : Archiving corp Details ',4);
217: end if;
218:
219: exception
220: when others then
217: end if;
218:
219: exception
220: when others then
221: hr_utility.set_location('Error in archiving corp details ',10);
222: raise;
223:
224: End archive_corp_details;
225:
381: l_arch_tab(8).item := 'X_KR_EMP_PAID_DATE' ;
382: l_arch_tab(9).item := 'X_KR_EMP_COUNTRY_CODE' ;
383:
384: if g_debug then
385: hr_utility.set_location('Entering : Archiving current emp Details ',1);
386: hr_utility.set_location('Assignment action id is '||p_assignment_action_id,2);
387: end if;
388:
389: open c_cemp_details ;
382: l_arch_tab(9).item := 'X_KR_EMP_COUNTRY_CODE' ;
383:
384: if g_debug then
385: hr_utility.set_location('Entering : Archiving current emp Details ',1);
386: hr_utility.set_location('Assignment action id is '||p_assignment_action_id,2);
387: end if;
388:
389: open c_cemp_details ;
390: fetch c_cemp_details
402: close c_cemp_details ;
403: return(FALSE);
404: else
405: if g_debug then
406: hr_utility.set_location('Creating Archive Item ',3);
407: end if;
408:
409: for i in 1..l_arch_tab.count loop
410:
446:
447: end if;
448:
449: if g_debug then
450: hr_utility.set_location('Exiting :Archiving current emp Details',200);
451: end if;
452: return(true);
453:
454: exception
452: return(true);
453:
454: exception
455: when others then
456: hr_utility.set_location('Error in archiving emp details ',10);
457: raise;
458:
459: End archive_emp_details;
460:
519:
520: begin
521:
522: if g_debug then
523: hr_utility.set_location('Entering : Populate archive item ',1);
524: hr_utility.set_location('Assignments action id is '||p_assignment_action_id,2);
525: end if;
526:
527: l_ele_ent_id_tab.delete;
520: begin
521:
522: if g_debug then
523: hr_utility.set_location('Entering : Populate archive item ',1);
524: hr_utility.set_location('Assignments action id is '||p_assignment_action_id,2);
525: end if;
526:
527: l_ele_ent_id_tab.delete;
528: l_ele_value_tab.delete;
533: l_ele_ent_id_tab,
534: l_ele_value_tab;
535:
536: if g_debug then
537: hr_utility.set_location('Creating Archive Item ',3);
538: end if;
539:
540: for i in 1..l_ele_ent_id_tab.count loop
541: archive_item(p_item => p_item
546:
547: close c_prev_emp_details;
548:
549: if g_debug then
550: hr_utility.set_location('Exiting : Populate archive item ',200);
551: end if;
552: exception
553:
554: when others then
551: end if;
552: exception
553:
554: when others then
555: hr_utility.set_location('Error in populate archive item ',10);
556: raise;
557:
558: end;
559: -- Bug 9247411
562:
563: begin
564:
565: if g_debug then
566: hr_utility.set_location('Entering : Populate archive item ',1);
567: hr_utility.set_location('Assignments action id is '||p_assignment_action_id,2);
568: end if;
569:
570: l_ele_ent_id_tab.delete;
563: begin
564:
565: if g_debug then
566: hr_utility.set_location('Entering : Populate archive item ',1);
567: hr_utility.set_location('Assignments action id is '||p_assignment_action_id,2);
568: end if;
569:
570: l_ele_ent_id_tab.delete;
571: l_ele_value_tab.delete;
602: l_ele_ent_id_tab,
603: l_ele_value_tab;
604:
605: if g_debug then
606: hr_utility.set_location('Creating Archive Item ',3);
607: end if;
608:
609: for i in 1..l_ele_ent_id_tab.count loop
610: for j in 1..l_ele_ent_id_tab2.count loop
620:
621: close c_prev_emp_details;
622:
623: if g_debug then
624: hr_utility.set_location('Exiting : Populate archive item ',200);
625: end if;
626: exception
627:
628: when others then
625: end if;
626: exception
627:
628: when others then
629: hr_utility.set_location('Error in populate archive item ',10);
630: raise;
631:
632: end;
633:
640:
641: begin
642:
643: if g_debug then
644: hr_utility.set_location('Entering : archive_preapid_item_value',1);
645: end if;
646:
647: l_ele_ent_id_tab.delete;
648: l_ele_value_tab.delete;
666: ,p_context2 => null
667: ,p_value => l_prepaid_value);
668:
669: if g_debug then
670: hr_utility.set_location('Leaving : archive_preapid_item_value',1);
671: end if;
672:
673: exception
674: when others then
671: end if;
672:
673: exception
674: when others then
675: hr_utility.set_location('Error in archive_preapid_item_value ',10);
676: raise;
677:
678: end archive_preapid_item_value;
679:
679:
680: Begin
681:
682: if g_debug then
683: hr_utility.set_location('Entering : Archiving prev emp Details ',10);
684: end if;
685:
686: populate_archive_item('X_KR_PREV_BP_NUMBER','PREV_ER_INFO','BP_NUMBER');
687: populate_archive_item('X_KR_PREV_BP_NAME','PREV_ER_INFO','BP_NAME');
719: archive_preapid_item_value('X_KR_EMP_PREPAID_STAX','PREV_ER_INFO','STAX',p_assignment_action_id);
720:
721:
722: if g_debug then
723: hr_utility.set_location('Exiting : Archiving prev emp Details ',200);
724: end if;
725:
726: End archive_prev_emp_details;
727:
853: --
854: begin
855: --
856: if g_debug then
857: hr_utility.trace('Start Of assignment_action_creation');
858: end if;
859:
860: open csr_process_assignment;
861: loop
868: into l_locking_action_id
869: from dual;
870: --
871: if g_debug then
872: hr_utility.trace(' Locking assignment_action_id ..:'||l_locking_action_id);
873: end if;
874:
875: hr_nonrun_asact.insact(lockingactid => l_locking_action_id,
876: assignid => l_csr_process_assignment.assignment_id,
882: --
883: -- Lock archived Assignemnt Actions
884: --
885: if g_debug then
886: hr_utility.trace('Locked assignment_action_id ..:'||l_csr_process_assignment.assignment_action_id);
887: end if;
888:
889: --Bug # 2377251 : added the the code to lock the assignment_action_id (i.e child assignment action id )
890:
891: hr_nonrun_asact.insint(lockingactid => l_locking_action_id,
892: lockedactid => l_csr_process_assignment.assignment_action_id);
893:
894: if g_debug then
895: hr_utility.trace('Locked source_action_id ..:'||l_csr_process_assignment.source_action_id);
896: end if;
897: --
898: hr_nonrun_asact.insint(lockingactid => l_locking_action_id,
899: lockedactid => l_csr_process_assignment.source_action_id);
902: end loop;
903: close csr_process_assignment;
904:
905: if g_debug then
906: hr_utility.trace('End Of assignment_action_creation');
907: end if;
908: --
909: end assignment_action_creation;
910: --------------------------------------------------------------------------------
954: --
955: begin
956: --
957: if g_debug then
958: hr_utility.trace('Start of archive_data');
959: end if;
960:
961: l_context_no := pay_archive.g_context_values.sz;
962: for i in 1..l_context_no loop
1029: --
1030: --
1031: --
1032: if g_debug then
1033: hr_utility.set_location('P_BUSINESS_GROUP_ID ->' ||l_business_group_id,100);
1034: hr_utility.set_location('P_TAX_UNIT_ID ->' ||l_tax_unit_id,200);
1035: hr_utility.set_location('P_ASSIGNMENT_ID ->' ||l_assignment_id,300);
1036: hr_utility.set_location('P_PAYROLL_ACTION_ID ->' ||l_payroll_action_id,400);
1037: hr_utility.set_location('P_ASSIGNMENT_ACTION_ID ->' ||p_assignment_action_id,500);
1030: --
1031: --
1032: if g_debug then
1033: hr_utility.set_location('P_BUSINESS_GROUP_ID ->' ||l_business_group_id,100);
1034: hr_utility.set_location('P_TAX_UNIT_ID ->' ||l_tax_unit_id,200);
1035: hr_utility.set_location('P_ASSIGNMENT_ID ->' ||l_assignment_id,300);
1036: hr_utility.set_location('P_PAYROLL_ACTION_ID ->' ||l_payroll_action_id,400);
1037: hr_utility.set_location('P_ASSIGNMENT_ACTION_ID ->' ||p_assignment_action_id,500);
1038: end if;
1031: --
1032: if g_debug then
1033: hr_utility.set_location('P_BUSINESS_GROUP_ID ->' ||l_business_group_id,100);
1034: hr_utility.set_location('P_TAX_UNIT_ID ->' ||l_tax_unit_id,200);
1035: hr_utility.set_location('P_ASSIGNMENT_ID ->' ||l_assignment_id,300);
1036: hr_utility.set_location('P_PAYROLL_ACTION_ID ->' ||l_payroll_action_id,400);
1037: hr_utility.set_location('P_ASSIGNMENT_ACTION_ID ->' ||p_assignment_action_id,500);
1038: end if;
1039:
1032: if g_debug then
1033: hr_utility.set_location('P_BUSINESS_GROUP_ID ->' ||l_business_group_id,100);
1034: hr_utility.set_location('P_TAX_UNIT_ID ->' ||l_tax_unit_id,200);
1035: hr_utility.set_location('P_ASSIGNMENT_ID ->' ||l_assignment_id,300);
1036: hr_utility.set_location('P_PAYROLL_ACTION_ID ->' ||l_payroll_action_id,400);
1037: hr_utility.set_location('P_ASSIGNMENT_ACTION_ID ->' ||p_assignment_action_id,500);
1038: end if;
1039:
1040: --------------------------
1033: hr_utility.set_location('P_BUSINESS_GROUP_ID ->' ||l_business_group_id,100);
1034: hr_utility.set_location('P_TAX_UNIT_ID ->' ||l_tax_unit_id,200);
1035: hr_utility.set_location('P_ASSIGNMENT_ID ->' ||l_assignment_id,300);
1036: hr_utility.set_location('P_PAYROLL_ACTION_ID ->' ||l_payroll_action_id,400);
1037: hr_utility.set_location('P_ASSIGNMENT_ACTION_ID ->' ||p_assignment_action_id,500);
1038: end if;
1039:
1040: --------------------------
1041:
1041:
1042: --Archive efile related data
1043: --------------------------
1044: if g_debug then
1045: hr_utility.set_location('Calling archive_xdbi',2);
1046: end if;
1047:
1048: archive_xdbi ( P_BUSINESS_GROUP_ID =>l_business_group_id
1049: ,P_TAX_UNIT_ID =>l_tax_unit_id
1052: ,P_ASSIGNMENT_ACTION_ID =>p_assignment_action_id
1053: ,P_DATE_EARNED =>l_date_earned );
1054:
1055: if g_debug then
1056: hr_utility.set_location('Exiting archive_xdbi',3);
1057: hr_utility.trace('End of archive_data');
1058: end if;
1059: end archive_data;
1060:
1053: ,P_DATE_EARNED =>l_date_earned );
1054:
1055: if g_debug then
1056: hr_utility.set_location('Exiting archive_xdbi',3);
1057: hr_utility.trace('End of archive_data');
1058: end if;
1059: end archive_data;
1060:
1061: begin
1058: end if;
1059: end archive_data;
1060:
1061: begin
1062: g_debug := hr_utility.debug_enabled;
1063: end pay_kr_sep_archive_pkg;