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:
1498:
1499: BEGIN
1500:
1501: IF g_debug THEN
1502: hr_utility.set_location(' Entering Procedure ARCHIVE_EMPLOYEE_DETAILS',160);
1503: END IF;
1504:
1505: /*fnd_file.put_line(fnd_file.log,'Entering Procedure ARCHIVE_EMPLOYEE_DETAILS');*/
1506:
1699:
1700: l_diff_le_text := 'Y' ;
1701:
1702: /* set the message name and get the message text */
1703: hr_utility.set_message (801, 'PAY_376864_NO_SEC_ASG_LE_DIFF');
1704: l_msg_txt := hr_utility.get_message ;
1705:
1706: /* Arcvhive the message */
1707: pay_action_information_api.create_action_information (
1700: l_diff_le_text := 'Y' ;
1701:
1702: /* set the message name and get the message text */
1703: hr_utility.set_message (801, 'PAY_376864_NO_SEC_ASG_LE_DIFF');
1704: l_msg_txt := hr_utility.get_message ;
1705:
1706: /* Arcvhive the message */
1707: pay_action_information_api.create_action_information (
1708: p_action_information_id => l_action_info_id
1843: /*fnd_file.put_line(fnd_file.log,'Entering Procedure ARCHIVE_EMPLOYEE_DETAILS 10');*/
1844:
1845: --
1846: IF g_debug THEN
1847: hr_utility.set_location(' Leaving Procedure ARCHIVE_EMPLOYEE_DETAILS',170);
1848: END IF;
1849: --
1850:
1851: EXCEPTION WHEN OTHERS THEN
1852: g_err_num := SQLCODE;
1853: /*fnd_file.put_line(fnd_file.log,'ORA_ERR: ' || g_err_num || 'In ARCHIVE_EMPLOYEE_DETAILS');*/
1854:
1855: IF g_debug THEN
1856: hr_utility.set_location('ORA_ERR: ' || g_err_num || 'In ARCHIVE_EMPLOYEE_DETAILS',180);
1857: END IF;
1858:
1859: END ARCHIVE_EMPLOYEE_DETAILS;
1860:
2159: ----------------------
2160: BEGIN
2161:
2162: IF g_debug THEN
2163: hr_utility.set_location(' Entering Procedure ARCHIVE_ELEMENT_INFO',210);
2164: END IF;
2165:
2166: ------------------------
2167: /* ALL ELEMENTS */
2480:
2481: END LOOP;
2482:
2483: IF g_debug THEN
2484: hr_utility.set_location(' Leaving Procedure ARCHIVE_ELEMENT_INFO',220);
2485: END IF;
2486:
2487: EXCEPTION WHEN OTHERS THEN
2488: g_err_num := SQLCODE;
2488: g_err_num := SQLCODE;
2489: /*fnd_file.put_line(fnd_file.log,'ORA_ERR: ' || g_err_num || 'In ARCHIVE_ELEMENT_INFO');*/
2490:
2491: IF g_debug THEN
2492: hr_utility.set_location('ORA_ERR: ' || g_err_num || 'ARCHIVE_ELEMENT_INFO',230);
2493: END IF;
2494:
2495: END ARCHIVE_ELEMENT_INFO;
2496:
2518:
2519: BEGIN
2520:
2521: IF g_debug THEN
2522: hr_utility.set_location(' Entering Function GET_DEFINED_BALANCE_ID',240);
2523: END IF;
2524:
2525: OPEN csr_def_bal_id(p_user_name);
2526: FETCH csr_def_bal_id INTO l_defined_balance_id;
2527: CLOSE csr_def_bal_id;
2528: RETURN l_defined_balance_id;
2529:
2530: IF g_debug THEN
2531: hr_utility.set_location(' Leaving Function GET_DEFINED_BALANCE_ID',250);
2532: END IF;
2533:
2534: END GET_DEFINED_BALANCE_ID;
2535:
2634:
2635: BEGIN
2636:
2637: IF g_debug THEN
2638: hr_utility.set_location(' Entering Procedure ARCHIVE_PAYMENT_INFO',260);
2639: END IF;
2640:
2641: /*fnd_file.put_line(fnd_file.log,'In ARCHIVE_PAYMENT_INFO 1');*/
2642:
2770: END LOOP;
2771: CLOSE csr_chk;
2772:
2773: IF g_debug THEN
2774: hr_utility.set_location(' Leaving Procedure ARCHIVE_PAYMENT_INFO',270);
2775: END IF;
2776:
2777: EXCEPTION WHEN OTHERS THEN
2778: g_err_num := SQLCODE;
2779:
2780: /*fnd_file.put_line(fnd_file.log,'ORA_ERR: ' || g_err_num || 'In ARCHIVE_PAYMENT_INFO');*/
2781:
2782: IF g_debug THEN
2783: hr_utility.set_location('ORA_ERR: ' || g_err_num || 'In ARCHIVE_PAYMENT_INFO',280);
2784: END IF;
2785:
2786: END ARCHIVE_PAYMENT_INFO;
2787: ----------------------------------------- PROCEDURE ARCHIVE_ACCRUAL_PLAN ---------------------------------------------------------
2850: --
2851: BEGIN
2852: --
2853: IF g_debug THEN
2854: hr_utility.set_location(' Entering Procedure ARCHIVE_ACCRUAL_PLAN',290);
2855: END IF;
2856: OPEN csr_leave_balance;
2857: FETCH csr_leave_balance INTO
2858: l_accrual_plan_name
2912: END IF;
2913: --
2914: CLOSE csr_leave_balance;
2915: IF g_debug THEN
2916: hr_utility.set_location(' Leaving Procedure ARCHIVE_ACCRUAL_PLAN',300);
2917: END IF;
2918: --
2919: EXCEPTION
2920: WHEN OTHERS THEN
2926: --
2927: g_err_num := SQLCODE;
2928: --fnd_file.put_line(fnd_file.log,'ORA_ERR: ' || g_err_num || 'In ARCHIVE_ACCRUAL_PLAN');
2929: IF g_debug THEN
2930: hr_utility.set_location('ORA_ERR: ' || g_err_num || ' In ARCHIVE_ACCRUAL_PLAN',310);
2931: END IF;
2932: RAISE;
2933: END ARCHIVE_ACCRUAL_PLAN;*/
2934:
3092:
3093: BEGIN
3094:
3095: IF g_debug THEN
3096: hr_utility.set_location(' Entering Procedure ARCHIVE_ADD_ELEMENT',320);
3097: END IF;
3098:
3099: IF p_archive_flag = 'N' THEN
3100: ---------------------------------------------------
3327: g_err_num := SQLCODE;
3328: /*fnd_file.put_line(fnd_file.log,'ORA_ERR: ' || g_err_num || 'In ARCHIVE_ADD_ELEMENT');*/
3329:
3330: IF g_debug THEN
3331: hr_utility.set_location('ORA_ERR: ' || g_err_num || 'In ARCHIVE_ADD_ELEMENT',330);
3332: END IF;
3333: END;
3334: END LOOP;
3335:
3335:
3336: END IF;
3337:
3338: IF g_debug THEN
3339: hr_utility.set_location(' Leaving Procedure ARCHIVE_ADD_ELEMENT',340);
3340: END IF;
3341:
3342: END ARCHIVE_ADD_ELEMENT;
3343:
3394:
3395: BEGIN
3396:
3397: IF g_debug THEN
3398: hr_utility.set_location(' Entering Procedure ARCHIVE_OTH_BALANCE',350);
3399: END IF;
3400:
3401: -- fnd_file.put_line(fnd_file.log,'In ARCHIVE_OTH_BALANCE 0');
3402: /*fnd_file.put_line(fnd_file.log,'Entering In ARCHIVE_OTH_BALANCE global');*/
3524: g_err_num := SQLCODE;
3525: -- fnd_file.put_line(fnd_file.log,'ORA_ERR: ' || g_err_num || 'In ARCHIVE_OTH_BALANCE'||SQLERRM);
3526:
3527: IF g_debug THEN
3528: hr_utility.set_location('ORA_ERR: ' || g_err_num || 'In ARCHIVE_OTH_BALANCE',360);
3529: END IF;
3530:
3531: END ARCHIVE_OTH_BALANCE;
3532:
3648:
3649: -- fnd_file.put_line(fnd_file.log,'Entering Procedure ARCHIVE_CODE');
3650:
3651: IF g_debug THEN
3652: hr_utility.set_location(' Entering Procedure ARCHIVE_CODE',380);
3653: END IF;
3654:
3655: OPEN csr_archive_payact(p_assignment_action_id);
3656: FETCH csr_archive_payact INTO l_archive_payact_id;
3815:
3816: END LOOP;
3817:
3818: IF g_debug THEN
3819: hr_utility.set_location(' Leaving Procedure ARCHIVE_CODE',390);
3820: END IF;
3821:
3822: -- fnd_file.put_line(fnd_file.log,'Leaving Procedure ARCHIVE_CODE');
3823:
4456:
4457: BEGIN
4458:
4459: IF g_debug THEN
4460: hr_utility.set_location(' Entering Procedure ARCHIVE_MAIN_ELEMENTS',320);
4461: END IF;
4462:
4463: -- Archiving Earnings Elements
4464:
4541: END IF;
4542:
4543: IF ( (l_result_value IS NOT NULL) AND (l_msg_name IS NOT NULL) ) THEN
4544: -- set the message name and get the message text
4545: hr_utility.set_message (801, l_msg_name);
4546: l_msg_txt := hr_utility.get_message ;
4547:
4548: -- fnd_file.put_line(fnd_file.log,'l_msg_txt (for Supplementary Run) = ' ||l_msg_txt );
4549:
4542:
4543: IF ( (l_result_value IS NOT NULL) AND (l_msg_name IS NOT NULL) ) THEN
4544: -- set the message name and get the message text
4545: hr_utility.set_message (801, l_msg_name);
4546: l_msg_txt := hr_utility.get_message ;
4547:
4548: -- fnd_file.put_line(fnd_file.log,'l_msg_txt (for Supplementary Run) = ' ||l_msg_txt );
4549:
4550: /* Arcvhive the message */
4587:
4588: IF ( (l_earn_period IS NOT NULL) AND (l_earn_period_mul IS NOT NULL) ) THEN
4589:
4590: l_earn_period := hr_general.decode_lookup('NO_PAYROLL_PERIOD',l_earn_period) ;
4591: hr_utility.set_message (801, 'PAY_376886_NO_TAX_PER_OVERRIDE' );
4592: hr_utility.set_message_token (801, 'EARN_PERIOD', l_earn_period);
4593: hr_utility.set_message_token (801, 'EARN_PER_MUL', l_earn_period_mul);
4594: l_tax_per_override_msg_txt := hr_utility.get_message ;
4595:
4588: IF ( (l_earn_period IS NOT NULL) AND (l_earn_period_mul IS NOT NULL) ) THEN
4589:
4590: l_earn_period := hr_general.decode_lookup('NO_PAYROLL_PERIOD',l_earn_period) ;
4591: hr_utility.set_message (801, 'PAY_376886_NO_TAX_PER_OVERRIDE' );
4592: hr_utility.set_message_token (801, 'EARN_PERIOD', l_earn_period);
4593: hr_utility.set_message_token (801, 'EARN_PER_MUL', l_earn_period_mul);
4594: l_tax_per_override_msg_txt := hr_utility.get_message ;
4595:
4596: -- fnd_file.put_line(fnd_file.log,'l_earn_period = ' ||l_earn_period );
4589:
4590: l_earn_period := hr_general.decode_lookup('NO_PAYROLL_PERIOD',l_earn_period) ;
4591: hr_utility.set_message (801, 'PAY_376886_NO_TAX_PER_OVERRIDE' );
4592: hr_utility.set_message_token (801, 'EARN_PERIOD', l_earn_period);
4593: hr_utility.set_message_token (801, 'EARN_PER_MUL', l_earn_period_mul);
4594: l_tax_per_override_msg_txt := hr_utility.get_message ;
4595:
4596: -- fnd_file.put_line(fnd_file.log,'l_earn_period = ' ||l_earn_period );
4597: -- fnd_file.put_line(fnd_file.log,'l_earn_period_mul = ' ||l_earn_period_mul );
4590: l_earn_period := hr_general.decode_lookup('NO_PAYROLL_PERIOD',l_earn_period) ;
4591: hr_utility.set_message (801, 'PAY_376886_NO_TAX_PER_OVERRIDE' );
4592: hr_utility.set_message_token (801, 'EARN_PERIOD', l_earn_period);
4593: hr_utility.set_message_token (801, 'EARN_PER_MUL', l_earn_period_mul);
4594: l_tax_per_override_msg_txt := hr_utility.get_message ;
4595:
4596: -- fnd_file.put_line(fnd_file.log,'l_earn_period = ' ||l_earn_period );
4597: -- fnd_file.put_line(fnd_file.log,'l_earn_period_mul = ' ||l_earn_period_mul );
4598: -- fnd_file.put_line(fnd_file.log,'l_tax_per_override_msg_txt = ' ||l_tax_per_override_msg_txt );
4631: -- fnd_file.put_line(fnd_file.log,'l_reduced_tax_rule = ' ||l_reduced_tax_rule );
4632:
4633: IF (l_reduced_tax_rule IN ('H','Z')) THEN
4634: l_reduced_tax_rule := hr_general.decode_lookup('NO_TAX_PERIOD_RULES',l_reduced_tax_rule) ;
4635: hr_utility.set_message (801, 'PAY_376887_NO_REDUCED_TAX');
4636: hr_utility.set_message_token (801, 'REDUCED_TAX', l_reduced_tax_rule);
4637: l_reduced_tax_rule_msg_txt := hr_utility.get_message ;
4638:
4639: -- fnd_file.put_line(fnd_file.log,'l_reduced_tax_rule = ' || l_reduced_tax_rule );
4632:
4633: IF (l_reduced_tax_rule IN ('H','Z')) THEN
4634: l_reduced_tax_rule := hr_general.decode_lookup('NO_TAX_PERIOD_RULES',l_reduced_tax_rule) ;
4635: hr_utility.set_message (801, 'PAY_376887_NO_REDUCED_TAX');
4636: hr_utility.set_message_token (801, 'REDUCED_TAX', l_reduced_tax_rule);
4637: l_reduced_tax_rule_msg_txt := hr_utility.get_message ;
4638:
4639: -- fnd_file.put_line(fnd_file.log,'l_reduced_tax_rule = ' || l_reduced_tax_rule );
4640: -- fnd_file.put_line(fnd_file.log,'l_reduced_tax_rule_msg_txt = ' ||l_reduced_tax_rule_msg_txt );
4633: IF (l_reduced_tax_rule IN ('H','Z')) THEN
4634: l_reduced_tax_rule := hr_general.decode_lookup('NO_TAX_PERIOD_RULES',l_reduced_tax_rule) ;
4635: hr_utility.set_message (801, 'PAY_376887_NO_REDUCED_TAX');
4636: hr_utility.set_message_token (801, 'REDUCED_TAX', l_reduced_tax_rule);
4637: l_reduced_tax_rule_msg_txt := hr_utility.get_message ;
4638:
4639: -- fnd_file.put_line(fnd_file.log,'l_reduced_tax_rule = ' || l_reduced_tax_rule );
4640: -- fnd_file.put_line(fnd_file.log,'l_reduced_tax_rule_msg_txt = ' ||l_reduced_tax_rule_msg_txt );
4641:
4920: g_err_num := SQLCODE;
4921: /*fnd_file.put_line(fnd_file.log,'ORA_ERR: ' || g_err_num || 'In ARCHIVE_MAIN_ELEMENTS');*/
4922:
4923: IF g_debug THEN
4924: hr_utility.set_location('ORA_ERR: ' || g_err_num || 'In ARCHIVE_MAIN_ELEMENTS',330);
4925: END IF;
4926: END;
4927: END LOOP;
4928:
4928:
4929: -- fnd_file.put_line(fnd_file.log,'finished archiving NO Earnings Elements');
4930:
4931: IF g_debug THEN
4932: hr_utility.set_location(' Leaving Procedure ARCHIVE_MAIN_ELEMENTS',340);
4933: END IF;
4934:
4935: END ARCHIVE_MAIN_ELEMENTS;
4936: