DBA Data[Home] [Help]

APPS.MSC_DEMAND_PKG dependencies on MSC_DEMANDS

Line 47: delete from msc_demands_f

43: if l_refresh_mode = 2 -- targeted refesh
44: then
45: l_item_rn_qid := msc_phub_util.get_item_rn_qid(p_plan_id, p_plan_run_id);
46:
47: delete from msc_demands_f
48: where plan_id = p_plan_id
49: and plan_run_id = p_plan_run_id
50: and (p_plan_id, sr_instance_id, organization_id, inventory_item_id) in
51: (select number1, number2, number3, number4 from msc_hub_query q where q.query_id = l_item_rn_qid);

Line 54: msc_phub_util.log('msc_demands_f, delete='||sql%rowcount||', l_rowcount1='||l_rowcount1);

50: and (p_plan_id, sr_instance_id, organization_id, inventory_item_id) in
51: (select number1, number2, number3, number4 from msc_hub_query q where q.query_id = l_item_rn_qid);
52:
53: l_rowcount1 := l_rowcount1 + sql%rowcount;
54: msc_phub_util.log('msc_demands_f, delete='||sql%rowcount||', l_rowcount1='||l_rowcount1);
55: commit;
56:
57: if (l_enable_num not in (2)) then
58: delete from msc_demands_cum_f

Line 58: delete from msc_demands_cum_f

54: msc_phub_util.log('msc_demands_f, delete='||sql%rowcount||', l_rowcount1='||l_rowcount1);
55: commit;
56:
57: if (l_enable_num not in (2)) then
58: delete from msc_demands_cum_f
59: where plan_id = p_plan_id
60: and plan_run_id = p_plan_run_id
61: and (p_plan_id, sr_instance_id, organization_id, inventory_item_id) in
62: (select number1, number2, number3, number4 from msc_hub_query q where q.query_id = l_item_rn_qid);

Line 65: msc_phub_util.log('msc_demands_cum_f, delete='||sql%rowcount||', l_rowcount2='||l_rowcount2);

61: and (p_plan_id, sr_instance_id, organization_id, inventory_item_id) in
62: (select number1, number2, number3, number4 from msc_hub_query q where q.query_id = l_item_rn_qid);
63:
64: l_rowcount2 := l_rowcount2 + sql%rowcount;
65: msc_phub_util.log('msc_demands_cum_f, delete='||sql%rowcount||', l_rowcount2='||l_rowcount2);
66: commit;
67: end if;
68: end if;
69: end if;

Line 406: from msc_demands md

