DBA Data[Home] [Help]

APPS.MSC_ITEM_PKG dependencies on MSC_ITEM_PKG

Line 1: package body msc_item_pkg as

1: package body msc_item_pkg as
2: /* $Header: MSCHBITB.pls 120.99.12020000.2 2012/10/11 14:14:22 wexia ship $ */
3:
4:
5:

Line 26: msc_phub_util.log('msc_item_pkg.populate_details');

22: l_transfer_id number := null;
23: l_start_time timestamp := systimestamp;
24: l_enforce_wh_cpty number := 2;
25: begin
26: msc_phub_util.log('msc_item_pkg.populate_details');
27: retcode := 0; -- this means successfully
28: errbuf := '';
29:
30: -- ODS plan

Line 83: msc_phub_util.log('msc_item_pkg.populate_details: '||

79: into l_enforce_wh_cpty
80: from msc_plans
81: where plan_id=p_plan_id;
82:
83: msc_phub_util.log('msc_item_pkg.populate_details: '||
84: p_plan_id||','||p_plan_run_id||','||l_plan_type||','||
85: l_sr_instance_id||','||l_plan_start_date||','||l_plan_cutoff_date||','||
86: l_transfer_id||','||l_refresh_mode||','||l_item_rn_qid||','||
87: l_enforce_wh_cpty);

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

1530: if (l_rowcount2 > 0) then
1531: summarize_item_inventory_f(errbuf, retcode, p_plan_id, p_plan_run_id);
1532: end if;
1533:
1534: msc_phub_util.log('msc_item_pkg.populate_details.complete, duration='||(systimestamp-l_start_time));
1535:
1536: exception
1537: when others then
1538: msc_phub_util.log('msc_item_pkg.populate_details: '||sqlerrm);

Line 1538: msc_phub_util.log('msc_item_pkg.populate_details: '||sqlerrm);

1534: msc_phub_util.log('msc_item_pkg.populate_details.complete, duration='||(systimestamp-l_start_time));
1535:
1536: exception
1537: when others then
1538: msc_phub_util.log('msc_item_pkg.populate_details: '||sqlerrm);
1539: raise;
1540:
1541: end populate_details;
1542:

Line 1549: msc_phub_util.log('msc_item_pkg.summarize_item_inventory_f');

1545: p_plan_id number, p_plan_run_id number)
1546: is
1547: l_category_set_id1 number := fnd_profile.value('MSC_HUB_CAT_SET_ID_1');
1548: begin
1549: msc_phub_util.log('msc_item_pkg.summarize_item_inventory_f');
1550: retcode := 0;
1551: errbuf := '';
1552:
1553: delete from msc_item_inventory_f

Line 1555: msc_phub_util.log('msc_item_pkg.summarize_item_inventory_f, delete='||sql%rowcount);

1551: errbuf := '';
1552:
1553: delete from msc_item_inventory_f
1554: where plan_id=p_plan_id and plan_run_id=p_plan_run_id and aggr_type>0;
1555: msc_phub_util.log('msc_item_pkg.summarize_item_inventory_f, delete='||sql%rowcount);
1556: commit;
1557:
1558: -- level 1
1559: insert into msc_item_inventory_f (

Line 1671: msc_phub_util.log('msc_item_pkg.summarize_item_inventory_f, level1='||sql%rowcount);

1667: f.sr_instance_id, f.organization_id, f.owning_inst_id, f.owning_org_id,
1668: f.vmi_flag, f.order_date,
1669: nvl(q.sr_category_id, -23453);
1670:
1671: msc_phub_util.log('msc_item_pkg.summarize_item_inventory_f, level1='||sql%rowcount);
1672: commit;
1673:
1674: exception
1675: when others then

Line 1677: errbuf := 'msc_item_pkg.summarize_item_inventory_f: '||sqlerrm;

1673:
1674: exception
1675: when others then
1676: retcode := 2;
1677: errbuf := 'msc_item_pkg.summarize_item_inventory_f: '||sqlerrm;
1678: raise;
1679: end summarize_item_inventory_f;
1680:
1681:

Line 1687: msc_phub_util.log('msc_item_pkg.summarize_item_orders_f');

1683: p_plan_id number, p_plan_run_id number)
1684: is
1685: l_category_set_id1 number := fnd_profile.value('MSC_HUB_CAT_SET_ID_1');
1686: begin
1687: msc_phub_util.log('msc_item_pkg.summarize_item_orders_f');
1688: retcode := 0;
1689: errbuf := '';
1690:
1691: delete from msc_item_orders_f

Line 1693: msc_phub_util.log('msc_item_pkg.summarize_item_orders_f, delete='||sql%rowcount);

