DBA Data[Home] [Help]

APPS.CE_CSH_FCST_POP dependencies on STANDARD

Line 58: cep_standard.debug('NO DATA FOUND FOR AVERAGE PAYMENT DAYS');

54:
55: RETURN l_ave_pay_days;
56: EXCEPTION
57: WHEN NO_DATA_FOUND THEN
58: cep_standard.debug('NO DATA FOUND FOR AVERAGE PAYMENT DAYS');
59: return null;
60: WHEN OTHERS THEN
61: cep_standard.debug('EXCEPTION-OTHERS Get_Average_Payment_Days');
62: raise;

Line 61: cep_standard.debug('EXCEPTION-OTHERS Get_Average_Payment_Days');

57: WHEN NO_DATA_FOUND THEN
58: cep_standard.debug('NO DATA FOUND FOR AVERAGE PAYMENT DAYS');
59: return null;
60: WHEN OTHERS THEN
61: cep_standard.debug('EXCEPTION-OTHERS Get_Average_Payment_Days');
62: raise;
63: END Get_Average_Payment_Days;
64:
65: /* ---------------------------------------------------------------------

Line 96: cep_standard.debug('>>CE_CASH_FCST.Set_History');

92: days_to NUMBER;
93: history_date DATE;
94: history_period VARCHAR2(30);
95: BEGIN
96: cep_standard.debug('>>CE_CASH_FCST.Set_History');
97:
98: cep_standard.debug('G_roll_forward_type: ' || CE_CASH_FCST.G_roll_forward_type);
99: cep_standard.debug('G_roll_forward_period : ' || CE_CASH_FCST.G_roll_forward_period);
100: cep_standard.debug('G_start_period: ' || CE_CASH_FCST.G_rp_forecast_start_period);

Line 98: cep_standard.debug('G_roll_forward_type: ' || CE_CASH_FCST.G_roll_forward_type);

94: history_period VARCHAR2(30);
95: BEGIN
96: cep_standard.debug('>>CE_CASH_FCST.Set_History');
97:
98: cep_standard.debug('G_roll_forward_type: ' || CE_CASH_FCST.G_roll_forward_type);
99: cep_standard.debug('G_roll_forward_period : ' || CE_CASH_FCST.G_roll_forward_period);
100: cep_standard.debug('G_start_period: ' || CE_CASH_FCST.G_rp_forecast_start_period);
101: cep_standard.debug('period_set_name: ' || CEFC_VIEW_CONST.get_period_set_name);
102:

Line 99: cep_standard.debug('G_roll_forward_period : ' || CE_CASH_FCST.G_roll_forward_period);

95: BEGIN
96: cep_standard.debug('>>CE_CASH_FCST.Set_History');
97:
98: cep_standard.debug('G_roll_forward_type: ' || CE_CASH_FCST.G_roll_forward_type);
99: cep_standard.debug('G_roll_forward_period : ' || CE_CASH_FCST.G_roll_forward_period);
100: cep_standard.debug('G_start_period: ' || CE_CASH_FCST.G_rp_forecast_start_period);
101: cep_standard.debug('period_set_name: ' || CEFC_VIEW_CONST.get_period_set_name);
102:
103: IF (CE_CASH_FCST.G_roll_forward_type = 'D') THEN

Line 100: cep_standard.debug('G_start_period: ' || CE_CASH_FCST.G_rp_forecast_start_period);

96: cep_standard.debug('>>CE_CASH_FCST.Set_History');
97:
98: cep_standard.debug('G_roll_forward_type: ' || CE_CASH_FCST.G_roll_forward_type);
99: cep_standard.debug('G_roll_forward_period : ' || CE_CASH_FCST.G_roll_forward_period);
100: cep_standard.debug('G_start_period: ' || CE_CASH_FCST.G_rp_forecast_start_period);
101: cep_standard.debug('period_set_name: ' || CEFC_VIEW_CONST.get_period_set_name);
102:
103: IF (CE_CASH_FCST.G_roll_forward_type = 'D') THEN
104: CEFC_VIEW_CONST.set_start_date(CE_CASH_FCST.G_rp_forecast_start_date - CE_CASH_FCST.G_roll_forward_period);

Line 101: cep_standard.debug('period_set_name: ' || CEFC_VIEW_CONST.get_period_set_name);

97:
98: cep_standard.debug('G_roll_forward_type: ' || CE_CASH_FCST.G_roll_forward_type);
99: cep_standard.debug('G_roll_forward_period : ' || CE_CASH_FCST.G_roll_forward_period);
100: cep_standard.debug('G_start_period: ' || CE_CASH_FCST.G_rp_forecast_start_period);
101: cep_standard.debug('period_set_name: ' || CEFC_VIEW_CONST.get_period_set_name);
102:
103: IF (CE_CASH_FCST.G_roll_forward_type = 'D') THEN
104: CEFC_VIEW_CONST.set_start_date(CE_CASH_FCST.G_rp_forecast_start_date - CE_CASH_FCST.G_roll_forward_period);
105: CEFC_VIEW_CONST.set_min_col(nvl(CE_CASH_FCST.G_min_col,0) + CE_CASH_FCST.G_roll_forward_period);

Line 141: cep_standard.debug('NO DATA FOUND FOR HISTORY PERIOD');

137: CEFC_VIEW_CONST.set_min_col(nvl(CE_CASH_FCST.G_min_col,0) + CE_CASH_FCST.G_roll_forward_period);
138: CEFC_VIEW_CONST.set_max_col(nvl(CE_CASH_FCST.G_max_col,0) + CE_CASH_FCST.G_roll_forward_period);
139: EXCEPTION
140: WHEN NO_DATA_FOUND THEN
141: cep_standard.debug('NO DATA FOUND FOR HISTORY PERIOD');
142: RAISE;
143: WHEN OTHERS THEN
144: cep_standard.debug('EXCEPTION-OTHERS Set_History');
145: raise;

Line 144: cep_standard.debug('EXCEPTION-OTHERS Set_History');

140: WHEN NO_DATA_FOUND THEN
141: cep_standard.debug('NO DATA FOUND FOR HISTORY PERIOD');
142: RAISE;
143: WHEN OTHERS THEN
144: cep_standard.debug('EXCEPTION-OTHERS Set_History');
145: raise;
146: END;
147: END IF;
148:

Line 177: cep_standard.debug('<

173:
174: FETCH cCol INTO cid, col_num, days_from, days_to;
175: END LOOP;
176:
177: cep_standard.debug('< 178: EXCEPTION
179: WHEN OTHERS THEN
180: IF(cCol%ISOPEN)THEN CLOSE cCol; END IF;
181: RAISE;

Line 208: cep_standard.debug('>>ce_csh_fcST_POP.populate_aging_buckets');

204: new_start_date DATE;
205: new_end_date DATE;
206: fid NUMBER;
207: BEGIN
208: cep_standard.debug('>>ce_csh_fcST_POP.populate_aging_buckets');
209:
210: OPEN C1;
211: FETCH C1 INTO fid, start_date, end_date;
212: LOOP

Line 279: cep_standard.debug('<

275: FETCH C1 INTO fid, start_date, end_date;
276: END LOOP;
277: CLOSE C1;
278:
279: cep_standard.debug('< 280: EXCEPTION
281: WHEN OTHERS THEN
282: IF C1%ISOPEN THEN CLOSE C1; END IF;
283: CEP_STANDARD.DEBUG('EXCEPTION:populate_aging_buckets');

Line 283: CEP_STANDARD.DEBUG('EXCEPTION:populate_aging_buckets');

279: cep_standard.debug('< 280: EXCEPTION
281: WHEN OTHERS THEN
282: IF C1%ISOPEN THEN CLOSE C1; END IF;
283: CEP_STANDARD.DEBUG('EXCEPTION:populate_aging_buckets');
284: raise;
285: END populate_aging_buckets;
286:
287: PROCEDURE clear_aging_buckets IS

Line 293: cep_standard.debug('<

289: delete from ce_forecast_ext_temp
290: where context_value = 'A' and
291: forecast_request_id = CE_CASH_FCST.G_forecast_id and
292: conversion_rate = CE_CASH_FCST.G_forecast_row_id;
293: cep_standard.debug('< 294: EXCEPTION
295: WHEN OTHERS THEN
296: CEP_STANDARD.DEBUG('EXCEPTION:clear_aging_buckets');
297: raise;

Line 296: CEP_STANDARD.DEBUG('EXCEPTION:clear_aging_buckets');

292: conversion_rate = CE_CASH_FCST.G_forecast_row_id;
293: cep_standard.debug('< 294: EXCEPTION
295: WHEN OTHERS THEN
296: CEP_STANDARD.DEBUG('EXCEPTION:clear_aging_buckets');
297: raise;
298: END clear_aging_buckets;
299:
300:

Line 458: cep_standard.debug(from_clause);

454: from_clause := from_clause || ' ,
455: ce_currency_rates_temp curr2 ';
456: END IF;
457:
458: cep_standard.debug(from_clause);
459: return from_clause;
460: END Get_From_Clause;
461:
462: /* ---------------------------------------------------------------------

Line 639: cep_standard.debug('ERROR - Add_Where got invalid criteria!');

635: AND src.order_type_id = '||to_char(CE_CASH_FCST.G_order_type_id));
636: END IF;
637:
638: ELSE
639: cep_standard.debug('ERROR - Add_Where got invalid criteria!');
640: END IF;
641:
642: return (NULL);
643: END Add_Where;

Line 663: cep_standard.debug('>>CE_CASH_FCST.Get_Where_Clause');

659: FUNCTION Get_Where_Clause RETURN VARCHAR2 IS
660: where_clause VARCHAR2(1500);
661:
662: BEGIN
663: cep_standard.debug('>>CE_CASH_FCST.Get_Where_Clause');
664:
665: where_clause := '
666: WHERE cab.context_value = ''A''
667: AND cab.forecast_request_id = '||to_char(CE_CASH_FCST.G_forecast_id) ||'

Line 775: cep_standard.debug('<

771: END IF;
772: END IF;
773: END IF;
774:
775: cep_standard.debug('< 776: return where_clause;
777: END Get_Where_Clause;
778:
779: /* ---------------------------------------------------------------------

Line 837: cep_standard.debug('EXCEPTION:OTHERS- Insert_Fcast_Cell');

833: X_LAST_UPDATE_DATE =>sysdate,
834: X_LAST_UPDATE_LOGIN =>nvl(fnd_global.user_id,-1));
835: EXCEPTION
836: WHEN OTHERS THEN
837: cep_standard.debug('EXCEPTION:OTHERS- Insert_Fcast_Cell');
838: RAISE;
839: END Insert_Fcast_Cell;
840:
841: /* ---------------------------------------------------------------------

Line 863: cep_standard.debug('>>CE_CASH_FCST_POP.Zero_Fill_Cells');

859: FROM ce_forecast_columns cfc
860: WHERE cfc.forecast_header_id = CE_CASH_FCST.G_rp_forecast_header_id;
861:
862: BEGIN
863: cep_standard.debug('>>CE_CASH_FCST_POP.Zero_Fill_Cells');
864: OPEN zero_fill_c;
865: LOOP
866: FETCH zero_fill_c into column_id;
867: EXIT WHEN zero_fill_C%NOTFOUND OR zero_fill_C%NOTFOUND IS NULL;

Line 868: cep_standard.debug('column_id with zero amount: '|| to_char(column_id));

864: OPEN zero_fill_c;
865: LOOP
866: FETCH zero_fill_c into column_id;
867: EXIT WHEN zero_fill_C%NOTFOUND OR zero_fill_C%NOTFOUND IS NULL;
868: cep_standard.debug('column_id with zero amount: '|| to_char(column_id));
869: Insert_Fcast_Cell(null, null, null, null, null, 0, to_number(null), column_id);
870: END LOOP;
871:
872: CLOSE zero_fill_c;

Line 874: cep_standard.debug('<

870: END LOOP;
871:
872: CLOSE zero_fill_c;
873:
874: cep_standard.debug('< 875: EXCEPTION
876: WHEN OTHERS THEN
877: IF zero_fill_C%ISOPEN THEN close zero_fill_C; END IF;
878: cep_standard.debug('EXCEPTION-OTHERS: Zero_fill_Cells');

Line 878: cep_standard.debug('EXCEPTION-OTHERS: Zero_fill_Cells');

874: cep_standard.debug('< 875: EXCEPTION
876: WHEN OTHERS THEN
877: IF zero_fill_C%ISOPEN THEN close zero_fill_C; END IF;
878: cep_standard.debug('EXCEPTION-OTHERS: Zero_fill_Cells');
879: RAISE;
880: END Zero_Fill_Cells;
881:
882:

Line 918: cep_standard.debug('>>CE_CSH_FCST_POP.Execute_Main_Query');

914: forecast_rowid VARCHAR2(30);
915: counter number;
916: final_query VARCHAR2(5000);
917: BEGIN
918: cep_standard.debug('>>CE_CSH_FCST_POP.Execute_Main_Query');
919:
920: populate_aging_buckets;
921:
922: cursor_id := DBMS_SQL.open_cursor;

Line 923: cep_standard.debug('Cursor opened sucessfully with cursor_id: '||

919:
920: populate_aging_buckets;
921:
922: cursor_id := DBMS_SQL.open_cursor;
923: cep_standard.debug('Cursor opened sucessfully with cursor_id: '||
924: to_char(cursor_id));
925:
926: cep_standard.debug('Parsing ....');
927: final_query := 'INSERT INTO CE_FORECAST_TRX_CELLS(

Line 926: cep_standard.debug('Parsing ....');

922: cursor_id := DBMS_SQL.open_cursor;
923: cep_standard.debug('Cursor opened sucessfully with cursor_id: '||
924: to_char(cursor_id));
925:
926: cep_standard.debug('Parsing ....');
927: final_query := 'INSERT INTO CE_FORECAST_TRX_CELLS(
928: FORECAST_CELL_ID,
929: FORECAST_ID,
930: FORECAST_HEADER_ID,

Line 952: cep_standard.debug('Parsed sucessfully');

948: DBMS_SQL.Parse(cursor_id,
949: final_query,
950: DBMS_SQL.v7);
951:
952: cep_standard.debug('Parsed sucessfully');
953:
954: exec_id := DBMS_SQL.execute(cursor_id);
955:
956: DBMS_SQL.CLOSE_CURSOR(cursor_id);

Line 987: cep_standard.debug('EXCEPTION - OTHERS: Execute_Main_Query');

983: clear_aging_buckets;
984: zero_fill_cells;
985: EXCEPTION
986: WHEN OTHERS THEN
987: cep_standard.debug('EXCEPTION - OTHERS: Execute_Main_Query');
988: IF DBMS_SQL.IS_OPEN(cursor_id) THEN
989: DBMS_SQL.CLOSE_CURSOR(cursor_id);
990: cep_standard.debug('Cursor Closed');
991: END IF;

Line 990: cep_standard.debug('Cursor Closed');

986: WHEN OTHERS THEN
987: cep_standard.debug('EXCEPTION - OTHERS: Execute_Main_Query');
988: IF DBMS_SQL.IS_OPEN(cursor_id) THEN
989: DBMS_SQL.CLOSE_CURSOR(cursor_id);
990: cep_standard.debug('Cursor Closed');
991: END IF;
992: RAISE;
993: END Execute_Main_Query;
994:

Line 1017: cep_standard.debug('>>CE_CSH_FCST_POP.Use_Avg_Bal_Pos');

1013: l_end_of_day NUMBER;
1014: l_ptd_range NUMBER;
1015: l_period_name GL_PERIODS.period_name%TYPE;
1016: BEGIN
1017: cep_standard.debug('>>CE_CSH_FCST_POP.Use_Avg_Bal_Pos');
1018: --
1019: -- Get number of days from start of the period
1020: --
1021: BEGIN

Line 1033: cep_standard.debug('Use_Avg_Bal_Pos.no data found');

1029:
1030: EXCEPTION
1031: WHEN NO_DATA_FOUND THEN
1032: return 0;
1033: cep_standard.debug('Use_Avg_Bal_Pos.no data found');
1034: WHEN TOO_MANY_ROWS THEN
1035: return 0;
1036: cep_standard.debug('Use_Avg_Bal_Pos.TOO_MANY_ROWS');
1037: WHEN OTHERS THEN

Line 1036: cep_standard.debug('Use_Avg_Bal_Pos.TOO_MANY_ROWS');

1032: return 0;
1033: cep_standard.debug('Use_Avg_Bal_Pos.no data found');
1034: WHEN TOO_MANY_ROWS THEN
1035: return 0;
1036: cep_standard.debug('Use_Avg_Bal_Pos.TOO_MANY_ROWS');
1037: WHEN OTHERS THEN
1038: return 0;
1039: cep_standard.debug('Use_Avg_Bal_Pos.OTHERS');
1040: END;

Line 1039: cep_standard.debug('Use_Avg_Bal_Pos.OTHERS');

1035: return 0;
1036: cep_standard.debug('Use_Avg_Bal_Pos.TOO_MANY_ROWS');
1037: WHEN OTHERS THEN
1038: return 0;
1039: cep_standard.debug('Use_Avg_Bal_Pos.OTHERS');
1040: END;
1041: --
1042: -- Get the end of day balance
1043: --

Line 1101: cep_standard.debug('<

1097: AND glcc.summary_flag = 'N'
1098: AND glcc.code_combination_id = p_ccid
1099: AND org.enable_average_balances_flag = 'Y';
1100:
1101: cep_standard.debug('< 1102: RETURN( nvl(l_end_of_day,0) );
1103: EXCEPTION
1104: WHEN NO_DATA_FOUND THEN
1105: RETURN(0);

Line 1107: CEP_STANDARD.DEBUG('EXCEPTION: OTHERS - Use_avg_bal_pos');

1103: EXCEPTION
1104: WHEN NO_DATA_FOUND THEN
1105: RETURN(0);
1106: WHEN OTHERS THEN
1107: CEP_STANDARD.DEBUG('EXCEPTION: OTHERS - Use_avg_bal_pos');
1108: RAISE;
1109: END;
1110: END Use_Avg_Bal_Pos;
1111:

Line 1136: cep_standard.debug('>>Calc_Initial_Cash_Position ');

1132: begin_period VARCHAR2(30);
1133: avg_bal VARCHAR2(1);
1134: avg_bal_init_cash_pos NUMBER;
1135: BEGIN
1136: cep_standard.debug('>>Calc_Initial_Cash_Position ');
1137: IF (CE_CASH_FCST.G_aging_type = 'D') THEN
1138: --
1139: -- Check to see if average daily balances are used;
1140: --

Line 1144: cep_standard.debug('Get initial balance');

1140: --
1141: avg_bal_init_cash_pos := Use_Avg_Bal_Pos(p_ccid);
1142:
1143: -- Get Initial Balance
1144: cep_standard.debug('Get initial balance');
1145: cep_standard.debug('CCID: ' || p_ccid);
1146: cep_standard.debug('Avg bal init cash pos: ' || avg_bal_init_cash_pos);
1147: BEGIN
1148: SELECT src.period_name,

Line 1145: cep_standard.debug('CCID: ' || p_ccid);

1141: avg_bal_init_cash_pos := Use_Avg_Bal_Pos(p_ccid);
1142:
1143: -- Get Initial Balance
1144: cep_standard.debug('Get initial balance');
1145: cep_standard.debug('CCID: ' || p_ccid);
1146: cep_standard.debug('Avg bal init cash pos: ' || avg_bal_init_cash_pos);
1147: BEGIN
1148: SELECT src.period_name,
1149: nvl(SUM((nvl(src.begin_balance_dr,0)-nvl(src.begin_balance_cr,0))*

Line 1146: cep_standard.debug('Avg bal init cash pos: ' || avg_bal_init_cash_pos);

1142:
1143: -- Get Initial Balance
1144: cep_standard.debug('Get initial balance');
1145: cep_standard.debug('CCID: ' || p_ccid);
1146: cep_standard.debug('Avg bal init cash pos: ' || avg_bal_init_cash_pos);
1147: BEGIN
1148: SELECT src.period_name,
1149: nvl(SUM((nvl(src.begin_balance_dr,0)-nvl(src.begin_balance_cr,0))*
1150: DECODE(CE_CASH_FCST.G_rp_exchange_type, 'User', CE_CASH_FCST.G_rp_exchange_rate, curr.exchange_rate)),0)

Line 1177: cep_standard.debug('INITIAL BALANCE FOR: '|| begin_period || ' is : '|| begin_Cash_bal);

1173: AND gp.period_set_name = org.period_set_name
1174: AND gp.period_set_name = CE_CASH_FCST.G_rp_calendar_name
1175: AND nvl(org.enable_average_balances_flag,'N') = 'N'
1176: GROUP BY src.period_name;
1177: cep_standard.debug('INITIAL BALANCE FOR: '|| begin_period || ' is : '|| begin_Cash_bal);
1178: EXCEPTION
1179: WHEN NO_DATA_FOUND THEN
1180: cep_standard.debug('EXCEPTION: Calc Initial Cash pos:no data found');
1181: cep_standard.debug('Intial Cash position is 0');

Line 1180: cep_standard.debug('EXCEPTION: Calc Initial Cash pos:no data found');

1176: GROUP BY src.period_name;
1177: cep_standard.debug('INITIAL BALANCE FOR: '|| begin_period || ' is : '|| begin_Cash_bal);
1178: EXCEPTION
1179: WHEN NO_DATA_FOUND THEN
1180: cep_standard.debug('EXCEPTION: Calc Initial Cash pos:no data found');
1181: cep_standard.debug('Intial Cash position is 0');
1182: begin_cash_bal :=0;
1183: WHEN OTHERS THEN
1184: cep_standard.debug('EXCEPTION: Calc Initial Cash pos');

Line 1181: cep_standard.debug('Intial Cash position is 0');

1177: cep_standard.debug('INITIAL BALANCE FOR: '|| begin_period || ' is : '|| begin_Cash_bal);
1178: EXCEPTION
1179: WHEN NO_DATA_FOUND THEN
1180: cep_standard.debug('EXCEPTION: Calc Initial Cash pos:no data found');
1181: cep_standard.debug('Intial Cash position is 0');
1182: begin_cash_bal :=0;
1183: WHEN OTHERS THEN
1184: cep_standard.debug('EXCEPTION: Calc Initial Cash pos');
1185: cep_standard.debug('Exception: begin balance failed');

Line 1184: cep_standard.debug('EXCEPTION: Calc Initial Cash pos');

1180: cep_standard.debug('EXCEPTION: Calc Initial Cash pos:no data found');
1181: cep_standard.debug('Intial Cash position is 0');
1182: begin_cash_bal :=0;
1183: WHEN OTHERS THEN
1184: cep_standard.debug('EXCEPTION: Calc Initial Cash pos');
1185: cep_standard.debug('Exception: begin balance failed');
1186: RAISE;
1187: END;
1188:

Line 1185: cep_standard.debug('Exception: begin balance failed');

1181: cep_standard.debug('Intial Cash position is 0');
1182: begin_cash_bal :=0;
1183: WHEN OTHERS THEN
1184: cep_standard.debug('EXCEPTION: Calc Initial Cash pos');
1185: cep_standard.debug('Exception: begin balance failed');
1186: RAISE;
1187: END;
1188:
1189: cep_standard.debug('INITIAL PERIOD BALANCE FOR: '|| begin_period || ' is : '|| begin_Cash_bal);

Line 1189: cep_standard.debug('INITIAL PERIOD BALANCE FOR: '|| begin_period || ' is : '|| begin_Cash_bal);

1185: cep_standard.debug('Exception: begin balance failed');
1186: RAISE;
1187: END;
1188:
1189: cep_standard.debug('INITIAL PERIOD BALANCE FOR: '|| begin_period || ' is : '|| begin_Cash_bal);
1190: BEGIN
1191: SELECT nvl(SUM((nvl(jl.entered_dr,0) - nvl(jl.entered_cr,0))*
1192: DECODE(CE_CASH_FCST.G_rp_exchange_type, 'User', CE_CASH_FCST.G_rp_exchange_rate, curr.exchange_rate)),0)
1193: INTO bal_to_date

Line 1214: cep_standard.debug('balance to date is: '|| bal_to_date);

1210: AND jl.code_combination_id = glcc.code_combination_id
1211: AND glcc.code_combination_id = p_ccid
1212: AND nvl(org.enable_average_balances_flag,'N') = 'N';
1213:
1214: cep_standard.debug('balance to date is: '|| bal_to_date);
1215: cep_standard.debug('1 return');
1216:
1217: RETURN(avg_bal_init_cash_pos + begin_cash_bal + bal_to_date);
1218: EXCEPTION

Line 1215: cep_standard.debug('1 return');

1211: AND glcc.code_combination_id = p_ccid
1212: AND nvl(org.enable_average_balances_flag,'N') = 'N';
1213:
1214: cep_standard.debug('balance to date is: '|| bal_to_date);
1215: cep_standard.debug('1 return');
1216:
1217: RETURN(avg_bal_init_cash_pos + begin_cash_bal + bal_to_date);
1218: EXCEPTION
1219: WHEN NO_DATA_FOUND THEN

Line 1221: cep_standard.debug('exception:no data found balance_to_date is 0');

1217: RETURN(avg_bal_init_cash_pos + begin_cash_bal + bal_to_date);
1218: EXCEPTION
1219: WHEN NO_DATA_FOUND THEN
1220: bal_to_date :=0;
1221: cep_standard.debug('exception:no data found balance_to_date is 0');
1222: cep_standard.debug('2 return');RETURN(begin_cash_bal + bal_to_date);
1223: WHEN OTHERS THEN
1224: cep_standard.debug('EXCEPTION: Calc INitial Cash pos');
1225: cep_standard.debug('Exception: balance to date failed');

Line 1222: cep_standard.debug('2 return');RETURN(begin_cash_bal + bal_to_date);

1218: EXCEPTION
1219: WHEN NO_DATA_FOUND THEN
1220: bal_to_date :=0;
1221: cep_standard.debug('exception:no data found balance_to_date is 0');
1222: cep_standard.debug('2 return');RETURN(begin_cash_bal + bal_to_date);
1223: WHEN OTHERS THEN
1224: cep_standard.debug('EXCEPTION: Calc INitial Cash pos');
1225: cep_standard.debug('Exception: balance to date failed');
1226: RAISE;

Line 1224: cep_standard.debug('EXCEPTION: Calc INitial Cash pos');

1220: bal_to_date :=0;
1221: cep_standard.debug('exception:no data found balance_to_date is 0');
1222: cep_standard.debug('2 return');RETURN(begin_cash_bal + bal_to_date);
1223: WHEN OTHERS THEN
1224: cep_standard.debug('EXCEPTION: Calc INitial Cash pos');
1225: cep_standard.debug('Exception: balance to date failed');
1226: RAISE;
1227: END;
1228: ELSE

Line 1225: cep_standard.debug('Exception: balance to date failed');

1221: cep_standard.debug('exception:no data found balance_to_date is 0');
1222: cep_standard.debug('2 return');RETURN(begin_cash_bal + bal_to_date);
1223: WHEN OTHERS THEN
1224: cep_standard.debug('EXCEPTION: Calc INitial Cash pos');
1225: cep_standard.debug('Exception: balance to date failed');
1226: RAISE;
1227: END;
1228: ELSE
1229: SELECT SUM((nvl(src.begin_balance_dr,0)-nvl(src.begin_balance_cr,0))*

Line 1251: cep_standard.debug('3 return');

1247: AND glcc.template_id IS NULL
1248: AND glcc.code_combination_id = src.code_combination_id
1249: AND glcc.code_combination_id = p_ccid;
1250:
1251: cep_standard.debug('3 return');
1252:
1253: RETURN(initial_cash_pos);
1254:
1255: END IF;

Line 1257: cep_standard.debug('4 return');

1253: RETURN(initial_cash_pos);
1254:
1255: END IF;
1256:
1257: cep_standard.debug('4 return');
1258: RETURN initial_cash_pos;
1259: EXCEPTION
1260: WHEN NO_DATA_FOUND THEN
1261: cep_standard.debug('5 return');

Line 1261: cep_standard.debug('5 return');

1257: cep_standard.debug('4 return');
1258: RETURN initial_cash_pos;
1259: EXCEPTION
1260: WHEN NO_DATA_FOUND THEN
1261: cep_standard.debug('5 return');
1262: return(0);
1263: WHEN OTHERS THEN
1264: cep_standard.debug('EXCEPTION:OTHERS - Calc_Initial_Cash_Position');
1265: RAISE;

Line 1264: cep_standard.debug('EXCEPTION:OTHERS - Calc_Initial_Cash_Position');

1260: WHEN NO_DATA_FOUND THEN
1261: cep_standard.debug('5 return');
1262: return(0);
1263: WHEN OTHERS THEN
1264: cep_standard.debug('EXCEPTION:OTHERS - Calc_Initial_Cash_Position');
1265: RAISE;
1266: END Calc_Initial_Cash_Position;
1267:
1268:

Line 1341: cep_standard.debug('>>CE_CSH_FCST_POP.Populate_Opening_Bal');

1337: l_prior_day_cflow NUMBER;
1338: error_msg FND_NEW_MESSAGES.message_text%TYPE;
1339:
1340: BEGIN
1341: cep_standard.debug('>>CE_CSH_FCST_POP.Populate_Opening_Bal');
1342:
1343: IF (CE_CASH_FCST.G_rp_view_by in ('BANK','ALL')) THEN
1344: IF (CE_CASH_FCST.G_aging_type = 'D') THEN
1345: l_fc_start_date := trunc(CE_CASH_FCST.G_rp_forecast_start_date);

Line 1419: cep_standard.debug('>>Bank Account currency conversion');

1415: IF (CE_CASH_FCST.G_rp_exchange_type = 'User') THEN
1416: l_opening_balance := l_opening_balance * CE_CASH_FCST.G_rp_exchange_rate;
1417: ELSE
1418: BEGIN
1419: cep_standard.debug('>>Bank Account currency conversion');
1420:
1421: select exchange_rate
1422: into l_exchange_rate
1423: from ce_currency_rates_temp

Line 1430: cep_standard.debug('<

1426: and forecast_request_id = CE_CASH_FCST.G_forecast_id;
1427:
1428: l_opening_balance := l_opening_balance * l_exchange_rate;
1429:
1430: cep_standard.debug('< 1431: EXCEPTION
1432: WHEN NO_DATA_FOUND THEN
1433: UPDATE ce_forecasts
1434: SET error_status = 'X'

Line 1448: cep_standard.debug('EXCEPTION: Populate_Opening_Bal - No exchange rate found');

1444: CE_CASH_FCST.G_rp_forecast_header_id,
1445: CE_CASH_FCST.G_forecast_row_id,
1446: 'CE_FC_NO_BANK_EXCH_RATE',
1447: error_msg);
1448: cep_standard.debug('EXCEPTION: Populate_Opening_Bal - No exchange rate found');
1449:
1450: l_opening_balance := 0;
1451: WHEN OTHERS Then
1452: cep_standard.debug('EXCEPTION: Populate_Opening_Bal - Bank Account Currency exchange rate conversion');

Line 1452: cep_standard.debug('EXCEPTION: Populate_Opening_Bal - Bank Account Currency exchange rate conversion');

1448: cep_standard.debug('EXCEPTION: Populate_Opening_Bal - No exchange rate found');
1449:
1450: l_opening_balance := 0;
1451: WHEN OTHERS Then
1452: cep_standard.debug('EXCEPTION: Populate_Opening_Bal - Bank Account Currency exchange rate conversion');
1453: raise;
1454: END;
1455: END IF;
1456: END IF;

Line 1654: cep_standard.debug('>>Subsidiary Bank Account currency conversion');

1650: IF (CE_CASH_FCST.G_rp_exchange_type = 'User') THEN
1651: l_opening_balance := l_opening_balance * CE_CASH_FCST.G_rp_exchange_rate;
1652: ELSE
1653: BEGIN
1654: cep_standard.debug('>>Subsidiary Bank Account currency conversion');
1655:
1656: select exchange_rate
1657: into l_exchange_rate
1658: from ce_currency_rates_temp

Line 1665: cep_standard.debug('<

1661: and forecast_request_id = CE_CASH_FCST.G_forecast_id;
1662:
1663: l_opening_balance := l_opening_balance * l_exchange_rate;
1664:
1665: cep_standard.debug('< 1666: EXCEPTION
1667: WHEN NO_DATA_FOUND THEN
1668: UPDATE ce_forecasts
1669: SET error_status = 'X'

Line 1683: cep_standard.debug('EXCEPTION: Populate_Opening_Bal - Subsidiary - No exchange rate found');

1679: CE_CASH_FCST.G_rp_forecast_header_id,
1680: CE_CASH_FCST.G_forecast_row_id,
1681: 'CE_FC_NO_SUB_EXCH_RATE',
1682: error_msg);
1683: cep_standard.debug('EXCEPTION: Populate_Opening_Bal - Subsidiary - No exchange rate found');
1684:
1685: l_opening_balance := 0;
1686: WHEN OTHERS Then
1687: cep_standard.debug('EXCEPTION: Populate_Opening_Bal - Subsidiary Bank Account Currency exchange rate conversion');

Line 1687: cep_standard.debug('EXCEPTION: Populate_Opening_Bal - Subsidiary Bank Account Currency exchange rate conversion');

1683: cep_standard.debug('EXCEPTION: Populate_Opening_Bal - Subsidiary - No exchange rate found');
1684:
1685: l_opening_balance := 0;
1686: WHEN OTHERS Then
1687: cep_standard.debug('EXCEPTION: Populate_Opening_Bal - Subsidiary Bank Account Currency exchange rate conversion');
1688: raise;
1689: END;
1690: END IF;
1691: END IF;

Line 1776: cep_standard.debug('<

1772: END LOOP;
1773: END IF;
1774: END IF;
1775:
1776: cep_standard.debug('< 1777: EXCEPTION
1778: WHEN OTHERS THEN
1779: CEP_STANDARD.DEBUG('EXCEPTION:Populate_Opening_Bal');
1780: raise;

Line 1779: CEP_STANDARD.DEBUG('EXCEPTION:Populate_Opening_Bal');

1775:
1776: cep_standard.debug('< 1777: EXCEPTION
1778: WHEN OTHERS THEN
1779: CEP_STANDARD.DEBUG('EXCEPTION:Populate_Opening_Bal');
1780: raise;
1781: END Populate_Opening_Bal;
1782:
1783:

Line 1808: cep_standard.debug('>>CE_CSH_FCAST_POP.Build_AP_Pay_Query');

1804: error_msg FND_NEW_MESSAGES.message_text%TYPE;
1805:
1806: BEGIN
1807:
1808: cep_standard.debug('>>CE_CSH_FCAST_POP.Build_AP_Pay_Query');
1809:
1810: from_clause := Get_From_Clause('ce_ap_fc_payments_v');
1811: cep_standard.debug('Built From Clause');
1812:

Line 1811: cep_standard.debug('Built From Clause');

1807:
1808: cep_standard.debug('>>CE_CSH_FCAST_POP.Build_AP_Pay_Query');
1809:
1810: from_clause := Get_From_Clause('ce_ap_fc_payments_v');
1811: cep_standard.debug('Built From Clause');
1812:
1813: where_clause := Get_Where_Clause || Add_Where('PAYMENT_METHOD') || Add_Where('BANK_ACCOUNT_ID');
1814:
1815: IF (NVL(CE_CASH_FCST.G_forecast_method,'F') = 'P') THEN

Line 1822: cep_standard.debug('row_id = ' || to_char(CE_CASH_FCST.G_forecast_row_id));

1818: Set_History;
1819:
1820: EXCEPTION
1821: When NO_DATA_FOUND Then
1822: cep_standard.debug('row_id = ' || to_char(CE_CASH_FCST.G_forecast_row_id));
1823:
1824: UPDATE ce_forecasts
1825: SET error_status = 'E'
1826: WHERE forecast_id = CE_CASH_FCST.G_forecast_id;

Line 1837: cep_standard.debug('EXCEPTION: No history data found for APP');

1833: CE_CASH_FCST.G_forecast_row_id,
1834: 'CE_NO_HIST_START_PERIOD',
1835: error_msg);
1836: zero_fill_cells;
1837: cep_standard.debug('EXCEPTION: No history data found for APP');
1838: return;
1839: When OTHERS Then
1840: cep_standard.debug('EXCEPTION: Build APP query - Set History');
1841: raise;

Line 1840: cep_standard.debug('EXCEPTION: Build APP query - Set History');

1836: zero_fill_cells;
1837: cep_standard.debug('EXCEPTION: No history data found for APP');
1838: return;
1839: When OTHERS Then
1840: cep_standard.debug('EXCEPTION: Build APP query - Set History');
1841: raise;
1842: END;
1843: IF (CE_CASH_FCST.G_order_date_type = 'V') THEN
1844: IF(CE_CASH_FCST.G_rp_exchange_type = 'User')THEN

Line 1890: cep_standard.debug('Built Select Clause');

1886: round(nvl(-src.amount,0)*curr.exchange_rate'
1887: ||','||CE_CASH_FCST.G_precision||'),
1888: -src.amount';
1889: END IF;
1890: cep_standard.debug('Built Select Clause');
1891:
1892: where_clause := where_clause || '
1893: AND NVL(src.actual_value_date, src.cleared_date) BETWEEN cab.start_date and cab.end_date
1894: AND src.status <> ''NEGOTIABLE'' ';

Line 1942: cep_standard.debug('Built Select Clause');

1938: round(nvl(-src.amount,0)*curr.exchange_rate'
1939: ||','||CE_CASH_FCST.G_precision||'),
1940: -src.amount';
1941: END IF;
1942: cep_standard.debug('Built Select Clause');
1943:
1944: where_clause := where_clause || '
1945: AND src.cleared_date BETWEEN cab.start_date and cab.end_date
1946: AND src.status <> ''NEGOTIABLE'' ';

Line 1996: cep_standard.debug('Built Select Clause');

1992: round(nvl(-src.amount,0)*curr.exchange_rate'
1993: ||','||CE_CASH_FCST.G_precision||'),
1994: -src.amount';
1995: END IF;
1996: cep_standard.debug('Built Select Clause');
1997:
1998: where_clause := where_clause || '
1999: AND NVL(src.actual_value_date,NVL(src.anticipated_value_date,NVL(src.maturity_date,src.payment_date))) BETWEEN cab.start_date - '
2000: ||to_char(CE_CASH_FCST.G_lead_time)||

Line 2005: cep_standard.debug('Built Where Clause');

2001: ' and cab.end_date - '
2002: ||to_char(CE_CASH_FCST.G_lead_time)||
2003: ' AND src.status in (''NEGOTIABLE'',''ISSUED'') ';
2004: END IF;
2005: cep_standard.debug('Built Where Clause');
2006:
2007: main_query := select_clause || from_clause || where_clause;
2008:
2009: Execute_Main_Query (main_query);

Line 2010: cep_standard.debug('<

2006:
2007: main_query := select_clause || from_clause || where_clause;
2008:
2009: Execute_Main_Query (main_query);
2010: cep_standard.debug('< 2011: EXCEPTION
2012: WHEN OTHERS THEN
2013: CEP_STANDARD.DEBUG('EXCEPTION:Build_AP_Pay_Query');
2014: raise;

Line 2013: CEP_STANDARD.DEBUG('EXCEPTION:Build_AP_Pay_Query');

2009: Execute_Main_Query (main_query);
2010: cep_standard.debug('< 2011: EXCEPTION
2012: WHEN OTHERS THEN
2013: CEP_STANDARD.DEBUG('EXCEPTION:Build_AP_Pay_Query');
2014: raise;
2015: END Build_AP_Pay_Query;
2016:
2017:

Line 2043: cep_standard.debug('>>Build_AP_Project_Inv_Query');

2039: main_query varchar2(3500) := null;
2040: view_name VARCHAR2(50);
2041:
2042: BEGIN
2043: cep_standard.debug('>>Build_AP_Project_Inv_Query');
2044:
2045: select_clause := Get_Select_Clause;
2046: cep_standard.debug('Built Select Clause');
2047:

Line 2046: cep_standard.debug('Built Select Clause');

2042: BEGIN
2043: cep_standard.debug('>>Build_AP_Project_Inv_Query');
2044:
2045: select_clause := Get_Select_Clause;
2046: cep_standard.debug('Built Select Clause');
2047:
2048: IF (NVL(CE_CASH_FCST.G_discount_option,'N') = 'N') THEN
2049: cep_standard.debug('Discount NOT taken');
2050: from_clause := Get_From_Clause('ce_due_project_inv_v');

Line 2049: cep_standard.debug('Discount NOT taken');

2045: select_clause := Get_Select_Clause;
2046: cep_standard.debug('Built Select Clause');
2047:
2048: IF (NVL(CE_CASH_FCST.G_discount_option,'N') = 'N') THEN
2049: cep_standard.debug('Discount NOT taken');
2050: from_clause := Get_From_Clause('ce_due_project_inv_v');
2051: ELSE cep_standard.debug('Discount taken');
2052: from_clause := Get_From_Clause('ce_disc_project_inv_v');
2053: END IF;

Line 2051: ELSE cep_standard.debug('Discount taken');

2047:
2048: IF (NVL(CE_CASH_FCST.G_discount_option,'N') = 'N') THEN
2049: cep_standard.debug('Discount NOT taken');
2050: from_clause := Get_From_Clause('ce_due_project_inv_v');
2051: ELSE cep_standard.debug('Discount taken');
2052: from_clause := Get_From_Clause('ce_disc_project_inv_v');
2053: END IF;
2054: cep_standard.debug('Built From Clause');
2055:

Line 2054: cep_standard.debug('Built From Clause');

2050: from_clause := Get_From_Clause('ce_due_project_inv_v');
2051: ELSE cep_standard.debug('Discount taken');
2052: from_clause := Get_From_Clause('ce_disc_project_inv_v');
2053: END IF;
2054: cep_standard.debug('Built From Clause');
2055:
2056: where_clause := Get_Where_Clause || '
2057: AND src.trx_date BETWEEN cab.start_date - '
2058: ||to_char(CE_CASH_FCST.G_lead_time)||

Line 2065: cep_standard.debug('Built Where Clause');

2061: Add_Where('PROJECT_ID') ||
2062: Add_Where('PAYMENT_PRIORITY') || Add_Where('PAY_GROUP') || Add_Where('VENDOR_TYPE') ||
2063: Add_Where('INCLUDE_HOLD_FLAG');
2064:
2065: cep_standard.debug('Built Where Clause');
2066:
2067: main_query := select_clause || from_clause || where_clause;
2068:
2069: Execute_Main_Query (main_query);

Line 2071: cep_standard.debug('<

2067: main_query := select_clause || from_clause || where_clause;
2068:
2069: Execute_Main_Query (main_query);
2070:
2071: cep_standard.debug('< 2072: EXCEPTION
2073: WHEN OTHERS THEN
2074: CEP_STANDARD.DEBUG('EXCEPTION:Build_AP_Project_Inv_Query');
2075: raise;

Line 2074: CEP_STANDARD.DEBUG('EXCEPTION:Build_AP_Project_Inv_Query');

2070:
2071: cep_standard.debug('< 2072: EXCEPTION
2073: WHEN OTHERS THEN
2074: CEP_STANDARD.DEBUG('EXCEPTION:Build_AP_Project_Inv_Query');
2075: raise;
2076: END Build_AP_Project_Inv_Query;
2077:
2078:

Line 2103: cep_standard.debug('>>Build_AP_Invoice_Query');

2099: main_query varchar2(3500) := null;
2100: view_name VARCHAR2(50);
2101:
2102: BEGIN
2103: cep_standard.debug('>>Build_AP_Invoice_Query');
2104:
2105: select_clause := Get_Select_Clause;
2106: cep_standard.debug('Built Select Clause');
2107:

Line 2106: cep_standard.debug('Built Select Clause');

2102: BEGIN
2103: cep_standard.debug('>>Build_AP_Invoice_Query');
2104:
2105: select_clause := Get_Select_Clause;
2106: cep_standard.debug('Built Select Clause');
2107:
2108: IF (NVL(CE_CASH_FCST.G_discount_option,'N') = 'N') THEN
2109: cep_standard.debug('Discount NOT taken');
2110: from_clause := Get_From_Clause('ce_ap_fc_due_invoices_v');

Line 2109: cep_standard.debug('Discount NOT taken');

2105: select_clause := Get_Select_Clause;
2106: cep_standard.debug('Built Select Clause');
2107:
2108: IF (NVL(CE_CASH_FCST.G_discount_option,'N') = 'N') THEN
2109: cep_standard.debug('Discount NOT taken');
2110: from_clause := Get_From_Clause('ce_ap_fc_due_invoices_v');
2111: ELSE
2112: cep_standard.debug('Discount taken');
2113: from_clause := Get_From_Clause('ce_disc_invoices_v');

Line 2112: cep_standard.debug('Discount taken');

2108: IF (NVL(CE_CASH_FCST.G_discount_option,'N') = 'N') THEN
2109: cep_standard.debug('Discount NOT taken');
2110: from_clause := Get_From_Clause('ce_ap_fc_due_invoices_v');
2111: ELSE
2112: cep_standard.debug('Discount taken');
2113: from_clause := Get_From_Clause('ce_disc_invoices_v');
2114: END IF;
2115: cep_standard.debug('Built From Clause');
2116:

Line 2115: cep_standard.debug('Built From Clause');

2111: ELSE
2112: cep_standard.debug('Discount taken');
2113: from_clause := Get_From_Clause('ce_disc_invoices_v');
2114: END IF;
2115: cep_standard.debug('Built From Clause');
2116:
2117: where_clause := Get_Where_Clause || '
2118: AND src.trx_date BETWEEN cab.start_date - '
2119: ||to_char(CE_CASH_FCST.G_lead_time)||

Line 2134: cep_standard.debug('Built Where Clause');

2130: where project_id = ' || to_char(CE_CASH_FCST.G_rp_project_id) || ')';
2131:
2132: END IF;
2133:
2134: cep_standard.debug('Built Where Clause');
2135:
2136: main_query := select_clause || from_clause || where_clause;
2137:
2138: Execute_Main_Query (main_query);

Line 2144: cep_standard.debug('<

2140: IF (CE_CASH_FCST.G_rp_project_id IS NOT NULL) THEN
2141: Build_AP_Project_Inv_Query;
2142: END IF;
2143:
2144: cep_standard.debug('< 2145: EXCEPTION
2146: WHEN OTHERS THEN
2147: CEP_STANDARD.DEBUG('EXCEPTION:Build_AP_Invoice_Query');
2148: raise;

Line 2147: CEP_STANDARD.DEBUG('EXCEPTION:Build_AP_Invoice_Query');

2143:
2144: cep_standard.debug('< 2145: EXCEPTION
2146: WHEN OTHERS THEN
2147: CEP_STANDARD.DEBUG('EXCEPTION:Build_AP_Invoice_Query');
2148: raise;
2149: END Build_AP_Invoice_Query;
2150:
2151:

Line 2235: cep_standard.debug('<

2231: main_query := select_clause || from_clause || where_clause;
2232:
2233: Execute_Main_Query (main_query);
2234:
2235: cep_standard.debug('< 2236: EXCEPTION
2237: WHEN OTHERS THEN
2238: cep_standard.debug('EXCEPTION:OTHERS-Build_PA_Invoice_Query');
2239: RAISE;

Line 2238: cep_standard.debug('EXCEPTION:OTHERS-Build_PA_Invoice_Query');

2234:
2235: cep_standard.debug('< 2236: EXCEPTION
2237: WHEN OTHERS THEN
2238: cep_standard.debug('EXCEPTION:OTHERS-Build_PA_Invoice_Query');
2239: RAISE;
2240: END Build_PA_Invoice_Query;
2241:
2242:

Line 2265: cep_standard.debug('>>Build_AR_Invoice_Query');

2261: where_clause varchar2(1500);
2262: select_clause varchar2(1500);
2263: main_query varchar2(3500) := null;
2264: BEGIN
2265: cep_standard.debug('>>Build_AR_Invoice_Query');
2266:
2267: IF (CE_CASH_FCST.G_include_dispute_flag = 'N') THEN
2268: IF( CE_CASH_FCST.G_rp_exchange_type = 'User')THEN
2269: select_clause := ' SELECT CE_FORECAST_TRX_CELLS_S.nextval,

Line 2318: cep_standard.debug('Built Select Clause');

2314: ELSE
2315: select_clause := Get_Select_Clause;
2316: END IF;
2317:
2318: cep_standard.debug('Built Select Clause');
2319:
2320: from_clause := Get_From_Clause ('ce_ar_fc_invoices_v');
2321: cep_standard.debug('Built From Clause');
2322:

Line 2321: cep_standard.debug('Built From Clause');

2317:
2318: cep_standard.debug('Built Select Clause');
2319:
2320: from_clause := Get_From_Clause ('ce_ar_fc_invoices_v');
2321: cep_standard.debug('Built From Clause');
2322:
2323: IF (CE_CASH_FCST.G_use_average_payment_days = 'Y') THEN
2324: where_clause := Get_Where_Clause || ' AND
2325: nvl(src.invoice_date, src.trx_date) + decode(src.invoice_date, null, '

Line 2354: cep_standard.debug('Built Where Clause');

2350: and pa.project_id = ' || to_char(CE_CASH_FCST.G_rp_project_id) || ')';
2351:
2352: END IF;
2353:
2354: cep_standard.debug('Built Where Clause');
2355:
2356: main_query := select_clause || from_clause || where_clause;
2357:
2358: Execute_Main_Query (main_query);

Line 2364: cep_standard.debug('<

2360: IF (CE_CASH_FCST.G_rp_project_id IS NOT NULL) THEN
2361: Build_PA_Invoice_Query;
2362: END IF;
2363:
2364: cep_standard.debug('< 2365: EXCEPTION
2366: WHEN OTHERS THEN
2367: cep_standard.debug('EXCEPTION:OTHERS-Build_AR_Invoice_Query');
2368: RAISE;

Line 2367: cep_standard.debug('EXCEPTION:OTHERS-Build_AR_Invoice_Query');

2363:
2364: cep_standard.debug('< 2365: EXCEPTION
2366: WHEN OTHERS THEN
2367: cep_standard.debug('EXCEPTION:OTHERS-Build_AR_Invoice_Query');
2368: RAISE;
2369: END Build_AR_Invoice_Query;
2370:
2371:

Line 2398: cep_standard.debug('>>Build_AR_Receipt_Query');

2394: counter number;
2395: error_msg FND_NEW_MESSAGES.message_text%TYPE;
2396:
2397: BEGIN
2398: cep_standard.debug('>>Build_AR_Receipt_Query');
2399:
2400: from_clause := Get_From_Clause ('ce_ar_fc_receipts_v');
2401: cep_standard.debug('Built From Clause');
2402:

Line 2401: cep_standard.debug('Built From Clause');

2397: BEGIN
2398: cep_standard.debug('>>Build_AR_Receipt_Query');
2399:
2400: from_clause := Get_From_Clause ('ce_ar_fc_receipts_v');
2401: cep_standard.debug('Built From Clause');
2402:
2403: where_clause := Get_Where_Clause || Add_Where('BANK_ACCOUNT_ID') || Add_Where('RECEIPT_METHOD_ID');
2404:
2405: IF (NVL(CE_CASH_FCST.G_forecast_method,'F') = 'P') THEN

Line 2411: cep_standard.debug('row_id = ' || to_char(CE_CASH_FCST.G_forecast_row_id));

2407: Set_History;
2408:
2409: EXCEPTION
2410: When NO_DATA_FOUND Then
2411: cep_standard.debug('row_id = ' || to_char(CE_CASH_FCST.G_forecast_row_id));
2412:
2413: UPDATE ce_forecasts
2414: SET error_status = 'E'
2415: WHERE forecast_id = CE_CASH_FCST.G_forecast_id;

Line 2426: cep_standard.debug('EXCEPTION: No history data found for ARR');

2422: CE_CASH_FCST.G_forecast_row_id,
2423: 'CE_NO_HIST_START_PERIOD',
2424: error_msg);
2425: zero_fill_cells;
2426: cep_standard.debug('EXCEPTION: No history data found for ARR');
2427: return;
2428: When OTHERS Then
2429: cep_standard.debug('EXCEPTION: Build ARR query - Set History');
2430: raise;

Line 2429: cep_standard.debug('EXCEPTION: Build ARR query - Set History');

2425: zero_fill_cells;
2426: cep_standard.debug('EXCEPTION: No history data found for ARR');
2427: return;
2428: When OTHERS Then
2429: cep_standard.debug('EXCEPTION: Build ARR query - Set History');
2430: raise;
2431: END;
2432: IF (CE_CASH_FCST.G_order_date_type = 'V') THEN
2433: where_clause := where_clause || '

Line 2453: cep_standard.debug('Built Where Clause');

2449: ' AND src.status not in (''CLEARED'',''RISK_ELIMINATED'') ';
2450: trx_date_clause := 'src.cash_activity_date';
2451: END IF;
2452:
2453: cep_standard.debug('Built Where Clause');
2454:
2455: IF(CE_CASH_FCST.G_rp_exchange_type = 'User') THEN
2456: select_clause := 'SELECT CE_FORECAST_TRX_CELLS_S.nextval,
2457: '||CE_CASH_FCST.G_forecast_id||',

Line 2502: cep_standard.debug('Built Select Clause');

2498: round(nvl(src.amount,0)*curr.exchange_rate,'
2499: ||CE_CASH_FCST.G_precision||'),
2500: src.amount';
2501: END IF;
2502: cep_standard.debug('Built Select Clause');
2503:
2504: main_query := select_clause || from_clause || where_clause;
2505:
2506: commit;

Line 2509: cep_standard.debug('<

2505:
2506: commit;
2507:
2508: Execute_Main_Query (main_query);
2509: cep_standard.debug('< 2510: EXCEPTION
2511: WHEN OTHERS THEN
2512: cep_standard.debug('EXCEPTION-OTHERS:Build_AR_Receipt_Query');
2513: RAISE;

Line 2512: cep_standard.debug('EXCEPTION-OTHERS:Build_AR_Receipt_Query');

2508: Execute_Main_Query (main_query);
2509: cep_standard.debug('< 2510: EXCEPTION
2511: WHEN OTHERS THEN
2512: cep_standard.debug('EXCEPTION-OTHERS:Build_AR_Receipt_Query');
2513: RAISE;
2514: END Build_AR_Receipt_Query;
2515:
2516:

Line 2533: cep_standard.debug('>>Get_GL_General_Query');

2529: --------------------------------------------------------------------- */
2530: FUNCTION Get_GL_General_Query RETURN VARCHAR2 IS
2531: main_query varchar2(2000) := null;
2532: BEGIN
2533: cep_standard.debug('>>Get_GL_General_Query');
2534: IF(CE_CASH_FCST.G_rp_exchange_type = 'User')THEN
2535: main_query := ' SELECT CE_FORECAST_TRX_CELLS_S.nextval,
2536: '||CE_CASH_FCST.G_forecast_id||',
2537: '||CE_CASH_FCST.G_rp_forecast_header_id||',

