DBA Data[Home] [Help]

APPS.OZF_FORECAST_UTIL_PVT dependencies on OZF_ACT_FORECASTS_ALL

Line 154: FROM ozf_act_forecasts_all

150:
151: -- inanaiah: R12 - for offer_code
152: /* CURSOR base_quantity_type_csr IS
153: SELECT base_quantity_type, offer_code
154: FROM ozf_act_forecasts_all
155: WHERE forecast_id = p_forecast_id;
156:
157: CURSOR offerid_csr(p_offer_code IN VARCHAR2) IS
158: SELECT qp_list_header_id --offer_id

Line 1860: FROM ozf_act_forecasts_all

1856:
1857: --inanaiah: base_quantity_ref used for Offer_code basis
1858: CURSOR get_offerCPcomb IS
1859: SELECT base_quantity_ref, offer_code
1860: FROM ozf_act_forecasts_all
1861: WHERE forecast_id = p_forecast_id;
1862:
1863: CURSOR offerid_csr(p_offer_code IN VARCHAR2) IS
1864: SELECT qp_list_header_id --offer_id

Line 1883: l_base_quantity_ref ozf_act_forecasts_all.BASE_QUANTITY_REF%TYPE;

1879:
1880: --- l_base_quantity_ref NUMBER; --- its varchar2 (08/25/2005)
1881: -- l_base_quantity_type NUMBER; --- its varchar2 (08/25/2005)
1882:
1883: l_base_quantity_ref ozf_act_forecasts_all.BASE_QUANTITY_REF%TYPE;
1884:
1885: l_offer_code VARCHAR2(30);
1886: l_obj_id NUMBER := p_obj_id;
1887:

Line 2264: UPDATE ozf_act_forecasts_all

2260:
2261: --R12 Baseline
2262: IF (p_base_quantity_type <> 'BASELINE')
2263: THEN
2264: UPDATE ozf_act_forecasts_all
2265: SET dimention2 = NULL,
2266: dimention3 = NULL
2267: WHERE forecast_id = p_forecast_id ;
2268: END IF;

Line 2505: FROM OZF_ACT_FORECASTS_ALL

2501: BASE_QUANTITY_END_DATE,
2502: INCREMENT_QUOTA,
2503: FORECAST_UOM_CODE,
2504: LAST_SCENARIO_ID
2505: FROM OZF_ACT_FORECASTS_ALL
2506: WHERE FORECAST_ID = l_fcst_id;
2507:
2508: CURSOR c_wkst_fcst_rec IS
2509: SELECT

Line 2519: FROM ozf_act_forecasts_all a,

2515: trunc(b.end_date_active) wkst_end_date_active,
2516: a.INCREMENT_QUOTA,
2517: a.forecast_uom_code,
2518: a.LAST_SCENARIO_ID
2519: FROM ozf_act_forecasts_all a,
2520: ozf_worksheet_headers_b b
2521: WHERE a.FORECAST_ID = p_forecast_id
2522: AND b.worksheet_header_id = NVL(p_obj_id, b.worksheet_header_id)
2523: AND a.arc_act_fcast_used_by = NVL(p_obj_type, 'WKST')

Line 2578: l_period_level OZF_ACT_FORECASTS_ALL.period_level%TYPE;

2574: l_qualifier_grouping_no NUMBER;
2575: l_period_number NUMBER;
2576: l_previous_fact_id NUMBER ;
2577: l_root_fact_id NUMBER;
2578: l_period_level OZF_ACT_FORECASTS_ALL.period_level%TYPE;
2579: l_base_quantity_type OZF_ACT_FORECASTS_ALL.base_quantity_type%TYPE;
2580: l_base_quantity_ref OZF_ACT_FORECASTS_ALL.base_quantity_ref%TYPE;
2581: l_forecast_spread_type OZF_ACT_FORECASTS_ALL.forecast_spread_type%TYPE;
2582: l_base_quantity_start_date OZF_ACT_FORECASTS_ALL.base_quantity_start_date%TYPE;

Line 2579: l_base_quantity_type OZF_ACT_FORECASTS_ALL.base_quantity_type%TYPE;

2575: l_period_number NUMBER;
2576: l_previous_fact_id NUMBER ;
2577: l_root_fact_id NUMBER;
2578: l_period_level OZF_ACT_FORECASTS_ALL.period_level%TYPE;
2579: l_base_quantity_type OZF_ACT_FORECASTS_ALL.base_quantity_type%TYPE;
2580: l_base_quantity_ref OZF_ACT_FORECASTS_ALL.base_quantity_ref%TYPE;
2581: l_forecast_spread_type OZF_ACT_FORECASTS_ALL.forecast_spread_type%TYPE;
2582: l_base_quantity_start_date OZF_ACT_FORECASTS_ALL.base_quantity_start_date%TYPE;
2583: l_base_quantity_end_date OZF_ACT_FORECASTS_ALL.base_quantity_end_date%TYPE;

Line 2580: l_base_quantity_ref OZF_ACT_FORECASTS_ALL.base_quantity_ref%TYPE;

2576: l_previous_fact_id NUMBER ;
2577: l_root_fact_id NUMBER;
2578: l_period_level OZF_ACT_FORECASTS_ALL.period_level%TYPE;
2579: l_base_quantity_type OZF_ACT_FORECASTS_ALL.base_quantity_type%TYPE;
2580: l_base_quantity_ref OZF_ACT_FORECASTS_ALL.base_quantity_ref%TYPE;
2581: l_forecast_spread_type OZF_ACT_FORECASTS_ALL.forecast_spread_type%TYPE;
2582: l_base_quantity_start_date OZF_ACT_FORECASTS_ALL.base_quantity_start_date%TYPE;
2583: l_base_quantity_end_date OZF_ACT_FORECASTS_ALL.base_quantity_end_date%TYPE;
2584: l_increment_quota OZF_ACT_FORECASTS_ALL.increment_quota%TYPE;

Line 2581: l_forecast_spread_type OZF_ACT_FORECASTS_ALL.forecast_spread_type%TYPE;

2577: l_root_fact_id NUMBER;
2578: l_period_level OZF_ACT_FORECASTS_ALL.period_level%TYPE;
2579: l_base_quantity_type OZF_ACT_FORECASTS_ALL.base_quantity_type%TYPE;
2580: l_base_quantity_ref OZF_ACT_FORECASTS_ALL.base_quantity_ref%TYPE;
2581: l_forecast_spread_type OZF_ACT_FORECASTS_ALL.forecast_spread_type%TYPE;
2582: l_base_quantity_start_date OZF_ACT_FORECASTS_ALL.base_quantity_start_date%TYPE;
2583: l_base_quantity_end_date OZF_ACT_FORECASTS_ALL.base_quantity_end_date%TYPE;
2584: l_increment_quota OZF_ACT_FORECASTS_ALL.increment_quota%TYPE;
2585: l_forecast_uom_code OZF_ACT_FORECASTS_ALL.forecast_uom_code%TYPE;

Line 2582: l_base_quantity_start_date OZF_ACT_FORECASTS_ALL.base_quantity_start_date%TYPE;

2578: l_period_level OZF_ACT_FORECASTS_ALL.period_level%TYPE;
2579: l_base_quantity_type OZF_ACT_FORECASTS_ALL.base_quantity_type%TYPE;
2580: l_base_quantity_ref OZF_ACT_FORECASTS_ALL.base_quantity_ref%TYPE;
2581: l_forecast_spread_type OZF_ACT_FORECASTS_ALL.forecast_spread_type%TYPE;
2582: l_base_quantity_start_date OZF_ACT_FORECASTS_ALL.base_quantity_start_date%TYPE;
2583: l_base_quantity_end_date OZF_ACT_FORECASTS_ALL.base_quantity_end_date%TYPE;
2584: l_increment_quota OZF_ACT_FORECASTS_ALL.increment_quota%TYPE;
2585: l_forecast_uom_code OZF_ACT_FORECASTS_ALL.forecast_uom_code%TYPE;
2586: l_last_scenario_id OZF_ACT_FORECASTS_ALL.last_scenario_id%TYPE;

Line 2583: l_base_quantity_end_date OZF_ACT_FORECASTS_ALL.base_quantity_end_date%TYPE;

2579: l_base_quantity_type OZF_ACT_FORECASTS_ALL.base_quantity_type%TYPE;
2580: l_base_quantity_ref OZF_ACT_FORECASTS_ALL.base_quantity_ref%TYPE;
2581: l_forecast_spread_type OZF_ACT_FORECASTS_ALL.forecast_spread_type%TYPE;
2582: l_base_quantity_start_date OZF_ACT_FORECASTS_ALL.base_quantity_start_date%TYPE;
2583: l_base_quantity_end_date OZF_ACT_FORECASTS_ALL.base_quantity_end_date%TYPE;
2584: l_increment_quota OZF_ACT_FORECASTS_ALL.increment_quota%TYPE;
2585: l_forecast_uom_code OZF_ACT_FORECASTS_ALL.forecast_uom_code%TYPE;
2586: l_last_scenario_id OZF_ACT_FORECASTS_ALL.last_scenario_id%TYPE;
2587: l_trade_tactic_id1 NUMBER;

Line 2584: l_increment_quota OZF_ACT_FORECASTS_ALL.increment_quota%TYPE;

2580: l_base_quantity_ref OZF_ACT_FORECASTS_ALL.base_quantity_ref%TYPE;
2581: l_forecast_spread_type OZF_ACT_FORECASTS_ALL.forecast_spread_type%TYPE;
2582: l_base_quantity_start_date OZF_ACT_FORECASTS_ALL.base_quantity_start_date%TYPE;
2583: l_base_quantity_end_date OZF_ACT_FORECASTS_ALL.base_quantity_end_date%TYPE;
2584: l_increment_quota OZF_ACT_FORECASTS_ALL.increment_quota%TYPE;
2585: l_forecast_uom_code OZF_ACT_FORECASTS_ALL.forecast_uom_code%TYPE;
2586: l_last_scenario_id OZF_ACT_FORECASTS_ALL.last_scenario_id%TYPE;
2587: l_trade_tactic_id1 NUMBER;
2588: l_trade_tactic_id2 NUMBER;

Line 2585: l_forecast_uom_code OZF_ACT_FORECASTS_ALL.forecast_uom_code%TYPE;

2581: l_forecast_spread_type OZF_ACT_FORECASTS_ALL.forecast_spread_type%TYPE;
2582: l_base_quantity_start_date OZF_ACT_FORECASTS_ALL.base_quantity_start_date%TYPE;
2583: l_base_quantity_end_date OZF_ACT_FORECASTS_ALL.base_quantity_end_date%TYPE;
2584: l_increment_quota OZF_ACT_FORECASTS_ALL.increment_quota%TYPE;
2585: l_forecast_uom_code OZF_ACT_FORECASTS_ALL.forecast_uom_code%TYPE;
2586: l_last_scenario_id OZF_ACT_FORECASTS_ALL.last_scenario_id%TYPE;
2587: l_trade_tactic_id1 NUMBER;
2588: l_trade_tactic_id2 NUMBER;
2589: l_trade_tactic_id3 NUMBER;

Line 2586: l_last_scenario_id OZF_ACT_FORECASTS_ALL.last_scenario_id%TYPE;

2582: l_base_quantity_start_date OZF_ACT_FORECASTS_ALL.base_quantity_start_date%TYPE;
2583: l_base_quantity_end_date OZF_ACT_FORECASTS_ALL.base_quantity_end_date%TYPE;
2584: l_increment_quota OZF_ACT_FORECASTS_ALL.increment_quota%TYPE;
2585: l_forecast_uom_code OZF_ACT_FORECASTS_ALL.forecast_uom_code%TYPE;
2586: l_last_scenario_id OZF_ACT_FORECASTS_ALL.last_scenario_id%TYPE;
2587: l_trade_tactic_id1 NUMBER;
2588: l_trade_tactic_id2 NUMBER;
2589: l_trade_tactic_id3 NUMBER;
2590: l_trade_tactic_id4 NUMBER;

Line 3033: FROM OZF_ACT_FORECASTS_ALL

3029: BASE_QUANTITY_END_DATE,
3030: INCREMENT_QUOTA,
3031: FORECAST_UOM_CODE,
3032: LAST_SCENARIO_ID
3033: FROM OZF_ACT_FORECASTS_ALL
3034: WHERE FORECAST_ID = l_fcst_id;
3035:
3036: CURSOR c_wkst_fcst_rec IS
3037: SELECT

Line 3050: FROM ozf_act_forecasts_all a,

3046: trunc(b.end_date_active) wkst_end_date_active,
3047: a.INCREMENT_QUOTA,
3048: a.forecast_uom_code,
3049: a.LAST_SCENARIO_ID
3050: FROM ozf_act_forecasts_all a,
3051: ozf_worksheet_headers_b b
3052: WHERE a.FORECAST_ID = p_forecast_id
3053: AND b.worksheet_header_id = NVL(p_obj_id, b.worksheet_header_id)
3054: AND a.arc_act_fcast_used_by = NVL(p_obj_type, 'WKST')

Line 3162: l_period_level OZF_ACT_FORECASTS_ALL.period_level%TYPE;

3158: l_qualifier_grouping_no NUMBER;
3159: l_period_number NUMBER;
3160: l_previous_fact_id NUMBER ;
3161: l_root_fact_id NUMBER;
3162: l_period_level OZF_ACT_FORECASTS_ALL.period_level%TYPE;
3163: l_base_quantity_type OZF_ACT_FORECASTS_ALL.base_quantity_type%TYPE;
3164: l_base_quantity_ref OZF_ACT_FORECASTS_ALL.base_quantity_ref%TYPE;
3165: l_forecast_spread_type OZF_ACT_FORECASTS_ALL.forecast_spread_type%TYPE;
3166: l_dimention1 OZF_ACT_FORECASTS_ALL.dimention1%TYPE;

Line 3163: l_base_quantity_type OZF_ACT_FORECASTS_ALL.base_quantity_type%TYPE;

3159: l_period_number NUMBER;
3160: l_previous_fact_id NUMBER ;
3161: l_root_fact_id NUMBER;
3162: l_period_level OZF_ACT_FORECASTS_ALL.period_level%TYPE;
3163: l_base_quantity_type OZF_ACT_FORECASTS_ALL.base_quantity_type%TYPE;
3164: l_base_quantity_ref OZF_ACT_FORECASTS_ALL.base_quantity_ref%TYPE;
3165: l_forecast_spread_type OZF_ACT_FORECASTS_ALL.forecast_spread_type%TYPE;
3166: l_dimention1 OZF_ACT_FORECASTS_ALL.dimention1%TYPE;
3167: l_dimention2 OZF_ACT_FORECASTS_ALL.dimention2%TYPE;

Line 3164: l_base_quantity_ref OZF_ACT_FORECASTS_ALL.base_quantity_ref%TYPE;

3160: l_previous_fact_id NUMBER ;
3161: l_root_fact_id NUMBER;
3162: l_period_level OZF_ACT_FORECASTS_ALL.period_level%TYPE;
3163: l_base_quantity_type OZF_ACT_FORECASTS_ALL.base_quantity_type%TYPE;
3164: l_base_quantity_ref OZF_ACT_FORECASTS_ALL.base_quantity_ref%TYPE;
3165: l_forecast_spread_type OZF_ACT_FORECASTS_ALL.forecast_spread_type%TYPE;
3166: l_dimention1 OZF_ACT_FORECASTS_ALL.dimention1%TYPE;
3167: l_dimention2 OZF_ACT_FORECASTS_ALL.dimention2%TYPE;
3168: l_dimention3 OZF_ACT_FORECASTS_ALL.dimention3%TYPE;

Line 3165: l_forecast_spread_type OZF_ACT_FORECASTS_ALL.forecast_spread_type%TYPE;

3161: l_root_fact_id NUMBER;
3162: l_period_level OZF_ACT_FORECASTS_ALL.period_level%TYPE;
3163: l_base_quantity_type OZF_ACT_FORECASTS_ALL.base_quantity_type%TYPE;
3164: l_base_quantity_ref OZF_ACT_FORECASTS_ALL.base_quantity_ref%TYPE;
3165: l_forecast_spread_type OZF_ACT_FORECASTS_ALL.forecast_spread_type%TYPE;
3166: l_dimention1 OZF_ACT_FORECASTS_ALL.dimention1%TYPE;
3167: l_dimention2 OZF_ACT_FORECASTS_ALL.dimention2%TYPE;
3168: l_dimention3 OZF_ACT_FORECASTS_ALL.dimention3%TYPE;
3169: l_base_quantity_start_date OZF_ACT_FORECASTS_ALL.base_quantity_start_date%TYPE;

Line 3166: l_dimention1 OZF_ACT_FORECASTS_ALL.dimention1%TYPE;

3162: l_period_level OZF_ACT_FORECASTS_ALL.period_level%TYPE;
3163: l_base_quantity_type OZF_ACT_FORECASTS_ALL.base_quantity_type%TYPE;
3164: l_base_quantity_ref OZF_ACT_FORECASTS_ALL.base_quantity_ref%TYPE;
3165: l_forecast_spread_type OZF_ACT_FORECASTS_ALL.forecast_spread_type%TYPE;
3166: l_dimention1 OZF_ACT_FORECASTS_ALL.dimention1%TYPE;
3167: l_dimention2 OZF_ACT_FORECASTS_ALL.dimention2%TYPE;
3168: l_dimention3 OZF_ACT_FORECASTS_ALL.dimention3%TYPE;
3169: l_base_quantity_start_date OZF_ACT_FORECASTS_ALL.base_quantity_start_date%TYPE;
3170: l_base_quantity_end_date OZF_ACT_FORECASTS_ALL.base_quantity_end_date%TYPE;

Line 3167: l_dimention2 OZF_ACT_FORECASTS_ALL.dimention2%TYPE;

3163: l_base_quantity_type OZF_ACT_FORECASTS_ALL.base_quantity_type%TYPE;
3164: l_base_quantity_ref OZF_ACT_FORECASTS_ALL.base_quantity_ref%TYPE;
3165: l_forecast_spread_type OZF_ACT_FORECASTS_ALL.forecast_spread_type%TYPE;
3166: l_dimention1 OZF_ACT_FORECASTS_ALL.dimention1%TYPE;
3167: l_dimention2 OZF_ACT_FORECASTS_ALL.dimention2%TYPE;
3168: l_dimention3 OZF_ACT_FORECASTS_ALL.dimention3%TYPE;
3169: l_base_quantity_start_date OZF_ACT_FORECASTS_ALL.base_quantity_start_date%TYPE;
3170: l_base_quantity_end_date OZF_ACT_FORECASTS_ALL.base_quantity_end_date%TYPE;
3171: l_increment_quota OZF_ACT_FORECASTS_ALL.increment_quota%TYPE;

Line 3168: l_dimention3 OZF_ACT_FORECASTS_ALL.dimention3%TYPE;

3164: l_base_quantity_ref OZF_ACT_FORECASTS_ALL.base_quantity_ref%TYPE;
3165: l_forecast_spread_type OZF_ACT_FORECASTS_ALL.forecast_spread_type%TYPE;
3166: l_dimention1 OZF_ACT_FORECASTS_ALL.dimention1%TYPE;
3167: l_dimention2 OZF_ACT_FORECASTS_ALL.dimention2%TYPE;
3168: l_dimention3 OZF_ACT_FORECASTS_ALL.dimention3%TYPE;
3169: l_base_quantity_start_date OZF_ACT_FORECASTS_ALL.base_quantity_start_date%TYPE;
3170: l_base_quantity_end_date OZF_ACT_FORECASTS_ALL.base_quantity_end_date%TYPE;
3171: l_increment_quota OZF_ACT_FORECASTS_ALL.increment_quota%TYPE;
3172: l_forecast_uom_code OZF_ACT_FORECASTS_ALL.forecast_uom_code%TYPE;

Line 3169: l_base_quantity_start_date OZF_ACT_FORECASTS_ALL.base_quantity_start_date%TYPE;

3165: l_forecast_spread_type OZF_ACT_FORECASTS_ALL.forecast_spread_type%TYPE;
3166: l_dimention1 OZF_ACT_FORECASTS_ALL.dimention1%TYPE;
3167: l_dimention2 OZF_ACT_FORECASTS_ALL.dimention2%TYPE;
3168: l_dimention3 OZF_ACT_FORECASTS_ALL.dimention3%TYPE;
3169: l_base_quantity_start_date OZF_ACT_FORECASTS_ALL.base_quantity_start_date%TYPE;
3170: l_base_quantity_end_date OZF_ACT_FORECASTS_ALL.base_quantity_end_date%TYPE;
3171: l_increment_quota OZF_ACT_FORECASTS_ALL.increment_quota%TYPE;
3172: l_forecast_uom_code OZF_ACT_FORECASTS_ALL.forecast_uom_code%TYPE;
3173: l_last_scenario_id OZF_ACT_FORECASTS_ALL.last_scenario_id%TYPE;

Line 3170: l_base_quantity_end_date OZF_ACT_FORECASTS_ALL.base_quantity_end_date%TYPE;

3166: l_dimention1 OZF_ACT_FORECASTS_ALL.dimention1%TYPE;
3167: l_dimention2 OZF_ACT_FORECASTS_ALL.dimention2%TYPE;
3168: l_dimention3 OZF_ACT_FORECASTS_ALL.dimention3%TYPE;
3169: l_base_quantity_start_date OZF_ACT_FORECASTS_ALL.base_quantity_start_date%TYPE;
3170: l_base_quantity_end_date OZF_ACT_FORECASTS_ALL.base_quantity_end_date%TYPE;
3171: l_increment_quota OZF_ACT_FORECASTS_ALL.increment_quota%TYPE;
3172: l_forecast_uom_code OZF_ACT_FORECASTS_ALL.forecast_uom_code%TYPE;
3173: l_last_scenario_id OZF_ACT_FORECASTS_ALL.last_scenario_id%TYPE;
3174: l_tpr_percent NUMBER;

Line 3171: l_increment_quota OZF_ACT_FORECASTS_ALL.increment_quota%TYPE;

3167: l_dimention2 OZF_ACT_FORECASTS_ALL.dimention2%TYPE;
3168: l_dimention3 OZF_ACT_FORECASTS_ALL.dimention3%TYPE;
3169: l_base_quantity_start_date OZF_ACT_FORECASTS_ALL.base_quantity_start_date%TYPE;
3170: l_base_quantity_end_date OZF_ACT_FORECASTS_ALL.base_quantity_end_date%TYPE;
3171: l_increment_quota OZF_ACT_FORECASTS_ALL.increment_quota%TYPE;
3172: l_forecast_uom_code OZF_ACT_FORECASTS_ALL.forecast_uom_code%TYPE;
3173: l_last_scenario_id OZF_ACT_FORECASTS_ALL.last_scenario_id%TYPE;
3174: l_tpr_percent NUMBER;
3175: l_baseline_sales NUMBER;

Line 3172: l_forecast_uom_code OZF_ACT_FORECASTS_ALL.forecast_uom_code%TYPE;

3168: l_dimention3 OZF_ACT_FORECASTS_ALL.dimention3%TYPE;
3169: l_base_quantity_start_date OZF_ACT_FORECASTS_ALL.base_quantity_start_date%TYPE;
3170: l_base_quantity_end_date OZF_ACT_FORECASTS_ALL.base_quantity_end_date%TYPE;
3171: l_increment_quota OZF_ACT_FORECASTS_ALL.increment_quota%TYPE;
3172: l_forecast_uom_code OZF_ACT_FORECASTS_ALL.forecast_uom_code%TYPE;
3173: l_last_scenario_id OZF_ACT_FORECASTS_ALL.last_scenario_id%TYPE;
3174: l_tpr_percent NUMBER;
3175: l_baseline_sales NUMBER;
3176: l_incremental_sales NUMBER;

Line 3173: l_last_scenario_id OZF_ACT_FORECASTS_ALL.last_scenario_id%TYPE;

3169: l_base_quantity_start_date OZF_ACT_FORECASTS_ALL.base_quantity_start_date%TYPE;
3170: l_base_quantity_end_date OZF_ACT_FORECASTS_ALL.base_quantity_end_date%TYPE;
3171: l_increment_quota OZF_ACT_FORECASTS_ALL.increment_quota%TYPE;
3172: l_forecast_uom_code OZF_ACT_FORECASTS_ALL.forecast_uom_code%TYPE;
3173: l_last_scenario_id OZF_ACT_FORECASTS_ALL.last_scenario_id%TYPE;
3174: l_tpr_percent NUMBER;
3175: l_baseline_sales NUMBER;
3176: l_incremental_sales NUMBER;
3177: l_node_id NUMBER;

Line 3434: UPDATE ozf_act_forecasts_all outer

3430: WHERE inner.arc_act_metric_used_by = 'FCST'
3431: AND inner.act_metric_used_by_id = p_forecast_id
3432: AND inner.activity_metric_fact_id = p_activity_metric_fact_id;
3433:
3434: UPDATE ozf_act_forecasts_all outer
3435: SET outer.forecast_quantity = outer.forecast_quantity + (l_new_incremental_sales - l_orig_incremental_sales)
3436: WHERE outer.forecast_id = p_forecast_id;
3437:
3438: ELSIF p_obj_type = 'WKST'

Line 3532: FROM OZF_ACT_FORECASTS_ALL a, ozf_offers b

3528: a.INCREMENT_QUOTA,
3529: a.FORECAST_UOM_CODE,
3530: a.LAST_SCENARIO_ID,
3531: b.transaction_currency_code
3532: FROM OZF_ACT_FORECASTS_ALL a, ozf_offers b
3533: WHERE a.FORECAST_ID = p_forecast_id
3534: AND a.arc_act_fcast_used_by = p_obj_type
3535: AND a.act_fcast_used_by_id = p_obj_id
3536: AND b.qp_list_header_id = a.act_fcast_used_by_id;

Line 3553: FROM ozf_act_forecasts_all a,

3549: a.INCREMENT_QUOTA,
3550: a.forecast_uom_code,
3551: a.LAST_SCENARIO_ID,
3552: b.currency_code
3553: FROM ozf_act_forecasts_all a,
3554: ozf_worksheet_headers_b b
3555: WHERE a.FORECAST_ID = p_forecast_id
3556: AND b.worksheet_header_id = NVL(p_obj_id, b.worksheet_header_id)
3557: AND a.arc_act_fcast_used_by = NVL(p_obj_type, 'WKST')

Line 3666: l_period_level OZF_ACT_FORECASTS_ALL.period_level%TYPE;

3662: l_qualifier_grouping_no NUMBER;
3663: l_period_number NUMBER;
3664: l_previous_fact_id NUMBER ;
3665: l_root_fact_id NUMBER;
3666: l_period_level OZF_ACT_FORECASTS_ALL.period_level%TYPE;
3667: l_base_quantity_type OZF_ACT_FORECASTS_ALL.base_quantity_type%TYPE;
3668: l_base_quantity_ref OZF_ACT_FORECASTS_ALL.base_quantity_ref%TYPE;
3669: l_forecast_spread_type OZF_ACT_FORECASTS_ALL.forecast_spread_type%TYPE;
3670: l_dimention1 OZF_ACT_FORECASTS_ALL.dimention1%TYPE;

Line 3667: l_base_quantity_type OZF_ACT_FORECASTS_ALL.base_quantity_type%TYPE;

3663: l_period_number NUMBER;
3664: l_previous_fact_id NUMBER ;
3665: l_root_fact_id NUMBER;
3666: l_period_level OZF_ACT_FORECASTS_ALL.period_level%TYPE;
3667: l_base_quantity_type OZF_ACT_FORECASTS_ALL.base_quantity_type%TYPE;
3668: l_base_quantity_ref OZF_ACT_FORECASTS_ALL.base_quantity_ref%TYPE;
3669: l_forecast_spread_type OZF_ACT_FORECASTS_ALL.forecast_spread_type%TYPE;
3670: l_dimention1 OZF_ACT_FORECASTS_ALL.dimention1%TYPE;
3671: l_dimention2 OZF_ACT_FORECASTS_ALL.dimention2%TYPE;

Line 3668: l_base_quantity_ref OZF_ACT_FORECASTS_ALL.base_quantity_ref%TYPE;

3664: l_previous_fact_id NUMBER ;
3665: l_root_fact_id NUMBER;
3666: l_period_level OZF_ACT_FORECASTS_ALL.period_level%TYPE;
3667: l_base_quantity_type OZF_ACT_FORECASTS_ALL.base_quantity_type%TYPE;
3668: l_base_quantity_ref OZF_ACT_FORECASTS_ALL.base_quantity_ref%TYPE;
3669: l_forecast_spread_type OZF_ACT_FORECASTS_ALL.forecast_spread_type%TYPE;
3670: l_dimention1 OZF_ACT_FORECASTS_ALL.dimention1%TYPE;
3671: l_dimention2 OZF_ACT_FORECASTS_ALL.dimention2%TYPE;
3672: l_dimention3 OZF_ACT_FORECASTS_ALL.dimention3%TYPE;

Line 3669: l_forecast_spread_type OZF_ACT_FORECASTS_ALL.forecast_spread_type%TYPE;

3665: l_root_fact_id NUMBER;
3666: l_period_level OZF_ACT_FORECASTS_ALL.period_level%TYPE;
3667: l_base_quantity_type OZF_ACT_FORECASTS_ALL.base_quantity_type%TYPE;
3668: l_base_quantity_ref OZF_ACT_FORECASTS_ALL.base_quantity_ref%TYPE;
3669: l_forecast_spread_type OZF_ACT_FORECASTS_ALL.forecast_spread_type%TYPE;
3670: l_dimention1 OZF_ACT_FORECASTS_ALL.dimention1%TYPE;
3671: l_dimention2 OZF_ACT_FORECASTS_ALL.dimention2%TYPE;
3672: l_dimention3 OZF_ACT_FORECASTS_ALL.dimention3%TYPE;
3673: l_base_quantity_start_date OZF_ACT_FORECASTS_ALL.base_quantity_start_date%TYPE;

Line 3670: l_dimention1 OZF_ACT_FORECASTS_ALL.dimention1%TYPE;

3666: l_period_level OZF_ACT_FORECASTS_ALL.period_level%TYPE;
3667: l_base_quantity_type OZF_ACT_FORECASTS_ALL.base_quantity_type%TYPE;
3668: l_base_quantity_ref OZF_ACT_FORECASTS_ALL.base_quantity_ref%TYPE;
3669: l_forecast_spread_type OZF_ACT_FORECASTS_ALL.forecast_spread_type%TYPE;
3670: l_dimention1 OZF_ACT_FORECASTS_ALL.dimention1%TYPE;
3671: l_dimention2 OZF_ACT_FORECASTS_ALL.dimention2%TYPE;
3672: l_dimention3 OZF_ACT_FORECASTS_ALL.dimention3%TYPE;
3673: l_base_quantity_start_date OZF_ACT_FORECASTS_ALL.base_quantity_start_date%TYPE;
3674: l_base_quantity_end_date OZF_ACT_FORECASTS_ALL.base_quantity_end_date%TYPE;

Line 3671: l_dimention2 OZF_ACT_FORECASTS_ALL.dimention2%TYPE;

3667: l_base_quantity_type OZF_ACT_FORECASTS_ALL.base_quantity_type%TYPE;
3668: l_base_quantity_ref OZF_ACT_FORECASTS_ALL.base_quantity_ref%TYPE;
3669: l_forecast_spread_type OZF_ACT_FORECASTS_ALL.forecast_spread_type%TYPE;
3670: l_dimention1 OZF_ACT_FORECASTS_ALL.dimention1%TYPE;
3671: l_dimention2 OZF_ACT_FORECASTS_ALL.dimention2%TYPE;
3672: l_dimention3 OZF_ACT_FORECASTS_ALL.dimention3%TYPE;
3673: l_base_quantity_start_date OZF_ACT_FORECASTS_ALL.base_quantity_start_date%TYPE;
3674: l_base_quantity_end_date OZF_ACT_FORECASTS_ALL.base_quantity_end_date%TYPE;
3675: l_increment_quota OZF_ACT_FORECASTS_ALL.increment_quota%TYPE;

Line 3672: l_dimention3 OZF_ACT_FORECASTS_ALL.dimention3%TYPE;

3668: l_base_quantity_ref OZF_ACT_FORECASTS_ALL.base_quantity_ref%TYPE;
3669: l_forecast_spread_type OZF_ACT_FORECASTS_ALL.forecast_spread_type%TYPE;
3670: l_dimention1 OZF_ACT_FORECASTS_ALL.dimention1%TYPE;
3671: l_dimention2 OZF_ACT_FORECASTS_ALL.dimention2%TYPE;
3672: l_dimention3 OZF_ACT_FORECASTS_ALL.dimention3%TYPE;
3673: l_base_quantity_start_date OZF_ACT_FORECASTS_ALL.base_quantity_start_date%TYPE;
3674: l_base_quantity_end_date OZF_ACT_FORECASTS_ALL.base_quantity_end_date%TYPE;
3675: l_increment_quota OZF_ACT_FORECASTS_ALL.increment_quota%TYPE;
3676: l_forecast_uom_code OZF_ACT_FORECASTS_ALL.forecast_uom_code%TYPE;

Line 3673: l_base_quantity_start_date OZF_ACT_FORECASTS_ALL.base_quantity_start_date%TYPE;

3669: l_forecast_spread_type OZF_ACT_FORECASTS_ALL.forecast_spread_type%TYPE;
3670: l_dimention1 OZF_ACT_FORECASTS_ALL.dimention1%TYPE;
3671: l_dimention2 OZF_ACT_FORECASTS_ALL.dimention2%TYPE;
3672: l_dimention3 OZF_ACT_FORECASTS_ALL.dimention3%TYPE;
3673: l_base_quantity_start_date OZF_ACT_FORECASTS_ALL.base_quantity_start_date%TYPE;
3674: l_base_quantity_end_date OZF_ACT_FORECASTS_ALL.base_quantity_end_date%TYPE;
3675: l_increment_quota OZF_ACT_FORECASTS_ALL.increment_quota%TYPE;
3676: l_forecast_uom_code OZF_ACT_FORECASTS_ALL.forecast_uom_code%TYPE;
3677: l_last_scenario_id OZF_ACT_FORECASTS_ALL.last_scenario_id%TYPE;

Line 3674: l_base_quantity_end_date OZF_ACT_FORECASTS_ALL.base_quantity_end_date%TYPE;

3670: l_dimention1 OZF_ACT_FORECASTS_ALL.dimention1%TYPE;
3671: l_dimention2 OZF_ACT_FORECASTS_ALL.dimention2%TYPE;
3672: l_dimention3 OZF_ACT_FORECASTS_ALL.dimention3%TYPE;
3673: l_base_quantity_start_date OZF_ACT_FORECASTS_ALL.base_quantity_start_date%TYPE;
3674: l_base_quantity_end_date OZF_ACT_FORECASTS_ALL.base_quantity_end_date%TYPE;
3675: l_increment_quota OZF_ACT_FORECASTS_ALL.increment_quota%TYPE;
3676: l_forecast_uom_code OZF_ACT_FORECASTS_ALL.forecast_uom_code%TYPE;
3677: l_last_scenario_id OZF_ACT_FORECASTS_ALL.last_scenario_id%TYPE;
3678: l_tpr_percent NUMBER;

Line 3675: l_increment_quota OZF_ACT_FORECASTS_ALL.increment_quota%TYPE;

3671: l_dimention2 OZF_ACT_FORECASTS_ALL.dimention2%TYPE;
3672: l_dimention3 OZF_ACT_FORECASTS_ALL.dimention3%TYPE;
3673: l_base_quantity_start_date OZF_ACT_FORECASTS_ALL.base_quantity_start_date%TYPE;
3674: l_base_quantity_end_date OZF_ACT_FORECASTS_ALL.base_quantity_end_date%TYPE;
3675: l_increment_quota OZF_ACT_FORECASTS_ALL.increment_quota%TYPE;
3676: l_forecast_uom_code OZF_ACT_FORECASTS_ALL.forecast_uom_code%TYPE;
3677: l_last_scenario_id OZF_ACT_FORECASTS_ALL.last_scenario_id%TYPE;
3678: l_tpr_percent NUMBER;
3679: l_baseline_sales NUMBER;

Line 3676: l_forecast_uom_code OZF_ACT_FORECASTS_ALL.forecast_uom_code%TYPE;

3672: l_dimention3 OZF_ACT_FORECASTS_ALL.dimention3%TYPE;
3673: l_base_quantity_start_date OZF_ACT_FORECASTS_ALL.base_quantity_start_date%TYPE;
3674: l_base_quantity_end_date OZF_ACT_FORECASTS_ALL.base_quantity_end_date%TYPE;
3675: l_increment_quota OZF_ACT_FORECASTS_ALL.increment_quota%TYPE;
3676: l_forecast_uom_code OZF_ACT_FORECASTS_ALL.forecast_uom_code%TYPE;
3677: l_last_scenario_id OZF_ACT_FORECASTS_ALL.last_scenario_id%TYPE;
3678: l_tpr_percent NUMBER;
3679: l_baseline_sales NUMBER;
3680: l_incremental_sales NUMBER;

Line 3677: l_last_scenario_id OZF_ACT_FORECASTS_ALL.last_scenario_id%TYPE;

3673: l_base_quantity_start_date OZF_ACT_FORECASTS_ALL.base_quantity_start_date%TYPE;
3674: l_base_quantity_end_date OZF_ACT_FORECASTS_ALL.base_quantity_end_date%TYPE;
3675: l_increment_quota OZF_ACT_FORECASTS_ALL.increment_quota%TYPE;
3676: l_forecast_uom_code OZF_ACT_FORECASTS_ALL.forecast_uom_code%TYPE;
3677: l_last_scenario_id OZF_ACT_FORECASTS_ALL.last_scenario_id%TYPE;
3678: l_tpr_percent NUMBER;
3679: l_baseline_sales NUMBER;
3680: l_incremental_sales NUMBER;
3681:

Line 4115: UPDATE ozf_act_forecasts_all outer

4111:
4112:
4113: --- NOW, ROLLUP all numbers FOR FORECAST Header LEVEL
4114: --- Also, Make Sure that dimentions are updated to default selection
4115: UPDATE ozf_act_forecasts_all outer
4116: SET (outer.forecast_quantity, outer.base_quantity) =
4117: ( SELECT (NVL(SUM(inner.baseline_sales),0) + NVL(SUM(inner.incremental_sales),0)) total_forecast,
4118: NVL(SUM(inner.baseline_sales),0) baseline_sales
4119: FROM ozf_act_metric_facts_all inner

Line 4181: FROM ozf_act_forecasts_all a,

4177: a.base_quantity_type, /* LAST_YEAR_SAME_PERIOD, OFFER_CODE, CUSTOM_DATE_RANGE */
4178: a.base_quantity_start_date,
4179: a.base_quantity_end_date,
4180: a.base_quantity_ref /* OFFER_CODE or BASELINE SOURCE */
4181: FROM ozf_act_forecasts_all a,
4182: ozf_worksheet_headers_b b
4183: WHERE b.worksheet_header_id = NVL(p_worksheet_header_id, b.worksheet_header_id)
4184: AND a.arc_act_fcast_used_by = 'WKST'
4185: AND a.act_fcast_used_by_id = b.worksheet_header_id

Line 4507: UPDATE ozf_act_forecasts_all

4503: RAISE FND_API.g_exc_unexpected_error;
4504: END IF;
4505:
4506:
4507: UPDATE ozf_act_forecasts_all
4508: SET base_quantity = ( SELECT NVL(SUM(base_quantity),0)
4509: FROM ozf_act_metric_facts_all
4510: WHERE arc_act_metric_used_by = 'FCST'
4511: AND act_metric_used_by_id = l_forecast_id

Line 4649: FROM ozf_act_forecasts_all

4645: base_quantity_end_date,
4646: base_quantity_ref, /* Third party*/
4647: last_scenario_id,
4648: offer_code
4649: FROM ozf_act_forecasts_all
4650: WHERE forecast_id = l_fcst_id;
4651:
4652: CURSOR offer_dates_csr(p_offer_code IN VARCHAR2) IS
4653: SELECT NVL(qp.start_date_active,trunc(SYSDATE)) start_date_active,

Line 5078: UPDATE ozf_act_forecasts_all

5074: --R12 Baseline
5075: IF (p_base_quantity_type <> 'BASELINE')
5076: THEN
5077: --dbms_output.put_line( ' -- 6 -- ' || l_base_sales);
5078: UPDATE ozf_act_forecasts_all
5079: SET base_quantity = ROUND(NVL(l_base_sales,0)),
5080: dimention1 = p_dimention,
5081: base_quantity_ref = x_fcst_return_rec.spread_count -- base_quantity_ref used in OFFER_CODE basis
5082: WHERE forecast_id = l_forecast_id;

Line 5253: UPDATE ozf_act_forecasts_all

5249: IF l_fcst_uom <> FND_PROFILE.VALUE('OZF_FORECAST_DEFAULT_UOM')
5250: THEN
5251: NULL;
5252: /*
5253: UPDATE ozf_act_forecasts_all
5254: SET base_quantity = ROUND(NVL(l_base_sales,0))
5255: WHERE forecast_id = p_forecast_id;
5256: */
5257: END IF;

Line 5467: UPDATE ozf_act_forecasts_all

5463: l_one_f_quan := l_one_f_quan + record_l_one.fact_value;
5464:
5465: END LOOP;
5466:
5467: UPDATE ozf_act_forecasts_all
5468: SET FORECAST_REMAINING_QUANTITY = forecast_quantity - l_one_f_quan
5469: WHERE forecast_id = p_forecast_id;
5470:
5471:

Line 5603: UPDATE ozf_act_forecasts_all

5599: l_one_f_quan := l_one_f_quan + record_l_one.incremental_sales;
5600:
5601: END LOOP;
5602:
5603: UPDATE ozf_act_forecasts_all
5604: SET FORECAST_REMAINING_QUANTITY = forecast_quantity - base_quantity - l_one_f_quan
5605: WHERE forecast_id = p_forecast_id;
5606:
5607:

Line 5647: FROM ozf_act_forecasts_all

5643: IS
5644:
5645: CURSOR C_FcstRecord(p_fcast_id IN NUMBER) IS
5646: SELECT forecast_remaining_quantity
5647: FROM ozf_act_forecasts_all
5648: WHERE forecast_id = p_fcast_id;
5649:
5650: CURSOR C_LevelOneRecords(p_fcast_id IN NUMBER) IS
5651: SELECT activity_metric_fact_id, fact_type, forecast_remaining_quantity

Line 5809: SELECT ozf_act_forecasts_all_s.NEXTVAL

5805: IS
5806:
5807: -- cursor to generate new Forecast ID's
5808: CURSOR c_act_forecast_id IS
5809: SELECT ozf_act_forecasts_all_s.NEXTVAL
5810: FROM dual;
5811:
5812: -- cursor to generate new Activity Metric ID's
5813: CURSOR c_act_metric_id IS

Line 5928: -- Insert a new forecast record in the ozf_act_forecasts_all table taking the given forecastId as input

5924: END IF;
5925: x_return_status := FND_API.g_ret_sts_success;
5926:
5927:
5928: -- Insert a new forecast record in the ozf_act_forecasts_all table taking the given forecastId as input
5929: OPEN c_act_forecast_id;
5930: FETCH c_act_forecast_id INTO l_forecast_id;
5931: CLOSE c_act_forecast_id;
5932:

Line 5933: INSERT INTO ozf_act_forecasts_all

5929: OPEN c_act_forecast_id;
5930: FETCH c_act_forecast_id INTO l_forecast_id;
5931: CLOSE c_act_forecast_id;
5932:
5933: INSERT INTO ozf_act_forecasts_all
5934: (forecast_id
5935: ,forecast_type
5936: ,arc_act_fcast_used_by
5937: ,act_fcast_used_by_id

Line 6023: FROM ozf_act_forecasts_all a

6019: ,a.base_quantity_start_date
6020: ,a.base_quantity_end_date
6021: ,a.base_quantity_ref
6022: ,a.offer_code
6023: FROM ozf_act_forecasts_all a
6024: WHERE forecast_id = p_forecast_id;
6025:
6026:
6027: -- Insert a new activity metric record in the ozf_act_metrics_all table taking the given forecastId as input

Line 7005: FROM ozf_act_forecasts_all

7001:
7002: /* Commented for now (since values retrieved in Java class
7003: SELECT forecast_quantity, forward_buy_quantity, forecast_remaining_quantity
7004: INTO l_parent_fact_value, l_parent_fwd_buy_qty, l_fcst_remaining_quantity
7005: FROM ozf_act_forecasts_all
7006: WHERE forecast_id = p_fcast_id;
7007: */
7008:
7009: SELECT forecast_remaining_quantity

Line 7011: FROM ozf_act_forecasts_all

7007: */
7008:
7009: SELECT forecast_remaining_quantity
7010: INTO l_fcst_remaining_quantity
7011: FROM ozf_act_forecasts_all
7012: WHERE forecast_id = p_fcast_id;
7013:
7014: /* Commented for now (since values retrieved in Java class
7015: IF ( (p_fcast_value = l_parent_fact_value) AND (p_fwd_buy_value = l_parent_fwd_buy_qty) ) THEN

Line 7288: FROM ozf_act_metric_facts_all a, ozf_act_forecasts_all b

7284: a.root_fact_id,
7285: b.base_quantity overall_base_quantity,
7286: b.forecast_quantity overall_forecast_quantity,
7287: b.forward_buy_quantity overall_fwd_buy_qty
7288: FROM ozf_act_metric_facts_all a, ozf_act_forecasts_all b
7289: WHERE a.arc_act_metric_used_by = 'FCST'
7290: AND a.act_metric_used_by_id = p_used_by_id
7291: AND a.previous_fact_id IS NULL
7292: AND b.forecast_id = a.act_metric_used_by_id

Line 8041: l_fcst_uom OZF_ACT_FORECASTS_ALL.forecast_uom_code%TYPE;

8037: l_obj_id NUMBER;
8038: l_product_attribute_context ozf_forecast_dimentions.product_attribute_context%TYPE;
8039: l_product_attribute ozf_forecast_dimentions.product_attribute%TYPE;
8040: l_product_attr_value ozf_forecast_dimentions.product_attr_value%TYPE;
8041: l_fcst_uom OZF_ACT_FORECASTS_ALL.forecast_uom_code%TYPE;
8042: l_currency_code ozf_worksheet_headers_b.currency_code%TYPE;
8043: l_price_list_id NUMBER;
8044: l_forecast_id NUMBER;
8045:

Line 8071: OZF_ACT_FORECASTS_ALL fcst,

8067: l_price_list_id ,
8068: l_forecast_id
8069: FROM
8070: ozf_act_metric_facts_all fact,
8071: OZF_ACT_FORECASTS_ALL fcst,
8072: ozf_forecast_dimentions dim,
8073: ozf_worksheet_headers_b wkst
8074: WHERE
8075: fact.activity_metric_fact_id = p_activity_metric_fact_id

Line 8343: l_fcst_uom OZF_ACT_FORECASTS_ALL.forecast_uom_code%TYPE;

8339: l_obj_id NUMBER;
8340: l_product_attribute_context ozf_forecast_dimentions.product_attribute_context%TYPE;
8341: l_product_attribute ozf_forecast_dimentions.product_attribute%TYPE;
8342: l_product_attr_value ozf_forecast_dimentions.product_attr_value%TYPE;
8343: l_fcst_uom OZF_ACT_FORECASTS_ALL.forecast_uom_code%TYPE;
8344: l_currency_code ozf_worksheet_headers_b.currency_code%TYPE;
8345: l_price_list_id NUMBER;
8346:
8347:

Line 8370: OZF_ACT_FORECASTS_ALL fcst,

8366: l_currency_code ,
8367: l_price_list_id
8368: FROM
8369: ozf_act_metric_facts_all fact,
8370: OZF_ACT_FORECASTS_ALL fcst,
8371: ozf_forecast_dimentions dim,
8372: ozf_worksheet_headers_b wkst
8373: WHERE
8374: fact.activity_metric_fact_id = p_activity_metric_fact_id

Line 8450: FROM ozf_act_forecasts_all a

8446:
8447: CURSOR c_fcst_info IS
8448: SELECT a.forecast_uom_code,
8449: a.price_list_id
8450: FROM ozf_act_forecasts_all a
8451: WHERE a.forecast_id = p_forecast_id ;
8452:
8453: CURSOR c_type_of_offer IS
8454: SELECT offer_type

Line 8771: FROM ozf_act_forecasts_all a

8767:
8768: CURSOR c_fcst_info IS
8769: SELECT a.forecast_uom_code,
8770: a.price_list_id
8771: FROM ozf_act_forecasts_all a
8772: WHERE a.forecast_id = p_forecast_id ;
8773:
8774: CURSOR c_offer_type IS
8775: SELECT min(b.offer_type) offer_type,

Line 9432: ozf_act_forecasts_all b

9428: SELECT a.offer_type,
9429: nvl(a.transaction_currency_code,a.fund_request_curr_code),
9430: b.forecast_spread_type
9431: FROM ozf_offers a,
9432: ozf_act_forecasts_all b
9433: WHERE b.forecast_id = p_used_by_id
9434: AND DECODE(b.arc_act_fcast_used_by,'OFFR',b.act_fcast_used_by_id,-99)
9435: = a.qp_list_header_id(+);
9436:

Line 9533: ozf_act_forecasts_all fcst,

9529: NVL(previous_fact.fact_value, fcst.forecast_quantity)
9530: ) total_forecast_quantity,
9531: NVL(previous_fact.forward_buy_quantity, fcst.forward_buy_quantity) total_forward_buy_quantity
9532: FROM
9533: ozf_act_forecasts_all fcst,
9534: ozf_act_metric_facts_all fact,
9535: ozf_act_metric_facts_all previous_fact
9536: WHERE
9537: fact.act_metric_used_by_id = fcst.forecast_id

Line 9562: FROM ozf_act_forecasts_all fcst,

9558: SUM(fact.fact_value) adj_fact_value,
9559: NVL(MIN(previous_fact.forward_buy_quantity), MIN(fcst.forward_buy_quantity)) -
9560: SUM(fact.forward_buy_quantity) adj_fwd_buy_quantity,
9561: MAX(fact.activity_metric_fact_id) activity_metric_fact_id
9562: FROM ozf_act_forecasts_all fcst,
9563: ozf_act_metric_facts_all fact,
9564: ozf_act_metric_facts_all previous_fact
9565: WHERE fact.act_metric_used_by_id = p_used_by_id
9566: AND fact.arc_act_metric_used_by = 'FCST'

Line 9657: FROM ozf_act_forecasts_all a

9653:
9654: CURSOR c_fcst_info IS
9655: SELECT a.forecast_uom_code,
9656: a.price_list_id
9657: FROM ozf_act_forecasts_all a
9658: WHERE a.forecast_id = p_forecast_id ;
9659:
9660: --R12 ---
9661: CURSOR c_fcst_products_info (p_offer_discount_line_id NUMBER) IS

Line 9674: OZF_ACT_FORECASTS_ALL fcst

9670: 'BASELINE',
9671: SUM(fact.BASELINE_SALES + fact.INCREMENTAL_SALES),
9672: sum(fact.fact_value)) qty
9673: from ozf_act_metric_facts_all fact,
9674: OZF_ACT_FORECASTS_ALL fcst
9675: where fact.fact_type = 'PRODUCT'
9676: and fact.arc_act_metric_used_by = 'FCST'
9677: and fact.act_metric_used_by_id = p_forecast_id
9678: AND FACT.ACT_METRIC_USED_BY_ID = FCST.FORECAST_ID

Line 9984: ozf_act_forecasts_all fcst

9980: fcst.forecast_uom_code
9981: from ozf_act_metric_facts_all fact,
9982: ozf_forecast_dimentions dim ,
9983: ozf_act_metric_facts_all previous_fact,
9984: ozf_act_forecasts_all fcst
9985: where fcst.forecast_id = p_used_by_id
9986: and fact.arc_act_metric_used_by = 'FCST'
9987: and fact.act_metric_used_by_id = fcst.forecast_id
9988: and fact.fact_type = p_dimention

Line 10025: ozf_act_forecasts_all fcst

10021: fcst.price_list_id,
10022: disc.list_header_id
10023: from qp_pricing_attributes prod,
10024: qp_list_lines disc,
10025: ozf_act_forecasts_all fcst
10026: where fcst.forecast_id = p_used_by_id
10027: and fcst.arc_act_fcast_used_by = 'OFFR'
10028: and disc.list_header_id = fcst.act_fcast_used_by_id
10029: and disc.list_line_id = prod.list_line_id;

Line 10622: FROM ozf_act_forecasts_all

10618: -- fact_value is the incremental_sales
10619:
10620: SELECT forecast_quantity, base_quantity, forecast_remaining_quantity
10621: INTO l_total_fcst_value, l_total_base_qty, l_total_rem_value
10622: FROM ozf_act_forecasts_all
10623: WHERE forecast_id = p_fcast_id;
10624:
10625: SELECT count(*), sum(incremental_sales)
10626: INTO l_temp_count, l_fact_value_sum_all_recs

Line 10697: UPDATE ozf_act_forecasts_all

10693: WHERE activity_metric_fact_id = facts_record.activity_metric_fact_id;
10694:
10695: END LOOP;
10696:
10697: UPDATE ozf_act_forecasts_all
10698: SET forecast_quantity = p_fcast_value
10699: WHERE forecast_id = p_fcast_id;
10700:
10701: IF (OZF_DEBUG_HIGH_ON) THEN