DBA Data[Home] [Help]

APPS.MSC_PHUB_EXCESS_PKG dependencies on MSC_PHUB_UTIL

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

10: l_sr_instance_id number;
11: l_item_simulation_set_id number;
12: l_qid_eo number;
13: l_sim_plan_id number;
14: l_owning_currency_code varchar2(20) := msc_phub_util.get_owning_currency_code(p_plan_run_id);
15: l_start_time timestamp := systimestamp;
16: l_transfer_id number := null;
17: l_enforce_wh_cpty number := 2;
18: begin

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 93: msc_phub_util.log('l_qid_eo='||l_qid_eo||', count='||sql%rowcount);

89: from msc_system_items msi
90: where msi.plan_id=l_sim_plan_id
91: and nvl(msi.simulation_set_id, -23453)=l_item_simulation_set_id;
92:
93: msc_phub_util.log('l_qid_eo='||l_qid_eo||', count='||sql%rowcount);
94: commit;
95: end if;
96: else
97: if (l_plan_type=6) 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 149: msc_phub_util.log('l_qid_eo='||l_qid_eo||', count='||sql%rowcount);

145: and mia.organization_id=msi.organization_id
146: and mia.inventory_item_id=msi.inventory_item_id;
147:
148: /* and (msi.obsolescence_date is not null or msi.excess_horizon is not null);*/
149: msc_phub_util.log('l_qid_eo='||l_qid_eo||', count='||sql%rowcount);
150: commit;
151: end if;
152: end if;
153:

Line 344: msc_phub_util.log('insert into msc_st_items_f:eo: '||sql%rowcount);

340: sdt.sr_instance_id,
341: sdt.organization_id,
342: sdt.inventory_item_id;
343:
344: msc_phub_util.log('insert into msc_st_items_f:eo: '||sql%rowcount);
345: commit;
346: end if;
347:
348: if (l_enforce_wh_cpty = 1 and l_plan_type = 4) then

Line 389: msc_phub_util.log('insert into msc_st_items_f:wh_available_capacity: '||sql%rowcount);

385: and mtp.maximum_volume is not null
386: and mtp.volume_uom=uc.uom_code
387: and mtp.sr_instance_id=uc.sr_instance_id
388: and uc.inventory_item_id=0;
389: msc_phub_util.log('insert into msc_st_items_f:wh_available_capacity: '||sql%rowcount);
390: commit;
391: else
392: -- msc_items_f:wh_available_capacity_cat
393: insert /*+ append nologging */ into msc_st_items_f (

Line 429: msc_phub_util.log('insert into msc_st_items_f:wh_available_capacity_cat: '||sql%rowcount);

425: and po.organization_id=mwc.organization_id
426: and mwc.capacity_uom=uc.uom_code(+)
427: and mwc.sr_instance_id=uc.sr_instance_id(+)
428: and uc.inventory_item_id(+)=0;
429: msc_phub_util.log('insert into msc_st_items_f:wh_available_capacity_cat: '||sql%rowcount);
430: commit;
431: end if;
432: end if;
433:

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

511: organization_id,
512: owning_inst_id,
513: owning_org_id,
514: inventory_item_id;
515: msc_phub_util.log('insert into msc_items_f:final: '||sql%rowcount);
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);

Line 518: msc_phub_util.gather_table_stats(msc_phub_util.stats_fact, 'MSC_ITEMS_F', p_plan_run_id);

514: inventory_item_id;
515: msc_phub_util.log('insert into msc_items_f:final: '||sql%rowcount);
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

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 525: errbuf := msc_phub_util.get_planning_hub_message('MSC_HUB_POPULATE_ERROR')||':'||sqlerrm;

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

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

637: p_st_transaction_id number, p_plan_run_id number,
638: p_dblink varchar2, p_source_version varchar2)
639: is
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;

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

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

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

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

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 809: l_result := l_result + msc_phub_util.prepare_fact_dates(

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(
810: l_fact_table, 1, null, p_plan_id, p_plan_run_id,
811: p_upload_mode, p_overwrite_after_date);
812:
813: l_result := l_result + msc_phub_util.decode_organization_key(

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

809: l_result := l_result + msc_phub_util.prepare_fact_dates(
810: l_fact_table, 1, null, p_plan_id, p_plan_run_id,
811: p_upload_mode, p_overwrite_after_date);
812:
813: l_result := l_result + msc_phub_util.decode_organization_key(
814: l_staging_table, p_st_transaction_id, p_def_instance_code,
815: 'sr_instance_id', 'organization_id', 'organization_code');
816:
817: l_result := l_result + msc_phub_util.decode_organization_key(

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

813: l_result := l_result + msc_phub_util.decode_organization_key(
814: l_staging_table, p_st_transaction_id, p_def_instance_code,
815: 'sr_instance_id', 'organization_id', 'organization_code');
816:
817: l_result := l_result + msc_phub_util.decode_organization_key(
818: l_staging_table, p_st_transaction_id, p_def_instance_code,
819: 'owning_inst_id', 'owning_org_id', 'owning_org_code');
820:
821: l_result := l_result + msc_phub_util.decode_item_key(

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

817: l_result := l_result + msc_phub_util.decode_organization_key(
818: l_staging_table, p_st_transaction_id, p_def_instance_code,
819: 'owning_inst_id', 'owning_org_id', 'owning_org_code');
820:
821: l_result := l_result + msc_phub_util.decode_item_key(
822: l_staging_table, p_st_transaction_id, 'inventory_item_id', 'item_name');
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');

Line 824: l_result := l_result + msc_phub_util.decode_item_key2(

820:
821: l_result := l_result + msc_phub_util.decode_item_key(
822: l_staging_table, p_st_transaction_id, 'inventory_item_id', 'item_name');
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 (

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

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;