DBA Data[Home] [Help]

APPS.MSC_PHUB_EXCESS_PKG dependencies on MSC_PHUB_EXCESS_PKG

Line 1: package body msc_phub_excess_pkg as

1: package body msc_phub_excess_pkg as
2: /* $Header: MSCHBESB.pls 120.22.12020000.2 2012/10/11 13:57:33 wexia ship $ */
3:
4: procedure populate_details(errbuf out nocopy varchar2, retcode out nocopy varchar2,
5: p_plan_id number, p_plan_run_id number)

Line 19: msc_phub_util.log('msc_phub_excess_pkg.populate_details');

15: l_start_time timestamp := systimestamp;
16: l_transfer_id number := null;
17: l_enforce_wh_cpty number := 2;
18: begin
19: msc_phub_util.log('msc_phub_excess_pkg.populate_details');
20: retcode := 0;
21: errbuf := null;
22:
23:

Line 35: msc_phub_util.log('msc_phub_excess_pkg.populate_details: '||

31: into l_enforce_wh_cpty
32: from msc_plans
33: where plan_id=p_plan_id;
34:
35: msc_phub_util.log('msc_phub_excess_pkg.populate_details: '||
36: p_plan_id||','||p_plan_run_id||','||l_plan_type||','||
37: l_sr_instance_id||','||l_plan_start_date||','||l_plan_cutoff_date||','||
38: l_transfer_id||','||l_enforce_wh_cpty);
39:

Line 56: msc_phub_util.log('msc_phub_excess_pkg.populate_details: '||

52: exception
53: when others then null;
54: end;
55:
56: msc_phub_util.log('msc_phub_excess_pkg.populate_details: '||
57: 'l_item_simulation_set_id='||l_item_simulation_set_id||', '||
58: 'l_sim_plan_id='||l_sim_plan_id);
59:
60: if l_item_simulation_set_id is not null then

Line 108: msc_phub_util.log('msc_phub_excess_pkg.populate_details: '||

104: from msc_plans
105: where plan_id=p_plan_id;
106: end if;
107:
108: msc_phub_util.log('msc_phub_excess_pkg.populate_details: '||
109: 'l_item_simulation_set_id='||l_item_simulation_set_id);
110:
111: if l_item_simulation_set_id is not null then
112: select msc_hub_query_s.nextval into l_qid_eo from dual;

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

516: commit;
517:
518: msc_phub_util.gather_table_stats(msc_phub_util.stats_fact, 'MSC_ITEMS_F', p_plan_run_id);
519: summarize_items_f(errbuf, retcode, p_plan_id, p_plan_run_id);
520: msc_phub_util.log('msc_phub_excess_pkg.populate_details.complete, duration='||(systimestamp-l_start_time));
521:
522: exception
523: when others then
524: msc_phub_util.log('msc_phub_excess_pkg.populate_details.exception: '||sqlerrm);

Line 524: msc_phub_util.log('msc_phub_excess_pkg.populate_details.exception: '||sqlerrm);

520: msc_phub_util.log('msc_phub_excess_pkg.populate_details.complete, duration='||(systimestamp-l_start_time));
521:
522: exception
523: when others then
524: msc_phub_util.log('msc_phub_excess_pkg.populate_details.exception: '||sqlerrm);
525: errbuf := msc_phub_util.get_planning_hub_message('MSC_HUB_POPULATE_ERROR')||':'||sqlerrm;
526: retcode := 2;
527: end populate_details;
528:

Line 534: msc_phub_util.log('msc_phub_excess_pkg.summarize_items_f');

530: p_plan_id number, p_plan_run_id number)
531: is
532: l_category_set_id1 number := fnd_profile.value('MSC_HUB_CAT_SET_ID_1');
533: begin
534: msc_phub_util.log('msc_phub_excess_pkg.summarize_items_f');
535: retcode := 0;
536: errbuf := '';
537:
538: delete from msc_items_f

Line 540: msc_phub_util.log('msc_phub_excess_pkg.summarize_items_f, delete='||sql%rowcount);

536: errbuf := '';
537:
538: delete from msc_items_f
539: where plan_id=p_plan_id and plan_run_id=p_plan_run_id and aggr_type>0;
540: msc_phub_util.log('msc_phub_excess_pkg.summarize_items_f, delete='||sql%rowcount);
541: commit;
542:
543: -- level 1
544: insert into msc_items_f (

Line 624: msc_phub_util.log('msc_phub_excess_pkg.summarize_items_f, level1='||sql%rowcount);

620: f.sr_instance_id, f.organization_id,
621: f.owning_inst_id, f.owning_org_id,
622: nvl(q.sr_category_id, -23453);
623:
624: msc_phub_util.log('msc_phub_excess_pkg.summarize_items_f, level1='||sql%rowcount);
625: commit;
626:
627: exception
628: when others then

Line 630: errbuf := 'msc_phub_excess_pkg.summarize_demands_f: '||sqlerrm;

626:
627: exception
628: when others then
629: retcode := 2;
630: errbuf := 'msc_phub_excess_pkg.summarize_demands_f: '||sqlerrm;
631: raise;
632:
633: end summarize_items_f;
634:

Line 644: msc_phub_util.log('msc_phub_excess_pkg.export_items_f');

640: l_sql varchar2(5000);
641: l_suffix varchar2(32) := msc_phub_util.suffix(p_dblink);
642: l_apps_schema varchar2(30) := msc_phub_util.apps_schema;
643: begin
644: msc_phub_util.log('msc_phub_excess_pkg.export_items_f');
645: retcode := 0;
646: errbuf := null;
647:
648: delete from msc_st_items_f where st_transaction_id=p_st_transaction_id;

Line 784: msc_phub_util.log('msc_phub_excess_pkg.export_items_f: inserted='||sql%rowcount);

780: ' and mai.instance_id(+)=f.owning_inst_id';
781: end if;
782:
783: execute immediate l_sql using p_st_transaction_id, p_plan_run_id;
784: msc_phub_util.log('msc_phub_excess_pkg.export_items_f: inserted='||sql%rowcount);
785: commit;
786: msc_phub_util.log('msc_phub_excess_pkg.export_items_f: complete, retcode='||retcode);
787:
788: exception

Line 786: msc_phub_util.log('msc_phub_excess_pkg.export_items_f: complete, retcode='||retcode);

782:
783: execute immediate l_sql using p_st_transaction_id, p_plan_run_id;
784: msc_phub_util.log('msc_phub_excess_pkg.export_items_f: inserted='||sql%rowcount);
785: commit;
786: msc_phub_util.log('msc_phub_excess_pkg.export_items_f: complete, retcode='||retcode);
787:
788: exception
789: when others then
790: retcode := 2;

Line 791: errbuf := 'msc_phub_excess_pkg.export_items_f: '||sqlerrm;

787:
788: exception
789: when others then
790: retcode := 2;
791: errbuf := 'msc_phub_excess_pkg.export_items_f: '||sqlerrm;
792: msc_phub_util.log(errbuf);
793: end export_items_f;
794:
795: procedure import_items_f (

Line 805: msc_phub_util.log('msc_phub_excess_pkg.import_items_f');

801: l_staging_table varchar2(30) := 'msc_st_items_f';
802: l_fact_table varchar2(30) := 'msc_items_f';
803: l_result number := 0;
804: begin
805: msc_phub_util.log('msc_phub_excess_pkg.import_items_f');
806: retcode := 0;
807: errbuf := null;
808:
809: l_result := l_result + msc_phub_util.prepare_fact_dates(

Line 827: msc_phub_util.log('msc_phub_excess_pkg.import_items_f: insert into msc_items_f');

823:
824: l_result := l_result + msc_phub_util.decode_item_key2(
825: l_staging_table, p_st_transaction_id, 'inventory_item_id', 'owning_inst_id', 'category_instance_code', 'category_name', 'item_name');
826:
827: msc_phub_util.log('msc_phub_excess_pkg.import_items_f: insert into msc_items_f');
828: insert into msc_items_f (
829: plan_id,
830: plan_run_id,
831: sr_instance_id,

Line 896: msc_phub_util.log('msc_phub_excess_pkg.import_items_f: inserted='||sql%rowcount);

892: fnd_global.user_id, sysdate, fnd_global.login_id
893: from msc_st_items_f
894: where st_transaction_id=p_st_transaction_id and error_code=0;
895:
896: msc_phub_util.log('msc_phub_excess_pkg.import_items_f: inserted='||sql%rowcount);
897: commit;
898:
899: summarize_items_f(errbuf, retcode, p_plan_id, p_plan_run_id);
900:

Line 905: msc_phub_util.log('msc_phub_excess_pkg.import_items_f: complete, retcode='||retcode);

901: if (l_result > 0) then
902: retcode := -1;
903: end if;
904:
905: msc_phub_util.log('msc_phub_excess_pkg.import_items_f: complete, retcode='||retcode);
906:
907: exception
908: when others then
909: retcode := 2;

Line 910: errbuf := 'msc_phub_excess_pkg.import_items_f: '||sqlerrm;

906:
907: exception
908: when others then
909: retcode := 2;
910: errbuf := 'msc_phub_excess_pkg.import_items_f: '||sqlerrm;
911: msc_phub_util.log(errbuf);
912: end import_items_f;
913:
914: end msc_phub_excess_pkg;

Line 914: end msc_phub_excess_pkg;

910: errbuf := 'msc_phub_excess_pkg.import_items_f: '||sqlerrm;
911: msc_phub_util.log(errbuf);
912: end import_items_f;
913:
914: end msc_phub_excess_pkg;