DBA Data[Home] [Help]

APPS.MSC_SUPPLIER_PKG dependencies on MSC_PHUB_UTIL

Line 20: msc_phub_util.log('msc_supplier_pkg.populate_details');

16: l_rowcount number;
17: l_start_time timestamp := systimestamp;
18: l_enable_num number := nvl(fnd_profile.value('MSC_APCC_ENABLE_CUM'), 1);
19: begin
20: msc_phub_util.log('msc_supplier_pkg.populate_details');
21: retcode := 0;
22: errbuf := null;
23:
24: select plan_type, sr_instance_id, plan_start_date, plan_cutoff_date, temp_transfer_id

Line 33: l_plan_constrained := msc_phub_util.is_plan_constrained(p_plan_id);

29:
30: if l_plan_type in (101,102,103,105) then
31: l_plan_constrained := SYS_NO;
32: else
33: l_plan_constrained := msc_phub_util.is_plan_constrained(p_plan_id);
34: end if;
35:
36: l_qid_last_date := msc_phub_util.get_reporting_dates(l_plan_start_date, l_plan_cutoff_date);
37:

Line 36: l_qid_last_date := msc_phub_util.get_reporting_dates(l_plan_start_date, l_plan_cutoff_date);

32: else
33: l_plan_constrained := msc_phub_util.is_plan_constrained(p_plan_id);
34: end if;
35:
36: l_qid_last_date := msc_phub_util.get_reporting_dates(l_plan_start_date, l_plan_cutoff_date);
37:
38: -- msc_st_suppliers_f:required
39: insert /*+ append nologging */ into msc_st_suppliers_f (
40: st_transaction_id,

Line 137: msc_phub_util.log('insert into msc_st_suppliers_f:required: '||sql%rowcount);

133: f.supplier_id,
134: f.supplier_site_id,
135: d.date2;
136:
137: msc_phub_util.log('insert into msc_st_suppliers_f:required: '||sql%rowcount);
138: commit;
139:
140: -- l_qid_orgs
141: select msc_hub_query_s.nextval into l_qid_orgs from dual;

Line 165: msc_phub_util.log('l_qid_orgs='||l_qid_orgs||', count='||sql%rowcount);

161: where f.st_transaction_id=l_transfer_id
162: and f.error_code in (1);
163:
164: l_rowcount := sql%rowcount;
165: msc_phub_util.log('l_qid_orgs='||l_qid_orgs||', count='||sql%rowcount);
166: commit;
167:
168: if (l_rowcount = 0) then
169: insert /*+ append nologging */ into msc_hub_query (

Line 189: msc_phub_util.log('l_qid_orgs='||l_qid_orgs||', count='||sql%rowcount);

185: l_sr_instance_id,
186: -23453
187: from dual;
188:
189: msc_phub_util.log('l_qid_orgs='||l_qid_orgs||', count='||sql%rowcount);
190: commit;
191: end if;
192:
193:

Line 279: msc_phub_util.log('insert into msc_st_suppliers_f:available: '||sql%rowcount);

275: f.supplier_id,
276: f.supplier_site_id,
277: d.date2;
278:
279: msc_phub_util.log('insert into msc_st_suppliers_f:available: '||sql%rowcount);
280: commit;
281:
282: -- msc_st_suppliers_f:net
283: insert /*+ append nologging */ into msc_st_suppliers_f (

Line 347: msc_phub_util.log('insert into msc_st_suppliers_f:net: '||sql%rowcount);

343: f.supplier_id,
344: f.supplier_site_id,
345: f.analysis_date;
346:
347: msc_phub_util.log('insert into msc_st_suppliers_f:net: '||sql%rowcount);
348: commit;
349:
350: -- msc_st_suppliers_f:distributed
351: insert /*+ append nologging */ into msc_st_suppliers_f (

Line 425: msc_phub_util.log('insert into msc_st_suppliers_f:distributed: '||sql%rowcount);

421: f.supplier_id,
422: f.supplier_site_id,
423: f.analysis_date;
424:
425: msc_phub_util.log('insert into msc_st_suppliers_f:distributed: '||sql%rowcount);
426: commit;
427:
428: if (l_enable_num not in (2)) then
429: -- msc_st_suppliers_f:cum

Line 474: msc_phub_util.log('insert into msc_st_suppliers_f:cum: '||sql%rowcount);

470: f.inventory_item_id,
471: f.supplier_id,
472: f.supplier_site_id,
473: d.date2;
474: msc_phub_util.log('insert into msc_st_suppliers_f:cum: '||sql%rowcount);
475: commit;
476: end if;
477:
478: -- msc_st_suppliers_f:final

Line 479: msc_phub_util.unusuable_local_index('MSC_SUPPLIERS_F', p_plan_run_id, 1);

475: commit;
476: end if;
477:
478: -- msc_st_suppliers_f:final
479: msc_phub_util.unusuable_local_index('MSC_SUPPLIERS_F', p_plan_run_id, 1);
480: insert into msc_suppliers_f (
481: plan_id,
482: plan_run_id,
483: sr_instance_id,

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

534: f.supplier_id,
535: f.supplier_site_id,
536: f.analysis_date;
537:
538: msc_phub_util.log('insert into msc_suppliers_f:final: '||sql%rowcount);
539: commit;
540:
541: msc_phub_util.unusuable_local_index('MSC_SUPPLIERS_F', p_plan_run_id, 2);
542: msc_phub_util.gather_table_stats(msc_phub_util.stats_fact, 'MSC_SUPPLIERS_F', p_plan_run_id);

Line 541: msc_phub_util.unusuable_local_index('MSC_SUPPLIERS_F', p_plan_run_id, 2);

537:
538: msc_phub_util.log('insert into msc_suppliers_f:final: '||sql%rowcount);
539: commit;
540:
541: msc_phub_util.unusuable_local_index('MSC_SUPPLIERS_F', p_plan_run_id, 2);
542: msc_phub_util.gather_table_stats(msc_phub_util.stats_fact, 'MSC_SUPPLIERS_F', p_plan_run_id);
543:
544:
545: summarize_suppliers_f(errbuf, retcode, p_plan_id, p_plan_run_id);

Line 542: msc_phub_util.gather_table_stats(msc_phub_util.stats_fact, 'MSC_SUPPLIERS_F', p_plan_run_id);

538: msc_phub_util.log('insert into msc_suppliers_f:final: '||sql%rowcount);
539: commit;
540:
541: msc_phub_util.unusuable_local_index('MSC_SUPPLIERS_F', p_plan_run_id, 2);
542: msc_phub_util.gather_table_stats(msc_phub_util.stats_fact, 'MSC_SUPPLIERS_F', p_plan_run_id);
543:
544:
545: summarize_suppliers_f(errbuf, retcode, p_plan_id, p_plan_run_id);
546: msc_phub_util.log('msc_supplier_pkg.populate_details.complete, duration='||(systimestamp-l_start_time));

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

542: msc_phub_util.gather_table_stats(msc_phub_util.stats_fact, 'MSC_SUPPLIERS_F', p_plan_run_id);
543:
544:
545: summarize_suppliers_f(errbuf, retcode, p_plan_id, p_plan_run_id);
546: msc_phub_util.log('msc_supplier_pkg.populate_details.complete, duration='||(systimestamp-l_start_time));
547:
548: exception
549: when others then
550: msc_phub_util.log('msc_supplier_pkg.populate_details: '||sqlerrm);

Line 550: msc_phub_util.log('msc_supplier_pkg.populate_details: '||sqlerrm);

546: msc_phub_util.log('msc_supplier_pkg.populate_details.complete, duration='||(systimestamp-l_start_time));
547:
548: exception
549: when others then
550: msc_phub_util.log('msc_supplier_pkg.populate_details: '||sqlerrm);
551: raise;
552:
553: end populate_details;
554:

Line 560: msc_phub_util.log('msc_supplier_pkg.summarize_suppliers_f');

556: p_plan_id number, p_plan_run_id number)
557: is
558: l_category_set_id1 number := fnd_profile.value('MSC_HUB_CAT_SET_ID_1');
559: begin
560: msc_phub_util.log('msc_supplier_pkg.summarize_suppliers_f');
561: retcode := 0;
562: errbuf := '';
563:
564: delete from msc_suppliers_f

Line 566: msc_phub_util.log('msc_supplier_pkg.summarize_suppliers_f, delete='||sql%rowcount);

562: errbuf := '';
563:
564: delete from msc_suppliers_f
565: where plan_id=p_plan_id and plan_run_id=p_plan_run_id and aggr_type>0;
566: msc_phub_util.log('msc_supplier_pkg.summarize_suppliers_f, delete='||sql%rowcount);
567: commit;
568:
569: -- level 1
570: insert into msc_suppliers_f (

Line 620: msc_phub_util.log('msc_supplier_pkg.summarize_suppliers_f, level1='||sql%rowcount);

616: f.supplier_id, f.supplier_site_id,
617: f.analysis_date,
618: nvl(q.sr_category_id, -23453);
619:
620: msc_phub_util.log('msc_supplier_pkg.summarize_suppliers_f, level1='||sql%rowcount);
621: commit;
622:
623: exception
624: when others then

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

633: p_st_transaction_id number, p_plan_run_id number,
634: p_dblink varchar2, p_source_version varchar2)
635: is
636: l_sql varchar2(5000);
637: l_suffix varchar2(32) := msc_phub_util.suffix(p_dblink);
638: l_apps_schema varchar2(30) := msc_phub_util.apps_schema;
639: begin
640: msc_phub_util.log('msc_supplier_pkg.export_suppliers_f');
641: retcode := 0;

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

634: p_dblink varchar2, p_source_version varchar2)
635: is
636: l_sql varchar2(5000);
637: l_suffix varchar2(32) := msc_phub_util.suffix(p_dblink);
638: l_apps_schema varchar2(30) := msc_phub_util.apps_schema;
639: begin
640: msc_phub_util.log('msc_supplier_pkg.export_suppliers_f');
641: retcode := 0;
642: errbuf := null;

Line 640: msc_phub_util.log('msc_supplier_pkg.export_suppliers_f');

636: l_sql varchar2(5000);
637: l_suffix varchar2(32) := msc_phub_util.suffix(p_dblink);
638: l_apps_schema varchar2(30) := msc_phub_util.apps_schema;
639: begin
640: msc_phub_util.log('msc_supplier_pkg.export_suppliers_f');
641: retcode := 0;
642: errbuf := null;
643:
644: delete from msc_st_suppliers_f where st_transaction_id=p_st_transaction_id;

Line 713: msc_phub_util.log('msc_supplier_pkg.export_suppliers_f: complete, retcode='||retcode);

709: ' and smv.supplier_site_id(+)=f.supplier_site_id';
710:
711: execute immediate l_sql using p_st_transaction_id, p_plan_run_id;
712: commit;
713: msc_phub_util.log('msc_supplier_pkg.export_suppliers_f: complete, retcode='||retcode);
714:
715: exception
716: when others then
717: retcode := 2;

Line 719: msc_phub_util.log(errbuf);

715: exception
716: when others then
717: retcode := 2;
718: errbuf := 'msc_supplier_pkg.export_suppliers_f: '||sqlerrm;
719: msc_phub_util.log(errbuf);
720: end export_suppliers_f;
721:
722: procedure import_suppliers_f (
723: errbuf out nocopy varchar2, retcode out nocopy varchar2,

Line 732: msc_phub_util.log('msc_supplier_pkg.import_suppliers_f');

728: l_staging_table varchar2(30) := 'msc_st_suppliers_f';
729: l_fact_table varchar2(30) := 'msc_suppliers_f';
730: l_result number := 0;
731: begin
732: msc_phub_util.log('msc_supplier_pkg.import_suppliers_f');
733: retcode := 0;
734: errbuf := null;
735:
736: l_result := l_result + msc_phub_util.prepare_staging_dates(

Line 736: l_result := l_result + msc_phub_util.prepare_staging_dates(

732: msc_phub_util.log('msc_supplier_pkg.import_suppliers_f');
733: retcode := 0;
734: errbuf := null;
735:
736: l_result := l_result + msc_phub_util.prepare_staging_dates(
737: l_staging_table, 'analysis_date', p_st_transaction_id,
738: p_upload_mode, p_overwrite_after_date,
739: p_plan_start_date, p_plan_cutoff_date);
740:

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

737: l_staging_table, 'analysis_date', p_st_transaction_id,
738: p_upload_mode, p_overwrite_after_date,
739: p_plan_start_date, p_plan_cutoff_date);
740:
741: l_result := l_result + msc_phub_util.prepare_fact_dates(
742: l_fact_table, 1, 'analysis_date', p_plan_id, p_plan_run_id,
743: p_upload_mode, p_overwrite_after_date);
744:
745: l_result := l_result + msc_phub_util.decode_organization_key(

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

741: l_result := l_result + msc_phub_util.prepare_fact_dates(
742: l_fact_table, 1, 'analysis_date', p_plan_id, p_plan_run_id,
743: p_upload_mode, p_overwrite_after_date);
744:
745: l_result := l_result + msc_phub_util.decode_organization_key(
746: l_staging_table, p_st_transaction_id, p_def_instance_code,
747: 'sr_instance_id', 'organization_id', 'organization_code');
748:
749: l_result := l_result + msc_phub_util.decode_organization_key(

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

745: l_result := l_result + msc_phub_util.decode_organization_key(
746: l_staging_table, p_st_transaction_id, p_def_instance_code,
747: 'sr_instance_id', 'organization_id', 'organization_code');
748:
749: l_result := l_result + msc_phub_util.decode_organization_key(
750: l_staging_table, p_st_transaction_id, p_def_instance_code,
751: 'owning_inst_id', 'owning_org_id', 'owning_org_code');
752:
753: l_result := l_result + msc_phub_util.decode_item_key(

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

749: l_result := l_result + msc_phub_util.decode_organization_key(
750: l_staging_table, p_st_transaction_id, p_def_instance_code,
751: 'owning_inst_id', 'owning_org_id', 'owning_org_code');
752:
753: l_result := l_result + msc_phub_util.decode_item_key(
754: l_staging_table, p_st_transaction_id, 'inventory_item_id', 'item_name');
755:
756: l_result := l_result + msc_phub_util.decode_supplier_key(
757: l_staging_table, p_st_transaction_id,

Line 756: l_result := l_result + msc_phub_util.decode_supplier_key(

752:
753: l_result := l_result + msc_phub_util.decode_item_key(
754: l_staging_table, p_st_transaction_id, 'inventory_item_id', 'item_name');
755:
756: l_result := l_result + msc_phub_util.decode_supplier_key(
757: l_staging_table, p_st_transaction_id,
758: 'supplier_id', 'supplier_site_id',
759: 'supplier_name', 'supplier_site_code');
760:

Line 761: msc_phub_util.log('msc_supplier_pkg.import_suppliers_f: insert into msc_suppliers_f');

757: l_staging_table, p_st_transaction_id,
758: 'supplier_id', 'supplier_site_id',
759: 'supplier_name', 'supplier_site_code');
760:
761: msc_phub_util.log('msc_supplier_pkg.import_suppliers_f: insert into msc_suppliers_f');
762: insert into msc_suppliers_f (
763: plan_id,
764: plan_run_id,
765: sr_instance_id,

Line 802: msc_phub_util.log('msc_supplier_pkg.import_suppliers_f: inserted='||sql%rowcount);

798: fnd_global.user_id, sysdate, fnd_global.login_id
799: from msc_st_suppliers_f
800: where st_transaction_id=p_st_transaction_id and error_code=0;
801:
802: msc_phub_util.log('msc_supplier_pkg.import_suppliers_f: inserted='||sql%rowcount);
803: commit;
804:
805: summarize_suppliers_f(errbuf, retcode, p_plan_id, p_plan_run_id);
806:

Line 811: msc_phub_util.log('msc_supplier_pkg.import_suppliers_f: complete, retcode='||retcode);

807: if (l_result > 0) then
808: retcode := -1;
809: end if;
810:
811: msc_phub_util.log('msc_supplier_pkg.import_suppliers_f: complete, retcode='||retcode);
812:
813: exception
814: when others then
815: retcode := 2;

Line 817: msc_phub_util.log(errbuf);

813: exception
814: when others then
815: retcode := 2;
816: errbuf := 'msc_supplier_pkg.import_suppliers_f: '||sqlerrm;
817: msc_phub_util.log(errbuf);
818: end import_suppliers_f;
819:
820: end msc_supplier_pkg;