8:
9: pragma autonomous_transaction ;
10: BEGIN
11: --dbms_output.put_line(p_msg);
12: --IF P_PA_DEBUG_MODE = 'Y' Then
13: NULL;
14: INSERT INTO PA_FP_CALCULATE_LOG
15: (SESSIONID
16: ,SEQ_NUMBER
33: BEGIN
34: --calc_log(p_msg);
35: If p_debug_flag = 'Y' Then
36: l_msg := substr(p_msg,1,1000);
37: PA_DEBUG.write
38: (x_Module => l_module
39: ,x_Msg => substr('LOG:'||p_msg,1,240)
40: ,x_Log_Level => 3);
41: End If;
144: BEGIN
145: --- Initialize the error statck
146: IF ( g_debug_flag IS NULL )
147: Then
148: fnd_profile.get('PA_DEBUG_MODE',g_debug_flag);
149: g_debug_flag := NVL(g_debug_flag, 'N');
150: End If;
151: l_debug_flag := NVL(g_debug_flag,'N');
152: IF ( l_debug_flag = 'Y' )
150: End If;
151: l_debug_flag := NVL(g_debug_flag,'N');
152: IF ( l_debug_flag = 'Y' )
153: THEN
154: PA_DEBUG.init_err_stack ('PA_COST1.get_projLevel_BurdSchds');
155: PA_DEBUG.SET_PROCESS( x_process => 'PLSQL'
156: ,x_write_file => 'LOG'
157: ,x_debug_mode => l_debug_flag
158: );
151: l_debug_flag := NVL(g_debug_flag,'N');
152: IF ( l_debug_flag = 'Y' )
153: THEN
154: PA_DEBUG.init_err_stack ('PA_COST1.get_projLevel_BurdSchds');
155: PA_DEBUG.SET_PROCESS( x_process => 'PLSQL'
156: ,x_write_file => 'LOG'
157: ,x_debug_mode => l_debug_flag
158: );
159: End If;
669: x_return_status := 'S';
670:
671: --- Initialize the error statck
672: If g_debug_flag is NULL Then
673: fnd_profile.get('PA_DEBUG_MODE',g_debug_flag);
674: g_debug_flag := NVL(g_debug_flag, 'N');
675: End If;
676: l_debug_flag := NVL(g_debug_flag,'N');
677: IF l_debug_flag = 'Y' Then
674: g_debug_flag := NVL(g_debug_flag, 'N');
675: End If;
676: l_debug_flag := NVL(g_debug_flag,'N');
677: IF l_debug_flag = 'Y' Then
678: PA_DEBUG.init_err_stack ('PA_COST1.Get_Plan_Actual_Cost_Rates');
679: PA_DEBUG.SET_PROCESS( x_process => 'PLSQL'
680: ,x_write_file => 'LOG'
681: ,x_debug_mode => l_debug_flag
682: );
675: End If;
676: l_debug_flag := NVL(g_debug_flag,'N');
677: IF l_debug_flag = 'Y' Then
678: PA_DEBUG.init_err_stack ('PA_COST1.Get_Plan_Actual_Cost_Rates');
679: PA_DEBUG.SET_PROCESS( x_process => 'PLSQL'
680: ,x_write_file => 'LOG'
681: ,x_debug_mode => l_debug_flag
682: );
683: End If;
721: x_burden_cost_rejection_code := Null;
722: x_error_msg_code := Null;
723: x_return_status := 'S';
724: If l_debug_flag = 'Y' Then
725: PA_DEBUG.reset_err_stack;
726: End If;
727: RETURN;
728: ElsIf (p_override_trxn_cost_rate is NOT NULL OR p_override_trxn_raw_cost is NOT NULL ) Then
729: l_stage := 'Validating override params';
1768: x_return_status := l_return_status;
1769:
1770: -- reset the error stack
1771: If l_debug_flag = 'Y' Then
1772: PA_DEBUG.reset_err_stack;
1773: End If;
1774:
1775: EXCEPTION
1776: WHEN l_insufficient_parms THEN
1800: End If;
1801: x_return_status := 'E';
1802: print_msg(l_debug_flag,l_stage);
1803: If l_debug_flag = 'Y' Then
1804: PA_DEBUG.write_file('LOG',l_stage);
1805: PA_DEBUG.write_file('LOG','ReturnStatus['||l_return_status||']ErrMsg['||l_msg_data||']errCode['||l_err_code||']' );
1806: PA_DEBUG.reset_err_stack;
1807: End If;
1808:
1801: x_return_status := 'E';
1802: print_msg(l_debug_flag,l_stage);
1803: If l_debug_flag = 'Y' Then
1804: PA_DEBUG.write_file('LOG',l_stage);
1805: PA_DEBUG.write_file('LOG','ReturnStatus['||l_return_status||']ErrMsg['||l_msg_data||']errCode['||l_err_code||']' );
1806: PA_DEBUG.reset_err_stack;
1807: End If;
1808:
1809: WHEN l_no_rate_found THEN
1802: print_msg(l_debug_flag,l_stage);
1803: If l_debug_flag = 'Y' Then
1804: PA_DEBUG.write_file('LOG',l_stage);
1805: PA_DEBUG.write_file('LOG','ReturnStatus['||l_return_status||']ErrMsg['||l_msg_data||']errCode['||l_err_code||']' );
1806: PA_DEBUG.reset_err_stack;
1807: End If;
1808:
1809: WHEN l_no_rate_found THEN
1810: x_error_msg_code := 'PA_FP_MISSING_RATE';
1810: x_error_msg_code := 'PA_FP_MISSING_RATE';
1811: x_return_status := 'E';
1812: print_msg(l_debug_flag,l_stage);
1813: If l_debug_flag = 'Y' Then
1814: PA_DEBUG.write_file('LOG',l_stage);
1815: PA_DEBUG.write_file('LOG','ReturnStatus['||l_return_status||']ErrMsg['||l_msg_data||']errCode['||l_err_code||']' );
1816: PA_DEBUG.reset_err_stack;
1817: End If;
1818:
1811: x_return_status := 'E';
1812: print_msg(l_debug_flag,l_stage);
1813: If l_debug_flag = 'Y' Then
1814: PA_DEBUG.write_file('LOG',l_stage);
1815: PA_DEBUG.write_file('LOG','ReturnStatus['||l_return_status||']ErrMsg['||l_msg_data||']errCode['||l_err_code||']' );
1816: PA_DEBUG.reset_err_stack;
1817: End If;
1818:
1819: WHEN l_no_burdrate_found THEN
1812: print_msg(l_debug_flag,l_stage);
1813: If l_debug_flag = 'Y' Then
1814: PA_DEBUG.write_file('LOG',l_stage);
1815: PA_DEBUG.write_file('LOG','ReturnStatus['||l_return_status||']ErrMsg['||l_msg_data||']errCode['||l_err_code||']' );
1816: PA_DEBUG.reset_err_stack;
1817: End If;
1818:
1819: WHEN l_no_burdrate_found THEN
1820: x_error_msg_code := 'PA_CALC_BURDENED_COST_FAILED';
1820: x_error_msg_code := 'PA_CALC_BURDENED_COST_FAILED';
1821: x_return_status := 'E';
1822: print_msg(l_debug_flag,l_stage);
1823: If l_debug_flag = 'Y' Then
1824: PA_DEBUG.write_file('LOG',l_stage);
1825: PA_DEBUG.write_file('LOG','ReturnStatus['||l_return_status||']ErrMsg['||l_msg_data||']errCode['||l_err_code||']' );
1826: PA_DEBUG.reset_err_stack;
1827: End If;
1828:
1821: x_return_status := 'E';
1822: print_msg(l_debug_flag,l_stage);
1823: If l_debug_flag = 'Y' Then
1824: PA_DEBUG.write_file('LOG',l_stage);
1825: PA_DEBUG.write_file('LOG','ReturnStatus['||l_return_status||']ErrMsg['||l_msg_data||']errCode['||l_err_code||']' );
1826: PA_DEBUG.reset_err_stack;
1827: End If;
1828:
1829: WHEN l_invalid_override_attributes THEN
1822: print_msg(l_debug_flag,l_stage);
1823: If l_debug_flag = 'Y' Then
1824: PA_DEBUG.write_file('LOG',l_stage);
1825: PA_DEBUG.write_file('LOG','ReturnStatus['||l_return_status||']ErrMsg['||l_msg_data||']errCode['||l_err_code||']' );
1826: PA_DEBUG.reset_err_stack;
1827: End If;
1828:
1829: WHEN l_invalid_override_attributes THEN
1830: x_error_msg_code := 'PA_INVALID_OVERRIDE_PARAM';
1830: x_error_msg_code := 'PA_INVALID_OVERRIDE_PARAM';
1831: x_return_status := 'E';
1832: print_msg(l_debug_flag,l_stage);
1833: If l_debug_flag = 'Y' Then
1834: PA_DEBUG.write_file('LOG',l_stage);
1835: PA_DEBUG.write_file('LOG','ReturnStatus['||l_return_status||']ErrMsg['||l_msg_data||']errCode['||l_err_code||']' );
1836: PA_DEBUG.reset_err_stack;
1837: End If;
1838:
1831: x_return_status := 'E';
1832: print_msg(l_debug_flag,l_stage);
1833: If l_debug_flag = 'Y' Then
1834: PA_DEBUG.write_file('LOG',l_stage);
1835: PA_DEBUG.write_file('LOG','ReturnStatus['||l_return_status||']ErrMsg['||l_msg_data||']errCode['||l_err_code||']' );
1836: PA_DEBUG.reset_err_stack;
1837: End If;
1838:
1839: WHEN l_invalid_currency THEN
1832: print_msg(l_debug_flag,l_stage);
1833: If l_debug_flag = 'Y' Then
1834: PA_DEBUG.write_file('LOG',l_stage);
1835: PA_DEBUG.write_file('LOG','ReturnStatus['||l_return_status||']ErrMsg['||l_msg_data||']errCode['||l_err_code||']' );
1836: PA_DEBUG.reset_err_stack;
1837: End If;
1838:
1839: WHEN l_invalid_currency THEN
1840: x_error_msg_code := 'PA_INVALID_DENOM_CURRENCY';
1840: x_error_msg_code := 'PA_INVALID_DENOM_CURRENCY';
1841: x_return_status := 'E';
1842: print_msg(l_debug_flag,l_stage);
1843: If l_debug_flag = 'Y' Then
1844: PA_DEBUG.write_file('LOG',l_stage);
1845: PA_DEBUG.write_file('LOG','ReturnStatus['||l_return_status||']ErrMsg['||l_msg_data||']errCode['||l_err_code||']' );
1846: PA_DEBUG.reset_err_stack;
1847: End If;
1848:
1841: x_return_status := 'E';
1842: print_msg(l_debug_flag,l_stage);
1843: If l_debug_flag = 'Y' Then
1844: PA_DEBUG.write_file('LOG',l_stage);
1845: PA_DEBUG.write_file('LOG','ReturnStatus['||l_return_status||']ErrMsg['||l_msg_data||']errCode['||l_err_code||']' );
1846: PA_DEBUG.reset_err_stack;
1847: End If;
1848:
1849:
1842: print_msg(l_debug_flag,l_stage);
1843: If l_debug_flag = 'Y' Then
1844: PA_DEBUG.write_file('LOG',l_stage);
1845: PA_DEBUG.write_file('LOG','ReturnStatus['||l_return_status||']ErrMsg['||l_msg_data||']errCode['||l_err_code||']' );
1846: PA_DEBUG.reset_err_stack;
1847: End If;
1848:
1849:
1850: WHEN OTHERS THEN
1856: x_error_msg_code := substr(SQLCODE||SQLERRM,1,30);
1857: End If;
1858: print_msg(l_debug_flag,l_stage);
1859: If l_debug_flag = 'Y' Then
1860: PA_DEBUG.write_file('LOG',l_stage);
1861: PA_DEBUG.write_file('LOG','ReturnStatus['||l_return_status||']sqlcode['||sqlcode||']ErrMsg['||x_error_msg_code||']');
1862: PA_DEBUG.reset_err_stack;
1863: End If;
1864:
1857: End If;
1858: print_msg(l_debug_flag,l_stage);
1859: If l_debug_flag = 'Y' Then
1860: PA_DEBUG.write_file('LOG',l_stage);
1861: PA_DEBUG.write_file('LOG','ReturnStatus['||l_return_status||']sqlcode['||sqlcode||']ErrMsg['||x_error_msg_code||']');
1862: PA_DEBUG.reset_err_stack;
1863: End If;
1864:
1865: END Get_Plan_Actual_Cost_Rates;
1858: print_msg(l_debug_flag,l_stage);
1859: If l_debug_flag = 'Y' Then
1860: PA_DEBUG.write_file('LOG',l_stage);
1861: PA_DEBUG.write_file('LOG','ReturnStatus['||l_return_status||']sqlcode['||sqlcode||']ErrMsg['||x_error_msg_code||']');
1862: PA_DEBUG.reset_err_stack;
1863: End If;
1864:
1865: END Get_Plan_Actual_Cost_Rates;
1866:
1917:
1918: BEGIN
1919: --- Initialize the error statck
1920: If g_debug_flag is NULL Then
1921: fnd_profile.get('PA_DEBUG_MODE',g_debug_flag);
1922: g_debug_flag := NVL(g_debug_flag, 'N');
1923: End If;
1924: l_debug_flag := NVL(g_debug_flag,'N');
1925: IF l_debug_flag = 'Y' Then
1922: g_debug_flag := NVL(g_debug_flag, 'N');
1923: End If;
1924: l_debug_flag := NVL(g_debug_flag,'N');
1925: IF l_debug_flag = 'Y' Then
1926: PA_DEBUG.init_err_stack ('PA_COST1.Get_Non_Labor_raw_cost');
1927: PA_DEBUG.SET_PROCESS( x_process => 'PLSQL'
1928: ,x_write_file => 'LOG'
1929: ,x_debug_mode => l_debug_flag
1930: );
1923: End If;
1924: l_debug_flag := NVL(g_debug_flag,'N');
1925: IF l_debug_flag = 'Y' Then
1926: PA_DEBUG.init_err_stack ('PA_COST1.Get_Non_Labor_raw_cost');
1927: PA_DEBUG.SET_PROCESS( x_process => 'PLSQL'
1928: ,x_write_file => 'LOG'
1929: ,x_debug_mode => l_debug_flag
1930: );
1931: End If;
2043: x_txn_currency_code := NVL(l_cost_rate_curr_code,l_nlr_txn_curr_code);
2044:
2045: -- reset the error stack
2046: If l_debug_flag = 'Y' Then
2047: PA_DEBUG.reset_err_stack;
2048: End If;
2049:
2050: EXCEPTION
2051:
2051:
2052: WHEN OTHERS THEN
2053: print_msg(l_debug_flag,l_stage);
2054: If l_debug_flag = 'Y' Then
2055: PA_DEBUG.write_file('LOG',l_stage);
2056: PA_DEBUG.write_file('LOG','ReturnStatus['||l_return_status||']ErrMsg['||l_msg_data||']' );
2057: PA_DEBUG.reset_err_stack;
2058: End If;
2059: END Get_Non_Labor_raw_cost;
2052: WHEN OTHERS THEN
2053: print_msg(l_debug_flag,l_stage);
2054: If l_debug_flag = 'Y' Then
2055: PA_DEBUG.write_file('LOG',l_stage);
2056: PA_DEBUG.write_file('LOG','ReturnStatus['||l_return_status||']ErrMsg['||l_msg_data||']' );
2057: PA_DEBUG.reset_err_stack;
2058: End If;
2059: END Get_Non_Labor_raw_cost;
2060:
2053: print_msg(l_debug_flag,l_stage);
2054: If l_debug_flag = 'Y' Then
2055: PA_DEBUG.write_file('LOG',l_stage);
2056: PA_DEBUG.write_file('LOG','ReturnStatus['||l_return_status||']ErrMsg['||l_msg_data||']' );
2057: PA_DEBUG.reset_err_stack;
2058: End If;
2059: END Get_Non_Labor_raw_cost;
2060:
2061: /* This is a wrapper api to derive compiled set id and burden multiplier
2126: BEGIN
2127:
2128: --- Initialize the error statck
2129: If g_debug_flag is NULL Then
2130: fnd_profile.get('PA_DEBUG_MODE',g_debug_flag);
2131: g_debug_flag := NVL(g_debug_flag, 'N');
2132: End If;
2133: l_debug_flag := NVL(g_debug_flag,'N');
2134: IF l_debug_flag = 'Y' Then
2131: g_debug_flag := NVL(g_debug_flag, 'N');
2132: End If;
2133: l_debug_flag := NVL(g_debug_flag,'N');
2134: IF l_debug_flag = 'Y' Then
2135: PA_DEBUG.init_err_stack ('PA_COST1.Get_burden_sch_details');
2136: PA_DEBUG.SET_PROCESS( x_process => 'PLSQL'
2137: ,x_write_file => 'LOG'
2138: ,x_debug_mode => l_debug_flag
2139: );
2132: End If;
2133: l_debug_flag := NVL(g_debug_flag,'N');
2134: IF l_debug_flag = 'Y' Then
2135: PA_DEBUG.init_err_stack ('PA_COST1.Get_burden_sch_details');
2136: PA_DEBUG.SET_PROCESS( x_process => 'PLSQL'
2137: ,x_write_file => 'LOG'
2138: ,x_debug_mode => l_debug_flag
2139: );
2140: End If;
2338: print_msg(l_debug_flag,l_stage);
2339:
2340: --reset error stack
2341: If l_debug_flag = 'Y' Then
2342: PA_DEBUG.reset_err_stack;
2343: End If;
2344:
2345: EXCEPTION
2346: WHEN l_invalid_schedule Then
2346: WHEN l_invalid_schedule Then
2347: x_return_status := 'E';
2348: x_error_msg_code := 'PA_FCST_INVL_BURDEN_SCH_REV_ID';
2349: If l_debug_flag = 'Y' Then
2350: PA_DEBUG.write_file('ReturnSts['||l_return_status ||']ErrCode['||l_error_msg_code||']' );
2351: PA_DEBUG.write_file('LOG',l_stage);
2352: PA_DEBUG.reset_err_stack;
2353: End If;
2354:
2347: x_return_status := 'E';
2348: x_error_msg_code := 'PA_FCST_INVL_BURDEN_SCH_REV_ID';
2349: If l_debug_flag = 'Y' Then
2350: PA_DEBUG.write_file('ReturnSts['||l_return_status ||']ErrCode['||l_error_msg_code||']' );
2351: PA_DEBUG.write_file('LOG',l_stage);
2352: PA_DEBUG.reset_err_stack;
2353: End If;
2354:
2355: WHEN l_no_cost_base Then
2348: x_error_msg_code := 'PA_FCST_INVL_BURDEN_SCH_REV_ID';
2349: If l_debug_flag = 'Y' Then
2350: PA_DEBUG.write_file('ReturnSts['||l_return_status ||']ErrCode['||l_error_msg_code||']' );
2351: PA_DEBUG.write_file('LOG',l_stage);
2352: PA_DEBUG.reset_err_stack;
2353: End If;
2354:
2355: WHEN l_no_cost_base Then
2356: If l_status = 100 Then
2365: x_error_msg_code := 'PA_FCST_NO_COST_BASE';
2366:
2367: End If;
2368: If l_debug_flag = 'Y' Then
2369: PA_DEBUG.write_file('ReturnSts['||l_return_status ||']ErrCode['||l_error_msg_code||']' );
2370: PA_DEBUG.write_file('LOG',l_stage);
2371: PA_DEBUG.reset_err_stack;
2372: End If;
2373:
2366:
2367: End If;
2368: If l_debug_flag = 'Y' Then
2369: PA_DEBUG.write_file('ReturnSts['||l_return_status ||']ErrCode['||l_error_msg_code||']' );
2370: PA_DEBUG.write_file('LOG',l_stage);
2371: PA_DEBUG.reset_err_stack;
2372: End If;
2373:
2374: WHEN l_no_compiled_set Then
2367: End If;
2368: If l_debug_flag = 'Y' Then
2369: PA_DEBUG.write_file('ReturnSts['||l_return_status ||']ErrCode['||l_error_msg_code||']' );
2370: PA_DEBUG.write_file('LOG',l_stage);
2371: PA_DEBUG.reset_err_stack;
2372: End If;
2373:
2374: WHEN l_no_compiled_set Then
2375: If p_exp_organization_id is NULL Then
2382: x_return_status := 'E';
2383: x_error_msg_code := 'PA_NO_COMPILED_SET_ID';
2384: End If;
2385: If l_debug_flag = 'Y' Then
2386: PA_DEBUG.write_file('ReturnSts['||l_return_status ||']ErrCode['||l_error_msg_code||']' );
2387: PA_DEBUG.write_file('LOG',l_stage);
2388: PA_DEBUG.reset_err_stack;
2389: End If;
2390:
2383: x_error_msg_code := 'PA_NO_COMPILED_SET_ID';
2384: End If;
2385: If l_debug_flag = 'Y' Then
2386: PA_DEBUG.write_file('ReturnSts['||l_return_status ||']ErrCode['||l_error_msg_code||']' );
2387: PA_DEBUG.write_file('LOG',l_stage);
2388: PA_DEBUG.reset_err_stack;
2389: End If;
2390:
2391:
2384: End If;
2385: If l_debug_flag = 'Y' Then
2386: PA_DEBUG.write_file('ReturnSts['||l_return_status ||']ErrCode['||l_error_msg_code||']' );
2387: PA_DEBUG.write_file('LOG',l_stage);
2388: PA_DEBUG.reset_err_stack;
2389: End If;
2390:
2391:
2392: WHEN l_no_multiplier Then
2392: WHEN l_no_multiplier Then
2393: x_return_status := 'E';
2394: x_error_msg_code := 'PA_FCST_NO_COMPILED_MULTI';
2395: If l_debug_flag = 'Y' Then
2396: PA_DEBUG.write_file('ReturnSts['||l_return_status ||']ErrCode['||l_error_msg_code||']' );
2397: PA_DEBUG.write_file('LOG',l_stage);
2398: PA_DEBUG.reset_err_stack;
2399: End If;
2400:
2393: x_return_status := 'E';
2394: x_error_msg_code := 'PA_FCST_NO_COMPILED_MULTI';
2395: If l_debug_flag = 'Y' Then
2396: PA_DEBUG.write_file('ReturnSts['||l_return_status ||']ErrCode['||l_error_msg_code||']' );
2397: PA_DEBUG.write_file('LOG',l_stage);
2398: PA_DEBUG.reset_err_stack;
2399: End If;
2400:
2401: WHEN l_invalid_error Then
2394: x_error_msg_code := 'PA_FCST_NO_COMPILED_MULTI';
2395: If l_debug_flag = 'Y' Then
2396: PA_DEBUG.write_file('ReturnSts['||l_return_status ||']ErrCode['||l_error_msg_code||']' );
2397: PA_DEBUG.write_file('LOG',l_stage);
2398: PA_DEBUG.reset_err_stack;
2399: End If;
2400:
2401: WHEN l_invalid_error Then
2402: x_return_status := 'E';
2401: WHEN l_invalid_error Then
2402: x_return_status := 'E';
2403: x_error_msg_code := 'PA_CALC_BURDENED_COST_FAILED';
2404: If l_debug_flag = 'Y' Then
2405: PA_DEBUG.write_file('ReturnSts['||l_return_status ||']ErrCode['||l_error_msg_code||']' );
2406: PA_DEBUG.write_file('LOG',l_stage);
2407: PA_DEBUG.reset_err_stack;
2408: End If;
2409:
2402: x_return_status := 'E';
2403: x_error_msg_code := 'PA_CALC_BURDENED_COST_FAILED';
2404: If l_debug_flag = 'Y' Then
2405: PA_DEBUG.write_file('ReturnSts['||l_return_status ||']ErrCode['||l_error_msg_code||']' );
2406: PA_DEBUG.write_file('LOG',l_stage);
2407: PA_DEBUG.reset_err_stack;
2408: End If;
2409:
2410: WHEN OTHERS THEN
2403: x_error_msg_code := 'PA_CALC_BURDENED_COST_FAILED';
2404: If l_debug_flag = 'Y' Then
2405: PA_DEBUG.write_file('ReturnSts['||l_return_status ||']ErrCode['||l_error_msg_code||']' );
2406: PA_DEBUG.write_file('LOG',l_stage);
2407: PA_DEBUG.reset_err_stack;
2408: End If;
2409:
2410: WHEN OTHERS THEN
2411: IF to_char(sqlcode) in ('00100','01403','100','1403') Then
2415: x_return_status := 'U';
2416: x_error_msg_code := substr(SQLCODE||SQLERRM,1,30);
2417: End If;
2418: If l_debug_flag = 'Y' Then
2419: PA_DEBUG.write_file('ReturnSts['||l_return_status ||']ErrCode['||l_error_msg_code||']' );
2420: PA_DEBUG.write_file('LOG',l_stage);
2421: PA_DEBUG.reset_err_stack;
2422: End If;
2423:
2416: x_error_msg_code := substr(SQLCODE||SQLERRM,1,30);
2417: End If;
2418: If l_debug_flag = 'Y' Then
2419: PA_DEBUG.write_file('ReturnSts['||l_return_status ||']ErrCode['||l_error_msg_code||']' );
2420: PA_DEBUG.write_file('LOG',l_stage);
2421: PA_DEBUG.reset_err_stack;
2422: End If;
2423:
2424:
2417: End If;
2418: If l_debug_flag = 'Y' Then
2419: PA_DEBUG.write_file('ReturnSts['||l_return_status ||']ErrCode['||l_error_msg_code||']' );
2420: PA_DEBUG.write_file('LOG',l_stage);
2421: PA_DEBUG.reset_err_stack;
2422: End If;
2423:
2424:
2425: END Get_burden_sch_details;
2702:
2703: BEGIN
2704: --- Initialize the error statck
2705: If g_debug_flag is NULL Then
2706: fnd_profile.get('PA_DEBUG_MODE',g_debug_flag);
2707: g_debug_flag := NVL(g_debug_flag, 'N');
2708: End If;
2709: l_debug_flag := NVL(g_debug_flag,'N');
2710: If l_debug_flag = 'Y' Then
2707: g_debug_flag := NVL(g_debug_flag, 'N');
2708: End If;
2709: l_debug_flag := NVL(g_debug_flag,'N');
2710: If l_debug_flag = 'Y' Then
2711: PA_DEBUG.init_err_stack ('PA_COST1.Convert_COST_TO_PC_PFC');
2712: PA_DEBUG.SET_PROCESS( x_process => 'PLSQL'
2713: ,x_write_file => 'LOG'
2714: ,x_debug_mode => l_debug_flag
2715: );
2708: End If;
2709: l_debug_flag := NVL(g_debug_flag,'N');
2710: If l_debug_flag = 'Y' Then
2711: PA_DEBUG.init_err_stack ('PA_COST1.Convert_COST_TO_PC_PFC');
2712: PA_DEBUG.SET_PROCESS( x_process => 'PLSQL'
2713: ,x_write_file => 'LOG'
2714: ,x_debug_mode => l_debug_flag
2715: );
2716: End If;
2853:
2854:
2855: -- Reset Err Stack
2856: If l_debug_flag = 'Y' Then
2857: PA_DEBUG.reset_err_stack;
2858: End If;
2859: EXCEPTION
2860: WHEN l_insufficient_parms THEN
2861: x_error_msg_code := 'PA_NO_BUDGET_VERSION';
2861: x_error_msg_code := 'PA_NO_BUDGET_VERSION';
2862: x_return_status := 'E';
2863: print_msg(l_debug_flag,l_stage);
2864: If l_debug_flag = 'Y' Then
2865: PA_DEBUG.write_file('LOG',l_stage);
2866: PA_DEBUG.write_file('LOG','ReturnStatus['||l_return_status||']errCode['||l_error_msg_code||']' );
2867: PA_DEBUG.reset_err_stack;
2868: End If;
2869:
2862: x_return_status := 'E';
2863: print_msg(l_debug_flag,l_stage);
2864: If l_debug_flag = 'Y' Then
2865: PA_DEBUG.write_file('LOG',l_stage);
2866: PA_DEBUG.write_file('LOG','ReturnStatus['||l_return_status||']errCode['||l_error_msg_code||']' );
2867: PA_DEBUG.reset_err_stack;
2868: End If;
2869:
2870: WHEN l_no_budget_version THEN
2863: print_msg(l_debug_flag,l_stage);
2864: If l_debug_flag = 'Y' Then
2865: PA_DEBUG.write_file('LOG',l_stage);
2866: PA_DEBUG.write_file('LOG','ReturnStatus['||l_return_status||']errCode['||l_error_msg_code||']' );
2867: PA_DEBUG.reset_err_stack;
2868: End If;
2869:
2870: WHEN l_no_budget_version THEN
2871: x_error_msg_code := 'PA_INV_PARAM_PASSED';
2871: x_error_msg_code := 'PA_INV_PARAM_PASSED';
2872: x_return_status := 'E';
2873: print_msg(l_debug_flag,l_stage);
2874: If l_debug_flag = 'Y' Then
2875: PA_DEBUG.write_file('LOG',l_stage);
2876: PA_DEBUG.write_file('LOG','ReturnStatus['||l_return_status||']errCode['||l_error_msg_code||']' );
2877: PA_DEBUG.reset_err_stack;
2878: End If;
2879:
2872: x_return_status := 'E';
2873: print_msg(l_debug_flag,l_stage);
2874: If l_debug_flag = 'Y' Then
2875: PA_DEBUG.write_file('LOG',l_stage);
2876: PA_DEBUG.write_file('LOG','ReturnStatus['||l_return_status||']errCode['||l_error_msg_code||']' );
2877: PA_DEBUG.reset_err_stack;
2878: End If;
2879:
2880: WHEN OTHERS THEN
2873: print_msg(l_debug_flag,l_stage);
2874: If l_debug_flag = 'Y' Then
2875: PA_DEBUG.write_file('LOG',l_stage);
2876: PA_DEBUG.write_file('LOG','ReturnStatus['||l_return_status||']errCode['||l_error_msg_code||']' );
2877: PA_DEBUG.reset_err_stack;
2878: End If;
2879:
2880: WHEN OTHERS THEN
2881: x_return_status := 'U';
2881: x_return_status := 'U';
2882: x_error_msg_code := SQLERRM||SQLCODE;
2883: print_msg(l_debug_flag,l_stage||x_error_msg_code);
2884: If l_debug_flag = 'Y' Then
2885: PA_DEBUG.write_file('LOG','ReturnSts['||l_return_status ||']ErrCode['||l_error_msg_code||']' );
2886: PA_DEBUG.write_file('LOG',l_stage);
2887: PA_DEBUG.reset_err_stack;
2888: End If;
2889:
2882: x_error_msg_code := SQLERRM||SQLCODE;
2883: print_msg(l_debug_flag,l_stage||x_error_msg_code);
2884: If l_debug_flag = 'Y' Then
2885: PA_DEBUG.write_file('LOG','ReturnSts['||l_return_status ||']ErrCode['||l_error_msg_code||']' );
2886: PA_DEBUG.write_file('LOG',l_stage);
2887: PA_DEBUG.reset_err_stack;
2888: End If;
2889:
2890: END Convert_COST_TO_PC_PFC;
2883: print_msg(l_debug_flag,l_stage||x_error_msg_code);
2884: If l_debug_flag = 'Y' Then
2885: PA_DEBUG.write_file('LOG','ReturnSts['||l_return_status ||']ErrCode['||l_error_msg_code||']' );
2886: PA_DEBUG.write_file('LOG',l_stage);
2887: PA_DEBUG.reset_err_stack;
2888: End If;
2889:
2890: END Convert_COST_TO_PC_PFC;
2891: