3:
4:
5: ----------------- Globals , Record types , Tables -------------------------------------------------
6:
7: g_debug boolean := hr_utility.debug_enabled;
8:
9: /*
10: TYPE element_rec IS RECORD (
11: classification_name VARCHAR2(60)
88: BEGIN
89: -- fnd_file.put_line(fnd_file.log,'Entering Function GET_PARAMETER');
90: --
91: IF g_debug THEN
92: hr_utility.set_location(' Entering Function GET_PARAMETER',10);
93: END IF;
94: l_start_pos := instr(' '||p_parameter_string,l_delimiter||p_token||'=');
95: --
96:
114: --
115: RETURN l_parameter;
116:
117: IF g_debug THEN
118: hr_utility.set_location(' Leaving Function GET_PARAMETER',20);
119: END IF;
120: -- fnd_file.put_line(fnd_file.log,'Leaving Function GET_PARAMETER');
121: END;
122:
157: ,p_business_group_id;
158: CLOSE csr_parameter_info;
159: --
160: IF g_debug THEN
161: hr_utility.set_location(' Leaving Procedure GET_ALL_PARAMETERS',30);
162: END IF;
163:
164: -- fnd_file.put_line(fnd_file.log,'GET_ALL_PARAMETERS : p_payroll_action_id = ' || p_payroll_action_id );
165: -- fnd_file.put_line(fnd_file.log,'GET_ALL_PARAMETERS : p_payroll_id = ' || p_payroll_id );
473:
474: BEGIN
475: -- fnd_file.put_line(fnd_file.log,'Entering Procedure RANGE_CODE');
476: IF g_debug THEN
477: hr_utility.set_location(' Entering Procedure RANGE_CODE',40);
478: END IF;
479:
480: PAY_NO_PAYSLIP_ARCHIVE.GET_ALL_PARAMETERS(p_payroll_action_id
481: ,l_business_group_id
827: AND ppa.business_group_id = ppf.business_group_id
828: ORDER BY ppf.person_id';
829:
830: IF g_debug THEN
831: hr_utility.set_location(' Leaving Procedure RANGE_CODE',50);
832: END IF;
833:
834: -- fnd_file.put_line(fnd_file.log,'Leaving Procedure RANGE_CODE');
835:
938: BEGIN
939:
940: -- fnd_file.put_line(fnd_file.log,'Entering Procedure ASSIGNMENT_ACTION_CODE');
941: IF g_debug THEN
942: hr_utility.set_location(' Entering Procedure ASSIGNMENT_ACTION_CODE',60);
943: END IF;
944:
945: PAY_NO_PAYSLIP_ARCHIVE.GET_ALL_PARAMETERS(p_payroll_action_id
946: ,l_business_group_id
988:
989: END LOOP;
990:
991: IF g_debug THEN
992: hr_utility.set_location(' Leaving Procedure ASSIGNMENT_ACTION_CODE',70);
993: END IF;
994: -- fnd_file.put_line(fnd_file.log,'Leaving Procedure ASSIGNMENT_ACTION_CODE');
995:
996: END ASSIGNMENT_ACTION_CODE;
1071:
1072: -- fnd_file.put_line(fnd_file.log,'Entering Procedure INITIALIZATION_CODE');
1073:
1074: IF g_debug THEN
1075: hr_utility.set_location(' Entering Procedure INITIALIZATION_CODE',80);
1076: END IF;
1077:
1078: /*fnd_file.put_line(fnd_file.log,'In INIT_CODE 0');*/
1079:
1125: p_date_earned => NULL,
1126: p_archive_flag => 'N');
1127:
1128: IF g_debug THEN
1129: hr_utility.set_location(' Leaving Procedure INITIALIZATION_CODE',90);
1130: END IF;
1131:
1132: -- fnd_file.put_line(fnd_file.log,'Leaving Procedure INITIALIZATION_CODE');
1133:
1136: g_err_num := SQLCODE;
1137: -- fnd_file.put_line(fnd_file.log,'ORA_ERR: ' || g_err_num || 'In INITIALIZATION_CODE');
1138:
1139: IF g_debug THEN
1140: hr_utility.set_location('ORA_ERR: ' || g_err_num || 'In INITIALIZATION_CODE',180);
1141: END IF;
1142:
1143: -- fnd_file.put_line(fnd_file.log,'Leaving Procedure INITIALIZATION_CODE');
1144:
1160:
1161: BEGIN
1162:
1163: IF g_debug THEN
1164: hr_utility.set_location(' Entering Procedure SETUP_ELEMENT_DEFINITIONS',100);
1165: END IF;
1166:
1167: g_index := g_index + 1;
1168: /* Initialize global tables that hold Additional Element details */
1179: g_element_table(g_index).value_set_id := p_value_set_id ;
1180:
1181:
1182: IF g_debug THEN
1183: hr_utility.set_location(' Leaving Procedure SETUP_ELEMENT_DEFINITIONS',110);
1184: END IF;
1185:
1186: END SETUP_ELEMENT_DEFINITIONS;
1187:
1193: IS
1194: BEGIN
1195:
1196: IF g_debug THEN
1197: hr_utility.set_location(' Entering Procedure SETUP_BALANCE_DEFINITIONS',120);
1198: END IF;
1199:
1200: g_index_bal := g_index_bal + 1;
1201: /* Initialize global tables that hold Other Balances details */
1205:
1206: --fnd_file.put_line(fnd_file.log,'SETUP_BALANCE_DEFINITIONS ' ||p_balance_name);
1207:
1208: IF g_debug THEN
1209: hr_utility.set_location(' Leaving Procedure SETUP_BALANCE_DEFINITIONS',130);
1210: END IF;
1211:
1212: END SETUP_BALANCE_DEFINITIONS;
1213:
1228:
1229: BEGIN
1230:
1231: IF g_debug THEN
1232: hr_utility.set_location(' Entering Function GET_COUNTRY_NAME',140);
1233: END IF;
1234:
1235: OPEN csr_get_territory_name(p_territory_code);
1236: FETCH csr_get_territory_name into l_country;
1238:
1239: RETURN l_country;
1240:
1241: IF g_debug THEN
1242: hr_utility.set_location(' Leaving Function GET_COUNTRY_NAME',150);
1243: END IF;
1244:
1245: END GET_COUNTRY_NAME;
1246:
1505:
1506: BEGIN
1507:
1508: IF g_debug THEN
1509: hr_utility.set_location(' Entering Procedure ARCHIVE_EMPLOYEE_DETAILS',160);
1510: END IF;
1511:
1512: /*fnd_file.put_line(fnd_file.log,'Entering Procedure ARCHIVE_EMPLOYEE_DETAILS');*/
1513:
1706:
1707: l_diff_le_text := 'Y' ;
1708:
1709: /* set the message name and get the message text */
1710: hr_utility.set_message (801, 'PAY_376864_NO_SEC_ASG_LE_DIFF');
1711: l_msg_txt := hr_utility.get_message ;
1712:
1713: /* Arcvhive the message */
1714: pay_action_information_api.create_action_information (
1707: l_diff_le_text := 'Y' ;
1708:
1709: /* set the message name and get the message text */
1710: hr_utility.set_message (801, 'PAY_376864_NO_SEC_ASG_LE_DIFF');
1711: l_msg_txt := hr_utility.get_message ;
1712:
1713: /* Arcvhive the message */
1714: pay_action_information_api.create_action_information (
1715: p_action_information_id => l_action_info_id
1854: /*fnd_file.put_line(fnd_file.log,'Entering Procedure ARCHIVE_EMPLOYEE_DETAILS 10');*/
1855:
1856: --
1857: IF g_debug THEN
1858: hr_utility.set_location(' Leaving Procedure ARCHIVE_EMPLOYEE_DETAILS',170);
1859: END IF;
1860: --
1861:
1862: EXCEPTION WHEN OTHERS THEN
1863: g_err_num := SQLCODE;
1864: /*fnd_file.put_line(fnd_file.log,'ORA_ERR: ' || g_err_num || 'In ARCHIVE_EMPLOYEE_DETAILS');*/
1865:
1866: IF g_debug THEN
1867: hr_utility.set_location('ORA_ERR: ' || g_err_num || 'In ARCHIVE_EMPLOYEE_DETAILS',180);
1868: END IF;
1869:
1870: END ARCHIVE_EMPLOYEE_DETAILS;
1871:
2170: ----------------------
2171: BEGIN
2172:
2173: IF g_debug THEN
2174: hr_utility.set_location(' Entering Procedure ARCHIVE_ELEMENT_INFO',210);
2175: END IF;
2176:
2177: ------------------------
2178: /* ALL ELEMENTS */
2491:
2492: END LOOP;
2493:
2494: IF g_debug THEN
2495: hr_utility.set_location(' Leaving Procedure ARCHIVE_ELEMENT_INFO',220);
2496: END IF;
2497:
2498: EXCEPTION WHEN OTHERS THEN
2499: g_err_num := SQLCODE;
2499: g_err_num := SQLCODE;
2500: /*fnd_file.put_line(fnd_file.log,'ORA_ERR: ' || g_err_num || 'In ARCHIVE_ELEMENT_INFO');*/
2501:
2502: IF g_debug THEN
2503: hr_utility.set_location('ORA_ERR: ' || g_err_num || 'ARCHIVE_ELEMENT_INFO',230);
2504: END IF;
2505:
2506: END ARCHIVE_ELEMENT_INFO;
2507:
2529:
2530: BEGIN
2531:
2532: IF g_debug THEN
2533: hr_utility.set_location(' Entering Function GET_DEFINED_BALANCE_ID',240);
2534: END IF;
2535:
2536: OPEN csr_def_bal_id(p_user_name);
2537: FETCH csr_def_bal_id INTO l_defined_balance_id;
2538: CLOSE csr_def_bal_id;
2539: RETURN l_defined_balance_id;
2540:
2541: IF g_debug THEN
2542: hr_utility.set_location(' Leaving Function GET_DEFINED_BALANCE_ID',250);
2543: END IF;
2544:
2545: END GET_DEFINED_BALANCE_ID;
2546:
2645:
2646: BEGIN
2647:
2648: IF g_debug THEN
2649: hr_utility.set_location(' Entering Procedure ARCHIVE_PAYMENT_INFO',260);
2650: END IF;
2651:
2652: /*fnd_file.put_line(fnd_file.log,'In ARCHIVE_PAYMENT_INFO 1');*/
2653:
2781: END LOOP;
2782: CLOSE csr_chk;
2783:
2784: IF g_debug THEN
2785: hr_utility.set_location(' Leaving Procedure ARCHIVE_PAYMENT_INFO',270);
2786: END IF;
2787:
2788: EXCEPTION WHEN OTHERS THEN
2789: g_err_num := SQLCODE;
2790:
2791: /*fnd_file.put_line(fnd_file.log,'ORA_ERR: ' || g_err_num || 'In ARCHIVE_PAYMENT_INFO');*/
2792:
2793: IF g_debug THEN
2794: hr_utility.set_location('ORA_ERR: ' || g_err_num || 'In ARCHIVE_PAYMENT_INFO',280);
2795: END IF;
2796:
2797: END ARCHIVE_PAYMENT_INFO;
2798: ----------------------------------------- PROCEDURE ARCHIVE_ACCRUAL_PLAN ---------------------------------------------------------
2861: --
2862: BEGIN
2863: --
2864: IF g_debug THEN
2865: hr_utility.set_location(' Entering Procedure ARCHIVE_ACCRUAL_PLAN',290);
2866: END IF;
2867: OPEN csr_leave_balance;
2868: FETCH csr_leave_balance INTO
2869: l_accrual_plan_name
2923: END IF;
2924: --
2925: CLOSE csr_leave_balance;
2926: IF g_debug THEN
2927: hr_utility.set_location(' Leaving Procedure ARCHIVE_ACCRUAL_PLAN',300);
2928: END IF;
2929: --
2930: EXCEPTION
2931: WHEN OTHERS THEN
2937: --
2938: g_err_num := SQLCODE;
2939: --fnd_file.put_line(fnd_file.log,'ORA_ERR: ' || g_err_num || 'In ARCHIVE_ACCRUAL_PLAN');
2940: IF g_debug THEN
2941: hr_utility.set_location('ORA_ERR: ' || g_err_num || ' In ARCHIVE_ACCRUAL_PLAN',310);
2942: END IF;
2943: RAISE;
2944: END ARCHIVE_ACCRUAL_PLAN;*/
2945:
3103:
3104: BEGIN
3105:
3106: IF g_debug THEN
3107: hr_utility.set_location(' Entering Procedure ARCHIVE_ADD_ELEMENT',320);
3108: END IF;
3109:
3110: IF p_archive_flag = 'N' THEN
3111: ---------------------------------------------------
3338: g_err_num := SQLCODE;
3339: /*fnd_file.put_line(fnd_file.log,'ORA_ERR: ' || g_err_num || 'In ARCHIVE_ADD_ELEMENT');*/
3340:
3341: IF g_debug THEN
3342: hr_utility.set_location('ORA_ERR: ' || g_err_num || 'In ARCHIVE_ADD_ELEMENT',330);
3343: END IF;
3344: END;
3345: END LOOP;
3346:
3346:
3347: END IF;
3348:
3349: IF g_debug THEN
3350: hr_utility.set_location(' Leaving Procedure ARCHIVE_ADD_ELEMENT',340);
3351: END IF;
3352:
3353: END ARCHIVE_ADD_ELEMENT;
3354:
3405:
3406: BEGIN
3407:
3408: IF g_debug THEN
3409: hr_utility.set_location(' Entering Procedure ARCHIVE_OTH_BALANCE',350);
3410: END IF;
3411:
3412: -- fnd_file.put_line(fnd_file.log,'In ARCHIVE_OTH_BALANCE 0');
3413: /*fnd_file.put_line(fnd_file.log,'Entering In ARCHIVE_OTH_BALANCE global');*/
3535: g_err_num := SQLCODE;
3536: -- fnd_file.put_line(fnd_file.log,'ORA_ERR: ' || g_err_num || 'In ARCHIVE_OTH_BALANCE'||SQLERRM);
3537:
3538: IF g_debug THEN
3539: hr_utility.set_location('ORA_ERR: ' || g_err_num || 'In ARCHIVE_OTH_BALANCE',360);
3540: END IF;
3541:
3542: END ARCHIVE_OTH_BALANCE;
3543:
3659:
3660: -- fnd_file.put_line(fnd_file.log,'Entering Procedure ARCHIVE_CODE');
3661:
3662: IF g_debug THEN
3663: hr_utility.set_location(' Entering Procedure ARCHIVE_CODE',380);
3664: END IF;
3665:
3666: OPEN csr_archive_payact(p_assignment_action_id);
3667: FETCH csr_archive_payact INTO l_archive_payact_id;
3826:
3827: END LOOP;
3828:
3829: IF g_debug THEN
3830: hr_utility.set_location(' Leaving Procedure ARCHIVE_CODE',390);
3831: END IF;
3832:
3833: -- fnd_file.put_line(fnd_file.log,'Leaving Procedure ARCHIVE_CODE');
3834:
4467:
4468: BEGIN
4469:
4470: IF g_debug THEN
4471: hr_utility.set_location(' Entering Procedure ARCHIVE_MAIN_ELEMENTS',320);
4472: END IF;
4473:
4474: -- Archiving Earnings Elements
4475:
4552: END IF;
4553:
4554: IF ( (l_result_value IS NOT NULL) AND (l_msg_name IS NOT NULL) ) THEN
4555: -- set the message name and get the message text
4556: hr_utility.set_message (801, l_msg_name);
4557: l_msg_txt := hr_utility.get_message ;
4558:
4559: -- fnd_file.put_line(fnd_file.log,'l_msg_txt (for Supplementary Run) = ' ||l_msg_txt );
4560:
4553:
4554: IF ( (l_result_value IS NOT NULL) AND (l_msg_name IS NOT NULL) ) THEN
4555: -- set the message name and get the message text
4556: hr_utility.set_message (801, l_msg_name);
4557: l_msg_txt := hr_utility.get_message ;
4558:
4559: -- fnd_file.put_line(fnd_file.log,'l_msg_txt (for Supplementary Run) = ' ||l_msg_txt );
4560:
4561: /* Arcvhive the message */
4598:
4599: IF ( (l_earn_period IS NOT NULL) AND (l_earn_period_mul IS NOT NULL) ) THEN
4600:
4601: l_earn_period := hr_general.decode_lookup('NO_PAYROLL_PERIOD',l_earn_period) ;
4602: hr_utility.set_message (801, 'PAY_376886_NO_TAX_PER_OVERRIDE' );
4603: hr_utility.set_message_token (801, 'EARN_PERIOD', l_earn_period);
4604: hr_utility.set_message_token (801, 'EARN_PER_MUL', l_earn_period_mul);
4605: l_tax_per_override_msg_txt := hr_utility.get_message ;
4606:
4599: IF ( (l_earn_period IS NOT NULL) AND (l_earn_period_mul IS NOT NULL) ) THEN
4600:
4601: l_earn_period := hr_general.decode_lookup('NO_PAYROLL_PERIOD',l_earn_period) ;
4602: hr_utility.set_message (801, 'PAY_376886_NO_TAX_PER_OVERRIDE' );
4603: hr_utility.set_message_token (801, 'EARN_PERIOD', l_earn_period);
4604: hr_utility.set_message_token (801, 'EARN_PER_MUL', l_earn_period_mul);
4605: l_tax_per_override_msg_txt := hr_utility.get_message ;
4606:
4607: -- fnd_file.put_line(fnd_file.log,'l_earn_period = ' ||l_earn_period );
4600:
4601: l_earn_period := hr_general.decode_lookup('NO_PAYROLL_PERIOD',l_earn_period) ;
4602: hr_utility.set_message (801, 'PAY_376886_NO_TAX_PER_OVERRIDE' );
4603: hr_utility.set_message_token (801, 'EARN_PERIOD', l_earn_period);
4604: hr_utility.set_message_token (801, 'EARN_PER_MUL', l_earn_period_mul);
4605: l_tax_per_override_msg_txt := hr_utility.get_message ;
4606:
4607: -- fnd_file.put_line(fnd_file.log,'l_earn_period = ' ||l_earn_period );
4608: -- fnd_file.put_line(fnd_file.log,'l_earn_period_mul = ' ||l_earn_period_mul );
4601: l_earn_period := hr_general.decode_lookup('NO_PAYROLL_PERIOD',l_earn_period) ;
4602: hr_utility.set_message (801, 'PAY_376886_NO_TAX_PER_OVERRIDE' );
4603: hr_utility.set_message_token (801, 'EARN_PERIOD', l_earn_period);
4604: hr_utility.set_message_token (801, 'EARN_PER_MUL', l_earn_period_mul);
4605: l_tax_per_override_msg_txt := hr_utility.get_message ;
4606:
4607: -- fnd_file.put_line(fnd_file.log,'l_earn_period = ' ||l_earn_period );
4608: -- fnd_file.put_line(fnd_file.log,'l_earn_period_mul = ' ||l_earn_period_mul );
4609: -- fnd_file.put_line(fnd_file.log,'l_tax_per_override_msg_txt = ' ||l_tax_per_override_msg_txt );
4642: -- fnd_file.put_line(fnd_file.log,'l_reduced_tax_rule = ' ||l_reduced_tax_rule );
4643:
4644: IF (l_reduced_tax_rule IN ('H','Z')) THEN
4645: l_reduced_tax_rule := hr_general.decode_lookup('NO_TAX_PERIOD_RULES',l_reduced_tax_rule) ;
4646: hr_utility.set_message (801, 'PAY_376887_NO_REDUCED_TAX');
4647: hr_utility.set_message_token (801, 'REDUCED_TAX', l_reduced_tax_rule);
4648: l_reduced_tax_rule_msg_txt := hr_utility.get_message ;
4649:
4650: -- fnd_file.put_line(fnd_file.log,'l_reduced_tax_rule = ' || l_reduced_tax_rule );
4643:
4644: IF (l_reduced_tax_rule IN ('H','Z')) THEN
4645: l_reduced_tax_rule := hr_general.decode_lookup('NO_TAX_PERIOD_RULES',l_reduced_tax_rule) ;
4646: hr_utility.set_message (801, 'PAY_376887_NO_REDUCED_TAX');
4647: hr_utility.set_message_token (801, 'REDUCED_TAX', l_reduced_tax_rule);
4648: l_reduced_tax_rule_msg_txt := hr_utility.get_message ;
4649:
4650: -- fnd_file.put_line(fnd_file.log,'l_reduced_tax_rule = ' || l_reduced_tax_rule );
4651: -- fnd_file.put_line(fnd_file.log,'l_reduced_tax_rule_msg_txt = ' ||l_reduced_tax_rule_msg_txt );
4644: IF (l_reduced_tax_rule IN ('H','Z')) THEN
4645: l_reduced_tax_rule := hr_general.decode_lookup('NO_TAX_PERIOD_RULES',l_reduced_tax_rule) ;
4646: hr_utility.set_message (801, 'PAY_376887_NO_REDUCED_TAX');
4647: hr_utility.set_message_token (801, 'REDUCED_TAX', l_reduced_tax_rule);
4648: l_reduced_tax_rule_msg_txt := hr_utility.get_message ;
4649:
4650: -- fnd_file.put_line(fnd_file.log,'l_reduced_tax_rule = ' || l_reduced_tax_rule );
4651: -- fnd_file.put_line(fnd_file.log,'l_reduced_tax_rule_msg_txt = ' ||l_reduced_tax_rule_msg_txt );
4652:
4931: g_err_num := SQLCODE;
4932: /*fnd_file.put_line(fnd_file.log,'ORA_ERR: ' || g_err_num || 'In ARCHIVE_MAIN_ELEMENTS');*/
4933:
4934: IF g_debug THEN
4935: hr_utility.set_location('ORA_ERR: ' || g_err_num || 'In ARCHIVE_MAIN_ELEMENTS',330);
4936: END IF;
4937: END;
4938: END LOOP;
4939:
4939:
4940: -- fnd_file.put_line(fnd_file.log,'finished archiving NO Earnings Elements');
4941:
4942: IF g_debug THEN
4943: hr_utility.set_location(' Leaving Procedure ARCHIVE_MAIN_ELEMENTS',340);
4944: END IF;
4945:
4946: END ARCHIVE_MAIN_ELEMENTS;
4947: