DBA Data[Home] [Help]

APPS.OZF_CUST_FACTS_PVT dependencies on OZF_CUST_DAILY_FACTS

Line 63: DELETE FROM ozf_cust_daily_facts

59: RAISE FND_API.g_exc_unexpected_error;
60: END IF;
61: x_return_status := FND_API.g_ret_sts_success;
62:
63: DELETE FROM ozf_cust_daily_facts
64: WHERE report_date = p_report_date;
65:
66: -- Get only allocations for the Child Quotas
67:

Line 71: INSERT INTO ozf_cust_daily_facts (

67:
68: FOR i IN c_cust_prod
69: LOOP
70:
71: INSERT INTO ozf_cust_daily_facts (
72: cust_daily_fact_id ,
73: report_date ,
74: cust_account_id ,
75: ship_to_site_use_id ,

Line 85: VALUES ( ozf_cust_daily_facts_s.nextval,

81: created_by ,
82: last_update_date ,
83: last_updated_by ,
84: last_update_login )
85: VALUES ( ozf_cust_daily_facts_s.nextval,
86: trunc(p_report_date),
87: i.cust_account_id,
88: i.site_use_id,
89: i.bill_to_site_use_id,

Line 190: FROM ozf_cust_daily_facts

186: bill_to_site_use_id,
187: product_attribute,
188: product_attr_value,
189: inventory_item_id
190: FROM ozf_cust_daily_facts
191: WHERE report_date = p_report_date;
192:
193: CURSOR xtd_sales_csr (p_report_date DATE,
194: p_cust_account_id NUMBER,

Line 513: UPDATE ozf_cust_daily_facts

509: -- ozf_utility_pvt.write_conc_log( 'Month : '|| l_mth_total);
510: -- ozf_utility_pvt.write_conc_log( 'Quarter : '|| l_qtr_total);
511:
512: -- Modified for R12
513: UPDATE ozf_cust_daily_facts
514: SET ptd_sales = l_mtd_sales
515: ,qtd_sales = l_day_total + l_week_total + l_mth_total
516: ,ytd_sales = l_ytd_sales
517: ,lptd_sales = l_ly_day_total + l_ly_week_total

Line 602: FROM ozf_cust_daily_facts

598: bill_to_site_use_id,
599: product_attribute,
600: product_attr_value,
601: inventory_item_id
602: FROM ozf_cust_daily_facts
603: WHERE report_date = p_report_date;
604:
605: /*
606: - Convert Order quantity to common uom

Line 778: UPDATE ozf_cust_daily_facts

774: END LOOP; -- open_orders_csr
775:
776: END LOOP; -- items_csr
777:
778: UPDATE ozf_cust_daily_facts
779: SET past_due_order_qty = l_past_due_qty
780: ,current_period_order_qty = l_current_order_qty
781: ,backordered_qty = l_backordered_qty
782: ,booked_for_future_qty = l_future_order_qty

Line 824: FROM ozf_cust_daily_facts f ,

820: CURSOR cust_target_csr IS
821: SELECT NVL( DECODE(p_col, 'YEAR_QUOTA', SUM(f.current_year_target),
822: 'PERIOD_QUOTA', SUM(f.current_period_target),
823: 'QTR_QUOTA', SUM(f.current_qtr_target) ) ,0)
824: FROM ozf_cust_daily_facts f ,
825: hz_cust_accounts h
826: WHERE f.report_date = p_report_date
827: AND f.cust_account_id = h.cust_account_id
828: AND f.bill_to_site_use_id = NVL(p_bill_to_site_use_id, f.bill_to_site_use_id)

Line 885: -- so bill_to_site_use_id in ozf_cust_daily_facts will also be -9996

881: -- Second NVL if no target records exist. Not sure if this can ever happen..
882:
883: -- bill to site_use_id is never null in ozf_account_allocations
884: -- it will be -9996 if not available
885: -- so bill_to_site_use_id in ozf_cust_daily_facts will also be -9996
886:
887: CURSOR target_csr IS
888: SELECT NVL(SUM(NVL(c1.target,0)),0)
889: FROM ozf_account_allocations b1

Line 944: FROM ozf_cust_daily_facts

940: ship_to_site_use_id,
941: bill_to_site_use_id,
942: product_attribute,
943: product_attr_value
944: FROM ozf_cust_daily_facts
945: WHERE report_date = p_report_date;
946:
947: -- The 'OTHERS' record will have the total customer target in cust_daily_facts
948: -- remove p_report_date between start_date and end_date

Line 1180: UPDATE ozf_cust_daily_facts

1176: l_current_year_target := NVL(l_current_year_target,0)
1177: + NVL(l_current_temp_year_target,0);
1178: END LOOP;
1179:
1180: UPDATE ozf_cust_daily_facts
1181: SET current_period_target = NVL(l_current_period_target,0)
1182: ,current_qtr_target = l_current_qtr_target
1183: ,current_year_target = l_current_year_target
1184: WHERE cust_daily_fact_id = fact.cust_daily_fact_id;

Line 1474: FROM ozf_cust_daily_facts fact,

1470: p_report_date DATE) IS
1471: SELECT SUM(fact.ptd_sales) MTD_SALES,
1472: SUM(fact.qtd_sales) QTD_SALES,
1473: SUM(fact.ytd_sales) YTD_SALES
1474: FROM ozf_cust_daily_facts fact,
1475: (
1476: SELECT DISTINCT c.site_use_id
1477: FROM jtf_terr_rsc_all b
1478: ,ams_party_market_segments c

Line 1496: FROM ozf_cust_daily_facts fact,

1492: SELECT
1493: SUM(fact.ptd_sales) MTD_SALES,
1494: SUM(fact.qtd_sales) QTD_SALES,
1495: SUM(fact.ytd_sales) YTD_SALES
1496: FROM ozf_cust_daily_facts fact,
1497: ozf_account_allocations site,
1498: ozf_product_allocations prod
1499: WHERE fact.report_date = p_report_date
1500: AND fact.ship_to_site_use_id = site.site_use_id

Line 2318: FROM ozf_cust_daily_facts c,

2314: -1 CREATED_BY,
2315: sysdate LAST_UPDATE_DATE,
2316: -1 LAST_UPDATED_BY,
2317: -1 LAST_UPDATE_LOGIN
2318: FROM ozf_cust_daily_facts c,
2319: hz_cust_accounts x,
2320: ozf_dashb_daily_kpi kpi,
2321: (SELECT DISTINCT a.owner
2322: FROM ozf_funds_all_b a

Line 2419: FROM ozf_cust_daily_facts c,

2415: -1 CREATED_BY,
2416: sysdate LAST_UPDATE_DATE,
2417: -1 LAST_UPDATED_BY,
2418: -1 LAST_UPDATE_LOGIN
2419: FROM ozf_cust_daily_facts c,
2420: hz_cust_accounts x,
2421: ozf_dashb_daily_kpi kpi,
2422: (SELECT DISTINCT a.owner
2423: FROM ozf_funds_all_b a

Line 2520: FROM ozf_cust_daily_facts c,

2516: -1 CREATED_BY,
2517: sysdate LAST_UPDATE_DATE,
2518: -1 LAST_UPDATED_BY,
2519: -1 LAST_UPDATE_LOGIN
2520: FROM ozf_cust_daily_facts c,
2521: hz_cust_accounts x,
2522: ozf_dashb_daily_kpi kpi,
2523: (SELECT DISTINCT a.owner
2524: FROM ozf_funds_all_b a

Line 2622: FROM ozf_cust_daily_facts c ,

2618: -1 CREATED_BY,
2619: sysdate LAST_UPDATE_DATE,
2620: -1 LAST_UPDATED_BY,
2621: -1 LAST_UPDATE_LOGIN
2622: FROM ozf_cust_daily_facts c ,
2623: ozf_dashb_daily_kpi kpi,
2624: (SELECT DISTINCT a.owner
2625: FROM ozf_funds_all_b a
2626: WHERE a.fund_type = 'QUOTA'