[Home] [Help]
50: from ce_forecast_rows
51: where forecast_header_id = X_forecast_header_id
52: order by row_number;
53: cursor cc is select forecast_column_id
54: from ce_forecast_columns
55: where forecast_header_id = X_forecast_header_id
56: order by column_number;
57: cid number;
58: rid number;
122: where r.forecast_header_id = X_forecast_header_id;
123:
124: select count(r.forecast_column_id)
125: into num_cols
126: from ce_forecast_columns r
127: where r.forecast_header_id = X_forecast_header_id;
128:
129: --
130: -- Create cells for the forecast
232: cep_standard.debug(' - insert new column');
233: --
234: -- Insert new column into column table
235: --
236: CE_FORECAST_COLUMNS_PKG.insert_row(
237: X_rowid => p_rowid,
238: X_forecast_column_id => X_forecast_column_id,
239: X_forecast_header_id => X_forecast_header_id,
240: X_column_number => X_column_number,
282: -- column to the new column for GLC
283: --
284: select developer_column_num
285: into p_developer_column_num
286: from ce_forecast_columns
287: where forecast_column_id = X_forecast_column_id;
288:
289: select forecast_column_id
290: into p_last_column_id
287: where forecast_column_id = X_forecast_column_id;
288:
289: select forecast_column_id
290: into p_last_column_id
291: from ce_forecast_columns
292: where forecast_header_id = X_forecast_header_id and
293: developer_column_num = p_developer_column_num-1;
294:
295: OPEN cr;
491: select distinct(forecast_row_id)
492: from ce_forecast_cells
493: where forecast_id = ffid;
494: cursor cc is select forecast_column_id
495: from ce_forecast_columns
496: where forecast_header_id = X_header_id;
497: p_rowid varchar2(100);
498: cid number;
499: rid number;
558: END;
559:
560: PROCEDURE rearrange_column_number( X_forecast_header_id NUMBER ) IS
561: CURSOR cc IS select forecast_column_id
562: from ce_forecast_columns
563: where forecast_header_id = X_forecast_header_id
564: and column_number <> 0
565: order by column_number;
566: cid NUMBER;
571: loop
572: fetch cc into cid;
573: n := n + 1;
574: EXIT WHEN cc%NOTFOUND or cc%NOTFOUND IS NULL;
575: UPDATE ce_forecast_columns
576: SET developer_column_num = n
577: WHERE forecast_column_id = cid;
578: end loop;
579: close cc;
607: FROM CE_FORECAST_HEADERS
608: WHERE forecast_header_id = X_forecast_header_id;
609: HdrInfo CH%ROWTYPE;
610: CURSOR CC IS SELECT *
611: FROM CE_FORECAST_COLUMNS
612: WHERE forecast_header_id = X_forecast_header_id
613: AND developer_column_num <> 0;
614: ColInfo CC%ROWTYPE;
615: CURSOR CR IS SELECT *
685: WHILE (CC%FOUND) LOOP
686: cep_standard.debug(' - insert column, hid = '||to_char(p_forecast_header_id)||', col num= '
687: ||to_char(ColInfo.column_number));
688: cid := NULL;
689: CE_FORECAST_COLUMNS_PKG.insert_row(
690: X_rowid => p_rowid,
691: X_forecast_column_id => cid,
692: X_forecast_header_id => p_forecast_header_id,
693: X_column_number => ColInfo.column_number,