402: fnd_global.user_id, sysdate,
403: sysdate, fnd_global.user_id, fnd_global.login_id,
404: fnd_global.conc_program_id, fnd_global.conc_login_id,
405: fnd_global.prog_appl_id, fnd_global.conc_request_id
406: from msc_demands md
407: where md.plan_id = p_plan_id
408: and not (md.organization_id=-1 and md.origination_type=29) -- avoid double counting global forecast
409: and md.origination_type not in (83) -- 10044668 Unconstrained Demand is not real demand
410: and (p_plan_id <> -1

Line 537: msc_demands md2,

533: md2.service_level,
534: md2.demand_fulfillment_lead_time,
535: md2.old_demand_quantity
536: from
537: msc_demands md2,
538: (select calendar_date, mfg_week_start_date, mfg_period_start_date
539: from msc_phub_dates_mv
540: where calendar_date between l_plan_start_date and l_plan_cutoff_date
541: and mfg_seq_num is not null) d

Line 778: from msc_demands md1,msc_trading_partners mtp1,

774: fnd_global.user_id, sysdate,
775: sysdate, fnd_global.user_id, fnd_global.login_id,
776: fnd_global.conc_program_id, fnd_global.conc_login_id,
777: fnd_global.prog_appl_id, fnd_global.conc_request_id
778: from msc_demands md1,msc_trading_partners mtp1,
779: msc_exception_details med1
780: where md1.plan_id=med1.plan_id
781: and md1.plan_id=p_plan_id
782: and md1.origination_type in (5,6,7,8,9,10,11,12,15,22,27,29,30) --- only for indep demand

Line 888: msc_demands md,

884: -1 * md.origination_type order_type,
885: nvl(md.item_type_value,1) part_condition,
886: md.quantity_by_due_date constrained_fcst
887: from
888: msc_demands md,
889: msc_system_items msi,
890: msc_system_items msia,
891: msc_system_items msib
892: where md.plan_id = msia.plan_id

Line 934: msc_demands md,

930: -1 * md.origination_type order_type,
931: nvl(md.item_type_value,1) part_condition,
932: (md.using_requirement_quantity - nvl(md.quantity_by_due_date, 0)) constrained_fcst
933: from
934: msc_demands md,
935: msc_system_items msi,
936: msc_system_items msia,
937: msc_system_items msib
938: where md.plan_id = msia.plan_id

Line 1042: from msc_demands md

1038: fnd_global.user_id, sysdate,
1039: sysdate, fnd_global.user_id, fnd_global.login_id,
1040: fnd_global.conc_program_id, fnd_global.conc_login_id,
1041: fnd_global.prog_appl_id, fnd_global.conc_request_id
1042: from msc_demands md
1043: where md.plan_id = p_plan_id
1044: and md.origination_type = 30
1045: and p_plan_id <> -1
1046: and l_plan_type <> 5

Line 1124: from msc_demands md

1120: fnd_global.user_id, sysdate,
1121: sysdate, fnd_global.user_id, fnd_global.login_id,
1122: fnd_global.conc_program_id, fnd_global.conc_login_id,
1123: fnd_global.prog_appl_id, fnd_global.conc_request_id
1124: from msc_demands md
1125: where md.plan_id = p_plan_id
1126: and md.origination_type = 30
1127: and p_plan_id <> -1
1128: and l_plan_type <> 5

Line 1205: from msc_demands md

1201: fnd_global.user_id, sysdate,
1202: sysdate, fnd_global.user_id, fnd_global.login_id,
1203: fnd_global.conc_program_id, fnd_global.conc_login_id,
1204: fnd_global.prog_appl_id, fnd_global.conc_request_id
1205: from msc_demands md
1206: where md.plan_id = p_plan_id
1207: and md.origination_type = 30
1208: and p_plan_id <> -1
1209: and l_plan_type <> 5

Line 1230: -- msc_demands_f:final

1226: nvl(md.item_type_value, 1);
1227: msc_phub_util.log('insert into msc_st_demands_f:sales_order_pd: '||sql%rowcount);
1228: commit;
1229:
1230: -- msc_demands_f:final
1231: msc_phub_util.gather_table_stats(msc_phub_util.stats_st, 'MSC_ST_DEMANDS_F', l_transfer_id);
1232: insert into msc_demands_f (
1233: plan_id,
1234: plan_run_id,

Line 1232: insert into msc_demands_f (

1228: commit;
1229:
1230: -- msc_demands_f:final
1231: msc_phub_util.gather_table_stats(msc_phub_util.stats_st, 'MSC_ST_DEMANDS_F', l_transfer_id);
1232: insert into msc_demands_f (
1233: plan_id,
1234: plan_run_id,
1235: io_plan_flag,
1236: sr_instance_id,

Line 1454: msc_phub_util.log('insert into msc_demands_f:final: '||sql%rowcount);

1450: and fnd_profile.value('MSC_HUB_CUR_CODE_RPT')=mcc.to_currency(+)
1451: and f.order_date=mcc.calendar_date(+);
1452:
1453: l_rowcount1 := l_rowcount1 + sql%rowcount;
1454: msc_phub_util.log('insert into msc_demands_f:final: '||sql%rowcount);
1455: commit;
1456:
1457: msc_phub_util.gather_table_stats(msc_phub_util.stats_fact, 'MSC_DEMANDS_F', p_plan_run_id);
1458:

Line 1457: msc_phub_util.gather_table_stats(msc_phub_util.stats_fact, 'MSC_DEMANDS_F', p_plan_run_id);

1453: l_rowcount1 := l_rowcount1 + sql%rowcount;
1454: msc_phub_util.log('insert into msc_demands_f:final: '||sql%rowcount);
1455: commit;
1456:
1457: msc_phub_util.gather_table_stats(msc_phub_util.stats_fact, 'MSC_DEMANDS_F', p_plan_run_id);
1458:
1459: if (l_enable_num not in (2)) then
1460: msc_phub_util.unusuable_local_index('MSC_DEMANDS_CUM_F', p_plan_run_id, 1);
1461: -- msc_demands_cum_f

Line 1460: msc_phub_util.unusuable_local_index('MSC_DEMANDS_CUM_F', p_plan_run_id, 1);

1456:
1457: msc_phub_util.gather_table_stats(msc_phub_util.stats_fact, 'MSC_DEMANDS_F', p_plan_run_id);
1458:
1459: if (l_enable_num not in (2)) then
1460: msc_phub_util.unusuable_local_index('MSC_DEMANDS_CUM_F', p_plan_run_id, 1);
1461: -- msc_demands_cum_f
1462: insert into msc_demands_cum_f (
1463: plan_id,
1464: plan_run_id,

Line 1461: -- msc_demands_cum_f

1457: msc_phub_util.gather_table_stats(msc_phub_util.stats_fact, 'MSC_DEMANDS_F', p_plan_run_id);
1458:
1459: if (l_enable_num not in (2)) then
1460: msc_phub_util.unusuable_local_index('MSC_DEMANDS_CUM_F', p_plan_run_id, 1);
1461: -- msc_demands_cum_f
1462: insert into msc_demands_cum_f (
1463: plan_id,
1464: plan_run_id,
1465: sr_instance_id,

Line 1462: insert into msc_demands_cum_f (

1458:
1459: if (l_enable_num not in (2)) then
1460: msc_phub_util.unusuable_local_index('MSC_DEMANDS_CUM_F', p_plan_run_id, 1);
1461: -- msc_demands_cum_f
1462: insert into msc_demands_cum_f (
1463: plan_id,
1464: plan_run_id,
1465: sr_instance_id,
1466: organization_id,

Line 1511: msc_demands_f f,

1507: sysdate, fnd_global.user_id, fnd_global.login_id,
1508: fnd_global.conc_program_id, fnd_global.conc_login_id,
1509: fnd_global.prog_appl_id, fnd_global.conc_request_id
1510: from
1511: msc_demands_f f,
1512: msc_phub_dates_mv d
1513: where f.plan_id=p_plan_id
1514: and f.plan_run_id=p_plan_run_id
1515: and f.aggr_type=0

Line 1538: msc_phub_util.log('msc_demands_cum_f, insert='||sql%rowcount||', l_rowcount2='||l_rowcount2);

1534: f.io_plan_flag,
1535: d.calendar_date;
1536:
1537: l_rowcount2 := l_rowcount2 + sql%rowcount;
1538: msc_phub_util.log('msc_demands_cum_f, insert='||sql%rowcount||', l_rowcount2='||l_rowcount2);
1539: commit;
1540: msc_phub_util.unusuable_local_index('MSC_DEMANDS_CUM_F', p_plan_run_id, 2);
1541: msc_phub_util.gather_table_stats(msc_phub_util.stats_fact, 'MSC_DEMANDS_CUM_F', p_plan_run_id);
1542: end if;

Line 1540: msc_phub_util.unusuable_local_index('MSC_DEMANDS_CUM_F', p_plan_run_id, 2);

1536:
1537: l_rowcount2 := l_rowcount2 + sql%rowcount;
1538: msc_phub_util.log('msc_demands_cum_f, insert='||sql%rowcount||', l_rowcount2='||l_rowcount2);
1539: commit;
1540: msc_phub_util.unusuable_local_index('MSC_DEMANDS_CUM_F', p_plan_run_id, 2);
1541: msc_phub_util.gather_table_stats(msc_phub_util.stats_fact, 'MSC_DEMANDS_CUM_F', p_plan_run_id);
1542: end if;
1543:
1544: if (l_rowcount1 > 0) then

Line 1541: msc_phub_util.gather_table_stats(msc_phub_util.stats_fact, 'MSC_DEMANDS_CUM_F', p_plan_run_id);

1537: l_rowcount2 := l_rowcount2 + sql%rowcount;
1538: msc_phub_util.log('msc_demands_cum_f, insert='||sql%rowcount||', l_rowcount2='||l_rowcount2);
1539: commit;
1540: msc_phub_util.unusuable_local_index('MSC_DEMANDS_CUM_F', p_plan_run_id, 2);
1541: msc_phub_util.gather_table_stats(msc_phub_util.stats_fact, 'MSC_DEMANDS_CUM_F', p_plan_run_id);
1542: end if;
1543:
1544: if (l_rowcount1 > 0) then
1545: summarize_demands_f(errbuf, retcode, p_plan_id, p_plan_run_id);

Line 1571: delete from msc_demands_f

1567: msc_phub_util.log('msc_demand_pkg.summarize_demands_f');
1568: retcode := 0;
1569: errbuf := '';
1570:
1571: delete from msc_demands_f
1572: where plan_id=p_plan_id and plan_run_id=p_plan_run_id and aggr_type>0;
1573: msc_phub_util.log('msc_demand_pkg.summarize_demands_f, delete='||sql%rowcount);
1574: commit;
1575:

Line 1577: insert into msc_demands_f (

1573: msc_phub_util.log('msc_demand_pkg.summarize_demands_f, delete='||sql%rowcount);
1574: commit;
1575:
1576: -- level 1
1577: insert into msc_demands_f (
1578: plan_id, plan_run_id,
1579: io_plan_flag,
1580: sr_instance_id, organization_id, inventory_item_id,
1581: original_item_id,

Line 1694: msc_demands_f f,

1690: sysdate, fnd_global.user_id, fnd_global.login_id,
1691: fnd_global.conc_program_id, fnd_global.conc_login_id,
1692: fnd_global.prog_appl_id, fnd_global.conc_request_id
1693: from
1694: msc_demands_f f,
1695: msc_phub_item_categories_mv q
1696: where f.plan_id = p_plan_id and f.plan_run_id = p_plan_run_id
1697: and f.aggr_type=0
1698: and f.owning_inst_id=q.sr_instance_id(+)

Line 1720: insert into msc_demands_f (

1716: msc_phub_util.log('msc_demand_pkg.summarize_demands_f, level1='||sql%rowcount);
1717: commit;
1718:
1719: -- level 2
1720: insert into msc_demands_f (
1721: plan_id, plan_run_id, io_plan_flag,
1722: sr_instance_id, organization_id, inventory_item_id,
1723: original_item_id,
1724: project_id, task_id,

Line 1830: msc_demands_f f,

1826: sysdate, fnd_global.user_id, fnd_global.login_id,
1827: fnd_global.conc_program_id, fnd_global.conc_login_id,
1828: fnd_global.prog_appl_id, fnd_global.conc_request_id
1829: from
1830: msc_demands_f f,
1831: msc_phub_dates_mv d
1832: where f.plan_id = p_plan_id and f.plan_run_id = p_plan_run_id
1833: and f.aggr_type between 42 and 44
1834: and f.order_date = d.calendar_date

Line 1906: msc_demands_f f,

1902: sysdate, fnd_global.user_id, fnd_global.login_id,
1903: fnd_global.conc_program_id, fnd_global.conc_login_id,
1904: fnd_global.prog_appl_id, fnd_global.conc_request_id
1905: from
1906: msc_demands_f f,
1907: msc_phub_dates_mv d
1908: where f.plan_id = p_plan_id and f.plan_run_id = p_plan_run_id
1909: and f.aggr_type between 42 and 44
1910: and f.order_date = d.calendar_date

Line 1944: delete from msc_demands_cum_f

1940: msc_phub_util.log('msc_demand_pkg.summarize_demands_cum_f');
1941: retcode := 0;
1942: errbuf := '';
1943:
1944: delete from msc_demands_cum_f
1945: where plan_id=p_plan_id and plan_run_id=p_plan_run_id and aggr_type>0;
1946: msc_phub_util.log('msc_demand_pkg.summarize_demands_cum_f, delete='||sql%rowcount);
1947: commit;
1948:

Line 1950: insert into msc_demands_cum_f (

1946: msc_phub_util.log('msc_demand_pkg.summarize_demands_cum_f, delete='||sql%rowcount);
1947: commit;
1948:
1949: -- level 1
1950: insert into msc_demands_cum_f (
1951: plan_id, plan_run_id,
1952: io_plan_flag,
1953: sr_instance_id, organization_id, inventory_item_id,
1954: original_item_id,

Line 1991: msc_demands_cum_f f,

1987: sysdate, fnd_global.user_id, fnd_global.login_id,
1988: fnd_global.conc_program_id, fnd_global.conc_login_id,
1989: fnd_global.prog_appl_id, fnd_global.conc_request_id
1990: from
1991: msc_demands_cum_f f,
1992: msc_phub_item_categories_mv q
1993: where f.plan_id = p_plan_id and f.plan_run_id = p_plan_run_id
1994: and f.aggr_type=0
1995: and f.owning_inst_id=q.sr_instance_id(+)

Line 2188: ' '||l_apps_schema||'.msc_demands_f'||l_suffix||' f,'||

2184: l_sql := l_sql||
2185: ' fnd_global.user_id, sysdate,'||
2186: ' fnd_global.user_id, sysdate, fnd_global.login_id'||
2187: ' from'||
2188: ' '||l_apps_schema||'.msc_demands_f'||l_suffix||' f,'||
2189: ' '||l_apps_schema||'.msc_trading_partners'||l_suffix||' mtp,'||
2190: ' '||l_apps_schema||'.msc_trading_partners'||l_suffix||' mtp2,'||
2191: ' '||l_apps_schema||'.msc_items'||l_suffix||' mi,'||
2192: ' '||l_apps_schema||'.msc_phub_customers_mv'||l_suffix||' cmv,';

Line 2316: ' '||l_apps_schema||'.msc_demands_cum_f'||l_suffix||' f,'||

2312: ' f.cum_constrained_fcst_value2,'||
2313: ' fnd_global.user_id, sysdate,'||
2314: ' fnd_global.user_id, sysdate, fnd_global.login_id'||
2315: ' from'||
2316: ' '||l_apps_schema||'.msc_demands_cum_f'||l_suffix||' f,'||
2317: ' '||l_apps_schema||'.msc_trading_partners'||l_suffix||' mtp,'||
2318: ' '||l_apps_schema||'.msc_trading_partners'||l_suffix||' mtp2,'||
2319: ' '||l_apps_schema||'.msc_items'||l_suffix||' mi,'||
2320: ' '||l_apps_schema||'.msc_phub_customers_mv'||l_suffix||' cmv'||

Line 2355: l_fact_table varchar2(30) := 'msc_demands_f';

2351: p_plan_type number, p_plan_start_date date, p_plan_cutoff_date date,
2352: p_upload_mode number, p_overwrite_after_date date, p_def_instance_code varchar2)
2353: is
2354: l_staging_table varchar2(30) := 'msc_st_demands_f';
2355: l_fact_table varchar2(30) := 'msc_demands_f';
2356: l_result number := 0;
2357: begin
2358: msc_phub_util.log('msc_demand_pkg.import_demands_f');
2359: retcode := 0;

Line 2393: msc_phub_util.log('msc_demand_pkg.import_demands_f: insert into msc_demands_f');

2389:
2390: l_result := l_result + msc_phub_util.decode_project_key(
2391: l_staging_table, p_st_transaction_id);
2392:
2393: msc_phub_util.log('msc_demand_pkg.import_demands_f: insert into msc_demands_f');
2394: insert into msc_demands_f (
2395: plan_id,
2396: plan_run_id,
2397: sr_instance_id,

Line 2394: insert into msc_demands_f (

2390: l_result := l_result + msc_phub_util.decode_project_key(
2391: l_staging_table, p_st_transaction_id);
2392:
2393: msc_phub_util.log('msc_demand_pkg.import_demands_f: insert into msc_demands_f');
2394: insert into msc_demands_f (
2395: plan_id,
2396: plan_run_id,
2397: sr_instance_id,
2398: organization_id,

Line 2547: l_fact_table varchar2(30) := 'msc_demands_cum_f';

2543: p_plan_type number, p_plan_start_date date, p_plan_cutoff_date date,
2544: p_upload_mode number, p_overwrite_after_date date, p_def_instance_code varchar2)
2545: is
2546: l_staging_table varchar2(30) := 'msc_st_demands_cum_f';
2547: l_fact_table varchar2(30) := 'msc_demands_cum_f';
2548: l_result number := 0;
2549: begin
2550: msc_phub_util.log('msc_demand_pkg.import_demands_cum_f');
2551: retcode := 0;

Line 2582: msc_phub_util.log('msc_demand_pkg.import_demands_cum_f: insert into msc_demands_cum_f');

2578: l_staging_table, p_st_transaction_id,
2579: 'customer_id', 'customer_site_id', 'owning_inst_id', 'region_id',
2580: 'customer_name', 'customer_site_code', 'zone');
2581:
2582: msc_phub_util.log('msc_demand_pkg.import_demands_cum_f: insert into msc_demands_cum_f');
2583: insert into msc_demands_cum_f (
2584: plan_id,
2585: plan_run_id,
2586: sr_instance_id,

Line 2583: insert into msc_demands_cum_f (

2579: 'customer_id', 'customer_site_id', 'owning_inst_id', 'region_id',
2580: 'customer_name', 'customer_site_code', 'zone');
2581:
2582: msc_phub_util.log('msc_demand_pkg.import_demands_cum_f: insert into msc_demands_cum_f');
2583: insert into msc_demands_cum_f (
2584: plan_id,
2585: plan_run_id,
2586: sr_instance_id,
2587: organization_id,