DBA Data[Home] [Help]

APPS.MSC_DEMAND_PKG dependencies on MSC_DEMAND_PKG

Line 1: package body msc_demand_pkg as

1: package body msc_demand_pkg as
2: /* $Header: MSCHBDEB.pls 120.92.12020000.2 2012/10/11 13:52:38 wexia ship $ */
3:
4:
5: procedure populate_details(errbuf out nocopy varchar2, retcode out nocopy varchar2,

Line 24: msc_phub_util.log('msc_demand_pkg.populate_details');

20: l_start_time timestamp := systimestamp;
21: l_ddl varchar2(500);
22: l_enable_num number := nvl(fnd_profile.value('MSC_APCC_ENABLE_CUM'), 1);
23: begin
24: msc_phub_util.log('msc_demand_pkg.populate_details');
25:
26: retcode := 0; -- this means successfully
27: errbuf := '';
28:

Line 71: msc_phub_util.log('msc_demand_pkg.populate_details: '||

67: end if;
68: end if;
69: end if;
70:
71: msc_phub_util.log('msc_demand_pkg.populate_details: '||
72: p_plan_id||','||p_plan_run_id||','||l_plan_type||','||
73: l_sr_instance_id||','||l_plan_start_date||','||l_plan_cutoff_date||','||
74: l_transfer_id||','||l_refresh_mode||','||l_item_rn_qid);
75:

Line 1552: msc_phub_util.log('msc_demand_pkg.populate_details.complete, duration='||(systimestamp-l_start_time));

1548: if (l_rowcount2 > 0) then
1549: summarize_demands_cum_f(errbuf, retcode, p_plan_id, p_plan_run_id);
1550: end if;
1551:
1552: msc_phub_util.log('msc_demand_pkg.populate_details.complete, duration='||(systimestamp-l_start_time));
1553:
1554: exception
1555: when others then
1556: msc_phub_util.log('msc_demand_pkg.populate_details: '||sqlerrm);

Line 1556: msc_phub_util.log('msc_demand_pkg.populate_details: '||sqlerrm);

1552: msc_phub_util.log('msc_demand_pkg.populate_details.complete, duration='||(systimestamp-l_start_time));
1553:
1554: exception
1555: when others then
1556: msc_phub_util.log('msc_demand_pkg.populate_details: '||sqlerrm);
1557: raise;
1558:
1559: end populate_details;
1560:

Line 1567: msc_phub_util.log('msc_demand_pkg.summarize_demands_f');

1563: p_plan_id number, p_plan_run_id number)
1564: is
1565: l_category_set_id1 number := fnd_profile.value('MSC_HUB_CAT_SET_ID_1');
1566: begin
1567: msc_phub_util.log('msc_demand_pkg.summarize_demands_f');
1568: retcode := 0;
1569: errbuf := '';
1570:
1571: delete from msc_demands_f

Line 1573: msc_phub_util.log('msc_demand_pkg.summarize_demands_f, delete='||sql%rowcount);

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:
1576: -- level 1
1577: insert into msc_demands_f (

Line 1716: msc_phub_util.log('msc_demand_pkg.summarize_demands_f, level1='||sql%rowcount);

1712: nvl(q.sr_category_id, -23453),
1713: f.order_type, f.vmi_flag,
1714: f.part_condition;
1715:
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 (

Line 1925: msc_phub_util.log('msc_demand_pkg.summarize_demands_f, level2='||sql%rowcount);

1921: f.category_set_id, f.sr_category_id,
1922: f.order_type, f.vmi_flag,
1923: f.part_condition;
1924:
1925: msc_phub_util.log('msc_demand_pkg.summarize_demands_f, level2='||sql%rowcount);
1926: commit;
1927:
1928: exception
1929: when others then

Line 1931: errbuf := 'msc_demand_pkg.summarize_demands_f: '||sqlerrm;

1927:
1928: exception
1929: when others then
1930: retcode := 2;
1931: errbuf := 'msc_demand_pkg.summarize_demands_f: '||sqlerrm;
1932: raise;
1933: end summarize_demands_f;
1934:
1935: procedure summarize_demands_cum_f(errbuf out nocopy varchar2, retcode out nocopy varchar2,

Line 1940: msc_phub_util.log('msc_demand_pkg.summarize_demands_cum_f');

1936: p_plan_id number, p_plan_run_id number)
1937: is
1938: l_category_set_id1 number := fnd_profile.value('MSC_HUB_CAT_SET_ID_1');
1939: begin
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

Line 1946: msc_phub_util.log('msc_demand_pkg.summarize_demands_cum_f, delete='||sql%rowcount);

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:
1949: -- level 1
1950: insert into msc_demands_cum_f (

Line 2011: msc_phub_util.log('msc_demand_pkg.summarize_demands_cum_f, level1='||sql%rowcount);

2007: f.owning_inst_id,
2008: f.order_date,
2009: nvl(q.sr_category_id, -23453);
2010:
2011: msc_phub_util.log('msc_demand_pkg.summarize_demands_cum_f, level1='||sql%rowcount);
2012: commit;
2013:
2014: exception
2015: when others then

Line 2017: errbuf := 'msc_demand_pkg.summarize_demands_cum_f: '||sqlerrm;

2013:
2014: exception
2015: when others then
2016: retcode := 2;
2017: errbuf := 'msc_demand_pkg.summarize_demands_cum_f: '||sqlerrm;
2018: raise;
2019: end summarize_demands_cum_f;
2020:
2021: procedure export_demands_f (

Line 2030: msc_phub_util.log('msc_demand_pkg.export_demands_f');

2026: l_sql varchar2(5000);
2027: l_suffix varchar2(32) := msc_phub_util.suffix(p_dblink);
2028: l_apps_schema varchar2(30) := msc_phub_util.apps_schema;
2029: begin
2030: msc_phub_util.log('msc_demand_pkg.export_demands_f');
2031: retcode := 0;
2032: errbuf := null;
2033:
2034: delete from msc_st_demands_f where st_transaction_id=p_st_transaction_id;

Line 2230: msc_phub_util.log('msc_demand_pkg.export_demands_f: complete, retcode='||retcode);

2226:
2227: --msc_phub_util.log(l_sql);
2228: execute immediate l_sql using p_st_transaction_id, p_plan_run_id;
2229: commit;
2230: msc_phub_util.log('msc_demand_pkg.export_demands_f: complete, retcode='||retcode);
2231:
2232: exception
2233: when others then
2234: retcode := 2;

Line 2235: errbuf := 'msc_demand_pkg.export_demands_f: '||sqlerrm;

2231:
2232: exception
2233: when others then
2234: retcode := 2;
2235: errbuf := 'msc_demand_pkg.export_demands_f: '||sqlerrm;
2236: msc_phub_util.log(errbuf);
2237: end export_demands_f;
2238:
2239: procedure export_demands_cum_f (

Line 2248: msc_phub_util.log('msc_demand_pkg.export_demands_cum_f');

2244: l_sql varchar2(5000);
2245: l_suffix varchar2(32) := msc_phub_util.suffix(p_dblink);
2246: l_apps_schema varchar2(30) := msc_phub_util.apps_schema;
2247: begin
2248: msc_phub_util.log('msc_demand_pkg.export_demands_cum_f');
2249: retcode := 0;
2250: errbuf := null;
2251:
2252: delete from msc_st_demands_cum_f where st_transaction_id=p_st_transaction_id;

Line 2339: msc_phub_util.log('msc_demand_pkg.export_demands_cum_f: complete, retcode='||retcode);

2335: end if;
2336:
2337: execute immediate l_sql using p_st_transaction_id, p_plan_run_id;
2338: commit;
2339: msc_phub_util.log('msc_demand_pkg.export_demands_cum_f: complete, retcode='||retcode);
2340:
2341: exception
2342: when others then
2343: retcode := 2;

Line 2344: errbuf := 'msc_demand_pkg.export_demands_cum_f: '||sqlerrm;

2340:
2341: exception
2342: when others then
2343: retcode := 2;
2344: errbuf := 'msc_demand_pkg.export_demands_cum_f: '||sqlerrm;
2345: msc_phub_util.log(errbuf);
2346: end export_demands_cum_f;
2347:
2348: procedure import_demands_f (

Line 2358: msc_phub_util.log('msc_demand_pkg.import_demands_f');

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;
2360: errbuf := null;
2361:
2362: l_result := l_result + msc_phub_util.prepare_staging_dates(

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 2522: msc_phub_util.log('msc_demand_pkg.import_demands_f: inserted='||sql%rowcount);

2518: fnd_global.user_id, sysdate, fnd_global.login_id
2519: from msc_st_demands_f
2520: where st_transaction_id=p_st_transaction_id and error_code=0;
2521:
2522: msc_phub_util.log('msc_demand_pkg.import_demands_f: inserted='||sql%rowcount);
2523: commit;
2524:
2525: summarize_demands_f(errbuf, retcode, p_plan_id, p_plan_run_id);
2526:

Line 2531: msc_phub_util.log('msc_demand_pkg.import_demands_f: complete, retcode='||retcode);

2527: if (l_result > 0) then
2528: retcode := -1;
2529: end if;
2530:
2531: msc_phub_util.log('msc_demand_pkg.import_demands_f: complete, retcode='||retcode);
2532:
2533: exception
2534: when others then
2535: retcode := 2;

Line 2536: errbuf := 'msc_demand_pkg.import_demands_f: '||sqlerrm;

2532:
2533: exception
2534: when others then
2535: retcode := 2;
2536: errbuf := 'msc_demand_pkg.import_demands_f: '||sqlerrm;
2537: raise;
2538: end import_demands_f;
2539:
2540: procedure import_demands_cum_f (

Line 2550: msc_phub_util.log('msc_demand_pkg.import_demands_cum_f');

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;
2552: errbuf := null;
2553:
2554: l_result := l_result + msc_phub_util.prepare_staging_dates(

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 2631: msc_phub_util.log('msc_demand_pkg.import_demands_cum_f: inserted='||sql%rowcount);

2627: fnd_global.user_id, sysdate, fnd_global.login_id
2628: from msc_st_demands_cum_f
2629: where st_transaction_id=p_st_transaction_id and error_code=0;
2630:
2631: msc_phub_util.log('msc_demand_pkg.import_demands_cum_f: inserted='||sql%rowcount);
2632: commit;
2633:
2634: summarize_demands_cum_f(errbuf, retcode, p_plan_id, p_plan_run_id);
2635:

Line 2640: msc_phub_util.log('msc_demand_pkg.import_demands_cum_f: complete, retcode='||retcode);

2636: if (l_result > 0) then
2637: retcode := -1;
2638: end if;
2639:
2640: msc_phub_util.log('msc_demand_pkg.import_demands_cum_f: complete, retcode='||retcode);
2641:
2642: exception
2643: when others then
2644: retcode := 2;

Line 2645: errbuf := 'msc_demand_pkg.import_demands_cum_f: '||sqlerrm;

2641:
2642: exception
2643: when others then
2644: retcode := 2;
2645: errbuf := 'msc_demand_pkg.import_demands_cum_f: '||sqlerrm;
2646: raise;
2647: end import_demands_cum_f;
2648:
2649: end msc_demand_pkg;

Line 2649: end msc_demand_pkg;

2645: errbuf := 'msc_demand_pkg.import_demands_cum_f: '||sqlerrm;
2646: raise;
2647: end import_demands_cum_f;
2648:
2649: end msc_demand_pkg;