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 99: cep_standard.debug('>>CE_CASH_FCST.Set_History');

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

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

96: history_date DATE;
97: history_period VARCHAR2(30);
98: BEGIN
99: cep_standard.debug('>>CE_CASH_FCST.Set_History');
100: cep_standard.debug('G_roll_forward_type : ' || CE_CASH_FCST.G_roll_forward_type);
101: cep_standard.debug('G_roll_forward_period : ' || CE_CASH_FCST.G_roll_forward_period);
102: cep_standard.debug('G_start_period : ' || CE_CASH_FCST.G_rp_forecast_start_period);
103:
104: cep_standard.debug('14164001: CEFC_VIEW_CONST.period_set_name=' || CEFC_VIEW_CONST.get_period_set_name);

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

97: history_period VARCHAR2(30);
98: BEGIN
99: cep_standard.debug('>>CE_CASH_FCST.Set_History');
100: cep_standard.debug('G_roll_forward_type : ' || CE_CASH_FCST.G_roll_forward_type);
101: cep_standard.debug('G_roll_forward_period : ' || CE_CASH_FCST.G_roll_forward_period);
102: cep_standard.debug('G_start_period : ' || CE_CASH_FCST.G_rp_forecast_start_period);
103:
104: cep_standard.debug('14164001: CEFC_VIEW_CONST.period_set_name=' || CEFC_VIEW_CONST.get_period_set_name);
105:

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

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

Line 104: cep_standard.debug('14164001: CEFC_VIEW_CONST.period_set_name=' || CEFC_VIEW_CONST.get_period_set_name);

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

Line 140: cep_standard.debug('14164001: CEFC_VIEW_CONST.GET_START_PERIOD_NAME='||history_period);

136: AND gpt.period_type = gp.period_type
137: AND gp.period_name = CE_CASH_FCST.G_rp_forecast_start_period
138: AND gp.period_set_name = CEFC_VIEW_CONST.get_period_set_name;
139:
140: cep_standard.debug('14164001: CEFC_VIEW_CONST.GET_START_PERIOD_NAME='||history_period);
141: CEFC_VIEW_CONST.set_start_period_name(history_period);
142: CEFC_VIEW_CONST.set_min_col(nvl(CE_CASH_FCST.G_min_col,0) + CE_CASH_FCST.G_roll_forward_period);
143: CEFC_VIEW_CONST.set_max_col(nvl(CE_CASH_FCST.G_max_col,0) + CE_CASH_FCST.G_roll_forward_period);
144: EXCEPTION

Line 146: cep_standard.debug('CE_CASH_FCST.Set_History EXCEPTION - NO DATA FOUND FOR HISTORY PERIOD');

142: CEFC_VIEW_CONST.set_min_col(nvl(CE_CASH_FCST.G_min_col,0) + CE_CASH_FCST.G_roll_forward_period);
143: CEFC_VIEW_CONST.set_max_col(nvl(CE_CASH_FCST.G_max_col,0) + CE_CASH_FCST.G_roll_forward_period);
144: EXCEPTION
145: WHEN NO_DATA_FOUND THEN
146: cep_standard.debug('CE_CASH_FCST.Set_History EXCEPTION - NO DATA FOUND FOR HISTORY PERIOD');
147: RAISE;
148: WHEN OTHERS THEN
149: cep_standard.debug('CE_CASH_FCST.Set_History EXCEPTION - OTHERS');
150: raise;

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

145: WHEN NO_DATA_FOUND THEN
146: cep_standard.debug('CE_CASH_FCST.Set_History EXCEPTION - NO DATA FOUND FOR HISTORY PERIOD');
147: RAISE;
148: WHEN OTHERS THEN
149: cep_standard.debug('CE_CASH_FCST.Set_History EXCEPTION - OTHERS');
150: raise;
151: END;
152: END IF;
153:

Line 156: cep_standard.debug('14164001: CEFC_VIEW_CONST.get_min_col='||min_col);

152: END IF;
153:
154: min_col := CEFC_VIEW_CONST.get_min_col;
155: max_col := CEFC_VIEW_CONST.get_max_col;
156: cep_standard.debug('14164001: CEFC_VIEW_CONST.get_min_col='||min_col);
157: cep_standard.debug('14164001: CEFC_VIEW_CONST.get_max_col='||max_col);
158:
159: CE_CASH_FCST.G_invalid_overdue_row := FALSE;
160:

Line 157: cep_standard.debug('14164001: CEFC_VIEW_CONST.get_max_col='||max_col);

153:
154: min_col := CEFC_VIEW_CONST.get_min_col;
155: max_col := CEFC_VIEW_CONST.get_max_col;
156: cep_standard.debug('14164001: CEFC_VIEW_CONST.get_min_col='||min_col);
157: cep_standard.debug('14164001: CEFC_VIEW_CONST.get_max_col='||max_col);
158:
159: CE_CASH_FCST.G_invalid_overdue_row := FALSE;
160:
161: OPEN cCol;

Line 191: cep_standard.debug('CE_CASH_FCST.G_invalid_overdue_row=TRUE');

187: END LOOP;
188:
189: -- 14164001: Added
190: IF(CE_CASH_FCST.G_invalid_overdue_row) THEN
191: cep_standard.debug('CE_CASH_FCST.G_invalid_overdue_row=TRUE');
192: ELSE
193: cep_standard.debug('CE_CASH_FCST.G_invalid_overdue_row=FALSE');
194: END IF;
195:

Line 193: cep_standard.debug('CE_CASH_FCST.G_invalid_overdue_row=FALSE');

