10: g_fp_project_cost_exchng_rt Number;
11: g_fp_project_rev_exchng_rt Number;
12: g_module_name VARCHAR2(100) := 'pa.plsql.PA_FP_MULTI_CURRENCY_PKG';
13:
14: P_PA_DEBUG_MODE varchar2(1) := NVL(FND_PROFILE.value('PA_DEBUG_MODE'), 'N');
15:
16: /* Perf Bug: 3683132 */
17: /*====================================================================+
18: | Bug 4094376: Refreshed global variables g_cache_fp_plan_version_id |
202: BEGIN
203:
204: x_return_status := FND_API.G_RET_STS_SUCCESS;
205:
206: fnd_profile.get('PA_DEBUG_MODE',l_debug_mode);
207: --l_debug_mode := NVL(l_debug_mode,'Y');
208: IF P_PA_DEBUG_MODE = 'Y' THEN
209: pa_debug.init_err_stack('PA_FP_MULTI_CURRENCY_PKG.conv_mc_bulk');
210: pa_debug.set_process('PLSQL','LOG',l_debug_mode);
204: x_return_status := FND_API.G_RET_STS_SUCCESS;
205:
206: fnd_profile.get('PA_DEBUG_MODE',l_debug_mode);
207: --l_debug_mode := NVL(l_debug_mode,'Y');
208: IF P_PA_DEBUG_MODE = 'Y' THEN
209: pa_debug.init_err_stack('PA_FP_MULTI_CURRENCY_PKG.conv_mc_bulk');
210: pa_debug.set_process('PLSQL','LOG',l_debug_mode);
211: END IF;
212:
205:
206: fnd_profile.get('PA_DEBUG_MODE',l_debug_mode);
207: --l_debug_mode := NVL(l_debug_mode,'Y');
208: IF P_PA_DEBUG_MODE = 'Y' THEN
209: pa_debug.init_err_stack('PA_FP_MULTI_CURRENCY_PKG.conv_mc_bulk');
210: pa_debug.set_process('PLSQL','LOG',l_debug_mode);
211: END IF;
212:
213: pa_debug.g_err_stage := 'Entered PA_FP_MULTI_CURRENCY_PKG.conv_mc_bulk';
206: fnd_profile.get('PA_DEBUG_MODE',l_debug_mode);
207: --l_debug_mode := NVL(l_debug_mode,'Y');
208: IF P_PA_DEBUG_MODE = 'Y' THEN
209: pa_debug.init_err_stack('PA_FP_MULTI_CURRENCY_PKG.conv_mc_bulk');
210: pa_debug.set_process('PLSQL','LOG',l_debug_mode);
211: END IF;
212:
213: pa_debug.g_err_stage := 'Entered PA_FP_MULTI_CURRENCY_PKG.conv_mc_bulk';
214: IF P_PA_DEBUG_MODE = 'Y' THEN
209: pa_debug.init_err_stack('PA_FP_MULTI_CURRENCY_PKG.conv_mc_bulk');
210: pa_debug.set_process('PLSQL','LOG',l_debug_mode);
211: END IF;
212:
213: pa_debug.g_err_stage := 'Entered PA_FP_MULTI_CURRENCY_PKG.conv_mc_bulk';
214: IF P_PA_DEBUG_MODE = 'Y' THEN
215: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
216: END IF;
217:
210: pa_debug.set_process('PLSQL','LOG',l_debug_mode);
211: END IF;
212:
213: pa_debug.g_err_stage := 'Entered PA_FP_MULTI_CURRENCY_PKG.conv_mc_bulk';
214: IF P_PA_DEBUG_MODE = 'Y' THEN
215: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
216: END IF;
217:
218: l_tab_count := p_txn_currency_code_tab.COUNT;
211: END IF;
212:
213: pa_debug.g_err_stage := 'Entered PA_FP_MULTI_CURRENCY_PKG.conv_mc_bulk';
214: IF P_PA_DEBUG_MODE = 'Y' THEN
215: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
216: END IF;
217:
218: l_tab_count := p_txn_currency_code_tab.COUNT;
219: l_cached_count := CachedRowTab.COUNT;
221: l_stage := 100;
222: --hr_utility.trace(to_char(l_stage));
223:
224: IF l_tab_count = 0 THEN
225: pa_debug.g_err_stage := to_char(l_stage)||': No records selected -- Returning';
226: IF P_PA_DEBUG_MODE = 'Y' THEN
227: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
228: END IF;
229: RETURN;
222: --hr_utility.trace(to_char(l_stage));
223:
224: IF l_tab_count = 0 THEN
225: pa_debug.g_err_stage := to_char(l_stage)||': No records selected -- Returning';
226: IF P_PA_DEBUG_MODE = 'Y' THEN
227: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
228: END IF;
229: RETURN;
230: END IF;
223:
224: IF l_tab_count = 0 THEN
225: pa_debug.g_err_stage := to_char(l_stage)||': No records selected -- Returning';
226: IF P_PA_DEBUG_MODE = 'Y' THEN
227: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
228: END IF;
229: RETURN;
230: END IF;
231:
228: END IF;
229: RETURN;
230: END IF;
231:
232: pa_debug.g_err_stage := to_char(l_stage)||': Records selected '||to_char(l_tab_count);
233: IF P_PA_DEBUG_MODE = 'Y' THEN
234: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
235: END IF;
236:
229: RETURN;
230: END IF;
231:
232: pa_debug.g_err_stage := to_char(l_stage)||': Records selected '||to_char(l_tab_count);
233: IF P_PA_DEBUG_MODE = 'Y' THEN
234: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
235: END IF;
236:
237:
230: END IF;
231:
232: pa_debug.g_err_stage := to_char(l_stage)||': Records selected '||to_char(l_tab_count);
233: IF P_PA_DEBUG_MODE = 'Y' THEN
234: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
235: END IF;
236:
237:
238: FOR i in p_txn_currency_code_tab.first..p_txn_currency_code_tab.last LOOP
300: -- Convert TxnCost to ProjectFunctional Cost
301: IF NVL(p_txn_raw_cost_tab(i),0) <> 0 OR NVL(p_txn_burdened_cost_tab(i),0) <> 0 THEN
302: l_stage := 500;
303: --hr_utility.trace(to_char(l_stage));
304: pa_debug.g_err_stage := to_char(l_stage);
305: IF P_PA_DEBUG_MODE = 'Y' THEN
306: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
307: END IF;
308:
301: IF NVL(p_txn_raw_cost_tab(i),0) <> 0 OR NVL(p_txn_burdened_cost_tab(i),0) <> 0 THEN
302: l_stage := 500;
303: --hr_utility.trace(to_char(l_stage));
304: pa_debug.g_err_stage := to_char(l_stage);
305: IF P_PA_DEBUG_MODE = 'Y' THEN
306: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
307: END IF;
308:
309: IF p_projfunc_cost_rate_type_tab(i) = 'User' THEN
302: l_stage := 500;
303: --hr_utility.trace(to_char(l_stage));
304: pa_debug.g_err_stage := to_char(l_stage);
305: IF P_PA_DEBUG_MODE = 'Y' THEN
306: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
307: END IF;
308:
309: IF p_projfunc_cost_rate_type_tab(i) = 'User' THEN
310: l_stage := 600;
326: x_projfunc_burdened_cost_tab(i) := pa_currency.round_trans_currency_amt1(x_projfunc_burdened_cost_tab(i),p_projfunc_currency_code_tab(i));
327: ELSE
328: l_stage := 800;
329: --hr_utility.trace(to_char(l_stage));
330: pa_debug.g_err_stage := to_char(l_stage)||': ProjFunc Cost Rate Not Defined';
331: IF P_PA_DEBUG_MODE = 'Y' THEN
332: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
333: END IF;
334: /*
327: ELSE
328: l_stage := 800;
329: --hr_utility.trace(to_char(l_stage));
330: pa_debug.g_err_stage := to_char(l_stage)||': ProjFunc Cost Rate Not Defined';
331: IF P_PA_DEBUG_MODE = 'Y' THEN
332: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
333: END IF;
334: /*
335: pa_utils.add_message
328: l_stage := 800;
329: --hr_utility.trace(to_char(l_stage));
330: pa_debug.g_err_stage := to_char(l_stage)||': ProjFunc Cost Rate Not Defined';
331: IF P_PA_DEBUG_MODE = 'Y' THEN
332: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
333: END IF;
334: /*
335: pa_utils.add_message
336: ( p_app_short_name => 'PA',
352: END IF;
353: ELSE
354: l_stage := 810;
355: --hr_utility.trace(to_char(l_stage));
356: pa_debug.g_err_stage := to_char(l_stage)||': Cost Rate type of User not allowed in ProjFunc Currency';
357: IF P_PA_DEBUG_MODE = 'Y' THEN
358: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
359: END IF;
360: /*
353: ELSE
354: l_stage := 810;
355: --hr_utility.trace(to_char(l_stage));
356: pa_debug.g_err_stage := to_char(l_stage)||': Cost Rate type of User not allowed in ProjFunc Currency';
357: IF P_PA_DEBUG_MODE = 'Y' THEN
358: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
359: END IF;
360: /*
361: pa_utils.add_message
354: l_stage := 810;
355: --hr_utility.trace(to_char(l_stage));
356: pa_debug.g_err_stage := to_char(l_stage)||': Cost Rate type of User not allowed in ProjFunc Currency';
357: IF P_PA_DEBUG_MODE = 'Y' THEN
358: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
359: END IF;
360: /*
361: pa_utils.add_message
362: ( p_app_short_name => 'PA',
380: END IF;
381: ELSE
382: l_stage := 900;
383: --hr_utility.trace(to_char(l_stage));
384: pa_debug.g_err_stage := to_char(l_stage);
385: IF P_PA_DEBUG_MODE = 'Y' THEN
386: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
387: END IF;
388:
381: ELSE
382: l_stage := 900;
383: --hr_utility.trace(to_char(l_stage));
384: pa_debug.g_err_stage := to_char(l_stage);
385: IF P_PA_DEBUG_MODE = 'Y' THEN
386: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
387: END IF;
388:
389: l_done_flag := 'N';
382: l_stage := 900;
383: --hr_utility.trace(to_char(l_stage));
384: pa_debug.g_err_stage := to_char(l_stage);
385: IF P_PA_DEBUG_MODE = 'Y' THEN
386: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
387: END IF;
388:
389: l_done_flag := 'N';
390: IF nvl(CachedRowTab.COUNT,0) <> 0 THEN
418: END IF; -- CachedRowTab.COUNT > 0
419: IF l_done_flag = 'N' THEN
420: l_stage := 1200;
421: --hr_utility.trace(to_char(l_stage));
422: pa_debug.g_err_stage := to_char(l_stage);
423: IF P_PA_DEBUG_MODE = 'Y' THEN
424: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
425: END IF;
426:
419: IF l_done_flag = 'N' THEN
420: l_stage := 1200;
421: --hr_utility.trace(to_char(l_stage));
422: pa_debug.g_err_stage := to_char(l_stage);
423: IF P_PA_DEBUG_MODE = 'Y' THEN
424: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
425: END IF;
426:
427: IF nvl(p_txn_raw_cost_tab(i),0) <> 0 THEN
420: l_stage := 1200;
421: --hr_utility.trace(to_char(l_stage));
422: pa_debug.g_err_stage := to_char(l_stage);
423: IF P_PA_DEBUG_MODE = 'Y' THEN
424: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
425: END IF;
426:
427: IF nvl(p_txn_raw_cost_tab(i),0) <> 0 THEN
428: l_stage := 1300;
426:
427: IF nvl(p_txn_raw_cost_tab(i),0) <> 0 THEN
428: l_stage := 1300;
429: --hr_utility.trace(to_char(l_stage));
430: pa_debug.g_err_stage := 'pfc cost rate date' || p_projfunc_cost_rate_date_tab(i);
431: IF P_PA_DEBUG_MODE = 'Y' THEN
432: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
433: END IF;
434:
427: IF nvl(p_txn_raw_cost_tab(i),0) <> 0 THEN
428: l_stage := 1300;
429: --hr_utility.trace(to_char(l_stage));
430: pa_debug.g_err_stage := 'pfc cost rate date' || p_projfunc_cost_rate_date_tab(i);
431: IF P_PA_DEBUG_MODE = 'Y' THEN
432: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
433: END IF;
434:
435: pa_debug.g_err_stage := 'pfc cost rate type' || p_projfunc_cost_rate_type_tab(i);
428: l_stage := 1300;
429: --hr_utility.trace(to_char(l_stage));
430: pa_debug.g_err_stage := 'pfc cost rate date' || p_projfunc_cost_rate_date_tab(i);
431: IF P_PA_DEBUG_MODE = 'Y' THEN
432: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
433: END IF;
434:
435: pa_debug.g_err_stage := 'pfc cost rate type' || p_projfunc_cost_rate_type_tab(i);
436: IF P_PA_DEBUG_MODE = 'Y' THEN
431: IF P_PA_DEBUG_MODE = 'Y' THEN
432: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
433: END IF;
434:
435: pa_debug.g_err_stage := 'pfc cost rate type' || p_projfunc_cost_rate_type_tab(i);
436: IF P_PA_DEBUG_MODE = 'Y' THEN
437: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
438: END IF;
439: l_converted_amount := gl_currency_api.convert_amount_sql
432: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
433: END IF;
434:
435: pa_debug.g_err_stage := 'pfc cost rate type' || p_projfunc_cost_rate_type_tab(i);
436: IF P_PA_DEBUG_MODE = 'Y' THEN
437: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
438: END IF;
439: l_converted_amount := gl_currency_api.convert_amount_sql
440: ( X_FROM_CURRENCY => p_txn_currency_code_tab(i)
433: END IF;
434:
435: pa_debug.g_err_stage := 'pfc cost rate type' || p_projfunc_cost_rate_type_tab(i);
436: IF P_PA_DEBUG_MODE = 'Y' THEN
437: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
438: END IF;
439: l_converted_amount := gl_currency_api.convert_amount_sql
440: ( X_FROM_CURRENCY => p_txn_currency_code_tab(i)
441: ,X_TO_CURRENCY => p_projfunc_currency_code_tab(i)
458: IF l_converted_amount = -1 THEN
459:
460: l_stage := 1400;
461: --hr_utility.trace(to_char(l_stage));
462: pa_debug.g_err_stage := to_char(l_stage)||': No Exchange Rate exists for the given ProjFunc currency attributes. Please change the Currency attributes';
463: IF P_PA_DEBUG_MODE = 'Y' THEN
464: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
465: END IF;
466: /*
459:
460: l_stage := 1400;
461: --hr_utility.trace(to_char(l_stage));
462: pa_debug.g_err_stage := to_char(l_stage)||': No Exchange Rate exists for the given ProjFunc currency attributes. Please change the Currency attributes';
463: IF P_PA_DEBUG_MODE = 'Y' THEN
464: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
465: END IF;
466: /*
467: pa_utils.add_message
460: l_stage := 1400;
461: --hr_utility.trace(to_char(l_stage));
462: pa_debug.g_err_stage := to_char(l_stage)||': No Exchange Rate exists for the given ProjFunc currency attributes. Please change the Currency attributes';
463: IF P_PA_DEBUG_MODE = 'Y' THEN
464: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
465: END IF;
466: /*
467: pa_utils.add_message
468: ( p_app_short_name => 'PA',
486: END IF;
487: ELSIF l_converted_amount = -2 THEN
488: l_stage := 1500;
489: --hr_utility.trace(to_char(l_stage));
490: pa_debug.g_err_stage := to_char(l_stage)||'The Currency you have entered is not valid. Please re-enter the Currency';
491: IF P_PA_DEBUG_MODE = 'Y' THEN
492: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
493: END IF;
494: /*
487: ELSIF l_converted_amount = -2 THEN
488: l_stage := 1500;
489: --hr_utility.trace(to_char(l_stage));
490: pa_debug.g_err_stage := to_char(l_stage)||'The Currency you have entered is not valid. Please re-enter the Currency';
491: IF P_PA_DEBUG_MODE = 'Y' THEN
492: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
493: END IF;
494: /*
495: pa_utils.add_message
488: l_stage := 1500;
489: --hr_utility.trace(to_char(l_stage));
490: pa_debug.g_err_stage := to_char(l_stage)||'The Currency you have entered is not valid. Please re-enter the Currency';
491: IF P_PA_DEBUG_MODE = 'Y' THEN
492: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
493: END IF;
494: /*
495: pa_utils.add_message
496: ( p_app_short_name => 'PA',
514: --Commented for Bug#5395732 ELSE
515: END IF; -- Added for Bug#5395732
516:
517: l_stage := 1700;
518: pa_debug.g_err_stage := to_char(l_stage);
519: IF P_PA_DEBUG_MODE = 'Y' THEN
520: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
521: END IF;
522: IF l_converted_amount <> -1 AND l_converted_amount <> -2 THEN -- Added for Bug#5395732
515: END IF; -- Added for Bug#5395732
516:
517: l_stage := 1700;
518: pa_debug.g_err_stage := to_char(l_stage);
519: IF P_PA_DEBUG_MODE = 'Y' THEN
520: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
521: END IF;
522: IF l_converted_amount <> -1 AND l_converted_amount <> -2 THEN -- Added for Bug#5395732
523: --hr_utility.trace(to_char(l_stage));
516:
517: l_stage := 1700;
518: pa_debug.g_err_stage := to_char(l_stage);
519: IF P_PA_DEBUG_MODE = 'Y' THEN
520: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
521: END IF;
522: IF l_converted_amount <> -1 AND l_converted_amount <> -2 THEN -- Added for Bug#5395732
523: --hr_utility.trace(to_char(l_stage));
524: IF l_call_closest_flag = 'T' THEN -- Added for Bug#5395732
592:
593: ELSE -- Raw Cost IS NULL or 0
594: l_stage := 2200;
595: --hr_utility.trace(to_char(l_stage));
596: pa_debug.g_err_stage := to_char(l_stage);
597: IF P_PA_DEBUG_MODE = 'Y' THEN
598: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
599: END IF;
600:
593: ELSE -- Raw Cost IS NULL or 0
594: l_stage := 2200;
595: --hr_utility.trace(to_char(l_stage));
596: pa_debug.g_err_stage := to_char(l_stage);
597: IF P_PA_DEBUG_MODE = 'Y' THEN
598: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
599: END IF;
600:
601: pa_debug.g_err_stage := 'pfc cost rate date' || p_projfunc_cost_rate_date_tab(i);
594: l_stage := 2200;
595: --hr_utility.trace(to_char(l_stage));
596: pa_debug.g_err_stage := to_char(l_stage);
597: IF P_PA_DEBUG_MODE = 'Y' THEN
598: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
599: END IF;
600:
601: pa_debug.g_err_stage := 'pfc cost rate date' || p_projfunc_cost_rate_date_tab(i);
602: IF P_PA_DEBUG_MODE = 'Y' THEN
597: IF P_PA_DEBUG_MODE = 'Y' THEN
598: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
599: END IF;
600:
601: pa_debug.g_err_stage := 'pfc cost rate date' || p_projfunc_cost_rate_date_tab(i);
602: IF P_PA_DEBUG_MODE = 'Y' THEN
603: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
604: END IF;
605:
598: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
599: END IF;
600:
601: pa_debug.g_err_stage := 'pfc cost rate date' || p_projfunc_cost_rate_date_tab(i);
602: IF P_PA_DEBUG_MODE = 'Y' THEN
603: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
604: END IF;
605:
606: pa_debug.g_err_stage := 'pfc cost rate type' || p_projfunc_cost_rate_type_tab(i);
599: END IF;
600:
601: pa_debug.g_err_stage := 'pfc cost rate date' || p_projfunc_cost_rate_date_tab(i);
602: IF P_PA_DEBUG_MODE = 'Y' THEN
603: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
604: END IF;
605:
606: pa_debug.g_err_stage := 'pfc cost rate type' || p_projfunc_cost_rate_type_tab(i);
607: IF P_PA_DEBUG_MODE = 'Y' THEN
602: IF P_PA_DEBUG_MODE = 'Y' THEN
603: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
604: END IF;
605:
606: pa_debug.g_err_stage := 'pfc cost rate type' || p_projfunc_cost_rate_type_tab(i);
607: IF P_PA_DEBUG_MODE = 'Y' THEN
608: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
609: END IF;
610:
603: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
604: END IF;
605:
606: pa_debug.g_err_stage := 'pfc cost rate type' || p_projfunc_cost_rate_type_tab(i);
607: IF P_PA_DEBUG_MODE = 'Y' THEN
608: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
609: END IF;
610:
611: l_converted_amount := gl_currency_api.convert_amount_sql
604: END IF;
605:
606: pa_debug.g_err_stage := 'pfc cost rate type' || p_projfunc_cost_rate_type_tab(i);
607: IF P_PA_DEBUG_MODE = 'Y' THEN
608: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
609: END IF;
610:
611: l_converted_amount := gl_currency_api.convert_amount_sql
612: ( X_FROM_CURRENCY => p_txn_currency_code_tab(i)
629: END IF;
630: IF l_converted_amount = -1 THEN
631: l_stage := 2300;
632: --hr_utility.trace(to_char(l_stage));
633: pa_debug.g_err_stage := to_char(l_stage)||': No Exchange Rate exists for the given ProjFunc currency attributes. Please change the Currency attributes';
634: IF P_PA_DEBUG_MODE = 'Y' THEN
635: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
636: END IF;
637: /*
630: IF l_converted_amount = -1 THEN
631: l_stage := 2300;
632: --hr_utility.trace(to_char(l_stage));
633: pa_debug.g_err_stage := to_char(l_stage)||': No Exchange Rate exists for the given ProjFunc currency attributes. Please change the Currency attributes';
634: IF P_PA_DEBUG_MODE = 'Y' THEN
635: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
636: END IF;
637: /*
638: pa_utils.add_message
631: l_stage := 2300;
632: --hr_utility.trace(to_char(l_stage));
633: pa_debug.g_err_stage := to_char(l_stage)||': No Exchange Rate exists for the given ProjFunc currency attributes. Please change the Currency attributes';
634: IF P_PA_DEBUG_MODE = 'Y' THEN
635: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
636: END IF;
637: /*
638: pa_utils.add_message
639: ( p_app_short_name => 'PA',
658:
659: ELSIF l_converted_amount = -2 THEN
660: l_stage := 2400;
661: --hr_utility.trace(to_char(l_stage));
662: pa_debug.g_err_stage := to_char(l_stage)||'The Currency you have entered is not valid. Please re-enter the Currency';
663: IF P_PA_DEBUG_MODE = 'Y' THEN
664: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
665: END IF;
666: /*
659: ELSIF l_converted_amount = -2 THEN
660: l_stage := 2400;
661: --hr_utility.trace(to_char(l_stage));
662: pa_debug.g_err_stage := to_char(l_stage)||'The Currency you have entered is not valid. Please re-enter the Currency';
663: IF P_PA_DEBUG_MODE = 'Y' THEN
664: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
665: END IF;
666: /*
667: pa_utils.add_message
660: l_stage := 2400;
661: --hr_utility.trace(to_char(l_stage));
662: pa_debug.g_err_stage := to_char(l_stage)||'The Currency you have entered is not valid. Please re-enter the Currency';
663: IF P_PA_DEBUG_MODE = 'Y' THEN
664: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
665: END IF;
666: /*
667: pa_utils.add_message
668: ( p_app_short_name => 'PA',
774: /* Rounding Enhancements */
775: x_projfunc_revenue_tab(i) := pa_currency.round_trans_currency_amt1
776: (x_projfunc_revenue_tab(i),p_projfunc_currency_code_tab(i));
777: ELSE
778: pa_debug.g_err_stage := to_char(l_stage)||': ProjFunc Revenue Rate Not Defined';
779: IF P_PA_DEBUG_MODE = 'Y' THEN
780: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
781: END IF;
782: /*
775: x_projfunc_revenue_tab(i) := pa_currency.round_trans_currency_amt1
776: (x_projfunc_revenue_tab(i),p_projfunc_currency_code_tab(i));
777: ELSE
778: pa_debug.g_err_stage := to_char(l_stage)||': ProjFunc Revenue Rate Not Defined';
779: IF P_PA_DEBUG_MODE = 'Y' THEN
780: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
781: END IF;
782: /*
783: pa_utils.add_message
776: (x_projfunc_revenue_tab(i),p_projfunc_currency_code_tab(i));
777: ELSE
778: pa_debug.g_err_stage := to_char(l_stage)||': ProjFunc Revenue Rate Not Defined';
779: IF P_PA_DEBUG_MODE = 'Y' THEN
780: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
781: END IF;
782: /*
783: pa_utils.add_message
784: ( p_app_short_name => 'PA',
800: END IF;
801: ELSE
802: l_stage := 3210;
803: --hr_utility.trace(to_char(l_stage));
804: pa_debug.g_err_stage := to_char(l_stage)||': Revenue Rate type of User not allowed in ProjFunc Currency';
805: IF P_PA_DEBUG_MODE = 'Y' THEN
806: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
807: END IF;
808: /*
801: ELSE
802: l_stage := 3210;
803: --hr_utility.trace(to_char(l_stage));
804: pa_debug.g_err_stage := to_char(l_stage)||': Revenue Rate type of User not allowed in ProjFunc Currency';
805: IF P_PA_DEBUG_MODE = 'Y' THEN
806: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
807: END IF;
808: /*
809: pa_utils.add_message
802: l_stage := 3210;
803: --hr_utility.trace(to_char(l_stage));
804: pa_debug.g_err_stage := to_char(l_stage)||': Revenue Rate type of User not allowed in ProjFunc Currency';
805: IF P_PA_DEBUG_MODE = 'Y' THEN
806: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
807: END IF;
808: /*
809: pa_utils.add_message
810: ( p_app_short_name => 'PA',
878: END IF;
879: IF l_converted_amount = -1 THEN
880: l_stage := 3700;
881: --hr_utility.trace(to_char(l_stage));
882: pa_debug.g_err_stage := to_char(l_stage)||': No Exchange Rate exists for the given Projfunc currency attributes. Please change the Currency attributes';
883: IF P_PA_DEBUG_MODE = 'Y' THEN
884: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
885: END IF;
886: /*
879: IF l_converted_amount = -1 THEN
880: l_stage := 3700;
881: --hr_utility.trace(to_char(l_stage));
882: pa_debug.g_err_stage := to_char(l_stage)||': No Exchange Rate exists for the given Projfunc currency attributes. Please change the Currency attributes';
883: IF P_PA_DEBUG_MODE = 'Y' THEN
884: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
885: END IF;
886: /*
887: pa_utils.add_message
880: l_stage := 3700;
881: --hr_utility.trace(to_char(l_stage));
882: pa_debug.g_err_stage := to_char(l_stage)||': No Exchange Rate exists for the given Projfunc currency attributes. Please change the Currency attributes';
883: IF P_PA_DEBUG_MODE = 'Y' THEN
884: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
885: END IF;
886: /*
887: pa_utils.add_message
888: ( p_app_short_name => 'PA',
906: END IF;
907: ELSIF l_converted_amount = -2 THEN
908: l_stage := 3800;
909: --hr_utility.trace(to_char(l_stage));
910: pa_debug.g_err_stage := to_char(l_stage)||'The Currency you have entered is not valid. Please re-enter the Currency';
911: IF P_PA_DEBUG_MODE = 'Y' THEN
912: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
913: END IF;
914: /*
907: ELSIF l_converted_amount = -2 THEN
908: l_stage := 3800;
909: --hr_utility.trace(to_char(l_stage));
910: pa_debug.g_err_stage := to_char(l_stage)||'The Currency you have entered is not valid. Please re-enter the Currency';
911: IF P_PA_DEBUG_MODE = 'Y' THEN
912: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
913: END IF;
914: /*
915: pa_utils.add_message
908: l_stage := 3800;
909: --hr_utility.trace(to_char(l_stage));
910: pa_debug.g_err_stage := to_char(l_stage)||'The Currency you have entered is not valid. Please re-enter the Currency';
911: IF P_PA_DEBUG_MODE = 'Y' THEN
912: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
913: END IF;
914: /*
915: pa_utils.add_message
916: ( p_app_short_name => 'PA',
1042: (x_proj_burdened_cost_tab(i),p_proj_currency_code_tab(i));
1043: ELSE
1044: l_stage := 5000;
1045: --hr_utility.trace(to_char(l_stage));
1046: pa_debug.g_err_stage := to_char(l_stage)||': Project Cost Rate Not Defined';
1047: IF P_PA_DEBUG_MODE = 'Y' THEN
1048: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1049: END IF;
1050: /*
1043: ELSE
1044: l_stage := 5000;
1045: --hr_utility.trace(to_char(l_stage));
1046: pa_debug.g_err_stage := to_char(l_stage)||': Project Cost Rate Not Defined';
1047: IF P_PA_DEBUG_MODE = 'Y' THEN
1048: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1049: END IF;
1050: /*
1051: pa_utils.add_message
1044: l_stage := 5000;
1045: --hr_utility.trace(to_char(l_stage));
1046: pa_debug.g_err_stage := to_char(l_stage)||': Project Cost Rate Not Defined';
1047: IF P_PA_DEBUG_MODE = 'Y' THEN
1048: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1049: END IF;
1050: /*
1051: pa_utils.add_message
1052: ( p_app_short_name => 'PA',
1068: END IF;
1069: ELSE
1070: l_stage := 810;
1071: --hr_utility.trace(to_char(l_stage));
1072: pa_debug.g_err_stage := to_char(l_stage)||': Cost Rate type of User not allowed in Project Currency';
1073: IF P_PA_DEBUG_MODE = 'Y' THEN
1074: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1075: END IF;
1076: /*
1069: ELSE
1070: l_stage := 810;
1071: --hr_utility.trace(to_char(l_stage));
1072: pa_debug.g_err_stage := to_char(l_stage)||': Cost Rate type of User not allowed in Project Currency';
1073: IF P_PA_DEBUG_MODE = 'Y' THEN
1074: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1075: END IF;
1076: /*
1077: pa_utils.add_message
1070: l_stage := 810;
1071: --hr_utility.trace(to_char(l_stage));
1072: pa_debug.g_err_stage := to_char(l_stage)||': Cost Rate type of User not allowed in Project Currency';
1073: IF P_PA_DEBUG_MODE = 'Y' THEN
1074: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1075: END IF;
1076: /*
1077: pa_utils.add_message
1078: ( p_app_short_name => 'PA',
1138: ,X_CONVERSION_DATE => p_proj_cost_rate_date_tab(i)
1139: ,X_CONVERSION_TYPE => p_proj_cost_rate_type_tab(i)
1140: ,X_AMOUNT => p_txn_raw_cost_tab(i));
1141:
1142: IF P_PA_DEBUG_MODE = 'Y' THEN
1143: pa_debug.g_err_stage := '5500.1 x_from_currency '|| p_txn_currency_code_tab(i) || 'x_to_currency ' || p_proj_currency_code_tab(i);
1144: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1145: pa_debug.g_err_stage := 'x_conversion_date ' || p_proj_cost_rate_date_tab(i) || 'x_conversion_type ' || p_proj_cost_rate_type_tab(i);
1146: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1139: ,X_CONVERSION_TYPE => p_proj_cost_rate_type_tab(i)
1140: ,X_AMOUNT => p_txn_raw_cost_tab(i));
1141:
1142: IF P_PA_DEBUG_MODE = 'Y' THEN
1143: pa_debug.g_err_stage := '5500.1 x_from_currency '|| p_txn_currency_code_tab(i) || 'x_to_currency ' || p_proj_currency_code_tab(i);
1144: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1145: pa_debug.g_err_stage := 'x_conversion_date ' || p_proj_cost_rate_date_tab(i) || 'x_conversion_type ' || p_proj_cost_rate_type_tab(i);
1146: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1147: pa_debug.g_err_stage := 'X_AMOUNT ' || p_txn_raw_cost_tab(i) || 'l_converted_amount ' || l_converted_amount;
1140: ,X_AMOUNT => p_txn_raw_cost_tab(i));
1141:
1142: IF P_PA_DEBUG_MODE = 'Y' THEN
1143: pa_debug.g_err_stage := '5500.1 x_from_currency '|| p_txn_currency_code_tab(i) || 'x_to_currency ' || p_proj_currency_code_tab(i);
1144: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1145: pa_debug.g_err_stage := 'x_conversion_date ' || p_proj_cost_rate_date_tab(i) || 'x_conversion_type ' || p_proj_cost_rate_type_tab(i);
1146: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1147: pa_debug.g_err_stage := 'X_AMOUNT ' || p_txn_raw_cost_tab(i) || 'l_converted_amount ' || l_converted_amount;
1148: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1141:
1142: IF P_PA_DEBUG_MODE = 'Y' THEN
1143: pa_debug.g_err_stage := '5500.1 x_from_currency '|| p_txn_currency_code_tab(i) || 'x_to_currency ' || p_proj_currency_code_tab(i);
1144: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1145: pa_debug.g_err_stage := 'x_conversion_date ' || p_proj_cost_rate_date_tab(i) || 'x_conversion_type ' || p_proj_cost_rate_type_tab(i);
1146: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1147: pa_debug.g_err_stage := 'X_AMOUNT ' || p_txn_raw_cost_tab(i) || 'l_converted_amount ' || l_converted_amount;
1148: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1149: END IF;
1142: IF P_PA_DEBUG_MODE = 'Y' THEN
1143: pa_debug.g_err_stage := '5500.1 x_from_currency '|| p_txn_currency_code_tab(i) || 'x_to_currency ' || p_proj_currency_code_tab(i);
1144: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1145: pa_debug.g_err_stage := 'x_conversion_date ' || p_proj_cost_rate_date_tab(i) || 'x_conversion_type ' || p_proj_cost_rate_type_tab(i);
1146: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1147: pa_debug.g_err_stage := 'X_AMOUNT ' || p_txn_raw_cost_tab(i) || 'l_converted_amount ' || l_converted_amount;
1148: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1149: END IF;
1150: IF l_converted_amount = -1 THEN
1143: pa_debug.g_err_stage := '5500.1 x_from_currency '|| p_txn_currency_code_tab(i) || 'x_to_currency ' || p_proj_currency_code_tab(i);
1144: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1145: pa_debug.g_err_stage := 'x_conversion_date ' || p_proj_cost_rate_date_tab(i) || 'x_conversion_type ' || p_proj_cost_rate_type_tab(i);
1146: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1147: pa_debug.g_err_stage := 'X_AMOUNT ' || p_txn_raw_cost_tab(i) || 'l_converted_amount ' || l_converted_amount;
1148: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1149: END IF;
1150: IF l_converted_amount = -1 THEN
1151: /* Added the If block for Bug#5395732 */
1144: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1145: pa_debug.g_err_stage := 'x_conversion_date ' || p_proj_cost_rate_date_tab(i) || 'x_conversion_type ' || p_proj_cost_rate_type_tab(i);
1146: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1147: pa_debug.g_err_stage := 'X_AMOUNT ' || p_txn_raw_cost_tab(i) || 'l_converted_amount ' || l_converted_amount;
1148: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1149: END IF;
1150: IF l_converted_amount = -1 THEN
1151: /* Added the If block for Bug#5395732 */
1152: IF (p_calling_module IN ('BUDGET_GENERATION','FORECAST_GENERATION','UPDATE_PLAN_TRANSACTION','AMG_API')) THEN --Bug 9586291 --Bug 16448547
1158: ,x_user_rate => 1
1159: ,x_amount => p_txn_raw_cost_tab(i)
1160: ,x_max_roll_days => -1) ;
1161: l_call_closest_flag := 'T';
1162: IF P_PA_DEBUG_MODE = 'Y' THEN
1163: pa_debug.g_err_stage := '5500.2 x_from_currency '|| p_txn_currency_code_tab(i) || 'x_to_currency ' || p_proj_currency_code_tab(i);
1164: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1165: pa_debug.g_err_stage := 'x_conversion_date ' || p_proj_cost_rate_date_tab(i) || 'x_conversion_type ' || p_proj_cost_rate_type_tab(i);
1166: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1159: ,x_amount => p_txn_raw_cost_tab(i)
1160: ,x_max_roll_days => -1) ;
1161: l_call_closest_flag := 'T';
1162: IF P_PA_DEBUG_MODE = 'Y' THEN
1163: pa_debug.g_err_stage := '5500.2 x_from_currency '|| p_txn_currency_code_tab(i) || 'x_to_currency ' || p_proj_currency_code_tab(i);
1164: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1165: pa_debug.g_err_stage := 'x_conversion_date ' || p_proj_cost_rate_date_tab(i) || 'x_conversion_type ' || p_proj_cost_rate_type_tab(i);
1166: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1167: pa_debug.g_err_stage := 'X_AMOUNT ' || p_txn_raw_cost_tab(i) || 'l_converted_amount ' || l_converted_amount;
1160: ,x_max_roll_days => -1) ;
1161: l_call_closest_flag := 'T';
1162: IF P_PA_DEBUG_MODE = 'Y' THEN
1163: pa_debug.g_err_stage := '5500.2 x_from_currency '|| p_txn_currency_code_tab(i) || 'x_to_currency ' || p_proj_currency_code_tab(i);
1164: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1165: pa_debug.g_err_stage := 'x_conversion_date ' || p_proj_cost_rate_date_tab(i) || 'x_conversion_type ' || p_proj_cost_rate_type_tab(i);
1166: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1167: pa_debug.g_err_stage := 'X_AMOUNT ' || p_txn_raw_cost_tab(i) || 'l_converted_amount ' || l_converted_amount;
1168: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1161: l_call_closest_flag := 'T';
1162: IF P_PA_DEBUG_MODE = 'Y' THEN
1163: pa_debug.g_err_stage := '5500.2 x_from_currency '|| p_txn_currency_code_tab(i) || 'x_to_currency ' || p_proj_currency_code_tab(i);
1164: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1165: pa_debug.g_err_stage := 'x_conversion_date ' || p_proj_cost_rate_date_tab(i) || 'x_conversion_type ' || p_proj_cost_rate_type_tab(i);
1166: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1167: pa_debug.g_err_stage := 'X_AMOUNT ' || p_txn_raw_cost_tab(i) || 'l_converted_amount ' || l_converted_amount;
1168: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1169: END IF;
1162: IF P_PA_DEBUG_MODE = 'Y' THEN
1163: pa_debug.g_err_stage := '5500.2 x_from_currency '|| p_txn_currency_code_tab(i) || 'x_to_currency ' || p_proj_currency_code_tab(i);
1164: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1165: pa_debug.g_err_stage := 'x_conversion_date ' || p_proj_cost_rate_date_tab(i) || 'x_conversion_type ' || p_proj_cost_rate_type_tab(i);
1166: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1167: pa_debug.g_err_stage := 'X_AMOUNT ' || p_txn_raw_cost_tab(i) || 'l_converted_amount ' || l_converted_amount;
1168: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1169: END IF;
1170: END IF;
1163: pa_debug.g_err_stage := '5500.2 x_from_currency '|| p_txn_currency_code_tab(i) || 'x_to_currency ' || p_proj_currency_code_tab(i);
1164: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1165: pa_debug.g_err_stage := 'x_conversion_date ' || p_proj_cost_rate_date_tab(i) || 'x_conversion_type ' || p_proj_cost_rate_type_tab(i);
1166: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1167: pa_debug.g_err_stage := 'X_AMOUNT ' || p_txn_raw_cost_tab(i) || 'l_converted_amount ' || l_converted_amount;
1168: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1169: END IF;
1170: END IF;
1171: IF l_converted_amount = -1 THEN
1164: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1165: pa_debug.g_err_stage := 'x_conversion_date ' || p_proj_cost_rate_date_tab(i) || 'x_conversion_type ' || p_proj_cost_rate_type_tab(i);
1166: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1167: pa_debug.g_err_stage := 'X_AMOUNT ' || p_txn_raw_cost_tab(i) || 'l_converted_amount ' || l_converted_amount;
1168: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1169: END IF;
1170: END IF;
1171: IF l_converted_amount = -1 THEN
1172: l_stage := 5600;
1170: END IF;
1171: IF l_converted_amount = -1 THEN
1172: l_stage := 5600;
1173: --hr_utility.trace(to_char(l_stage));
1174: pa_debug.g_err_stage := to_char(l_stage)||': No Exchange Rate exists for the given Project currency attributes. Please change the Currency attributes';
1175: IF P_PA_DEBUG_MODE = 'Y' THEN
1176: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1177: END IF;
1178: /*
1171: IF l_converted_amount = -1 THEN
1172: l_stage := 5600;
1173: --hr_utility.trace(to_char(l_stage));
1174: pa_debug.g_err_stage := to_char(l_stage)||': No Exchange Rate exists for the given Project currency attributes. Please change the Currency attributes';
1175: IF P_PA_DEBUG_MODE = 'Y' THEN
1176: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1177: END IF;
1178: /*
1179: pa_utils.add_message
1172: l_stage := 5600;
1173: --hr_utility.trace(to_char(l_stage));
1174: pa_debug.g_err_stage := to_char(l_stage)||': No Exchange Rate exists for the given Project currency attributes. Please change the Currency attributes';
1175: IF P_PA_DEBUG_MODE = 'Y' THEN
1176: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1177: END IF;
1178: /*
1179: pa_utils.add_message
1180: ( p_app_short_name => 'PA',
1320: IF l_converted_amount = -1 THEN
1321:
1322: l_stage := 6500;
1323: --hr_utility.trace(to_char(l_stage));
1324: pa_debug.g_err_stage := to_char(l_stage)||': No Exchange Rate exists for the given Project currency attributes. Please change the Currency attributes';
1325: IF P_PA_DEBUG_MODE = 'Y' THEN
1326: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1327: END IF;
1328: /*
1321:
1322: l_stage := 6500;
1323: --hr_utility.trace(to_char(l_stage));
1324: pa_debug.g_err_stage := to_char(l_stage)||': No Exchange Rate exists for the given Project currency attributes. Please change the Currency attributes';
1325: IF P_PA_DEBUG_MODE = 'Y' THEN
1326: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1327: END IF;
1328: /*
1329: pa_utils.add_message
1322: l_stage := 6500;
1323: --hr_utility.trace(to_char(l_stage));
1324: pa_debug.g_err_stage := to_char(l_stage)||': No Exchange Rate exists for the given Project currency attributes. Please change the Currency attributes';
1325: IF P_PA_DEBUG_MODE = 'Y' THEN
1326: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1327: END IF;
1328: /*
1329: pa_utils.add_message
1330: (p_app_short_name => 'PA',
1348: END IF;
1349: ELSIF l_converted_amount = -2 THEN
1350: l_stage := 6600;
1351: --hr_utility.trace(to_char(l_stage));
1352: pa_debug.g_err_stage := to_char(l_stage)||'The Currency you have entered is not valid. Please re-enter the Currency';
1353: IF P_PA_DEBUG_MODE = 'Y' THEN
1354: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1355: END IF;
1356: /*
1349: ELSIF l_converted_amount = -2 THEN
1350: l_stage := 6600;
1351: --hr_utility.trace(to_char(l_stage));
1352: pa_debug.g_err_stage := to_char(l_stage)||'The Currency you have entered is not valid. Please re-enter the Currency';
1353: IF P_PA_DEBUG_MODE = 'Y' THEN
1354: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1355: END IF;
1356: /*
1357: pa_utils.add_message
1350: l_stage := 6600;
1351: --hr_utility.trace(to_char(l_stage));
1352: pa_debug.g_err_stage := to_char(l_stage)||'The Currency you have entered is not valid. Please re-enter the Currency';
1353: IF P_PA_DEBUG_MODE = 'Y' THEN
1354: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1355: END IF;
1356: /*
1357: pa_utils.add_message
1358: ( p_app_short_name => 'PA',
1465: /* Rounding Enhancements */
1466: x_proj_revenue_tab(i) := pa_currency.round_trans_currency_amt1
1467: (x_proj_revenue_tab(i),p_proj_currency_code_tab(i));
1468: ELSE
1469: pa_debug.g_err_stage := to_char(l_stage)||': Project Revenue Rate Not Defined';
1470: IF P_PA_DEBUG_MODE = 'Y' THEN
1471: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1472: END IF;
1473: /*
1466: x_proj_revenue_tab(i) := pa_currency.round_trans_currency_amt1
1467: (x_proj_revenue_tab(i),p_proj_currency_code_tab(i));
1468: ELSE
1469: pa_debug.g_err_stage := to_char(l_stage)||': Project Revenue Rate Not Defined';
1470: IF P_PA_DEBUG_MODE = 'Y' THEN
1471: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1472: END IF;
1473: /*
1474: pa_utils.add_message
1467: (x_proj_revenue_tab(i),p_proj_currency_code_tab(i));
1468: ELSE
1469: pa_debug.g_err_stage := to_char(l_stage)||': Project Revenue Rate Not Defined';
1470: IF P_PA_DEBUG_MODE = 'Y' THEN
1471: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1472: END IF;
1473: /*
1474: pa_utils.add_message
1475: ( p_app_short_name => 'PA',
1491: END IF;
1492: ELSE
1493: l_stage := 810;
1494: --hr_utility.trace(to_char(l_stage));
1495: pa_debug.g_err_stage := to_char(l_stage)||': Revenue Rate type of User not allowed in Project Currency';
1496: IF P_PA_DEBUG_MODE = 'Y' THEN
1497: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1498: END IF;
1499: /*
1492: ELSE
1493: l_stage := 810;
1494: --hr_utility.trace(to_char(l_stage));
1495: pa_debug.g_err_stage := to_char(l_stage)||': Revenue Rate type of User not allowed in Project Currency';
1496: IF P_PA_DEBUG_MODE = 'Y' THEN
1497: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1498: END IF;
1499: /*
1500: pa_utils.add_message
1493: l_stage := 810;
1494: --hr_utility.trace(to_char(l_stage));
1495: pa_debug.g_err_stage := to_char(l_stage)||': Revenue Rate type of User not allowed in Project Currency';
1496: IF P_PA_DEBUG_MODE = 'Y' THEN
1497: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1498: END IF;
1499: /*
1500: pa_utils.add_message
1501: ( p_app_short_name => 'PA',
1554: ,X_CONVERSION_DATE => p_proj_rev_rate_date_tab(i)
1555: ,X_CONVERSION_TYPE => p_proj_rev_rate_type_tab(i)
1556: ,X_AMOUNT => p_txn_revenue_tab(i));
1557:
1558: IF P_PA_DEBUG_MODE = 'Y' THEN
1559: pa_debug.g_err_stage := '7700.1 x_from_currency '|| p_txn_currency_code_tab(i) || 'x_to_currency ' || p_proj_currency_code_tab(i);
1560: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1561: pa_debug.g_err_stage := 'x_conversion_date ' || p_proj_rev_rate_date_tab(i) || 'x_conversion_type ' || p_proj_rev_rate_type_tab(i);
1562: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1555: ,X_CONVERSION_TYPE => p_proj_rev_rate_type_tab(i)
1556: ,X_AMOUNT => p_txn_revenue_tab(i));
1557:
1558: IF P_PA_DEBUG_MODE = 'Y' THEN
1559: pa_debug.g_err_stage := '7700.1 x_from_currency '|| p_txn_currency_code_tab(i) || 'x_to_currency ' || p_proj_currency_code_tab(i);
1560: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1561: pa_debug.g_err_stage := 'x_conversion_date ' || p_proj_rev_rate_date_tab(i) || 'x_conversion_type ' || p_proj_rev_rate_type_tab(i);
1562: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1563: pa_debug.g_err_stage := 'X_AMOUNT ' || p_txn_revenue_tab(i) || 'l_converted_amount ' || l_converted_amount;
1556: ,X_AMOUNT => p_txn_revenue_tab(i));
1557:
1558: IF P_PA_DEBUG_MODE = 'Y' THEN
1559: pa_debug.g_err_stage := '7700.1 x_from_currency '|| p_txn_currency_code_tab(i) || 'x_to_currency ' || p_proj_currency_code_tab(i);
1560: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1561: pa_debug.g_err_stage := 'x_conversion_date ' || p_proj_rev_rate_date_tab(i) || 'x_conversion_type ' || p_proj_rev_rate_type_tab(i);
1562: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1563: pa_debug.g_err_stage := 'X_AMOUNT ' || p_txn_revenue_tab(i) || 'l_converted_amount ' || l_converted_amount;
1564: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1557:
1558: IF P_PA_DEBUG_MODE = 'Y' THEN
1559: pa_debug.g_err_stage := '7700.1 x_from_currency '|| p_txn_currency_code_tab(i) || 'x_to_currency ' || p_proj_currency_code_tab(i);
1560: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1561: pa_debug.g_err_stage := 'x_conversion_date ' || p_proj_rev_rate_date_tab(i) || 'x_conversion_type ' || p_proj_rev_rate_type_tab(i);
1562: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1563: pa_debug.g_err_stage := 'X_AMOUNT ' || p_txn_revenue_tab(i) || 'l_converted_amount ' || l_converted_amount;
1564: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1565: END IF;
1558: IF P_PA_DEBUG_MODE = 'Y' THEN
1559: pa_debug.g_err_stage := '7700.1 x_from_currency '|| p_txn_currency_code_tab(i) || 'x_to_currency ' || p_proj_currency_code_tab(i);
1560: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1561: pa_debug.g_err_stage := 'x_conversion_date ' || p_proj_rev_rate_date_tab(i) || 'x_conversion_type ' || p_proj_rev_rate_type_tab(i);
1562: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1563: pa_debug.g_err_stage := 'X_AMOUNT ' || p_txn_revenue_tab(i) || 'l_converted_amount ' || l_converted_amount;
1564: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1565: END IF;
1566: IF l_converted_amount = -1 THEN
1559: pa_debug.g_err_stage := '7700.1 x_from_currency '|| p_txn_currency_code_tab(i) || 'x_to_currency ' || p_proj_currency_code_tab(i);
1560: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1561: pa_debug.g_err_stage := 'x_conversion_date ' || p_proj_rev_rate_date_tab(i) || 'x_conversion_type ' || p_proj_rev_rate_type_tab(i);
1562: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1563: pa_debug.g_err_stage := 'X_AMOUNT ' || p_txn_revenue_tab(i) || 'l_converted_amount ' || l_converted_amount;
1564: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1565: END IF;
1566: IF l_converted_amount = -1 THEN
1567: /* Added the If block for Bug#5395732 */
1560: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1561: pa_debug.g_err_stage := 'x_conversion_date ' || p_proj_rev_rate_date_tab(i) || 'x_conversion_type ' || p_proj_rev_rate_type_tab(i);
1562: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1563: pa_debug.g_err_stage := 'X_AMOUNT ' || p_txn_revenue_tab(i) || 'l_converted_amount ' || l_converted_amount;
1564: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1565: END IF;
1566: IF l_converted_amount = -1 THEN
1567: /* Added the If block for Bug#5395732 */
1568: IF (p_calling_module IN ('BUDGET_GENERATION','FORECAST_GENERATION','UPDATE_PLAN_TRANSACTION','AMG_API')) THEN --Bug 9586291 --Bug 16448547
1573: ,x_conversion_type => p_proj_rev_rate_type_tab(i)
1574: ,x_user_rate => 1
1575: ,x_amount => p_txn_revenue_tab(i)
1576: ,x_max_roll_days => -1) ;
1577: IF P_PA_DEBUG_MODE = 'Y' THEN
1578: pa_debug.g_err_stage := '7700.2 x_from_currency '|| p_txn_currency_code_tab(i) || 'x_to_currency ' || p_proj_currency_code_tab(i);
1579: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1580: pa_debug.g_err_stage := 'x_conversion_date ' || p_proj_rev_rate_date_tab(i) || 'x_conversion_type ' || p_proj_rev_rate_type_tab(i);
1581: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1574: ,x_user_rate => 1
1575: ,x_amount => p_txn_revenue_tab(i)
1576: ,x_max_roll_days => -1) ;
1577: IF P_PA_DEBUG_MODE = 'Y' THEN
1578: pa_debug.g_err_stage := '7700.2 x_from_currency '|| p_txn_currency_code_tab(i) || 'x_to_currency ' || p_proj_currency_code_tab(i);
1579: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1580: pa_debug.g_err_stage := 'x_conversion_date ' || p_proj_rev_rate_date_tab(i) || 'x_conversion_type ' || p_proj_rev_rate_type_tab(i);
1581: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1582: pa_debug.g_err_stage := 'X_AMOUNT ' || p_txn_revenue_tab(i) || 'l_converted_amount ' || l_converted_amount;
1575: ,x_amount => p_txn_revenue_tab(i)
1576: ,x_max_roll_days => -1) ;
1577: IF P_PA_DEBUG_MODE = 'Y' THEN
1578: pa_debug.g_err_stage := '7700.2 x_from_currency '|| p_txn_currency_code_tab(i) || 'x_to_currency ' || p_proj_currency_code_tab(i);
1579: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1580: pa_debug.g_err_stage := 'x_conversion_date ' || p_proj_rev_rate_date_tab(i) || 'x_conversion_type ' || p_proj_rev_rate_type_tab(i);
1581: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1582: pa_debug.g_err_stage := 'X_AMOUNT ' || p_txn_revenue_tab(i) || 'l_converted_amount ' || l_converted_amount;
1583: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1576: ,x_max_roll_days => -1) ;
1577: IF P_PA_DEBUG_MODE = 'Y' THEN
1578: pa_debug.g_err_stage := '7700.2 x_from_currency '|| p_txn_currency_code_tab(i) || 'x_to_currency ' || p_proj_currency_code_tab(i);
1579: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1580: pa_debug.g_err_stage := 'x_conversion_date ' || p_proj_rev_rate_date_tab(i) || 'x_conversion_type ' || p_proj_rev_rate_type_tab(i);
1581: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1582: pa_debug.g_err_stage := 'X_AMOUNT ' || p_txn_revenue_tab(i) || 'l_converted_amount ' || l_converted_amount;
1583: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1584: END IF;
1577: IF P_PA_DEBUG_MODE = 'Y' THEN
1578: pa_debug.g_err_stage := '7700.2 x_from_currency '|| p_txn_currency_code_tab(i) || 'x_to_currency ' || p_proj_currency_code_tab(i);
1579: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1580: pa_debug.g_err_stage := 'x_conversion_date ' || p_proj_rev_rate_date_tab(i) || 'x_conversion_type ' || p_proj_rev_rate_type_tab(i);
1581: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1582: pa_debug.g_err_stage := 'X_AMOUNT ' || p_txn_revenue_tab(i) || 'l_converted_amount ' || l_converted_amount;
1583: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1584: END IF;
1585: l_call_closest_flag := 'T';
1578: pa_debug.g_err_stage := '7700.2 x_from_currency '|| p_txn_currency_code_tab(i) || 'x_to_currency ' || p_proj_currency_code_tab(i);
1579: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1580: pa_debug.g_err_stage := 'x_conversion_date ' || p_proj_rev_rate_date_tab(i) || 'x_conversion_type ' || p_proj_rev_rate_type_tab(i);
1581: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1582: pa_debug.g_err_stage := 'X_AMOUNT ' || p_txn_revenue_tab(i) || 'l_converted_amount ' || l_converted_amount;
1583: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1584: END IF;
1585: l_call_closest_flag := 'T';
1586: END IF;
1579: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1580: pa_debug.g_err_stage := 'x_conversion_date ' || p_proj_rev_rate_date_tab(i) || 'x_conversion_type ' || p_proj_rev_rate_type_tab(i);
1581: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1582: pa_debug.g_err_stage := 'X_AMOUNT ' || p_txn_revenue_tab(i) || 'l_converted_amount ' || l_converted_amount;
1583: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1584: END IF;
1585: l_call_closest_flag := 'T';
1586: END IF;
1587: IF l_converted_amount = -1 THEN
1586: END IF;
1587: IF l_converted_amount = -1 THEN
1588: l_stage := 7800;
1589: --hr_utility.trace(to_char(l_stage));
1590: pa_debug.g_err_stage := to_char(l_stage)||': No Exchange Rate exists for the given Project currency attributes. Please change the Currency attributes';
1591: IF P_PA_DEBUG_MODE = 'Y' THEN
1592: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1593: END IF;
1594: /*
1587: IF l_converted_amount = -1 THEN
1588: l_stage := 7800;
1589: --hr_utility.trace(to_char(l_stage));
1590: pa_debug.g_err_stage := to_char(l_stage)||': No Exchange Rate exists for the given Project currency attributes. Please change the Currency attributes';
1591: IF P_PA_DEBUG_MODE = 'Y' THEN
1592: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1593: END IF;
1594: /*
1595: pa_utils.add_message
1588: l_stage := 7800;
1589: --hr_utility.trace(to_char(l_stage));
1590: pa_debug.g_err_stage := to_char(l_stage)||': No Exchange Rate exists for the given Project currency attributes. Please change the Currency attributes';
1591: IF P_PA_DEBUG_MODE = 'Y' THEN
1592: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1593: END IF;
1594: /*
1595: pa_utils.add_message
1596: ( p_app_short_name => 'PA',
1614: END IF;
1615: ELSIF l_converted_amount = -2 THEN
1616: l_stage := 7900;
1617: --hr_utility.trace(to_char(l_stage));
1618: pa_debug.g_err_stage := to_char(l_stage)||'The Currency you have entered is not valid. Please re-enter the Currency';
1619: IF P_PA_DEBUG_MODE = 'Y' THEN
1620: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1621: END IF;
1622: /*
1615: ELSIF l_converted_amount = -2 THEN
1616: l_stage := 7900;
1617: --hr_utility.trace(to_char(l_stage));
1618: pa_debug.g_err_stage := to_char(l_stage)||'The Currency you have entered is not valid. Please re-enter the Currency';
1619: IF P_PA_DEBUG_MODE = 'Y' THEN
1620: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1621: END IF;
1622: /*
1623: pa_utils.add_message
1616: l_stage := 7900;
1617: --hr_utility.trace(to_char(l_stage));
1618: pa_debug.g_err_stage := to_char(l_stage)||'The Currency you have entered is not valid. Please re-enter the Currency';
1619: IF P_PA_DEBUG_MODE = 'Y' THEN
1620: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1621: END IF;
1622: /*
1623: pa_utils.add_message
1624: ( p_app_short_name => 'PA',
1721: --hr_utility.trace('x_projfunc_rejection_tab(i) := '||to_char(x_projfunc_rejection_tab(i)));
1722: END LOOP;
1723: l_stage := 8600;
1724: --hr_utility.trace(to_char(l_stage));
1725: pa_debug.g_err_stage := 'Leaving PA_FP_MULTI_CURRENCY_PKG.conv_mc_bulk';
1726: IF P_PA_DEBUG_MODE = 'Y' THEN
1727: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1728: END IF;
1729:
1722: END LOOP;
1723: l_stage := 8600;
1724: --hr_utility.trace(to_char(l_stage));
1725: pa_debug.g_err_stage := 'Leaving PA_FP_MULTI_CURRENCY_PKG.conv_mc_bulk';
1726: IF P_PA_DEBUG_MODE = 'Y' THEN
1727: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1728: END IF;
1729:
1730: fnd_msg_pub.count_and_get (p_count => x_msg_count,
1723: l_stage := 8600;
1724: --hr_utility.trace(to_char(l_stage));
1725: pa_debug.g_err_stage := 'Leaving PA_FP_MULTI_CURRENCY_PKG.conv_mc_bulk';
1726: IF P_PA_DEBUG_MODE = 'Y' THEN
1727: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1728: END IF;
1729:
1730: fnd_msg_pub.count_and_get (p_count => x_msg_count,
1731: p_data => x_msg_data);
1736: x_msg_data := FND_MESSAGE.GET;
1737: END IF;
1738: END IF;
1739: /* bug 4227840: wrapping the setting of debug error stack call to
1740: * pa_debug under the debug enbaling check
1741: */
1742: IF P_PA_DEBUG_MODE = 'Y' THEN
1743: pa_debug.reset_err_stack;
1744: END IF;
1738: END IF;
1739: /* bug 4227840: wrapping the setting of debug error stack call to
1740: * pa_debug under the debug enbaling check
1741: */
1742: IF P_PA_DEBUG_MODE = 'Y' THEN
1743: pa_debug.reset_err_stack;
1744: END IF;
1745:
1746: EXCEPTION WHEN OTHERS THEN
1739: /* bug 4227840: wrapping the setting of debug error stack call to
1740: * pa_debug under the debug enbaling check
1741: */
1742: IF P_PA_DEBUG_MODE = 'Y' THEN
1743: pa_debug.reset_err_stack;
1744: END IF;
1745:
1746: EXCEPTION WHEN OTHERS THEN
1747: fnd_msg_pub.count_and_get (p_count => x_msg_count,
1757: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1758: fnd_msg_pub.add_exc_msg
1759: ( p_pkg_name => 'PA_FP_MULTI_CURRENCY_PKG'
1760: ,p_procedure_name => 'conv_mc_bulk' );
1761: pa_debug.g_err_stage := 'Stage : '||to_char(l_stage)||' '||substr(SQLERRM,1,240);
1762: IF P_PA_DEBUG_MODE = 'Y' THEN
1763: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1764: END IF;
1765: --hr_utility.trace('PA_FP_MULTI_CURRENCY_PKG.conv_mc_bulk -- Stage : ' ||to_char(l_stage)||' '||substr(SQLERRM,1,240));
1758: fnd_msg_pub.add_exc_msg
1759: ( p_pkg_name => 'PA_FP_MULTI_CURRENCY_PKG'
1760: ,p_procedure_name => 'conv_mc_bulk' );
1761: pa_debug.g_err_stage := 'Stage : '||to_char(l_stage)||' '||substr(SQLERRM,1,240);
1762: IF P_PA_DEBUG_MODE = 'Y' THEN
1763: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1764: END IF;
1765: --hr_utility.trace('PA_FP_MULTI_CURRENCY_PKG.conv_mc_bulk -- Stage : ' ||to_char(l_stage)||' '||substr(SQLERRM,1,240));
1766: /* bug 4227840: wrapping the setting of debug error stack call to
1759: ( p_pkg_name => 'PA_FP_MULTI_CURRENCY_PKG'
1760: ,p_procedure_name => 'conv_mc_bulk' );
1761: pa_debug.g_err_stage := 'Stage : '||to_char(l_stage)||' '||substr(SQLERRM,1,240);
1762: IF P_PA_DEBUG_MODE = 'Y' THEN
1763: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1764: END IF;
1765: --hr_utility.trace('PA_FP_MULTI_CURRENCY_PKG.conv_mc_bulk -- Stage : ' ||to_char(l_stage)||' '||substr(SQLERRM,1,240));
1766: /* bug 4227840: wrapping the setting of debug error stack call to
1767: * pa_debug under the debug enbaling check
1763: pa_debug.write('conv_mc_bulk: ' || g_module_name,pa_debug.g_err_stage,3);
1764: END IF;
1765: --hr_utility.trace('PA_FP_MULTI_CURRENCY_PKG.conv_mc_bulk -- Stage : ' ||to_char(l_stage)||' '||substr(SQLERRM,1,240));
1766: /* bug 4227840: wrapping the setting of debug error stack call to
1767: * pa_debug under the debug enbaling check
1768: */
1769: IF P_PA_DEBUG_MODE = 'Y' THEN
1770: pa_debug.reset_err_stack;
1771: END IF;
1765: --hr_utility.trace('PA_FP_MULTI_CURRENCY_PKG.conv_mc_bulk -- Stage : ' ||to_char(l_stage)||' '||substr(SQLERRM,1,240));
1766: /* bug 4227840: wrapping the setting of debug error stack call to
1767: * pa_debug under the debug enbaling check
1768: */
1769: IF P_PA_DEBUG_MODE = 'Y' THEN
1770: pa_debug.reset_err_stack;
1771: END IF;
1772: raise FND_API.G_EXC_UNEXPECTED_ERROR;
1773: END conv_mc_bulk;
1766: /* bug 4227840: wrapping the setting of debug error stack call to
1767: * pa_debug under the debug enbaling check
1768: */
1769: IF P_PA_DEBUG_MODE = 'Y' THEN
1770: pa_debug.reset_err_stack;
1771: END IF;
1772: raise FND_API.G_EXC_UNEXPECTED_ERROR;
1773: END conv_mc_bulk;
1774:
2104:
2105: l_entire_return_status := FND_API.G_RET_STS_SUCCESS;
2106: x_return_status := FND_API.G_RET_STS_SUCCESS;
2107:
2108: fnd_profile.get('PA_DEBUG_MODE',l_debug_mode);
2109: l_debug_mode := NVL(l_debug_mode, 'Y');
2110:
2111: /* bug 4227840: wrapping the setting of debug error stack call to
2112: * pa_debug under the debug enbaling check
2108: fnd_profile.get('PA_DEBUG_MODE',l_debug_mode);
2109: l_debug_mode := NVL(l_debug_mode, 'Y');
2110:
2111: /* bug 4227840: wrapping the setting of debug error stack call to
2112: * pa_debug under the debug enbaling check
2113: */
2114: IF l_debug_mode = 'Y' THEN
2115: pa_debug.set_err_stack('convert_txn_currency');
2116: pa_debug.set_process('PLSQL','LOG',l_debug_mode);
2111: /* bug 4227840: wrapping the setting of debug error stack call to
2112: * pa_debug under the debug enbaling check
2113: */
2114: IF l_debug_mode = 'Y' THEN
2115: pa_debug.set_err_stack('convert_txn_currency');
2116: pa_debug.set_process('PLSQL','LOG',l_debug_mode);
2117: END IF;
2118:
2119: -- Get default attributes for currency conversion from version level
2112: * pa_debug under the debug enbaling check
2113: */
2114: IF l_debug_mode = 'Y' THEN
2115: pa_debug.set_err_stack('convert_txn_currency');
2116: pa_debug.set_process('PLSQL','LOG',l_debug_mode);
2117: END IF;
2118:
2119: -- Get default attributes for currency conversion from version level
2120: -- proj_fp_options
2144: ,g_proj_rev_rate_date_type
2145: ,g_proj_rev_rate_date;
2146: EXCEPTION WHEN NO_DATA_FOUND THEN
2147: /* bug 4227840: wrapping the setting of debug error stack call to
2148: * pa_debug under the debug enbaling check
2149: */
2150: IF P_PA_DEBUG_MODE = 'Y' THEN
2151: pa_debug.reset_err_stack;
2152: END IF;
2146: EXCEPTION WHEN NO_DATA_FOUND THEN
2147: /* bug 4227840: wrapping the setting of debug error stack call to
2148: * pa_debug under the debug enbaling check
2149: */
2150: IF P_PA_DEBUG_MODE = 'Y' THEN
2151: pa_debug.reset_err_stack;
2152: END IF;
2153: RAISE;
2154: END;
2147: /* bug 4227840: wrapping the setting of debug error stack call to
2148: * pa_debug under the debug enbaling check
2149: */
2150: IF P_PA_DEBUG_MODE = 'Y' THEN
2151: pa_debug.reset_err_stack;
2152: END IF;
2153: RAISE;
2154: END;
2155:
2152: END IF;
2153: RAISE;
2154: END;
2155:
2156: pa_debug.g_err_stage := 'pfc cost rate date' || g_projfunc_cost_rate_date;
2157: IF P_PA_DEBUG_MODE = 'Y' THEN
2158: pa_debug.write('convert_txn_currency: ' || g_module_name,pa_debug.g_err_stage,3);
2159: END IF;
2160:
2153: RAISE;
2154: END;
2155:
2156: pa_debug.g_err_stage := 'pfc cost rate date' || g_projfunc_cost_rate_date;
2157: IF P_PA_DEBUG_MODE = 'Y' THEN
2158: pa_debug.write('convert_txn_currency: ' || g_module_name,pa_debug.g_err_stage,3);
2159: END IF;
2160:
2161: pa_debug.g_err_stage := 'pfc cost rate type' || g_projfunc_cost_rate_type;
2154: END;
2155:
2156: pa_debug.g_err_stage := 'pfc cost rate date' || g_projfunc_cost_rate_date;
2157: IF P_PA_DEBUG_MODE = 'Y' THEN
2158: pa_debug.write('convert_txn_currency: ' || g_module_name,pa_debug.g_err_stage,3);
2159: END IF;
2160:
2161: pa_debug.g_err_stage := 'pfc cost rate type' || g_projfunc_cost_rate_type;
2162: IF P_PA_DEBUG_MODE = 'Y' THEN
2157: IF P_PA_DEBUG_MODE = 'Y' THEN
2158: pa_debug.write('convert_txn_currency: ' || g_module_name,pa_debug.g_err_stage,3);
2159: END IF;
2160:
2161: pa_debug.g_err_stage := 'pfc cost rate type' || g_projfunc_cost_rate_type;
2162: IF P_PA_DEBUG_MODE = 'Y' THEN
2163: pa_debug.write('convert_txn_currency: ' || g_module_name,pa_debug.g_err_stage,3);
2164: END IF;
2165:
2158: pa_debug.write('convert_txn_currency: ' || g_module_name,pa_debug.g_err_stage,3);
2159: END IF;
2160:
2161: pa_debug.g_err_stage := 'pfc cost rate type' || g_projfunc_cost_rate_type;
2162: IF P_PA_DEBUG_MODE = 'Y' THEN
2163: pa_debug.write('convert_txn_currency: ' || g_module_name,pa_debug.g_err_stage,3);
2164: END IF;
2165:
2166: pa_debug.g_err_stage := 'pfc cost rate date type' || g_projfunc_cost_rate_date_type;
2159: END IF;
2160:
2161: pa_debug.g_err_stage := 'pfc cost rate type' || g_projfunc_cost_rate_type;
2162: IF P_PA_DEBUG_MODE = 'Y' THEN
2163: pa_debug.write('convert_txn_currency: ' || g_module_name,pa_debug.g_err_stage,3);
2164: END IF;
2165:
2166: pa_debug.g_err_stage := 'pfc cost rate date type' || g_projfunc_cost_rate_date_type;
2167: IF P_PA_DEBUG_MODE = 'Y' THEN
2162: IF P_PA_DEBUG_MODE = 'Y' THEN
2163: pa_debug.write('convert_txn_currency: ' || g_module_name,pa_debug.g_err_stage,3);
2164: END IF;
2165:
2166: pa_debug.g_err_stage := 'pfc cost rate date type' || g_projfunc_cost_rate_date_type;
2167: IF P_PA_DEBUG_MODE = 'Y' THEN
2168: pa_debug.write('convert_txn_currency: ' || g_module_name,pa_debug.g_err_stage,3);
2169: END IF;
2170:
2163: pa_debug.write('convert_txn_currency: ' || g_module_name,pa_debug.g_err_stage,3);
2164: END IF;
2165:
2166: pa_debug.g_err_stage := 'pfc cost rate date type' || g_projfunc_cost_rate_date_type;
2167: IF P_PA_DEBUG_MODE = 'Y' THEN
2168: pa_debug.write('convert_txn_currency: ' || g_module_name,pa_debug.g_err_stage,3);
2169: END IF;
2170:
2171: pa_debug.g_err_stage := 'pfc rev rate date' || g_projfunc_rev_rate_date;
2164: END IF;
2165:
2166: pa_debug.g_err_stage := 'pfc cost rate date type' || g_projfunc_cost_rate_date_type;
2167: IF P_PA_DEBUG_MODE = 'Y' THEN
2168: pa_debug.write('convert_txn_currency: ' || g_module_name,pa_debug.g_err_stage,3);
2169: END IF;
2170:
2171: pa_debug.g_err_stage := 'pfc rev rate date' || g_projfunc_rev_rate_date;
2172: IF P_PA_DEBUG_MODE = 'Y' THEN
2167: IF P_PA_DEBUG_MODE = 'Y' THEN
2168: pa_debug.write('convert_txn_currency: ' || g_module_name,pa_debug.g_err_stage,3);
2169: END IF;
2170:
2171: pa_debug.g_err_stage := 'pfc rev rate date' || g_projfunc_rev_rate_date;
2172: IF P_PA_DEBUG_MODE = 'Y' THEN
2173: pa_debug.write('convert_txn_currency: ' || g_module_name,pa_debug.g_err_stage,3);
2174: END IF;
2175:
2168: pa_debug.write('convert_txn_currency: ' || g_module_name,pa_debug.g_err_stage,3);
2169: END IF;
2170:
2171: pa_debug.g_err_stage := 'pfc rev rate date' || g_projfunc_rev_rate_date;
2172: IF P_PA_DEBUG_MODE = 'Y' THEN
2173: pa_debug.write('convert_txn_currency: ' || g_module_name,pa_debug.g_err_stage,3);
2174: END IF;
2175:
2176: pa_debug.g_err_stage := 'pfc rev rate type' || g_projfunc_rev_rate_type;
2169: END IF;
2170:
2171: pa_debug.g_err_stage := 'pfc rev rate date' || g_projfunc_rev_rate_date;
2172: IF P_PA_DEBUG_MODE = 'Y' THEN
2173: pa_debug.write('convert_txn_currency: ' || g_module_name,pa_debug.g_err_stage,3);
2174: END IF;
2175:
2176: pa_debug.g_err_stage := 'pfc rev rate type' || g_projfunc_rev_rate_type;
2177: IF P_PA_DEBUG_MODE = 'Y' THEN
2172: IF P_PA_DEBUG_MODE = 'Y' THEN
2173: pa_debug.write('convert_txn_currency: ' || g_module_name,pa_debug.g_err_stage,3);
2174: END IF;
2175:
2176: pa_debug.g_err_stage := 'pfc rev rate type' || g_projfunc_rev_rate_type;
2177: IF P_PA_DEBUG_MODE = 'Y' THEN
2178: pa_debug.write('convert_txn_currency: ' || g_module_name,pa_debug.g_err_stage,3);
2179: END IF;
2180:
2173: pa_debug.write('convert_txn_currency: ' || g_module_name,pa_debug.g_err_stage,3);
2174: END IF;
2175:
2176: pa_debug.g_err_stage := 'pfc rev rate type' || g_projfunc_rev_rate_type;
2177: IF P_PA_DEBUG_MODE = 'Y' THEN
2178: pa_debug.write('convert_txn_currency: ' || g_module_name,pa_debug.g_err_stage,3);
2179: END IF;
2180:
2181: pa_debug.g_err_stage := 'pfc rev rate date type' || g_projfunc_rev_rate_date_type;
2174: END IF;
2175:
2176: pa_debug.g_err_stage := 'pfc rev rate type' || g_projfunc_rev_rate_type;
2177: IF P_PA_DEBUG_MODE = 'Y' THEN
2178: pa_debug.write('convert_txn_currency: ' || g_module_name,pa_debug.g_err_stage,3);
2179: END IF;
2180:
2181: pa_debug.g_err_stage := 'pfc rev rate date type' || g_projfunc_rev_rate_date_type;
2182: IF P_PA_DEBUG_MODE = 'Y' THEN
2177: IF P_PA_DEBUG_MODE = 'Y' THEN
2178: pa_debug.write('convert_txn_currency: ' || g_module_name,pa_debug.g_err_stage,3);
2179: END IF;
2180:
2181: pa_debug.g_err_stage := 'pfc rev rate date type' || g_projfunc_rev_rate_date_type;
2182: IF P_PA_DEBUG_MODE = 'Y' THEN
2183: pa_debug.write('convert_txn_currency: ' || g_module_name,pa_debug.g_err_stage,3);
2184: END IF;
2185:
2178: pa_debug.write('convert_txn_currency: ' || g_module_name,pa_debug.g_err_stage,3);
2179: END IF;
2180:
2181: pa_debug.g_err_stage := 'pfc rev rate date type' || g_projfunc_rev_rate_date_type;
2182: IF P_PA_DEBUG_MODE = 'Y' THEN
2183: pa_debug.write('convert_txn_currency: ' || g_module_name,pa_debug.g_err_stage,3);
2184: END IF;
2185:
2186: CLOSE get_fp_options_data;
2179: END IF;
2180:
2181: pa_debug.g_err_stage := 'pfc rev rate date type' || g_projfunc_rev_rate_date_type;
2182: IF P_PA_DEBUG_MODE = 'Y' THEN
2183: pa_debug.write('convert_txn_currency: ' || g_module_name,pa_debug.g_err_stage,3);
2184: END IF;
2185:
2186: CLOSE get_fp_options_data;
2187:
2617:
2618: fnd_msg_pub.add_exc_msg
2619: ( p_pkg_name => 'PA_FP_MULTI_CURRENCY_PKG'
2620: ,p_procedure_name => 'convert_txn_currency' );
2621: pa_debug.g_err_stage := 'Stage : '||to_char(l_stage)||' '||substr(SQLERRM,1,240);
2622: IF P_PA_DEBUG_MODE = 'Y' THEN
2623: pa_debug.write('convert_txn_currency: ' || g_module_name,pa_debug.g_err_stage,3);
2624: END IF;
2625: --hr_utility.trace('PA_FP_MULTI_CURRENCY_PKG.convert_txn_currency -- Stage : ' ||to_char(l_stage)||' '||substr(SQLERRM,1,240));
2618: fnd_msg_pub.add_exc_msg
2619: ( p_pkg_name => 'PA_FP_MULTI_CURRENCY_PKG'
2620: ,p_procedure_name => 'convert_txn_currency' );
2621: pa_debug.g_err_stage := 'Stage : '||to_char(l_stage)||' '||substr(SQLERRM,1,240);
2622: IF P_PA_DEBUG_MODE = 'Y' THEN
2623: pa_debug.write('convert_txn_currency: ' || g_module_name,pa_debug.g_err_stage,3);
2624: END IF;
2625: --hr_utility.trace('PA_FP_MULTI_CURRENCY_PKG.convert_txn_currency -- Stage : ' ||to_char(l_stage)||' '||substr(SQLERRM,1,240));
2626: /* bug 4227840: wrapping the setting of debug error stack call to
2619: ( p_pkg_name => 'PA_FP_MULTI_CURRENCY_PKG'
2620: ,p_procedure_name => 'convert_txn_currency' );
2621: pa_debug.g_err_stage := 'Stage : '||to_char(l_stage)||' '||substr(SQLERRM,1,240);
2622: IF P_PA_DEBUG_MODE = 'Y' THEN
2623: pa_debug.write('convert_txn_currency: ' || g_module_name,pa_debug.g_err_stage,3);
2624: END IF;
2625: --hr_utility.trace('PA_FP_MULTI_CURRENCY_PKG.convert_txn_currency -- Stage : ' ||to_char(l_stage)||' '||substr(SQLERRM,1,240));
2626: /* bug 4227840: wrapping the setting of debug error stack call to
2627: * pa_debug under the debug enbaling check
2623: pa_debug.write('convert_txn_currency: ' || g_module_name,pa_debug.g_err_stage,3);
2624: END IF;
2625: --hr_utility.trace('PA_FP_MULTI_CURRENCY_PKG.convert_txn_currency -- Stage : ' ||to_char(l_stage)||' '||substr(SQLERRM,1,240));
2626: /* bug 4227840: wrapping the setting of debug error stack call to
2627: * pa_debug under the debug enbaling check
2628: */
2629: IF P_PA_DEBUG_MODE = 'Y' THEN
2630: pa_debug.reset_err_stack;
2631: END IF;
2625: --hr_utility.trace('PA_FP_MULTI_CURRENCY_PKG.convert_txn_currency -- Stage : ' ||to_char(l_stage)||' '||substr(SQLERRM,1,240));
2626: /* bug 4227840: wrapping the setting of debug error stack call to
2627: * pa_debug under the debug enbaling check
2628: */
2629: IF P_PA_DEBUG_MODE = 'Y' THEN
2630: pa_debug.reset_err_stack;
2631: END IF;
2632: raise FND_API.G_EXC_UNEXPECTED_ERROR;
2633: END;
2626: /* bug 4227840: wrapping the setting of debug error stack call to
2627: * pa_debug under the debug enbaling check
2628: */
2629: IF P_PA_DEBUG_MODE = 'Y' THEN
2630: pa_debug.reset_err_stack;
2631: END IF;
2632: raise FND_API.G_EXC_UNEXPECTED_ERROR;
2633: END;
2634:
2651: END IF;
2652: END IF;
2653:
2654: /* bug 4227840: wrapping the setting of debug error stack call to
2655: * pa_debug under the debug enbaling check
2656: */
2657: IF P_PA_DEBUG_MODE = 'Y' THEN
2658: pa_debug.reset_err_stack;
2659: END IF;
2653:
2654: /* bug 4227840: wrapping the setting of debug error stack call to
2655: * pa_debug under the debug enbaling check
2656: */
2657: IF P_PA_DEBUG_MODE = 'Y' THEN
2658: pa_debug.reset_err_stack;
2659: END IF;
2660:
2661: EXCEPTION WHEN OTHERS THEN
2654: /* bug 4227840: wrapping the setting of debug error stack call to
2655: * pa_debug under the debug enbaling check
2656: */
2657: IF P_PA_DEBUG_MODE = 'Y' THEN
2658: pa_debug.reset_err_stack;
2659: END IF;
2660:
2661: EXCEPTION WHEN OTHERS THEN
2662: fnd_msg_pub.count_and_get (p_count => x_msg_count,
2672: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2673: fnd_msg_pub.add_exc_msg
2674: ( p_pkg_name => 'PA_FP_MULTI_CURRENCY_PKG'
2675: ,p_procedure_name => 'convert_txn_currency' );
2676: pa_debug.g_err_stage := 'Stage : '||to_char(l_stage)||' '||substr(SQLERRM,1,240);
2677: IF P_PA_DEBUG_MODE = 'Y' THEN
2678: pa_debug.write('convert_txn_currency: ' || g_module_name,pa_debug.g_err_stage,3);
2679: END IF;
2680: --hr_utility.trace('PA_FP_MULTI_CURRENCY_PKG.convert_txn_currency -- Stage : ' ||to_char(l_stage)||' '||substr(SQLERRM,1,240));
2673: fnd_msg_pub.add_exc_msg
2674: ( p_pkg_name => 'PA_FP_MULTI_CURRENCY_PKG'
2675: ,p_procedure_name => 'convert_txn_currency' );
2676: pa_debug.g_err_stage := 'Stage : '||to_char(l_stage)||' '||substr(SQLERRM,1,240);
2677: IF P_PA_DEBUG_MODE = 'Y' THEN
2678: pa_debug.write('convert_txn_currency: ' || g_module_name,pa_debug.g_err_stage,3);
2679: END IF;
2680: --hr_utility.trace('PA_FP_MULTI_CURRENCY_PKG.convert_txn_currency -- Stage : ' ||to_char(l_stage)||' '||substr(SQLERRM,1,240));
2681: /* bug 4227840: wrapping the setting of debug error stack call to
2674: ( p_pkg_name => 'PA_FP_MULTI_CURRENCY_PKG'
2675: ,p_procedure_name => 'convert_txn_currency' );
2676: pa_debug.g_err_stage := 'Stage : '||to_char(l_stage)||' '||substr(SQLERRM,1,240);
2677: IF P_PA_DEBUG_MODE = 'Y' THEN
2678: pa_debug.write('convert_txn_currency: ' || g_module_name,pa_debug.g_err_stage,3);
2679: END IF;
2680: --hr_utility.trace('PA_FP_MULTI_CURRENCY_PKG.convert_txn_currency -- Stage : ' ||to_char(l_stage)||' '||substr(SQLERRM,1,240));
2681: /* bug 4227840: wrapping the setting of debug error stack call to
2682: * pa_debug under the debug enbaling check
2678: pa_debug.write('convert_txn_currency: ' || g_module_name,pa_debug.g_err_stage,3);
2679: END IF;
2680: --hr_utility.trace('PA_FP_MULTI_CURRENCY_PKG.convert_txn_currency -- Stage : ' ||to_char(l_stage)||' '||substr(SQLERRM,1,240));
2681: /* bug 4227840: wrapping the setting of debug error stack call to
2682: * pa_debug under the debug enbaling check
2683: */
2684: IF P_PA_DEBUG_MODE = 'Y' THEN
2685: pa_debug.reset_err_stack;
2686: END IF;
2680: --hr_utility.trace('PA_FP_MULTI_CURRENCY_PKG.convert_txn_currency -- Stage : ' ||to_char(l_stage)||' '||substr(SQLERRM,1,240));
2681: /* bug 4227840: wrapping the setting of debug error stack call to
2682: * pa_debug under the debug enbaling check
2683: */
2684: IF P_PA_DEBUG_MODE = 'Y' THEN
2685: pa_debug.reset_err_stack;
2686: END IF;
2687: raise FND_API.G_EXC_UNEXPECTED_ERROR;
2688: END convert_txn_currency;
2681: /* bug 4227840: wrapping the setting of debug error stack call to
2682: * pa_debug under the debug enbaling check
2683: */
2684: IF P_PA_DEBUG_MODE = 'Y' THEN
2685: pa_debug.reset_err_stack;
2686: END IF;
2687: raise FND_API.G_EXC_UNEXPECTED_ERROR;
2688: END convert_txn_currency;
2689:
2809:
2810: x_msg_count := 0;
2811: x_return_status := FND_API.G_RET_STS_SUCCESS;
2812:
2813: fnd_profile.get('PA_DEBUG_MODE',l_debug_mode);
2814: l_debug_mode := NVL(l_debug_mode, 'Y');
2815:
2816: /* bug 4227840: wrapping the setting of debug error stack call to
2817: * pa_debug under the debug enbaling check
2813: fnd_profile.get('PA_DEBUG_MODE',l_debug_mode);
2814: l_debug_mode := NVL(l_debug_mode, 'Y');
2815:
2816: /* bug 4227840: wrapping the setting of debug error stack call to
2817: * pa_debug under the debug enbaling check
2818: */
2819: IF l_debug_mode = 'Y' THEN
2820: -- set curr function
2821: pa_debug.set_curr_function(
2817: * pa_debug under the debug enbaling check
2818: */
2819: IF l_debug_mode = 'Y' THEN
2820: -- set curr function
2821: pa_debug.set_curr_function(
2822: p_function =>'PA_FP_MULTI_CURRENCY_PKG.Round_Budget_Line_Amounts'
2823: ,p_debug_mode => l_debug_mode );
2824: END IF;
2825:
2824: END IF;
2825:
2826: -- check for business rules violations
2827: IF l_debug_mode = 'Y' THEN
2828: pa_debug.g_err_stage:='Validating input parameters';
2829: pa_debug.write('Round_Budget_Line_Amounts: ' || g_module_name,pa_debug.g_err_stage,3);
2830: END IF;
2831:
2832: IF (p_budget_version_id IS NULL) OR (p_calling_context IS NULL) OR
2825:
2826: -- check for business rules violations
2827: IF l_debug_mode = 'Y' THEN
2828: pa_debug.g_err_stage:='Validating input parameters';
2829: pa_debug.write('Round_Budget_Line_Amounts: ' || g_module_name,pa_debug.g_err_stage,3);
2830: END IF;
2831:
2832: IF (p_budget_version_id IS NULL) OR (p_calling_context IS NULL) OR
2833: (p_calling_context NOT IN ('COPY_VERSION','CHANGE_ORDER_MERGE'))
2833: (p_calling_context NOT IN ('COPY_VERSION','CHANGE_ORDER_MERGE'))
2834: THEN
2835:
2836: IF l_debug_mode = 'Y' THEN
2837: pa_debug.g_err_stage:='p_budget_version_id = '||p_budget_version_id;
2838: pa_debug.write('Round_Budget_Line_Amounts: ' || g_module_name,pa_debug.g_err_stage,5);
2839:
2840: pa_debug.g_err_stage:='p_calling_context = '||p_calling_context;
2841: pa_debug.write('Round_Budget_Line_Amounts: ' || g_module_name,pa_debug.g_err_stage,5);
2834: THEN
2835:
2836: IF l_debug_mode = 'Y' THEN
2837: pa_debug.g_err_stage:='p_budget_version_id = '||p_budget_version_id;
2838: pa_debug.write('Round_Budget_Line_Amounts: ' || g_module_name,pa_debug.g_err_stage,5);
2839:
2840: pa_debug.g_err_stage:='p_calling_context = '||p_calling_context;
2841: pa_debug.write('Round_Budget_Line_Amounts: ' || g_module_name,pa_debug.g_err_stage,5);
2842: END IF;
2836: IF l_debug_mode = 'Y' THEN
2837: pa_debug.g_err_stage:='p_budget_version_id = '||p_budget_version_id;
2838: pa_debug.write('Round_Budget_Line_Amounts: ' || g_module_name,pa_debug.g_err_stage,5);
2839:
2840: pa_debug.g_err_stage:='p_calling_context = '||p_calling_context;
2841: pa_debug.write('Round_Budget_Line_Amounts: ' || g_module_name,pa_debug.g_err_stage,5);
2842: END IF;
2843:
2844: PA_UTILS.ADD_MESSAGE( p_app_short_name => 'PA',
2837: pa_debug.g_err_stage:='p_budget_version_id = '||p_budget_version_id;
2838: pa_debug.write('Round_Budget_Line_Amounts: ' || g_module_name,pa_debug.g_err_stage,5);
2839:
2840: pa_debug.g_err_stage:='p_calling_context = '||p_calling_context;
2841: pa_debug.write('Round_Budget_Line_Amounts: ' || g_module_name,pa_debug.g_err_stage,5);
2842: END IF;
2843:
2844: PA_UTILS.ADD_MESSAGE( p_app_short_name => 'PA',
2845: p_msg_name => 'PA_FP_INV_PARAM_PASSED',
2856: nvl(p_bls_inserted_after_id,0) <= 0 THEN
2857:
2858: IF l_debug_mode = 'Y' THEN
2859:
2860: pa_debug.g_err_stage:='p_bls_inserted_after_id = '||p_bls_inserted_after_id;
2861: pa_debug.write('Round_Budget_Line_Amounts: ' || g_module_name,pa_debug.g_err_stage,5);
2862:
2863: END IF;
2864:
2857:
2858: IF l_debug_mode = 'Y' THEN
2859:
2860: pa_debug.g_err_stage:='p_bls_inserted_after_id = '||p_bls_inserted_after_id;
2861: pa_debug.write('Round_Budget_Line_Amounts: ' || g_module_name,pa_debug.g_err_stage,5);
2862:
2863: END IF;
2864:
2865: PA_UTILS.ADD_MESSAGE( p_app_short_name => 'PA',
3223:
3224: END IF;
3225:
3226: IF l_debug_mode = 'Y' THEN
3227: pa_debug.g_err_stage:='Exiting Round_Budget_Line_Amounts';
3228: pa_debug.write('Round_Budget_Line_Amounts: ' || g_module_name,pa_debug.g_err_stage,3);
3229: END IF;
3230:
3231: /* bug 4227840: wrapping the setting of debug error stack call to
3224: END IF;
3225:
3226: IF l_debug_mode = 'Y' THEN
3227: pa_debug.g_err_stage:='Exiting Round_Budget_Line_Amounts';
3228: pa_debug.write('Round_Budget_Line_Amounts: ' || g_module_name,pa_debug.g_err_stage,3);
3229: END IF;
3230:
3231: /* bug 4227840: wrapping the setting of debug error stack call to
3232: * pa_debug under the debug enbaling check
3228: pa_debug.write('Round_Budget_Line_Amounts: ' || g_module_name,pa_debug.g_err_stage,3);
3229: END IF;
3230:
3231: /* bug 4227840: wrapping the setting of debug error stack call to
3232: * pa_debug under the debug enbaling check
3233: */
3234: IF l_debug_mode = 'Y' THEN
3235: -- reset curr function
3236: pa_debug.reset_curr_function();
3232: * pa_debug under the debug enbaling check
3233: */
3234: IF l_debug_mode = 'Y' THEN
3235: -- reset curr function
3236: pa_debug.reset_curr_function();
3237: END IF;
3238:
3239: EXCEPTION
3240:
3257:
3258: x_return_status := FND_API.G_RET_STS_ERROR;
3259:
3260: IF l_debug_mode = 'Y' THEN
3261: pa_debug.g_err_stage:='Invalid Arguments Passed Or called api raised an error';
3262: pa_debug.write('Round_Budget_Line_Amounts: ' || g_module_name,pa_debug.g_err_stage,5);
3263:
3264: END IF;
3265: /* bug 4227840: wrapping the setting of debug error stack call to
3258: x_return_status := FND_API.G_RET_STS_ERROR;
3259:
3260: IF l_debug_mode = 'Y' THEN
3261: pa_debug.g_err_stage:='Invalid Arguments Passed Or called api raised an error';
3262: pa_debug.write('Round_Budget_Line_Amounts: ' || g_module_name,pa_debug.g_err_stage,5);
3263:
3264: END IF;
3265: /* bug 4227840: wrapping the setting of debug error stack call to
3266: * pa_debug under the debug enbaling check
3262: pa_debug.write('Round_Budget_Line_Amounts: ' || g_module_name,pa_debug.g_err_stage,5);
3263:
3264: END IF;
3265: /* bug 4227840: wrapping the setting of debug error stack call to
3266: * pa_debug under the debug enbaling check
3267: */
3268: IF l_debug_mode = 'Y' THEN
3269: -- reset curr function
3270: pa_debug.reset_curr_function();
3266: * pa_debug under the debug enbaling check
3267: */
3268: IF l_debug_mode = 'Y' THEN
3269: -- reset curr function
3270: pa_debug.reset_curr_function();
3271: END IF;
3272: RETURN;
3273: WHEN Others THEN
3274: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
3278: FND_MSG_PUB.add_exc_msg( p_pkg_name => 'PA_FP_MULTI_CURRENCY_PKG'
3279: ,p_procedure_name => 'Round_Budget_Line_Amounts');
3280:
3281: IF l_debug_mode = 'Y' THEN
3282: pa_debug.g_err_stage:='Unexpected Error'||SQLERRM;
3283: pa_debug.write('Round_Budget_Line_Amounts: ' || g_module_name,pa_debug.g_err_stage,5);
3284: END IF;
3285:
3286: /* bug 4227840: wrapping the setting of debug error stack call to
3279: ,p_procedure_name => 'Round_Budget_Line_Amounts');
3280:
3281: IF l_debug_mode = 'Y' THEN
3282: pa_debug.g_err_stage:='Unexpected Error'||SQLERRM;
3283: pa_debug.write('Round_Budget_Line_Amounts: ' || g_module_name,pa_debug.g_err_stage,5);
3284: END IF;
3285:
3286: /* bug 4227840: wrapping the setting of debug error stack call to
3287: * pa_debug under the debug enbaling check
3283: pa_debug.write('Round_Budget_Line_Amounts: ' || g_module_name,pa_debug.g_err_stage,5);
3284: END IF;
3285:
3286: /* bug 4227840: wrapping the setting of debug error stack call to
3287: * pa_debug under the debug enbaling check
3288: */
3289: IF l_debug_mode = 'Y' THEN
3290: -- reset curr function
3291: pa_debug.Reset_Curr_Function();
3287: * pa_debug under the debug enbaling check
3288: */
3289: IF l_debug_mode = 'Y' THEN
3290: -- reset curr function
3291: pa_debug.Reset_Curr_Function();
3292: END IF;
3293: RAISE;
3294: END Round_Budget_Line_Amounts;
3295:
3338: BEGIN
3339: x_msg_count := 0;
3340: x_return_status := FND_API.G_RET_STS_SUCCESS;
3341:
3342: fnd_profile.get('PA_DEBUG_MODE',l_debug_mode);
3343: l_debug_mode := NVL(l_debug_mode, 'Y');
3344:
3345: /* bug 4227840: wrapping the setting of debug error stack call to
3346: * pa_debug under the debug enbaling check
3342: fnd_profile.get('PA_DEBUG_MODE',l_debug_mode);
3343: l_debug_mode := NVL(l_debug_mode, 'Y');
3344:
3345: /* bug 4227840: wrapping the setting of debug error stack call to
3346: * pa_debug under the debug enbaling check
3347: */
3348: IF l_debug_mode = 'Y' THEN
3349: -- Set curr function
3350: pa_debug.set_curr_function(
3346: * pa_debug under the debug enbaling check
3347: */
3348: IF l_debug_mode = 'Y' THEN
3349: -- Set curr function
3350: pa_debug.set_curr_function(
3351: p_function =>'pafpmcpb.round_amounts'
3352: ,p_debug_mode => l_debug_mode );
3353: END IF;
3354:
3352: ,p_debug_mode => l_debug_mode );
3353: END IF;
3354:
3355: IF l_debug_mode = 'Y' THEN
3356: pa_debug.g_err_stage:='Validating input parameters';
3357: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level3);
3358: END IF;
3359:
3360: --Currency codes should not be valid
3353: END IF;
3354:
3355: IF l_debug_mode = 'Y' THEN
3356: pa_debug.g_err_stage:='Validating input parameters';
3357: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level3);
3358: END IF;
3359:
3360: --Currency codes should not be valid
3361: IF p_agr_currency_code IS NULL OR
3363: p_projfunc_currency_code IS NULL THEN
3364:
3365: IF l_debug_mode = 'Y' THEN
3366:
3367: pa_debug.g_err_stage:='p_agr_currency_code '||p_agr_currency_code;
3368: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level5);
3369:
3370: pa_debug.g_err_stage:='p_project_currency_code '||p_project_currency_code;
3371: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level5);
3364:
3365: IF l_debug_mode = 'Y' THEN
3366:
3367: pa_debug.g_err_stage:='p_agr_currency_code '||p_agr_currency_code;
3368: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level5);
3369:
3370: pa_debug.g_err_stage:='p_project_currency_code '||p_project_currency_code;
3371: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level5);
3372:
3366:
3367: pa_debug.g_err_stage:='p_agr_currency_code '||p_agr_currency_code;
3368: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level5);
3369:
3370: pa_debug.g_err_stage:='p_project_currency_code '||p_project_currency_code;
3371: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level5);
3372:
3373: pa_debug.g_err_stage:='p_projfunc_currency_code '||p_projfunc_currency_code;
3374: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level5);
3367: pa_debug.g_err_stage:='p_agr_currency_code '||p_agr_currency_code;
3368: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level5);
3369:
3370: pa_debug.g_err_stage:='p_project_currency_code '||p_project_currency_code;
3371: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level5);
3372:
3373: pa_debug.g_err_stage:='p_projfunc_currency_code '||p_projfunc_currency_code;
3374: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level5);
3375:
3369:
3370: pa_debug.g_err_stage:='p_project_currency_code '||p_project_currency_code;
3371: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level5);
3372:
3373: pa_debug.g_err_stage:='p_projfunc_currency_code '||p_projfunc_currency_code;
3374: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level5);
3375:
3376: END IF;
3377:
3370: pa_debug.g_err_stage:='p_project_currency_code '||p_project_currency_code;
3371: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level5);
3372:
3373: pa_debug.g_err_stage:='p_projfunc_currency_code '||p_projfunc_currency_code;
3374: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level5);
3375:
3376: END IF;
3377:
3378: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
3398: px_txn_raw_cost_tbl.COUNT <> px_quantity_tbl.COUNT THEN
3399:
3400: IF l_debug_mode = 'Y' THEN
3401:
3402: pa_debug.g_err_stage:='px_txn_raw_cost_tbl.COUNT '||px_txn_raw_cost_tbl.COUNT;
3403: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level5);
3404:
3405: pa_debug.g_err_stage:='px_txn_burdened_cost_tbl.COUNT '||px_txn_burdened_cost_tbl.COUNT;
3406: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level5);
3399:
3400: IF l_debug_mode = 'Y' THEN
3401:
3402: pa_debug.g_err_stage:='px_txn_raw_cost_tbl.COUNT '||px_txn_raw_cost_tbl.COUNT;
3403: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level5);
3404:
3405: pa_debug.g_err_stage:='px_txn_burdened_cost_tbl.COUNT '||px_txn_burdened_cost_tbl.COUNT;
3406: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level5);
3407:
3401:
3402: pa_debug.g_err_stage:='px_txn_raw_cost_tbl.COUNT '||px_txn_raw_cost_tbl.COUNT;
3403: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level5);
3404:
3405: pa_debug.g_err_stage:='px_txn_burdened_cost_tbl.COUNT '||px_txn_burdened_cost_tbl.COUNT;
3406: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level5);
3407:
3408: pa_debug.g_err_stage:='px_txn_revenue_tbl.COUNT '||px_txn_revenue_tbl.COUNT;
3409: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level5);
3402: pa_debug.g_err_stage:='px_txn_raw_cost_tbl.COUNT '||px_txn_raw_cost_tbl.COUNT;
3403: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level5);
3404:
3405: pa_debug.g_err_stage:='px_txn_burdened_cost_tbl.COUNT '||px_txn_burdened_cost_tbl.COUNT;
3406: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level5);
3407:
3408: pa_debug.g_err_stage:='px_txn_revenue_tbl.COUNT '||px_txn_revenue_tbl.COUNT;
3409: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level5);
3410:
3404:
3405: pa_debug.g_err_stage:='px_txn_burdened_cost_tbl.COUNT '||px_txn_burdened_cost_tbl.COUNT;
3406: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level5);
3407:
3408: pa_debug.g_err_stage:='px_txn_revenue_tbl.COUNT '||px_txn_revenue_tbl.COUNT;
3409: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level5);
3410:
3411: pa_debug.g_err_stage:='px_project_raw_cost_tbl.COUNT '||px_project_raw_cost_tbl.COUNT;
3412: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level5);
3405: pa_debug.g_err_stage:='px_txn_burdened_cost_tbl.COUNT '||px_txn_burdened_cost_tbl.COUNT;
3406: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level5);
3407:
3408: pa_debug.g_err_stage:='px_txn_revenue_tbl.COUNT '||px_txn_revenue_tbl.COUNT;
3409: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level5);
3410:
3411: pa_debug.g_err_stage:='px_project_raw_cost_tbl.COUNT '||px_project_raw_cost_tbl.COUNT;
3412: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level5);
3413:
3407:
3408: pa_debug.g_err_stage:='px_txn_revenue_tbl.COUNT '||px_txn_revenue_tbl.COUNT;
3409: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level5);
3410:
3411: pa_debug.g_err_stage:='px_project_raw_cost_tbl.COUNT '||px_project_raw_cost_tbl.COUNT;
3412: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level5);
3413:
3414: pa_debug.g_err_stage:='px_project_burdened_cost_tbl.COUNT '||px_project_burdened_cost_tbl.COUNT;
3415: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level5);
3408: pa_debug.g_err_stage:='px_txn_revenue_tbl.COUNT '||px_txn_revenue_tbl.COUNT;
3409: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level5);
3410:
3411: pa_debug.g_err_stage:='px_project_raw_cost_tbl.COUNT '||px_project_raw_cost_tbl.COUNT;
3412: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level5);
3413:
3414: pa_debug.g_err_stage:='px_project_burdened_cost_tbl.COUNT '||px_project_burdened_cost_tbl.COUNT;
3415: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level5);
3416:
3410:
3411: pa_debug.g_err_stage:='px_project_raw_cost_tbl.COUNT '||px_project_raw_cost_tbl.COUNT;
3412: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level5);
3413:
3414: pa_debug.g_err_stage:='px_project_burdened_cost_tbl.COUNT '||px_project_burdened_cost_tbl.COUNT;
3415: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level5);
3416:
3417: pa_debug.g_err_stage:='px_project_revenue_tbl.COUNT '||px_project_revenue_tbl.COUNT;
3418: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level5);
3411: pa_debug.g_err_stage:='px_project_raw_cost_tbl.COUNT '||px_project_raw_cost_tbl.COUNT;
3412: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level5);
3413:
3414: pa_debug.g_err_stage:='px_project_burdened_cost_tbl.COUNT '||px_project_burdened_cost_tbl.COUNT;
3415: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level5);
3416:
3417: pa_debug.g_err_stage:='px_project_revenue_tbl.COUNT '||px_project_revenue_tbl.COUNT;
3418: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level5);
3419:
3413:
3414: pa_debug.g_err_stage:='px_project_burdened_cost_tbl.COUNT '||px_project_burdened_cost_tbl.COUNT;
3415: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level5);
3416:
3417: pa_debug.g_err_stage:='px_project_revenue_tbl.COUNT '||px_project_revenue_tbl.COUNT;
3418: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level5);
3419:
3420: pa_debug.g_err_stage:='px_projfunc_raw_cost_tbl.COUNT '||px_projfunc_raw_cost_tbl.COUNT;
3421: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level5);
3414: pa_debug.g_err_stage:='px_project_burdened_cost_tbl.COUNT '||px_project_burdened_cost_tbl.COUNT;
3415: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level5);
3416:
3417: pa_debug.g_err_stage:='px_project_revenue_tbl.COUNT '||px_project_revenue_tbl.COUNT;
3418: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level5);
3419:
3420: pa_debug.g_err_stage:='px_projfunc_raw_cost_tbl.COUNT '||px_projfunc_raw_cost_tbl.COUNT;
3421: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level5);
3422:
3416:
3417: pa_debug.g_err_stage:='px_project_revenue_tbl.COUNT '||px_project_revenue_tbl.COUNT;
3418: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level5);
3419:
3420: pa_debug.g_err_stage:='px_projfunc_raw_cost_tbl.COUNT '||px_projfunc_raw_cost_tbl.COUNT;
3421: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level5);
3422:
3423: pa_debug.g_err_stage:='px_projfunc_burdened_cost_tbl.COUNT '||px_projfunc_burdened_cost_tbl.COUNT;
3424: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level5);
3417: pa_debug.g_err_stage:='px_project_revenue_tbl.COUNT '||px_project_revenue_tbl.COUNT;
3418: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level5);
3419:
3420: pa_debug.g_err_stage:='px_projfunc_raw_cost_tbl.COUNT '||px_projfunc_raw_cost_tbl.COUNT;
3421: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level5);
3422:
3423: pa_debug.g_err_stage:='px_projfunc_burdened_cost_tbl.COUNT '||px_projfunc_burdened_cost_tbl.COUNT;
3424: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level5);
3425:
3419:
3420: pa_debug.g_err_stage:='px_projfunc_raw_cost_tbl.COUNT '||px_projfunc_raw_cost_tbl.COUNT;
3421: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level5);
3422:
3423: pa_debug.g_err_stage:='px_projfunc_burdened_cost_tbl.COUNT '||px_projfunc_burdened_cost_tbl.COUNT;
3424: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level5);
3425:
3426: pa_debug.g_err_stage:='px_projfunc_revenue_tbl.COUNT '||px_projfunc_revenue_tbl.COUNT;
3427: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level5);
3420: pa_debug.g_err_stage:='px_projfunc_raw_cost_tbl.COUNT '||px_projfunc_raw_cost_tbl.COUNT;
3421: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level5);
3422:
3423: pa_debug.g_err_stage:='px_projfunc_burdened_cost_tbl.COUNT '||px_projfunc_burdened_cost_tbl.COUNT;
3424: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level5);
3425:
3426: pa_debug.g_err_stage:='px_projfunc_revenue_tbl.COUNT '||px_projfunc_revenue_tbl.COUNT;
3427: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level5);
3428:
3422:
3423: pa_debug.g_err_stage:='px_projfunc_burdened_cost_tbl.COUNT '||px_projfunc_burdened_cost_tbl.COUNT;
3424: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level5);
3425:
3426: pa_debug.g_err_stage:='px_projfunc_revenue_tbl.COUNT '||px_projfunc_revenue_tbl.COUNT;
3427: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level5);
3428:
3429: END IF;
3430:
3423: pa_debug.g_err_stage:='px_projfunc_burdened_cost_tbl.COUNT '||px_projfunc_burdened_cost_tbl.COUNT;
3424: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level5);
3425:
3426: pa_debug.g_err_stage:='px_projfunc_revenue_tbl.COUNT '||px_projfunc_revenue_tbl.COUNT;
3427: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level5);
3428:
3429: END IF;
3430:
3431: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
3442: IF px_txn_raw_cost_tbl.COUNT=0 THEN
3443:
3444: IF l_debug_mode = 'Y' THEN
3445:
3446: pa_debug.g_err_stage:='Input tbls are empty. Returning';
3447: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level3);
3448:
3449: END IF;
3450: /* bug 4227840: wrapping the setting of debug error stack call to
3443:
3444: IF l_debug_mode = 'Y' THEN
3445:
3446: pa_debug.g_err_stage:='Input tbls are empty. Returning';
3447: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level3);
3448:
3449: END IF;
3450: /* bug 4227840: wrapping the setting of debug error stack call to
3451: * pa_debug under the debug enbaling check
3447: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level3);
3448:
3449: END IF;
3450: /* bug 4227840: wrapping the setting of debug error stack call to
3451: * pa_debug under the debug enbaling check
3452: */
3453: IF l_debug_mode = 'Y' THEN
3454: pa_debug.reset_curr_function;
3455: END IF;
3450: /* bug 4227840: wrapping the setting of debug error stack call to
3451: * pa_debug under the debug enbaling check
3452: */
3453: IF l_debug_mode = 'Y' THEN
3454: pa_debug.reset_curr_function;
3455: END IF;
3456: RETURN;
3457:
3458: END IF;
3458: END IF;
3459:
3460: --Round the quantity
3461: IF l_debug_mode = 'Y' THEN
3462: pa_debug.g_err_stage:='Rounding Quantity';
3463: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level3);
3464: END IF;
3465:
3466: FOR i IN 1..px_quantity_tbl.COUNT LOOP
3459:
3460: --Round the quantity
3461: IF l_debug_mode = 'Y' THEN
3462: pa_debug.g_err_stage:='Rounding Quantity';
3463: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level3);
3464: END IF;
3465:
3466: FOR i IN 1..px_quantity_tbl.COUNT LOOP
3467:
3477: --of caching logic in Pa_currency.round_trans_currency_amt1
3478:
3479: --Round the agr currency amounts.
3480: IF l_debug_mode = 'Y' THEN
3481: pa_debug.g_err_stage:='Rounding agr amounts';
3482: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level3);
3483: END IF;
3484:
3485: --Code changes for bug 4200168 starts here.
3478:
3479: --Round the agr currency amounts.
3480: IF l_debug_mode = 'Y' THEN
3481: pa_debug.g_err_stage:='Rounding agr amounts';
3482: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level3);
3483: END IF;
3484:
3485: --Code changes for bug 4200168 starts here.
3486:
3505:
3506:
3507: --Round the project currency amounts.
3508: IF l_debug_mode = 'Y' THEN
3509: pa_debug.g_err_stage:='Rounding project amounts';
3510: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level3);
3511: END IF;
3512:
3513: IF p_agr_currency_code=p_project_currency_code THEN
3506:
3507: --Round the project currency amounts.
3508: IF l_debug_mode = 'Y' THEN
3509: pa_debug.g_err_stage:='Rounding project amounts';
3510: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level3);
3511: END IF;
3512:
3513: IF p_agr_currency_code=p_project_currency_code THEN
3514:
3535: END IF;
3536:
3537: --Round the Project Functional Currency Amounts
3538: IF l_debug_mode = 'Y' THEN
3539: pa_debug.g_err_stage:='Rounding project functional amounts';
3540: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level3);
3541: END IF;
3542:
3543: IF p_agr_currency_code=p_projfunc_currency_code THEN
3536:
3537: --Round the Project Functional Currency Amounts
3538: IF l_debug_mode = 'Y' THEN
3539: pa_debug.g_err_stage:='Rounding project functional amounts';
3540: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level3);
3541: END IF;
3542:
3543: IF p_agr_currency_code=p_projfunc_currency_code THEN
3544:
3569: --Code changes for bug 4200168 starts here.
3570: END IF;
3571:
3572: IF l_debug_mode = 'Y' THEN
3573: pa_debug.g_err_stage:='Exiting round_amounts';
3574: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level3);
3575: END IF;
3576: /* bug 4227840: wrapping the setting of debug error stack call to
3577: * pa_debug under the debug enbaling check
3570: END IF;
3571:
3572: IF l_debug_mode = 'Y' THEN
3573: pa_debug.g_err_stage:='Exiting round_amounts';
3574: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level3);
3575: END IF;
3576: /* bug 4227840: wrapping the setting of debug error stack call to
3577: * pa_debug under the debug enbaling check
3578: */
3573: pa_debug.g_err_stage:='Exiting round_amounts';
3574: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level3);
3575: END IF;
3576: /* bug 4227840: wrapping the setting of debug error stack call to
3577: * pa_debug under the debug enbaling check
3578: */
3579: IF l_debug_mode = 'Y' THEN
3580: -- reset curr function
3581: pa_debug.reset_curr_function;
3577: * pa_debug under the debug enbaling check
3578: */
3579: IF l_debug_mode = 'Y' THEN
3580: -- reset curr function
3581: pa_debug.reset_curr_function;
3582: END IF;
3583: EXCEPTION
3584:
3585: WHEN PA_FP_CONSTANTS_PKG.Invalid_Arg_Exc THEN
3600: END IF;
3601: x_return_status := FND_API.G_RET_STS_ERROR;
3602:
3603: IF l_debug_mode = 'Y' THEN
3604: pa_debug.g_err_stage:='Invalid Arguments Passed Or called api raised an error';
3605: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level5);
3606:
3607: END IF;
3608: /* bug 4227840: wrapping the setting of debug error stack call to
3601: x_return_status := FND_API.G_RET_STS_ERROR;
3602:
3603: IF l_debug_mode = 'Y' THEN
3604: pa_debug.g_err_stage:='Invalid Arguments Passed Or called api raised an error';
3605: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level5);
3606:
3607: END IF;
3608: /* bug 4227840: wrapping the setting of debug error stack call to
3609: * pa_debug under the debug enbaling check
3605: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level5);
3606:
3607: END IF;
3608: /* bug 4227840: wrapping the setting of debug error stack call to
3609: * pa_debug under the debug enbaling check
3610: */
3611: IF l_debug_mode = 'Y' THEN
3612: -- reset curr function
3613: pa_debug.reset_curr_function();
3609: * pa_debug under the debug enbaling check
3610: */
3611: IF l_debug_mode = 'Y' THEN
3612: -- reset curr function
3613: pa_debug.reset_curr_function();
3614: END IF;
3615: RETURN;
3616: WHEN OTHERS THEN
3617:
3622: FND_MSG_PUB.add_exc_msg( p_pkg_name => 'PA_FP_MULTI_CURRENCY_PKG'
3623: ,p_procedure_name => 'round_amounts');
3624:
3625: IF l_debug_mode = 'Y' THEN
3626: pa_debug.g_err_stage:='Unexpected Error'||SQLERRM;
3627: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level5);
3628: END IF;
3629: /* bug 4227840: wrapping the setting of debug error stack call to
3630: * pa_debug under the debug enbaling check
3623: ,p_procedure_name => 'round_amounts');
3624:
3625: IF l_debug_mode = 'Y' THEN
3626: pa_debug.g_err_stage:='Unexpected Error'||SQLERRM;
3627: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level5);
3628: END IF;
3629: /* bug 4227840: wrapping the setting of debug error stack call to
3630: * pa_debug under the debug enbaling check
3631: */
3626: pa_debug.g_err_stage:='Unexpected Error'||SQLERRM;
3627: pa_debug.write( l_module_name,pa_debug.g_err_stage,l_debug_level5);
3628: END IF;
3629: /* bug 4227840: wrapping the setting of debug error stack call to
3630: * pa_debug under the debug enbaling check
3631: */
3632: IF l_debug_mode = 'Y' THEN
3633: -- reset curr function
3634: pa_debug.Reset_Curr_Function();
3630: * pa_debug under the debug enbaling check
3631: */
3632: IF l_debug_mode = 'Y' THEN
3633: -- reset curr function
3634: pa_debug.Reset_Curr_Function();
3635: END IF;
3636: RAISE;
3637:
3638: END round_amounts;