Line 2610: cep_standard.debug('EXCEPTION-OTHERS: Get_GL_General_Query');

2606:
2607: return (main_query);
2608: EXCEPTION
2609: WHEN OTHERS THEN
2610: cep_standard.debug('EXCEPTION-OTHERS: Get_GL_General_Query');
2611: RAISE;
2612: END Get_GL_General_Query;
2613:
2614:

Line 2633: cep_standard.debug('>>Build_GL_Budget_Query');

2629: PROCEDURE Build_GL_Budget_Query IS
2630: main_query varchar2(2000) := null;
2631:
2632: BEGIN
2633: cep_standard.debug('>>Build_GL_Budget_Query');
2634: main_query := Get_GL_General_Query || '
2635: AND src.budget_version_id = '||CE_CASH_FCST.G_budget_version_id||'
2636: AND src.actual_flag = ''B'' ';
2637:

Line 2640: cep_standard.debug('<

2636: AND src.actual_flag = ''B'' ';
2637:
2638: Execute_Main_Query (main_query);
2639:
2640: cep_standard.debug('< 2641:
2642: EXCEPTION
2643: WHEN OTHERS THEN
2644: cep_standard.debug('EXCEPTION-OTHERS: Build_GL_Budget_Query');

Line 2644: cep_standard.debug('EXCEPTION-OTHERS: Build_GL_Budget_Query');

2640: cep_standard.debug('< 2641:
2642: EXCEPTION
2643: WHEN OTHERS THEN
2644: cep_standard.debug('EXCEPTION-OTHERS: Build_GL_Budget_Query');
2645: RAISE;
2646: END Build_GL_Budget_Query;
2647:
2648:

Line 2665: cep_standard.debug('>>Build_GL_Encumb_Query');

2661: --------------------------------------------------------------------- */
2662: PROCEDURE Build_GL_Encumb_Query IS
2663: main_query varchar2(2000) := null;
2664: BEGIN
2665: cep_standard.debug('>>Build_GL_Encumb_Query');
2666: main_query := Get_GL_General_Query || '
2667: AND src.encumbrance_type_id = '||CE_CASH_FCST.G_encumbrance_type_id||'
2668: AND src.actual_flag = ''E'' ';
2669:

Line 2672: cep_standard.debug('<

2668: AND src.actual_flag = ''E'' ';
2669:
2670: Execute_Main_Query (main_query);
2671:
2672: cep_standard.debug('< 2673:
2674: EXCEPTION
2675: WHEN OTHERS THEN
2676: cep_standard.debug('EXCEPTION-OTHERS: Build_GL_Encumbrance_Query');

Line 2676: cep_standard.debug('EXCEPTION-OTHERS: Build_GL_Encumbrance_Query');

2672: cep_standard.debug('< 2673:
2674: EXCEPTION
2675: WHEN OTHERS THEN
2676: cep_standard.debug('EXCEPTION-OTHERS: Build_GL_Encumbrance_Query');
2677: RAISE;
2678: END Build_GL_Encumb_Query;
2679:
2680:

Line 2698: cep_standard.debug('>>Build_GL_Actuals_Query');

2694: PROCEDURE Build_GL_Actuals_Query IS
2695: main_query varchar2(2000) := null;
2696:
2697: BEGIN
2698: cep_standard.debug('>>Build_GL_Actuals_Query');
2699: main_query := Get_GL_General_Query || '
2700: AND src.actual_flag = ''A''
2701: AND src.template_id is null ';
2702:

Line 2705: cep_standard.debug('<

2701: AND src.template_id is null ';
2702:
2703: Execute_Main_Query (main_query);
2704:
2705: cep_standard.debug('< 2706:
2707: EXCEPTION
2708: WHEN OTHERS THEN
2709: cep_standard.debug('EXCEPTION-OTHERS: Build_GL_Actuals_Query');

Line 2709: cep_standard.debug('EXCEPTION-OTHERS: Build_GL_Actuals_Query');

2705: cep_standard.debug('< 2706:
2707: EXCEPTION
2708: WHEN OTHERS THEN
2709: cep_standard.debug('EXCEPTION-OTHERS: Build_GL_Actuals_Query');
2710: RAISE;
2711: END Build_GL_Actuals_Query;
2712:
2713:

Line 2735: cep_standard.debug('>>CE_CSH_FCAST_POP.Build_PAY_Exp_Query');

2731: main_query varchar2(3500) := null;
2732: error_msg FND_NEW_MESSAGES.message_text%TYPE;
2733:
2734: BEGIN
2735: cep_standard.debug('>>CE_CSH_FCAST_POP.Build_PAY_Exp_Query');
2736: select_clause := Get_Select_Clause;
2737: cep_standard.debug('Built Select Clause');
2738:
2739: from_clause := Get_From_Clause('ce_pay_fc_payroll_v');

Line 2737: cep_standard.debug('Built Select Clause');

2733:
2734: BEGIN
2735: cep_standard.debug('>>CE_CSH_FCAST_POP.Build_PAY_Exp_Query');
2736: select_clause := Get_Select_Clause;
2737: cep_standard.debug('Built Select Clause');
2738:
2739: from_clause := Get_From_Clause('ce_pay_fc_payroll_v');
2740: cep_standard.debug('Built From Clause');
2741:

Line 2740: cep_standard.debug('Built From Clause');

2736: select_clause := Get_Select_Clause;
2737: cep_standard.debug('Built Select Clause');
2738:
2739: from_clause := Get_From_Clause('ce_pay_fc_payroll_v');
2740: cep_standard.debug('Built From Clause');
2741:
2742: where_clause := Get_Where_Clause || '
2743: AND src.effective_date BETWEEN cab.start_date and cab.end_date ' ||
2744: Add_Where('ORG_PAYMENT_METHOD_ID') || Add_Where('BANK_ACCOUNT_ID') || Add_Where('PAYROLL_ID');

Line 2762: cep_standard.debug('row_id = ' || to_char(CE_CASH_FCST.G_forecast_row_id));

2758: Set_History;
2759:
2760: EXCEPTION
2761: When NO_DATA_FOUND Then
2762: cep_standard.debug('row_id = ' || to_char(CE_CASH_FCST.G_forecast_row_id));
2763:
2764: UPDATE ce_forecasts
2765: SET error_status = 'E'
2766: WHERE forecast_id = CE_CASH_FCST.G_forecast_id;

Line 2777: cep_standard.debug('EXCEPTION: No Payroll historical data found');

2773: CE_CASH_FCST.G_forecast_row_id,
2774: 'CE_NO_HIST_START_PERIOD',
2775: error_msg);
2776: zero_fill_cells;
2777: cep_standard.debug('EXCEPTION: No Payroll historical data found');
2778: return;
2779: When OTHERS Then
2780: cep_standard.debug('EXCEPTION: Build Payroll query - Set History');
2781: raise;

Line 2780: cep_standard.debug('EXCEPTION: Build Payroll query - Set History');

2776: zero_fill_cells;
2777: cep_standard.debug('EXCEPTION: No Payroll historical data found');
2778: return;
2779: When OTHERS Then
2780: cep_standard.debug('EXCEPTION: Build Payroll query - Set History');
2781: raise;
2782: END;
2783:
2784: main_query := select_clause || from_clause || where_clause;

Line 2788: cep_standard.debug('<

2784: main_query := select_clause || from_clause || where_clause;
2785:
2786: Execute_Main_Query (main_query);
2787:
2788: cep_standard.debug('< 2789:
2790: END Build_Pay_Exp_Query;
2791:
2792:

Line 3003: cep_standard.debug('>>CE_CSH_FCAST_POP.Build_PO_Orders_Query');

2999: AND project_id = CE_CASH_FCST.G_rp_project_id;
3000:
3001: BEGIN
3002:
3003: cep_standard.debug('>>CE_CSH_FCAST_POP.Build_PO_Orders_Query');
3004:
3005: where_clause := Get_Where_Clause||
3006: Add_Where('AUTHORIZATION_STATUS') || Add_Where('PAYMENT_PRIORITY') ||
3007: Add_Where('PAY_GROUP') || Add_Where('VENDOR_TYPE') || Add_Where('PROJECT_ID');

Line 3137: cep_standard.debug('l_max_end_date = ' || to_char(l_max_end_date, 'DD-MON-YYYY'));

3133: FROM ce_forecast_ext_temp
3134: WHERE context_value = 'A'
3135: AND forecast_request_id = CE_CASH_FCST.G_forecast_id
3136: AND conversion_rate = CE_CASH_FCST.G_forecast_row_id;
3137: cep_standard.debug('l_max_end_date = ' || to_char(l_max_end_date, 'DD-MON-YYYY'));
3138:
3139: IF (CE_CASH_FCST.G_rp_project_id IS NULL) THEN
3140:
3141: IF (CE_CASH_FCST.G_use_payment_terms = 'Y') THEN

Line 3143: cep_standard.debug('PROJECT_ID IS NULL');

3139: IF (CE_CASH_FCST.G_rp_project_id IS NULL) THEN
3140:
3141: IF (CE_CASH_FCST.G_use_payment_terms = 'Y') THEN
3142:
3143: cep_standard.debug('PROJECT_ID IS NULL');
3144: cep_standard.debug('USE_PAYMENT_TERMS IS Y');
3145:
3146: FOR C_rec IN C_period LOOP
3147: FOR C_req_rec in C_orders_terms(C_rec.start_date, C_rec.end_date) LOOP

Line 3144: cep_standard.debug('USE_PAYMENT_TERMS IS Y');

3140:
3141: IF (CE_CASH_FCST.G_use_payment_terms = 'Y') THEN
3142:
3143: cep_standard.debug('PROJECT_ID IS NULL');
3144: cep_standard.debug('USE_PAYMENT_TERMS IS Y');
3145:
3146: FOR C_rec IN C_period LOOP
3147: FOR C_req_rec in C_orders_terms(C_rec.start_date, C_rec.end_date) LOOP
3148: IF (C_req_rec.start_date < C_rec.start_date) THEN

Line 3165: cep_standard.debug('l_start_date = ' || to_char(l_start_date, 'DD-MON-YYYY'));

3161: l_start_date := trunc(C_req_rec.start_date);
3162: l_end_date := trunc(C_req_rec.end_date);
3163: END IF;
3164: END IF;
3165: cep_standard.debug('l_start_date = ' || to_char(l_start_date, 'DD-MON-YYYY'));
3166: cep_standard.debug('l_end_date = ' || to_char(l_end_date, 'DD-MON-YYYY'));
3167:
3168: /* In the case where we use terms and due amount is 0,
3169: we want to sum the term amounts and subtract them from the original

Line 3166: cep_standard.debug('l_end_date = ' || to_char(l_end_date, 'DD-MON-YYYY'));

3162: l_end_date := trunc(C_req_rec.end_date);
3163: END IF;
3164: END IF;
3165: cep_standard.debug('l_start_date = ' || to_char(l_start_date, 'DD-MON-YYYY'));
3166: cep_standard.debug('l_end_date = ' || to_char(l_end_date, 'DD-MON-YYYY'));
3167:
3168: /* In the case where we use terms and due amount is 0,
3169: we want to sum the term amounts and subtract them from the original
3170: source amount. Since this is too complex to perform within the cursor

Line 3179: cep_standard.debug('remain_amount = ' || to_char(remain_amount));

3175: INTO remain_amount
3176: from ap_terms_lines t
3177: where t.term_id = C_req_rec.term_id;
3178:
3179: cep_standard.debug('remain_amount = ' || to_char(remain_amount));
3180:
3181: l_amount := remain_amount/C_req_rec.total_dates * (l_end_date - l_start_date + 1);
3182:
3183: end if;

Line 3188: cep_standard.debug('per_day_amount = ' || to_char(C_req_rec.per_day_amount));

3184:
3185: l_amount := C_req_rec.per_day_amount * (l_end_date - l_start_date + 1);
3186:
3187:
3188: cep_standard.debug('per_day_amount = ' || to_char(C_req_rec.per_day_amount));
3189: cep_standard.debug('l_amount = ' || to_char(l_amount));
3190:
3191: IF(CE_CASH_FCST.G_rp_src_curr_type in ('E','F') AND
3192: C_req_rec.currency_code <> CE_CASH_FCST.G_rp_src_currency) THEN

Line 3189: cep_standard.debug('l_amount = ' || to_char(l_amount));

3185: l_amount := C_req_rec.per_day_amount * (l_end_date - l_start_date + 1);
3186:
3187:
3188: cep_standard.debug('per_day_amount = ' || to_char(C_req_rec.per_day_amount));
3189: cep_standard.debug('l_amount = ' || to_char(l_amount));
3190:
3191: IF(CE_CASH_FCST.G_rp_src_curr_type in ('E','F') AND
3192: C_req_rec.currency_code <> CE_CASH_FCST.G_rp_src_currency) THEN
3193: l_amount := 0;

Line 3195: cep_standard.debug('currency_code');

3191: IF(CE_CASH_FCST.G_rp_src_curr_type in ('E','F') AND
3192: C_req_rec.currency_code <> CE_CASH_FCST.G_rp_src_currency) THEN
3193: l_amount := 0;
3194: END IF;
3195: cep_standard.debug('currency_code');
3196:
3197:
3198: IF(CE_CASH_FCST.G_authorization_status IS NOT NULL AND
3199: C_req_rec.status <> CE_CASH_FCST.G_authorization_status) THEN

Line 3202: cep_standard.debug('authorization_status');

3198: IF(CE_CASH_FCST.G_authorization_status IS NOT NULL AND
3199: C_req_rec.status <> CE_CASH_FCST.G_authorization_status) THEN
3200: l_amount := 0;
3201: END IF;
3202: cep_standard.debug('authorization_status');
3203:
3204:
3205: IF(CE_CASH_FCST.G_payment_priority IS NOT NULL AND
3206: C_req_rec.payment_priority <> CE_CASH_FCST.G_payment_priority ) THEN

Line 3209: cep_standard.debug('payment_priority ');

3205: IF(CE_CASH_FCST.G_payment_priority IS NOT NULL AND
3206: C_req_rec.payment_priority <> CE_CASH_FCST.G_payment_priority ) THEN
3207: l_amount := 0;
3208: END IF;
3209: cep_standard.debug('payment_priority ');
3210:
3211:
3212: IF(CE_CASH_FCST.G_pay_group IS NOT NULL AND
3213: C_req_rec.paygroup <> CE_CASH_FCST.G_pay_group) THEN

Line 3216: cep_standard.debug('paygroup');

3212: IF(CE_CASH_FCST.G_pay_group IS NOT NULL AND
3213: C_req_rec.paygroup <> CE_CASH_FCST.G_pay_group) THEN
3214: l_amount := 0;
3215: END IF;
3216: cep_standard.debug('paygroup');
3217:
3218:
3219: IF(CE_CASH_FCST.G_vendor_type IS NOT NULL AND
3220: C_req_rec.vendor_type <> CE_CASH_FCST.G_vendor_type) THEN

Line 3223: cep_standard.debug('vendor_type');

3219: IF(CE_CASH_FCST.G_vendor_type IS NOT NULL AND
3220: C_req_rec.vendor_type <> CE_CASH_FCST.G_vendor_type) THEN
3221: l_amount := 0;
3222: END IF;
3223: cep_standard.debug('vendor_type');
3224:
3225: SELECT to_number(ORGANIZATION_ID)
3226: INTO l_legal_entity_id
3227: FROM hr_operating_units

Line 3229: cep_standard.debug('legal_entity_id');

3225: SELECT to_number(ORGANIZATION_ID)
3226: INTO l_legal_entity_id
3227: FROM hr_operating_units
3228: WHERE organization_id = C_req_rec.org_id;
3229: cep_standard.debug('legal_entity_id');
3230:
3231:
3232: IF( (CE_CASH_FCST.G_org_id <> -1 AND CE_CASH_FCST.G_org_id <> -99) AND
3233: (nvl(C_req_rec.org_id,CE_CASH_FCST.G_org_id) <> CE_CASH_FCST.G_org_id) ) THEN

Line 3236: cep_standard.debug('org_id');

3232: IF( (CE_CASH_FCST.G_org_id <> -1 AND CE_CASH_FCST.G_org_id <> -99) AND
3233: (nvl(C_req_rec.org_id,CE_CASH_FCST.G_org_id) <> CE_CASH_FCST.G_org_id) ) THEN
3234: l_amount := 0;
3235: END IF;
3236: cep_standard.debug('org_id');
3237:
3238:
3239: IF( CE_CASH_FCST.G_set_of_books_id IS NOT NULL AND
3240: CE_CASH_FCST.G_set_of_books_id <> -1) THEN

Line 3249: cep_standard.debug('set_of_books_id');

3245: l_amount := 0;
3246: END IF;
3247: CLOSE C_sob;
3248: END IF;
3249: cep_standard.debug('set_of_books_id');
3250:
3251: IF( CE_CASH_FCST.G_rp_exchange_type IS NULL OR
3252: CE_CASH_FCST.G_rp_exchange_type <> 'User')THEN
3253: OPEN C_rate(C_req_rec.currency_code);

Line 3264: cep_standard.debug('exchange_rate');

3260: l_rate := CE_CASH_FCST.G_rp_exchange_rate;
3261: ELSE
3262: l_rate := 1;
3263: END IF;
3264: cep_standard.debug('exchange_rate');
3265:
3266:
3267: IF(CE_CASH_FCST.G_rp_amount_threshold IS NOT NULL) THEN
3268: IF (abs(l_amount) <= CE_CASH_FCST.G_rp_amount_threshold) THEN

Line 3272: cep_standard.debug('amount_threshold');

3268: IF (abs(l_amount) <= CE_CASH_FCST.G_rp_amount_threshold) THEN
3269: l_amount := 0;
3270: END IF;
3271: END IF;
3272: cep_standard.debug('amount_threshold');
3273:
3274: IF(C_rec.forecast_column_id = CE_CASH_FCST.G_overdue_column_id AND
3275: CE_CASH_FCST.G_invalid_overdue_row)THEN
3276: l_amount := 0;

Line 3278: cep_standard.debug('OVERDUE_COLUMN');

3274: IF(C_rec.forecast_column_id = CE_CASH_FCST.G_overdue_column_id AND
3275: CE_CASH_FCST.G_invalid_overdue_row)THEN
3276: l_amount := 0;
3277: END IF;
3278: cep_standard.debug('OVERDUE_COLUMN');
3279:
3280: IF (l_amount <> 0) THEN
3281: IF (C_req_rec.trx_end_date IS NULL and error_flag = FALSE) THEN
3282:

Line 3297: cep_standard.debug('error_message');

3293: 'CE_FC_POP_NO_END_DATE',
3294: error_msg);
3295: error_flag := TRUE;
3296: END IF;
3297: cep_standard.debug('error_message');
3298:
3299: Insert_Fcast_Cell(C_req_rec.reference_id, C_req_rec.currency_code, l_legal_entity_id, null, null, -(l_amount*l_rate), -(l_amount), C_rec.forecast_column_id);
3300: END IF;
3301: END LOOP;

Line 3308: cep_standard.debug('PROJECT_ID IS NULL');

3304: clear_aging_buckets;
3305: zero_fill_cells;
3306:
3307: ELSE
3308: cep_standard.debug('PROJECT_ID IS NULL');
3309: cep_standard.debug('USE_PAYMENT_TERMS IS N');
3310:
3311: FOR C_rec IN C_period LOOP
3312: FOR C_req_rec in C_orders(C_rec.start_date, C_rec.end_date) LOOP

Line 3309: cep_standard.debug('USE_PAYMENT_TERMS IS N');

3305: zero_fill_cells;
3306:
3307: ELSE
3308: cep_standard.debug('PROJECT_ID IS NULL');
3309: cep_standard.debug('USE_PAYMENT_TERMS IS N');
3310:
3311: FOR C_rec IN C_period LOOP
3312: FOR C_req_rec in C_orders(C_rec.start_date, C_rec.end_date) LOOP
3313: IF (C_req_rec.start_date < C_rec.start_date) THEN

Line 3330: cep_standard.debug('l_start_date = ' || to_char(l_start_date, 'DD-MON-YYYY'));

3326: l_start_date := trunc(C_req_rec.start_date);
3327: l_end_date := trunc(C_req_rec.end_date);
3328: END IF;
3329: END IF;
3330: cep_standard.debug('l_start_date = ' || to_char(l_start_date, 'DD-MON-YYYY'));
3331: cep_standard.debug('l_end_date = ' || to_char(l_end_date, 'DD-MON-YYYY'));
3332:
3333: l_amount := C_req_rec.per_day_amount * (l_end_date - l_start_date + 1);
3334:

Line 3331: cep_standard.debug('l_end_date = ' || to_char(l_end_date, 'DD-MON-YYYY'));

3327: l_end_date := trunc(C_req_rec.end_date);
3328: END IF;
3329: END IF;
3330: cep_standard.debug('l_start_date = ' || to_char(l_start_date, 'DD-MON-YYYY'));
3331: cep_standard.debug('l_end_date = ' || to_char(l_end_date, 'DD-MON-YYYY'));
3332:
3333: l_amount := C_req_rec.per_day_amount * (l_end_date - l_start_date + 1);
3334:
3335: cep_standard.debug('per_day_amount = ' || to_char(C_req_rec.per_day_amount));

Line 3335: cep_standard.debug('per_day_amount = ' || to_char(C_req_rec.per_day_amount));

3331: cep_standard.debug('l_end_date = ' || to_char(l_end_date, 'DD-MON-YYYY'));
3332:
3333: l_amount := C_req_rec.per_day_amount * (l_end_date - l_start_date + 1);
3334:
3335: cep_standard.debug('per_day_amount = ' || to_char(C_req_rec.per_day_amount));
3336: cep_standard.debug('l_amount = ' || to_char(l_amount));
3337:
3338: IF(CE_CASH_FCST.G_rp_src_curr_type in ('E','F') AND
3339: C_req_rec.currency_code <> CE_CASH_FCST.G_rp_src_currency) THEN

Line 3336: cep_standard.debug('l_amount = ' || to_char(l_amount));

3332:
3333: l_amount := C_req_rec.per_day_amount * (l_end_date - l_start_date + 1);
3334:
3335: cep_standard.debug('per_day_amount = ' || to_char(C_req_rec.per_day_amount));
3336: cep_standard.debug('l_amount = ' || to_char(l_amount));
3337:
3338: IF(CE_CASH_FCST.G_rp_src_curr_type in ('E','F') AND
3339: C_req_rec.currency_code <> CE_CASH_FCST.G_rp_src_currency) THEN
3340: l_amount := 0;

Line 3342: cep_standard.debug('currency_code');

3338: IF(CE_CASH_FCST.G_rp_src_curr_type in ('E','F') AND
3339: C_req_rec.currency_code <> CE_CASH_FCST.G_rp_src_currency) THEN
3340: l_amount := 0;
3341: END IF;
3342: cep_standard.debug('currency_code');
3343:
3344:
3345: IF(CE_CASH_FCST.G_authorization_status IS NOT NULL AND
3346: C_req_rec.status <> CE_CASH_FCST.G_authorization_status) THEN

Line 3349: cep_standard.debug('authorization_status');

3345: IF(CE_CASH_FCST.G_authorization_status IS NOT NULL AND
3346: C_req_rec.status <> CE_CASH_FCST.G_authorization_status) THEN
3347: l_amount := 0;
3348: END IF;
3349: cep_standard.debug('authorization_status');
3350:
3351:
3352: IF(CE_CASH_FCST.G_payment_priority IS NOT NULL AND
3353: C_req_rec.payment_priority <> CE_CASH_FCST.G_payment_priority ) THEN

Line 3356: cep_standard.debug('payment_priority ');

3352: IF(CE_CASH_FCST.G_payment_priority IS NOT NULL AND
3353: C_req_rec.payment_priority <> CE_CASH_FCST.G_payment_priority ) THEN
3354: l_amount := 0;
3355: END IF;
3356: cep_standard.debug('payment_priority ');
3357:
3358:
3359: IF(CE_CASH_FCST.G_pay_group IS NOT NULL AND
3360: C_req_rec.paygroup <> CE_CASH_FCST.G_pay_group) THEN

Line 3363: cep_standard.debug('paygroup');

3359: IF(CE_CASH_FCST.G_pay_group IS NOT NULL AND
3360: C_req_rec.paygroup <> CE_CASH_FCST.G_pay_group) THEN
3361: l_amount := 0;
3362: END IF;
3363: cep_standard.debug('paygroup');
3364:
3365:
3366: IF(CE_CASH_FCST.G_vendor_type IS NOT NULL AND
3367: C_req_rec.vendor_type <> CE_CASH_FCST.G_vendor_type) THEN

Line 3370: cep_standard.debug('vendor_type');

3366: IF(CE_CASH_FCST.G_vendor_type IS NOT NULL AND
3367: C_req_rec.vendor_type <> CE_CASH_FCST.G_vendor_type) THEN
3368: l_amount := 0;
3369: END IF;
3370: cep_standard.debug('vendor_type');
3371:
3372: SELECT to_number(ORGANIZATION_ID)
3373: INTO l_legal_entity_id
3374: FROM hr_operating_units

Line 3376: cep_standard.debug('legal_entity_id');

3372: SELECT to_number(ORGANIZATION_ID)
3373: INTO l_legal_entity_id
3374: FROM hr_operating_units
3375: WHERE organization_id = C_req_rec.org_id;
3376: cep_standard.debug('legal_entity_id');
3377:
3378:
3379: IF( (CE_CASH_FCST.G_org_id <> -1 AND CE_CASH_FCST.G_org_id <> -99) AND
3380: (nvl(C_req_rec.org_id,CE_CASH_FCST.G_org_id) <> CE_CASH_FCST.G_org_id) ) THEN

Line 3383: cep_standard.debug('org_id');

3379: IF( (CE_CASH_FCST.G_org_id <> -1 AND CE_CASH_FCST.G_org_id <> -99) AND
3380: (nvl(C_req_rec.org_id,CE_CASH_FCST.G_org_id) <> CE_CASH_FCST.G_org_id) ) THEN
3381: l_amount := 0;
3382: END IF;
3383: cep_standard.debug('org_id');
3384:
3385:
3386: IF( CE_CASH_FCST.G_set_of_books_id IS NOT NULL AND
3387: CE_CASH_FCST.G_set_of_books_id <> -1) THEN

Line 3396: cep_standard.debug('set_of_books_id');

3392: l_amount := 0;
3393: END IF;
3394: CLOSE C_sob;
3395: END IF;
3396: cep_standard.debug('set_of_books_id');
3397:
3398: IF( CE_CASH_FCST.G_rp_exchange_type IS NULL OR
3399: CE_CASH_FCST.G_rp_exchange_type <> 'User')THEN
3400: OPEN C_rate(C_req_rec.currency_code);

Line 3411: cep_standard.debug('exchange_rate');

3407: l_rate := CE_CASH_FCST.G_rp_exchange_rate;
3408: ELSE
3409: l_rate := 1;
3410: END IF;
3411: cep_standard.debug('exchange_rate');
3412:
3413: IF(CE_CASH_FCST.G_rp_amount_threshold IS NOT NULL) THEN
3414: IF (abs(l_amount) <= CE_CASH_FCST.G_rp_amount_threshold) THEN
3415: l_amount := 0;

Line 3418: cep_standard.debug('amount_threshold');

3414: IF (abs(l_amount) <= CE_CASH_FCST.G_rp_amount_threshold) THEN
3415: l_amount := 0;
3416: END IF;
3417: END IF;
3418: cep_standard.debug('amount_threshold');
3419:
3420: IF(C_rec.forecast_column_id = CE_CASH_FCST.G_overdue_column_id AND
3421: CE_CASH_FCST.G_invalid_overdue_row)THEN
3422: l_amount := 0;

Line 3424: cep_standard.debug('OVERDUE_COLUMN');

3420: IF(C_rec.forecast_column_id = CE_CASH_FCST.G_overdue_column_id AND
3421: CE_CASH_FCST.G_invalid_overdue_row)THEN
3422: l_amount := 0;
3423: END IF;
3424: cep_standard.debug('OVERDUE_COLUMN');
3425:
3426: IF (l_amount <> 0) THEN
3427: IF (C_req_rec.trx_end_date IS NULL and error_flag = FALSE) THEN
3428:

Line 3443: cep_standard.debug('error_message');

3439: 'CE_FC_POP_NO_END_DATE',
3440: error_msg);
3441: error_flag := TRUE;
3442: END IF;
3443: cep_standard.debug('error_message');
3444:
3445: Insert_Fcast_Cell(C_req_rec.reference_id, C_req_rec.currency_code, l_legal_entity_id, null, null, -(l_amount*l_rate), -(l_amount), C_rec.forecast_column_id);
3446: END IF;
3447: END LOOP;

Line 3455: cep_standard.debug('PROJECT_ID IS NOT NULL');

3451: END IF;
3452: ELSE
3453: IF (CE_CASH_FCST.G_use_payment_terms = 'Y') THEN
3454:
3455: cep_standard.debug('PROJECT_ID IS NOT NULL');
3456: cep_standard.debug('USE_PAYMENT_TERMS IS Y');
3457:
3458: FOR C_rec IN C_period LOOP
3459: FOR C_req_rec in C_orders_terms_proj(C_rec.start_date, C_rec.end_date) LOOP

Line 3456: cep_standard.debug('USE_PAYMENT_TERMS IS Y');

3452: ELSE
3453: IF (CE_CASH_FCST.G_use_payment_terms = 'Y') THEN
3454:
3455: cep_standard.debug('PROJECT_ID IS NOT NULL');
3456: cep_standard.debug('USE_PAYMENT_TERMS IS Y');
3457:
3458: FOR C_rec IN C_period LOOP
3459: FOR C_req_rec in C_orders_terms_proj(C_rec.start_date, C_rec.end_date) LOOP
3460: IF (C_req_rec.start_date < C_rec.start_date) THEN

Line 3477: cep_standard.debug('l_start_date_proj = ' || to_char(l_start_date, 'DD-MON-YYYY'));

3473: l_start_date := trunc(C_req_rec.start_date);
3474: l_end_date := trunc(C_req_rec.end_date);
3475: END IF;
3476: END IF;
3477: cep_standard.debug('l_start_date_proj = ' || to_char(l_start_date, 'DD-MON-YYYY'));
3478: cep_standard.debug('l_end_date_proj = ' || to_char(l_end_date, 'DD-MON-YYYY'));
3479:
3480: /* In the case where we use terms and due amount is 0,
3481: we want to sum the term amounts and subtract them from the original

Line 3478: cep_standard.debug('l_end_date_proj = ' || to_char(l_end_date, 'DD-MON-YYYY'));

3474: l_end_date := trunc(C_req_rec.end_date);
3475: END IF;
3476: END IF;
3477: cep_standard.debug('l_start_date_proj = ' || to_char(l_start_date, 'DD-MON-YYYY'));
3478: cep_standard.debug('l_end_date_proj = ' || to_char(l_end_date, 'DD-MON-YYYY'));
3479:
3480: /* In the case where we use terms and due amount is 0,
3481: we want to sum the term amounts and subtract them from the original
3482: source amount. Since this is too complex to perform within the cursor

Line 3491: cep_standard.debug('remain_amount = ' || to_char(remain_amount));

3487: INTO remain_amount
3488: from ap_terms_lines t
3489: where t.term_id = C_req_rec.term_id;
3490:
3491: cep_standard.debug('remain_amount = ' || to_char(remain_amount));
3492:
3493: l_amount := remain_amount/C_req_rec.total_dates * (l_end_date - l_start_date + 1);
3494:
3495: end if;

Line 3499: cep_standard.debug('per_day_amount_proj = ' || to_char(C_req_rec.per_day_amount));

3495: end if;
3496:
3497: l_amount := C_req_rec.per_day_amount * (l_end_date - l_start_date + 1);
3498:
3499: cep_standard.debug('per_day_amount_proj = ' || to_char(C_req_rec.per_day_amount));
3500: cep_standard.debug('l_amount_proj = ' || to_char(l_amount));
3501:
3502: IF(CE_CASH_FCST.G_rp_src_curr_type in ('E','F') AND
3503: C_req_rec.currency_code <> CE_CASH_FCST.G_rp_src_currency) THEN

Line 3500: cep_standard.debug('l_amount_proj = ' || to_char(l_amount));

3496:
3497: l_amount := C_req_rec.per_day_amount * (l_end_date - l_start_date + 1);
3498:
3499: cep_standard.debug('per_day_amount_proj = ' || to_char(C_req_rec.per_day_amount));
3500: cep_standard.debug('l_amount_proj = ' || to_char(l_amount));
3501:
3502: IF(CE_CASH_FCST.G_rp_src_curr_type in ('E','F') AND
3503: C_req_rec.currency_code <> CE_CASH_FCST.G_rp_src_currency) THEN
3504: l_amount := 0;

Line 3506: cep_standard.debug('currency_code_proj');

3502: IF(CE_CASH_FCST.G_rp_src_curr_type in ('E','F') AND
3503: C_req_rec.currency_code <> CE_CASH_FCST.G_rp_src_currency) THEN
3504: l_amount := 0;
3505: END IF;
3506: cep_standard.debug('currency_code_proj');
3507:
3508:
3509: IF(CE_CASH_FCST.G_authorization_status IS NOT NULL AND
3510: C_req_rec.status <> CE_CASH_FCST.G_authorization_status) THEN

Line 3513: cep_standard.debug('authorization_status_proj');

3509: IF(CE_CASH_FCST.G_authorization_status IS NOT NULL AND
3510: C_req_rec.status <> CE_CASH_FCST.G_authorization_status) THEN
3511: l_amount := 0;
3512: END IF;
3513: cep_standard.debug('authorization_status_proj');
3514:
3515:
3516: IF(CE_CASH_FCST.G_payment_priority IS NOT NULL AND
3517: C_req_rec.payment_priority <> CE_CASH_FCST.G_payment_priority ) THEN

Line 3520: cep_standard.debug('payment_priority_proj');

3516: IF(CE_CASH_FCST.G_payment_priority IS NOT NULL AND
3517: C_req_rec.payment_priority <> CE_CASH_FCST.G_payment_priority ) THEN
3518: l_amount := 0;
3519: END IF;
3520: cep_standard.debug('payment_priority_proj');
3521:
3522:
3523: IF(CE_CASH_FCST.G_pay_group IS NOT NULL AND
3524: C_req_rec.paygroup <> CE_CASH_FCST.G_pay_group) THEN

Line 3527: cep_standard.debug('paygroup_proj');

3523: IF(CE_CASH_FCST.G_pay_group IS NOT NULL AND
3524: C_req_rec.paygroup <> CE_CASH_FCST.G_pay_group) THEN
3525: l_amount := 0;
3526: END IF;
3527: cep_standard.debug('paygroup_proj');
3528:
3529:
3530: IF(CE_CASH_FCST.G_vendor_type IS NOT NULL AND
3531: C_req_rec.vendor_type <> CE_CASH_FCST.G_vendor_type) THEN

Line 3534: cep_standard.debug('vendor_type_proj');

3530: IF(CE_CASH_FCST.G_vendor_type IS NOT NULL AND
3531: C_req_rec.vendor_type <> CE_CASH_FCST.G_vendor_type) THEN
3532: l_amount := 0;
3533: END IF;
3534: cep_standard.debug('vendor_type_proj');
3535:
3536: SELECT to_number(ORGANIZATION_ID)
3537: INTO l_legal_entity_id
3538: FROM hr_operating_units

Line 3540: cep_standard.debug('legal_entity_id_proj');

3536: SELECT to_number(ORGANIZATION_ID)
3537: INTO l_legal_entity_id
3538: FROM hr_operating_units
3539: WHERE organization_id = C_req_rec.org_id;
3540: cep_standard.debug('legal_entity_id_proj');
3541:
3542:
3543: IF( (CE_CASH_FCST.G_org_id <> -1 AND CE_CASH_FCST.G_org_id <> -99) AND
3544: (nvl(C_req_rec.org_id,CE_CASH_FCST.G_org_id) <> CE_CASH_FCST.G_org_id) ) THEN

Line 3547: cep_standard.debug('org_id_proj');

3543: IF( (CE_CASH_FCST.G_org_id <> -1 AND CE_CASH_FCST.G_org_id <> -99) AND
3544: (nvl(C_req_rec.org_id,CE_CASH_FCST.G_org_id) <> CE_CASH_FCST.G_org_id) ) THEN
3545: l_amount := 0;
3546: END IF;
3547: cep_standard.debug('org_id_proj');
3548:
3549: IF( CE_CASH_FCST.G_set_of_books_id IS NOT NULL AND
3550: CE_CASH_FCST.G_set_of_books_id <> -1) THEN
3551: OPEN C_sob(C_req_rec.org_id);

Line 3559: cep_standard.debug('set_of_books_id_proj');

3555: l_amount := 0;
3556: END IF;
3557: CLOSE C_sob;
3558: END IF;
3559: cep_standard.debug('set_of_books_id_proj');
3560:
3561: IF( CE_CASH_FCST.G_rp_exchange_type IS NULL OR
3562: CE_CASH_FCST.G_rp_exchange_type <> 'User')THEN
3563: OPEN C_rate(C_req_rec.currency_code);

Line 3574: cep_standard.debug('exchange_rate_proj');

3570: l_rate := CE_CASH_FCST.G_rp_exchange_rate;
3571: ELSE
3572: l_rate := 1;
3573: END IF;
3574: cep_standard.debug('exchange_rate_proj');
3575:
3576: IF(CE_CASH_FCST.G_rp_amount_threshold IS NOT NULL) THEN
3577: IF (abs(l_amount) <= CE_CASH_FCST.G_rp_amount_threshold) THEN
3578: l_amount := 0;

Line 3581: cep_standard.debug('amount_threshold_proj');

3577: IF (abs(l_amount) <= CE_CASH_FCST.G_rp_amount_threshold) THEN
3578: l_amount := 0;
3579: END IF;
3580: END IF;
3581: cep_standard.debug('amount_threshold_proj');
3582:
3583: IF(C_rec.forecast_column_id = CE_CASH_FCST.G_overdue_column_id AND
3584: CE_CASH_FCST.G_invalid_overdue_row)THEN
3585: l_amount := 0;

Line 3587: cep_standard.debug('OVERDUE_COLUMN_proj');

3583: IF(C_rec.forecast_column_id = CE_CASH_FCST.G_overdue_column_id AND
3584: CE_CASH_FCST.G_invalid_overdue_row)THEN
3585: l_amount := 0;
3586: END IF;
3587: cep_standard.debug('OVERDUE_COLUMN_proj');
3588:
3589: IF (l_amount <> 0) THEN
3590: IF (C_req_rec.trx_end_date IS NULL and error_flag = FALSE) THEN
3591:

Line 3606: cep_standard.debug('error_message_proj');

3602: 'CE_FC_POP_NO_END_DATE',
3603: error_msg);
3604: error_flag := TRUE;
3605: END IF;
3606: cep_standard.debug('error_message_proj');
3607:
3608: Insert_Fcast_Cell(C_req_rec.reference_id, C_req_rec.currency_code, l_legal_entity_id, null, null, -(l_amount*l_rate), -(l_amount), C_rec.forecast_column_id);
3609: END IF;
3610: END LOOP;

Line 3616: cep_standard.debug('PROJECT_ID IS NOT NULL');

3612: clear_aging_buckets;
3613: zero_fill_cells;
3614: ELSE
3615:
3616: cep_standard.debug('PROJECT_ID IS NOT NULL');
3617: cep_standard.debug('USE_PAYMENT_TERMS IS N');
3618:
3619: FOR C_rec IN C_period LOOP
3620: FOR C_req_rec in C_orders_proj(C_rec.start_date, C_rec.end_date) LOOP

Line 3617: cep_standard.debug('USE_PAYMENT_TERMS IS N');

3613: zero_fill_cells;
3614: ELSE
3615:
3616: cep_standard.debug('PROJECT_ID IS NOT NULL');
3617: cep_standard.debug('USE_PAYMENT_TERMS IS N');
3618:
3619: FOR C_rec IN C_period LOOP
3620: FOR C_req_rec in C_orders_proj(C_rec.start_date, C_rec.end_date) LOOP
3621: IF (C_req_rec.start_date < C_rec.start_date) THEN

Line 3638: cep_standard.debug('l_start_date_proj = ' || to_char(l_start_date, 'DD-MON-YYYY'));

3634: l_start_date := trunc(C_req_rec.start_date);
3635: l_end_date := trunc(C_req_rec.end_date);
3636: END IF;
3637: END IF;
3638: cep_standard.debug('l_start_date_proj = ' || to_char(l_start_date, 'DD-MON-YYYY'));
3639: cep_standard.debug('l_end_date_proj = ' || to_char(l_end_date, 'DD-MON-YYYY'));
3640:
3641: l_amount := C_req_rec.per_day_amount * (l_end_date - l_start_date + 1);
3642:

Line 3639: cep_standard.debug('l_end_date_proj = ' || to_char(l_end_date, 'DD-MON-YYYY'));

3635: l_end_date := trunc(C_req_rec.end_date);
3636: END IF;
3637: END IF;
3638: cep_standard.debug('l_start_date_proj = ' || to_char(l_start_date, 'DD-MON-YYYY'));
3639: cep_standard.debug('l_end_date_proj = ' || to_char(l_end_date, 'DD-MON-YYYY'));
3640:
3641: l_amount := C_req_rec.per_day_amount * (l_end_date - l_start_date + 1);
3642:
3643: cep_standard.debug('per_day_amount_proj = ' || to_char(C_req_rec.per_day_amount));

Line 3643: cep_standard.debug('per_day_amount_proj = ' || to_char(C_req_rec.per_day_amount));

3639: cep_standard.debug('l_end_date_proj = ' || to_char(l_end_date, 'DD-MON-YYYY'));
3640:
3641: l_amount := C_req_rec.per_day_amount * (l_end_date - l_start_date + 1);
3642:
3643: cep_standard.debug('per_day_amount_proj = ' || to_char(C_req_rec.per_day_amount));
3644: cep_standard.debug('l_amount_proj = ' || to_char(l_amount));
3645:
3646: IF(CE_CASH_FCST.G_rp_src_curr_type in ('E','F') AND
3647: C_req_rec.currency_code <> CE_CASH_FCST.G_rp_src_currency) THEN

Line 3644: cep_standard.debug('l_amount_proj = ' || to_char(l_amount));

3640:
3641: l_amount := C_req_rec.per_day_amount * (l_end_date - l_start_date + 1);
3642:
3643: cep_standard.debug('per_day_amount_proj = ' || to_char(C_req_rec.per_day_amount));
3644: cep_standard.debug('l_amount_proj = ' || to_char(l_amount));
3645:
3646: IF(CE_CASH_FCST.G_rp_src_curr_type in ('E','F') AND
3647: C_req_rec.currency_code <> CE_CASH_FCST.G_rp_src_currency) THEN
3648: l_amount := 0;

Line 3650: cep_standard.debug('currency_code_proj');

3646: IF(CE_CASH_FCST.G_rp_src_curr_type in ('E','F') AND
3647: C_req_rec.currency_code <> CE_CASH_FCST.G_rp_src_currency) THEN
3648: l_amount := 0;
3649: END IF;
3650: cep_standard.debug('currency_code_proj');
3651:
3652:
3653: IF(CE_CASH_FCST.G_authorization_status IS NOT NULL AND
3654: C_req_rec.status <> CE_CASH_FCST.G_authorization_status) THEN

Line 3657: cep_standard.debug('authorization_status_proj');

3653: IF(CE_CASH_FCST.G_authorization_status IS NOT NULL AND
3654: C_req_rec.status <> CE_CASH_FCST.G_authorization_status) THEN
3655: l_amount := 0;
3656: END IF;
3657: cep_standard.debug('authorization_status_proj');
3658:
3659:
3660: IF(CE_CASH_FCST.G_payment_priority IS NOT NULL AND
3661: C_req_rec.payment_priority <> CE_CASH_FCST.G_payment_priority ) THEN

Line 3664: cep_standard.debug('payment_priority_proj');

3660: IF(CE_CASH_FCST.G_payment_priority IS NOT NULL AND
3661: C_req_rec.payment_priority <> CE_CASH_FCST.G_payment_priority ) THEN
3662: l_amount := 0;
3663: END IF;
3664: cep_standard.debug('payment_priority_proj');
3665:
3666:
3667: IF(CE_CASH_FCST.G_pay_group IS NOT NULL AND
3668: C_req_rec.paygroup <> CE_CASH_FCST.G_pay_group) THEN

Line 3671: cep_standard.debug('paygroup_proj');

3667: IF(CE_CASH_FCST.G_pay_group IS NOT NULL AND
3668: C_req_rec.paygroup <> CE_CASH_FCST.G_pay_group) THEN
3669: l_amount := 0;
3670: END IF;
3671: cep_standard.debug('paygroup_proj');
3672:
3673:
3674: IF(CE_CASH_FCST.G_vendor_type IS NOT NULL AND
3675: C_req_rec.vendor_type <> CE_CASH_FCST.G_vendor_type) THEN

Line 3678: cep_standard.debug('vendor_type_proj');

3674: IF(CE_CASH_FCST.G_vendor_type IS NOT NULL AND
3675: C_req_rec.vendor_type <> CE_CASH_FCST.G_vendor_type) THEN
3676: l_amount := 0;
3677: END IF;
3678: cep_standard.debug('vendor_type_proj');
3679:
3680: SELECT to_number(ORGANIZATION_ID)
3681: INTO l_legal_entity_id
3682: FROM hr_operating_units

Line 3684: cep_standard.debug('legal_entity_id_proj');

3680: SELECT to_number(ORGANIZATION_ID)
3681: INTO l_legal_entity_id
3682: FROM hr_operating_units
3683: WHERE organization_id = C_req_rec.org_id;
3684: cep_standard.debug('legal_entity_id_proj');
3685:
3686: IF( (CE_CASH_FCST.G_org_id <> -1 AND CE_CASH_FCST.G_org_id <> -99) AND
3687: (nvl(C_req_rec.org_id,CE_CASH_FCST.G_org_id) <> CE_CASH_FCST.G_org_id) ) THEN
3688: l_amount := 0;

Line 3690: cep_standard.debug('org_id_proj');

3686: IF( (CE_CASH_FCST.G_org_id <> -1 AND CE_CASH_FCST.G_org_id <> -99) AND
3687: (nvl(C_req_rec.org_id,CE_CASH_FCST.G_org_id) <> CE_CASH_FCST.G_org_id) ) THEN
3688: l_amount := 0;
3689: END IF;
3690: cep_standard.debug('org_id_proj');
3691:
3692: IF( CE_CASH_FCST.G_set_of_books_id IS NOT NULL AND
3693: CE_CASH_FCST.G_set_of_books_id <> -1) THEN
3694: OPEN C_sob(C_req_rec.org_id);

Line 3702: cep_standard.debug('set_of_books_id_proj');

3698: l_amount := 0;
3699: END IF;
3700: CLOSE C_sob;
3701: END IF;
3702: cep_standard.debug('set_of_books_id_proj');
3703:
3704: IF( CE_CASH_FCST.G_rp_exchange_type IS NULL OR
3705: CE_CASH_FCST.G_rp_exchange_type <> 'User')THEN
3706: OPEN C_rate(C_req_rec.currency_code);

Line 3717: cep_standard.debug('exchange_rate_proj');

3713: l_rate := CE_CASH_FCST.G_rp_exchange_rate;
3714: ELSE
3715: l_rate := 1;
3716: END IF;
3717: cep_standard.debug('exchange_rate_proj');
3718:
3719: IF(CE_CASH_FCST.G_rp_amount_threshold IS NOT NULL) THEN
3720: IF (abs(l_amount) <= CE_CASH_FCST.G_rp_amount_threshold) THEN
3721: l_amount := 0;

Line 3724: cep_standard.debug('amount_threshold_proj');

3720: IF (abs(l_amount) <= CE_CASH_FCST.G_rp_amount_threshold) THEN
3721: l_amount := 0;
3722: END IF;
3723: END IF;
3724: cep_standard.debug('amount_threshold_proj');
3725:
3726: IF(C_rec.forecast_column_id = CE_CASH_FCST.G_overdue_column_id AND
3727: CE_CASH_FCST.G_invalid_overdue_row)THEN
3728: l_amount := 0;

Line 3730: cep_standard.debug('OVERDUE_COLUMN_proj');

3726: IF(C_rec.forecast_column_id = CE_CASH_FCST.G_overdue_column_id AND
3727: CE_CASH_FCST.G_invalid_overdue_row)THEN
3728: l_amount := 0;
3729: END IF;
3730: cep_standard.debug('OVERDUE_COLUMN_proj');
3731:
3732: IF (l_amount <> 0) THEN
3733: IF (C_req_rec.trx_end_date IS NULL and error_flag = FALSE) THEN
3734:

Line 3749: cep_standard.debug('error_message_proj');

3745: 'CE_FC_POP_NO_END_DATE',
3746: error_msg);
3747: error_flag := TRUE;
3748: END IF;
3749: cep_standard.debug('error_message_proj');
3750:
3751: Insert_Fcast_Cell(C_req_rec.reference_id, C_req_rec.currency_code, l_legal_entity_id, null, null, -(l_amount*l_rate), -(l_amount), C_rec.forecast_column_id);
3752: END IF;
3753: END LOOP;

Line 3760: cep_standard.debug('<

3756: zero_fill_cells;
3757: END IF;
3758: END IF;
3759: END IF;
3760: cep_standard.debug('< 3761: EXCEPTION
3762: WHEN OTHERS THEN
3763: CEP_STANDARD.DEBUG('EXCEPTION:Build_PO_Orders_Query');
3764: raise;

Line 3763: CEP_STANDARD.DEBUG('EXCEPTION:Build_PO_Orders_Query');

3759: END IF;
3760: cep_standard.debug('< 3761: EXCEPTION
3762: WHEN OTHERS THEN
3763: CEP_STANDARD.DEBUG('EXCEPTION:Build_PO_Orders_Query');
3764: raise;
3765: END Build_PO_Orders_Query;
3766:
3767: /* ---------------------------------------------------------------------

Line 3858: cep_standard.debug('>>CE_CSH_FCAST_POP.Build_PO_Req_Query');

3854:
3855:
3856: BEGIN
3857:
3858: cep_standard.debug('>>CE_CSH_FCAST_POP.Build_PO_Req_Query');
3859:
3860: select_clause := Get_Select_Clause;
3861: cep_standard.debug('Built Select Clause');
3862:

Line 3861: cep_standard.debug('Built Select Clause');

3857:
3858: cep_standard.debug('>>CE_CSH_FCAST_POP.Build_PO_Req_Query');
3859:
3860: select_clause := Get_Select_Clause;
3861: cep_standard.debug('Built Select Clause');
3862:
3863: from_clause := Get_From_Clause('ce_po_fc_requisitions_v');
3864: cep_standard.debug('Built From Clause');
3865:

Line 3864: cep_standard.debug('Built From Clause');

3860: select_clause := Get_Select_Clause;
3861: cep_standard.debug('Built Select Clause');
3862:
3863: from_clause := Get_From_Clause('ce_po_fc_requisitions_v');
3864: cep_standard.debug('Built From Clause');
3865:
3866: where_clause := Get_Where_Clause || '
3867: AND src.trx_date BETWEEN cab.start_date - '
3868: ||to_char(CE_CASH_FCST.G_lead_time)||

Line 3874: cep_standard.debug('Built Where Clause');

3870: ||to_char(CE_CASH_FCST.G_lead_time)||
3871: Add_Where('AUTHORIZATION_STATUS') || Add_Where('PROJECT_ID');
3872:
3873:
3874: cep_standard.debug('Built Where Clause');
3875:
3876: main_query := select_clause || from_clause || where_clause;
3877:
3878: Execute_Main_Query (main_query);

Line 3880: cep_standard.debug('Execute_Main_Query');

3876: main_query := select_clause || from_clause || where_clause;
3877:
3878: Execute_Main_Query (main_query);
3879:
3880: cep_standard.debug('Execute_Main_Query');
3881:
3882: IF (CE_CASH_FCST.G_include_temp_labor_flag = 'Y') THEN
3883:
3884: populate_aging_buckets;

Line 3892: cep_standard.debug('l_max_end_date = ' || to_char(l_max_end_date, 'DD-MON-YYYY'));

3888: FROM ce_forecast_ext_temp
3889: WHERE context_value = 'A'
3890: AND forecast_request_id = CE_CASH_FCST.G_forecast_id
3891: AND conversion_rate = CE_CASH_FCST.G_forecast_row_id;
3892: cep_standard.debug('l_max_end_date = ' || to_char(l_max_end_date, 'DD-MON-YYYY'));
3893:
3894: IF (CE_CASH_FCST.G_rp_project_id IS NULL) THEN
3895: cep_standard.debug('PROJECT_ID IS NULL');
3896:

Line 3895: cep_standard.debug('PROJECT_ID IS NULL');

3891: AND conversion_rate = CE_CASH_FCST.G_forecast_row_id;
3892: cep_standard.debug('l_max_end_date = ' || to_char(l_max_end_date, 'DD-MON-YYYY'));
3893:
3894: IF (CE_CASH_FCST.G_rp_project_id IS NULL) THEN
3895: cep_standard.debug('PROJECT_ID IS NULL');
3896:
3897: FOR C_rec IN C_period LOOP
3898: FOR C_req_rec in C_requisitions(C_rec.start_date, C_rec.end_date) LOOP
3899: IF (C_req_rec.start_date < C_rec.start_date) THEN

Line 3916: cep_standard.debug('l_start_date = ' || to_char(l_start_date, 'DD-MON-YYYY'));

3912: l_start_date := trunc(C_req_rec.start_date);
3913: l_end_date := trunc(C_req_rec.end_date);
3914: END IF;
3915: END IF;
3916: cep_standard.debug('l_start_date = ' || to_char(l_start_date, 'DD-MON-YYYY'));
3917: cep_standard.debug('l_end_date = ' || to_char(l_end_date, 'DD-MON-YYYY'));
3918:
3919: l_amount := C_req_rec.per_day_amount * (l_end_date - l_start_date + 1);
3920:

Line 3917: cep_standard.debug('l_end_date = ' || to_char(l_end_date, 'DD-MON-YYYY'));

3913: l_end_date := trunc(C_req_rec.end_date);
3914: END IF;
3915: END IF;
3916: cep_standard.debug('l_start_date = ' || to_char(l_start_date, 'DD-MON-YYYY'));
3917: cep_standard.debug('l_end_date = ' || to_char(l_end_date, 'DD-MON-YYYY'));
3918:
3919: l_amount := C_req_rec.per_day_amount * (l_end_date - l_start_date + 1);
3920:
3921: cep_standard.debug('per_day_amount = ' || to_char(C_req_rec.per_day_amount));

Line 3921: cep_standard.debug('per_day_amount = ' || to_char(C_req_rec.per_day_amount));

3917: cep_standard.debug('l_end_date = ' || to_char(l_end_date, 'DD-MON-YYYY'));
3918:
3919: l_amount := C_req_rec.per_day_amount * (l_end_date - l_start_date + 1);
3920:
3921: cep_standard.debug('per_day_amount = ' || to_char(C_req_rec.per_day_amount));
3922: cep_standard.debug('l_amount = ' || to_char(l_amount));
3923:
3924: IF(CE_CASH_FCST.G_rp_src_curr_type in ('E','F') AND
3925: C_req_rec.currency_code <> CE_CASH_FCST.G_rp_src_currency) THEN

Line 3922: cep_standard.debug('l_amount = ' || to_char(l_amount));

3918:
3919: l_amount := C_req_rec.per_day_amount * (l_end_date - l_start_date + 1);
3920:
3921: cep_standard.debug('per_day_amount = ' || to_char(C_req_rec.per_day_amount));
3922: cep_standard.debug('l_amount = ' || to_char(l_amount));
3923:
3924: IF(CE_CASH_FCST.G_rp_src_curr_type in ('E','F') AND
3925: C_req_rec.currency_code <> CE_CASH_FCST.G_rp_src_currency) THEN
3926: l_amount := 0;

Line 3928: cep_standard.debug('currency_code');

3924: IF(CE_CASH_FCST.G_rp_src_curr_type in ('E','F') AND
3925: C_req_rec.currency_code <> CE_CASH_FCST.G_rp_src_currency) THEN
3926: l_amount := 0;
3927: END IF;
3928: cep_standard.debug('currency_code');
3929:
3930: IF(CE_CASH_FCST.G_authorization_status IS NOT NULL AND
3931: C_req_rec.status <> CE_CASH_FCST.G_authorization_status) THEN
3932: l_amount := 0;

Line 3934: cep_standard.debug('authorization_status');

3930: IF(CE_CASH_FCST.G_authorization_status IS NOT NULL AND
3931: C_req_rec.status <> CE_CASH_FCST.G_authorization_status) THEN
3932: l_amount := 0;
3933: END IF;
3934: cep_standard.debug('authorization_status');
3935:
3936: SELECT to_number(ORGANIZATION_ID)
3937: INTO l_legal_entity_id
3938: FROM hr_operating_units

Line 3940: cep_standard.debug('legal_entity_id');

3936: SELECT to_number(ORGANIZATION_ID)
3937: INTO l_legal_entity_id
3938: FROM hr_operating_units
3939: WHERE organization_id = C_req_rec.org_id;
3940: cep_standard.debug('legal_entity_id');
3941:
3942: IF( (CE_CASH_FCST.G_org_id <> -1 AND CE_CASH_FCST.G_org_id <> -99) AND
3943: (nvl(C_req_rec.org_id, CE_CASH_FCST.G_org_id) <> CE_CASH_FCST.G_org_id) ) THEN
3944: l_amount := 0;

Line 3946: cep_standard.debug('org_id');

3942: IF( (CE_CASH_FCST.G_org_id <> -1 AND CE_CASH_FCST.G_org_id <> -99) AND
3943: (nvl(C_req_rec.org_id, CE_CASH_FCST.G_org_id) <> CE_CASH_FCST.G_org_id) ) THEN
3944: l_amount := 0;
3945: END IF;
3946: cep_standard.debug('org_id');
3947:
3948: IF( CE_CASH_FCST.G_set_of_books_id IS NOT NULL AND
3949: CE_CASH_FCST.G_set_of_books_id <> -1) THEN
3950: OPEN C_sob(C_req_rec.org_id);

Line 3958: cep_standard.debug('set_of_books_id');

3954: l_amount := 0;
3955: END IF;
3956: CLOSE C_sob;
3957: END IF;
3958: cep_standard.debug('set_of_books_id');
3959:
3960: IF( CE_CASH_FCST.G_rp_exchange_type IS NULL OR
3961: CE_CASH_FCST.G_rp_exchange_type <> 'User')THEN
3962: OPEN C_rate(C_req_rec.currency_code);

Line 3973: cep_standard.debug('exchange_rate');

3969: l_rate := CE_CASH_FCST.G_rp_exchange_rate;
3970: ELSE
3971: l_rate := 1;
3972: END IF;
3973: cep_standard.debug('exchange_rate');
3974:
3975: IF(CE_CASH_FCST.G_rp_amount_threshold IS NOT NULL) THEN
3976: IF (abs(l_amount) <= CE_CASH_FCST.G_rp_amount_threshold) THEN
3977: l_amount := 0;

Line 3980: cep_standard.debug('amount_threshold');

3976: IF (abs(l_amount) <= CE_CASH_FCST.G_rp_amount_threshold) THEN
3977: l_amount := 0;
3978: END IF;
3979: END IF;
3980: cep_standard.debug('amount_threshold');
3981:
3982: IF(C_rec.forecast_column_id = CE_CASH_FCST.G_overdue_column_id AND
3983: CE_CASH_FCST.G_invalid_overdue_row)THEN
3984: l_amount := 0;

Line 3986: cep_standard.debug('OVERDUE_COLUMN');

3982: IF(C_rec.forecast_column_id = CE_CASH_FCST.G_overdue_column_id AND
3983: CE_CASH_FCST.G_invalid_overdue_row)THEN
3984: l_amount := 0;
3985: END IF;
3986: cep_standard.debug('OVERDUE_COLUMN');
3987:
3988: IF (l_amount <> 0) THEN
3989: IF (C_req_rec.trx_end_date IS NULL and error_flag = FALSE) THEN
3990:

Line 4005: cep_standard.debug('error_message');

4001: 'CE_FC_POR_NO_END_DATE',
4002: error_msg);
4003: error_flag := TRUE;
4004: END IF;
4005: cep_standard.debug('error_message');
4006:
4007: Insert_Fcast_Cell(C_req_rec.reference_id, C_req_rec.currency_code, l_legal_entity_id, null, null, -(l_amount*l_rate), -(l_amount), C_rec.forecast_column_id);
4008: END IF;
4009: cep_standard.debug('INSERT_FCAST_CELL');

Line 4009: cep_standard.debug('INSERT_FCAST_CELL');

4005: cep_standard.debug('error_message');
4006:
4007: Insert_Fcast_Cell(C_req_rec.reference_id, C_req_rec.currency_code, l_legal_entity_id, null, null, -(l_amount*l_rate), -(l_amount), C_rec.forecast_column_id);
4008: END IF;
4009: cep_standard.debug('INSERT_FCAST_CELL');
4010:
4011: END LOOP;
4012: END LOOP;
4013:

Line 4018: cep_standard.debug('PROJECT_ID NOT NULL');

4014: clear_aging_buckets;
4015: zero_fill_cells;
4016:
4017: ELSE
4018: cep_standard.debug('PROJECT_ID NOT NULL');
4019:
4020: FOR C_rec IN C_period LOOP
4021: FOR C_req_rec in C_requisitions_proj(C_rec.start_date, C_rec.end_date) LOOP
4022: IF (C_req_rec.start_date < C_rec.start_date) THEN

Line 4040: cep_standard.debug('l_start_date_proj = ' || to_char(l_start_date, 'DD-MON-YYYY'));

4036: l_end_date := trunc(C_req_rec.end_date);
4037: END IF;
4038: END IF;
4039:
4040: cep_standard.debug('l_start_date_proj = ' || to_char(l_start_date, 'DD-MON-YYYY'));
4041: cep_standard.debug('l_end_date_proj = ' || to_char(l_end_date, 'DD-MON-YYYY'));
4042:
4043: l_amount := C_req_rec.per_day_amount * (l_end_date - l_start_date + 1);
4044:

Line 4041: cep_standard.debug('l_end_date_proj = ' || to_char(l_end_date, 'DD-MON-YYYY'));

4037: END IF;
4038: END IF;
4039:
4040: cep_standard.debug('l_start_date_proj = ' || to_char(l_start_date, 'DD-MON-YYYY'));
4041: cep_standard.debug('l_end_date_proj = ' || to_char(l_end_date, 'DD-MON-YYYY'));
4042:
4043: l_amount := C_req_rec.per_day_amount * (l_end_date - l_start_date + 1);
4044:
4045: cep_standard.debug('per_day_amount_proj = ' || to_char(C_req_rec.per_day_amount));

Line 4045: cep_standard.debug('per_day_amount_proj = ' || to_char(C_req_rec.per_day_amount));

4041: cep_standard.debug('l_end_date_proj = ' || to_char(l_end_date, 'DD-MON-YYYY'));
4042:
4043: l_amount := C_req_rec.per_day_amount * (l_end_date - l_start_date + 1);
4044:
4045: cep_standard.debug('per_day_amount_proj = ' || to_char(C_req_rec.per_day_amount));
4046: cep_standard.debug('l_amount_proj = ' || to_char(l_amount));
4047:
4048: IF(CE_CASH_FCST.G_rp_src_curr_type in ('E','F') AND
4049: C_req_rec.currency_code <> CE_CASH_FCST.G_rp_src_currency) THEN

Line 4046: cep_standard.debug('l_amount_proj = ' || to_char(l_amount));

4042:
4043: l_amount := C_req_rec.per_day_amount * (l_end_date - l_start_date + 1);
4044:
4045: cep_standard.debug('per_day_amount_proj = ' || to_char(C_req_rec.per_day_amount));
4046: cep_standard.debug('l_amount_proj = ' || to_char(l_amount));
4047:
4048: IF(CE_CASH_FCST.G_rp_src_curr_type in ('E','F') AND
4049: C_req_rec.currency_code <> CE_CASH_FCST.G_rp_src_currency) THEN
4050: l_amount := 0;

Line 4052: cep_standard.debug('currency_code_proj');

4048: IF(CE_CASH_FCST.G_rp_src_curr_type in ('E','F') AND
4049: C_req_rec.currency_code <> CE_CASH_FCST.G_rp_src_currency) THEN
4050: l_amount := 0;
4051: END IF;
4052: cep_standard.debug('currency_code_proj');
4053:
4054: IF(CE_CASH_FCST.G_authorization_status IS NOT NULL AND
4055: C_req_rec.status <> CE_CASH_FCST.G_authorization_status) THEN
4056: l_amount := 0;

Line 4058: cep_standard.debug('authorization_status_proj');

4054: IF(CE_CASH_FCST.G_authorization_status IS NOT NULL AND
4055: C_req_rec.status <> CE_CASH_FCST.G_authorization_status) THEN
4056: l_amount := 0;
4057: END IF;
4058: cep_standard.debug('authorization_status_proj');
4059:
4060: SELECT to_number(ORGANIZATION_ID)
4061: INTO l_legal_entity_id
4062: FROM hr_operating_units

Line 4064: cep_standard.debug('legal_entity_id_proj');

4060: SELECT to_number(ORGANIZATION_ID)
4061: INTO l_legal_entity_id
4062: FROM hr_operating_units
4063: WHERE organization_id = C_req_rec.org_id;
4064: cep_standard.debug('legal_entity_id_proj');
4065:
4066: IF( (CE_CASH_FCST.G_org_id <> -1 AND CE_CASH_FCST.G_org_id <> -99) AND
4067: (nvl(C_req_rec.org_id, CE_CASH_FCST.G_org_id) <> CE_CASH_FCST.G_org_id) ) THEN
4068: l_amount := 0;

Line 4070: cep_standard.debug('org_id_proj');

4066: IF( (CE_CASH_FCST.G_org_id <> -1 AND CE_CASH_FCST.G_org_id <> -99) AND
4067: (nvl(C_req_rec.org_id, CE_CASH_FCST.G_org_id) <> CE_CASH_FCST.G_org_id) ) THEN
4068: l_amount := 0;
4069: END IF;
4070: cep_standard.debug('org_id_proj');
4071:
4072: IF( CE_CASH_FCST.G_set_of_books_id IS NOT NULL AND
4073: CE_CASH_FCST.G_set_of_books_id <> -1) THEN
4074: OPEN C_sob(C_req_rec.org_id);

Line 4082: cep_standard.debug('set_of_books_id_proj');

4078: l_amount := 0;
4079: END IF;
4080: CLOSE C_sob;
4081: END IF;
4082: cep_standard.debug('set_of_books_id_proj');
4083:
4084: IF( CE_CASH_FCST.G_rp_exchange_type IS NULL OR
4085: CE_CASH_FCST.G_rp_exchange_type <> 'User')THEN
4086: OPEN C_rate(C_req_rec.currency_code);

Line 4097: cep_standard.debug('exchange_rate_proj');

4093: l_rate := CE_CASH_FCST.G_rp_exchange_rate;
4094: ELSE
4095: l_rate := 1;
4096: END IF;
4097: cep_standard.debug('exchange_rate_proj');
4098:
4099: IF(CE_CASH_FCST.G_rp_amount_threshold IS NOT NULL) THEN
4100: IF (abs(l_amount) <= CE_CASH_FCST.G_rp_amount_threshold) THEN
4101: l_amount := 0;

Line 4104: cep_standard.debug('amount_threshold_proj');

4100: IF (abs(l_amount) <= CE_CASH_FCST.G_rp_amount_threshold) THEN
4101: l_amount := 0;
4102: END IF;
4103: END IF;
4104: cep_standard.debug('amount_threshold_proj');
4105:
4106: IF(C_rec.forecast_column_id = CE_CASH_FCST.G_overdue_column_id AND
4107: CE_CASH_FCST.G_invalid_overdue_row)THEN
4108: l_amount := 0;

Line 4110: cep_standard.debug('OVERDUE_COLUMN_proj');

4106: IF(C_rec.forecast_column_id = CE_CASH_FCST.G_overdue_column_id AND
4107: CE_CASH_FCST.G_invalid_overdue_row)THEN
4108: l_amount := 0;
4109: END IF;
4110: cep_standard.debug('OVERDUE_COLUMN_proj');
4111:
4112: IF (l_amount <> 0) THEN
4113: IF (C_req_rec.trx_end_date IS NULL and error_flag = FALSE) THEN
4114:

Line 4129: cep_standard.debug('error_message_proj');

4125: 'CE_FC_POR_NO_END_DATE',
4126: error_msg);
4127: error_flag := TRUE;
4128: END IF;
4129: cep_standard.debug('error_message_proj');
4130:
4131: Insert_Fcast_Cell(C_req_rec.reference_id, C_req_rec.currency_code, l_legal_entity_id, null, null, -(l_amount*l_rate), -(l_amount), C_rec.forecast_column_id);
4132: cep_standard.debug('INSERT_FCAST_CELL_proj');
4133: END IF;

Line 4132: cep_standard.debug('INSERT_FCAST_CELL_proj');

4128: END IF;
4129: cep_standard.debug('error_message_proj');
4130:
4131: Insert_Fcast_Cell(C_req_rec.reference_id, C_req_rec.currency_code, l_legal_entity_id, null, null, -(l_amount*l_rate), -(l_amount), C_rec.forecast_column_id);
4132: cep_standard.debug('INSERT_FCAST_CELL_proj');
4133: END IF;
4134:
4135: END LOOP;
4136: END LOOP;

Line 4144: cep_standard.debug('<

4140:
4141: END IF;
4142: END IF;
4143:
4144: cep_standard.debug('< 4145: EXCEPTION
4146: WHEN OTHERS THEN
4147: CEP_STANDARD.DEBUG('EXCEPTION:Build_PO_req_Query');
4148: raise;

Line 4147: CEP_STANDARD.DEBUG('EXCEPTION:Build_PO_req_Query');

4143:
4144: cep_standard.debug('< 4145: EXCEPTION
4146: WHEN OTHERS THEN
4147: CEP_STANDARD.DEBUG('EXCEPTION:Build_PO_req_Query');
4148: raise;
4149: END Build_PO_Req_Query ;
4150:
4151: /* ---------------------------------------------------------------------

Line 4172: cep_standard.debug('>>Build_Sales_Fcst_Query');

4168: select_clause varchar2(1500);
4169: view_name VARCHAR2(50);
4170: main_query varchar2(3500) := null;
4171: BEGIN
4172: cep_standard.debug('>>Build_Sales_Fcst_Query');
4173: select_clause := Get_Select_Clause;
4174: cep_standard.debug('Built Select Clause');
4175:
4176: from_clause := Get_From_Clause ('ce_as_fc_sales_fcst_v');

Line 4174: cep_standard.debug('Built Select Clause');

4170: main_query varchar2(3500) := null;
4171: BEGIN
4172: cep_standard.debug('>>Build_Sales_Fcst_Query');
4173: select_clause := Get_Select_Clause;
4174: cep_standard.debug('Built Select Clause');
4175:
4176: from_clause := Get_From_Clause ('ce_as_fc_sales_fcst_v');
4177: cep_standard.debug('Built From Clause');
4178:

Line 4177: cep_standard.debug('Built From Clause');

4173: select_clause := Get_Select_Clause;
4174: cep_standard.debug('Built Select Clause');
4175:
4176: from_clause := Get_From_Clause ('ce_as_fc_sales_fcst_v');
4177: cep_standard.debug('Built From Clause');
4178:
4179: where_clause := Get_Where_Clause || '
4180: AND src.trx_date BETWEEN cab.start_date - '
4181: ||to_char(CE_CASH_FCST.G_lead_time)||

Line 4187: cep_standard.debug('Built Where Clause');

4183: ||to_char(CE_CASH_FCST.G_lead_time)||
4184: ' AND NVL(src.win_probability, 0) >= ' ||to_char(CE_CASH_FCST.G_win_probability)||
4185: Add_Where('CHANNEL_CODE') || Add_Where('SALES_STAGE_ID') || Add_Where('SALES_FORECAST_STATUS');
4186:
4187: cep_standard.debug('Built Where Clause');
4188:
4189:
4190: main_query := select_clause || from_clause || where_clause;
4191: Execute_Main_Query (main_query);

Line 4193: cep_standard.debug('<

4189:
4190: main_query := select_clause || from_clause || where_clause;
4191: Execute_Main_Query (main_query);
4192:
4193: cep_standard.debug('< 4194: EXCEPTION
4195: WHEN OTHERS THEN
4196: cep_standard.debug('EXCEPTION:OTHERS-Build_Sales_Fcst_Query');
4197: raise;

Line 4196: cep_standard.debug('EXCEPTION:OTHERS-Build_Sales_Fcst_Query');

4192:
4193: cep_standard.debug('< 4194: EXCEPTION
4195: WHEN OTHERS THEN
4196: cep_standard.debug('EXCEPTION:OTHERS-Build_Sales_Fcst_Query');
4197: raise;
4198: END Build_Sales_Fcst_Query ;
4199:
4200:

Line 4229: cep_standard.debug('>>CE_CSH_FCAST_POP.Build_Sales_Order_Query');

4225: main_query_1 varchar2(3500) := null;
4226: main_query_2 varchar2(3500) := null;
4227: main_query_3 varchar2(3500) := null;
4228: BEGIN
4229: cep_standard.debug('>>CE_CSH_FCAST_POP.Build_Sales_Order_Query');
4230:
4231: --select_clause := Get_Select_Clause;
4232: --cep_standard.debug('Built Select Clause');
4233:

Line 4232: --cep_standard.debug('Built Select Clause');

4228: BEGIN
4229: cep_standard.debug('>>CE_CSH_FCAST_POP.Build_Sales_Order_Query');
4230:
4231: --select_clause := Get_Select_Clause;
4232: --cep_standard.debug('Built Select Clause');
4233:
4234: from_clause_1 := Get_From_Clause('ce_so_fc_orders_v');
4235: from_clause_2 := Get_From_Clause('ce_so_fc_orders_terms_v');
4236: from_clause_3 := Get_From_Clause('ce_so_fc_orders_no_terms_v');

Line 4237: cep_standard.debug('Built From Clause');

4233:
4234: from_clause_1 := Get_From_Clause('ce_so_fc_orders_v');
4235: from_clause_2 := Get_From_Clause('ce_so_fc_orders_terms_v');
4236: from_clause_3 := Get_From_Clause('ce_so_fc_orders_no_terms_v');
4237: cep_standard.debug('Built From Clause');
4238:
4239: where_clause := Get_Where_Clause ||
4240: Add_Where('CUSTOMER_PROFILE_CLASS_ID') || Add_Where('PROJECT_ID')
4241: || Add_Where('ORDER_TYPE_ID');

Line 4616: cep_standard.debug('Built Select Clause');

4612: ' and cab.end_date - '
4613: ||to_char(CE_CASH_FCST.G_lead_time);
4614: END IF;
4615:
4616: cep_standard.debug('Built Select Clause');
4617: cep_standard.debug('Built Where Clause');
4618:
4619:
4620: main_query_1 := select_clause_1 || from_clause_1 || where_clause_1;

Line 4617: cep_standard.debug('Built Where Clause');

4613: ||to_char(CE_CASH_FCST.G_lead_time);
4614: END IF;
4615:
4616: cep_standard.debug('Built Select Clause');
4617: cep_standard.debug('Built Where Clause');
4618:
4619:
4620: main_query_1 := select_clause_1 || from_clause_1 || where_clause_1;
4621: main_query_2 := select_clause_2 || from_clause_2 || where_clause_2;

Line 4631: cep_standard.debug('<

4627: ELSE
4628: Execute_Main_Query (main_query_1);
4629: END IF;
4630:
4631: cep_standard.debug('< 4632: EXCEPTION
4633: WHEN OTHERS THEN
4634: CEP_STANDARD.DEBUG('EXCEPTION:Build_Sales_Order_Query');
4635: raise;

Line 4634: CEP_STANDARD.DEBUG('EXCEPTION:Build_Sales_Order_Query');

4630:
4631: cep_standard.debug('< 4632: EXCEPTION
4633: WHEN OTHERS THEN
4634: CEP_STANDARD.DEBUG('EXCEPTION:Build_Sales_Order_Query');
4635: raise;
4636: END Build_Sales_Order_Query ;
4637:
4638:

Line 4724: cep_standard.debug('EXCEPTION:OTHERS-Build_PA_Exp_Report_Query');

4720: Execute_Main_Query (main_query);
4721:
4722: EXCEPTION
4723: WHEN OTHERS THEN
4724: cep_standard.debug('EXCEPTION:OTHERS-Build_PA_Exp_Report_Query');
4725: RAISE;
4726: END Build_PA_Exp_Report_Query;
4727:
4728: /* ---------------------------------------------------------------------

Line 4767: cep_standard.debug('EXCEPTION:OTHERS-Build_Exp_Report_Query');

4763: Build_PA_Exp_Report_Query;
4764: END IF;
4765: EXCEPTION
4766: WHEN OTHERS THEN
4767: cep_standard.debug('EXCEPTION:OTHERS-Build_Exp_Report_Query');
4768: RAISE;
4769: END Build_Exp_Report_Query;
4770:
4771:

Line 4808: cep_standard.debug('EXCEPTION:OTHERS-Build_PA_Trx_Query');

4804: Execute_Main_Query (main_query);
4805:
4806: EXCEPTION
4807: WHEN OTHERS THEN
4808: cep_standard.debug('EXCEPTION:OTHERS-Build_PA_Trx_Query');
4809: RAISE;
4810: END Build_PA_Trx_Query;
4811:
4812: /* ---------------------------------------------------------------------

Line 4894: cep_standard.debug('EXCEPTION:OTHERS-Build_PA_Billing_Query');

4890: Execute_Main_Query (main_query);
4891:
4892: EXCEPTION
4893: WHEN OTHERS THEN
4894: cep_standard.debug('EXCEPTION:OTHERS-Build_PA_Billing_Query');
4895: RAISE;
4896: END Build_PA_Billing_Query;
4897:
4898:

Line 5074: cep_standard.debug('EXCEPTION:OTHERS-Build_PA_Budget_Query');

5070: clear_aging_buckets;
5071: zero_fill_cells;
5072: EXCEPTION
5073: WHEN OTHERS THEN
5074: cep_standard.debug('EXCEPTION:OTHERS-Build_PA_Budget_Query');
5075: RAISE;
5076: END Build_PA_Budget_Query;
5077:
5078:

Line 5168: cep_standard.debug('EXCEPTION:OTHERS-Build_Treasury_Query');

5164: Execute_Main_Query (main_query);
5165:
5166: EXCEPTION
5167: WHEN OTHERS THEN
5168: cep_standard.debug('EXCEPTION:OTHERS-Build_Treasury_Query');
5169: RAISE;
5170: END Build_Treasury_Query;
5171:
5172: /* ---------------------------------------------------------------------

Line 5193: cep_standard.debug('>>CE_CSH_FCAST_POP.Build_Remote_Query');

5189: cursor_id INTEGER;
5190: exec_id INTEGER;
5191: error_msg VARCHAR2(2000);
5192: BEGIN
5193: cep_standard.debug('>>CE_CSH_FCAST_POP.Build_Remote_Query');
5194: --
5195: -- Get view and db information from the external source type
5196: --
5197: cep_standard.debug('Get database information for database: '||CE_CASH_FCST.G_external_source_type);

Line 5197: cep_standard.debug('Get database information for database: '||CE_CASH_FCST.G_external_source_type);

5193: cep_standard.debug('>>CE_CSH_FCAST_POP.Build_Remote_Query');
5194: --
5195: -- Get view and db information from the external source type
5196: --
5197: cep_standard.debug('Get database information for database: '||CE_CASH_FCST.G_external_source_type);
5198: BEGIN
5199:
5200: SELECT external_source_view, db_link_name
5201: INTO source_view, db_link

Line 5207: cep_standard.debug('EXCEPTION:Build_Remote_Query - View def not found');

5203: WHERE external_source_type = CE_CASH_FCST.G_external_source_type;
5204:
5205: EXCEPTION
5206: WHEN NO_DATA_FOUND THEN
5207: cep_standard.debug('EXCEPTION:Build_Remote_Query - View def not found');
5208: FND_MESSAGE.set_name('CE','CE_FC_EXT_SOURCE_UNDEFINED');
5209: FND_MESSAGE.set_token('EXT_TYPE', CE_CASH_FCST.G_external_source_type);
5210: error_msg := FND_MESSAGE.get;
5211: CE_FORECAST_ERRORS_PKG.insert_row(CE_CASH_FCST.G_forecast_id, CE_CASH_FCST.G_rp_forecast_header_id,

Line 5221: cep_standard.debug(' source_view = '||source_view||', db_link = '||db_link);

5217:
5218: IF( db_link IS NOT NULL )THEN
5219: db_link := '@'||db_link;
5220: END IF;
5221: cep_standard.debug(' source_view = '||source_view||', db_link = '||db_link);
5222:
5223: main_query := '
5224: declare
5225: counter NUMBER;

Line 5255: cep_standard.debug(''Building aging information'');

5251: -- Store aging bucket information into aging table
5252: --
5253: counter := 1;
5254: open aging_cursor;
5255: cep_standard.debug(''Building aging information'');
5256: LOOP
5257: FETCH aging_cursor INTO aging_table(counter).column_id,
5258: aging_table(counter).start_date,
5259: aging_table(counter).end_date;

Line 5263: cep_standard.debug(''counter for aging have '' || to_char(counter));

5259: aging_table(counter).end_date;
5260: EXIT WHEN aging_cursor%NOTFOUND or aging_cursor%NOTFOUND IS NULL;
5261: counter := counter + 1;
5262: END LOOP;
5263: cep_standard.debug(''counter for aging have '' || to_char(counter));
5264: close aging_cursor;
5265: aging_table.delete(counter);
5266: cep_standard.debug(''Done building aging information''); ';
5267: END IF;

Line 5266: cep_standard.debug(''Done building aging information''); ';

5262: END LOOP;
5263: cep_standard.debug(''counter for aging have '' || to_char(counter));
5264: close aging_cursor;
5265: aging_table.delete(counter);
5266: cep_standard.debug(''Done building aging information''); ';
5267: END IF;
5268:
5269: main_query := main_query ||'
5270:

Line 5276: cep_standard.debug(''Building conversion information'');

5272: -- Store conversion rate information into conversion table
5273: --
5274: counter := 1;
5275: open conversion_cursor;
5276: cep_standard.debug(''Building conversion information'');
5277: LOOP
5278: FETCH conversion_cursor INTO conversion_table(counter).from_currency_code,
5279: conversion_table(counter).conversion_rate;
5280: EXIT WHEN conversion_cursor%NOTFOUND or conversion_cursor%NOTFOUND IS NULL;

Line 5285: cep_standard.debug(''Done building conversion information'');

5281: counter := counter + 1;
5282: END LOOP;
5283: close conversion_cursor;
5284: conversion_table.delete(counter);
5285: cep_standard.debug(''Done building conversion information'');
5286:
5287: --
5288: -- Built query to be executed in the remote/local database
5289: --

Line 5337: cep_standard.debug(''insert column_id = ''||to_char(amount_table(i).forecast_column_id)||'' with amount ''||

5333: -- the cell table
5334: --
5335: FOR i IN 1 .. amount_table.count LOOP
5336: IF (CE_CASH_FCST.G_trx_type = ''OII'') THEN
5337: cep_standard.debug(''insert column_id = ''||to_char(amount_table(i).forecast_column_id)||'' with amount ''||
5338: to_char(amount_table(i).forecast_amount));
5339: CE_CSH_FCST_POP.Insert_Fcast_Cell(null, amount_table(i).currency_code, null, amount_table(i).trx_date, amount_table(i).bank_account_id, amount_table(i).forecast_amount, amount_table(i).trx_amount, amount_table(i).forecast_column_id);
5340: ELSE
5341: cep_standard.debug(''insert column_id = ''||to_char(amount_table(i).forecast_column_id)||'' with amount ''||

Line 5341: cep_standard.debug(''insert column_id = ''||to_char(amount_table(i).forecast_column_id)||'' with amount ''||

5337: cep_standard.debug(''insert column_id = ''||to_char(amount_table(i).forecast_column_id)||'' with amount ''||
5338: to_char(amount_table(i).forecast_amount));
5339: CE_CSH_FCST_POP.Insert_Fcast_Cell(null, amount_table(i).currency_code, null, amount_table(i).trx_date, amount_table(i).bank_account_id, amount_table(i).forecast_amount, amount_table(i).trx_amount, amount_table(i).forecast_column_id);
5340: ELSE
5341: cep_standard.debug(''insert column_id = ''||to_char(amount_table(i).forecast_column_id)||'' with amount ''||
5342: to_char(-(amount_table(i).forecast_amount)));
5343: CE_CSH_FCST_POP.Insert_Fcast_Cell(null, amount_table(i).currency_code, null, amount_table(i).trx_date, amount_table(i).bank_account_id, -(amount_table(i).forecast_amount), -(amount_table(i).trx_amount), amount_table(i).forecast_column_id);
5344: END IF;
5345: END LOOP;

Line 5348: cep_standard.debug(''Remote error: missing view'');

5344: END IF;
5345: END LOOP;
5346: CE_CSH_FCST_POP.Zero_Fill_Cells;
5347: ELSIF( error_code = -1 )THEN
5348: cep_standard.debug(''Remote error: missing view'');
5349: FND_MESSAGE.set_name(''CE'', ''CE_FC_RMT_MISSING_VIEW_EXPT'');
5350: error_msg := FND_MESSAGE.get;
5351: CE_FORECAST_ERRORS_PKG.insert_row(CE_CASH_FCST.G_forecast_id, CE_CASH_FCST.G_rp_forecast_header_id,
5352: CE_CASH_FCST.G_forecast_row_id, ''CE_FC_RMT_MISSING_VIEW_EXPT'', error_msg);

Line 5355: cep_standard.debug(''Remote error: invalid view'');

5351: CE_FORECAST_ERRORS_PKG.insert_row(CE_CASH_FCST.G_forecast_id, CE_CASH_FCST.G_rp_forecast_header_id,
5352: CE_CASH_FCST.G_forecast_row_id, ''CE_FC_RMT_MISSING_VIEW_EXPT'', error_msg);
5353: return;
5354: ELSIF( error_code = -2 )THEN
5355: cep_standard.debug(''Remote error: invalid view'');
5356: FND_MESSAGE.set_name(''CE'', ''CE_FC_RMT_INVALID_VIEW_EXPT'');
5357: error_msg := FND_MESSAGE.get;
5358: CE_FORECAST_ERRORS_PKG.insert_row(CE_CASH_FCST.G_forecast_id, CE_CASH_FCST.G_rp_forecast_header_id,
5359: CE_CASH_FCST.G_forecast_row_id, ''CE_FC_RMT_INVALID_VIEW_EXPT'', error_msg);

Line 5362: cep_standard.debug(''Remote error: others'');

5358: CE_FORECAST_ERRORS_PKG.insert_row(CE_CASH_FCST.G_forecast_id, CE_CASH_FCST.G_rp_forecast_header_id,
5359: CE_CASH_FCST.G_forecast_row_id, ''CE_FC_RMT_INVALID_VIEW_EXPT'', error_msg);
5360: return;
5361: ELSIF( error_code = -3 )THEN
5362: cep_standard.debug(''Remote error: others'');
5363: FND_MESSAGE.set_name(''CE'', ''CE_FC_RMT_EXCEPTION'');
5364: error_msg := FND_MESSAGE.get;
5365: CE_FORECAST_ERRORS_PKG.insert_row(CE_CASH_FCST.G_forecast_id, CE_CASH_FCST.G_rp_forecast_header_id,
5366: CE_CASH_FCST.G_forecast_row_id, ''CE_FC_RMT_EXCEPTION'', error_msg);

Line 5391: cep_standard.debug('<

5387: END;
5388:
5389: clear_aging_buckets;
5390:
5391: cep_standard.debug('< 5392: EXCEPTION
5393: WHEN OTHERS THEN
5394: clear_aging_buckets;
5395: cep_standard.debug('EXCEPTION:Build_Remote_Query');

Line 5395: cep_standard.debug('EXCEPTION:Build_Remote_Query');

5391: cep_standard.debug('< 5392: EXCEPTION
5393: WHEN OTHERS THEN
5394: clear_aging_buckets;
5395: cep_standard.debug('EXCEPTION:Build_Remote_Query');
5396: FND_MESSAGE.set_name('CE', 'CE_FC_RMT_EXCEPTION');
5397: error_msg := FND_MESSAGE.get;
5398: CE_FORECAST_ERRORS_PKG.insert_row(CE_CASH_FCST.G_forecast_id, CE_CASH_FCST.G_rp_forecast_header_id,
5399: CE_CASH_FCST.G_forecast_row_id, 'CE_FC_RMT_EXCEPTION', error_msg);

Line 5428: cep_standard.debug('>>CE_CSH_FCST_POP.Populate_Cells');

5424: -- Based on the source_trx_type call the different procedures
5425: -- to build the queries dynamically
5426: --
5427:
5428: cep_standard.debug('>>CE_CSH_FCST_POP.Populate_Cells');
5429: IF (CE_CASH_FCST.G_trx_type = 'API') THEN
5430: Build_AP_Invoice_Query;
5431: ELSIF (CE_CASH_FCST.G_trx_type = 'APP' AND CE_CASH_FCST.G_rp_project_id IS NULL) THEN
5432: Build_AP_Pay_Query;

Line 5509: cep_standard.debug('<

5505: ELSIF (CE_CASH_FCST.G_trx_type = 'UDO') THEN
5506: Zero_Fill_Cells;
5507: END IF;
5508:
5509: cep_standard.debug('< 5510: END Populate_Cells;
5511:
5512:
5513: END CE_CSH_FCST_POP;