DBA Data[Home] [Help]

APPS.MSC_ITEM_PKG dependencies on MSC_PHUB_UTIL

Line 16: l_owning_currency_code varchar2(20) := msc_phub_util.get_owning_currency_code(p_plan_run_id);

12: l_plan_cutoff_date date;
13: l_plan_type number;
14: l_sr_instance_id number;
15: l_plan_days number;
16: l_owning_currency_code varchar2(20) := msc_phub_util.get_owning_currency_code(p_plan_run_id);
17: l_refresh_mode number;
18: l_item_rn_qid number;
19: l_qid_last_date1 number;
20: l_rowcount1 number := 0;

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 45: l_item_rn_qid := msc_phub_util.get_item_rn_qid(p_plan_id, p_plan_run_id);

41: where plan_run_id=p_plan_run_id;
42:
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_item_inventory_f
48: where plan_id=p_plan_id
49: and plan_run_id=p_plan_run_id

Line 54: msc_phub_util.log('msc_item_inventory_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_item_inventory_f, delete='||sql%rowcount||', l_rowcount1='||l_rowcount1);
55: commit;
56:
57: delete from msc_item_orders_f
58: where plan_id=p_plan_id

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

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

Line 76: l_qid_last_date1 := msc_phub_util.get_reporting_dates(l_plan_start_date, l_plan_cutoff_date);

72: where plan_id=p_plan_id
73: and plan_run_id=p_plan_run_id;
74:
75: l_plan_days := (l_plan_cutoff_date - l_plan_start_date + 1);
76: l_qid_last_date1 := msc_phub_util.get_reporting_dates(l_plan_start_date, l_plan_cutoff_date);
77:
78: select nvl(enforce_wrh_cpty,2)
79: into l_enforce_wh_cpty
80: from msc_plans

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 202: msc_phub_util.log('insert into msc_st_item_orders_f:demands: '||sql%rowcount);

