DBA Data[Home] [Help]

APPS.PA_FP_SPREAD_AMTS_PKG dependencies on PA_DEBUG

Line 5: P_PA_DEBUG_MODE varchar2(1) := NVL(FND_PROFILE.value('PA_DEBUG_MODE'), 'N');

1: PACKAGE BODY PA_FP_SPREAD_AMTS_PKG AS
2: --$Header: PAFPSCPB.pls 120.6.12010000.2 2008/10/14 13:34:56 spaladug ship $
3:
4: g_module_name VARCHAR2(100) := 'pa.plsql.PA_FP_SPREAD_AMTS_PKG';
5: P_PA_DEBUG_MODE varchar2(1) := NVL(FND_PROFILE.value('PA_DEBUG_MODE'), 'N');
6: G_rate_based_flag Varchar2(10) := NULL;
7: G_Curr_code Varchar2(80) := NULL;
8: G_User_Id Number:= fnd_global.user_id;
9: G_Login_Id Number:= fnd_global.login_id;

Line 164: --IF P_PA_DEBUG_MODE = 'Y' Then

160: procedure calc_log(p_msg varchar2) IS
161:
162: pragma autonomous_transaction ;
163: BEGIN
164: --IF P_PA_DEBUG_MODE = 'Y' Then
165: NULL;
166: INSERT INTO PA_FP_CALCULATE_LOG
167: (SESSIONID
168: ,SEQ_NUMBER

Line 184: IF P_PA_DEBUG_MODE = 'Y' Then

180: procedure PRINT_MSG(P_MSG VARCHAR2) is
181:
182: BEGIN
183: --calc_log(P_MSG);
184: IF P_PA_DEBUG_MODE = 'Y' Then
185: pa_debug.g_err_stage := substr('LOG:'||p_msg,1,240);
186: PA_DEBUG.write
187: (x_Module => g_module_name
188: ,x_Msg => pa_debug.g_err_stage

Line 185: pa_debug.g_err_stage := substr('LOG:'||p_msg,1,240);

181:
182: BEGIN
183: --calc_log(P_MSG);
184: IF P_PA_DEBUG_MODE = 'Y' Then
185: pa_debug.g_err_stage := substr('LOG:'||p_msg,1,240);
186: PA_DEBUG.write
187: (x_Module => g_module_name
188: ,x_Msg => pa_debug.g_err_stage
189: ,x_Log_Level => 3);

Line 186: PA_DEBUG.write

182: BEGIN
183: --calc_log(P_MSG);
184: IF P_PA_DEBUG_MODE = 'Y' Then
185: pa_debug.g_err_stage := substr('LOG:'||p_msg,1,240);
186: PA_DEBUG.write
187: (x_Module => g_module_name
188: ,x_Msg => pa_debug.g_err_stage
189: ,x_Log_Level => 3);
190: null;

Line 188: ,x_Msg => pa_debug.g_err_stage

184: IF P_PA_DEBUG_MODE = 'Y' Then
185: pa_debug.g_err_stage := substr('LOG:'||p_msg,1,240);
186: PA_DEBUG.write
187: (x_Module => g_module_name
188: ,x_Msg => pa_debug.g_err_stage
189: ,x_Log_Level => 3);
190: null;
191: END IF;
192: END PRINT_MSG;

Line 288: If p_pa_debug_mode = 'Y' Then

284: print_msg('Unexpected error in Process_Rounding_Diff ['||sqlcode||sqlerrm||']');
285: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
286: FND_MSG_PUB.add_exc_msg(p_pkg_name => 'PA_FP_SPREAD_AMTS_PKG',
287: p_procedure_name => 'Process_Rounding_Diff'||l_stage);
288: If p_pa_debug_mode = 'Y' Then
289: pa_debug.reset_err_stack;
290: End If;
291: raise FND_API.G_EXC_UNEXPECTED_ERROR;
292:

Line 289: pa_debug.reset_err_stack;

285: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
286: FND_MSG_PUB.add_exc_msg(p_pkg_name => 'PA_FP_SPREAD_AMTS_PKG',
287: p_procedure_name => 'Process_Rounding_Diff'||l_stage);
288: If p_pa_debug_mode = 'Y' Then
289: pa_debug.reset_err_stack;
290: End If;
291: raise FND_API.G_EXC_UNEXPECTED_ERROR;
292:
293: END Process_Rounding_Diff;

Line 430: If p_pa_debug_mode = 'Y' Then

426: print_msg('Unexpected error in blkInsertBudgetLines['||sqlcode||sqlerrm||']');
427: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
428: FND_MSG_PUB.add_exc_msg(p_pkg_name => 'PA_FP_SPREAD_AMTS_PKG',
429: p_procedure_name => 'blkInsertBudgetLines'||l_stage);
430: If p_pa_debug_mode = 'Y' Then
431: pa_debug.reset_err_stack;
432: End If;
433: raise FND_API.G_EXC_UNEXPECTED_ERROR;
434: END blkInsertBudgetLines;

Line 431: pa_debug.reset_err_stack;

427: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
428: FND_MSG_PUB.add_exc_msg(p_pkg_name => 'PA_FP_SPREAD_AMTS_PKG',
429: p_procedure_name => 'blkInsertBudgetLines'||l_stage);
430: If p_pa_debug_mode = 'Y' Then
431: pa_debug.reset_err_stack;
432: End If;
433: raise FND_API.G_EXC_UNEXPECTED_ERROR;
434: END blkInsertBudgetLines;
435:

Line 509: If p_pa_debug_mode = 'Y' Then

505: print_msg('Unexpected error in blkInsertFpLines['||sqlcode||sqlerrm||']');
506: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
507: FND_MSG_PUB.add_exc_msg(p_pkg_name => 'PA_FP_SPREAD_AMTS_PKG',
508: p_procedure_name => 'blkInsertFpLines'||l_stage);
509: If p_pa_debug_mode = 'Y' Then
510: pa_debug.reset_err_stack;
511: End If;
512: raise FND_API.G_EXC_UNEXPECTED_ERROR;
513:

Line 510: pa_debug.reset_err_stack;

506: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
507: FND_MSG_PUB.add_exc_msg(p_pkg_name => 'PA_FP_SPREAD_AMTS_PKG',
508: p_procedure_name => 'blkInsertFpLines'||l_stage);
509: If p_pa_debug_mode = 'Y' Then
510: pa_debug.reset_err_stack;
511: End If;
512: raise FND_API.G_EXC_UNEXPECTED_ERROR;
513:
514: END blkInsertFpLines;

Line 808: If p_pa_debug_mode = 'Y' Then

804: print_msg('Unexpected error in blkInsertBlFpLines['||sqlcode||sqlerrm||']');
805: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
806: FND_MSG_PUB.add_exc_msg(p_pkg_name => 'PA_FP_SPREAD_AMTS_PKG',
807: p_procedure_name => 'blkInsertBlFpLines'||l_stage);
808: If p_pa_debug_mode = 'Y' Then
809: pa_debug.reset_err_stack;
810: End If;
811: raise FND_API.G_EXC_UNEXPECTED_ERROR;
812:

Line 809: pa_debug.reset_err_stack;

805: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
806: FND_MSG_PUB.add_exc_msg(p_pkg_name => 'PA_FP_SPREAD_AMTS_PKG',
807: p_procedure_name => 'blkInsertBlFpLines'||l_stage);
808: If p_pa_debug_mode = 'Y' Then
809: pa_debug.reset_err_stack;
810: End If;
811: raise FND_API.G_EXC_UNEXPECTED_ERROR;
812:
813: END blkInsertBlFpLines;

Line 866: If p_pa_debug_mode = 'Y' Then

862: print_msg(l_stage||sqlcode||sqlerrm);
863: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
864: FND_MSG_PUB.add_exc_msg(p_pkg_name => 'PA_FP_SPREAD_AMTS_PKG',
865: p_procedure_name => 'insert_budget_line'||l_stage);
866: If p_pa_debug_mode = 'Y' Then
867: pa_debug.reset_err_stack;
868: End If;
869: raise FND_API.G_EXC_UNEXPECTED_ERROR;
870:

Line 867: pa_debug.reset_err_stack;

863: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
864: FND_MSG_PUB.add_exc_msg(p_pkg_name => 'PA_FP_SPREAD_AMTS_PKG',
865: p_procedure_name => 'insert_budget_line'||l_stage);
866: If p_pa_debug_mode = 'Y' Then
867: pa_debug.reset_err_stack;
868: End If;
869: raise FND_API.G_EXC_UNEXPECTED_ERROR;
870:
871: END insert_budget_line;

Line 924: If p_pa_debug_mode = 'Y' Then

920:
921: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
922: FND_MSG_PUB.add_exc_msg(p_pkg_name => 'PA_FP_SPREAD_AMTS_PKG',
923: p_procedure_name => 'insert_rollup_tmp()'||l_stage);
924: If p_pa_debug_mode = 'Y' Then
925: pa_debug.reset_err_stack;
926: End If;
927: raise FND_API.G_EXC_UNEXPECTED_ERROR;
928:

Line 925: pa_debug.reset_err_stack;

921: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
922: FND_MSG_PUB.add_exc_msg(p_pkg_name => 'PA_FP_SPREAD_AMTS_PKG',
923: p_procedure_name => 'insert_rollup_tmp()'||l_stage);
924: If p_pa_debug_mode = 'Y' Then
925: pa_debug.reset_err_stack;
926: End If;
927: raise FND_API.G_EXC_UNEXPECTED_ERROR;
928:
929: END insert_rollup_tmp;

Line 983: If p_pa_debug_mode = 'Y' Then

979: WHEN OTHERS THEN
980: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
981: FND_MSG_PUB.add_exc_msg(p_pkg_name => 'PA_FP_SPREAD_AMTS_PKG',
982: p_procedure_name => 'insert_rollup_tmp_with_bl()'||l_stage);
983: If p_pa_debug_mode = 'Y' Then
984: pa_debug.reset_err_stack;
985: End If;
986: raise FND_API.G_EXC_UNEXPECTED_ERROR;
987:

Line 984: pa_debug.reset_err_stack;

980: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
981: FND_MSG_PUB.add_exc_msg(p_pkg_name => 'PA_FP_SPREAD_AMTS_PKG',
982: p_procedure_name => 'insert_rollup_tmp_with_bl()'||l_stage);
983: If p_pa_debug_mode = 'Y' Then
984: pa_debug.reset_err_stack;
985: End If;
986: raise FND_API.G_EXC_UNEXPECTED_ERROR;
987:
988: END insert_rollup_tmp_with_bl;

Line 1078: If p_pa_debug_mode = 'Y' Then

1074: BEGIN
1075: l_stage := 10;
1076: print_msg(' '||l_stage||' enter spread()');
1077: x_return_status := FND_API.G_RET_STS_SUCCESS;
1078: If p_pa_debug_mode = 'Y' Then
1079: pa_debug.init_err_stack('PA_FP_SPREAD_AMTS_PKG.spread');
1080: End If;
1081:
1082: fnd_profile.get('PA_DEBUG_MODE', l_debug_mode);

Line 1079: pa_debug.init_err_stack('PA_FP_SPREAD_AMTS_PKG.spread');

1075: l_stage := 10;
1076: print_msg(' '||l_stage||' enter spread()');
1077: x_return_status := FND_API.G_RET_STS_SUCCESS;
1078: If p_pa_debug_mode = 'Y' Then
1079: pa_debug.init_err_stack('PA_FP_SPREAD_AMTS_PKG.spread');
1080: End If;
1081:
1082: fnd_profile.get('PA_DEBUG_MODE', l_debug_mode);
1083: pa_debug.set_process('PLSQL', 'LOG', l_debug_mode);

Line 1082: fnd_profile.get('PA_DEBUG_MODE', l_debug_mode);

1078: If p_pa_debug_mode = 'Y' Then
1079: pa_debug.init_err_stack('PA_FP_SPREAD_AMTS_PKG.spread');
1080: End If;
1081:
1082: fnd_profile.get('PA_DEBUG_MODE', l_debug_mode);
1083: pa_debug.set_process('PLSQL', 'LOG', l_debug_mode);
1084:
1085: pa_debug.g_err_stage := 'Entered PA_FP_SPREAD_AMTS_PKG.spread';
1086: IF P_PA_DEBUG_MODE = 'Y' THEN

Line 1083: pa_debug.set_process('PLSQL', 'LOG', l_debug_mode);

1079: pa_debug.init_err_stack('PA_FP_SPREAD_AMTS_PKG.spread');
1080: End If;
1081:
1082: fnd_profile.get('PA_DEBUG_MODE', l_debug_mode);
1083: pa_debug.set_process('PLSQL', 'LOG', l_debug_mode);
1084:
1085: pa_debug.g_err_stage := 'Entered PA_FP_SPREAD_AMTS_PKG.spread';
1086: IF P_PA_DEBUG_MODE = 'Y' THEN
1087: pa_debug.write('spread: '||g_module_name,

Line 1085: pa_debug.g_err_stage := 'Entered PA_FP_SPREAD_AMTS_PKG.spread';

1081:
1082: fnd_profile.get('PA_DEBUG_MODE', l_debug_mode);
1083: pa_debug.set_process('PLSQL', 'LOG', l_debug_mode);
1084:
1085: pa_debug.g_err_stage := 'Entered PA_FP_SPREAD_AMTS_PKG.spread';
1086: IF P_PA_DEBUG_MODE = 'Y' THEN
1087: pa_debug.write('spread: '||g_module_name,
1088: pa_debug.g_err_stage,
1089: 3);

Line 1086: IF P_PA_DEBUG_MODE = 'Y' THEN

1082: fnd_profile.get('PA_DEBUG_MODE', l_debug_mode);
1083: pa_debug.set_process('PLSQL', 'LOG', l_debug_mode);
1084:
1085: pa_debug.g_err_stage := 'Entered PA_FP_SPREAD_AMTS_PKG.spread';
1086: IF P_PA_DEBUG_MODE = 'Y' THEN
1087: pa_debug.write('spread: '||g_module_name,
1088: pa_debug.g_err_stage,
1089: 3);
1090: END IF;

Line 1087: pa_debug.write('spread: '||g_module_name,

1083: pa_debug.set_process('PLSQL', 'LOG', l_debug_mode);
1084:
1085: pa_debug.g_err_stage := 'Entered PA_FP_SPREAD_AMTS_PKG.spread';
1086: IF P_PA_DEBUG_MODE = 'Y' THEN
1087: pa_debug.write('spread: '||g_module_name,
1088: pa_debug.g_err_stage,
1089: 3);
1090: END IF;
1091:

Line 1088: pa_debug.g_err_stage,

1084:
1085: pa_debug.g_err_stage := 'Entered PA_FP_SPREAD_AMTS_PKG.spread';
1086: IF P_PA_DEBUG_MODE = 'Y' THEN
1087: pa_debug.write('spread: '||g_module_name,
1088: pa_debug.g_err_stage,
1089: 3);
1090: END IF;
1091:
1092: l_stage := 20;

Line 1136: If p_pa_debug_mode = 'Y' Then

1132: IF NOT p_number_of_amounts BETWEEN 1 AND 10 THEN
1133:
1134: x_return_status := FND_API.G_RET_STS_ERROR;
1135: x_msg_data := 'PA_FP_NUM_OF_AMTS_OVERFLOW';
1136: If p_pa_debug_mode = 'Y' Then
1137: pa_debug.reset_err_stack;
1138: End If;
1139: RETURN;
1140: END IF;

Line 1137: pa_debug.reset_err_stack;

1133:
1134: x_return_status := FND_API.G_RET_STS_ERROR;
1135: x_msg_data := 'PA_FP_NUM_OF_AMTS_OVERFLOW';
1136: If p_pa_debug_mode = 'Y' Then
1137: pa_debug.reset_err_stack;
1138: End If;
1139: RETURN;
1140: END IF;
1141:

Line 1150: If p_pa_debug_mode = 'Y' Then

1146: -- and they cannot overlap each other.
1147: IF p_start_end_date IS NULL THEN
1148: x_return_status := FND_API.G_RET_STS_ERROR;
1149: x_msg_data := 'PA_FP_PLAN_START_END_DATE_NULL';
1150: If p_pa_debug_mode = 'Y' Then
1151: pa_debug.reset_err_stack;
1152: End If;
1153: RETURN;
1154: END IF;

Line 1151: pa_debug.reset_err_stack;

1147: IF p_start_end_date IS NULL THEN
1148: x_return_status := FND_API.G_RET_STS_ERROR;
1149: x_msg_data := 'PA_FP_PLAN_START_END_DATE_NULL';
1150: If p_pa_debug_mode = 'Y' Then
1151: pa_debug.reset_err_stack;
1152: End If;
1153: RETURN;
1154: END IF;
1155: FOR k IN 1 .. p_start_end_date.COUNT()

Line 1168: If p_pa_debug_mode = 'Y' Then

1164: p_start_end_date(k).end_date THEN
1165:
1166: x_return_status := FND_API.G_RET_STS_ERROR;
1167: x_msg_data := 'PA_FP_START_END_DATE_OVERLAP';
1168: If p_pa_debug_mode = 'Y' Then
1169: pa_debug.reset_err_stack;
1170: End If;
1171: RETURN;
1172: END IF;

Line 1169: pa_debug.reset_err_stack;

1165:
1166: x_return_status := FND_API.G_RET_STS_ERROR;
1167: x_msg_data := 'PA_FP_START_END_DATE_OVERLAP';
1168: If p_pa_debug_mode = 'Y' Then
1169: pa_debug.reset_err_stack;
1170: End If;
1171: RETURN;
1172: END IF;
1173: END LOOP;

Line 1193: If p_pa_debug_mode = 'Y' Then

1189: IF (x_spread_amounts IS NULL OR x_spread_amounts.COUNT() = 0 ) THEN
1190: x_return_status := FND_API.G_RET_STS_ERROR;
1191: x_msg_data := 'PA_FP_PERIODS_IS_NULL';
1192: print_msg('x_msg_data['||x_msg_data||']');
1193: If p_pa_debug_mode = 'Y' Then
1194: pa_debug.reset_err_stack;
1195: End If;
1196: RETURN;
1197: END IF;

Line 1194: pa_debug.reset_err_stack;

1190: x_return_status := FND_API.G_RET_STS_ERROR;
1191: x_msg_data := 'PA_FP_PERIODS_IS_NULL';
1192: print_msg('x_msg_data['||x_msg_data||']');
1193: If p_pa_debug_mode = 'Y' Then
1194: pa_debug.reset_err_stack;
1195: End If;
1196: RETURN;
1197: END IF;
1198: --print_msg('Count of x_spread_amounts.COUNT()['||x_spread_amounts.COUNT()||']');

Line 1212: If p_pa_debug_mode = 'Y' Then

1208: x_spread_amounts(k).end_date THEN
1209:
1210: x_return_status := FND_API.G_RET_STS_ERROR;
1211: x_msg_data := 'PA_FP_START_END_DATE_NOT_MATCH';
1212: If p_pa_debug_mode = 'Y' Then
1213: pa_debug.reset_err_stack;
1214: End If;
1215: --print_msg('x_msg_data['||x_msg_data||']');
1216: RETURN;

Line 1213: pa_debug.reset_err_stack;

1209:
1210: x_return_status := FND_API.G_RET_STS_ERROR;
1211: x_msg_data := 'PA_FP_START_END_DATE_NOT_MATCH';
1212: If p_pa_debug_mode = 'Y' Then
1213: pa_debug.reset_err_stack;
1214: End If;
1215: --print_msg('x_msg_data['||x_msg_data||']');
1216: RETURN;
1217: END IF;

Line 1227: If p_pa_debug_mode = 'Y' Then

1223:
1224: x_return_status := FND_API.G_RET_STS_ERROR;
1225: x_msg_data := 'PA_FP_START_END_DATE_NOT_MATCH';
1226: --print_msg('x_msg_data['||x_msg_data||']');
1227: If p_pa_debug_mode = 'Y' Then
1228: pa_debug.reset_err_stack;
1229: End If;
1230: RETURN;
1231: END IF;

Line 1228: pa_debug.reset_err_stack;

1224: x_return_status := FND_API.G_RET_STS_ERROR;
1225: x_msg_data := 'PA_FP_START_END_DATE_NOT_MATCH';
1226: --print_msg('x_msg_data['||x_msg_data||']');
1227: If p_pa_debug_mode = 'Y' Then
1228: pa_debug.reset_err_stack;
1229: End If;
1230: RETURN;
1231: END IF;
1232:

Line 1251: If p_pa_debug_mode = 'Y' Then

1247:
1248: x_return_status := FND_API.G_RET_STS_ERROR;
1249: x_msg_data := 'PA_FP_PERIOD_NO_MATCH';
1250: print_msg('x_msg_data['||x_msg_data||']');
1251: If p_pa_debug_mode = 'Y' Then
1252: pa_debug.reset_err_stack;
1253: End If;
1254: RETURN;
1255: END IF;

Line 1252: pa_debug.reset_err_stack;

1248: x_return_status := FND_API.G_RET_STS_ERROR;
1249: x_msg_data := 'PA_FP_PERIOD_NO_MATCH';
1250: print_msg('x_msg_data['||x_msg_data||']');
1251: If p_pa_debug_mode = 'Y' Then
1252: pa_debug.reset_err_stack;
1253: End If;
1254: RETURN;
1255: END IF;
1256: l_start_period := p_start_period;

Line 1888: pa_debug.g_err_stage := 'Leaving PA_FP_SPREAD_AMTS_PKG.spread';

1884: END IF;
1885:
1886: END LOOP;
1887:
1888: pa_debug.g_err_stage := 'Leaving PA_FP_SPREAD_AMTS_PKG.spread';
1889: IF P_PA_DEBUG_MODE = 'Y' THEN
1890: pa_debug.write('spread: '||g_module_name,
1891: pa_debug.g_err_stage,
1892: 3);

Line 1889: IF P_PA_DEBUG_MODE = 'Y' THEN

1885:
1886: END LOOP;
1887:
1888: pa_debug.g_err_stage := 'Leaving PA_FP_SPREAD_AMTS_PKG.spread';
1889: IF P_PA_DEBUG_MODE = 'Y' THEN
1890: pa_debug.write('spread: '||g_module_name,
1891: pa_debug.g_err_stage,
1892: 3);
1893: END IF;

Line 1890: pa_debug.write('spread: '||g_module_name,

1886: END LOOP;
1887:
1888: pa_debug.g_err_stage := 'Leaving PA_FP_SPREAD_AMTS_PKG.spread';
1889: IF P_PA_DEBUG_MODE = 'Y' THEN
1890: pa_debug.write('spread: '||g_module_name,
1891: pa_debug.g_err_stage,
1892: 3);
1893: END IF;
1894: If p_pa_debug_mode = 'Y' Then

Line 1891: pa_debug.g_err_stage,

1887:
1888: pa_debug.g_err_stage := 'Leaving PA_FP_SPREAD_AMTS_PKG.spread';
1889: IF P_PA_DEBUG_MODE = 'Y' THEN
1890: pa_debug.write('spread: '||g_module_name,
1891: pa_debug.g_err_stage,
1892: 3);
1893: END IF;
1894: If p_pa_debug_mode = 'Y' Then
1895: pa_debug.reset_err_stack;

Line 1894: If p_pa_debug_mode = 'Y' Then

1890: pa_debug.write('spread: '||g_module_name,
1891: pa_debug.g_err_stage,
1892: 3);
1893: END IF;
1894: If p_pa_debug_mode = 'Y' Then
1895: pa_debug.reset_err_stack;
1896: End If;
1897: l_stage := 140;
1898: print_msg(' '||l_stage||' leave spread()');

Line 1895: pa_debug.reset_err_stack;

1891: pa_debug.g_err_stage,
1892: 3);
1893: END IF;
1894: If p_pa_debug_mode = 'Y' Then
1895: pa_debug.reset_err_stack;
1896: End If;
1897: l_stage := 140;
1898: print_msg(' '||l_stage||' leave spread()');
1899:

Line 1907: If p_pa_debug_mode = 'Y' Then

1903: print_msg('Unexpected error in Spread['||sqlcode||sqlerrm||']');
1904: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1905: FND_MSG_PUB.add_exc_msg(p_pkg_name => 'PA_FP_SPREAD_AMTS_PKG',
1906: p_procedure_name => 'spread');
1907: If p_pa_debug_mode = 'Y' Then
1908: pa_debug.reset_err_stack;
1909: End If;
1910: raise FND_API.G_EXC_UNEXPECTED_ERROR;
1911: END spread;

Line 1908: pa_debug.reset_err_stack;

1904: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1905: FND_MSG_PUB.add_exc_msg(p_pkg_name => 'PA_FP_SPREAD_AMTS_PKG',
1906: p_procedure_name => 'spread');
1907: If p_pa_debug_mode = 'Y' Then
1908: pa_debug.reset_err_stack;
1909: End If;
1910: raise FND_API.G_EXC_UNEXPECTED_ERROR;
1911: END spread;
1912:

Line 1972: If p_pa_debug_mode = 'Y' Then

1968: l_stage := 200;
1969: print_msg(' '||l_stage||' enter get_options()');
1970:
1971: x_return_status := FND_API.G_RET_STS_SUCCESS;
1972: If p_pa_debug_mode = 'Y' Then
1973: pa_debug.init_err_stack( 'PA_FP_SPREAD_AMTS_PKG.get_options');
1974: pa_debug.set_process('PLSQL', 'LOG', p_pa_debug_mode);
1975: End If;
1976:

Line 1973: pa_debug.init_err_stack( 'PA_FP_SPREAD_AMTS_PKG.get_options');

1969: print_msg(' '||l_stage||' enter get_options()');
1970:
1971: x_return_status := FND_API.G_RET_STS_SUCCESS;
1972: If p_pa_debug_mode = 'Y' Then
1973: pa_debug.init_err_stack( 'PA_FP_SPREAD_AMTS_PKG.get_options');
1974: pa_debug.set_process('PLSQL', 'LOG', p_pa_debug_mode);
1975: End If;
1976:
1977: l_stage := 205;

Line 1974: pa_debug.set_process('PLSQL', 'LOG', p_pa_debug_mode);

1970:
1971: x_return_status := FND_API.G_RET_STS_SUCCESS;
1972: If p_pa_debug_mode = 'Y' Then
1973: pa_debug.init_err_stack( 'PA_FP_SPREAD_AMTS_PKG.get_options');
1974: pa_debug.set_process('PLSQL', 'LOG', p_pa_debug_mode);
1975: End If;
1976:
1977: l_stage := 205;
1978: print_msg(l_stage||'input parameters:p_budget_version_id=> '||p_budget_version_id);

Line 1992: If p_pa_debug_mode = 'Y' Then

1988: CLOSE get_name_and_type_csr;
1989:
1990: x_return_status := FND_API.G_RET_STS_ERROR;
1991: x_msg_data := 'PA_FP_CANNOT_GET_TIME_PHASE';
1992: If p_pa_debug_mode = 'Y' Then
1993: pa_debug.reset_err_stack;
1994: End If;
1995: l_stage := 206;
1996: print_msg(' '||'cannot found name type');

Line 1993: pa_debug.reset_err_stack;

1989:
1990: x_return_status := FND_API.G_RET_STS_ERROR;
1991: x_msg_data := 'PA_FP_CANNOT_GET_TIME_PHASE';
1992: If p_pa_debug_mode = 'Y' Then
1993: pa_debug.reset_err_stack;
1994: End If;
1995: l_stage := 206;
1996: print_msg(' '||'cannot found name type');
1997: RETURN;

Line 2011: If p_pa_debug_mode = 'Y' Then

2007: get_name_and_type_rec.pa_period_type;
2008: x_time_phase_code :=
2009: get_name_and_type_rec.time_phase_code;
2010: l_stage := 230;
2011: If p_pa_debug_mode = 'Y' Then
2012: print_msg(' '||l_stage||' after get set name,period type,time phase');
2013: print_msg(' '||'period_set_name => '||get_name_and_type_rec.period_set_name);
2014: print_msg(' '||'accounted_period_type => '||get_name_and_type_rec.accounted_period_type);
2015: print_msg(' '||'pa_period_type => '||get_name_and_type_rec.pa_period_type);

Line 2020: If p_pa_debug_mode = 'Y' Then

2016: print_msg(' '||'time_phase_code => '||get_name_and_type_rec.time_phase_code);
2017: End If;
2018:
2019: /* reset error stack */
2020: If p_pa_debug_mode = 'Y' Then
2021: pa_debug.reset_err_stack;
2022: End If;
2023: l_stage := 240;
2024: print_msg(' '||l_stage||' leave get options');

Line 2021: pa_debug.reset_err_stack;

2017: End If;
2018:
2019: /* reset error stack */
2020: If p_pa_debug_mode = 'Y' Then
2021: pa_debug.reset_err_stack;
2022: End If;
2023: l_stage := 240;
2024: print_msg(' '||l_stage||' leave get options');
2025:

Line 2033: If p_pa_debug_mode = 'Y' Then

2029:
2030: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2031: FND_MSG_PUB.add_exc_msg(p_pkg_name => 'PA_FP_SPREAD_AMTS_PKG',
2032: p_procedure_name => 'get_options');
2033: If p_pa_debug_mode = 'Y' Then
2034: pa_debug.reset_err_stack;
2035: End If;
2036: raise FND_API.G_EXC_UNEXPECTED_ERROR;
2037:

Line 2034: pa_debug.reset_err_stack;

2030: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2031: FND_MSG_PUB.add_exc_msg(p_pkg_name => 'PA_FP_SPREAD_AMTS_PKG',
2032: p_procedure_name => 'get_options');
2033: If p_pa_debug_mode = 'Y' Then
2034: pa_debug.reset_err_stack;
2035: End If;
2036: raise FND_API.G_EXC_UNEXPECTED_ERROR;
2037:
2038: END get_options;

Line 2142: If p_pa_debug_mode = 'Y' Then

2138: l_stage := 250;
2139: print_msg(' '||l_stage||' enter get_periods()');
2140:
2141: x_return_status := FND_API.G_RET_STS_SUCCESS;
2142: If p_pa_debug_mode = 'Y' Then
2143: pa_debug.init_err_stack('PA_FP_SPREAD_AMTS_PKG.get_periods');
2144: pa_debug.set_process('PLSQL', 'LOG', p_pa_debug_mode);
2145: End If;
2146:

Line 2143: pa_debug.init_err_stack('PA_FP_SPREAD_AMTS_PKG.get_periods');

2139: print_msg(' '||l_stage||' enter get_periods()');
2140:
2141: x_return_status := FND_API.G_RET_STS_SUCCESS;
2142: If p_pa_debug_mode = 'Y' Then
2143: pa_debug.init_err_stack('PA_FP_SPREAD_AMTS_PKG.get_periods');
2144: pa_debug.set_process('PLSQL', 'LOG', p_pa_debug_mode);
2145: End If;
2146:
2147: l_stage := 255;

Line 2144: pa_debug.set_process('PLSQL', 'LOG', p_pa_debug_mode);

2140:
2141: x_return_status := FND_API.G_RET_STS_SUCCESS;
2142: If p_pa_debug_mode = 'Y' Then
2143: pa_debug.init_err_stack('PA_FP_SPREAD_AMTS_PKG.get_periods');
2144: pa_debug.set_process('PLSQL', 'LOG', p_pa_debug_mode);
2145: End If;
2146:
2147: l_stage := 255;
2148: print_msg(' '||'input parameters:');

Line 2160: If p_pa_debug_mode = 'Y' Then

2156: IF p_start_date > p_end_date THEN
2157:
2158: x_return_status := FND_API.G_RET_STS_ERROR;
2159: x_msg_data := 'PA_FP_START_END_DATE_OVERLAP';
2160: If p_pa_debug_mode = 'Y' Then
2161: pa_debug.reset_err_stack;
2162: End If;
2163: RETURN;
2164: END IF;

Line 2161: pa_debug.reset_err_stack;

2157:
2158: x_return_status := FND_API.G_RET_STS_ERROR;
2159: x_msg_data := 'PA_FP_START_END_DATE_OVERLAP';
2160: If p_pa_debug_mode = 'Y' Then
2161: pa_debug.reset_err_stack;
2162: End If;
2163: RETURN;
2164: END IF;
2165: l_stage := 270;

Line 2174: If p_pa_debug_mode = 'Y' Then

2170: l_accounted_period_type := p_accounted_period_type;
2171: l_pa_period_type := p_pa_period_type;
2172: l_time_phase_code := p_time_phase_code;
2173: l_stage := 280;
2174: If p_pa_debug_mode = 'Y' Then
2175: print_msg(' '||l_stage||' after assign set name,period type,time phase');
2176: print_msg(' '||'period_set_name => '||l_period_set_name);
2177: print_msg(' '||'accounted_period_type => '||l_accounted_period_type);
2178: print_msg(' '||'pa_period_type => '||l_pa_period_type);

Line 2204: If p_pa_debug_mode = 'Y' Then

2200:
2201: IF n = 0 AND (l_time_phase_code = 'G' OR l_time_phase_code = 'P') THEN
2202: x_return_status := FND_API.G_RET_STS_ERROR;
2203: x_msg_data := 'PA_FP_PERIODS_IS_NULL';
2204: If p_pa_debug_mode = 'Y' Then
2205: pa_debug.reset_err_stack;
2206: End If;
2207: RETURN;
2208: END IF;

Line 2205: pa_debug.reset_err_stack;

2201: IF n = 0 AND (l_time_phase_code = 'G' OR l_time_phase_code = 'P') THEN
2202: x_return_status := FND_API.G_RET_STS_ERROR;
2203: x_msg_data := 'PA_FP_PERIODS_IS_NULL';
2204: If p_pa_debug_mode = 'Y' Then
2205: pa_debug.reset_err_stack;
2206: End If;
2207: RETURN;
2208: END IF;
2209: If p_pa_debug_mode = 'Y' Then

Line 2209: If p_pa_debug_mode = 'Y' Then

2205: pa_debug.reset_err_stack;
2206: End If;
2207: RETURN;
2208: END IF;
2209: If p_pa_debug_mode = 'Y' Then
2210: pa_debug.reset_err_stack;
2211: End If;
2212: l_stage := 290;
2213: print_msg(' '||l_stage||' leave get period');

Line 2210: pa_debug.reset_err_stack;

2206: End If;
2207: RETURN;
2208: END IF;
2209: If p_pa_debug_mode = 'Y' Then
2210: pa_debug.reset_err_stack;
2211: End If;
2212: l_stage := 290;
2213: print_msg(' '||l_stage||' leave get period');
2214:

Line 2222: If p_pa_debug_mode = 'Y' Then

2218:
2219: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2220: FND_MSG_PUB.add_exc_msg(p_pkg_name => 'PA_FP_SPREAD_AMTS_PKG',
2221: p_procedure_name => 'get_periods');
2222: If p_pa_debug_mode = 'Y' Then
2223: pa_debug.reset_err_stack;
2224: End If;
2225: raise FND_API.G_EXC_UNEXPECTED_ERROR;
2226:

Line 2223: pa_debug.reset_err_stack;

2219: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2220: FND_MSG_PUB.add_exc_msg(p_pkg_name => 'PA_FP_SPREAD_AMTS_PKG',
2221: p_procedure_name => 'get_periods');
2222: If p_pa_debug_mode = 'Y' Then
2223: pa_debug.reset_err_stack;
2224: End If;
2225: raise FND_API.G_EXC_UNEXPECTED_ERROR;
2226:
2227: END get_periods;

Line 2544: If p_pa_debug_mode = 'Y' Then

2540: l_stage := 800;
2541: print_msg(l_stage||' *** ENTERED SPREAD AMOUNTS API***');
2542: x_return_status := 'S';
2543: L_FINAL_RETURN_STATUS := 'S';
2544: If p_pa_debug_mode = 'Y' Then
2545: pa_debug.init_err_stack('PA_FP_SPREAD_AMTS_PKG.spread_amounts');
2546: End If;
2547: /* Bug fix: 4078623 Both set_curr_fun and Init_err_stack are similar, since reset_curr_function is not called
2548: * This might have been causing the plsql numeric or value error. Not sure because of this. Just to avoid

Line 2545: pa_debug.init_err_stack('PA_FP_SPREAD_AMTS_PKG.spread_amounts');

2541: print_msg(l_stage||' *** ENTERED SPREAD AMOUNTS API***');
2542: x_return_status := 'S';
2543: L_FINAL_RETURN_STATUS := 'S';
2544: If p_pa_debug_mode = 'Y' Then
2545: pa_debug.init_err_stack('PA_FP_SPREAD_AMTS_PKG.spread_amounts');
2546: End If;
2547: /* Bug fix: 4078623 Both set_curr_fun and Init_err_stack are similar, since reset_curr_function is not called
2548: * This might have been causing the plsql numeric or value error. Not sure because of this. Just to avoid
2549: * confusions commenting out this call

Line 2550: * PA_DEBUG.Set_Curr_Function( p_function => 'PA_FP_SPREAD_AMTS_PKG.spread_amounts' ,p_debug_mode => 'Y');

2546: End If;
2547: /* Bug fix: 4078623 Both set_curr_fun and Init_err_stack are similar, since reset_curr_function is not called
2548: * This might have been causing the plsql numeric or value error. Not sure because of this. Just to avoid
2549: * confusions commenting out this call
2550: * PA_DEBUG.Set_Curr_Function( p_function => 'PA_FP_SPREAD_AMTS_PKG.spread_amounts' ,p_debug_mode => 'Y');
2551: */
2552:
2553: -- validation
2554: IF ( p_budget_version_id IS NULL ) THEN

Line 2648: If p_pa_debug_mode = 'Y' Then

2644: l_g_start_date := NULL;
2645: END IF;
2646:
2647: l_stage := 820;
2648: If p_pa_debug_mode = 'Y' Then
2649: print_msg(l_stage||' input data:');
2650: print_msg('ra_resource_assignment_id => '||resource_assignment_rec.resource_assignment_id);
2651: print_msg('ra_BUDGET_VERSION_ID => '||resource_assignment_rec.BUDGET_VERSION_ID);
2652: print_msg('ra_PLANNING_START/END_DATE => '||resource_assignment_rec.PLANNING_START_DATE||'/'||resource_assignment_rec.PLANNING_END_DATE);

Line 2746: IF p_pa_debug_mode = 'Y' Then

2742: l_err_msg := v_msg_data;
2743: RAISE SPREAD_AMOUNTS_EXCEPTION;
2744: END IF;
2745:
2746: IF p_pa_debug_mode = 'Y' Then
2747: IF ( v_spread_amounts.COUNT > 0
2748: AND l_time_phase_code IN ('P','G')) THEN
2749:
2750: FOR i IN v_spread_amounts.first.. v_spread_amounts.last LOOP

Line 2836: If p_pa_debug_mode = 'Y' Then

2832: WHEN NO_DATA_FOUND THEN
2833: null;
2834: END;
2835: l_stage := 530;
2836: If p_pa_debug_mode = 'Y' Then
2837: print_msg(l_stage||' Before spread Amts from Budget Line l_time_phase_code '||l_time_phase_code);
2838: print_msg(' l_sum_txn_quantity '||l_sum_txn_quantity||']l_sum_txn_raw_cost['||l_sum_txn_raw_cost||']');
2839: print_msg(' l_sum_txn_burdened_cost['||l_sum_txn_burdened_cost||']l_sum_txn_revenue['||l_sum_txn_revenue||']');
2840: End If;

Line 2959: If p_pa_debug_mode = 'Y' Then

2955: (10, 10, 10, 10, 10, 10, 10, 10, 10, 10);
2956: END IF;
2957: CLOSE spread_curve_csr;
2958: l_stage := 850;
2959: If p_pa_debug_mode = 'Y' Then
2960: print_msg(l_stage||' after get spread curve');
2961: print_msg(' '||'spread curve => '||v_spread_curve(1)||' '||v_spread_curve(2)||' '||v_spread_curve(3));
2962: print_msg(' '||v_spread_curve(4)||' '||v_spread_curve(5)||' '||v_spread_curve(6)||' '||v_spread_curve(7));
2963: print_msg(' '||v_spread_curve(8)||' '||v_spread_curve(9)||' '||v_spread_curve(10));

Line 3160: If p_pa_debug_mode = 'Y' Then

3156: l_sum_txn_burdened_cost := l_g_sum_txn_burdened_cost;
3157: l_sum_txn_revenue := l_g_sum_txn_revenue;
3158: END IF;
3159: l_stage := 970;
3160: If p_pa_debug_mode = 'Y' Then
3161: print_msg(l_stage||' get amounts addl plus etc');
3162: print_msg('l_txn_quantity_addl '||l_txn_quantity_addl||']l_txn_raw_cost_addl['||l_txn_raw_cost_addl||']');
3163: print_msg('l_txn_burdened_cost_addl '||l_txn_burdened_cost_addl||']l_txn_revenue_addl['||l_txn_revenue_addl||']');
3164: print_msg('l_sum_txn_quantity['||l_sum_txn_quantity||']l_sum_txn_raw_cost['||l_sum_txn_raw_cost||']');

Line 3249: If p_pa_debug_mode = 'Y' Then

3245: RAISE SPREAD_AMOUNTS_EXCEPTION;
3246: END IF;
3247:
3248: l_stage := 1000;
3249: If p_pa_debug_mode = 'Y' Then
3250: print_msg(l_stage||' after call spread()');
3251: FOR i IN 1 .. v_spread_amounts.COUNT() LOOP
3252: IF i = l_line_start OR i = l_line_end THEN
3253: NULL;

Line 3879: If p_pa_debug_mode = 'Y' Then

3875: print_msg('Error occured during the spread, set the return status to E');
3876: x_return_status := L_FINAL_RETURN_STATUS;
3877: END IF;
3878:
3879: If p_pa_debug_mode = 'Y' Then
3880: FOR i IN ( SELECT tmp.resource_assignment_id resAgnId
3881: ,tmp.txn_currency_code Currency
3882: ,sum(tmp.quantity) tmpqty
3883: ,sum(tmp.txn_raw_cost) tmprawcost

Line 3904: If p_pa_debug_mode = 'Y' Then

3900: l_stage := 1060;
3901: print_msg(l_stage||' **********leave spread_amounts() with retSts['||x_return_status||']');
3902:
3903: /* Reset the error stack */
3904: If p_pa_debug_mode = 'Y' Then
3905: pa_debug.reset_err_stack;
3906: End If;
3907:
3908: EXCEPTION

Line 3905: pa_debug.reset_err_stack;

3901: print_msg(l_stage||' **********leave spread_amounts() with retSts['||x_return_status||']');
3902:
3903: /* Reset the error stack */
3904: If p_pa_debug_mode = 'Y' Then
3905: pa_debug.reset_err_stack;
3906: End If;
3907:
3908: EXCEPTION
3909:

Line 3960: If p_pa_debug_mode = 'Y' Then

3956: x_msg_data := null;
3957: End if;
3958: print_msg('Final ReturnSts['||x_return_status||
3959: ']msgCt['||x_msg_count||']msgData['||x_msg_data||']');
3960: If p_pa_debug_mode = 'Y' Then
3961: pa_debug.reset_err_stack;
3962: End If;
3963: RETURN;
3964:

Line 3961: pa_debug.reset_err_stack;

3957: End if;
3958: print_msg('Final ReturnSts['||x_return_status||
3959: ']msgCt['||x_msg_count||']msgData['||x_msg_data||']');
3960: If p_pa_debug_mode = 'Y' Then
3961: pa_debug.reset_err_stack;
3962: End If;
3963: RETURN;
3964:
3965:

Line 3973: If p_pa_debug_mode = 'Y' Then

3969: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
3970: L_FINAL_RETURN_STATUS := 'U';
3971: FND_MSG_PUB.add_exc_msg(p_pkg_name => 'PA_FP_SPREAD_AMTS_PKG',
3972: p_procedure_name => 'spread_amounts');
3973: If p_pa_debug_mode = 'Y' Then
3974: pa_debug.reset_err_stack;
3975: End If;
3976: raise FND_API.G_EXC_UNEXPECTED_ERROR;
3977:

Line 3974: pa_debug.reset_err_stack;

3970: L_FINAL_RETURN_STATUS := 'U';
3971: FND_MSG_PUB.add_exc_msg(p_pkg_name => 'PA_FP_SPREAD_AMTS_PKG',
3972: p_procedure_name => 'spread_amounts');
3973: If p_pa_debug_mode = 'Y' Then
3974: pa_debug.reset_err_stack;
3975: End If;
3976: raise FND_API.G_EXC_UNEXPECTED_ERROR;
3977:
3978: END spread_amounts;