472: Begin
473: p_enc_org_end_date := NULL;
474: -- check for Generic Encumbrance Period
475:
476: p_return_status := fnd_api.g_ret_sts_success;
477:
478: -- moved the select to Cursor
479: OPEN c_cnt_default_org;
480: FETCH c_cnt_default_org INTO l_count;
482:
483: IF l_count = 0 THEN
484: fnd_message.set_name('PSP', 'PSP_ENC_GEN_PERIOD_NOT_FOUND');
485: fnd_msg_pub.add;
486: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
487: END IF;
488:
489: OPEN time_pct_def_cur;
490: FETCH time_pct_def_cur INTO p_enc_org_end_date, l_enc_end_date_id, l_prev_enc_end_date;
492: p_enc_org_end_date := NULL;
493: fnd_message.set_name('PSP', 'PSP_ENC_MUL_END_DATES');
494: fnd_msg_pub.add;
495: g_error_message := fnd_message.get;
496: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
497: END IF;
498: CLOSE time_pct_def_cur;
499:
500: --For Enhancement Enc Redesign:Bug 2259310 : Updating the Organization End date
509: IF (g_error_message IS NULL) THEN
510: g_error_message := 'OBTAIN_ENC_ORG_END_DATE: ' || SQLERRM;
511: END IF;
512: fnd_msg_pub.add_exc_msg('PSP_ENC_CREATE_LINES', 'OBTAIN_ENC_ORG_END_DATE');
513: p_return_status := fnd_api.g_ret_sts_unexp_error;
514: return;
515: End obtain_enc_org_end_date;
516:
517: ---------------------- O B T A I N E N C P O E T A E N D D A T E -----------------------
545: l_enc_end_date := NULL;
546: END IF;
547: --Assigning values to the out parameters
548: p_enc_end_date := LEAST(l_enc_end_date, NVL(g_actual_term_date, l_enc_end_date));
549: p_return_status := fnd_api.g_ret_sts_success;
550:
551: EXCEPTION
552: WHEN OTHERS THEN
553: IF (g_error_message IS NULL) THEN
554: g_error_message := 'OBTAIN_ENC_POETA_END_DATE: ' || SQLERRM;
555: END IF;
556: g_error_api_path := SUBSTR(' OBTAIN_ENC_POETA_END_DATE:'||g_error_api_path,1,230);
557: fnd_msg_pub.add_exc_msg('PSP_ENC_CREATE_LINES', ' OBTAIN_ENC_POETA_END_DATE ');
558: p_return_status := fnd_api.g_ret_sts_unexp_error;
559: END obtain_enc_poeta_end_date;
560:
561:
562:
1315: RPAD(r_enc_period.r_reason_code(recno), 50, ' '));
1316: END LOOP;
1317: hr_utility.trace(fnd_date.date_to_canonical(SYSDATE) || ' Leaving ' || l_proc_name);
1318:
1319: p_return_status := fnd_api.g_ret_sts_success;
1320: EXCEPTION
1321: WHEN DIVIDE_BY_ZERO THEN
1322: fnd_msg_pub.add_exc_msg('PSP_ENC_CREATE_LINES', ' DETERMINE_ENC_AMOUNT ');
1323: fnd_file.put_line(fnd_file.log, fnd_number.number_to_canonical(l_proc_step) || ': ' || l_proc_name);
1321: WHEN DIVIDE_BY_ZERO THEN
1322: fnd_msg_pub.add_exc_msg('PSP_ENC_CREATE_LINES', ' DETERMINE_ENC_AMOUNT ');
1323: fnd_file.put_line(fnd_file.log, fnd_number.number_to_canonical(l_proc_step) || ': ' || l_proc_name);
1324: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Leaving ' || l_proc_name);
1325: p_return_status := fnd_api.g_ret_sts_unexp_error;
1326: WHEN OTHERS THEN
1327: IF (g_error_message IS NULL) THEN
1328: g_error_message := l_proc_name || ': ' || SQLERRM;
1329: END IF;
1329: END IF;
1330: fnd_msg_pub.add_exc_msg('PSP', 'DETERMINE_ENC_AMOUNT');
1331: fnd_file.put_line(fnd_file.log, fnd_number.number_to_canonical(l_proc_step) || ': ' || l_proc_name);
1332: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Leaving ' || l_proc_name);
1333: p_return_status := fnd_api.g_ret_sts_unexp_error;
1334: END determine_enc_amount;
1335: -- End of changes for bug fix 3488734
1336:
1337: ---------------------- C R E A T E L I N E S -------------------------------------
1571: p_ls_end_date => l_end_date_active,
1572: p_poeta_end_date => l_poeta_end_date,
1573: p_enc_end_date => l_last_enc_date,
1574: p_return_status => l_return_status);
1575: IF l_return_status <> fnd_api.g_ret_sts_success THEN
1576: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1577: END IF;
1578: END IF;
1579: hr_utility.trace(' l_last_enc_date: ' || TO_CHAR(l_last_enc_date, 'DD-MON-RRRR'));
1572: p_poeta_end_date => l_poeta_end_date,
1573: p_enc_end_date => l_last_enc_date,
1574: p_return_status => l_return_status);
1575: IF l_return_status <> fnd_api.g_ret_sts_success THEN
1576: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1577: END IF;
1578: END IF;
1579: hr_utility.trace(' l_last_enc_date: ' || TO_CHAR(l_last_enc_date, 'DD-MON-RRRR'));
1580:
1597: p_asg_end_date => p_asg_end_date,
1598: p_asg_amount => l_daily_rate,
1599: p_poeta_gl_hier_array => t_poeta_gl_hier_array,
1600: p_return_status => l_return_status);
1601: IF l_return_status <> fnd_api.g_ret_sts_success THEN
1602: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1603: END IF;
1604:
1605: hr_utility.trace(' t_poeta_gl_hier_array.COUNT: ' || t_poeta_gl_hier_array.COUNT);
1598: p_asg_amount => l_daily_rate,
1599: p_poeta_gl_hier_array => t_poeta_gl_hier_array,
1600: p_return_status => l_return_status);
1601: IF l_return_status <> fnd_api.g_ret_sts_success THEN
1602: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1603: END IF;
1604:
1605: hr_utility.trace(' t_poeta_gl_hier_array.COUNT: ' || t_poeta_gl_hier_array.COUNT);
1606: FOR I IN 1..t_poeta_gl_hier_array.COUNT
1662: l_orig_expenditure_org_id,
1663: l_orig_expenditure_type,
1664: l_process_flag,
1665: l_return_status);
1666: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1667: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1668: END IF;
1669: ELSE
1670: psp_general.poeta_effective_date (t_poeta_gl_hier_array(I).r_enc_end_date,
1663: l_orig_expenditure_type,
1664: l_process_flag,
1665: l_return_status);
1666: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1667: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1668: END IF;
1669: ELSE
1670: psp_general.poeta_effective_date (t_poeta_gl_hier_array(I).r_enc_end_date,
1671: l_project_id,
1672: l_award_id,
1673: l_task_id,
1674: l_effective_date,
1675: l_return_status);
1676: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1677: fnd_message.set_name('PSP', 'PSP_POETA_EFFECTIVE_DATE_ERROR');
1678: g_error_message := fnd_message.get;
1679: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1680: END IF;
1675: l_return_status);
1676: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1677: fnd_message.set_name('PSP', 'PSP_POETA_EFFECTIVE_DATE_ERROR');
1678: g_error_message := fnd_message.get;
1679: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1680: END IF;
1681:
1682: -- R12 moac uptake. Set the MOAC Context to Single
1683: l_org_id := psp_general.get_transaction_org_id( l_project_id, l_expenditure_org_id);
1850: l_orig_expenditure_org_id,
1851: l_orig_expenditure_type,
1852: l_process_flag,
1853: l_return_status);
1854: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1855: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1856: END IF;
1857: END IF;
1858: END IF;
1851: l_orig_expenditure_type,
1852: l_process_flag,
1853: l_return_status);
1854: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1855: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1856: END IF;
1857: END IF;
1858: END IF;
1859: ELSE
1864: l_award_id,
1865: l_task_id,
1866: l_effective_date,
1867: l_return_status);
1868: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1869: fnd_message.set_name('PSP', 'PSP_POETA_EFFECTIVE_DATE_ERROR');
1870: g_error_message := fnd_message.get;
1871: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1872: END IF;
1867: l_return_status);
1868: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1869: fnd_message.set_name('PSP', 'PSP_POETA_EFFECTIVE_DATE_ERROR');
1870: g_error_message := fnd_message.get;
1871: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1872: END IF;
1873:
1874: -- R12 moac uptake. Set the MOAC Context to Single
1875: l_org_id := psp_general.get_transaction_org_id( l_project_id, l_expenditure_org_id);
2018: ' p_payroll_id: ' || fnd_number.number_to_canonical(p_payroll_id) ||
2019: ' p_element_type_id: ' || fnd_number.number_to_canonical(p_element_type_id) ||
2020: ' p_last_paid_date: ' || fnd_date.date_to_canonical(p_last_paid_date));
2021:
2022: p_return_status := fnd_api.g_ret_sts_success;
2023:
2024: OPEN c_person_id;
2025: FETCH c_person_id INTO l_person_id;
2026: CLOSE c_person_id;
2041: l_proc_step := 30;
2042:
2043: IF (r_enc_period.r_time_period_id.COUNT > 0) THEN
2044: load_sch_hierarchy(p_assignment_id, p_payroll_id, p_element_type_id, g_business_group_id, g_set_of_books_id, p_return_status);
2045: IF (p_return_status <> fnd_api.g_ret_sts_success) THEN
2046: RAISE fnd_api.g_exc_unexpected_error;
2047: END IF;
2048: END IF;
2049:
2042:
2043: IF (r_enc_period.r_time_period_id.COUNT > 0) THEN
2044: load_sch_hierarchy(p_assignment_id, p_payroll_id, p_element_type_id, g_business_group_id, g_set_of_books_id, p_return_status);
2045: IF (p_return_status <> fnd_api.g_ret_sts_success) THEN
2046: RAISE fnd_api.g_exc_unexpected_error;
2047: END IF;
2048: END IF;
2049:
2050: OPEN enc_period_cur;
2060: l_proc_step := 40;
2061:
2062: IF (r_enc_period.r_time_period_id.COUNT > 0) THEN
2063: sub_slice_asg_chunk(p_assignment_id, p_element_type_id, g_business_group_id, g_set_of_books_id, p_return_status);
2064: IF (p_return_status <> fnd_api.g_ret_sts_success) THEN
2065: RAISE fnd_api.g_exc_unexpected_error;
2066: END IF;
2067: END IF;
2068:
2061:
2062: IF (r_enc_period.r_time_period_id.COUNT > 0) THEN
2063: sub_slice_asg_chunk(p_assignment_id, p_element_type_id, g_business_group_id, g_set_of_books_id, p_return_status);
2064: IF (p_return_status <> fnd_api.g_ret_sts_success) THEN
2065: RAISE fnd_api.g_exc_unexpected_error;
2066: END IF;
2067: END IF;
2068:
2069: hr_utility.trace('r_enc_period.r_time_period_id.COUNT: ' || fnd_number.number_to_canonical(r_enc_period.r_time_period_id.COUNT));
2076: p_business_group_id => g_business_group_id,
2077: p_set_of_books_id => g_set_of_books_id,
2078: p_payroll_id => p_payroll_id,
2079: p_return_status => l_return_status);
2080: IF l_return_status <> fnd_api.g_ret_sts_success THEN
2081: RAISE fnd_api.g_exc_unexpected_error;
2082: END IF;
2083: END IF;
2084:
2077: p_set_of_books_id => g_set_of_books_id,
2078: p_payroll_id => p_payroll_id,
2079: p_return_status => l_return_status);
2080: IF l_return_status <> fnd_api.g_ret_sts_success THEN
2081: RAISE fnd_api.g_exc_unexpected_error;
2082: END IF;
2083: END IF;
2084:
2085: l_proc_step := 60;
2218: ret_expenditure_type => l_new_expenditure_type,
2219: ret_gl_code_combination_id => l_new_gl_code_combination_id,
2220: retcode => l_autopop_status);
2221:
2222: IF (l_autopop_status = FND_API.G_RET_STS_UNEXP_ERROR) OR
2223: (l_autopop_status = FND_API.G_RET_STS_ERROR) THEN
2224: l_autopop_error := 'AUTO_POP_EXP_ERROR';
2225: IF (l_autopop_status = FND_API.G_RET_STS_ERROR) THEN
2226: l_autopop_error := 'AUTO_POP_NO_VALUE';
2219: ret_gl_code_combination_id => l_new_gl_code_combination_id,
2220: retcode => l_autopop_status);
2221:
2222: IF (l_autopop_status = FND_API.G_RET_STS_UNEXP_ERROR) OR
2223: (l_autopop_status = FND_API.G_RET_STS_ERROR) THEN
2224: l_autopop_error := 'AUTO_POP_EXP_ERROR';
2225: IF (l_autopop_status = FND_API.G_RET_STS_ERROR) THEN
2226: l_autopop_error := 'AUTO_POP_NO_VALUE';
2227: END IF;
2221:
2222: IF (l_autopop_status = FND_API.G_RET_STS_UNEXP_ERROR) OR
2223: (l_autopop_status = FND_API.G_RET_STS_ERROR) THEN
2224: l_autopop_error := 'AUTO_POP_EXP_ERROR';
2225: IF (l_autopop_status = FND_API.G_RET_STS_ERROR) THEN
2226: l_autopop_error := 'AUTO_POP_NO_VALUE';
2227: END IF;
2228: IF (l_asg_start_date <= g_enc_org_end_date) THEN
2229: orig_ci.gl_code_combination_id(g_orig_pointer) := l_gl_code_combination_id;
2272: p_payroll_id => p_payroll_id,
2273: p_start_date => l_poeta_start_date,
2274: p_end_date => l_poeta_end_date,
2275: p_return_status => p_return_status);
2276: IF p_return_status <> fnd_api.g_ret_sts_success THEN
2277: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2278: END IF;
2279: l_expenditure_type := l_new_expenditure_type;
2280: ELSE
2273: p_start_date => l_poeta_start_date,
2274: p_end_date => l_poeta_end_date,
2275: p_return_status => p_return_status);
2276: IF p_return_status <> fnd_api.g_ret_sts_success THEN
2277: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2278: END IF;
2279: l_expenditure_type := l_new_expenditure_type;
2280: ELSE
2281: l_gl_code_combination_id := l_new_gl_code_combination_id;
2339: ret_expenditure_type => l_new_expenditure_type,
2340: ret_gl_code_combination_id => l_new_gl_code_combination_id,
2341: retcode => l_autopop_status);
2342:
2343: IF (l_autopop_status = FND_API.G_RET_STS_UNEXP_ERROR) OR
2344: (l_autopop_status = FND_API.G_RET_STS_ERROR) THEN
2345: l_autopop_error := 'AUTO_POP_EXP_ERROR';
2346: IF (l_autopop_status = FND_API.G_RET_STS_ERROR) THEN
2347: l_autopop_error := 'AUTO_POP_NO_VALUE';
2340: ret_gl_code_combination_id => l_new_gl_code_combination_id,
2341: retcode => l_autopop_status);
2342:
2343: IF (l_autopop_status = FND_API.G_RET_STS_UNEXP_ERROR) OR
2344: (l_autopop_status = FND_API.G_RET_STS_ERROR) THEN
2345: l_autopop_error := 'AUTO_POP_EXP_ERROR';
2346: IF (l_autopop_status = FND_API.G_RET_STS_ERROR) THEN
2347: l_autopop_error := 'AUTO_POP_NO_VALUE';
2348: END IF;
2342:
2343: IF (l_autopop_status = FND_API.G_RET_STS_UNEXP_ERROR) OR
2344: (l_autopop_status = FND_API.G_RET_STS_ERROR) THEN
2345: l_autopop_error := 'AUTO_POP_EXP_ERROR';
2346: IF (l_autopop_status = FND_API.G_RET_STS_ERROR) THEN
2347: l_autopop_error := 'AUTO_POP_NO_VALUE';
2348: END IF;
2349: IF (l_asg_start_date <= g_enc_org_end_date) THEN
2350: orig_ci.gl_code_combination_id(g_orig_pointer) := l_gl_code_combination_id;
2393: p_payroll_id => p_payroll_id,
2394: p_start_date => l_poeta_start_date,
2395: p_end_date => l_poeta_end_date,
2396: p_return_status => p_return_status);
2397: IF p_return_status <> fnd_api.g_ret_sts_success THEN
2398: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2399: END IF;
2400: l_expenditure_type := l_new_expenditure_type;
2401: ELSE
2394: p_start_date => l_poeta_start_date,
2395: p_end_date => l_poeta_end_date,
2396: p_return_status => p_return_status);
2397: IF p_return_status <> fnd_api.g_ret_sts_success THEN
2398: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2399: END IF;
2400: l_expenditure_type := l_new_expenditure_type;
2401: ELSE
2402: l_gl_code_combination_id := l_new_gl_code_combination_id;
2460: ret_expenditure_type => l_new_expenditure_type,
2461: ret_gl_code_combination_id => l_new_gl_code_combination_id,
2462: retcode => l_autopop_status);
2463:
2464: IF (l_autopop_status = FND_API.G_RET_STS_UNEXP_ERROR) OR
2465: (l_autopop_status = FND_API.G_RET_STS_ERROR) THEN
2466: l_autopop_error := 'AUTO_POP_EXP_ERROR';
2467: IF (l_autopop_status = FND_API.G_RET_STS_ERROR) THEN
2468: l_autopop_error := 'AUTO_POP_NO_VALUE';
2461: ret_gl_code_combination_id => l_new_gl_code_combination_id,
2462: retcode => l_autopop_status);
2463:
2464: IF (l_autopop_status = FND_API.G_RET_STS_UNEXP_ERROR) OR
2465: (l_autopop_status = FND_API.G_RET_STS_ERROR) THEN
2466: l_autopop_error := 'AUTO_POP_EXP_ERROR';
2467: IF (l_autopop_status = FND_API.G_RET_STS_ERROR) THEN
2468: l_autopop_error := 'AUTO_POP_NO_VALUE';
2469: END IF;
2463:
2464: IF (l_autopop_status = FND_API.G_RET_STS_UNEXP_ERROR) OR
2465: (l_autopop_status = FND_API.G_RET_STS_ERROR) THEN
2466: l_autopop_error := 'AUTO_POP_EXP_ERROR';
2467: IF (l_autopop_status = FND_API.G_RET_STS_ERROR) THEN
2468: l_autopop_error := 'AUTO_POP_NO_VALUE';
2469: END IF;
2470: IF (l_asg_start_date <= g_enc_org_end_date) THEN
2471: orig_ci.gl_code_combination_id(g_orig_pointer) := l_gl_code_combination_id;
2514: p_payroll_id => p_payroll_id,
2515: p_start_date => l_poeta_start_date,
2516: p_end_date => l_poeta_end_date,
2517: p_return_status => p_return_status);
2518: IF p_return_status <> fnd_api.g_ret_sts_success THEN
2519: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2520: END IF;
2521: l_expenditure_type := l_new_expenditure_type;
2522: ELSE
2515: p_start_date => l_poeta_start_date,
2516: p_end_date => l_poeta_end_date,
2517: p_return_status => p_return_status);
2518: IF p_return_status <> fnd_api.g_ret_sts_success THEN
2519: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2520: END IF;
2521: l_expenditure_type := l_new_expenditure_type;
2522: ELSE
2523: l_gl_code_combination_id := l_new_gl_code_combination_id;
2589: ret_expenditure_type => l_new_expenditure_type,
2590: ret_gl_code_combination_id => l_new_gl_code_combination_id,
2591: retcode => l_autopop_status);
2592:
2593: IF (l_autopop_status = FND_API.G_RET_STS_UNEXP_ERROR) OR
2594: (l_autopop_status = FND_API.G_RET_STS_ERROR) THEN
2595: l_autopop_error := 'AUTO_POP_EXP_ERROR';
2596: IF (l_autopop_status = FND_API.G_RET_STS_ERROR) THEN
2597: l_autopop_error := 'AUTO_POP_NO_VALUE';
2590: ret_gl_code_combination_id => l_new_gl_code_combination_id,
2591: retcode => l_autopop_status);
2592:
2593: IF (l_autopop_status = FND_API.G_RET_STS_UNEXP_ERROR) OR
2594: (l_autopop_status = FND_API.G_RET_STS_ERROR) THEN
2595: l_autopop_error := 'AUTO_POP_EXP_ERROR';
2596: IF (l_autopop_status = FND_API.G_RET_STS_ERROR) THEN
2597: l_autopop_error := 'AUTO_POP_NO_VALUE';
2598: END IF;
2592:
2593: IF (l_autopop_status = FND_API.G_RET_STS_UNEXP_ERROR) OR
2594: (l_autopop_status = FND_API.G_RET_STS_ERROR) THEN
2595: l_autopop_error := 'AUTO_POP_EXP_ERROR';
2596: IF (l_autopop_status = FND_API.G_RET_STS_ERROR) THEN
2597: l_autopop_error := 'AUTO_POP_NO_VALUE';
2598: END IF;
2599: IF (l_asg_start_date <= g_enc_org_end_date) THEN
2600: orig_ci.gl_code_combination_id(g_orig_pointer) := l_gl_code_combination_id;
2643: p_payroll_id => p_payroll_id,
2644: p_start_date => l_poeta_start_date,
2645: p_end_date => l_poeta_end_date,
2646: p_return_status => p_return_status);
2647: IF p_return_status <> fnd_api.g_ret_sts_success THEN
2648: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2649: END IF;
2650: l_expenditure_type := l_new_expenditure_type;
2651: ELSE
2644: p_start_date => l_poeta_start_date,
2645: p_end_date => l_poeta_end_date,
2646: p_return_status => p_return_status);
2647: IF p_return_status <> fnd_api.g_ret_sts_success THEN
2648: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2649: END IF;
2650: l_expenditure_type := l_new_expenditure_type;
2651: ELSE
2652: l_gl_code_combination_id := l_new_gl_code_combination_id;
2716: ret_expenditure_type => l_new_expenditure_type,
2717: ret_gl_code_combination_id => l_new_gl_code_combination_id,
2718: retcode => l_autopop_status);
2719:
2720: IF (l_autopop_status = FND_API.G_RET_STS_UNEXP_ERROR) OR
2721: (l_autopop_status = FND_API.G_RET_STS_ERROR) THEN
2722: l_autopop_error := 'AUTO_POP_EXP_ERROR';
2723: IF (l_autopop_status = FND_API.G_RET_STS_ERROR) THEN
2724: l_autopop_error := 'AUTO_POP_NO_VALUE';
2717: ret_gl_code_combination_id => l_new_gl_code_combination_id,
2718: retcode => l_autopop_status);
2719:
2720: IF (l_autopop_status = FND_API.G_RET_STS_UNEXP_ERROR) OR
2721: (l_autopop_status = FND_API.G_RET_STS_ERROR) THEN
2722: l_autopop_error := 'AUTO_POP_EXP_ERROR';
2723: IF (l_autopop_status = FND_API.G_RET_STS_ERROR) THEN
2724: l_autopop_error := 'AUTO_POP_NO_VALUE';
2725: END IF;
2719:
2720: IF (l_autopop_status = FND_API.G_RET_STS_UNEXP_ERROR) OR
2721: (l_autopop_status = FND_API.G_RET_STS_ERROR) THEN
2722: l_autopop_error := 'AUTO_POP_EXP_ERROR';
2723: IF (l_autopop_status = FND_API.G_RET_STS_ERROR) THEN
2724: l_autopop_error := 'AUTO_POP_NO_VALUE';
2725: END IF;
2726: IF (l_asg_start_date <= g_enc_org_end_date) THEN
2727: orig_ci.gl_code_combination_id(g_orig_pointer) := l_gl_code_combination_id;
2770: p_payroll_id => p_payroll_id,
2771: p_start_date => l_poeta_start_date,
2772: p_end_date => l_poeta_end_date,
2773: p_return_status => p_return_status);
2774: IF p_return_status <> fnd_api.g_ret_sts_success THEN
2775: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2776: END IF;
2777: l_expenditure_type := l_new_expenditure_type;
2778: ELSE
2771: p_start_date => l_poeta_start_date,
2772: p_end_date => l_poeta_end_date,
2773: p_return_status => p_return_status);
2774: IF p_return_status <> fnd_api.g_ret_sts_success THEN
2775: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2776: END IF;
2777: l_expenditure_type := l_new_expenditure_type;
2778: ELSE
2779: l_gl_code_combination_id := l_new_gl_code_combination_id;
2845: ret_expenditure_type => l_new_expenditure_type,
2846: ret_gl_code_combination_id => l_new_gl_code_combination_id,
2847: retcode => l_autopop_status);
2848:
2849: IF (l_autopop_status = FND_API.G_RET_STS_UNEXP_ERROR) OR
2850: (l_autopop_status = FND_API.G_RET_STS_ERROR) THEN
2851: l_autopop_error := 'AUTO_POP_EXP_ERROR';
2852: IF (l_autopop_status = FND_API.G_RET_STS_ERROR) THEN
2853: l_autopop_error := 'AUTO_POP_NO_VALUE';
2846: ret_gl_code_combination_id => l_new_gl_code_combination_id,
2847: retcode => l_autopop_status);
2848:
2849: IF (l_autopop_status = FND_API.G_RET_STS_UNEXP_ERROR) OR
2850: (l_autopop_status = FND_API.G_RET_STS_ERROR) THEN
2851: l_autopop_error := 'AUTO_POP_EXP_ERROR';
2852: IF (l_autopop_status = FND_API.G_RET_STS_ERROR) THEN
2853: l_autopop_error := 'AUTO_POP_NO_VALUE';
2854: END IF;
2848:
2849: IF (l_autopop_status = FND_API.G_RET_STS_UNEXP_ERROR) OR
2850: (l_autopop_status = FND_API.G_RET_STS_ERROR) THEN
2851: l_autopop_error := 'AUTO_POP_EXP_ERROR';
2852: IF (l_autopop_status = FND_API.G_RET_STS_ERROR) THEN
2853: l_autopop_error := 'AUTO_POP_NO_VALUE';
2854: END IF;
2855: IF (l_asg_start_date <= g_enc_org_end_date) THEN
2856: orig_ci.gl_code_combination_id(g_orig_pointer) := l_gl_code_combination_id;
2899: p_payroll_id => p_payroll_id,
2900: p_start_date => l_poeta_start_date,
2901: p_end_date => l_poeta_end_date,
2902: p_return_status => p_return_status);
2903: IF p_return_status <> fnd_api.g_ret_sts_success THEN
2904: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2905: END IF;
2906: l_expenditure_type := l_new_expenditure_type;
2907: ELSE
2900: p_start_date => l_poeta_start_date,
2901: p_end_date => l_poeta_end_date,
2902: p_return_status => p_return_status);
2903: IF p_return_status <> fnd_api.g_ret_sts_success THEN
2904: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2905: END IF;
2906: l_expenditure_type := l_new_expenditure_type;
2907: ELSE
2908: l_gl_code_combination_id := l_new_gl_code_combination_id;
3000: ret_expenditure_type => l_new_expenditure_type,
3001: ret_gl_code_combination_id => l_new_gl_code_combination_id,
3002: retcode => l_autopop_status);
3003:
3004: IF (l_autopop_status = FND_API.G_RET_STS_UNEXP_ERROR) OR
3005: (l_autopop_status = FND_API.G_RET_STS_ERROR) THEN
3006: l_autopop_error := 'AUTO_POP_EXP_ERROR';
3007: IF (l_autopop_status = FND_API.G_RET_STS_ERROR) THEN
3008: l_autopop_error := 'AUTO_POP_NO_VALUE';
3001: ret_gl_code_combination_id => l_new_gl_code_combination_id,
3002: retcode => l_autopop_status);
3003:
3004: IF (l_autopop_status = FND_API.G_RET_STS_UNEXP_ERROR) OR
3005: (l_autopop_status = FND_API.G_RET_STS_ERROR) THEN
3006: l_autopop_error := 'AUTO_POP_EXP_ERROR';
3007: IF (l_autopop_status = FND_API.G_RET_STS_ERROR) THEN
3008: l_autopop_error := 'AUTO_POP_NO_VALUE';
3009: END IF;
3003:
3004: IF (l_autopop_status = FND_API.G_RET_STS_UNEXP_ERROR) OR
3005: (l_autopop_status = FND_API.G_RET_STS_ERROR) THEN
3006: l_autopop_error := 'AUTO_POP_EXP_ERROR';
3007: IF (l_autopop_status = FND_API.G_RET_STS_ERROR) THEN
3008: l_autopop_error := 'AUTO_POP_NO_VALUE';
3009: END IF;
3010: IF (l_acct_type = 'E') THEN
3011: OPEN project_number_cur;
3050: p_payroll_id => p_payroll_id,
3051: p_start_date => l_poeta_start_date,
3052: p_end_date => l_poeta_end_date,
3053: p_return_status => p_return_status);
3054: IF p_return_status <> fnd_api.g_ret_sts_success THEN
3055: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3056: END IF;
3057: l_expenditure_type := l_new_expenditure_type;
3058: ELSE
3051: p_start_date => l_poeta_start_date,
3052: p_end_date => l_poeta_end_date,
3053: p_return_status => p_return_status);
3054: IF p_return_status <> fnd_api.g_ret_sts_success THEN
3055: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3056: END IF;
3057: l_expenditure_type := l_new_expenditure_type;
3058: ELSE
3059: l_gl_code_combination_id := l_new_gl_code_combination_id;
3134: hr_utility.trace(fnd_date.date_to_canonical(SYSDATE) || ' Leaving ' || l_proc_name);
3135: EXCEPTION
3136: WHEN suspense_autopop_failed THEN
3137: fnd_msg_pub.add_exc_msg('PSP_ENC_CREATE_LINES', 'CREATE_LINES ');
3138: p_return_status := fnd_api.g_ret_sts_unexp_error;
3139: fnd_file.put_line(fnd_file.log, 'l_reason_code: ' || l_reason_code);
3140: fnd_file.put_line(fnd_file.log, fnd_number.number_to_canonical(l_proc_step) || ': ' || l_proc_name);
3141: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Leaving ' || l_proc_name);
3142: WHEN OTHERS THEN
3143: IF (g_error_message IS NULL) THEN
3144: g_error_message := l_proc_name || ': ' || SQLERRM;
3145: END IF;
3146: fnd_msg_pub.add_exc_msg('PSP_ENC_CREATE_LINES', 'CREATE_LINES');
3147: p_return_status := fnd_api.g_ret_sts_unexp_error;
3148: fnd_file.put_line(fnd_file.log, fnd_number.number_to_canonical(l_proc_step) || ': ' || l_proc_name);
3149: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Leaving ' || l_proc_name);
3150: END create_lines;
3151:
3328: t_enc_lines_array.r_hierarchy_code(g_enc_lines_counter) := p_hierarchy_code;
3329:
3330: g_enc_lines_counter := g_enc_lines_counter +1;
3331: END IF; /* skip inserting lines of zero dollars */
3332: p_return_status := fnd_api.g_ret_sts_success;
3333: EXCEPTION
3334: WHEN OTHERS THEN
3335: IF (g_error_message IS NULL) THEN
3336: g_error_message := 'INSERT_INTO_ENC_LINES: ' || SQLERRM;
3335: IF (g_error_message IS NULL) THEN
3336: g_error_message := 'INSERT_INTO_ENC_LINES: ' || SQLERRM;
3337: END IF;
3338: fnd_msg_pub.add_exc_msg('PSP_ENC_LINES','INSERT_INTO_ENC_LINES');
3339: p_return_status := fnd_api.g_ret_sts_unexp_error;
3340: END insert_into_enc_lines;
3341:
3342: --------------------------- INSERT INTO CONTROL TABLES --------------------------------------
3343: PROCEDURE Create_Controls(p_payroll_action_id IN NUMBER,
3431: enc_control_tab.r_ogm_cr_amount.delete;
3432: enc_control_tab.r_uom.delete;
3433:
3434: COMMIT;
3435: p_return_status := fnd_api.g_ret_sts_success;
3436: EXCEPTION
3437: WHEN OTHERS THEN
3438: IF (g_error_message IS NULL) THEN
3439: g_error_message := 'CREATE_CONTROLS: ' || SQLERRM;
3437: WHEN OTHERS THEN
3438: IF (g_error_message IS NULL) THEN
3439: g_error_message := 'CREATE_CONTROLS: ' || SQLERRM;
3440: END IF;
3441: p_return_status := fnd_api.g_ret_sts_unexp_error;
3442: fnd_message.set_name('PSP','PSP_ENC_INSERT_CONTROLS');
3443: FND_MSG_PUB.ADD;
3444: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3445: END create_controls;
3440: END IF;
3441: p_return_status := fnd_api.g_ret_sts_unexp_error;
3442: fnd_message.set_name('PSP','PSP_ENC_INSERT_CONTROLS');
3443: FND_MSG_PUB.ADD;
3444: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3445: END create_controls;
3446:
3447: /**********************************************************
3448: Created By: lveerubh
3517: p_poeta_gl_hier_array(i).r_enc_start_date := l_start_date;
3518: p_poeta_gl_hier_array(i).r_enc_end_date := l_end_date;
3519: p_poeta_gl_hier_array(i).r_susp_flag := 'Y';
3520: /*******************************************
3521: p_return_status := fnd_api.g_ret_sts_success;
3522: RETURN;
3523: END IF;
3524: IF l_start_date < NVL(p_poeta_start_date,l_start_date) THEN
3525: l_start_date := NVL(p_poeta_start_date,l_start_date);
3622: p_poeta_gl_hier_array(j).r_amount :=
3623: round(((p_asg_amount * l_bus_days_in_schedules) / l_bus_days_in_period),g_ext_precision);
3624: -- Introduced rounding for Bug 2916848 Ilo Mrc Ehnc.
3625: END LOOP;
3626: p_return_status := fnd_api.g_ret_sts_success;
3627:
3628: EXCEPTION
3629: WHEN DIVIDE_BY_ZERO THEN
3630: g_error_api_path := SUBSTR(' DETERMINE_PRO_RATA_DATES'||g_error_api_path,1,230);
3628: EXCEPTION
3629: WHEN DIVIDE_BY_ZERO THEN
3630: g_error_api_path := SUBSTR(' DETERMINE_PRO_RATA_DATES'||g_error_api_path,1,230);
3631: fnd_msg_pub.add_exc_msg('PSP_ENC_CREATE_LINES', ' DETERMINE_PRO_RATA_DATES ');
3632: p_return_status := fnd_api.g_ret_sts_unexp_error;
3633:
3634: WHEN OTHERS THEN
3635: IF (g_error_message IS NULL) THEN
3636: g_error_message := 'DETERMINE_PRO_RATA_DATES: ' || SQLERRM;
3636: g_error_message := 'DETERMINE_PRO_RATA_DATES: ' || SQLERRM;
3637: END IF;
3638: g_error_api_path := SUBSTR(' DETERMINE_PRO_RATA_DATES'||g_error_api_path,1,230);
3639: fnd_msg_pub.add_exc_msg('PSP_ENC_CREATE_LINES', ' DETERMINE_PRO_RATA_DATES ');
3640: p_return_status := fnd_api.g_ret_sts_unexp_error;
3641:
3642: END determine_pro_rata_dates;
3643:
3644: /**************************************************************************************************************************
3829: t_enc_lines_array2.r_orig_expenditure_type.delete;
3830: t_enc_lines_array2.r_orig_expenditure_org_id.delete;
3831: t_enc_lines_array2.r_hierarchy_code.delete;
3832:
3833: p_return_status := fnd_api.g_ret_sts_success;
3834:
3835: EXCEPTION
3836: WHEN OTHERS THEN
3837: IF (g_error_message IS NULL) THEN
3838: g_error_message := 'INSERT_ENC_LINES_FROM_ARRAYS: ' || SQLERRM;
3839: END IF;
3840: g_error_api_path := SUBSTR(' INSERT_ENC_LINES_FROM_ARRAYS:'||g_error_api_path,1,230);
3841: fnd_msg_pub.add_exc_msg('PSP_ENC_CREATE_LINES', ' INSERT_ENC_LINES_FROM_ARRAYS');
3842: p_return_status := fnd_api.g_ret_sts_unexp_error;
3843: END insert_enc_lines_from_arrays;
3844:
3845: -- Introduced the following procedure for bug fix 3462452
3846: PROCEDURE sub_slice_asg_chunk (p_assignment_id IN NUMBER,
6331: r_enc_period.r_encumbrance_amount(recno) := 0;
6332: END LOOP;
6333: hr_utility.trace(fnd_date.date_to_canonical(SYSDATE) || ' Leaving ' || l_proc_name);
6334:
6335: p_return_status := fnd_api.g_ret_sts_success;
6336: EXCEPTION
6337: WHEN OTHERS THEN
6338: IF (g_error_message IS NULL) THEN
6339: g_error_message := l_proc_name || ': ' || SQLERRM;
6339: g_error_message := l_proc_name || ': ' || SQLERRM;
6340: END IF;
6341: g_error_api_path := SUBSTR(' SUB_SLICE_ASG_CHUNK:'||g_error_api_path,1,230);
6342: fnd_msg_pub.add_exc_msg('PSP_ENC_CREATE_LINES', ' SUB_SLICE_ASG_CHUNK');
6343: p_return_status := fnd_api.g_ret_sts_unexp_error;
6344: fnd_file.put_line(fnd_file.log, fnd_number.number_to_canonical(l_proc_step) || ': ' || l_proc_name);
6345: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Leaving ' || l_proc_name);
6346: END sub_slice_asg_chunk;
6347: -- End of bug fix 3462452
6354: EXCEPTION
6355: WHEN OTHERS THEN
6356: fnd_msg_pub.add_exc_msg('PSP_ENC_CREATE_LINES', 'CEL_INIT: SQLCODE: ' || fnd_number.number_to_canonical(SQLCODE) || ' SQLERRM: ' || SQLERRM);
6357: psp_message_s.print_error(p_mode => FND_FILE.LOG,
6358: p_print_header => FND_API.G_TRUE);
6359: END cel_init;
6360:
6361: PROCEDURE cel_range_code (pactid IN NUMBER,
6362: sqlstr OUT NOCOPY VARCHAR2) IS
6421:
6422: IF ((l_payroll_id IS NOT NULL) OR (l_process_mode = 'TERMINATE')) THEN
6423: enc_pre_process(pactid, l_payroll_id, l_process_mode, l_return_status);
6424:
6425: IF l_return_status <> fnd_api.g_ret_sts_success THEN
6426: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
6427: END IF;
6428: hr_utility.trace(fnd_date.date_to_canonical(SYSDATE) || ' Completed enc_pre_process for l_payroll_id: ' || l_payroll_id || ' process_mode: ' || l_process_mode);
6429: ELSE
6422: IF ((l_payroll_id IS NOT NULL) OR (l_process_mode = 'TERMINATE')) THEN
6423: enc_pre_process(pactid, l_payroll_id, l_process_mode, l_return_status);
6424:
6425: IF l_return_status <> fnd_api.g_ret_sts_success THEN
6426: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
6427: END IF;
6428: hr_utility.trace(fnd_date.date_to_canonical(SYSDATE) || ' Completed enc_pre_process for l_payroll_id: ' || l_payroll_id || ' process_mode: ' || l_process_mode);
6429: ELSE
6430: OPEN enc_payrolls_cur;
6432: FETCH enc_payrolls_cur INTO l_payroll_id;
6433: EXIT WHEN enc_payrolls_cur%NOTFOUND;
6434:
6435: enc_pre_process(pactid, l_payroll_id, l_process_mode, l_return_status);
6436: IF l_return_status <> fnd_api.g_ret_sts_success THEN
6437: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
6438: END IF;
6439: hr_utility.trace(fnd_date.date_to_canonical(SYSDATE) || ' Completed enc_pre_process for l_payroll_id: ' || l_payroll_id || ' process_mode: ' || l_process_mode);
6440: END LOOP;
6433: EXIT WHEN enc_payrolls_cur%NOTFOUND;
6434:
6435: enc_pre_process(pactid, l_payroll_id, l_process_mode, l_return_status);
6436: IF l_return_status <> fnd_api.g_ret_sts_success THEN
6437: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
6438: END IF;
6439: hr_utility.trace(fnd_date.date_to_canonical(SYSDATE) || ' Completed enc_pre_process for l_payroll_id: ' || l_payroll_id || ' process_mode: ' || l_process_mode);
6440: END LOOP;
6441: CLOSE enc_payrolls_cur;
6477: hr_utility.trace(fnd_date.date_to_canonical(SYSDATE) || ' sqlstr: ' || sqlstr);
6478: hr_utility.trace(fnd_date.date_to_canonical(SYSDATE) || ' Leaving CEL_RANGE_CODE pactid: ' || pactid);
6479: EXCEPTION
6480: WHEN NO_UPDATE_REC_FOUND THEN
6481: psp_message_s.print_error (p_mode => FND_FILE.LOG, p_print_header => FND_API.G_FALSE);
6482: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Leaving CEL_RANGE_CODE pactid: ' || pactid);
6483: WHEN OTHERS THEN
6484: fnd_msg_pub.add_exc_msg('PSP_ENC_CREATE_LINES', 'CEL_RANGE_CODE: SQLCODE: ' || fnd_number.number_to_canonical(SQLCODE) || ' SQLERRM: ' || SQLERRM);
6485: psp_message_s.print_error(p_mode => FND_FILE.LOG,
6482: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Leaving CEL_RANGE_CODE pactid: ' || pactid);
6483: WHEN OTHERS THEN
6484: fnd_msg_pub.add_exc_msg('PSP_ENC_CREATE_LINES', 'CEL_RANGE_CODE: SQLCODE: ' || fnd_number.number_to_canonical(SQLCODE) || ' SQLERRM: ' || SQLERRM);
6485: psp_message_s.print_error(p_mode => FND_FILE.LOG,
6486: p_print_header => FND_API.G_TRUE);
6487: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Leaving CEL_RANGE_CODE pactid: ' || pactid);
6488: END cel_range_code;
6489:
6490: PROCEDURE cel_asg_action_code (p_pactid IN NUMBER,
7032: obtain_enc_org_end_date(p_enc_org_end_date => l_enc_org_end_date,
7033: p_business_group_id => l_business_group_id,
7034: p_set_of_books_id => l_set_of_books_id,
7035: p_return_status => l_return_status);
7036: IF l_return_status <> fnd_api.g_ret_sts_success THEN
7037: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
7038: END IF;
7039: g_enc_org_end_date := l_enc_org_end_date ;
7040: hr_utility.trace(fnd_date.date_to_canonical(SYSDATE) || ' g_enc_org_end_date: ' || fnd_date.date_to_canonical(g_enc_org_end_date));
7033: p_business_group_id => l_business_group_id,
7034: p_set_of_books_id => l_set_of_books_id,
7035: p_return_status => l_return_status);
7036: IF l_return_status <> fnd_api.g_ret_sts_success THEN
7037: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
7038: END IF;
7039: g_enc_org_end_date := l_enc_org_end_date ;
7040: hr_utility.trace(fnd_date.date_to_canonical(SYSDATE) || ' g_enc_org_end_date: ' || fnd_date.date_to_canonical(g_enc_org_end_date));
7041:
7130: -- p_set_of_books_id => l_set_of_books_id,
7131: p_last_paid_date => l_enc_begin_date,
7132: -- p_max_enc_date => l_max_enc_date,
7133: p_return_status => l_return_status);
7134: IF l_return_status <> fnd_api.g_ret_sts_success THEN
7135: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
7136: END IF;
7137: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Completed create_lines for l_assignment_id: ' || l_assignment_id || ' payroll_id: ' || l_payroll_id || ' element_type_id: ' || l_element_type_id);
7138: log_cel_warnings;
7131: p_last_paid_date => l_enc_begin_date,
7132: -- p_max_enc_date => l_max_enc_date,
7133: p_return_status => l_return_status);
7134: IF l_return_status <> fnd_api.g_ret_sts_success THEN
7135: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
7136: END IF;
7137: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Completed create_lines for l_assignment_id: ' || l_assignment_id || ' payroll_id: ' || l_payroll_id || ' element_type_id: ' || l_element_type_id);
7138: log_cel_warnings;
7139: END IF;
7179: -- p_set_of_books_id => l_set_of_books_id,
7180: p_last_paid_date => l_enc_begin_date,
7181: -- p_max_enc_date => l_max_enc_date,
7182: p_return_status => l_return_status);
7183: IF l_return_status <> fnd_api.g_ret_sts_success THEN
7184: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
7185: END IF;
7186: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Completed create_lines for l_assignment_id: ' || l_assignment_id || ' payroll_id: ' || l_payroll_id || ' element_type_id: ' || l_element_type_id);
7187: log_cel_warnings;
7180: p_last_paid_date => l_enc_begin_date,
7181: -- p_max_enc_date => l_max_enc_date,
7182: p_return_status => l_return_status);
7183: IF l_return_status <> fnd_api.g_ret_sts_success THEN
7184: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
7185: END IF;
7186: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Completed create_lines for l_assignment_id: ' || l_assignment_id || ' payroll_id: ' || l_payroll_id || ' element_type_id: ' || l_element_type_id);
7187: log_cel_warnings;
7188: END IF;
7203: p_set_of_books_id => l_set_of_books_id,
7204: p_enc_line_type => 'U',
7205: l_retcode => l_return_status);
7206:
7207: IF l_return_status <> fnd_api.g_ret_sts_success THEN
7208: RAISE fnd_api.g_exc_unexpected_error;
7209: END IF;
7210: hr_utility.trace(fnd_date.date_to_canonical(SYSDATE) || ' Completed verify_changes for l_assignment_id: ' || l_assignment_id || ' payroll_id: ' || l_payroll_id);
7211: ELSE
7204: p_enc_line_type => 'U',
7205: l_retcode => l_return_status);
7206:
7207: IF l_return_status <> fnd_api.g_ret_sts_success THEN
7208: RAISE fnd_api.g_exc_unexpected_error;
7209: END IF;
7210: hr_utility.trace(fnd_date.date_to_canonical(SYSDATE) || ' Completed verify_changes for l_assignment_id: ' || l_assignment_id || ' payroll_id: ' || l_payroll_id);
7211: ELSE
7212: IF (l_liq_all_count > 0) THEN
7283: p_business_group_id => l_business_group_id,
7284: p_set_of_books_id => l_set_of_books_id,
7285: p_return_status => l_return_status);
7286:
7287: IF l_return_status <> fnd_api.g_ret_sts_success THEN
7288: RAISE fnd_api.g_exc_unexpected_error;
7289: END IF;
7290: hr_utility.trace(fnd_date.date_to_canonical(SYSDATE) || ' Completed create_liq_lines for l_assignment_id: ' || l_assignment_id || ' payroll_id: ' || l_payroll_id);
7291:
7284: p_set_of_books_id => l_set_of_books_id,
7285: p_return_status => l_return_status);
7286:
7287: IF l_return_status <> fnd_api.g_ret_sts_success THEN
7288: RAISE fnd_api.g_exc_unexpected_error;
7289: END IF;
7290: hr_utility.trace(fnd_date.date_to_canonical(SYSDATE) || ' Completed create_liq_lines for l_assignment_id: ' || l_assignment_id || ' payroll_id: ' || l_payroll_id);
7291:
7292: create_sum_lines (p_payroll_action_id => p_payroll_action_id,
7295: p_business_group_id => l_business_group_id,
7296: p_set_of_books_id => l_set_of_books_id,
7297: p_return_status => l_return_status);
7298:
7299: IF l_return_status <> fnd_api.g_ret_sts_success THEN
7300: RAISE fnd_api.g_exc_unexpected_error;
7301: END IF;
7302: hr_utility.trace(fnd_date.date_to_canonical(SYSDATE) || ' Completed create_sum_lines for l_assignment_id: ' || l_assignment_id || ' payroll_id: ' || l_payroll_id);
7303:
7296: p_set_of_books_id => l_set_of_books_id,
7297: p_return_status => l_return_status);
7298:
7299: IF l_return_status <> fnd_api.g_ret_sts_success THEN
7300: RAISE fnd_api.g_exc_unexpected_error;
7301: END IF;
7302: hr_utility.trace(fnd_date.date_to_canonical(SYSDATE) || ' Completed create_sum_lines for l_assignment_id: ' || l_assignment_id || ' payroll_id: ' || l_payroll_id);
7303:
7304: update_hierarchy_dates (p_payroll_action_id => p_payroll_action_id,
7305: p_payroll_id => l_payroll_id,
7306: p_assignment_id => l_assignment_id,
7307: p_return_status => l_return_status);
7308:
7309: IF l_return_status <> fnd_api.g_ret_sts_success THEN
7310: RAISE fnd_api.g_exc_unexpected_error;
7311: END IF;
7312: END LOOP;
7313:
7306: p_assignment_id => l_assignment_id,
7307: p_return_status => l_return_status);
7308:
7309: IF l_return_status <> fnd_api.g_ret_sts_success THEN
7310: RAISE fnd_api.g_exc_unexpected_error;
7311: END IF;
7312: END LOOP;
7313:
7314: FORALL recno IN 1..t_assignments.asg_array.COUNT
7408: p_return_status => l_return_status);
7409: END IF;
7410: END IF;
7411: fnd_msg_pub.add_exc_msg('PSP_ENC_CREATE_LINES', 'CEL_ARCHIVE: SQLCODE: ' || fnd_number.number_to_canonical(SQLCODE) || ' SQLERRM: ' || SQLERRM);
7412: psp_message_s.print_error(p_mode => FND_FILE.LOG, p_print_header => FND_API.G_TRUE);
7413: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Leaving CEL_ARCHIVE (payroll_action_id: ' || p_payroll_action_id || ' chunk_number: ' || p_chunk_number ||')');
7414: ROLLBACK TO CEL_ARCHIVE;
7415: RAISE;
7416: END cel_archive;
7498: IF l_request_id = 0 THEN
7499: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Encumbrance Run Results Report submission failed');
7500: fnd_message.set_name('PSP','PSP_TR_GL_IMP_FAILED');
7501: fnd_msg_pub.add;
7502: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
7503: END IF;
7504: COMMIT;
7505: RAISE fnd_api.g_exc_unexpected_error;
7506: END IF;
7501: fnd_msg_pub.add;
7502: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
7503: END IF;
7504: COMMIT;
7505: RAISE fnd_api.g_exc_unexpected_error;
7506: END IF;
7507:
7508: UPDATE psp_enc_process_assignments pepa
7509: SET assignment_status = 'B'
7641: IF l_request_id = 0 THEN
7642: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Encumbrance Run Results Report submission failed');
7643: fnd_message.set_name('PSP','PSP_TR_GL_IMP_FAILED');
7644: fnd_msg_pub.add;
7645: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
7646: END IF;
7647: COMMIT;
7648:
7649: IF (l_process_mode = 'TERMINATE') THEN
7668: IF l_request_id = 0 THEN
7669: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Encumbrance Summarize and Transfer submission failed');
7670: fnd_message.set_name('PSP','PSP_TR_GL_IMP_FAILED');
7671: fnd_msg_pub.add;
7672: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
7673: END IF;
7674:
7675: UPDATE psp_enc_processes
7676: SET process_phase = 'deinit_st'
7686: IF call_status = FALSE THEN
7687: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Encumbrance Summarize and Transfer failed');
7688: fnd_message.set_name('PSP','PSP_ENC_STR_FAILED');
7689: fnd_msg_pub.add;
7690: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
7691: END IF;
7692: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Encumbrance Summarize and Transfer completed');
7693: ELSE
7694: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Encumbrance Summarize and Transfer not required as there arent any new summary lines');
8125: p_set_of_books_id => p_set_of_books_id,
8126: p_enc_line_type => 'U',
8127: p_return_status => l_return_status);
8128:
8129: IF l_return_status <> fnd_api.g_ret_sts_success THEN
8130: RAISE fnd_api.g_exc_unexpected_error;
8131: END IF;
8132:
8133: hr_utility.trace(fnd_date.date_to_canonical(SYSDATE) || ' Leaving verify_changes
8126: p_enc_line_type => 'U',
8127: p_return_status => l_return_status);
8128:
8129: IF l_return_status <> fnd_api.g_ret_sts_success THEN
8130: RAISE fnd_api.g_exc_unexpected_error;
8131: END IF;
8132:
8133: hr_utility.trace(fnd_date.date_to_canonical(SYSDATE) || ' Leaving verify_changes
8134: p_payroll_id: ' || p_payroll_id || ' p_assignment_id: ' || p_assignment_id || '
8133: hr_utility.trace(fnd_date.date_to_canonical(SYSDATE) || ' Leaving verify_changes
8134: p_payroll_id: ' || p_payroll_id || ' p_assignment_id: ' || p_assignment_id || '
8135: p_business_group_id: ' || p_business_group_id || ' p_set_of_books_id: ' || p_set_of_books_id || '
8136: p_enc_line_type: ' || p_enc_line_type);
8137: l_retcode := FND_API.G_RET_STS_SUCCESS;
8138: EXCEPTION
8139: WHEN OTHERS THEN
8140: IF (g_error_message IS NULL) THEN
8141: g_error_message := 'VERIFY_CHANGES: ' || SQLERRM;
8141: g_error_message := 'VERIFY_CHANGES: ' || SQLERRM;
8142: END IF;
8143: g_error_api_path := SUBSTR('VERIFY_CHANGES:' || g_error_api_path,1,230);
8144: fnd_msg_pub.add_exc_msg('PSP_ENC_UPDATE_LINES', 'VERIFY_CHANGES');
8145: l_retcode := fnd_api.g_ret_sts_unexp_error;
8146: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Leaving verify_changes
8147: p_payroll_id: ' || p_payroll_id || '
8148: p_assignment_id: ' || p_assignment_id || '
8149: p_business_group_id: ' || p_business_group_id || '
8229: AND pelh.assignment_id = p_assignment_id
8230: AND pelh.payroll_id = p_payroll_id);
8231: hr_utility.trace(fnd_date.date_to_canonical(SYSDATE) || ' No of liquidation lines created: ' || SQL%ROWCOUNT);
8232:
8233: p_return_status := fnd_api.g_ret_sts_success;
8234: EXCEPTION
8235: WHEN OTHERS THEN
8236: IF (g_error_message IS NULL) THEN
8237: g_error_message := 'CREATE_LIQ_LINES: ' || SQLERRM;
8237: g_error_message := 'CREATE_LIQ_LINES: ' || SQLERRM;
8238: END IF;
8239: g_error_api_path := SUBSTR('CREATE_LIQ_LINES:' || g_error_api_path,1,230);
8240: fnd_msg_pub.add_exc_msg('PSP_ENC_CREATE_LINES', 'CREATE_LIQ_LINES');
8241: p_return_status := fnd_api.g_ret_sts_unexp_error;
8242: END create_liq_lines;
8243:
8244: PROCEDURE create_sum_lines (p_payroll_action_id IN NUMBER,
8245: p_payroll_id IN NUMBER,
8449: AND NVL(pel.expenditure_organization_id, -99) = NVL(t_sum_lines.expenditure_organization_id(recno), -99)
8450: AND pel.dr_cr_flag = t_sum_lines.dr_cr_flag(recno)
8451: AND pel.gl_project_flag = t_sum_lines.gl_project_flag(recno);
8452: END IF;
8453: p_return_status := fnd_api.g_ret_sts_success;
8454: EXCEPTION
8455: WHEN OTHERS THEN
8456: IF (g_error_message IS NULL) THEN
8457: g_error_message := 'CREATE_SUM_LINES: ' || SQLERRM;
8457: g_error_message := 'CREATE_SUM_LINES: ' || SQLERRM;
8458: END IF;
8459: g_error_api_path := SUBSTR('CREATE_SUM_LINES:' || g_error_api_path,1,230);
8460: fnd_msg_pub.add_exc_msg('PSP_ENC_CREATE_LINES', 'CREATE_SUM_LINES');
8461: p_return_status := fnd_api.g_ret_sts_unexp_error;
8462: END create_sum_lines;
8463:
8464: PROCEDURE enc_pre_process (p_payroll_action_id IN NUMBER,
8465: p_payroll_id IN NUMBER,
8643: p_payroll_id => p_payroll_id,
8644: p_business_group_id => l_business_group_id,
8645: p_set_of_books_id => l_set_of_books_id,
8646: p_return_status => l_return_status);
8647: IF l_return_status <> fnd_api.g_ret_sts_success THEN
8648: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
8649: END IF;
8650: hr_utility.trace(fnd_date.date_to_canonical(SYSDATE) || ' Completed psp_enc_pre_process.poeta_pre_process');
8651:
8644: p_business_group_id => l_business_group_id,
8645: p_set_of_books_id => l_set_of_books_id,
8646: p_return_status => l_return_status);
8647: IF l_return_status <> fnd_api.g_ret_sts_success THEN
8648: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
8649: END IF;
8650: hr_utility.trace(fnd_date.date_to_canonical(SYSDATE) || ' Completed psp_enc_pre_process.poeta_pre_process');
8651:
8652: IF (l_pre_process_mode <>'F') THEN
8654: (p_enc_line_type => 'U',
8655: p_payroll_id => p_payroll_id,
8656: p_return_status => l_return_status);
8657:
8658: IF l_return_status <> fnd_api.g_ret_sts_success THEN
8659: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
8660: END IF;
8661: hr_utility.trace(fnd_date.date_to_canonical(SYSDATE) || ' Completed psp_enc_pre_process.labor_schedule_pre_process');
8662: END IF;
8655: p_payroll_id => p_payroll_id,
8656: p_return_status => l_return_status);
8657:
8658: IF l_return_status <> fnd_api.g_ret_sts_success THEN
8659: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
8660: END IF;
8661: hr_utility.trace(fnd_date.date_to_canonical(SYSDATE) || ' Completed psp_enc_pre_process.labor_schedule_pre_process');
8662: END IF;
8663:
9423: hr_utility.trace(fnd_date.date_to_canonical(SYSDATE) || ' Leaving ENC_PRE_PROCESS
9424: p_payroll_action_id: ' || p_payroll_action_id || '
9425: p_payroll_id: ' || p_payroll_id || '
9426: p_process_mode: ' || p_process_mode);
9427: p_return_status := fnd_api.g_ret_sts_success;
9428: EXCEPTION
9429: WHEN OTHERS THEN
9430: IF (g_error_message IS NULL) THEN
9431: g_error_message := 'PSP_ENC_PROCESS: ' || SQLERRM;
9430: IF (g_error_message IS NULL) THEN
9431: g_error_message := 'PSP_ENC_PROCESS: ' || SQLERRM;
9432: END IF;
9433: fnd_msg_pub.add_exc_msg('PSP_ENC_CREATE_LINES', 'ENC_PRE_PROCESS: SQLCODE: ' || fnd_number.number_to_canonical(SQLCODE) || ' SQLERRM: ' || SQLERRM);
9434: psp_message_s.print_error(p_mode => FND_FILE.LOG, p_print_header => FND_API.G_TRUE);
9435: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Leaving ENC_PRE_PROCESS
9436: p_payroll_action_id: ' || p_payroll_action_id || '
9437: p_payroll_id: ' || p_payroll_id || '
9438: p_process_mode: ' || p_process_mode);
9435: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Leaving ENC_PRE_PROCESS
9436: p_payroll_action_id: ' || p_payroll_action_id || '
9437: p_payroll_id: ' || p_payroll_id || '
9438: p_process_mode: ' || p_process_mode);
9439: p_return_status := fnd_api.g_ret_sts_unexp_error;
9440: END enc_pre_process;
9441:
9442: PROCEDURE rollback_cel (errbuf OUT NOCOPY VARCHAR2,
9443: retcode OUT NOCOPY VARCHAR2,
9679: END IF;
9680:
9681: COMMIT;
9682: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Leaving ROLLBACK_CEL p_payroll_action_id: ' || p_payroll_action_id);
9683: retcode := fnd_api.g_ret_sts_success;
9684: EXCEPTION
9685: WHEN OTHERS THEN
9686: fnd_msg_pub.add_exc_msg('PSP_ENC_CREATE_LINES', 'ROLLBACK_CEL: SQLCODE: ' || fnd_number.number_to_canonical(SQLCODE) || ' SQLERRM: ' || SQLERRM);
9687: psp_message_s.print_error(p_mode => FND_FILE.LOG, p_print_header => FND_API.G_TRUE);
9683: retcode := fnd_api.g_ret_sts_success;
9684: EXCEPTION
9685: WHEN OTHERS THEN
9686: fnd_msg_pub.add_exc_msg('PSP_ENC_CREATE_LINES', 'ROLLBACK_CEL: SQLCODE: ' || fnd_number.number_to_canonical(SQLCODE) || ' SQLERRM: ' || SQLERRM);
9687: psp_message_s.print_error(p_mode => FND_FILE.LOG, p_print_header => FND_API.G_TRUE);
9688: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Leaving ROLLBACK_CEL p_payroll_action_id: ' || p_payroll_action_id);
9689: retcode := fnd_api.g_ret_sts_unexp_error;
9690: END rollback_cel;
9691:
9685: WHEN OTHERS THEN
9686: fnd_msg_pub.add_exc_msg('PSP_ENC_CREATE_LINES', 'ROLLBACK_CEL: SQLCODE: ' || fnd_number.number_to_canonical(SQLCODE) || ' SQLERRM: ' || SQLERRM);
9687: psp_message_s.print_error(p_mode => FND_FILE.LOG, p_print_header => FND_API.G_TRUE);
9688: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Leaving ROLLBACK_CEL p_payroll_action_id: ' || p_payroll_action_id);
9689: retcode := fnd_api.g_ret_sts_unexp_error;
9690: END rollback_cel;
9691:
9692: PROCEDURE load_sch_hierarchy (p_assignment_id IN NUMBER,
9693: p_payroll_id IN NUMBER,
10628: p_start_date => r_gee.poeta_start_date(recno),
10629: p_end_date => r_gee.poeta_end_date(recno),
10630: p_return_status => p_return_status);
10631:
10632: IF p_return_status <> fnd_api.g_ret_sts_success THEN
10633: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
10634: END IF;
10635: END IF;
10636: g_pateo_end_date := GREATEST(g_pateo_end_date, NVL(r_gee.poeta_end_date(recno), g_pateo_end_date));
10629: p_end_date => r_gee.poeta_end_date(recno),
10630: p_return_status => p_return_status);
10631:
10632: IF p_return_status <> fnd_api.g_ret_sts_success THEN
10633: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
10634: END IF;
10635: END IF;
10636: g_pateo_end_date := GREATEST(g_pateo_end_date, NVL(r_gee.poeta_end_date(recno), g_pateo_end_date));
10637: END LOOP;
10676: p_start_date => r_et.poeta_start_date(recno),
10677: p_end_date => r_et.poeta_end_date(recno),
10678: p_return_status => p_return_status);
10679:
10680: IF p_return_status <> fnd_api.g_ret_sts_success THEN
10681: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
10682: END IF;
10683: END IF;
10684: g_pateo_end_date := GREATEST(g_pateo_end_date, NVL(r_et.poeta_end_date(recno), g_pateo_end_date));
10677: p_end_date => r_et.poeta_end_date(recno),
10678: p_return_status => p_return_status);
10679:
10680: IF p_return_status <> fnd_api.g_ret_sts_success THEN
10681: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
10682: END IF;
10683: END IF;
10684: g_pateo_end_date := GREATEST(g_pateo_end_date, NVL(r_et.poeta_end_date(recno), g_pateo_end_date));
10685: END LOOP;
10724: p_start_date => r_ec.poeta_start_date(recno),
10725: p_end_date => r_ec.poeta_end_date(recno),
10726: p_return_status => p_return_status);
10727:
10728: IF p_return_status <> fnd_api.g_ret_sts_success THEN
10729: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
10730: END IF;
10731: END IF;
10732: g_pateo_end_date := GREATEST(g_pateo_end_date, NVL(r_ec.poeta_end_date(recno), g_pateo_end_date));
10725: p_end_date => r_ec.poeta_end_date(recno),
10726: p_return_status => p_return_status);
10727:
10728: IF p_return_status <> fnd_api.g_ret_sts_success THEN
10729: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
10730: END IF;
10731: END IF;
10732: g_pateo_end_date := GREATEST(g_pateo_end_date, NVL(r_ec.poeta_end_date(recno), g_pateo_end_date));
10733: END LOOP;
10772: p_start_date => r_asg.poeta_start_date(recno),
10773: p_end_date => r_asg.poeta_end_date(recno),
10774: p_return_status => p_return_status);
10775:
10776: IF p_return_status <> fnd_api.g_ret_sts_success THEN
10777: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
10778: END IF;
10779: END IF;
10780: g_pateo_end_date := GREATEST(g_pateo_end_date, NVL(r_asg.poeta_end_date(recno), g_pateo_end_date));
10773: p_end_date => r_asg.poeta_end_date(recno),
10774: p_return_status => p_return_status);
10775:
10776: IF p_return_status <> fnd_api.g_ret_sts_success THEN
10777: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
10778: END IF;
10779: END IF;
10780: g_pateo_end_date := GREATEST(g_pateo_end_date, NVL(r_asg.poeta_end_date(recno), g_pateo_end_date));
10781: END LOOP;
10820: p_start_date => r_odls.poeta_start_date(recno),
10821: p_end_date => r_odls.poeta_end_date(recno),
10822: p_return_status => p_return_status);
10823:
10824: IF p_return_status <> fnd_api.g_ret_sts_success THEN
10825: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
10826: END IF;
10827: END IF;
10828: g_pateo_end_date := GREATEST(g_pateo_end_date, NVL(r_odls.poeta_end_date(recno), g_pateo_end_date));
10821: p_end_date => r_odls.poeta_end_date(recno),
10822: p_return_status => p_return_status);
10823:
10824: IF p_return_status <> fnd_api.g_ret_sts_success THEN
10825: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
10826: END IF;
10827: END IF;
10828: g_pateo_end_date := GREATEST(g_pateo_end_date, NVL(r_odls.poeta_end_date(recno), g_pateo_end_date));
10829: END LOOP;
10868: p_start_date => r_da.poeta_start_date(recno),
10869: p_end_date => r_da.poeta_end_date(recno),
10870: p_return_status => p_return_status);
10871:
10872: IF p_return_status <> fnd_api.g_ret_sts_success THEN
10873: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
10874: END IF;
10875: END IF;
10876: g_pateo_end_date := GREATEST(g_pateo_end_date, NVL(r_da.poeta_end_date(recno), g_pateo_end_date));
10869: p_end_date => r_da.poeta_end_date(recno),
10870: p_return_status => p_return_status);
10871:
10872: IF p_return_status <> fnd_api.g_ret_sts_success THEN
10873: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
10874: END IF;
10875: END IF;
10876: g_pateo_end_date := GREATEST(g_pateo_end_date, NVL(r_da.poeta_end_date(recno), g_pateo_end_date));
10877: END LOOP;
10916: p_start_date => r_sa.poeta_start_date(recno),
10917: p_end_date => r_sa.poeta_end_date(recno),
10918: p_return_status => p_return_status);
10919:
10920: IF p_return_status <> fnd_api.g_ret_sts_success THEN
10921: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
10922: END IF;
10923: END IF;
10924: g_pateo_end_date := GREATEST(g_pateo_end_date, NVL(r_sa.poeta_end_date(recno), g_pateo_end_date));
10917: p_end_date => r_sa.poeta_end_date(recno),
10918: p_return_status => p_return_status);
10919:
10920: IF p_return_status <> fnd_api.g_ret_sts_success THEN
10921: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
10922: END IF;
10923: END IF;
10924: g_pateo_end_date := GREATEST(g_pateo_end_date, NVL(r_sa.poeta_end_date(recno), g_pateo_end_date));
10925: END LOOP;
10930: END IF;
10931: hr_utility.trace(fnd_date.date_to_canonical(SYSDATE) || ' g_pateo_end_date: ' || TO_CHAR(g_pateo_end_date, 'DD-MON-RRRR'));
10932:
10933: hr_utility.trace(fnd_date.date_to_canonical(SYSDATE) || ' Leaving LOAD_SCH_HIERARCHY');
10934: p_return_status := fnd_api.g_ret_sts_success;
10935: EXCEPTION
10936: WHEN OTHERS THEN
10937: IF (g_error_message IS NULL) THEN
10938: g_error_message := 'LOAD_SCH_HIERARCHY: ' || SQLERRM;
10938: g_error_message := 'LOAD_SCH_HIERARCHY: ' || SQLERRM;
10939: END IF;
10940: g_error_api_path := SUBSTR(' LOAD_SCH_HIERARCHY:'||g_error_api_path,1,230);
10941: fnd_msg_pub.add_exc_msg('PSP_ENC_CREATE_LINES', ' LOAD_SCH_HIERARCHY');
10942: p_return_status := fnd_api.g_ret_sts_unexp_error;
10943: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' ' || fnd_number.number_to_canonical(l_proc_step) || ': LOAD_SCH_HIERARCHY');
10944: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Leaving LOAD_SCH_HIERARCHY');
10945: END load_sch_hierarchy;
10946:
11499: AND expenditure_type = t_enc_nlines.exp_type(recno)
11500: AND enc_start_date <= t_enc_nlines.enc_end_date(recno)
11501: AND enc_end_date >= t_enc_nlines.enc_start_date(recno);
11502: END IF;
11503: p_return_status := fnd_api.g_ret_sts_success;
11504: hr_utility.trace(fnd_date.date_to_canonical(SYSDATE) || ' Leaving UPDATE_HIERARCHY_DATES');
11505: EXCEPTION
11506: WHEN OTHERS THEN
11507: IF (g_error_message IS NULL) THEN
11508: g_error_message := 'UPDATE_HIERARCHY_DATES: ' || SQLERRM;
11509: END IF;
11510: g_error_api_path := SUBSTR(' UPDATE_HIERARCHY_DATES:'||g_error_api_path,1,230);
11511: fnd_msg_pub.add_exc_msg('PSP_ENC_CREATE_LINES', ' UPDATE_HIERARCHY_DATES');
11512: p_return_status := fnd_api.g_ret_sts_unexp_error;
11513: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Leaving UPDATE_HIERARCHY_DATES');
11514: END update_hierarchy_dates;
11515:
11516: PROCEDURE clear_sch_hierarchy IS