1689: errbuf := '';
1690:
1691: delete from msc_item_orders_f
1692: where plan_id=p_plan_id and plan_run_id=p_plan_run_id and aggr_type>0;
1693: msc_phub_util.log('msc_item_pkg.summarize_item_orders_f, delete='||sql%rowcount);
1694: commit;
1695:
1696: -- level 1
1697: insert into msc_item_orders_f (

Line 1842: msc_phub_util.log('msc_item_pkg.summarize_item_orders_f, level1='||sql%rowcount);

1838: f.owning_inst_id, f.owning_org_id,
1839: f.order_date,
1840: nvl(q.sr_category_id, -23453);
1841:
1842: msc_phub_util.log('msc_item_pkg.summarize_item_orders_f, level1='||sql%rowcount);
1843: commit;
1844:
1845: exception
1846: when others then

Line 1848: errbuf := 'msc_item_pkg.summarize_item_orders_f: '||sqlerrm;

1844:
1845: exception
1846: when others then
1847: retcode := 2;
1848: errbuf := 'msc_item_pkg.summarize_item_orders_f: '||sqlerrm;
1849: raise;
1850: end summarize_item_orders_f;
1851:
1852: procedure export_item_inventory_f (

Line 1861: msc_phub_util.log('msc_item_pkg.export_item_inventory_f');

1857: l_sql varchar2(5000);
1858: l_suffix varchar2(32) := msc_phub_util.suffix(p_dblink);
1859: l_apps_schema varchar2(30) := msc_phub_util.apps_schema;
1860: begin
1861: msc_phub_util.log('msc_item_pkg.export_item_inventory_f');
1862: retcode := 0;
1863: errbuf := null;
1864:
1865: delete from msc_st_item_inventory_f where st_transaction_id=p_st_transaction_id;

Line 1996: msc_phub_util.log('msc_item_pkg.export_item_inventory_f: inserted='||sql%rowcount);

1992: ' and mtp2.sr_tp_id(+)=f.owning_org_id'||
1993: ' and mi.inventory_item_id(+)=f.inventory_item_id';
1994:
1995: execute immediate l_sql using p_st_transaction_id, p_plan_run_id;
1996: msc_phub_util.log('msc_item_pkg.export_item_inventory_f: inserted='||sql%rowcount);
1997: commit;
1998: msc_phub_util.log('msc_item_pkg.export_item_inventory_f: complete, retcode='||retcode);
1999:
2000: exception

Line 1998: msc_phub_util.log('msc_item_pkg.export_item_inventory_f: complete, retcode='||retcode);

1994:
1995: execute immediate l_sql using p_st_transaction_id, p_plan_run_id;
1996: msc_phub_util.log('msc_item_pkg.export_item_inventory_f: inserted='||sql%rowcount);
1997: commit;
1998: msc_phub_util.log('msc_item_pkg.export_item_inventory_f: complete, retcode='||retcode);
1999:
2000: exception
2001: when others then
2002: retcode := 2;

Line 2003: errbuf := 'msc_item_pkg.export_item_inventory_f: '||sqlerrm;

1999:
2000: exception
2001: when others then
2002: retcode := 2;
2003: errbuf := 'msc_item_pkg.export_item_inventory_f: '||sqlerrm;
2004: msc_phub_util.log(errbuf);
2005: end export_item_inventory_f;
2006:
2007: procedure export_item_orders_f (

Line 2016: msc_phub_util.log('msc_item_pkg.export_item_orders_f');

2012: l_sql varchar2(5000);
2013: l_suffix varchar2(32) := msc_phub_util.suffix(p_dblink);
2014: l_apps_schema varchar2(30) := msc_phub_util.apps_schema;
2015: begin
2016: msc_phub_util.log('msc_item_pkg.export_item_orders_f');
2017: retcode := 0;
2018: errbuf := null;
2019:
2020: delete from msc_st_item_orders_f where st_transaction_id=p_st_transaction_id;

Line 2187: msc_phub_util.log('msc_item_pkg.export_item_orders_f: inserted='||sql%rowcount);

2183: ' and mtp2.sr_tp_id(+)=f.owning_org_id'||
2184: ' and mi.inventory_item_id(+)=f.inventory_item_id';
2185:
2186: execute immediate l_sql using p_st_transaction_id, p_plan_run_id;
2187: msc_phub_util.log('msc_item_pkg.export_item_orders_f: inserted='||sql%rowcount);
2188: commit;
2189: msc_phub_util.log('msc_item_pkg.export_item_orders_f: complete, retcode='||retcode);
2190:
2191: exception

Line 2189: msc_phub_util.log('msc_item_pkg.export_item_orders_f: complete, retcode='||retcode);

2185:
2186: execute immediate l_sql using p_st_transaction_id, p_plan_run_id;
2187: msc_phub_util.log('msc_item_pkg.export_item_orders_f: inserted='||sql%rowcount);
2188: commit;
2189: msc_phub_util.log('msc_item_pkg.export_item_orders_f: complete, retcode='||retcode);
2190:
2191: exception
2192: when others then
2193: retcode := 2;

Line 2194: errbuf := 'msc_item_pkg.export_item_orders_f: '||sqlerrm;

2190:
2191: exception
2192: when others then
2193: retcode := 2;
2194: errbuf := 'msc_item_pkg.export_item_orders_f: '||sqlerrm;
2195: msc_phub_util.log(errbuf);
2196: end export_item_orders_f;
2197:
2198: procedure import_item_inventory_f (

Line 2208: msc_phub_util.log('msc_item_pkg.import_item_inventory_f');

2204: l_staging_table varchar2(30) := 'msc_st_item_inventory_f';
2205: l_fact_table varchar2(30) := 'msc_item_inventory_f';
2206: l_result number := 0;
2207: begin
2208: msc_phub_util.log('msc_item_pkg.import_item_inventory_f');
2209: retcode := 0;
2210: errbuf := null;
2211:
2212: l_result := l_result + msc_phub_util.prepare_staging_dates(

Line 2232: msc_phub_util.log('msc_item_pkg.import_item_inventory_f: insert into msc_item_inventory_f');

2228:
2229: l_result := l_result + msc_phub_util.decode_item_key(
2230: l_staging_table, p_st_transaction_id, 'inventory_item_id', 'item_name');
2231:
2232: msc_phub_util.log('msc_item_pkg.import_item_inventory_f: insert into msc_item_inventory_f');
2233: insert into msc_item_inventory_f (
2234: plan_id,
2235: plan_run_id,
2236: sr_instance_id,

Line 2339: msc_phub_util.log('msc_item_pkg.import_item_inventory_f: inserted='||sql%rowcount);

2335: fnd_global.user_id, sysdate, fnd_global.login_id
2336: from msc_st_item_inventory_f
2337: where st_transaction_id=p_st_transaction_id and error_code=0;
2338:
2339: msc_phub_util.log('msc_item_pkg.import_item_inventory_f: inserted='||sql%rowcount);
2340: commit;
2341:
2342: summarize_item_inventory_f(errbuf, retcode, p_plan_id, p_plan_run_id);
2343:

Line 2348: msc_phub_util.log('msc_item_pkg.import_item_inventory_f: complete, retcode='||retcode);

2344: if (l_result > 0) then
2345: retcode := -1;
2346: end if;
2347:
2348: msc_phub_util.log('msc_item_pkg.import_item_inventory_f: complete, retcode='||retcode);
2349:
2350: exception
2351: when others then
2352: retcode := 2;

Line 2353: errbuf := 'msc_item_pkg.import_item_inventory_f: '||sqlerrm;

2349:
2350: exception
2351: when others then
2352: retcode := 2;
2353: errbuf := 'msc_item_pkg.import_item_inventory_f: '||sqlerrm;
2354: raise;
2355: end import_item_inventory_f;
2356:
2357: procedure import_item_orders_f (

Line 2367: msc_phub_util.log('msc_item_pkg.import_item_orders_f');

2363: l_staging_table varchar2(30) := 'msc_st_item_orders_f';
2364: l_fact_table varchar2(30) := 'msc_item_orders_f';
2365: l_result number := 0;
2366: begin
2367: msc_phub_util.log('msc_item_pkg.import_item_orders_f');
2368: retcode := 0;
2369: errbuf := null;
2370:
2371: l_result := l_result + msc_phub_util.prepare_staging_dates(

Line 2391: msc_phub_util.log('msc_item_pkg.import_item_orders_f: insert into msc_st_item_orders_f');

2387:
2388: l_result := l_result + msc_phub_util.decode_item_key(
2389: l_staging_table, p_st_transaction_id, 'inventory_item_id', 'item_name');
2390:
2391: msc_phub_util.log('msc_item_pkg.import_item_orders_f: insert into msc_st_item_orders_f');
2392: insert into msc_item_orders_f (
2393: plan_id,
2394: plan_run_id,
2395: sr_instance_id,

Line 2528: msc_phub_util.log('msc_item_pkg.import_item_orders_f: inserted='||sql%rowcount);

2524: fnd_global.user_id, sysdate, fnd_global.login_id
2525: from msc_st_item_orders_f
2526: where st_transaction_id=p_st_transaction_id and error_code=0;
2527:
2528: msc_phub_util.log('msc_item_pkg.import_item_orders_f: inserted='||sql%rowcount);
2529: commit;
2530:
2531: summarize_item_orders_f(errbuf, retcode, p_plan_id, p_plan_run_id);
2532:

Line 2537: msc_phub_util.log('msc_item_pkg.import_item_orders_f: complete, retcode='||retcode);

2533: if (l_result > 0) then
2534: retcode := -1;
2535: end if;
2536:
2537: msc_phub_util.log('msc_item_pkg.import_item_orders_f: complete, retcode='||retcode);
2538:
2539: exception
2540: when others then
2541: retcode := 2;

Line 2542: errbuf := 'msc_item_pkg.import_item_orders_f: '||sqlerrm;

2538:
2539: exception
2540: when others then
2541: retcode := 2;
2542: errbuf := 'msc_item_pkg.import_item_orders_f: '||sqlerrm;
2543: raise;
2544: end import_item_orders_f;
2545:
2546: end msc_item_pkg;

Line 2546: end msc_item_pkg;

2542: errbuf := 'msc_item_pkg.import_item_orders_f: '||sqlerrm;
2543: raise;
2544: end import_item_orders_f;
2545:
2546: end msc_item_pkg;