189: -- 14164001: Added
190: IF(CE_CASH_FCST.G_invalid_overdue_row) THEN
191: cep_standard.debug('CE_CASH_FCST.G_invalid_overdue_row=TRUE');
192: ELSE
193: cep_standard.debug('CE_CASH_FCST.G_invalid_overdue_row=FALSE');
194: END IF;
195:
196: cep_standard.debug('< 197:

Line 196: cep_standard.debug('<

192: ELSE
193: cep_standard.debug('CE_CASH_FCST.G_invalid_overdue_row=FALSE');
194: END IF;
195:
196: cep_standard.debug('< 197:
198: EXCEPTION
199: WHEN OTHERS THEN
200: IF(cCol%ISOPEN)THEN

Line 236: cep_standard.debug('>>CE_CSH_FCST_POP.populate_aging_buckets');

232: new_end_date DATE;
233: fid NUMBER;
234:
235: BEGIN
236: cep_standard.debug('>>CE_CSH_FCST_POP.populate_aging_buckets');
237: cep_standard.debug('CE_CASH_FCST.G_transaction_calendar_id='
238: ||CE_CASH_FCST.G_transaction_calendar_id);
239: cep_standard.debug('CE_CSH_FCST_POP.G_calendar_start='
240: ||to_char(CE_CSH_FCST_POP.G_calendar_start,'dd-mon-yyyy hh24:mi:ss'));

Line 237: cep_standard.debug('CE_CASH_FCST.G_transaction_calendar_id='

233: fid NUMBER;
234:
235: BEGIN
236: cep_standard.debug('>>CE_CSH_FCST_POP.populate_aging_buckets');
237: cep_standard.debug('CE_CASH_FCST.G_transaction_calendar_id='
238: ||CE_CASH_FCST.G_transaction_calendar_id);
239: cep_standard.debug('CE_CSH_FCST_POP.G_calendar_start='
240: ||to_char(CE_CSH_FCST_POP.G_calendar_start,'dd-mon-yyyy hh24:mi:ss'));
241: cep_standard.debug('CE_CSH_FCST_POP.G_calendar_end='

Line 239: cep_standard.debug('CE_CSH_FCST_POP.G_calendar_start='

235: BEGIN
236: cep_standard.debug('>>CE_CSH_FCST_POP.populate_aging_buckets');
237: cep_standard.debug('CE_CASH_FCST.G_transaction_calendar_id='
238: ||CE_CASH_FCST.G_transaction_calendar_id);
239: cep_standard.debug('CE_CSH_FCST_POP.G_calendar_start='
240: ||to_char(CE_CSH_FCST_POP.G_calendar_start,'dd-mon-yyyy hh24:mi:ss'));
241: cep_standard.debug('CE_CSH_FCST_POP.G_calendar_end='
242: ||to_char(CE_CSH_FCST_POP.G_calendar_end,'dd-mon-yyyy hh24:mi:ss'));
243:

Line 241: cep_standard.debug('CE_CSH_FCST_POP.G_calendar_end='

237: cep_standard.debug('CE_CASH_FCST.G_transaction_calendar_id='
238: ||CE_CASH_FCST.G_transaction_calendar_id);
239: cep_standard.debug('CE_CSH_FCST_POP.G_calendar_start='
240: ||to_char(CE_CSH_FCST_POP.G_calendar_start,'dd-mon-yyyy hh24:mi:ss'));
241: cep_standard.debug('CE_CSH_FCST_POP.G_calendar_end='
242: ||to_char(CE_CSH_FCST_POP.G_calendar_end,'dd-mon-yyyy hh24:mi:ss'));
243:
244: -- debug statements added for bug 14164001
245: cep_standard.debug('-- bug 14164001 ----------------------------------------------------------');

Line 245: cep_standard.debug('-- bug 14164001 ----------------------------------------------------------');

241: cep_standard.debug('CE_CSH_FCST_POP.G_calendar_end='
242: ||to_char(CE_CSH_FCST_POP.G_calendar_end,'dd-mon-yyyy hh24:mi:ss'));
243:
244: -- debug statements added for bug 14164001
245: cep_standard.debug('-- bug 14164001 ----------------------------------------------------------');
246: cep_standard.debug('CEFC_VIEW_CONST.GET_MIN_COL='||CEFC_VIEW_CONST.GET_MIN_COL);
247: cep_standard.debug('CEFC_VIEW_CONST.GET_MAX_COL='||CEFC_VIEW_CONST.GET_MAX_COL);
248: cep_standard.debug('CEFC_VIEW_CONST.GET_HEADER_ID='||CEFC_VIEW_CONST.GET_HEADER_ID);
249: cep_standard.debug('CEFC_VIEW_CONST.GET_START_PERIOD_NAME='||CEFC_VIEW_CONST.GET_START_PERIOD_NAME);

Line 246: cep_standard.debug('CEFC_VIEW_CONST.GET_MIN_COL='||CEFC_VIEW_CONST.GET_MIN_COL);

242: ||to_char(CE_CSH_FCST_POP.G_calendar_end,'dd-mon-yyyy hh24:mi:ss'));
243:
244: -- debug statements added for bug 14164001
245: cep_standard.debug('-- bug 14164001 ----------------------------------------------------------');
246: cep_standard.debug('CEFC_VIEW_CONST.GET_MIN_COL='||CEFC_VIEW_CONST.GET_MIN_COL);
247: cep_standard.debug('CEFC_VIEW_CONST.GET_MAX_COL='||CEFC_VIEW_CONST.GET_MAX_COL);
248: cep_standard.debug('CEFC_VIEW_CONST.GET_HEADER_ID='||CEFC_VIEW_CONST.GET_HEADER_ID);
249: cep_standard.debug('CEFC_VIEW_CONST.GET_START_PERIOD_NAME='||CEFC_VIEW_CONST.GET_START_PERIOD_NAME);
250: cep_standard.debug('CEFC_VIEW_CONST.GET_PERIOD_SET_NAME='||CEFC_VIEW_CONST.GET_PERIOD_SET_NAME);

Line 247: cep_standard.debug('CEFC_VIEW_CONST.GET_MAX_COL='||CEFC_VIEW_CONST.GET_MAX_COL);

243:
244: -- debug statements added for bug 14164001
245: cep_standard.debug('-- bug 14164001 ----------------------------------------------------------');
246: cep_standard.debug('CEFC_VIEW_CONST.GET_MIN_COL='||CEFC_VIEW_CONST.GET_MIN_COL);
247: cep_standard.debug('CEFC_VIEW_CONST.GET_MAX_COL='||CEFC_VIEW_CONST.GET_MAX_COL);
248: cep_standard.debug('CEFC_VIEW_CONST.GET_HEADER_ID='||CEFC_VIEW_CONST.GET_HEADER_ID);
249: cep_standard.debug('CEFC_VIEW_CONST.GET_START_PERIOD_NAME='||CEFC_VIEW_CONST.GET_START_PERIOD_NAME);
250: cep_standard.debug('CEFC_VIEW_CONST.GET_PERIOD_SET_NAME='||CEFC_VIEW_CONST.GET_PERIOD_SET_NAME);
251: cep_standard.debug('--------------------------------------------------------------------------');

Line 248: cep_standard.debug('CEFC_VIEW_CONST.GET_HEADER_ID='||CEFC_VIEW_CONST.GET_HEADER_ID);

244: -- debug statements added for bug 14164001
245: cep_standard.debug('-- bug 14164001 ----------------------------------------------------------');
246: cep_standard.debug('CEFC_VIEW_CONST.GET_MIN_COL='||CEFC_VIEW_CONST.GET_MIN_COL);
247: cep_standard.debug('CEFC_VIEW_CONST.GET_MAX_COL='||CEFC_VIEW_CONST.GET_MAX_COL);
248: cep_standard.debug('CEFC_VIEW_CONST.GET_HEADER_ID='||CEFC_VIEW_CONST.GET_HEADER_ID);
249: cep_standard.debug('CEFC_VIEW_CONST.GET_START_PERIOD_NAME='||CEFC_VIEW_CONST.GET_START_PERIOD_NAME);
250: cep_standard.debug('CEFC_VIEW_CONST.GET_PERIOD_SET_NAME='||CEFC_VIEW_CONST.GET_PERIOD_SET_NAME);
251: cep_standard.debug('--------------------------------------------------------------------------');
252: OPEN C1;

Line 249: cep_standard.debug('CEFC_VIEW_CONST.GET_START_PERIOD_NAME='||CEFC_VIEW_CONST.GET_START_PERIOD_NAME);

245: cep_standard.debug('-- bug 14164001 ----------------------------------------------------------');
246: cep_standard.debug('CEFC_VIEW_CONST.GET_MIN_COL='||CEFC_VIEW_CONST.GET_MIN_COL);
247: cep_standard.debug('CEFC_VIEW_CONST.GET_MAX_COL='||CEFC_VIEW_CONST.GET_MAX_COL);
248: cep_standard.debug('CEFC_VIEW_CONST.GET_HEADER_ID='||CEFC_VIEW_CONST.GET_HEADER_ID);
249: cep_standard.debug('CEFC_VIEW_CONST.GET_START_PERIOD_NAME='||CEFC_VIEW_CONST.GET_START_PERIOD_NAME);
250: cep_standard.debug('CEFC_VIEW_CONST.GET_PERIOD_SET_NAME='||CEFC_VIEW_CONST.GET_PERIOD_SET_NAME);
251: cep_standard.debug('--------------------------------------------------------------------------');
252: OPEN C1;
253: FETCH C1 INTO fid, start_date, end_date;

Line 250: cep_standard.debug('CEFC_VIEW_CONST.GET_PERIOD_SET_NAME='||CEFC_VIEW_CONST.GET_PERIOD_SET_NAME);

246: cep_standard.debug('CEFC_VIEW_CONST.GET_MIN_COL='||CEFC_VIEW_CONST.GET_MIN_COL);
247: cep_standard.debug('CEFC_VIEW_CONST.GET_MAX_COL='||CEFC_VIEW_CONST.GET_MAX_COL);
248: cep_standard.debug('CEFC_VIEW_CONST.GET_HEADER_ID='||CEFC_VIEW_CONST.GET_HEADER_ID);
249: cep_standard.debug('CEFC_VIEW_CONST.GET_START_PERIOD_NAME='||CEFC_VIEW_CONST.GET_START_PERIOD_NAME);
250: cep_standard.debug('CEFC_VIEW_CONST.GET_PERIOD_SET_NAME='||CEFC_VIEW_CONST.GET_PERIOD_SET_NAME);
251: cep_standard.debug('--------------------------------------------------------------------------');
252: OPEN C1;
253: FETCH C1 INTO fid, start_date, end_date;
254: LOOP

Line 251: cep_standard.debug('--------------------------------------------------------------------------');

247: cep_standard.debug('CEFC_VIEW_CONST.GET_MAX_COL='||CEFC_VIEW_CONST.GET_MAX_COL);
248: cep_standard.debug('CEFC_VIEW_CONST.GET_HEADER_ID='||CEFC_VIEW_CONST.GET_HEADER_ID);
249: cep_standard.debug('CEFC_VIEW_CONST.GET_START_PERIOD_NAME='||CEFC_VIEW_CONST.GET_START_PERIOD_NAME);
250: cep_standard.debug('CEFC_VIEW_CONST.GET_PERIOD_SET_NAME='||CEFC_VIEW_CONST.GET_PERIOD_SET_NAME);
251: cep_standard.debug('--------------------------------------------------------------------------');
252: OPEN C1;
253: FETCH C1 INTO fid, start_date, end_date;
254: LOOP
255: EXIT WHEN C1%NOTFOUND OR C1%NOTFOUND IS NULL;

Line 257: cep_standard.debug('forecast_id='||fid||

253: FETCH C1 INTO fid, start_date, end_date;
254: LOOP
255: EXIT WHEN C1%NOTFOUND OR C1%NOTFOUND IS NULL;
256:
257: cep_standard.debug('forecast_id='||fid||
258: ',start_date='||to_char(start_date,'dd-mon-yyyy hh24:mi:ss')||
259: ',end_date='||to_char(end_date,'dd-mon-yyyy hh24:mi:ss'));
260: new_start_date := NULL;
261: new_end_date := NULL;

Line 321: cep_standard.debug('insert into CE_FORECAST_EXT_TEMP ...');

317: -- Bug # 1927006
318: new_start_date := trunc(new_start_date);
319: new_end_date := to_date(to_char(new_end_date, 'DD-MM-RR') || ' 23:59:59', 'DD-MM-RR HH24:MI:SS');
320:
321: cep_standard.debug('insert into CE_FORECAST_EXT_TEMP ...');
322: cep_standard.debug('forecast_request_id='||CE_CASH_FCST.G_forecast_id
323: ||',start_date='||new_start_date
324: ||',end_date='||new_end_date
325: ||',forecast_column_id='||fid

Line 322: cep_standard.debug('forecast_request_id='||CE_CASH_FCST.G_forecast_id

318: new_start_date := trunc(new_start_date);
319: new_end_date := to_date(to_char(new_end_date, 'DD-MM-RR') || ' 23:59:59', 'DD-MM-RR HH24:MI:SS');
320:
321: cep_standard.debug('insert into CE_FORECAST_EXT_TEMP ...');
322: cep_standard.debug('forecast_request_id='||CE_CASH_FCST.G_forecast_id
323: ||',start_date='||new_start_date
324: ||',end_date='||new_end_date
325: ||',forecast_column_id='||fid
326: ||',conversion_rate='||CE_CASH_FCST.G_forecast_row_id);

Line 338: cep_standard.debug('<

334: FETCH C1 INTO fid, start_date, end_date;
335: END LOOP;
336: CLOSE C1;
337:
338: cep_standard.debug('< 339: EXCEPTION
340: WHEN OTHERS THEN
341: IF C1%ISOPEN THEN
342: CLOSE C1;

Line 344: cep_standard.debug('EXCEPTION:populate_aging_buckets');

340: WHEN OTHERS THEN
341: IF C1%ISOPEN THEN
342: CLOSE C1;
343: END IF;
344: cep_standard.debug('EXCEPTION:populate_aging_buckets');
345: raise;
346: END populate_aging_buckets;
347:
348: PROCEDURE clear_aging_buckets IS

Line 355: cep_standard.debug('<

351: where context_value = 'A' and
352: forecast_request_id = CE_CASH_FCST.G_forecast_id and
353: conversion_rate = CE_CASH_FCST.G_forecast_row_id;
354:
355: cep_standard.debug('< 356: EXCEPTION
357: WHEN OTHERS THEN
358: cep_standard.debug('EXCEPTION:clear_aging_buckets');
359: raise;

Line 358: cep_standard.debug('EXCEPTION:clear_aging_buckets');

354:
355: cep_standard.debug('< 356: EXCEPTION
357: WHEN OTHERS THEN
358: cep_standard.debug('EXCEPTION:clear_aging_buckets');
359: raise;
360: END clear_aging_buckets;
361:
362: /* ---------------------------------------------------------------------

Line 519: cep_standard.debug(from_clause);

515: from_clause := from_clause || ' ,
516: ce_currency_rates_temp curr2 ';
517: END IF;
518:
519: cep_standard.debug(from_clause);
520: return from_clause;
521: END Get_From_Clause;
522:
523: /* ---------------------------------------------------------------------

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

696: AND src.order_type_id = '||to_char(CE_CASH_FCST.G_order_type_id));
697: END IF;
698:
699: ELSE
700: cep_standard.debug('ERROR - Add_Where got invalid criteria!');
701: END IF;
702:
703: return (NULL);
704: END Add_Where;

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

720: FUNCTION Get_Where_Clause RETURN VARCHAR2 IS
721: where_clause VARCHAR2(1500);
722:
723: BEGIN
724: cep_standard.debug('>>CE_CASH_FCST.Get_Where_Clause');
725:
726: where_clause := '
727: WHERE cab.context_value = ''A''
728: AND cab.forecast_request_id = '||to_char(CE_CASH_FCST.G_forecast_id) ||'

Line 836: cep_standard.debug('<

832: END IF;
833: END IF;
834: END IF;
835:
836: cep_standard.debug('< 837: return where_clause;
838: END Get_Where_Clause;
839:
840: /* ---------------------------------------------------------------------

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

901: X_LAST_UPDATE_DATE =>sysdate,
902: X_LAST_UPDATE_LOGIN =>nvl(fnd_global.user_id,-1));
903: EXCEPTION
904: WHEN OTHERS THEN
905: cep_standard.debug('EXCEPTION:OTHERS- Insert_Fcast_Cell');
906: RAISE;
907: END Insert_Fcast_Cell;
908:
909: /* ---------------------------------------------------------------------

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

927: FROM ce_forecast_columns cfc
928: WHERE cfc.forecast_header_id = CE_CASH_FCST.G_rp_forecast_header_id;
929:
930: BEGIN
931: cep_standard.debug('>>CE_CASH_FCST_POP.Zero_Fill_Cells');
932: OPEN zero_fill_c;
933: LOOP
934: FETCH zero_fill_c into column_id;
935: EXIT WHEN zero_fill_C%NOTFOUND OR zero_fill_C%NOTFOUND IS NULL;

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

932: OPEN zero_fill_c;
933: LOOP
934: FETCH zero_fill_c into column_id;
935: EXIT WHEN zero_fill_C%NOTFOUND OR zero_fill_C%NOTFOUND IS NULL;
936: cep_standard.debug('column_id with zero amount: '|| to_char(column_id));
937: Insert_Fcast_Cell(null, null, null, null, null, 0, to_number(null), column_id);
938: END LOOP;
939:
940: CLOSE zero_fill_c;

Line 942: cep_standard.debug('<

938: END LOOP;
939:
940: CLOSE zero_fill_c;
941:
942: cep_standard.debug('< 943: EXCEPTION
944: WHEN OTHERS THEN
945: IF zero_fill_C%ISOPEN THEN close zero_fill_C; END IF;
946: cep_standard.debug('EXCEPTION-OTHERS: Zero_fill_Cells');

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

942: cep_standard.debug('< 943: EXCEPTION
944: WHEN OTHERS THEN
945: IF zero_fill_C%ISOPEN THEN close zero_fill_C; END IF;
946: cep_standard.debug('EXCEPTION-OTHERS: Zero_fill_Cells');
947: RAISE;
948: END Zero_Fill_Cells;
949:
950:

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

982: forecast_rowid VARCHAR2(30);
983: counter number;
984: final_query VARCHAR2(5000);
985: BEGIN
986: cep_standard.debug('>>CE_CSH_FCST_POP.Execute_Main_Query');
987:
988: populate_aging_buckets;
989:
990: cursor_id := DBMS_SQL.open_cursor;

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

987:
988: populate_aging_buckets;
989:
990: cursor_id := DBMS_SQL.open_cursor;
991: cep_standard.debug('Cursor opened sucessfully with cursor_id: '||
992: to_char(cursor_id));
993:
994: cep_standard.debug('Parsing ....');
995: final_query := 'INSERT INTO CE_FORECAST_TRX_CELLS(

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

990: cursor_id := DBMS_SQL.open_cursor;
991: cep_standard.debug('Cursor opened sucessfully with cursor_id: '||
992: to_char(cursor_id));
993:
994: cep_standard.debug('Parsing ....');
995: final_query := 'INSERT INTO CE_FORECAST_TRX_CELLS(
996: FORECAST_CELL_ID,
997: FORECAST_ID,
998: FORECAST_HEADER_ID,

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

1016: DBMS_SQL.Parse(cursor_id,
1017: final_query,
1018: DBMS_SQL.v7);
1019:
1020: cep_standard.debug('Parsed sucessfully');
1021:
1022: exec_id := DBMS_SQL.execute(cursor_id);
1023:
1024: DBMS_SQL.CLOSE_CURSOR(cursor_id);

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

1051: clear_aging_buckets;
1052: zero_fill_cells;
1053: EXCEPTION
1054: WHEN OTHERS THEN
1055: cep_standard.debug('EXCEPTION - OTHERS: Execute_Main_Query');
1056: IF DBMS_SQL.IS_OPEN(cursor_id) THEN
1057: DBMS_SQL.CLOSE_CURSOR(cursor_id);
1058: cep_standard.debug('Cursor Closed');
1059: END IF;

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

1054: WHEN OTHERS THEN
1055: cep_standard.debug('EXCEPTION - OTHERS: Execute_Main_Query');
1056: IF DBMS_SQL.IS_OPEN(cursor_id) THEN
1057: DBMS_SQL.CLOSE_CURSOR(cursor_id);
1058: cep_standard.debug('Cursor Closed');
1059: END IF;
1060: RAISE;
1061: END Execute_Main_Query;
1062:

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

1081: l_end_of_day NUMBER;
1082: l_ptd_range NUMBER;
1083: l_period_name GL_PERIODS.period_name%TYPE;
1084: BEGIN
1085: cep_standard.debug('>>CE_CSH_FCST_POP.Use_Avg_Bal_Pos');
1086: --
1087: -- Get number of days from start of the period
1088: --
1089: BEGIN

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

1097:
1098: EXCEPTION
1099: WHEN NO_DATA_FOUND THEN
1100: return 0;
1101: cep_standard.debug('Use_Avg_Bal_Pos.no data found');
1102: WHEN TOO_MANY_ROWS THEN
1103: return 0;
1104: cep_standard.debug('Use_Avg_Bal_Pos.TOO_MANY_ROWS');
1105: WHEN OTHERS THEN

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

1100: return 0;
1101: cep_standard.debug('Use_Avg_Bal_Pos.no data found');
1102: WHEN TOO_MANY_ROWS THEN
1103: return 0;
1104: cep_standard.debug('Use_Avg_Bal_Pos.TOO_MANY_ROWS');
1105: WHEN OTHERS THEN
1106: return 0;
1107: cep_standard.debug('Use_Avg_Bal_Pos.OTHERS');
1108: END;

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

1103: return 0;
1104: cep_standard.debug('Use_Avg_Bal_Pos.TOO_MANY_ROWS');
1105: WHEN OTHERS THEN
1106: return 0;
1107: cep_standard.debug('Use_Avg_Bal_Pos.OTHERS');
1108: END;
1109: --
1110: -- Get the end of day balance
1111: --

Line 1169: cep_standard.debug('<

1165: AND glcc.summary_flag = 'N'
1166: AND glcc.code_combination_id = p_ccid
1167: AND org.enable_average_balances_flag = 'Y';
1168:
1169: cep_standard.debug('< 1170: RETURN( nvl(l_end_of_day,0) );
1171: EXCEPTION
1172: WHEN NO_DATA_FOUND THEN
1173: RETURN(0);

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

1171: EXCEPTION
1172: WHEN NO_DATA_FOUND THEN
1173: RETURN(0);
1174: WHEN OTHERS THEN
1175: CEP_STANDARD.DEBUG('EXCEPTION: OTHERS - Use_avg_bal_pos');
1176: RAISE;
1177: END;
1178: END Use_Avg_Bal_Pos;
1179:

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

1200: begin_period VARCHAR2(30);
1201: avg_bal VARCHAR2(1);
1202: avg_bal_init_cash_pos NUMBER;
1203: BEGIN
1204: cep_standard.debug('>>Calc_Initial_Cash_Position ');
1205: IF (CE_CASH_FCST.G_aging_type = 'D') THEN
1206: --
1207: -- Check to see if average daily balances are used;
1208: --

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

1208: --
1209: avg_bal_init_cash_pos := Use_Avg_Bal_Pos(p_ccid);
1210:
1211: -- Get Initial Balance
1212: cep_standard.debug('Get initial balance');
1213: cep_standard.debug('CCID: ' || p_ccid);
1214: cep_standard.debug('Avg bal init cash pos: ' || avg_bal_init_cash_pos);
1215: BEGIN
1216: SELECT src.period_name,

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

1209: avg_bal_init_cash_pos := Use_Avg_Bal_Pos(p_ccid);
1210:
1211: -- Get Initial Balance
1212: cep_standard.debug('Get initial balance');
1213: cep_standard.debug('CCID: ' || p_ccid);
1214: cep_standard.debug('Avg bal init cash pos: ' || avg_bal_init_cash_pos);
1215: BEGIN
1216: SELECT src.period_name,
1217: nvl(SUM((nvl(src.begin_balance_dr,0)-nvl(src.begin_balance_cr,0))*

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

1210:
1211: -- Get Initial Balance
1212: cep_standard.debug('Get initial balance');
1213: cep_standard.debug('CCID: ' || p_ccid);
1214: cep_standard.debug('Avg bal init cash pos: ' || avg_bal_init_cash_pos);
1215: BEGIN
1216: SELECT src.period_name,
1217: nvl(SUM((nvl(src.begin_balance_dr,0)-nvl(src.begin_balance_cr,0))*
1218: DECODE(CE_CASH_FCST.G_rp_exchange_type, 'User', CE_CASH_FCST.G_rp_exchange_rate, curr.exchange_rate)),0)

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

1242: AND gp.period_set_name = CE_CASH_FCST.G_rp_calendar_name
1243: AND nvl(org.enable_average_balances_flag,'N') = 'N'
1244: AND gp.adjustment_period_flag ='N' -- Bug 14272804 Added Where Clause
1245: GROUP BY src.period_name;
1246: cep_standard.debug('INITIAL BALANCE FOR: '|| begin_period || ' is : '|| begin_Cash_bal);
1247: EXCEPTION
1248: WHEN NO_DATA_FOUND THEN
1249: cep_standard.debug('EXCEPTION: Calc Initial Cash pos:no data found');
1250: cep_standard.debug('Intial Cash position is 0');

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

1245: GROUP BY src.period_name;
1246: cep_standard.debug('INITIAL BALANCE FOR: '|| begin_period || ' is : '|| begin_Cash_bal);
1247: EXCEPTION
1248: WHEN NO_DATA_FOUND THEN
1249: cep_standard.debug('EXCEPTION: Calc Initial Cash pos:no data found');
1250: cep_standard.debug('Intial Cash position is 0');
1251: begin_cash_bal :=0;
1252: WHEN OTHERS THEN
1253: cep_standard.debug('EXCEPTION: Calc Initial Cash pos');

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

1246: cep_standard.debug('INITIAL BALANCE FOR: '|| begin_period || ' is : '|| begin_Cash_bal);
1247: EXCEPTION
1248: WHEN NO_DATA_FOUND THEN
1249: cep_standard.debug('EXCEPTION: Calc Initial Cash pos:no data found');
1250: cep_standard.debug('Intial Cash position is 0');
1251: begin_cash_bal :=0;
1252: WHEN OTHERS THEN
1253: cep_standard.debug('EXCEPTION: Calc Initial Cash pos');
1254: cep_standard.debug('Exception: begin balance failed');

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

1249: cep_standard.debug('EXCEPTION: Calc Initial Cash pos:no data found');
1250: cep_standard.debug('Intial Cash position is 0');
1251: begin_cash_bal :=0;
1252: WHEN OTHERS THEN
1253: cep_standard.debug('EXCEPTION: Calc Initial Cash pos');
1254: cep_standard.debug('Exception: begin balance failed');
1255: RAISE;
1256: END;
1257:

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

1250: cep_standard.debug('Intial Cash position is 0');
1251: begin_cash_bal :=0;
1252: WHEN OTHERS THEN
1253: cep_standard.debug('EXCEPTION: Calc Initial Cash pos');
1254: cep_standard.debug('Exception: begin balance failed');
1255: RAISE;
1256: END;
1257:
1258: cep_standard.debug('INITIAL PERIOD BALANCE FOR: '|| begin_period || ' is : '|| begin_Cash_bal);

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

1254: cep_standard.debug('Exception: begin balance failed');
1255: RAISE;
1256: END;
1257:
1258: cep_standard.debug('INITIAL PERIOD BALANCE FOR: '|| begin_period || ' is : '|| begin_Cash_bal);
1259: BEGIN
1260: SELECT nvl(SUM((nvl(jl.entered_dr,0) - nvl(jl.entered_cr,0))*
1261: DECODE(CE_CASH_FCST.G_rp_exchange_type, 'User', CE_CASH_FCST.G_rp_exchange_rate, curr.exchange_rate)),0)
1262: INTO bal_to_date

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

1279: AND jl.code_combination_id = glcc.code_combination_id
1280: AND glcc.code_combination_id = p_ccid
1281: AND nvl(org.enable_average_balances_flag,'N') = 'N';
1282:
1283: cep_standard.debug('balance to date is: '|| bal_to_date);
1284: cep_standard.debug('1 return');
1285:
1286: RETURN(avg_bal_init_cash_pos + begin_cash_bal + bal_to_date);
1287: EXCEPTION

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

1280: AND glcc.code_combination_id = p_ccid
1281: AND nvl(org.enable_average_balances_flag,'N') = 'N';
1282:
1283: cep_standard.debug('balance to date is: '|| bal_to_date);
1284: cep_standard.debug('1 return');
1285:
1286: RETURN(avg_bal_init_cash_pos + begin_cash_bal + bal_to_date);
1287: EXCEPTION
1288: WHEN NO_DATA_FOUND THEN

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

1286: RETURN(avg_bal_init_cash_pos + begin_cash_bal + bal_to_date);
1287: EXCEPTION
1288: WHEN NO_DATA_FOUND THEN
1289: bal_to_date :=0;
1290: cep_standard.debug('exception:no data found balance_to_date is 0');
1291: cep_standard.debug('2 return');RETURN(begin_cash_bal + bal_to_date);
1292: WHEN OTHERS THEN
1293: cep_standard.debug('EXCEPTION: Calc INitial Cash pos');
1294: cep_standard.debug('Exception: balance to date failed');

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

1287: EXCEPTION
1288: WHEN NO_DATA_FOUND THEN
1289: bal_to_date :=0;
1290: cep_standard.debug('exception:no data found balance_to_date is 0');
1291: cep_standard.debug('2 return');RETURN(begin_cash_bal + bal_to_date);
1292: WHEN OTHERS THEN
1293: cep_standard.debug('EXCEPTION: Calc INitial Cash pos');
1294: cep_standard.debug('Exception: balance to date failed');
1295: RAISE;

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

1289: bal_to_date :=0;
1290: cep_standard.debug('exception:no data found balance_to_date is 0');
1291: cep_standard.debug('2 return');RETURN(begin_cash_bal + bal_to_date);
1292: WHEN OTHERS THEN
1293: cep_standard.debug('EXCEPTION: Calc INitial Cash pos');
1294: cep_standard.debug('Exception: balance to date failed');
1295: RAISE;
1296: END;
1297: ELSE

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

1290: cep_standard.debug('exception:no data found balance_to_date is 0');
1291: cep_standard.debug('2 return');RETURN(begin_cash_bal + bal_to_date);
1292: WHEN OTHERS THEN
1293: cep_standard.debug('EXCEPTION: Calc INitial Cash pos');
1294: cep_standard.debug('Exception: balance to date failed');
1295: RAISE;
1296: END;
1297: ELSE
1298: SELECT SUM((nvl(src.begin_balance_dr,0)-nvl(src.begin_balance_cr,0))*

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

1316: AND glcc.template_id IS NULL
1317: AND glcc.code_combination_id = src.code_combination_id
1318: AND glcc.code_combination_id = p_ccid;
1319:
1320: cep_standard.debug('3 return');
1321:
1322: RETURN(initial_cash_pos);
1323:
1324: END IF;

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

1322: RETURN(initial_cash_pos);
1323:
1324: END IF;
1325:
1326: cep_standard.debug('4 return');
1327: RETURN initial_cash_pos;
1328: EXCEPTION
1329: WHEN NO_DATA_FOUND THEN
1330: cep_standard.debug('5 return');

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

1326: cep_standard.debug('4 return');
1327: RETURN initial_cash_pos;
1328: EXCEPTION
1329: WHEN NO_DATA_FOUND THEN
1330: cep_standard.debug('5 return');
1331: return(0);
1332: WHEN OTHERS THEN
1333: cep_standard.debug('EXCEPTION:OTHERS - Calc_Initial_Cash_Position');
1334: RAISE;

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

1329: WHEN NO_DATA_FOUND THEN
1330: cep_standard.debug('5 return');
1331: return(0);
1332: WHEN OTHERS THEN
1333: cep_standard.debug('EXCEPTION:OTHERS - Calc_Initial_Cash_Position');
1334: RAISE;
1335: END Calc_Initial_Cash_Position;
1336:
1337:

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

1406: l_prior_day_cflow NUMBER;
1407: error_msg FND_NEW_MESSAGES.message_text%TYPE;
1408:
1409: BEGIN
1410: cep_standard.debug('>>CE_CSH_FCST_POP.Populate_Opening_Bal');
1411:
1412: IF (CE_CASH_FCST.G_rp_view_by in ('BANK','ALL')) THEN
1413: IF (CE_CASH_FCST.G_aging_type = 'D') THEN
1414: l_fc_start_date := trunc(CE_CASH_FCST.G_rp_forecast_start_date);

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

1484: IF (CE_CASH_FCST.G_rp_exchange_type = 'User') THEN
1485: l_opening_balance := l_opening_balance * CE_CASH_FCST.G_rp_exchange_rate;
1486: ELSE
1487: BEGIN
1488: cep_standard.debug('>>Bank Account currency conversion');
1489:
1490: select exchange_rate
1491: into l_exchange_rate
1492: from ce_currency_rates_temp

Line 1499: cep_standard.debug('<

1495: and forecast_request_id = CE_CASH_FCST.G_forecast_id;
1496:
1497: l_opening_balance := l_opening_balance * l_exchange_rate;
1498:
1499: cep_standard.debug('< 1500: EXCEPTION
1501: WHEN NO_DATA_FOUND THEN
1502: UPDATE ce_forecasts
1503: SET error_status = 'X'

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

1513: CE_CASH_FCST.G_rp_forecast_header_id,
1514: CE_CASH_FCST.G_forecast_row_id,
1515: 'CE_FC_NO_BANK_EXCH_RATE',
1516: error_msg);
1517: cep_standard.debug('EXCEPTION: Populate_Opening_Bal - No exchange rate found');
1518:
1519: l_opening_balance := 0;
1520: WHEN OTHERS Then
1521: cep_standard.debug('EXCEPTION: Populate_Opening_Bal - Bank Account Currency exchange rate conversion');

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

1517: cep_standard.debug('EXCEPTION: Populate_Opening_Bal - No exchange rate found');
1518:
1519: l_opening_balance := 0;
1520: WHEN OTHERS Then
1521: cep_standard.debug('EXCEPTION: Populate_Opening_Bal - Bank Account Currency exchange rate conversion');
1522: raise;
1523: END;
1524: END IF;
1525: END IF;

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

1719: IF (CE_CASH_FCST.G_rp_exchange_type = 'User') THEN
1720: l_opening_balance := l_opening_balance * CE_CASH_FCST.G_rp_exchange_rate;
1721: ELSE
1722: BEGIN
1723: cep_standard.debug('>>Subsidiary Bank Account currency conversion');
1724:
1725: select exchange_rate
1726: into l_exchange_rate
1727: from ce_currency_rates_temp

Line 1734: cep_standard.debug('<

1730: and forecast_request_id = CE_CASH_FCST.G_forecast_id;
1731:
1732: l_opening_balance := l_opening_balance * l_exchange_rate;
1733:
1734: cep_standard.debug('< 1735: EXCEPTION
1736: WHEN NO_DATA_FOUND THEN
1737: UPDATE ce_forecasts
1738: SET error_status = 'X'

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

1748: CE_CASH_FCST.G_rp_forecast_header_id,
1749: CE_CASH_FCST.G_forecast_row_id,
1750: 'CE_FC_NO_SUB_EXCH_RATE',
1751: error_msg);
1752: cep_standard.debug('EXCEPTION: Populate_Opening_Bal - Subsidiary - No exchange rate found');
1753:
1754: l_opening_balance := 0;
1755: WHEN OTHERS Then
1756: cep_standard.debug('EXCEPTION: Populate_Opening_Bal - Subsidiary Bank Account Currency exchange rate conversion');

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

1752: cep_standard.debug('EXCEPTION: Populate_Opening_Bal - Subsidiary - No exchange rate found');
1753:
1754: l_opening_balance := 0;
1755: WHEN OTHERS Then
1756: cep_standard.debug('EXCEPTION: Populate_Opening_Bal - Subsidiary Bank Account Currency exchange rate conversion');
1757: raise;
1758: END;
1759: END IF;
1760: END IF;

Line 1845: cep_standard.debug('<

1841: END LOOP;
1842: END IF;
1843: END IF;
1844:
1845: cep_standard.debug('< 1846: EXCEPTION
1847: WHEN OTHERS THEN
1848: CEP_STANDARD.DEBUG('EXCEPTION:Populate_Opening_Bal');
1849: raise;

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

1844:
1845: cep_standard.debug('< 1846: EXCEPTION
1847: WHEN OTHERS THEN
1848: CEP_STANDARD.DEBUG('EXCEPTION:Populate_Opening_Bal');
1849: raise;
1850: END Populate_Opening_Bal;
1851:
1852:

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

1873: error_msg FND_NEW_MESSAGES.message_text%TYPE;
1874:
1875: BEGIN
1876:
1877: cep_standard.debug('>>CE_CSH_FCAST_POP.Build_AP_Pay_Query');
1878:
1879: from_clause := Get_From_Clause('ce_ap_fc_payments_v');
1880: cep_standard.debug('Built From Clause');
1881:

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

1876:
1877: cep_standard.debug('>>CE_CSH_FCAST_POP.Build_AP_Pay_Query');
1878:
1879: from_clause := Get_From_Clause('ce_ap_fc_payments_v');
1880: cep_standard.debug('Built From Clause');
1881:
1882: where_clause := Get_Where_Clause || Add_Where('PAYMENT_METHOD') || Add_Where('BANK_ACCOUNT_ID');
1883:
1884: IF (NVL(CE_CASH_FCST.G_forecast_method,'F') = 'P') THEN

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

1887: Set_History;
1888:
1889: EXCEPTION
1890: When NO_DATA_FOUND Then
1891: cep_standard.debug('row_id = ' || to_char(CE_CASH_FCST.G_forecast_row_id));
1892:
1893: UPDATE ce_forecasts
1894: SET error_status = 'E'
1895: WHERE forecast_id = CE_CASH_FCST.G_forecast_id;

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

1902: CE_CASH_FCST.G_forecast_row_id,
1903: 'CE_NO_HIST_START_PERIOD',
1904: error_msg);
1905: zero_fill_cells;
1906: cep_standard.debug('EXCEPTION: No history data found for APP');
1907: return;
1908: When OTHERS Then
1909: cep_standard.debug('EXCEPTION: Build APP query - Set History');
1910: raise;

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

1905: zero_fill_cells;
1906: cep_standard.debug('EXCEPTION: No history data found for APP');
1907: return;
1908: When OTHERS Then
1909: cep_standard.debug('EXCEPTION: Build APP query - Set History');
1910: raise;
1911: END;
1912: IF (CE_CASH_FCST.G_order_date_type = 'V') THEN
1913: IF(CE_CASH_FCST.G_rp_exchange_type = 'User')THEN

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

1955: round(nvl(-src.amount,0)*curr.exchange_rate'
1956: ||','||CE_CASH_FCST.G_precision||'),
1957: -src.amount';
1958: END IF;
1959: cep_standard.debug('Built Select Clause');
1960:
1961: where_clause := where_clause || '
1962: AND NVL(src.actual_value_date, src.cleared_date) BETWEEN cab.start_date and cab.end_date
1963: AND src.status <> ''NEGOTIABLE'' ';

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

2007: round(nvl(-src.amount,0)*curr.exchange_rate'
2008: ||','||CE_CASH_FCST.G_precision||'),
2009: -src.amount';
2010: END IF;
2011: cep_standard.debug('Built Select Clause');
2012:
2013: where_clause := where_clause || '
2014: AND src.cleared_date BETWEEN cab.start_date and cab.end_date
2015: AND src.status <> ''NEGOTIABLE'' ';

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

2061: round(nvl(-src.amount,0)*curr.exchange_rate'
2062: ||','||CE_CASH_FCST.G_precision||'),
2063: -src.amount';
2064: END IF;
2065: cep_standard.debug('Built Select Clause');
2066:
2067: where_clause := where_clause || '
2068: AND NVL(src.actual_value_date,NVL(src.anticipated_value_date,NVL(src.maturity_date,src.payment_date))) BETWEEN cab.start_date - '
2069: ||to_char(CE_CASH_FCST.G_lead_time)||

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

2070: ' and cab.end_date - '
2071: ||to_char(CE_CASH_FCST.G_lead_time)||
2072: ' AND src.status in (''NEGOTIABLE'',''ISSUED'') ';
2073: END IF;
2074: cep_standard.debug('Built Where Clause');
2075:
2076: main_query := select_clause || from_clause || where_clause;
2077:
2078: Execute_Main_Query (main_query);

Line 2079: cep_standard.debug('<

2075:
2076: main_query := select_clause || from_clause || where_clause;
2077:
2078: Execute_Main_Query (main_query);
2079: cep_standard.debug('< 2080: EXCEPTION
2081: WHEN OTHERS THEN
2082: CEP_STANDARD.DEBUG('EXCEPTION:Build_AP_Pay_Query');
2083: raise;

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

2078: Execute_Main_Query (main_query);
2079: cep_standard.debug('< 2080: EXCEPTION
2081: WHEN OTHERS THEN
2082: CEP_STANDARD.DEBUG('EXCEPTION:Build_AP_Pay_Query');
2083: raise;
2084: END Build_AP_Pay_Query;
2085:
2086:

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

2108: main_query varchar2(3500) := null;
2109: view_name VARCHAR2(50);
2110:
2111: BEGIN
2112: cep_standard.debug('>>Build_AP_Project_Inv_Query');
2113:
2114: select_clause := Get_Select_Clause;
2115: cep_standard.debug('Built Select Clause');
2116:

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

2111: BEGIN
2112: cep_standard.debug('>>Build_AP_Project_Inv_Query');
2113:
2114: select_clause := Get_Select_Clause;
2115: cep_standard.debug('Built Select Clause');
2116:
2117: IF (NVL(CE_CASH_FCST.G_discount_option,'N') = 'N') THEN
2118: cep_standard.debug('Discount NOT taken');
2119: from_clause := Get_From_Clause('ce_due_project_inv_v');

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

2114: select_clause := Get_Select_Clause;
2115: cep_standard.debug('Built Select Clause');
2116:
2117: IF (NVL(CE_CASH_FCST.G_discount_option,'N') = 'N') THEN
2118: cep_standard.debug('Discount NOT taken');
2119: from_clause := Get_From_Clause('ce_due_project_inv_v');
2120: ELSE cep_standard.debug('Discount taken');
2121: from_clause := Get_From_Clause('ce_disc_project_inv_v');
2122: END IF;

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

2116:
2117: IF (NVL(CE_CASH_FCST.G_discount_option,'N') = 'N') THEN
2118: cep_standard.debug('Discount NOT taken');
2119: from_clause := Get_From_Clause('ce_due_project_inv_v');
2120: ELSE cep_standard.debug('Discount taken');
2121: from_clause := Get_From_Clause('ce_disc_project_inv_v');
2122: END IF;
2123: cep_standard.debug('Built From Clause');
2124:

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

2119: from_clause := Get_From_Clause('ce_due_project_inv_v');
2120: ELSE cep_standard.debug('Discount taken');
2121: from_clause := Get_From_Clause('ce_disc_project_inv_v');
2122: END IF;
2123: cep_standard.debug('Built From Clause');
2124:
2125: where_clause := Get_Where_Clause || '
2126: AND src.trx_date BETWEEN cab.start_date - '
2127: ||to_char(CE_CASH_FCST.G_lead_time)||

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

2130: Add_Where('PROJECT_ID') ||
2131: Add_Where('PAYMENT_PRIORITY') || Add_Where('PAY_GROUP') || Add_Where('VENDOR_TYPE') ||
2132: Add_Where('INCLUDE_HOLD_FLAG');
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 2140: cep_standard.debug('<

2136: main_query := select_clause || from_clause || where_clause;
2137:
2138: Execute_Main_Query (main_query);
2139:
2140: cep_standard.debug('< 2141: EXCEPTION
2142: WHEN OTHERS THEN
2143: CEP_STANDARD.DEBUG('EXCEPTION:Build_AP_Project_Inv_Query');
2144: raise;

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

2139:
2140: cep_standard.debug('< 2141: EXCEPTION
2142: WHEN OTHERS THEN
2143: CEP_STANDARD.DEBUG('EXCEPTION:Build_AP_Project_Inv_Query');
2144: raise;
2145: END Build_AP_Project_Inv_Query;
2146:
2147:

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

2172: main_query varchar2(3500) := null;
2173: view_name VARCHAR2(50);
2174:
2175: BEGIN
2176: cep_standard.debug('>>Build_AP_Invoice_Query');
2177:
2178: select_clause := Get_Select_Clause;
2179: cep_standard.debug('Built Select Clause');
2180:

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

2175: BEGIN
2176: cep_standard.debug('>>Build_AP_Invoice_Query');
2177:
2178: select_clause := Get_Select_Clause;
2179: cep_standard.debug('Built Select Clause');
2180:
2181: IF (NVL(CE_CASH_FCST.G_discount_option,'N') = 'N') THEN
2182: cep_standard.debug('Discount NOT taken');
2183: from_clause := Get_From_Clause('ce_ap_fc_due_invoices_v');

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

2178: select_clause := Get_Select_Clause;
2179: cep_standard.debug('Built Select Clause');
2180:
2181: IF (NVL(CE_CASH_FCST.G_discount_option,'N') = 'N') THEN
2182: cep_standard.debug('Discount NOT taken');
2183: from_clause := Get_From_Clause('ce_ap_fc_due_invoices_v');
2184: ELSE
2185: cep_standard.debug('Discount taken');
2186: from_clause := Get_From_Clause('ce_disc_invoices_v');

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

2181: IF (NVL(CE_CASH_FCST.G_discount_option,'N') = 'N') THEN
2182: cep_standard.debug('Discount NOT taken');
2183: from_clause := Get_From_Clause('ce_ap_fc_due_invoices_v');
2184: ELSE
2185: cep_standard.debug('Discount taken');
2186: from_clause := Get_From_Clause('ce_disc_invoices_v');
2187: END IF;
2188: cep_standard.debug('Built From Clause');
2189:

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

2184: ELSE
2185: cep_standard.debug('Discount taken');
2186: from_clause := Get_From_Clause('ce_disc_invoices_v');
2187: END IF;
2188: cep_standard.debug('Built From Clause');
2189:
2190: where_clause := Get_Where_Clause || '
2191: AND src.trx_date BETWEEN cab.start_date - '
2192: ||to_char(CE_CASH_FCST.G_lead_time)||

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

2203: where project_id = ' || to_char(CE_CASH_FCST.G_rp_project_id) || ')';
2204:
2205: END IF;
2206:
2207: cep_standard.debug('Built Where Clause');
2208:
2209: main_query := select_clause || from_clause || where_clause;
2210:
2211: Execute_Main_Query (main_query);

Line 2217: cep_standard.debug('<

2213: IF (CE_CASH_FCST.G_rp_project_id IS NOT NULL) THEN
2214: Build_AP_Project_Inv_Query;
2215: END IF;
2216:
2217: cep_standard.debug('< 2218: EXCEPTION
2219: WHEN OTHERS THEN
2220: CEP_STANDARD.DEBUG('EXCEPTION:Build_AP_Invoice_Query');
2221: raise;

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

2216:
2217: cep_standard.debug('< 2218: EXCEPTION
2219: WHEN OTHERS THEN
2220: CEP_STANDARD.DEBUG('EXCEPTION:Build_AP_Invoice_Query');
2221: raise;
2222: END Build_AP_Invoice_Query;
2223:
2224:

Line 2308: cep_standard.debug('<

2304: main_query := select_clause || from_clause || where_clause;
2305:
2306: Execute_Main_Query (main_query);
2307:
2308: cep_standard.debug('< 2309: EXCEPTION
2310: WHEN OTHERS THEN
2311: cep_standard.debug('EXCEPTION:OTHERS-Build_PA_Invoice_Query');
2312: RAISE;

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

2307:
2308: cep_standard.debug('< 2309: EXCEPTION
2310: WHEN OTHERS THEN
2311: cep_standard.debug('EXCEPTION:OTHERS-Build_PA_Invoice_Query');
2312: RAISE;
2313: END Build_PA_Invoice_Query;
2314:
2315:

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

2334: where_clause varchar2(1500);
2335: select_clause varchar2(1500);
2336: main_query varchar2(3500) := null;
2337: BEGIN
2338: cep_standard.debug('>>Build_AR_Invoice_Query');
2339:
2340: IF (CE_CASH_FCST.G_include_dispute_flag = 'N') THEN
2341: IF( CE_CASH_FCST.G_rp_exchange_type = 'User')THEN
2342: select_clause := ' SELECT CE_FORECAST_TRX_CELLS_S.nextval,

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

2387: ELSE
2388: select_clause := Get_Select_Clause;
2389: END IF;
2390:
2391: cep_standard.debug('Built Select Clause');
2392:
2393: from_clause := Get_From_Clause ('ce_ar_fc_invoices_v');
2394: cep_standard.debug('Built From Clause');
2395:

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

2390:
2391: cep_standard.debug('Built Select Clause');
2392:
2393: from_clause := Get_From_Clause ('ce_ar_fc_invoices_v');
2394: cep_standard.debug('Built From Clause');
2395:
2396: IF (CE_CASH_FCST.G_use_average_payment_days = 'Y') THEN
2397: where_clause := Get_Where_Clause || ' AND
2398: nvl(src.invoice_date, src.trx_date) + decode(src.invoice_date, null, '

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

2423: and pa.project_id = ' || to_char(CE_CASH_FCST.G_rp_project_id) || ')';
2424:
2425: END IF;
2426:
2427: cep_standard.debug('Built Where Clause');
2428:
2429: main_query := select_clause || from_clause || where_clause;
2430:
2431: Execute_Main_Query (main_query);

Line 2437: cep_standard.debug('<

2433: IF (CE_CASH_FCST.G_rp_project_id IS NOT NULL) THEN
2434: Build_PA_Invoice_Query;
2435: END IF;
2436:
2437: cep_standard.debug('< 2438: EXCEPTION
2439: WHEN OTHERS THEN
2440: cep_standard.debug('EXCEPTION:OTHERS-Build_AR_Invoice_Query');
2441: RAISE;

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

2436:
2437: cep_standard.debug('< 2438: EXCEPTION
2439: WHEN OTHERS THEN
2440: cep_standard.debug('EXCEPTION:OTHERS-Build_AR_Invoice_Query');
2441: RAISE;
2442: END Build_AR_Invoice_Query;
2443:
2444:

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

2470: counter number;
2471: error_msg FND_NEW_MESSAGES.message_text%TYPE;
2472:
2473: BEGIN
2474: cep_standard.debug('>>Build_AR_Receipt_Query');
2475:
2476: from_clause := Get_From_Clause ('ce_ar_fc_receipts_v');
2477: cep_standard.debug('Built From Clause');
2478:

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

2473: BEGIN
2474: cep_standard.debug('>>Build_AR_Receipt_Query');
2475:
2476: from_clause := Get_From_Clause ('ce_ar_fc_receipts_v');
2477: cep_standard.debug('Built From Clause');
2478:
2479: where_clause := Get_Where_Clause || Add_Where('BANK_ACCOUNT_ID') || Add_Where('RECEIPT_METHOD_ID');
2480:
2481: IF (NVL(CE_CASH_FCST.G_forecast_method,'F') = 'P') THEN

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

2483: Set_History;
2484:
2485: EXCEPTION
2486: When NO_DATA_FOUND Then
2487: cep_standard.debug('row_id = ' || to_char(CE_CASH_FCST.G_forecast_row_id));
2488:
2489: UPDATE ce_forecasts
2490: SET error_status = 'E'
2491: WHERE forecast_id = CE_CASH_FCST.G_forecast_id;

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

2498: CE_CASH_FCST.G_forecast_row_id,
2499: 'CE_NO_HIST_START_PERIOD',
2500: error_msg);
2501: zero_fill_cells;
2502: cep_standard.debug('EXCEPTION: No history data found for ARR');
2503: return;
2504: When OTHERS Then
2505: cep_standard.debug('EXCEPTION: Build ARR query - Set History');
2506: raise;

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

2501: zero_fill_cells;
2502: cep_standard.debug('EXCEPTION: No history data found for ARR');
2503: return;
2504: When OTHERS Then
2505: cep_standard.debug('EXCEPTION: Build ARR query - Set History');
2506: raise;
2507: END;
2508: IF (CE_CASH_FCST.G_order_date_type = 'V') THEN
2509: where_clause := where_clause || '

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

2525: ' AND src.status not in (''CLEARED'',''RISK_ELIMINATED'') ';
2526: trx_date_clause := 'src.cash_activity_date';
2527: END IF;
2528:
2529: cep_standard.debug('Built Where Clause');
2530:
2531: IF(CE_CASH_FCST.G_rp_exchange_type = 'User') THEN
2532: select_clause := 'SELECT CE_FORECAST_TRX_CELLS_S.nextval,
2533: '||CE_CASH_FCST.G_forecast_id||',

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

2574: round(nvl(src.amount,0)*curr.exchange_rate,'
2575: ||CE_CASH_FCST.G_precision||'),
2576: src.amount';
2577: END IF;
2578: cep_standard.debug('Built Select Clause');
2579:
2580: main_query := select_clause || from_clause || where_clause;
2581:
2582: commit;

Line 2585: cep_standard.debug('<

2581:
2582: commit;
2583:
2584: Execute_Main_Query (main_query);
2585: cep_standard.debug('< 2586: EXCEPTION
2587: WHEN OTHERS THEN
2588: cep_standard.debug('EXCEPTION-OTHERS:Build_AR_Receipt_Query');
2589: RAISE;

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

2584: Execute_Main_Query (main_query);
2585: cep_standard.debug('< 2586: EXCEPTION
2587: WHEN OTHERS THEN
2588: cep_standard.debug('EXCEPTION-OTHERS:Build_AR_Receipt_Query');
2589: RAISE;
2590: END Build_AR_Receipt_Query;
2591:
2592:

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

2605: --------------------------------------------------------------------- */
2606: FUNCTION Get_GL_General_Query RETURN VARCHAR2 IS
2607: main_query varchar2(2000) := null;
2608: BEGIN
2609: cep_standard.debug('>>Get_GL_General_Query');
2610: IF(CE_CASH_FCST.G_rp_exchange_type = 'User')THEN
2611: main_query := ' SELECT CE_FORECAST_TRX_CELLS_S.nextval,
2612: '||CE_CASH_FCST.G_forecast_id||',
2613: '||CE_CASH_FCST.G_rp_forecast_header_id||',

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

2682:
2683: return (main_query);
2684: EXCEPTION
2685: WHEN OTHERS THEN
2686: cep_standard.debug('EXCEPTION-OTHERS: Get_GL_General_Query');
2687: RAISE;
2688: END Get_GL_General_Query;
2689:
2690:

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

2705: PROCEDURE Build_GL_Budget_Query IS
2706: main_query varchar2(2000) := null;
2707:
2708: BEGIN
2709: cep_standard.debug('>>Build_GL_Budget_Query');
2710: main_query := Get_GL_General_Query || '
2711: AND src.budget_version_id = '||CE_CASH_FCST.G_budget_version_id||'
2712: AND src.actual_flag = ''B'' ';
2713:

Line 2716: cep_standard.debug('<

2712: AND src.actual_flag = ''B'' ';
2713:
2714: Execute_Main_Query (main_query);
2715:
2716: cep_standard.debug('< 2717:
2718: EXCEPTION
2719: WHEN OTHERS THEN
2720: cep_standard.debug('EXCEPTION-OTHERS: Build_GL_Budget_Query');

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

2716: cep_standard.debug('< 2717:
2718: EXCEPTION
2719: WHEN OTHERS THEN
2720: cep_standard.debug('EXCEPTION-OTHERS: Build_GL_Budget_Query');
2721: RAISE;
2722: END Build_GL_Budget_Query;
2723:
2724:

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

2737: --------------------------------------------------------------------- */
2738: PROCEDURE Build_GL_Encumb_Query IS
2739: main_query varchar2(2000) := null;
2740: BEGIN
2741: cep_standard.debug('>>Build_GL_Encumb_Query');
2742: main_query := Get_GL_General_Query || '
2743: AND src.encumbrance_type_id = '||CE_CASH_FCST.G_encumbrance_type_id||'
2744: AND src.actual_flag = ''E'' ';
2745:

Line 2748: cep_standard.debug('<

2744: AND src.actual_flag = ''E'' ';
2745:
2746: Execute_Main_Query (main_query);
2747:
2748: cep_standard.debug('< 2749:
2750: EXCEPTION
2751: WHEN OTHERS THEN
2752: cep_standard.debug('EXCEPTION-OTHERS: Build_GL_Encumbrance_Query');

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

2748: cep_standard.debug('< 2749:
2750: EXCEPTION
2751: WHEN OTHERS THEN
2752: cep_standard.debug('EXCEPTION-OTHERS: Build_GL_Encumbrance_Query');
2753: RAISE;
2754: END Build_GL_Encumb_Query;
2755:
2756:

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

2770: PROCEDURE Build_GL_Actuals_Query IS
2771: main_query varchar2(2000) := null;
2772:
2773: BEGIN
2774: cep_standard.debug('>>Build_GL_Actuals_Query');
2775: main_query := Get_GL_General_Query || '
2776: AND src.actual_flag = ''A''
2777: AND src.template_id is null ';
2778:

Line 2781: cep_standard.debug('<

2777: AND src.template_id is null ';
2778:
2779: Execute_Main_Query (main_query);
2780:
2781: cep_standard.debug('< 2782:
2783: EXCEPTION
2784: WHEN OTHERS THEN
2785: cep_standard.debug('EXCEPTION-OTHERS: Build_GL_Actuals_Query');

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

2781: cep_standard.debug('< 2782:
2783: EXCEPTION
2784: WHEN OTHERS THEN
2785: cep_standard.debug('EXCEPTION-OTHERS: Build_GL_Actuals_Query');
2786: RAISE;
2787: END Build_GL_Actuals_Query;
2788:
2789:

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

2807: main_query varchar2(3500) := null;
2808: error_msg FND_NEW_MESSAGES.message_text%TYPE;
2809:
2810: BEGIN
2811: cep_standard.debug('>>CE_CSH_FCAST_POP.Build_PAY_Exp_Query');
2812: select_clause := Get_Select_Clause;
2813: cep_standard.debug('Built Select Clause');
2814:
2815: from_clause := Get_From_Clause('ce_pay_fc_payroll_v');

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

2809:
2810: BEGIN
2811: cep_standard.debug('>>CE_CSH_FCAST_POP.Build_PAY_Exp_Query');
2812: select_clause := Get_Select_Clause;
2813: cep_standard.debug('Built Select Clause');
2814:
2815: from_clause := Get_From_Clause('ce_pay_fc_payroll_v');
2816: cep_standard.debug('Built From Clause');
2817:

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

2812: select_clause := Get_Select_Clause;
2813: cep_standard.debug('Built Select Clause');
2814:
2815: from_clause := Get_From_Clause('ce_pay_fc_payroll_v');
2816: cep_standard.debug('Built From Clause');
2817:
2818: where_clause := Get_Where_Clause || '
2819: AND src.effective_date BETWEEN cab.start_date and cab.end_date ' ||
2820: Add_Where('ORG_PAYMENT_METHOD_ID') || Add_Where('BANK_ACCOUNT_ID') || Add_Where('PAYROLL_ID');

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

2834: Set_History;
2835:
2836: EXCEPTION
2837: When NO_DATA_FOUND Then
2838: cep_standard.debug('row_id = ' || to_char(CE_CASH_FCST.G_forecast_row_id));
2839:
2840: UPDATE ce_forecasts
2841: SET error_status = 'E'
2842: WHERE forecast_id = CE_CASH_FCST.G_forecast_id;

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

2849: CE_CASH_FCST.G_forecast_row_id,
2850: 'CE_NO_HIST_START_PERIOD',
2851: error_msg);
2852: zero_fill_cells;
2853: cep_standard.debug('EXCEPTION: No Payroll historical data found');
2854: return;
2855: When OTHERS Then
2856: cep_standard.debug('EXCEPTION: Build Payroll query - Set History');
2857: raise;

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

2852: zero_fill_cells;
2853: cep_standard.debug('EXCEPTION: No Payroll historical data found');
2854: return;
2855: When OTHERS Then
2856: cep_standard.debug('EXCEPTION: Build Payroll query - Set History');
2857: raise;
2858: END;
2859:
2860: main_query := select_clause || from_clause || where_clause;

Line 2864: cep_standard.debug('<

2860: main_query := select_clause || from_clause || where_clause;
2861:
2862: Execute_Main_Query (main_query);
2863:
2864: cep_standard.debug('< 2865:
2866: END Build_Pay_Exp_Query;
2867:
2868:

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

3075: AND project_id = CE_CASH_FCST.G_rp_project_id;
3076:
3077: BEGIN
3078:
3079: cep_standard.debug('>>CE_CSH_FCAST_POP.Build_PO_Orders_Query');
3080:
3081: where_clause := Get_Where_Clause||
3082: Add_Where('AUTHORIZATION_STATUS') || Add_Where('PAYMENT_PRIORITY') ||
3083: Add_Where('PAY_GROUP') || Add_Where('VENDOR_TYPE') || Add_Where('PROJECT_ID');

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

3209: FROM ce_forecast_ext_temp
3210: WHERE context_value = 'A'
3211: AND forecast_request_id = CE_CASH_FCST.G_forecast_id
3212: AND conversion_rate = CE_CASH_FCST.G_forecast_row_id;
3213: cep_standard.debug('l_max_end_date = ' || to_char(l_max_end_date, 'DD-MON-YYYY'));
3214:
3215: IF (CE_CASH_FCST.G_rp_project_id IS NULL) THEN
3216:
3217: IF (CE_CASH_FCST.G_use_payment_terms = 'Y') THEN

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

3215: IF (CE_CASH_FCST.G_rp_project_id IS NULL) THEN
3216:
3217: IF (CE_CASH_FCST.G_use_payment_terms = 'Y') THEN
3218:
3219: cep_standard.debug('PROJECT_ID IS NULL');
3220: cep_standard.debug('USE_PAYMENT_TERMS IS Y');
3221:
3222: FOR C_rec IN C_period LOOP
3223: FOR C_req_rec in C_orders_terms(C_rec.start_date, C_rec.end_date) LOOP

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

3216:
3217: IF (CE_CASH_FCST.G_use_payment_terms = 'Y') THEN
3218:
3219: cep_standard.debug('PROJECT_ID IS NULL');
3220: cep_standard.debug('USE_PAYMENT_TERMS IS Y');
3221:
3222: FOR C_rec IN C_period LOOP
3223: FOR C_req_rec in C_orders_terms(C_rec.start_date, C_rec.end_date) LOOP
3224: IF (C_req_rec.start_date < C_rec.start_date) THEN

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

3237: l_start_date := trunc(C_req_rec.start_date);
3238: l_end_date := trunc(C_req_rec.end_date);
3239: END IF;
3240: END IF;
3241: cep_standard.debug('l_start_date = ' || to_char(l_start_date, 'DD-MON-YYYY'));
3242: cep_standard.debug('l_end_date = ' || to_char(l_end_date, 'DD-MON-YYYY'));
3243:
3244: /* In the case where we use terms and due amount is 0,
3245: we want to sum the term amounts and subtract them from the original

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

3238: l_end_date := trunc(C_req_rec.end_date);
3239: END IF;
3240: END IF;
3241: cep_standard.debug('l_start_date = ' || to_char(l_start_date, 'DD-MON-YYYY'));
3242: cep_standard.debug('l_end_date = ' || to_char(l_end_date, 'DD-MON-YYYY'));
3243:
3244: /* In the case where we use terms and due amount is 0,
3245: we want to sum the term amounts and subtract them from the original
3246: source amount. Since this is too complex to perform within the cursor

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

3251: INTO remain_amount
3252: from ap_terms_lines t
3253: where t.term_id = C_req_rec.term_id;
3254:
3255: cep_standard.debug('remain_amount = ' || to_char(remain_amount));
3256:
3257: l_amount := remain_amount/C_req_rec.total_dates * (l_end_date - l_start_date + 1);
3258:
3259: end if;

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

3260:
3261: l_amount := C_req_rec.per_day_amount * (l_end_date - l_start_date + 1);
3262:
3263:
3264: cep_standard.debug('per_day_amount = ' || to_char(C_req_rec.per_day_amount));
3265: cep_standard.debug('l_amount = ' || to_char(l_amount));
3266:
3267: IF(CE_CASH_FCST.G_rp_src_curr_type in ('E','F') AND
3268: C_req_rec.currency_code <> CE_CASH_FCST.G_rp_src_currency) THEN

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

3261: l_amount := C_req_rec.per_day_amount * (l_end_date - l_start_date + 1);
3262:
3263:
3264: cep_standard.debug('per_day_amount = ' || to_char(C_req_rec.per_day_amount));
3265: cep_standard.debug('l_amount = ' || to_char(l_amount));
3266:
3267: IF(CE_CASH_FCST.G_rp_src_curr_type in ('E','F') AND
3268: C_req_rec.currency_code <> CE_CASH_FCST.G_rp_src_currency) THEN
3269: l_amount := 0;

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

3267: IF(CE_CASH_FCST.G_rp_src_curr_type in ('E','F') AND
3268: C_req_rec.currency_code <> CE_CASH_FCST.G_rp_src_currency) THEN
3269: l_amount := 0;
3270: END IF;
3271: cep_standard.debug('currency_code');
3272:
3273:
3274: IF(CE_CASH_FCST.G_authorization_status IS NOT NULL AND
3275: C_req_rec.status <> CE_CASH_FCST.G_authorization_status) THEN

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

3274: IF(CE_CASH_FCST.G_authorization_status IS NOT NULL AND
3275: C_req_rec.status <> CE_CASH_FCST.G_authorization_status) THEN
3276: l_amount := 0;
3277: END IF;
3278: cep_standard.debug('authorization_status');
3279:
3280:
3281: IF(CE_CASH_FCST.G_payment_priority IS NOT NULL AND
3282: C_req_rec.payment_priority <> CE_CASH_FCST.G_payment_priority ) THEN

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

3281: IF(CE_CASH_FCST.G_payment_priority IS NOT NULL AND
3282: C_req_rec.payment_priority <> CE_CASH_FCST.G_payment_priority ) THEN
3283: l_amount := 0;
3284: END IF;
3285: cep_standard.debug('payment_priority ');
3286:
3287:
3288: IF(CE_CASH_FCST.G_pay_group IS NOT NULL AND
3289: C_req_rec.paygroup <> CE_CASH_FCST.G_pay_group) THEN

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

3288: IF(CE_CASH_FCST.G_pay_group IS NOT NULL AND
3289: C_req_rec.paygroup <> CE_CASH_FCST.G_pay_group) THEN
3290: l_amount := 0;
3291: END IF;
3292: cep_standard.debug('paygroup');
3293:
3294:
3295: IF(CE_CASH_FCST.G_vendor_type IS NOT NULL AND
3296: C_req_rec.vendor_type <> CE_CASH_FCST.G_vendor_type) THEN

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

3295: IF(CE_CASH_FCST.G_vendor_type IS NOT NULL AND
3296: C_req_rec.vendor_type <> CE_CASH_FCST.G_vendor_type) THEN
3297: l_amount := 0;
3298: END IF;
3299: cep_standard.debug('vendor_type');
3300:
3301: SELECT to_number(ORGANIZATION_ID)
3302: INTO l_legal_entity_id
3303: FROM hr_operating_units

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

3301: SELECT to_number(ORGANIZATION_ID)
3302: INTO l_legal_entity_id
3303: FROM hr_operating_units
3304: WHERE organization_id = C_req_rec.org_id;
3305: cep_standard.debug('legal_entity_id');
3306:
3307:
3308: IF( (CE_CASH_FCST.G_org_id <> -1 AND CE_CASH_FCST.G_org_id <> -99) AND
3309: (nvl(C_req_rec.org_id,CE_CASH_FCST.G_org_id) <> CE_CASH_FCST.G_org_id) ) THEN

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

3308: IF( (CE_CASH_FCST.G_org_id <> -1 AND CE_CASH_FCST.G_org_id <> -99) AND
3309: (nvl(C_req_rec.org_id,CE_CASH_FCST.G_org_id) <> CE_CASH_FCST.G_org_id) ) THEN
3310: l_amount := 0;
3311: END IF;
3312: cep_standard.debug('org_id');
3313:
3314:
3315: IF( CE_CASH_FCST.G_set_of_books_id IS NOT NULL AND
3316: CE_CASH_FCST.G_set_of_books_id <> -1) THEN

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

3321: l_amount := 0;
3322: END IF;
3323: CLOSE C_sob;
3324: END IF;
3325: cep_standard.debug('set_of_books_id');
3326:
3327: IF( CE_CASH_FCST.G_rp_exchange_type IS NULL OR
3328: CE_CASH_FCST.G_rp_exchange_type <> 'User')THEN
3329: OPEN C_rate(C_req_rec.currency_code);

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

3336: l_rate := CE_CASH_FCST.G_rp_exchange_rate;
3337: ELSE
3338: l_rate := 1;
3339: END IF;
3340: cep_standard.debug('exchange_rate');
3341:
3342:
3343: IF(CE_CASH_FCST.G_rp_amount_threshold IS NOT NULL) THEN
3344: IF (abs(l_amount) <= CE_CASH_FCST.G_rp_amount_threshold) THEN

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

3344: IF (abs(l_amount) <= CE_CASH_FCST.G_rp_amount_threshold) THEN
3345: l_amount := 0;
3346: END IF;
3347: END IF;
3348: cep_standard.debug('amount_threshold');
3349:
3350: IF(C_rec.forecast_column_id = CE_CASH_FCST.G_overdue_column_id AND
3351: CE_CASH_FCST.G_invalid_overdue_row)THEN
3352: l_amount := 0;

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

3350: IF(C_rec.forecast_column_id = CE_CASH_FCST.G_overdue_column_id AND
3351: CE_CASH_FCST.G_invalid_overdue_row)THEN
3352: l_amount := 0;
3353: END IF;
3354: cep_standard.debug('OVERDUE_COLUMN');
3355:
3356: IF (l_amount <> 0) THEN
3357: IF (C_req_rec.trx_end_date IS NULL and error_flag = FALSE) THEN
3358:

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

3369: 'CE_FC_POP_NO_END_DATE',
3370: error_msg);
3371: error_flag := TRUE;
3372: END IF;
3373: cep_standard.debug('error_message');
3374:
3375: 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);
3376: END IF;
3377: END LOOP;

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

3380: clear_aging_buckets;
3381: zero_fill_cells;
3382:
3383: ELSE
3384: cep_standard.debug('PROJECT_ID IS NULL');
3385: cep_standard.debug('USE_PAYMENT_TERMS IS N');
3386:
3387: FOR C_rec IN C_period LOOP
3388: FOR C_req_rec in C_orders(C_rec.start_date, C_rec.end_date) LOOP

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

3381: zero_fill_cells;
3382:
3383: ELSE
3384: cep_standard.debug('PROJECT_ID IS NULL');
3385: cep_standard.debug('USE_PAYMENT_TERMS IS N');
3386:
3387: FOR C_rec IN C_period LOOP
3388: FOR C_req_rec in C_orders(C_rec.start_date, C_rec.end_date) LOOP
3389: IF (C_req_rec.start_date < C_rec.start_date) THEN

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

3402: l_start_date := trunc(C_req_rec.start_date);
3403: l_end_date := trunc(C_req_rec.end_date);
3404: END IF;
3405: END IF;
3406: cep_standard.debug('l_start_date = ' || to_char(l_start_date, 'DD-MON-YYYY'));
3407: cep_standard.debug('l_end_date = ' || to_char(l_end_date, 'DD-MON-YYYY'));
3408:
3409: l_amount := C_req_rec.per_day_amount * (l_end_date - l_start_date + 1);
3410:

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

3403: l_end_date := trunc(C_req_rec.end_date);
3404: END IF;
3405: END IF;
3406: cep_standard.debug('l_start_date = ' || to_char(l_start_date, 'DD-MON-YYYY'));
3407: cep_standard.debug('l_end_date = ' || to_char(l_end_date, 'DD-MON-YYYY'));
3408:
3409: l_amount := C_req_rec.per_day_amount * (l_end_date - l_start_date + 1);
3410:
3411: cep_standard.debug('per_day_amount = ' || to_char(C_req_rec.per_day_amount));

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

3407: cep_standard.debug('l_end_date = ' || to_char(l_end_date, 'DD-MON-YYYY'));
3408:
3409: l_amount := C_req_rec.per_day_amount * (l_end_date - l_start_date + 1);
3410:
3411: cep_standard.debug('per_day_amount = ' || to_char(C_req_rec.per_day_amount));
3412: cep_standard.debug('l_amount = ' || to_char(l_amount));
3413:
3414: IF(CE_CASH_FCST.G_rp_src_curr_type in ('E','F') AND
3415: C_req_rec.currency_code <> CE_CASH_FCST.G_rp_src_currency) THEN

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

3408:
3409: l_amount := C_req_rec.per_day_amount * (l_end_date - l_start_date + 1);
3410:
3411: cep_standard.debug('per_day_amount = ' || to_char(C_req_rec.per_day_amount));
3412: cep_standard.debug('l_amount = ' || to_char(l_amount));
3413:
3414: IF(CE_CASH_FCST.G_rp_src_curr_type in ('E','F') AND
3415: C_req_rec.currency_code <> CE_CASH_FCST.G_rp_src_currency) THEN
3416: l_amount := 0;

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

3414: IF(CE_CASH_FCST.G_rp_src_curr_type in ('E','F') AND
3415: C_req_rec.currency_code <> CE_CASH_FCST.G_rp_src_currency) THEN
3416: l_amount := 0;
3417: END IF;
3418: cep_standard.debug('currency_code');
3419:
3420:
3421: IF(CE_CASH_FCST.G_authorization_status IS NOT NULL AND
3422: C_req_rec.status <> CE_CASH_FCST.G_authorization_status) THEN

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

3421: IF(CE_CASH_FCST.G_authorization_status IS NOT NULL AND
3422: C_req_rec.status <> CE_CASH_FCST.G_authorization_status) THEN
3423: l_amount := 0;
3424: END IF;
3425: cep_standard.debug('authorization_status');
3426:
3427:
3428: IF(CE_CASH_FCST.G_payment_priority IS NOT NULL AND
3429: C_req_rec.payment_priority <> CE_CASH_FCST.G_payment_priority ) THEN

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

3428: IF(CE_CASH_FCST.G_payment_priority IS NOT NULL AND
3429: C_req_rec.payment_priority <> CE_CASH_FCST.G_payment_priority ) THEN
3430: l_amount := 0;
3431: END IF;
3432: cep_standard.debug('payment_priority ');
3433:
3434:
3435: IF(CE_CASH_FCST.G_pay_group IS NOT NULL AND
3436: C_req_rec.paygroup <> CE_CASH_FCST.G_pay_group) THEN

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

3435: IF(CE_CASH_FCST.G_pay_group IS NOT NULL AND
3436: C_req_rec.paygroup <> CE_CASH_FCST.G_pay_group) THEN
3437: l_amount := 0;
3438: END IF;
3439: cep_standard.debug('paygroup');
3440:
3441:
3442: IF(CE_CASH_FCST.G_vendor_type IS NOT NULL AND
3443: C_req_rec.vendor_type <> CE_CASH_FCST.G_vendor_type) THEN

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

3442: IF(CE_CASH_FCST.G_vendor_type IS NOT NULL AND
3443: C_req_rec.vendor_type <> CE_CASH_FCST.G_vendor_type) THEN
3444: l_amount := 0;
3445: END IF;
3446: cep_standard.debug('vendor_type');
3447:
3448: SELECT to_number(ORGANIZATION_ID)
3449: INTO l_legal_entity_id
3450: FROM hr_operating_units

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

3448: SELECT to_number(ORGANIZATION_ID)
3449: INTO l_legal_entity_id
3450: FROM hr_operating_units
3451: WHERE organization_id = C_req_rec.org_id;
3452: cep_standard.debug('legal_entity_id');
3453:
3454:
3455: IF( (CE_CASH_FCST.G_org_id <> -1 AND CE_CASH_FCST.G_org_id <> -99) AND
3456: (nvl(C_req_rec.org_id,CE_CASH_FCST.G_org_id) <> CE_CASH_FCST.G_org_id) ) THEN

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

3455: IF( (CE_CASH_FCST.G_org_id <> -1 AND CE_CASH_FCST.G_org_id <> -99) AND
3456: (nvl(C_req_rec.org_id,CE_CASH_FCST.G_org_id) <> CE_CASH_FCST.G_org_id) ) THEN
3457: l_amount := 0;
3458: END IF;
3459: cep_standard.debug('org_id');
3460:
3461:
3462: IF( CE_CASH_FCST.G_set_of_books_id IS NOT NULL AND
3463: CE_CASH_FCST.G_set_of_books_id <> -1) THEN

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

3468: l_amount := 0;
3469: END IF;
3470: CLOSE C_sob;
3471: END IF;
3472: cep_standard.debug('set_of_books_id');
3473:
3474: IF( CE_CASH_FCST.G_rp_exchange_type IS NULL OR
3475: CE_CASH_FCST.G_rp_exchange_type <> 'User')THEN
3476: OPEN C_rate(C_req_rec.currency_code);

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

3483: l_rate := CE_CASH_FCST.G_rp_exchange_rate;
3484: ELSE
3485: l_rate := 1;
3486: END IF;
3487: cep_standard.debug('exchange_rate');
3488:
3489: IF(CE_CASH_FCST.G_rp_amount_threshold IS NOT NULL) THEN
3490: IF (abs(l_amount) <= CE_CASH_FCST.G_rp_amount_threshold) THEN
3491: l_amount := 0;

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

3490: IF (abs(l_amount) <= CE_CASH_FCST.G_rp_amount_threshold) THEN
3491: l_amount := 0;
3492: END IF;
3493: END IF;
3494: cep_standard.debug('amount_threshold');
3495:
3496: IF(C_rec.forecast_column_id = CE_CASH_FCST.G_overdue_column_id AND
3497: CE_CASH_FCST.G_invalid_overdue_row)THEN
3498: l_amount := 0;

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

3496: IF(C_rec.forecast_column_id = CE_CASH_FCST.G_overdue_column_id AND
3497: CE_CASH_FCST.G_invalid_overdue_row)THEN
3498: l_amount := 0;
3499: END IF;
3500: cep_standard.debug('OVERDUE_COLUMN');
3501:
3502: IF (l_amount <> 0) THEN
3503: IF (C_req_rec.trx_end_date IS NULL and error_flag = FALSE) THEN
3504:

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

3515: 'CE_FC_POP_NO_END_DATE',
3516: error_msg);
3517: error_flag := TRUE;
3518: END IF;
3519: cep_standard.debug('error_message');
3520:
3521: 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);
3522: END IF;
3523: END LOOP;

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

3527: END IF;
3528: ELSE
3529: IF (CE_CASH_FCST.G_use_payment_terms = 'Y') THEN
3530:
3531: cep_standard.debug('PROJECT_ID IS NOT NULL');
3532: cep_standard.debug('USE_PAYMENT_TERMS IS Y');
3533:
3534: FOR C_rec IN C_period LOOP
3535: FOR C_req_rec in C_orders_terms_proj(C_rec.start_date, C_rec.end_date) LOOP

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

3528: ELSE
3529: IF (CE_CASH_FCST.G_use_payment_terms = 'Y') THEN
3530:
3531: cep_standard.debug('PROJECT_ID IS NOT NULL');
3532: cep_standard.debug('USE_PAYMENT_TERMS IS Y');
3533:
3534: FOR C_rec IN C_period LOOP
3535: FOR C_req_rec in C_orders_terms_proj(C_rec.start_date, C_rec.end_date) LOOP
3536: IF (C_req_rec.start_date < C_rec.start_date) THEN

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

3549: l_start_date := trunc(C_req_rec.start_date);
3550: l_end_date := trunc(C_req_rec.end_date);
3551: END IF;
3552: END IF;
3553: cep_standard.debug('l_start_date_proj = ' || to_char(l_start_date, 'DD-MON-YYYY'));
3554: cep_standard.debug('l_end_date_proj = ' || to_char(l_end_date, 'DD-MON-YYYY'));
3555:
3556: /* In the case where we use terms and due amount is 0,
3557: we want to sum the term amounts and subtract them from the original

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

3550: l_end_date := trunc(C_req_rec.end_date);
3551: END IF;
3552: END IF;
3553: cep_standard.debug('l_start_date_proj = ' || to_char(l_start_date, 'DD-MON-YYYY'));
3554: cep_standard.debug('l_end_date_proj = ' || to_char(l_end_date, 'DD-MON-YYYY'));
3555:
3556: /* In the case where we use terms and due amount is 0,
3557: we want to sum the term amounts and subtract them from the original
3558: source amount. Since this is too complex to perform within the cursor

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

3563: INTO remain_amount
3564: from ap_terms_lines t
3565: where t.term_id = C_req_rec.term_id;
3566:
3567: cep_standard.debug('remain_amount = ' || to_char(remain_amount));
3568:
3569: l_amount := remain_amount/C_req_rec.total_dates * (l_end_date - l_start_date + 1);
3570:
3571: end if;

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

3571: end if;
3572:
3573: l_amount := C_req_rec.per_day_amount * (l_end_date - l_start_date + 1);
3574:
3575: cep_standard.debug('per_day_amount_proj = ' || to_char(C_req_rec.per_day_amount));
3576: cep_standard.debug('l_amount_proj = ' || to_char(l_amount));
3577:
3578: IF(CE_CASH_FCST.G_rp_src_curr_type in ('E','F') AND
3579: C_req_rec.currency_code <> CE_CASH_FCST.G_rp_src_currency) THEN

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

3572:
3573: l_amount := C_req_rec.per_day_amount * (l_end_date - l_start_date + 1);
3574:
3575: cep_standard.debug('per_day_amount_proj = ' || to_char(C_req_rec.per_day_amount));
3576: cep_standard.debug('l_amount_proj = ' || to_char(l_amount));
3577:
3578: IF(CE_CASH_FCST.G_rp_src_curr_type in ('E','F') AND
3579: C_req_rec.currency_code <> CE_CASH_FCST.G_rp_src_currency) THEN
3580: l_amount := 0;

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

3578: IF(CE_CASH_FCST.G_rp_src_curr_type in ('E','F') AND
3579: C_req_rec.currency_code <> CE_CASH_FCST.G_rp_src_currency) THEN
3580: l_amount := 0;
3581: END IF;
3582: cep_standard.debug('currency_code_proj');
3583:
3584:
3585: IF(CE_CASH_FCST.G_authorization_status IS NOT NULL AND
3586: C_req_rec.status <> CE_CASH_FCST.G_authorization_status) THEN

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

3585: IF(CE_CASH_FCST.G_authorization_status IS NOT NULL AND
3586: C_req_rec.status <> CE_CASH_FCST.G_authorization_status) THEN
3587: l_amount := 0;
3588: END IF;
3589: cep_standard.debug('authorization_status_proj');
3590:
3591:
3592: IF(CE_CASH_FCST.G_payment_priority IS NOT NULL AND
3593: C_req_rec.payment_priority <> CE_CASH_FCST.G_payment_priority ) THEN

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

3592: IF(CE_CASH_FCST.G_payment_priority IS NOT NULL AND
3593: C_req_rec.payment_priority <> CE_CASH_FCST.G_payment_priority ) THEN
3594: l_amount := 0;
3595: END IF;
3596: cep_standard.debug('payment_priority_proj');
3597:
3598:
3599: IF(CE_CASH_FCST.G_pay_group IS NOT NULL AND
3600: C_req_rec.paygroup <> CE_CASH_FCST.G_pay_group) THEN

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

3599: IF(CE_CASH_FCST.G_pay_group IS NOT NULL AND
3600: C_req_rec.paygroup <> CE_CASH_FCST.G_pay_group) THEN
3601: l_amount := 0;
3602: END IF;
3603: cep_standard.debug('paygroup_proj');
3604:
3605:
3606: IF(CE_CASH_FCST.G_vendor_type IS NOT NULL AND
3607: C_req_rec.vendor_type <> CE_CASH_FCST.G_vendor_type) THEN

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

3606: IF(CE_CASH_FCST.G_vendor_type IS NOT NULL AND
3607: C_req_rec.vendor_type <> CE_CASH_FCST.G_vendor_type) THEN
3608: l_amount := 0;
3609: END IF;
3610: cep_standard.debug('vendor_type_proj');
3611:
3612: SELECT to_number(ORGANIZATION_ID)
3613: INTO l_legal_entity_id
3614: FROM hr_operating_units

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

3612: SELECT to_number(ORGANIZATION_ID)
3613: INTO l_legal_entity_id
3614: FROM hr_operating_units
3615: WHERE organization_id = C_req_rec.org_id;
3616: cep_standard.debug('legal_entity_id_proj');
3617:
3618:
3619: IF( (CE_CASH_FCST.G_org_id <> -1 AND CE_CASH_FCST.G_org_id <> -99) AND
3620: (nvl(C_req_rec.org_id,CE_CASH_FCST.G_org_id) <> CE_CASH_FCST.G_org_id) ) THEN

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

3619: IF( (CE_CASH_FCST.G_org_id <> -1 AND CE_CASH_FCST.G_org_id <> -99) AND
3620: (nvl(C_req_rec.org_id,CE_CASH_FCST.G_org_id) <> CE_CASH_FCST.G_org_id) ) THEN
3621: l_amount := 0;
3622: END IF;
3623: cep_standard.debug('org_id_proj');
3624:
3625: IF( CE_CASH_FCST.G_set_of_books_id IS NOT NULL AND
3626: CE_CASH_FCST.G_set_of_books_id <> -1) THEN
3627: OPEN C_sob(C_req_rec.org_id);

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

3631: l_amount := 0;
3632: END IF;
3633: CLOSE C_sob;
3634: END IF;
3635: cep_standard.debug('set_of_books_id_proj');
3636:
3637: IF( CE_CASH_FCST.G_rp_exchange_type IS NULL OR
3638: CE_CASH_FCST.G_rp_exchange_type <> 'User')THEN
3639: OPEN C_rate(C_req_rec.currency_code);

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

3646: l_rate := CE_CASH_FCST.G_rp_exchange_rate;
3647: ELSE
3648: l_rate := 1;
3649: END IF;
3650: cep_standard.debug('exchange_rate_proj');
3651:
3652: IF(CE_CASH_FCST.G_rp_amount_threshold IS NOT NULL) THEN
3653: IF (abs(l_amount) <= CE_CASH_FCST.G_rp_amount_threshold) THEN
3654: l_amount := 0;

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

3653: IF (abs(l_amount) <= CE_CASH_FCST.G_rp_amount_threshold) THEN
3654: l_amount := 0;
3655: END IF;
3656: END IF;
3657: cep_standard.debug('amount_threshold_proj');
3658:
3659: IF(C_rec.forecast_column_id = CE_CASH_FCST.G_overdue_column_id AND
3660: CE_CASH_FCST.G_invalid_overdue_row)THEN
3661: l_amount := 0;

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

3659: IF(C_rec.forecast_column_id = CE_CASH_FCST.G_overdue_column_id AND
3660: CE_CASH_FCST.G_invalid_overdue_row)THEN
3661: l_amount := 0;
3662: END IF;
3663: cep_standard.debug('OVERDUE_COLUMN_proj');
3664:
3665: IF (l_amount <> 0) THEN
3666: IF (C_req_rec.trx_end_date IS NULL and error_flag = FALSE) THEN
3667:

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

3678: 'CE_FC_POP_NO_END_DATE',
3679: error_msg);
3680: error_flag := TRUE;
3681: END IF;
3682: cep_standard.debug('error_message_proj');
3683:
3684: 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);
3685: END IF;
3686: END LOOP;

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

3688: clear_aging_buckets;
3689: zero_fill_cells;
3690: ELSE
3691:
3692: cep_standard.debug('PROJECT_ID IS NOT NULL');
3693: cep_standard.debug('USE_PAYMENT_TERMS IS N');
3694:
3695: FOR C_rec IN C_period LOOP
3696: FOR C_req_rec in C_orders_proj(C_rec.start_date, C_rec.end_date) LOOP

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

3689: zero_fill_cells;
3690: ELSE
3691:
3692: cep_standard.debug('PROJECT_ID IS NOT NULL');
3693: cep_standard.debug('USE_PAYMENT_TERMS IS N');
3694:
3695: FOR C_rec IN C_period LOOP
3696: FOR C_req_rec in C_orders_proj(C_rec.start_date, C_rec.end_date) LOOP
3697: IF (C_req_rec.start_date < C_rec.start_date) THEN

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

3710: l_start_date := trunc(C_req_rec.start_date);
3711: l_end_date := trunc(C_req_rec.end_date);
3712: END IF;
3713: END IF;
3714: cep_standard.debug('l_start_date_proj = ' || to_char(l_start_date, 'DD-MON-YYYY'));
3715: cep_standard.debug('l_end_date_proj = ' || to_char(l_end_date, 'DD-MON-YYYY'));
3716:
3717: l_amount := C_req_rec.per_day_amount * (l_end_date - l_start_date + 1);
3718:

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

3711: l_end_date := trunc(C_req_rec.end_date);
3712: END IF;
3713: END IF;
3714: cep_standard.debug('l_start_date_proj = ' || to_char(l_start_date, 'DD-MON-YYYY'));
3715: cep_standard.debug('l_end_date_proj = ' || to_char(l_end_date, 'DD-MON-YYYY'));
3716:
3717: l_amount := C_req_rec.per_day_amount * (l_end_date - l_start_date + 1);
3718:
3719: cep_standard.debug('per_day_amount_proj = ' || to_char(C_req_rec.per_day_amount));

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

3715: cep_standard.debug('l_end_date_proj = ' || to_char(l_end_date, 'DD-MON-YYYY'));
3716:
3717: l_amount := C_req_rec.per_day_amount * (l_end_date - l_start_date + 1);
3718:
3719: cep_standard.debug('per_day_amount_proj = ' || to_char(C_req_rec.per_day_amount));
3720: cep_standard.debug('l_amount_proj = ' || to_char(l_amount));
3721:
3722: IF(CE_CASH_FCST.G_rp_src_curr_type in ('E','F') AND
3723: C_req_rec.currency_code <> CE_CASH_FCST.G_rp_src_currency) THEN

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

3716:
3717: l_amount := C_req_rec.per_day_amount * (l_end_date - l_start_date + 1);
3718:
3719: cep_standard.debug('per_day_amount_proj = ' || to_char(C_req_rec.per_day_amount));
3720: cep_standard.debug('l_amount_proj = ' || to_char(l_amount));
3721:
3722: IF(CE_CASH_FCST.G_rp_src_curr_type in ('E','F') AND
3723: C_req_rec.currency_code <> CE_CASH_FCST.G_rp_src_currency) THEN
3724: l_amount := 0;

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

3722: IF(CE_CASH_FCST.G_rp_src_curr_type in ('E','F') AND
3723: C_req_rec.currency_code <> CE_CASH_FCST.G_rp_src_currency) THEN
3724: l_amount := 0;
3725: END IF;
3726: cep_standard.debug('currency_code_proj');
3727:
3728:
3729: IF(CE_CASH_FCST.G_authorization_status IS NOT NULL AND
3730: C_req_rec.status <> CE_CASH_FCST.G_authorization_status) THEN

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

3729: IF(CE_CASH_FCST.G_authorization_status IS NOT NULL AND
3730: C_req_rec.status <> CE_CASH_FCST.G_authorization_status) THEN
3731: l_amount := 0;
3732: END IF;
3733: cep_standard.debug('authorization_status_proj');
3734:
3735:
3736: IF(CE_CASH_FCST.G_payment_priority IS NOT NULL AND
3737: C_req_rec.payment_priority <> CE_CASH_FCST.G_payment_priority ) THEN

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

3736: IF(CE_CASH_FCST.G_payment_priority IS NOT NULL AND
3737: C_req_rec.payment_priority <> CE_CASH_FCST.G_payment_priority ) THEN
3738: l_amount := 0;
3739: END IF;
3740: cep_standard.debug('payment_priority_proj');
3741:
3742:
3743: IF(CE_CASH_FCST.G_pay_group IS NOT NULL AND
3744: C_req_rec.paygroup <> CE_CASH_FCST.G_pay_group) THEN

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

3743: IF(CE_CASH_FCST.G_pay_group IS NOT NULL AND
3744: C_req_rec.paygroup <> CE_CASH_FCST.G_pay_group) THEN
3745: l_amount := 0;
3746: END IF;
3747: cep_standard.debug('paygroup_proj');
3748:
3749:
3750: IF(CE_CASH_FCST.G_vendor_type IS NOT NULL AND
3751: C_req_rec.vendor_type <> CE_CASH_FCST.G_vendor_type) THEN

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

3750: IF(CE_CASH_FCST.G_vendor_type IS NOT NULL AND
3751: C_req_rec.vendor_type <> CE_CASH_FCST.G_vendor_type) THEN
3752: l_amount := 0;
3753: END IF;
3754: cep_standard.debug('vendor_type_proj');
3755:
3756: SELECT to_number(ORGANIZATION_ID)
3757: INTO l_legal_entity_id
3758: FROM hr_operating_units

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

3756: SELECT to_number(ORGANIZATION_ID)
3757: INTO l_legal_entity_id
3758: FROM hr_operating_units
3759: WHERE organization_id = C_req_rec.org_id;
3760: cep_standard.debug('legal_entity_id_proj');
3761:
3762: IF( (CE_CASH_FCST.G_org_id <> -1 AND CE_CASH_FCST.G_org_id <> -99) AND
3763: (nvl(C_req_rec.org_id,CE_CASH_FCST.G_org_id) <> CE_CASH_FCST.G_org_id) ) THEN
3764: l_amount := 0;

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

3762: IF( (CE_CASH_FCST.G_org_id <> -1 AND CE_CASH_FCST.G_org_id <> -99) AND
3763: (nvl(C_req_rec.org_id,CE_CASH_FCST.G_org_id) <> CE_CASH_FCST.G_org_id) ) THEN
3764: l_amount := 0;
3765: END IF;
3766: cep_standard.debug('org_id_proj');
3767:
3768: IF( CE_CASH_FCST.G_set_of_books_id IS NOT NULL AND
3769: CE_CASH_FCST.G_set_of_books_id <> -1) THEN
3770: OPEN C_sob(C_req_rec.org_id);

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

3774: l_amount := 0;
3775: END IF;
3776: CLOSE C_sob;
3777: END IF;
3778: cep_standard.debug('set_of_books_id_proj');
3779:
3780: IF( CE_CASH_FCST.G_rp_exchange_type IS NULL OR
3781: CE_CASH_FCST.G_rp_exchange_type <> 'User')THEN
3782: OPEN C_rate(C_req_rec.currency_code);

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

3789: l_rate := CE_CASH_FCST.G_rp_exchange_rate;
3790: ELSE
3791: l_rate := 1;
3792: END IF;
3793: cep_standard.debug('exchange_rate_proj');
3794:
3795: IF(CE_CASH_FCST.G_rp_amount_threshold IS NOT NULL) THEN
3796: IF (abs(l_amount) <= CE_CASH_FCST.G_rp_amount_threshold) THEN
3797: l_amount := 0;

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

3796: IF (abs(l_amount) <= CE_CASH_FCST.G_rp_amount_threshold) THEN
3797: l_amount := 0;
3798: END IF;
3799: END IF;
3800: cep_standard.debug('amount_threshold_proj');
3801:
3802: IF(C_rec.forecast_column_id = CE_CASH_FCST.G_overdue_column_id AND
3803: CE_CASH_FCST.G_invalid_overdue_row)THEN
3804: l_amount := 0;

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

3802: IF(C_rec.forecast_column_id = CE_CASH_FCST.G_overdue_column_id AND
3803: CE_CASH_FCST.G_invalid_overdue_row)THEN
3804: l_amount := 0;
3805: END IF;
3806: cep_standard.debug('OVERDUE_COLUMN_proj');
3807:
3808: IF (l_amount <> 0) THEN
3809: IF (C_req_rec.trx_end_date IS NULL and error_flag = FALSE) THEN
3810:

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

3821: 'CE_FC_POP_NO_END_DATE',
3822: error_msg);
3823: error_flag := TRUE;
3824: END IF;
3825: cep_standard.debug('error_message_proj');
3826:
3827: 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);
3828: END IF;
3829: END LOOP;

Line 3836: cep_standard.debug('<

3832: zero_fill_cells;
3833: END IF;
3834: END IF;
3835: END IF;
3836: cep_standard.debug('< 3837: EXCEPTION
3838: WHEN OTHERS THEN
3839: CEP_STANDARD.DEBUG('EXCEPTION:Build_PO_Orders_Query');
3840: raise;

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

3835: END IF;
3836: cep_standard.debug('< 3837: EXCEPTION
3838: WHEN OTHERS THEN
3839: CEP_STANDARD.DEBUG('EXCEPTION:Build_PO_Orders_Query');
3840: raise;
3841: END Build_PO_Orders_Query;
3842:
3843: /* ---------------------------------------------------------------------

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

3930:
3931:
3932: BEGIN
3933:
3934: cep_standard.debug('>>CE_CSH_FCAST_POP.Build_PO_Req_Query');
3935:
3936: select_clause := Get_Select_Clause;
3937: cep_standard.debug('Built Select Clause');
3938:

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

3933:
3934: cep_standard.debug('>>CE_CSH_FCAST_POP.Build_PO_Req_Query');
3935:
3936: select_clause := Get_Select_Clause;
3937: cep_standard.debug('Built Select Clause');
3938:
3939: from_clause := Get_From_Clause('ce_po_fc_requisitions_v');
3940: cep_standard.debug('Built From Clause');
3941:

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

3936: select_clause := Get_Select_Clause;
3937: cep_standard.debug('Built Select Clause');
3938:
3939: from_clause := Get_From_Clause('ce_po_fc_requisitions_v');
3940: cep_standard.debug('Built From Clause');
3941:
3942: where_clause := Get_Where_Clause || '
3943: AND src.trx_date BETWEEN cab.start_date - '
3944: ||to_char(CE_CASH_FCST.G_lead_time)||

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

3946: ||to_char(CE_CASH_FCST.G_lead_time)||
3947: Add_Where('AUTHORIZATION_STATUS') || Add_Where('PROJECT_ID');
3948:
3949:
3950: cep_standard.debug('Built Where Clause');
3951:
3952: main_query := select_clause || from_clause || where_clause;
3953:
3954: Execute_Main_Query (main_query);

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

3952: main_query := select_clause || from_clause || where_clause;
3953:
3954: Execute_Main_Query (main_query);
3955:
3956: cep_standard.debug('Execute_Main_Query');
3957:
3958: IF (CE_CASH_FCST.G_include_temp_labor_flag = 'Y') THEN
3959:
3960: populate_aging_buckets;

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

3964: FROM ce_forecast_ext_temp
3965: WHERE context_value = 'A'
3966: AND forecast_request_id = CE_CASH_FCST.G_forecast_id
3967: AND conversion_rate = CE_CASH_FCST.G_forecast_row_id;
3968: cep_standard.debug('l_max_end_date = ' || to_char(l_max_end_date, 'DD-MON-YYYY'));
3969:
3970: IF (CE_CASH_FCST.G_rp_project_id IS NULL) THEN
3971: cep_standard.debug('PROJECT_ID IS NULL');
3972:

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

3967: AND conversion_rate = CE_CASH_FCST.G_forecast_row_id;
3968: cep_standard.debug('l_max_end_date = ' || to_char(l_max_end_date, 'DD-MON-YYYY'));
3969:
3970: IF (CE_CASH_FCST.G_rp_project_id IS NULL) THEN
3971: cep_standard.debug('PROJECT_ID IS NULL');
3972:
3973: FOR C_rec IN C_period LOOP
3974: FOR C_req_rec in C_requisitions(C_rec.start_date, C_rec.end_date) LOOP
3975: IF (C_req_rec.start_date < C_rec.start_date) THEN

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

3988: l_start_date := trunc(C_req_rec.start_date);
3989: l_end_date := trunc(C_req_rec.end_date);
3990: END IF;
3991: END IF;
3992: cep_standard.debug('l_start_date = ' || to_char(l_start_date, 'DD-MON-YYYY'));
3993: cep_standard.debug('l_end_date = ' || to_char(l_end_date, 'DD-MON-YYYY'));
3994:
3995: l_amount := C_req_rec.per_day_amount * (l_end_date - l_start_date + 1);
3996:

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

3989: l_end_date := trunc(C_req_rec.end_date);
3990: END IF;
3991: END IF;
3992: cep_standard.debug('l_start_date = ' || to_char(l_start_date, 'DD-MON-YYYY'));
3993: cep_standard.debug('l_end_date = ' || to_char(l_end_date, 'DD-MON-YYYY'));
3994:
3995: l_amount := C_req_rec.per_day_amount * (l_end_date - l_start_date + 1);
3996:
3997: cep_standard.debug('per_day_amount = ' || to_char(C_req_rec.per_day_amount));

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

3993: cep_standard.debug('l_end_date = ' || to_char(l_end_date, 'DD-MON-YYYY'));
3994:
3995: l_amount := C_req_rec.per_day_amount * (l_end_date - l_start_date + 1);
3996:
3997: cep_standard.debug('per_day_amount = ' || to_char(C_req_rec.per_day_amount));
3998: cep_standard.debug('l_amount = ' || to_char(l_amount));
3999:
4000: IF(CE_CASH_FCST.G_rp_src_curr_type in ('E','F') AND
4001: C_req_rec.currency_code <> CE_CASH_FCST.G_rp_src_currency) THEN

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

3994:
3995: l_amount := C_req_rec.per_day_amount * (l_end_date - l_start_date + 1);
3996:
3997: cep_standard.debug('per_day_amount = ' || to_char(C_req_rec.per_day_amount));
3998: cep_standard.debug('l_amount = ' || to_char(l_amount));
3999:
4000: IF(CE_CASH_FCST.G_rp_src_curr_type in ('E','F') AND
4001: C_req_rec.currency_code <> CE_CASH_FCST.G_rp_src_currency) THEN
4002: l_amount := 0;

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

4000: IF(CE_CASH_FCST.G_rp_src_curr_type in ('E','F') AND
4001: C_req_rec.currency_code <> CE_CASH_FCST.G_rp_src_currency) THEN
4002: l_amount := 0;
4003: END IF;
4004: cep_standard.debug('currency_code');
4005:
4006: IF(CE_CASH_FCST.G_authorization_status IS NOT NULL AND
4007: C_req_rec.status <> CE_CASH_FCST.G_authorization_status) THEN
4008: l_amount := 0;

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

4006: IF(CE_CASH_FCST.G_authorization_status IS NOT NULL AND
4007: C_req_rec.status <> CE_CASH_FCST.G_authorization_status) THEN
4008: l_amount := 0;
4009: END IF;
4010: cep_standard.debug('authorization_status');
4011:
4012: SELECT to_number(ORGANIZATION_ID)
4013: INTO l_legal_entity_id
4014: FROM hr_operating_units

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

4012: SELECT to_number(ORGANIZATION_ID)
4013: INTO l_legal_entity_id
4014: FROM hr_operating_units
4015: WHERE organization_id = C_req_rec.org_id;
4016: cep_standard.debug('legal_entity_id');
4017:
4018: IF( (CE_CASH_FCST.G_org_id <> -1 AND CE_CASH_FCST.G_org_id <> -99) AND
4019: (nvl(C_req_rec.org_id, CE_CASH_FCST.G_org_id) <> CE_CASH_FCST.G_org_id) ) THEN
4020: l_amount := 0;

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

4018: IF( (CE_CASH_FCST.G_org_id <> -1 AND CE_CASH_FCST.G_org_id <> -99) AND
4019: (nvl(C_req_rec.org_id, CE_CASH_FCST.G_org_id) <> CE_CASH_FCST.G_org_id) ) THEN
4020: l_amount := 0;
4021: END IF;
4022: cep_standard.debug('org_id');
4023:
4024: IF( CE_CASH_FCST.G_set_of_books_id IS NOT NULL AND
4025: CE_CASH_FCST.G_set_of_books_id <> -1) THEN
4026: OPEN C_sob(C_req_rec.org_id);

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

4030: l_amount := 0;
4031: END IF;
4032: CLOSE C_sob;
4033: END IF;
4034: cep_standard.debug('set_of_books_id');
4035:
4036: IF( CE_CASH_FCST.G_rp_exchange_type IS NULL OR
4037: CE_CASH_FCST.G_rp_exchange_type <> 'User')THEN
4038: OPEN C_rate(C_req_rec.currency_code);

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

4045: l_rate := CE_CASH_FCST.G_rp_exchange_rate;
4046: ELSE
4047: l_rate := 1;
4048: END IF;
4049: cep_standard.debug('exchange_rate');
4050:
4051: IF(CE_CASH_FCST.G_rp_amount_threshold IS NOT NULL) THEN
4052: IF (abs(l_amount) <= CE_CASH_FCST.G_rp_amount_threshold) THEN
4053: l_amount := 0;

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

4052: IF (abs(l_amount) <= CE_CASH_FCST.G_rp_amount_threshold) THEN
4053: l_amount := 0;
4054: END IF;
4055: END IF;
4056: cep_standard.debug('amount_threshold');
4057:
4058: IF(C_rec.forecast_column_id = CE_CASH_FCST.G_overdue_column_id AND
4059: CE_CASH_FCST.G_invalid_overdue_row)THEN
4060: l_amount := 0;

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

4058: IF(C_rec.forecast_column_id = CE_CASH_FCST.G_overdue_column_id AND
4059: CE_CASH_FCST.G_invalid_overdue_row)THEN
4060: l_amount := 0;
4061: END IF;
4062: cep_standard.debug('OVERDUE_COLUMN');
4063:
4064: IF (l_amount <> 0) THEN
4065: IF (C_req_rec.trx_end_date IS NULL and error_flag = FALSE) THEN
4066:

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

4077: 'CE_FC_POR_NO_END_DATE',
4078: error_msg);
4079: error_flag := TRUE;
4080: END IF;
4081: cep_standard.debug('error_message');
4082:
4083: 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);
4084: END IF;
4085: cep_standard.debug('INSERT_FCAST_CELL');

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

4081: cep_standard.debug('error_message');
4082:
4083: 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);
4084: END IF;
4085: cep_standard.debug('INSERT_FCAST_CELL');
4086:
4087: END LOOP;
4088: END LOOP;
4089:

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

4090: clear_aging_buckets;
4091: zero_fill_cells;
4092:
4093: ELSE
4094: cep_standard.debug('PROJECT_ID NOT NULL');
4095:
4096: FOR C_rec IN C_period LOOP
4097: FOR C_req_rec in C_requisitions_proj(C_rec.start_date, C_rec.end_date) LOOP
4098: IF (C_req_rec.start_date < C_rec.start_date) THEN

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

4112: l_end_date := trunc(C_req_rec.end_date);
4113: END IF;
4114: END IF;
4115:
4116: cep_standard.debug('l_start_date_proj = ' || to_char(l_start_date, 'DD-MON-YYYY'));
4117: cep_standard.debug('l_end_date_proj = ' || to_char(l_end_date, 'DD-MON-YYYY'));
4118:
4119: l_amount := C_req_rec.per_day_amount * (l_end_date - l_start_date + 1);
4120:

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

4113: END IF;
4114: END IF;
4115:
4116: cep_standard.debug('l_start_date_proj = ' || to_char(l_start_date, 'DD-MON-YYYY'));
4117: cep_standard.debug('l_end_date_proj = ' || to_char(l_end_date, 'DD-MON-YYYY'));
4118:
4119: l_amount := C_req_rec.per_day_amount * (l_end_date - l_start_date + 1);
4120:
4121: cep_standard.debug('per_day_amount_proj = ' || to_char(C_req_rec.per_day_amount));

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

4117: cep_standard.debug('l_end_date_proj = ' || to_char(l_end_date, 'DD-MON-YYYY'));
4118:
4119: l_amount := C_req_rec.per_day_amount * (l_end_date - l_start_date + 1);
4120:
4121: cep_standard.debug('per_day_amount_proj = ' || to_char(C_req_rec.per_day_amount));
4122: cep_standard.debug('l_amount_proj = ' || to_char(l_amount));
4123:
4124: IF(CE_CASH_FCST.G_rp_src_curr_type in ('E','F') AND
4125: C_req_rec.currency_code <> CE_CASH_FCST.G_rp_src_currency) THEN

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

4118:
4119: l_amount := C_req_rec.per_day_amount * (l_end_date - l_start_date + 1);
4120:
4121: cep_standard.debug('per_day_amount_proj = ' || to_char(C_req_rec.per_day_amount));
4122: cep_standard.debug('l_amount_proj = ' || to_char(l_amount));
4123:
4124: IF(CE_CASH_FCST.G_rp_src_curr_type in ('E','F') AND
4125: C_req_rec.currency_code <> CE_CASH_FCST.G_rp_src_currency) THEN
4126: l_amount := 0;

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

4124: IF(CE_CASH_FCST.G_rp_src_curr_type in ('E','F') AND
4125: C_req_rec.currency_code <> CE_CASH_FCST.G_rp_src_currency) THEN
4126: l_amount := 0;
4127: END IF;
4128: cep_standard.debug('currency_code_proj');
4129:
4130: IF(CE_CASH_FCST.G_authorization_status IS NOT NULL AND
4131: C_req_rec.status <> CE_CASH_FCST.G_authorization_status) THEN
4132: l_amount := 0;

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

4130: IF(CE_CASH_FCST.G_authorization_status IS NOT NULL AND
4131: C_req_rec.status <> CE_CASH_FCST.G_authorization_status) THEN
4132: l_amount := 0;
4133: END IF;
4134: cep_standard.debug('authorization_status_proj');
4135:
4136: SELECT to_number(ORGANIZATION_ID)
4137: INTO l_legal_entity_id
4138: FROM hr_operating_units

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

4136: SELECT to_number(ORGANIZATION_ID)
4137: INTO l_legal_entity_id
4138: FROM hr_operating_units
4139: WHERE organization_id = C_req_rec.org_id;
4140: cep_standard.debug('legal_entity_id_proj');
4141:
4142: IF( (CE_CASH_FCST.G_org_id <> -1 AND CE_CASH_FCST.G_org_id <> -99) AND
4143: (nvl(C_req_rec.org_id, CE_CASH_FCST.G_org_id) <> CE_CASH_FCST.G_org_id) ) THEN
4144: l_amount := 0;

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

4142: IF( (CE_CASH_FCST.G_org_id <> -1 AND CE_CASH_FCST.G_org_id <> -99) AND
4143: (nvl(C_req_rec.org_id, CE_CASH_FCST.G_org_id) <> CE_CASH_FCST.G_org_id) ) THEN
4144: l_amount := 0;
4145: END IF;
4146: cep_standard.debug('org_id_proj');
4147:
4148: IF( CE_CASH_FCST.G_set_of_books_id IS NOT NULL AND
4149: CE_CASH_FCST.G_set_of_books_id <> -1) THEN
4150: OPEN C_sob(C_req_rec.org_id);

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

4154: l_amount := 0;
4155: END IF;
4156: CLOSE C_sob;
4157: END IF;
4158: cep_standard.debug('set_of_books_id_proj');
4159:
4160: IF( CE_CASH_FCST.G_rp_exchange_type IS NULL OR
4161: CE_CASH_FCST.G_rp_exchange_type <> 'User')THEN
4162: OPEN C_rate(C_req_rec.currency_code);

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

4169: l_rate := CE_CASH_FCST.G_rp_exchange_rate;
4170: ELSE
4171: l_rate := 1;
4172: END IF;
4173: cep_standard.debug('exchange_rate_proj');
4174:
4175: IF(CE_CASH_FCST.G_rp_amount_threshold IS NOT NULL) THEN
4176: IF (abs(l_amount) <= CE_CASH_FCST.G_rp_amount_threshold) THEN
4177: l_amount := 0;

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

4176: IF (abs(l_amount) <= CE_CASH_FCST.G_rp_amount_threshold) THEN
4177: l_amount := 0;
4178: END IF;
4179: END IF;
4180: cep_standard.debug('amount_threshold_proj');
4181:
4182: IF(C_rec.forecast_column_id = CE_CASH_FCST.G_overdue_column_id AND
4183: CE_CASH_FCST.G_invalid_overdue_row)THEN
4184: l_amount := 0;

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

4182: IF(C_rec.forecast_column_id = CE_CASH_FCST.G_overdue_column_id AND
4183: CE_CASH_FCST.G_invalid_overdue_row)THEN
4184: l_amount := 0;
4185: END IF;
4186: cep_standard.debug('OVERDUE_COLUMN_proj');
4187:
4188: IF (l_amount <> 0) THEN
4189: IF (C_req_rec.trx_end_date IS NULL and error_flag = FALSE) THEN
4190:

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

4201: 'CE_FC_POR_NO_END_DATE',
4202: error_msg);
4203: error_flag := TRUE;
4204: END IF;
4205: cep_standard.debug('error_message_proj');
4206:
4207: 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);
4208: cep_standard.debug('INSERT_FCAST_CELL_proj');
4209: END IF;

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

4204: END IF;
4205: cep_standard.debug('error_message_proj');
4206:
4207: 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);
4208: cep_standard.debug('INSERT_FCAST_CELL_proj');
4209: END IF;
4210:
4211: END LOOP;
4212: END LOOP;

Line 4220: cep_standard.debug('<

4216:
4217: END IF;
4218: END IF;
4219:
4220: cep_standard.debug('< 4221: EXCEPTION
4222: WHEN OTHERS THEN
4223: CEP_STANDARD.DEBUG('EXCEPTION:Build_PO_req_Query');
4224: raise;

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

4219:
4220: cep_standard.debug('< 4221: EXCEPTION
4222: WHEN OTHERS THEN
4223: CEP_STANDARD.DEBUG('EXCEPTION:Build_PO_req_Query');
4224: raise;
4225: END Build_PO_Req_Query ;
4226:
4227: /* ---------------------------------------------------------------------

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

4244: select_clause varchar2(1500);
4245: view_name VARCHAR2(50);
4246: main_query varchar2(3500) := null;
4247: BEGIN
4248: cep_standard.debug('>>Build_Sales_Fcst_Query');
4249: select_clause := Get_Select_Clause;
4250: cep_standard.debug('Built Select Clause');
4251:
4252: from_clause := Get_From_Clause ('ce_as_fc_sales_fcst_v');

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

4246: main_query varchar2(3500) := null;
4247: BEGIN
4248: cep_standard.debug('>>Build_Sales_Fcst_Query');
4249: select_clause := Get_Select_Clause;
4250: cep_standard.debug('Built Select Clause');
4251:
4252: from_clause := Get_From_Clause ('ce_as_fc_sales_fcst_v');
4253: cep_standard.debug('Built From Clause');
4254:

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

4249: select_clause := Get_Select_Clause;
4250: cep_standard.debug('Built Select Clause');
4251:
4252: from_clause := Get_From_Clause ('ce_as_fc_sales_fcst_v');
4253: cep_standard.debug('Built From Clause');
4254:
4255: where_clause := Get_Where_Clause || '
4256: AND src.trx_date BETWEEN cab.start_date - '
4257: ||to_char(CE_CASH_FCST.G_lead_time)||

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

4259: ||to_char(CE_CASH_FCST.G_lead_time)||
4260: ' AND NVL(src.win_probability, 0) >= ' ||to_char(CE_CASH_FCST.G_win_probability)||
4261: Add_Where('CHANNEL_CODE') || Add_Where('SALES_STAGE_ID') || Add_Where('SALES_FORECAST_STATUS');
4262:
4263: cep_standard.debug('Built Where Clause');
4264:
4265:
4266: main_query := select_clause || from_clause || where_clause;
4267: Execute_Main_Query (main_query);

Line 4269: cep_standard.debug('<

4265:
4266: main_query := select_clause || from_clause || where_clause;
4267: Execute_Main_Query (main_query);
4268:
4269: cep_standard.debug('< 4270: EXCEPTION
4271: WHEN OTHERS THEN
4272: cep_standard.debug('EXCEPTION:OTHERS-Build_Sales_Fcst_Query');
4273: raise;

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

4268:
4269: cep_standard.debug('< 4270: EXCEPTION
4271: WHEN OTHERS THEN
4272: cep_standard.debug('EXCEPTION:OTHERS-Build_Sales_Fcst_Query');
4273: raise;
4274: END Build_Sales_Fcst_Query ;
4275:
4276:

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

4301: main_query_1 varchar2(3500) := null;
4302: main_query_2 varchar2(3500) := null;
4303: main_query_3 varchar2(3500) := null;
4304: BEGIN
4305: cep_standard.debug('>>CE_CSH_FCAST_POP.Build_Sales_Order_Query');
4306:
4307: --select_clause := Get_Select_Clause;
4308: --cep_standard.debug('Built Select Clause');
4309:

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

4304: BEGIN
4305: cep_standard.debug('>>CE_CSH_FCAST_POP.Build_Sales_Order_Query');
4306:
4307: --select_clause := Get_Select_Clause;
4308: --cep_standard.debug('Built Select Clause');
4309:
4310: from_clause_1 := Get_From_Clause('ce_so_fc_orders_v');
4311: from_clause_2 := Get_From_Clause('ce_so_fc_orders_terms_v');
4312: from_clause_3 := Get_From_Clause('ce_so_fc_orders_no_terms_v');

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

4309:
4310: from_clause_1 := Get_From_Clause('ce_so_fc_orders_v');
4311: from_clause_2 := Get_From_Clause('ce_so_fc_orders_terms_v');
4312: from_clause_3 := Get_From_Clause('ce_so_fc_orders_no_terms_v');
4313: cep_standard.debug('Built From Clause');
4314:
4315: where_clause := Get_Where_Clause ||
4316: Add_Where('CUSTOMER_PROFILE_CLASS_ID') || Add_Where('PROJECT_ID')
4317: || Add_Where('ORDER_TYPE_ID');

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

4688: ' and cab.end_date - '
4689: ||to_char(CE_CASH_FCST.G_lead_time);
4690: END IF;
4691:
4692: cep_standard.debug('Built Select Clause');
4693: cep_standard.debug('Built Where Clause');
4694:
4695:
4696: main_query_1 := select_clause_1 || from_clause_1 || where_clause_1;

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

4689: ||to_char(CE_CASH_FCST.G_lead_time);
4690: END IF;
4691:
4692: cep_standard.debug('Built Select Clause');
4693: cep_standard.debug('Built Where Clause');
4694:
4695:
4696: main_query_1 := select_clause_1 || from_clause_1 || where_clause_1;
4697: main_query_2 := select_clause_2 || from_clause_2 || where_clause_2;

Line 4707: cep_standard.debug('<

4703: ELSE
4704: Execute_Main_Query (main_query_1);
4705: END IF;
4706:
4707: cep_standard.debug('< 4708: EXCEPTION
4709: WHEN OTHERS THEN
4710: CEP_STANDARD.DEBUG('EXCEPTION:Build_Sales_Order_Query');
4711: raise;

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

4706:
4707: cep_standard.debug('< 4708: EXCEPTION
4709: WHEN OTHERS THEN
4710: CEP_STANDARD.DEBUG('EXCEPTION:Build_Sales_Order_Query');
4711: raise;
4712: END Build_Sales_Order_Query ;
4713:
4714:

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

4796: Execute_Main_Query (main_query);
4797:
4798: EXCEPTION
4799: WHEN OTHERS THEN
4800: cep_standard.debug('EXCEPTION:OTHERS-Build_PA_Exp_Report_Query');
4801: RAISE;
4802: END Build_PA_Exp_Report_Query;
4803:
4804: /* ---------------------------------------------------------------------

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

4839: Build_PA_Exp_Report_Query;
4840: END IF;
4841: EXCEPTION
4842: WHEN OTHERS THEN
4843: cep_standard.debug('EXCEPTION:OTHERS-Build_Exp_Report_Query');
4844: RAISE;
4845: END Build_Exp_Report_Query;
4846:
4847:

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

4880: Execute_Main_Query (main_query);
4881:
4882: EXCEPTION
4883: WHEN OTHERS THEN
4884: cep_standard.debug('EXCEPTION:OTHERS-Build_PA_Trx_Query');
4885: RAISE;
4886: END Build_PA_Trx_Query;
4887:
4888: /* ---------------------------------------------------------------------

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

4966: Execute_Main_Query (main_query);
4967:
4968: EXCEPTION
4969: WHEN OTHERS THEN
4970: cep_standard.debug('EXCEPTION:OTHERS-Build_PA_Billing_Query');
4971: RAISE;
4972: END Build_PA_Billing_Query;
4973:
4974:

Line 5040: cep_standard.debug('>>CE_CSH_FCST_POP.Build_PA_Budget_Query');

5036: AND project_id = CE_CASH_FCST.G_rp_project_id
5037: AND budget_type_code = CE_CASH_FCST.G_budget_type;
5038:
5039: BEGIN
5040: cep_standard.debug('>>CE_CSH_FCST_POP.Build_PA_Budget_Query');
5041: -- initialize min_col and max_col
5042: populate_aging_buckets;
5043:
5044: cep_standard.debug('CE_CSH_FCST_POP.G_rp_project_id='||CE_CASH_FCST.G_rp_project_id

Line 5044: cep_standard.debug('CE_CSH_FCST_POP.G_rp_project_id='||CE_CASH_FCST.G_rp_project_id

5040: cep_standard.debug('>>CE_CSH_FCST_POP.Build_PA_Budget_Query');
5041: -- initialize min_col and max_col
5042: populate_aging_buckets;
5043:
5044: cep_standard.debug('CE_CSH_FCST_POP.G_rp_project_id='||CE_CASH_FCST.G_rp_project_id
5045: ||', CE_CASH_FCST.G_rp_src_curr_type='||CE_CASH_FCST.G_rp_src_curr_type
5046: ||', CE_CASH_FCST.G_rp_src_currency='||CE_CASH_FCST.G_rp_src_currency
5047: ||', CE_CASH_FCST.G_org_id='||CE_CASH_FCST.G_org_id
5048: ||', CE_CASH_FCST.G_rp_exchange_rate='||CE_CASH_FCST.G_rp_exchange_rate

Line 5062: cep_standard.debug('l_org_id='||l_org_id||'l_legal_entity_id,='||l_legal_entity_id);

5058: INTO l_legal_entity_id
5059: FROM hr_operating_units
5060: WHERE organization_id = l_org_id;
5061:
5062: cep_standard.debug('l_org_id='||l_org_id||'l_legal_entity_id,='||l_legal_entity_id);
5063:
5064: FOR C_rec IN C_period
5065: LOOP
5066: cep_standard.debug('forecast_column_id='||C_rec.forecast_column_id

Line 5066: cep_standard.debug('forecast_column_id='||C_rec.forecast_column_id

5062: cep_standard.debug('l_org_id='||l_org_id||'l_legal_entity_id,='||l_legal_entity_id);
5063:
5064: FOR C_rec IN C_period
5065: LOOP
5066: cep_standard.debug('forecast_column_id='||C_rec.forecast_column_id
5067: ||', C_rec.start_date='||to_char(C_rec.start_date,'dd-mon-yyyy hh24:mi:ss')
5068: ||', C_rec.end_date='||to_char(C_rec.end_date,'dd-mon-yyyy hh24:mi:ss'));
5069:
5070: FOR C_budget_rec in C_budgets(C_rec.start_date, C_rec.end_date)

Line 5072: cep_standard.debug('C_budget_rec.reference_id='||C_budget_rec.reference_id

5068: ||', C_rec.end_date='||to_char(C_rec.end_date,'dd-mon-yyyy hh24:mi:ss'));
5069:
5070: FOR C_budget_rec in C_budgets(C_rec.start_date, C_rec.end_date)
5071: LOOP
5072: cep_standard.debug('C_budget_rec.reference_id='||C_budget_rec.reference_id
5073: ||', C_budget_rec.projfunc_currency_code='||C_budget_rec.projfunc_currency_code);
5074: cep_standard.debug('C_budget_rec.per_day_raw_cost='||C_budget_rec.per_day_raw_cost
5075: ||', C_budget_rec.per_day_revenue='||C_budget_rec.per_day_revenue);
5076: cep_standard.debug(', C_budget_rec.start_date='||C_budget_rec.start_date

Line 5074: cep_standard.debug('C_budget_rec.per_day_raw_cost='||C_budget_rec.per_day_raw_cost

5070: FOR C_budget_rec in C_budgets(C_rec.start_date, C_rec.end_date)
5071: LOOP
5072: cep_standard.debug('C_budget_rec.reference_id='||C_budget_rec.reference_id
5073: ||', C_budget_rec.projfunc_currency_code='||C_budget_rec.projfunc_currency_code);
5074: cep_standard.debug('C_budget_rec.per_day_raw_cost='||C_budget_rec.per_day_raw_cost
5075: ||', C_budget_rec.per_day_revenue='||C_budget_rec.per_day_revenue);
5076: cep_standard.debug(', C_budget_rec.start_date='||C_budget_rec.start_date
5077: ||', C_budget_rec.end_date='||C_budget_rec.end_date);
5078:

Line 5076: cep_standard.debug(', C_budget_rec.start_date='||C_budget_rec.start_date

5072: cep_standard.debug('C_budget_rec.reference_id='||C_budget_rec.reference_id
5073: ||', C_budget_rec.projfunc_currency_code='||C_budget_rec.projfunc_currency_code);
5074: cep_standard.debug('C_budget_rec.per_day_raw_cost='||C_budget_rec.per_day_raw_cost
5075: ||', C_budget_rec.per_day_revenue='||C_budget_rec.per_day_revenue);
5076: cep_standard.debug(', C_budget_rec.start_date='||C_budget_rec.start_date
5077: ||', C_budget_rec.end_date='||C_budget_rec.end_date);
5078:
5079:
5080: IF (C_budget_rec.start_date < C_rec.start_date)

Line 5100: cep_standard.debug('l_start_date='||l_start_date||', l_end_date='||l_end_date);

5096: l_start_date := trunc(C_budget_rec.start_date);
5097: l_end_date := trunc(C_budget_rec.end_date);
5098: END IF;
5099: END IF;
5100: cep_standard.debug('l_start_date='||l_start_date||', l_end_date='||l_end_date);
5101:
5102: l_cost_amount := C_budget_rec.per_day_raw_cost * (l_end_date - l_start_date + 1);
5103: l_revenue_amount := C_budget_rec.per_day_revenue * (l_end_date - l_start_date + 1);
5104:

Line 5105: cep_standard.debug('l_cost_amount='||l_cost_amount);

5101:
5102: l_cost_amount := C_budget_rec.per_day_raw_cost * (l_end_date - l_start_date + 1);
5103: l_revenue_amount := C_budget_rec.per_day_revenue * (l_end_date - l_start_date + 1);
5104:
5105: cep_standard.debug('l_cost_amount='||l_cost_amount);
5106: cep_standard.debug('l_revenue_amount='||l_revenue_amount);
5107:
5108: IF(CE_CASH_FCST.G_rp_src_curr_type in ('E','F') AND
5109: C_budget_rec.projfunc_currency_code <> CE_CASH_FCST.G_rp_src_currency)

Line 5106: cep_standard.debug('l_revenue_amount='||l_revenue_amount);

5102: l_cost_amount := C_budget_rec.per_day_raw_cost * (l_end_date - l_start_date + 1);
5103: l_revenue_amount := C_budget_rec.per_day_revenue * (l_end_date - l_start_date + 1);
5104:
5105: cep_standard.debug('l_cost_amount='||l_cost_amount);
5106: cep_standard.debug('l_revenue_amount='||l_revenue_amount);
5107:
5108: IF(CE_CASH_FCST.G_rp_src_curr_type in ('E','F') AND
5109: C_budget_rec.projfunc_currency_code <> CE_CASH_FCST.G_rp_src_currency)
5110: THEN

Line 5111: cep_standard.debug('RS001: revenue/cost set to 0');

5107:
5108: IF(CE_CASH_FCST.G_rp_src_curr_type in ('E','F') AND
5109: C_budget_rec.projfunc_currency_code <> CE_CASH_FCST.G_rp_src_currency)
5110: THEN
5111: cep_standard.debug('RS001: revenue/cost set to 0');
5112: l_revenue_amount := 0;
5113: l_cost_amount := 0;
5114: END IF;
5115:

Line 5119: cep_standard.debug('RS002: revenue/cost set to 0');

5115:
5116: IF( (CE_CASH_FCST.G_org_id <> -1 AND CE_CASH_FCST.G_org_id <> -99) AND
5117: (nvl(l_org_id,CE_CASH_FCST.G_org_id) <> CE_CASH_FCST.G_org_id) )
5118: THEN
5119: cep_standard.debug('RS002: revenue/cost set to 0');
5120: l_revenue_amount := 0;
5121: l_cost_amount := 0;
5122: END IF;
5123:

Line 5127: cep_standard.debug('RS002: revenue/cost set per set of books');

5123:
5124: IF( CE_CASH_FCST.G_set_of_books_id IS NOT NULL AND
5125: CE_CASH_FCST.G_set_of_books_id <> -1)
5126: THEN
5127: cep_standard.debug('RS002: revenue/cost set per set of books');
5128: OPEN C_sob(l_org_id);
5129: FETCH C_sob INTO l_dummy;
5130: IF C_sob%NOTFOUND
5131: THEN

Line 5132: cep_standard.debug('RS002: C_sob NOTFOUND');

5128: OPEN C_sob(l_org_id);
5129: FETCH C_sob INTO l_dummy;
5130: IF C_sob%NOTFOUND
5131: THEN
5132: cep_standard.debug('RS002: C_sob NOTFOUND');
5133: CLOSE C_sob;
5134: l_revenue_amount := 0;
5135: l_cost_amount := 0;
5136: END IF;

Line 5147: cep_standard.debug('C_rate NOTFOUND');

5143: OPEN C_rate(C_budget_rec.projfunc_currency_code);
5144: FETCH C_rate INTO l_rate;
5145: IF C_rate%NOTFOUND
5146: THEN
5147: cep_standard.debug('C_rate NOTFOUND');
5148: l_rate := 1;
5149: END IF;
5150: CLOSE C_rate;
5151: ELSIF( CE_CASH_FCST.G_rp_exchange_type = 'User')

Line 5155: cep_standard.debug('No user rate');

5151: ELSIF( CE_CASH_FCST.G_rp_exchange_type = 'User')
5152: THEN
5153: l_rate := CE_CASH_FCST.G_rp_exchange_rate;
5154: ELSE
5155: cep_standard.debug('No user rate');
5156: l_rate := 1;
5157: END IF;
5158: cep_standard.debug('l_rate='||l_rate);
5159:

Line 5158: cep_standard.debug('l_rate='||l_rate);

5154: ELSE
5155: cep_standard.debug('No user rate');
5156: l_rate := 1;
5157: END IF;
5158: cep_standard.debug('l_rate='||l_rate);
5159:
5160: IF(CE_CASH_FCST.G_rp_amount_threshold IS NOT NULL)
5161: THEN
5162: IF (CE_CASH_FCST.G_trx_type = 'PAI')

Line 5166: cep_standard.debug('RS003a:revenue below threshold');

5162: IF (CE_CASH_FCST.G_trx_type = 'PAI')
5163: THEN
5164: IF (abs(l_revenue_amount) <= CE_CASH_FCST.G_rp_amount_threshold)
5165: THEN
5166: cep_standard.debug('RS003a:revenue below threshold');
5167: l_revenue_amount := 0;
5168: END IF;
5169: ELSE
5170: IF (abs(l_cost_amount) <= CE_CASH_FCST.G_rp_amount_threshold)

Line 5172: cep_standard.debug('RS003b:cost below threshold');

5168: END IF;
5169: ELSE
5170: IF (abs(l_cost_amount) <= CE_CASH_FCST.G_rp_amount_threshold)
5171: THEN
5172: cep_standard.debug('RS003b:cost below threshold');
5173: l_cost_amount := 0;
5174: END IF;
5175: END IF;
5176: END IF;

Line 5181: cep_standard.debug('RS004: revenue/cost column overdue');

5177:
5178: IF( C_rec.forecast_column_id = CE_CASH_FCST.G_overdue_column_id
5179: AND CE_CASH_FCST.G_invalid_overdue_row)
5180: THEN
5181: cep_standard.debug('RS004: revenue/cost column overdue');
5182: l_revenue_amount := 0;
5183: l_cost_amount := 0;
5184: END IF;
5185:

Line 5190: cep_standard.debug('inserting revenue_amount='||l_revenue_amount*l_rate);

5186: IF (CE_CASH_FCST.G_trx_type = 'PAI')
5187: THEN
5188: IF (l_revenue_amount <> 0)
5189: THEN
5190: cep_standard.debug('inserting revenue_amount='||l_revenue_amount*l_rate);
5191: Insert_Fcast_Cell(
5192: p_reference_id => C_budget_rec.reference_id,
5193: p_currency_code => C_budget_rec.projfunc_currency_code,
5194: p_org_id => l_legal_entity_id,

Line 5204: cep_standard.debug('inserting l_cost_amount='||to_char(-(l_cost_amount*l_rate)));

5200: END IF;
5201: ELSE
5202: IF (l_cost_amount <> 0)
5203: THEN
5204: cep_standard.debug('inserting l_cost_amount='||to_char(-(l_cost_amount*l_rate)));
5205: Insert_Fcast_Cell(
5206: p_reference_id => C_budget_rec.reference_id,
5207: p_currency_code => C_budget_rec.projfunc_currency_code,
5208: p_org_id => l_legal_entity_id,

Line 5221: cep_standard.debug('>>CE_CSH_FCST_POP.Build_PA_Budget_Query');

5217: END LOOP;
5218:
5219: clear_aging_buckets;
5220: zero_fill_cells;
5221: cep_standard.debug('>>CE_CSH_FCST_POP.Build_PA_Budget_Query');
5222:
5223: EXCEPTION
5224: WHEN OTHERS THEN
5225: cep_standard.debug('EXCEPTION:OTHERS-Build_PA_Budget_Query');

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

5221: cep_standard.debug('>>CE_CSH_FCST_POP.Build_PA_Budget_Query');
5222:
5223: EXCEPTION
5224: WHEN OTHERS THEN
5225: cep_standard.debug('EXCEPTION:OTHERS-Build_PA_Budget_Query');
5226: RAISE;
5227: END Build_PA_Budget_Query;
5228:
5229:

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

5315: Execute_Main_Query (main_query);
5316:
5317: EXCEPTION
5318: WHEN OTHERS THEN
5319: cep_standard.debug('EXCEPTION:OTHERS-Build_Treasury_Query');
5320: RAISE;
5321: END Build_Treasury_Query;
5322:
5323: /* ---------------------------------------------------------------------

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

5340: cursor_id INTEGER;
5341: exec_id INTEGER;
5342: error_msg VARCHAR2(2000);
5343: BEGIN
5344: cep_standard.debug('>>CE_CSH_FCAST_POP.Build_Remote_Query');
5345: --
5346: -- Get view and db information from the external source type
5347: --
5348: cep_standard.debug('Get database information for database: '||CE_CASH_FCST.G_external_source_type);

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

5344: cep_standard.debug('>>CE_CSH_FCAST_POP.Build_Remote_Query');
5345: --
5346: -- Get view and db information from the external source type
5347: --
5348: cep_standard.debug('Get database information for database: '||CE_CASH_FCST.G_external_source_type);
5349: BEGIN
5350:
5351: SELECT external_source_view, db_link_name
5352: INTO source_view, db_link

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

5354: WHERE external_source_type = CE_CASH_FCST.G_external_source_type;
5355:
5356: EXCEPTION
5357: WHEN NO_DATA_FOUND THEN
5358: cep_standard.debug('EXCEPTION:Build_Remote_Query - View def not found');
5359: FND_MESSAGE.set_name('CE','CE_FC_EXT_SOURCE_UNDEFINED');
5360: FND_MESSAGE.set_token('EXT_TYPE', CE_CASH_FCST.G_external_source_type);
5361: error_msg := FND_MESSAGE.get;
5362: CE_FORECAST_ERRORS_PKG.insert_row(CE_CASH_FCST.G_forecast_id, CE_CASH_FCST.G_rp_forecast_header_id,

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

5368:
5369: IF( db_link IS NOT NULL )THEN
5370: db_link := '@'||db_link;
5371: END IF;
5372: cep_standard.debug(' source_view = '||source_view||', db_link = '||db_link);
5373:
5374: main_query := '
5375: declare
5376: counter NUMBER;

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

5402: -- Store aging bucket information into aging table
5403: --
5404: counter := 1;
5405: open aging_cursor;
5406: cep_standard.debug(''Building aging information'');
5407: LOOP
5408: FETCH aging_cursor INTO aging_table(counter).column_id,
5409: aging_table(counter).start_date,
5410: aging_table(counter).end_date;

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

5410: aging_table(counter).end_date;
5411: EXIT WHEN aging_cursor%NOTFOUND or aging_cursor%NOTFOUND IS NULL;
5412: counter := counter + 1;
5413: END LOOP;
5414: cep_standard.debug(''counter for aging have '' || to_char(counter));
5415: close aging_cursor;
5416: aging_table.delete(counter);
5417: cep_standard.debug(''Done building aging information''); ';
5418: END IF;

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

5413: END LOOP;
5414: cep_standard.debug(''counter for aging have '' || to_char(counter));
5415: close aging_cursor;
5416: aging_table.delete(counter);
5417: cep_standard.debug(''Done building aging information''); ';
5418: END IF;
5419:
5420: main_query := main_query ||'
5421:

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

5423: -- Store conversion rate information into conversion table
5424: --
5425: counter := 1;
5426: open conversion_cursor;
5427: cep_standard.debug(''Building conversion information'');
5428: LOOP
5429: FETCH conversion_cursor INTO conversion_table(counter).from_currency_code,
5430: conversion_table(counter).conversion_rate;
5431: EXIT WHEN conversion_cursor%NOTFOUND or conversion_cursor%NOTFOUND IS NULL;

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

5432: counter := counter + 1;
5433: END LOOP;
5434: close conversion_cursor;
5435: conversion_table.delete(counter);
5436: cep_standard.debug(''Done building conversion information'');
5437:
5438: --
5439: -- Built query to be executed in the remote/local database
5440: --

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

5484: -- the cell table
5485: --
5486: FOR i IN 1 .. amount_table.count LOOP
5487: IF (CE_CASH_FCST.G_trx_type = ''OII'') THEN
5488: cep_standard.debug(''insert column_id = ''||to_char(amount_table(i).forecast_column_id)||'' with amount ''||
5489: to_char(amount_table(i).forecast_amount));
5490: 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);
5491: ELSE
5492: cep_standard.debug(''insert column_id = ''||to_char(amount_table(i).forecast_column_id)||'' with amount ''||

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

5488: cep_standard.debug(''insert column_id = ''||to_char(amount_table(i).forecast_column_id)||'' with amount ''||
5489: to_char(amount_table(i).forecast_amount));
5490: 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);
5491: ELSE
5492: cep_standard.debug(''insert column_id = ''||to_char(amount_table(i).forecast_column_id)||'' with amount ''||
5493: to_char(-(amount_table(i).forecast_amount)));
5494: 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);
5495: END IF;
5496: END LOOP;

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

5495: END IF;
5496: END LOOP;
5497: CE_CSH_FCST_POP.Zero_Fill_Cells;
5498: ELSIF( error_code = -1 )THEN
5499: cep_standard.debug(''Remote error: missing view'');
5500: FND_MESSAGE.set_name(''CE'', ''CE_FC_RMT_MISSING_VIEW_EXPT'');
5501: error_msg := FND_MESSAGE.get;
5502: CE_FORECAST_ERRORS_PKG.insert_row(CE_CASH_FCST.G_forecast_id, CE_CASH_FCST.G_rp_forecast_header_id,
5503: CE_CASH_FCST.G_forecast_row_id, ''CE_FC_RMT_MISSING_VIEW_EXPT'', error_msg);

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

5502: CE_FORECAST_ERRORS_PKG.insert_row(CE_CASH_FCST.G_forecast_id, CE_CASH_FCST.G_rp_forecast_header_id,
5503: CE_CASH_FCST.G_forecast_row_id, ''CE_FC_RMT_MISSING_VIEW_EXPT'', error_msg);
5504: return;
5505: ELSIF( error_code = -2 )THEN
5506: cep_standard.debug(''Remote error: invalid view'');
5507: FND_MESSAGE.set_name(''CE'', ''CE_FC_RMT_INVALID_VIEW_EXPT'');
5508: error_msg := FND_MESSAGE.get;
5509: CE_FORECAST_ERRORS_PKG.insert_row(CE_CASH_FCST.G_forecast_id, CE_CASH_FCST.G_rp_forecast_header_id,
5510: CE_CASH_FCST.G_forecast_row_id, ''CE_FC_RMT_INVALID_VIEW_EXPT'', error_msg);

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

5509: CE_FORECAST_ERRORS_PKG.insert_row(CE_CASH_FCST.G_forecast_id, CE_CASH_FCST.G_rp_forecast_header_id,
5510: CE_CASH_FCST.G_forecast_row_id, ''CE_FC_RMT_INVALID_VIEW_EXPT'', error_msg);
5511: return;
5512: ELSIF( error_code = -3 )THEN
5513: cep_standard.debug(''Remote error: others'');
5514: FND_MESSAGE.set_name(''CE'', ''CE_FC_RMT_EXCEPTION'');
5515: error_msg := FND_MESSAGE.get;
5516: CE_FORECAST_ERRORS_PKG.insert_row(CE_CASH_FCST.G_forecast_id, CE_CASH_FCST.G_rp_forecast_header_id,
5517: CE_CASH_FCST.G_forecast_row_id, ''CE_FC_RMT_EXCEPTION'', error_msg);

Line 5542: cep_standard.debug('<

5538: END;
5539:
5540: clear_aging_buckets;
5541:
5542: cep_standard.debug('< 5543: EXCEPTION
5544: WHEN OTHERS THEN
5545: clear_aging_buckets;
5546: cep_standard.debug('EXCEPTION:Build_Remote_Query');

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

5542: cep_standard.debug('< 5543: EXCEPTION
5544: WHEN OTHERS THEN
5545: clear_aging_buckets;
5546: cep_standard.debug('EXCEPTION:Build_Remote_Query');
5547: FND_MESSAGE.set_name('CE', 'CE_FC_RMT_EXCEPTION');
5548: error_msg := FND_MESSAGE.get;
5549: CE_FORECAST_ERRORS_PKG.insert_row(CE_CASH_FCST.G_forecast_id, CE_CASH_FCST.G_rp_forecast_header_id,
5550: CE_CASH_FCST.G_forecast_row_id, 'CE_FC_RMT_EXCEPTION', error_msg);

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

5575: --
5576: -- Based on the source_trx_type call the different procedures
5577: -- to build the queries dynamically
5578: --
5579: cep_standard.debug('>>CE_CSH_FCST_POP.Populate_Cells');
5580: IF (CE_CASH_FCST.G_trx_type = 'API')
5581: THEN
5582: Build_AP_Invoice_Query;
5583: ELSIF (CE_CASH_FCST.G_trx_type = 'APP' AND CE_CASH_FCST.G_rp_project_id IS NULL)

Line 5697: cep_standard.debug('<

5693: THEN
5694: Zero_Fill_Cells;
5695: END IF;
5696:
5697: cep_standard.debug('< 5698: END Populate_Cells;
5699:
5700:
5701: END CE_CSH_FCST_POP;