198: f.owning_org_id,
199: f.inventory_item_id,
200: d.date2;
201:
202: msc_phub_util.log('insert into msc_st_item_orders_f:demands: '||sql%rowcount);
203: commit;
204:
205: -- msc_st_item_orders_f:supplies
206: insert /*+ append nologging */ into msc_st_item_orders_f (

Line 359: msc_phub_util.log('insert into msc_st_item_orders_f:supplies: '||sql%rowcount);

355: f.owning_org_id,
356: f.inventory_item_id,
357: d.date2;
358:
359: msc_phub_util.log('insert into msc_st_item_orders_f:supplies: '||sql%rowcount);
360: commit;
361:
362: if l_plan_type not in (5) and p_plan_id <> -1 then
363: -- msc_st_item_orders_f:supply end-pegged

Line 438: msc_phub_util.log('insert into msc_st_item_orders_f:supply end-pegged: '||sql%rowcount);

434: mfp.organization_id,
435: mfp.inventory_item_id,
436: trunc(nvl(ms.firm_date, ms.new_schedule_date));
437:
438: msc_phub_util.log('insert into msc_st_item_orders_f:supply end-pegged: '||sql%rowcount);
439: commit;
440: end if;
441:
442: -- msc_st_item_orders_f:demand pegged

Line 511: msc_phub_util.log('insert into msc_st_item_orders_f:demand pegged: '||sql%rowcount);

507: mfp.organization_id,
508: mfp.inventory_item_id,
509: trunc(mfp.demand_date);
510:
511: msc_phub_util.log('insert into msc_st_item_orders_f:demand pegged: '||sql%rowcount);
512: commit;
513:
514: -- msc_st_item_orders_f:exception
515: -- bnaghi - not available for DRP plans

Line 568: msc_phub_util.log('insert into msc_st_item_orders_f:exception: '||sql%rowcount);

564: me.owning_org_id,
565: me.inventory_item_id,
566: me.analysis_date;
567:
568: msc_phub_util.log('insert into msc_st_item_orders_f:exception: '||sql%rowcount);
569: commit;
570:
571: -- msc_item_orders_f:final
572: msc_phub_util.gather_table_stats(msc_phub_util.stats_st, 'MSC_ST_ITEM_ORDERS_F', l_transfer_id);

Line 572: msc_phub_util.gather_table_stats(msc_phub_util.stats_st, 'MSC_ST_ITEM_ORDERS_F', l_transfer_id);

568: msc_phub_util.log('insert into msc_st_item_orders_f:exception: '||sql%rowcount);
569: commit;
570:
571: -- msc_item_orders_f:final
572: msc_phub_util.gather_table_stats(msc_phub_util.stats_st, 'MSC_ST_ITEM_ORDERS_F', l_transfer_id);
573: insert into msc_item_orders_f (
574: plan_id,
575: plan_run_id,
576: sr_instance_id,

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

793: and fnd_profile.value('MSC_HUB_CUR_CODE_RPT')=mcc.to_currency(+)
794: and f.order_date=mcc.calendar_date(+);
795:
796: l_rowcount1 := l_rowcount1 + sql%rowcount;
797: msc_phub_util.log('insert into msc_item_orders_f:final: '||sql%rowcount);
798: commit;
799: msc_phub_util.gather_table_stats(msc_phub_util.stats_fact, 'MSC_ITEM_ORDERS_F', p_plan_run_id);
800:
801: -- msc_st_item_inventory_f:pab

Line 799: msc_phub_util.gather_table_stats(msc_phub_util.stats_fact, 'MSC_ITEM_ORDERS_F', p_plan_run_id);

795:
796: l_rowcount1 := l_rowcount1 + sql%rowcount;
797: msc_phub_util.log('insert into msc_item_orders_f:final: '||sql%rowcount);
798: commit;
799: msc_phub_util.gather_table_stats(msc_phub_util.stats_fact, 'MSC_ITEM_ORDERS_F', p_plan_run_id);
800:
801: -- msc_st_item_inventory_f:pab
802: insert /*+ append nologging */ into msc_st_item_inventory_f (
803: st_transaction_id,

Line 863: msc_phub_util.log('insert into msc_st_item_inventory_f:pab: '||sql%rowcount);

859: f.inventory_item_id,
860: nvl(i.vmi_flag,0),
861: d.date2;
862:
863: msc_phub_util.log('insert into msc_st_item_inventory_f:pab: '||sql%rowcount);
864: commit;
865:
866: -- msc_st_item_inventory_f:sno pab
867: insert /*+ append nologging */ into msc_st_item_inventory_f (

Line 934: msc_phub_util.log('insert into msc_st_item_inventory_f:sno pab: '||sql%rowcount);

930: and t.sr_instance_id=i.sr_instance_id
931: and t.organization_id=i.organization_id
932: and t.inventory_item_id=i.inventory_item_id;
933:
934: msc_phub_util.log('insert into msc_st_item_inventory_f:sno pab: '||sql%rowcount);
935: commit;
936:
937: -- msc_st_item_inventory_f:safety_stock_qty
938: insert /*+ append nologging */ into msc_st_item_inventory_f (

Line 1025: msc_phub_util.log('insert into msc_st_item_inventory_f:safety_stock_qty: '||sql%rowcount);

1021: and t.organization_id=mtp.sr_tp_id(+)
1022: and mtp.partner_type(+)=3
1023: and l_plan_type not in(5);
1024:
1025: msc_phub_util.log('insert into msc_st_item_inventory_f:safety_stock_qty: '||sql%rowcount);
1026: commit;
1027:
1028: ------------------------------------------------------------------------------------
1029: --- in msc_inventory_level, even if it is day bucket, if it is

Line 1129: msc_phub_util.log('insert into msc_st_item_inventory_f:min_inventory_level: '||sql%rowcount);

1125: and t.sr_instance_id=mtp.sr_instance_id(+)
1126: and t.organization_id=mtp.sr_tp_id(+)
1127: and mtp.partner_type(+)=3;
1128:
1129: msc_phub_util.log('insert into msc_st_item_inventory_f:min_inventory_level: '||sql%rowcount);
1130: commit;
1131:
1132: -- msc_st_item_inventory_f:inventory_value
1133: -- bnaghi :not calculated for DRP plans

Line 1197: msc_phub_util.log('insert into msc_st_item_inventory_f:inventory_value: '||sql%rowcount);

1193: mbid.inventory_item_id,
1194: nvl(i.vmi_flag,0),
1195: d.mfg_week_end_date;
1196:
1197: msc_phub_util.log('insert into msc_st_item_inventory_f:inventory_value: '||sql%rowcount);
1198: commit;
1199:
1200:
1201:

Line 1272: msc_phub_util.log('insert into msc_st_item_inventory_f:warehouse_req: '||sql%rowcount);

1268: mwr.inventory_item_id,
1269: nvl(i.vmi_flag,0),
1270: d.mfg_week_end_date;
1271:
1272: msc_phub_util.log('insert into msc_st_item_inventory_f:warehouse_req: '||sql%rowcount);
1273: commit;
1274: else
1275: -- msc_st_item_inventory_f:avg_daily_demand
1276: insert /*+ append nologging */ into msc_st_item_inventory_f (

Line 1329: msc_phub_util.log('insert into msc_st_item_inventory_f:avg_daily_demand: '||sql%rowcount);

1325: f.inventory_item_id,
1326: nvl(i.vmi_flag,0),
1327: d.mfg_week_end_date;
1328:
1329: msc_phub_util.log('insert into msc_st_item_inventory_f:avg_daily_demand: '||sql%rowcount);
1330: commit;
1331: end if;
1332:
1333: -- msc_item_inventory_f:final

Line 1334: msc_phub_util.gather_table_stats(msc_phub_util.stats_st, 'MSC_ST_ITEM_INVENTORY_F', l_transfer_id);

1330: commit;
1331: end if;
1332:
1333: -- msc_item_inventory_f:final
1334: msc_phub_util.gather_table_stats(msc_phub_util.stats_st, 'MSC_ST_ITEM_INVENTORY_F', l_transfer_id);
1335: msc_phub_util.unusuable_local_index('MSC_ITEM_INVENTORY_F', p_plan_run_id, 1);
1336: insert into msc_item_inventory_f (
1337: plan_id,
1338: plan_run_id,

Line 1335: msc_phub_util.unusuable_local_index('MSC_ITEM_INVENTORY_F', p_plan_run_id, 1);

1331: end if;
1332:
1333: -- msc_item_inventory_f:final
1334: msc_phub_util.gather_table_stats(msc_phub_util.stats_st, 'MSC_ST_ITEM_INVENTORY_F', l_transfer_id);
1335: msc_phub_util.unusuable_local_index('MSC_ITEM_INVENTORY_F', p_plan_run_id, 1);
1336: insert into msc_item_inventory_f (
1337: plan_id,
1338: plan_run_id,
1339: sr_instance_id,

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

1517: and fnd_profile.value('MSC_HUB_CUR_CODE_RPT')=mcc.to_currency(+)
1518: and f.order_date=mcc.calendar_date(+);
1519:
1520: l_rowcount2 := l_rowcount2 + sql%rowcount;
1521: msc_phub_util.log('insert into msc_item_inventory_f:final: '||sql%rowcount);
1522: commit;
1523: msc_phub_util.unusuable_local_index('MSC_ITEM_INVENTORY_F', p_plan_run_id, 2);
1524: msc_phub_util.gather_table_stats(msc_phub_util.stats_fact, 'MSC_ITEM_INVENTORY_F', p_plan_run_id);
1525:

Line 1523: msc_phub_util.unusuable_local_index('MSC_ITEM_INVENTORY_F', p_plan_run_id, 2);

1519:
1520: l_rowcount2 := l_rowcount2 + sql%rowcount;
1521: msc_phub_util.log('insert into msc_item_inventory_f:final: '||sql%rowcount);
1522: commit;
1523: msc_phub_util.unusuable_local_index('MSC_ITEM_INVENTORY_F', p_plan_run_id, 2);
1524: msc_phub_util.gather_table_stats(msc_phub_util.stats_fact, 'MSC_ITEM_INVENTORY_F', p_plan_run_id);
1525:
1526: if (l_rowcount1 > 0) then
1527: summarize_item_orders_f(errbuf, retcode, p_plan_id, p_plan_run_id);

Line 1524: msc_phub_util.gather_table_stats(msc_phub_util.stats_fact, 'MSC_ITEM_INVENTORY_F', p_plan_run_id);

1520: l_rowcount2 := l_rowcount2 + sql%rowcount;
1521: msc_phub_util.log('insert into msc_item_inventory_f:final: '||sql%rowcount);
1522: commit;
1523: msc_phub_util.unusuable_local_index('MSC_ITEM_INVENTORY_F', p_plan_run_id, 2);
1524: msc_phub_util.gather_table_stats(msc_phub_util.stats_fact, 'MSC_ITEM_INVENTORY_F', p_plan_run_id);
1525:
1526: if (l_rowcount1 > 0) then
1527: summarize_item_orders_f(errbuf, retcode, p_plan_id, p_plan_run_id);
1528: end if;

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 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 1858: l_suffix varchar2(32) := msc_phub_util.suffix(p_dblink);

1854: p_st_transaction_id number, p_plan_run_id number,
1855: p_dblink varchar2, p_source_version varchar2)
1856: is
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;

Line 1859: l_apps_schema varchar2(30) := msc_phub_util.apps_schema;

1855: p_dblink varchar2, p_source_version varchar2)
1856: is
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;

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 2004: msc_phub_util.log(errbuf);

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 (
2008: errbuf out nocopy varchar2, retcode out nocopy varchar2,

Line 2013: l_suffix varchar2(32) := msc_phub_util.suffix(p_dblink);

2009: p_st_transaction_id number, p_plan_run_id number,
2010: p_dblink varchar2, p_source_version varchar2)
2011: is
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;

Line 2014: l_apps_schema varchar2(30) := msc_phub_util.apps_schema;

2010: p_dblink varchar2, p_source_version varchar2)
2011: is
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;

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 2195: msc_phub_util.log(errbuf);

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 (
2199: errbuf out nocopy varchar2, retcode out nocopy varchar2,

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 2212: l_result := l_result + msc_phub_util.prepare_staging_dates(

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(
2213: l_staging_table, 'order_date', p_st_transaction_id,
2214: p_upload_mode, p_overwrite_after_date,
2215: p_plan_start_date, p_plan_cutoff_date);
2216:

Line 2217: l_result := l_result + msc_phub_util.prepare_fact_dates(

2213: l_staging_table, 'order_date', p_st_transaction_id,
2214: p_upload_mode, p_overwrite_after_date,
2215: p_plan_start_date, p_plan_cutoff_date);
2216:
2217: l_result := l_result + msc_phub_util.prepare_fact_dates(
2218: l_fact_table, 1, 'order_date', p_plan_id, p_plan_run_id,
2219: p_upload_mode, p_overwrite_after_date);
2220:
2221: l_result := l_result + msc_phub_util.decode_organization_key(

Line 2221: l_result := l_result + msc_phub_util.decode_organization_key(

2217: l_result := l_result + msc_phub_util.prepare_fact_dates(
2218: l_fact_table, 1, 'order_date', p_plan_id, p_plan_run_id,
2219: p_upload_mode, p_overwrite_after_date);
2220:
2221: l_result := l_result + msc_phub_util.decode_organization_key(
2222: l_staging_table, p_st_transaction_id, p_def_instance_code,
2223: 'sr_instance_id', 'organization_id', 'organization_code');
2224:
2225: l_result := l_result + msc_phub_util.decode_organization_key(

Line 2225: l_result := l_result + msc_phub_util.decode_organization_key(

2221: l_result := l_result + msc_phub_util.decode_organization_key(
2222: l_staging_table, p_st_transaction_id, p_def_instance_code,
2223: 'sr_instance_id', 'organization_id', 'organization_code');
2224:
2225: l_result := l_result + msc_phub_util.decode_organization_key(
2226: l_staging_table, p_st_transaction_id, p_def_instance_code,
2227: 'owning_inst_id', 'owning_org_id', 'owning_org_code');
2228:
2229: l_result := l_result + msc_phub_util.decode_item_key(

Line 2229: l_result := l_result + msc_phub_util.decode_item_key(

2225: l_result := l_result + msc_phub_util.decode_organization_key(
2226: l_staging_table, p_st_transaction_id, p_def_instance_code,
2227: 'owning_inst_id', 'owning_org_id', 'owning_org_code');
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 (

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 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 2371: l_result := l_result + msc_phub_util.prepare_staging_dates(

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(
2372: l_staging_table, 'order_date', p_st_transaction_id,
2373: p_upload_mode, p_overwrite_after_date,
2374: p_plan_start_date, p_plan_cutoff_date);
2375:

Line 2376: l_result := l_result + msc_phub_util.prepare_fact_dates(

2372: l_staging_table, 'order_date', p_st_transaction_id,
2373: p_upload_mode, p_overwrite_after_date,
2374: p_plan_start_date, p_plan_cutoff_date);
2375:
2376: l_result := l_result + msc_phub_util.prepare_fact_dates(
2377: l_fact_table, 1, 'order_date', p_plan_id, p_plan_run_id,
2378: p_upload_mode, p_overwrite_after_date);
2379:
2380: l_result := l_result + msc_phub_util.decode_organization_key(

Line 2380: l_result := l_result + msc_phub_util.decode_organization_key(

2376: l_result := l_result + msc_phub_util.prepare_fact_dates(
2377: l_fact_table, 1, 'order_date', p_plan_id, p_plan_run_id,
2378: p_upload_mode, p_overwrite_after_date);
2379:
2380: l_result := l_result + msc_phub_util.decode_organization_key(
2381: l_staging_table, p_st_transaction_id, p_def_instance_code,
2382: 'sr_instance_id', 'organization_id', 'organization_code');
2383:
2384: l_result := l_result + msc_phub_util.decode_organization_key(

Line 2384: l_result := l_result + msc_phub_util.decode_organization_key(

2380: l_result := l_result + msc_phub_util.decode_organization_key(
2381: l_staging_table, p_st_transaction_id, p_def_instance_code,
2382: 'sr_instance_id', 'organization_id', 'organization_code');
2383:
2384: l_result := l_result + msc_phub_util.decode_organization_key(
2385: l_staging_table, p_st_transaction_id, p_def_instance_code,
2386: 'owning_inst_id', 'owning_org_id', 'owning_org_code');
2387:
2388: l_result := l_result + msc_phub_util.decode_item_key(

Line 2388: l_result := l_result + msc_phub_util.decode_item_key(

2384: l_result := l_result + msc_phub_util.decode_organization_key(
2385: l_staging_table, p_st_transaction_id, p_def_instance_code,
2386: 'owning_inst_id', 'owning_org_id', 'owning_org_code');
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 (

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;