147: l_payroll_text varchar2(70);
148: --
149: begin
150:
151: -- hr_utility.trace_on('Y','GTN');
152: hr_utility.trace('reached range_cursor');
153:
154:
155: select ppa.legislative_parameters,
148: --
149: begin
150:
151: -- hr_utility.trace_on('Y','GTN');
152: hr_utility.trace('reached range_cursor');
153:
154:
155: select ppa.legislative_parameters,
156: pay_paygtn_pkg.get_parameter('TRANSFER_CONC_SET',ppa.legislative_parameters),
206: asg.effective_start_date and asg.effective_end_date
207: and asg.business_group_id +0 = ppa_gen.business_group_id
208: order by asg.person_id';
209:
210: hr_utility.trace('leaving range_cursor');
211:
212: end range_cursor;
213: ---------------------------------- action_creation ----------------------------------
214: --
296: -- algorithm is quite similar to the other process cases,
297: -- but we have to take into account assignments and
298: -- personal payment methods.
299: begin
300: --hr_utility.trace_on('Y','ORACLE');
301: hr_utility.trace('entering action_creation');
302: hr_utility.set_location('procpyr',1);
303: open c_parameters(pactid);
304:
297: -- but we have to take into account assignments and
298: -- personal payment methods.
299: begin
300: --hr_utility.trace_on('Y','ORACLE');
301: hr_utility.trace('entering action_creation');
302: hr_utility.set_location('procpyr',1);
303: open c_parameters(pactid);
304:
305: --Bug 3364759 -- Fetced the values of the cursors in the variables l_business_group_id, l_start_date, l_effective_date
298: -- personal payment methods.
299: begin
300: --hr_utility.trace_on('Y','ORACLE');
301: hr_utility.trace('entering action_creation');
302: hr_utility.set_location('procpyr',1);
303: open c_parameters(pactid);
304:
305: --Bug 3364759 -- Fetced the values of the cursors in the variables l_business_group_id, l_start_date, l_effective_date
306: -- as well.
322: and ue.user_entity_id = di.user_entity_id
323: and ue.creator_type = 'B'
324: and nvl(ue.legislation_code,'US') = 'US';
325: exception when others then
326: hr_utility.trace('Error getting defined balance id');
327: raise;
328: end;
329:
330: begin
336: and ue.user_entity_id = di.user_entity_id
337: and ue.creator_type = 'B'
338: and nvl(ue.legislation_code,'US') = 'US';
339: exception when others then
340: hr_utility.trace('Error getting defined balance id');
341: raise;
342: end;
343: */
344:
341: raise;
342: end;
343: */
344:
345: hr_utility.set_location('procpyr',1);
346: open c_actions(pactid,stperson,endperson);
347: num := 0;
348: loop
349: hr_utility.set_location('procpyr',2);
345: hr_utility.set_location('procpyr',1);
346: open c_actions(pactid,stperson,endperson);
347: num := 0;
348: loop
349: hr_utility.set_location('procpyr',2);
350: fetch c_actions into action_type,lockedactid,assignid,greid;
351: if c_actions%found then num := num + 1; end if;
352: exit when c_actions%notfound;
353: --
394:
395:
396: null;
397: else
398: hr_utility.set_location('procpyr',3);
399: select pay_assignment_actions_s.nextval
400: into lockingactid
401: from dual;
402: --
412: end if;
413: --
414: end loop;
415: close c_actions;
416: hr_utility.trace('leaving action_creation');
417: end action_create_bra;
418:
419: ---------------------------------- action_creation ----------------------------------
420: --
502: -- algorithm is quite similar to the other process cases,
503: -- but we have to take into account assignments and
504: -- personal payment methods.
505: begin
506: --hr_utility.trace_on('Y','ORACLE');
507: hr_utility.trace('entering action_creation');
508: hr_utility.set_location('procpyr',1);
509: open c_parameters(pactid);
510:
503: -- but we have to take into account assignments and
504: -- personal payment methods.
505: begin
506: --hr_utility.trace_on('Y','ORACLE');
507: hr_utility.trace('entering action_creation');
508: hr_utility.set_location('procpyr',1);
509: open c_parameters(pactid);
510:
511: --Bug 3364759 -- Fetced the values of the cursors in the variables l_business_group_id, l_start_date, l_effective_date
504: -- personal payment methods.
505: begin
506: --hr_utility.trace_on('Y','ORACLE');
507: hr_utility.trace('entering action_creation');
508: hr_utility.set_location('procpyr',1);
509: open c_parameters(pactid);
510:
511: --Bug 3364759 -- Fetced the values of the cursors in the variables l_business_group_id, l_start_date, l_effective_date
512: -- as well.
528: and ue.user_entity_id = di.user_entity_id
529: and ue.creator_type = 'B'
530: and nvl(ue.legislation_code,'US') = 'US';
531: exception when others then
532: hr_utility.trace('Error getting defined balance id');
533: raise;
534: end;
535:
536: begin
542: and ue.user_entity_id = di.user_entity_id
543: and ue.creator_type = 'B'
544: and nvl(ue.legislation_code,'US') = 'US';
545: exception when others then
546: hr_utility.trace('Error getting defined balance id');
547: raise;
548: end;
549: */
550:
547: raise;
548: end;
549: */
550:
551: hr_utility.set_location('procpyr',1);
552: open c_actions(pactid,stperson,endperson);
553: num := 0;
554: loop
555: hr_utility.set_location('procpyr',2);
551: hr_utility.set_location('procpyr',1);
552: open c_actions(pactid,stperson,endperson);
553: num := 0;
554: loop
555: hr_utility.set_location('procpyr',2);
556: fetch c_actions into action_type,lockedactid,assignid,greid;
557: if c_actions%found then num := num + 1; end if;
558: exit when c_actions%notfound;
559: --
600:
601:
602: null;
603: else
604: hr_utility.set_location('procpyr',3);
605: select pay_assignment_actions_s.nextval
606: into lockingactid
607: from dual;
608: --
614: end if;
615: --
616: end loop;
617: close c_actions;
618: hr_utility.trace('leaving action_creation');
619: end action_creation;
620: ---------------------------------- sort_action ----------------------------------
621: procedure sort_action
622: (
732: begin
733:
734: begin
735: --
736: -- hr_utility.trace_on (null,'1');
737: hr_utility.trace('entering archive_init');
738: select
739: ppa.legislative_parameters,
740: ppa.business_group_id,
733:
734: begin
735: --
736: -- hr_utility.trace_on (null,'1');
737: hr_utility.trace('entering archive_init');
738: select
739: ppa.legislative_parameters,
740: ppa.business_group_id,
741: ppa.start_date,
757: p_ppa_finder := pay_paygtn_pkg.get_parameter('TRANSFER_PPA_FINDER',l_param);
758: p_template_code := pay_paygtn_pkg.get_parameter('TRANSFER_TEMPLATE',l_param);
759: p_asg_flag := nvl(pay_paygtn_pkg.get_parameter('TRANSFER_EMP_INFO',l_param),'N');
760:
761: hr_utility.trace('p_asg_flag in archive_init='||p_asg_flag);
762: p_ded_bal_status1 := pay_us_payroll_utils.check_balance_status(p_start_date
763: ,p_business_group_id
764: ,'PAY_US_PRE_TAX_DEDUCTIONS','US');
765: p_ded_bal_status2 := pay_us_payroll_utils.check_balance_status(p_start_date
920: exception
921: when no_data_found then
922: null;
923: end;
924: hr_utility.trace('leaving archive_init');
925: end ARCHIVE_INIT;
926:
927:
928: Procedure ARCHIVE_CODE (p_payroll_action_id IN NUMBER
927:
928: Procedure ARCHIVE_CODE (p_payroll_action_id IN NUMBER
929: ,p_chunk_number IN NUMBER) IS
930: begin
931: hr_utility.trace('entering archive_code');
932: hr_utility.trace('l_arch_count ='||l_arch_count);
933: /*-- Bug#4942114 starts --*/
934: /* pay_gtnlod_pkg.load_data(p_payroll_action_id => p_payroll_action_id,
935: p_chunk => p_chunk_number,
928: Procedure ARCHIVE_CODE (p_payroll_action_id IN NUMBER
929: ,p_chunk_number IN NUMBER) IS
930: begin
931: hr_utility.trace('entering archive_code');
932: hr_utility.trace('l_arch_count ='||l_arch_count);
933: /*-- Bug#4942114 starts --*/
934: /* pay_gtnlod_pkg.load_data(p_payroll_action_id => p_payroll_action_id,
935: p_chunk => p_chunk_number,
936: ppa_finder => p_ppa_finder,
967: p_er_liab_status => p_er_liab_status,
968: p_wc_er_liab_status_count => p_wc_er_liab_status_count,
969: p_asg_flag => p_asg_flag);
970: /*-- Bug#4942114 ends --*/
971: hr_utility.trace('leaving archive_code');
972: end ARCHIVE_CODE;
973:
974: PROCEDURE CREATE_GTN_XML_DATA
975: IS
978:
979: BEGIN
980:
981: lv_proc_name := g_proc_name || 'CREATE_GTN_XML_DATA';
982: hr_utility.trace ('Entering '|| lv_proc_name);
983:
984: pay_us_xdo_report.populate_gtn_report_data(p_ppa_finder => p_ppa_finder
985: ,p_xfdf_blob => lb_xml_blob);
986: pay_core_files.write_to_magtape_lob(lb_xml_blob);
984: pay_us_xdo_report.populate_gtn_report_data(p_ppa_finder => p_ppa_finder
985: ,p_xfdf_blob => lb_xml_blob);
986: pay_core_files.write_to_magtape_lob(lb_xml_blob);
987:
988: hr_utility.trace ('Leaving '|| lv_proc_name);
989:
990: EXCEPTION WHEN OTHERS THEN
991: HR_UTILITY.TRACE('Inside Exception WHEN OTHERS of Procedure' || lv_proc_name);
992: END CREATE_GTN_XML_DATA;
987:
988: hr_utility.trace ('Leaving '|| lv_proc_name);
989:
990: EXCEPTION WHEN OTHERS THEN
991: HR_UTILITY.TRACE('Inside Exception WHEN OTHERS of Procedure' || lv_proc_name);
992: END CREATE_GTN_XML_DATA;
993:
994:
995: Procedure ARCHIVE_DEINIT(p_payroll_action_id IN NUMBER) IS
1057:
1058: BEGIN
1059:
1060: lv_proc_name := g_proc_name || 'CREATE_GTN_XML_DATA';
1061: hr_utility.trace ('Entering '|| lv_proc_name);
1062: hr_utility.trace ('p_payroll_action_id '|| p_payroll_action_id);
1063: hr_utility.trace ('p_template_code '|| p_template_code);
1064: --bug 6365474
1065: OPEN csr_release;
1058: BEGIN
1059:
1060: lv_proc_name := g_proc_name || 'CREATE_GTN_XML_DATA';
1061: hr_utility.trace ('Entering '|| lv_proc_name);
1062: hr_utility.trace ('p_payroll_action_id '|| p_payroll_action_id);
1063: hr_utility.trace ('p_template_code '|| p_template_code);
1064: --bug 6365474
1065: OPEN csr_release;
1066: FETCH csr_release INTO l_release;
1059:
1060: lv_proc_name := g_proc_name || 'CREATE_GTN_XML_DATA';
1061: hr_utility.trace ('Entering '|| lv_proc_name);
1062: hr_utility.trace ('p_payroll_action_id '|| p_payroll_action_id);
1063: hr_utility.trace ('p_template_code '|| p_template_code);
1064: --bug 6365474
1065: OPEN csr_release;
1066: FETCH csr_release INTO l_release;
1067: CLOSE csr_release;
1104: -- bug 6799553
1105:
1106: pay_archive.remove_report_actions(p_payroll_action_id);
1107:
1108: hr_utility.trace ('ln_current_request_id '|| ln_current_request_id);
1109: hr_utility.trace ('lv_template_code '|| lv_template_code);
1110: hr_utility.trace ('ln_application_id '|| ln_application_id);
1111: hr_utility.trace ('lv_template_type '|| lv_template_type);
1112: --bug 6365474
1105:
1106: pay_archive.remove_report_actions(p_payroll_action_id);
1107:
1108: hr_utility.trace ('ln_current_request_id '|| ln_current_request_id);
1109: hr_utility.trace ('lv_template_code '|| lv_template_code);
1110: hr_utility.trace ('ln_application_id '|| ln_application_id);
1111: hr_utility.trace ('lv_template_type '|| lv_template_type);
1112: --bug 6365474
1113: if(l_release = 12) then
1106: pay_archive.remove_report_actions(p_payroll_action_id);
1107:
1108: hr_utility.trace ('ln_current_request_id '|| ln_current_request_id);
1109: hr_utility.trace ('lv_template_code '|| lv_template_code);
1110: hr_utility.trace ('ln_application_id '|| ln_application_id);
1111: hr_utility.trace ('lv_template_type '|| lv_template_type);
1112: --bug 6365474
1113: if(l_release = 12) then
1114:
1107:
1108: hr_utility.trace ('ln_current_request_id '|| ln_current_request_id);
1109: hr_utility.trace ('lv_template_code '|| lv_template_code);
1110: hr_utility.trace ('ln_application_id '|| ln_application_id);
1111: hr_utility.trace ('lv_template_type '|| lv_template_type);
1112: --bug 6365474
1113: if(l_release = 12) then
1114:
1115: ln_req_id := fnd_request.submit_request
1124: argument6 => 'N',
1125: argument7 => lv_template_type,
1126: argument8 => 'PDF'
1127: );
1128: hr_utility.trace ('Leaving 12'|| lv_proc_name);
1129: else
1130: --bug 6365474
1131: ln_req_id := fnd_request.submit_request
1132: (
1142: );
1143:
1144:
1145:
1146: hr_utility.trace ('Leaving 11i'|| lv_proc_name);
1147: --bug 6365474
1148: end if;
1149: --bug 6365474
1150:
1154:
1155: end ARCHIVE_DEINIT;
1156:
1157: BEGIN
1158: -- hr_utility.trace_on(NULL,'trc_pypaygtn');
1159: g_proc_name := 'PAY_PAYGTN_PKG.';
1160:
1161: END PAY_PAYGTN_PKG;