DBA Data[Home] [Help]

APPS.MSC_EXCEPTION_PKG dependencies on MSC_PHUB_UTIL

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

3:
4: procedure populate_details(errbuf out nocopy varchar2, retcode out nocopy varchar2,
5: p_plan_id number, p_plan_run_id number) IS
6:
7: l_owning_currency_code varchar2(20) := msc_phub_util.get_owning_currency_code(p_plan_run_id);
8: l_plan_start_date date;
9: l_plan_cutoff_date date;
10: l_plan_type number;
11: l_sr_instance_id number;

Line 14: msc_phub_util.log('msc_exception_pkg.populate_details:');

10: l_plan_type number;
11: l_sr_instance_id number;
12: l_start_time timestamp := systimestamp;
13: begin
14: msc_phub_util.log('msc_exception_pkg.populate_details:');
15: retcode := 0;
16: errbuf := null;
17:
18: select plan_type, sr_instance_id, plan_start_date, plan_cutoff_date

Line 221: 23,md.using_requirement_quantity * msc_phub_util.get_list_price

217: 15,med.quantity *nvl(msi.list_price,0) * (1-(nvl(msi.average_discount,0)/100)),
218: 16,med.quantity *nvl(msi.list_price,0) * (1-(nvl(msi.average_discount,0)/100)),
219: 17,abs(med.quantity) *nvl(msi.standard_cost,0),
220: 18,med.quantity *nvl(msi.standard_cost,0),
221: 23,md.using_requirement_quantity * msc_phub_util.get_list_price
222: (med.plan_id,med.sr_instance_id,med.organization_id,md.inventory_item_id),
223: 24,abs(med.quantity) *nvl(msi.list_price,0) * (1-(nvl(msi.average_discount,0)/100)),
224: 25,abs(med.quantity) *nvl(msi.list_price,0) * (1-(nvl(msi.average_discount,0)/100)),
225: 26,abs(med.quantity) *nvl(msi.list_price,0) * (1-(nvl(msi.average_discount,0)/100)),

Line 238: 53,ms.new_order_quantity * msc_phub_util.get_list_price

234: 47,med.quantity *nvl(msi.list_price,0) * (1-(nvl(msi.average_discount,0)/100)),
235: 48,med.quantity *nvl(msi.list_price,0) * (1-(nvl(msi.average_discount,0)/100)),
236: 49,msc_get_name.demand_quantity(med.plan_id,med.sr_instance_id,
237: med.supplier_id)*nvl(msi.list_price,0) * (1-(nvl(msi.average_discount,0)/100)),
238: 53,ms.new_order_quantity * msc_phub_util.get_list_price
239: (med.plan_id,med.sr_instance_id,med.organization_id,ms.inventory_item_id),
240: 54,ms.new_order_quantity*nvl(msi.list_price,0) * (1-(nvl(msi.average_discount,0)/100)),
241: 55,ms.new_order_quantity*nvl(msi.list_price,0) * (1-(nvl(msi.average_discount,0)/100)),
242: 56,ms.new_order_quantity*nvl(msi.list_price,0) * (1-(nvl(msi.average_discount,0)/100)),

Line 244: 58,ms.new_order_quantity*msc_phub_util.get_list_price

240: 54,ms.new_order_quantity*nvl(msi.list_price,0) * (1-(nvl(msi.average_discount,0)/100)),
241: 55,ms.new_order_quantity*nvl(msi.list_price,0) * (1-(nvl(msi.average_discount,0)/100)),
242: 56,ms.new_order_quantity*nvl(msi.list_price,0) * (1-(nvl(msi.average_discount,0)/100)),
243: 57,ms.new_order_quantity*nvl(msi.list_price,0) * (1-(nvl(msi.average_discount,0)/100)),
244: 58,ms.new_order_quantity*msc_phub_util.get_list_price
245: (med.plan_id,med.sr_instance_id,med.organization_id,ms.inventory_item_id),
246: 59,ms.new_order_quantity*nvl(msi.list_price,0) * (1-(nvl(msi.average_discount,0)/100)),
247: 60,ms.new_order_quantity*msc_phub_util.get_list_price
248: (med.plan_id,med.sr_instance_id,med.organization_id,ms.inventory_item_id),

Line 247: 60,ms.new_order_quantity*msc_phub_util.get_list_price

243: 57,ms.new_order_quantity*nvl(msi.list_price,0) * (1-(nvl(msi.average_discount,0)/100)),
244: 58,ms.new_order_quantity*msc_phub_util.get_list_price
245: (med.plan_id,med.sr_instance_id,med.organization_id,ms.inventory_item_id),
246: 59,ms.new_order_quantity*nvl(msi.list_price,0) * (1-(nvl(msi.average_discount,0)/100)),
247: 60,ms.new_order_quantity*msc_phub_util.get_list_price
248: (med.plan_id,med.sr_instance_id,med.organization_id,ms.inventory_item_id),
249: 62,ms.new_order_quantity*nvl(msi.list_price,0) * (1-(nvl(msi.average_discount,0)/100)),
250: 63,ms.new_order_quantity*nvl(msi.list_price,0) * (1-(nvl(msi.average_discount,0)/100)),
251: 64,ms.new_order_quantity*nvl(msi.list_price,0) * (1-(nvl(msi.average_discount,0)/100)),

Line 593: msc_phub_util.log('msc_exceptions_f, insert='||sql%rowcount);

589: where mcc.from_currency(+) = exception_tbl.currency_code
590: and mcc.to_currency(+) = fnd_profile.value('MSC_HUB_CUR_CODE_RPT')
591: and mcc.calendar_date(+) = exception_tbl.analysis_date;
592:
593: msc_phub_util.log('msc_exceptions_f, insert='||sql%rowcount);
594: commit;
595:
596: msc_phub_util.gather_table_stats(msc_phub_util.stats_fact, 'MSC_EXCEPTIONS_F', p_plan_run_id);
597:

Line 596: msc_phub_util.gather_table_stats(msc_phub_util.stats_fact, 'MSC_EXCEPTIONS_F', p_plan_run_id);

592:
593: msc_phub_util.log('msc_exceptions_f, insert='||sql%rowcount);
594: commit;
595:
596: msc_phub_util.gather_table_stats(msc_phub_util.stats_fact, 'MSC_EXCEPTIONS_F', p_plan_run_id);
597:
598: summarize_exceptions_f(errbuf, retcode, p_plan_id, p_plan_run_id);
599: msc_phub_util.log('msc_exception_pkg.populate_details.complete, duration='||(systimestamp-l_start_time));
600:

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

595:
596: msc_phub_util.gather_table_stats(msc_phub_util.stats_fact, 'MSC_EXCEPTIONS_F', p_plan_run_id);
597:
598: summarize_exceptions_f(errbuf, retcode, p_plan_id, p_plan_run_id);
599: msc_phub_util.log('msc_exception_pkg.populate_details.complete, duration='||(systimestamp-l_start_time));
600:
601: exception
602: when others then
603: msc_phub_util.log('msc_exception_pkg.populate_details: '||sqlerrm);

Line 603: msc_phub_util.log('msc_exception_pkg.populate_details: '||sqlerrm);

599: msc_phub_util.log('msc_exception_pkg.populate_details.complete, duration='||(systimestamp-l_start_time));
600:
601: exception
602: when others then
603: msc_phub_util.log('msc_exception_pkg.populate_details: '||sqlerrm);
604: raise;
605:
606: end populate_details;
607:

Line 613: msc_phub_util.log('msc_exception_pkg.summarize_exceptions_f');

609: p_plan_id number, p_plan_run_id number)
610: is
611: l_category_set_id1 number := fnd_profile.value('MSC_HUB_CAT_SET_ID_1');
612: begin
613: msc_phub_util.log('msc_exception_pkg.summarize_exceptions_f');
614: retcode := 0;
615: errbuf := '';
616:
617: delete from msc_exceptions_f

Line 619: msc_phub_util.log('msc_exception_pkg.summarize_exceptions_f, delete='||sql%rowcount);

615: errbuf := '';
616:
617: delete from msc_exceptions_f
618: where plan_id=p_plan_id and plan_run_id=p_plan_run_id and aggr_type>0;
619: msc_phub_util.log('msc_exception_pkg.summarize_exceptions_f, delete='||sql%rowcount);
620: commit;
621:
622: -- level 1
623: insert into msc_exceptions_f (

Line 695: msc_phub_util.log('msc_exception_pkg.summarize_exceptions_f, level1='||sql%rowcount);

691: f.order_type, f.analysis_date,
692: nvl(q.sr_category_id, -23453),
693: f.exception_type;
694:
695: msc_phub_util.log('msc_exception_pkg.summarize_exceptions_f, level1='||sql%rowcount);
696: commit;
697:
698: -- level 2
699: insert into msc_exceptions_f (

Line 771: msc_phub_util.log('msc_exception_pkg.summarize_exceptions_f, level2='||sql%rowcount);

767: f.category_set_id,
768: f.sr_category_id,
769: f.exception_type;
770:
771: msc_phub_util.log('msc_exception_pkg.summarize_exceptions_f, level2='||sql%rowcount);
772: commit;
773:
774: exception
775: when others then

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

784: p_st_transaction_id number, p_plan_run_id number,
785: p_dblink varchar2, p_source_version varchar2)
786: is
787: l_sql varchar2(5000);
788: l_suffix varchar2(32) := msc_phub_util.suffix(p_dblink);
789: l_apps_schema varchar2(30) := msc_phub_util.apps_schema;
790: begin
791: msc_phub_util.log('msc_exception_pkg.export_exceptions_f');
792: retcode := 0;

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

785: p_dblink varchar2, p_source_version varchar2)
786: is
787: l_sql varchar2(5000);
788: l_suffix varchar2(32) := msc_phub_util.suffix(p_dblink);
789: l_apps_schema varchar2(30) := msc_phub_util.apps_schema;
790: begin
791: msc_phub_util.log('msc_exception_pkg.export_exceptions_f');
792: retcode := 0;
793: errbuf := null;

Line 791: msc_phub_util.log('msc_exception_pkg.export_exceptions_f');

787: l_sql varchar2(5000);
788: l_suffix varchar2(32) := msc_phub_util.suffix(p_dblink);
789: l_apps_schema varchar2(30) := msc_phub_util.apps_schema;
790: begin
791: msc_phub_util.log('msc_exception_pkg.export_exceptions_f');
792: retcode := 0;
793: errbuf := null;
794:
795: delete from msc_st_exceptions_f where st_transaction_id=p_st_transaction_id;

Line 945: msc_phub_util.log('msc_exception_pkg.export_exceptions_f: complete, retcode='||retcode);

941: ' and proj.organization_id(+)=f.organization_id';
942:
943: execute immediate l_sql using p_st_transaction_id, p_plan_run_id;
944: commit;
945: msc_phub_util.log('msc_exception_pkg.export_exceptions_f: complete, retcode='||retcode);
946:
947: exception
948: when others then
949: retcode := 2;

Line 951: msc_phub_util.log(errbuf);

947: exception
948: when others then
949: retcode := 2;
950: errbuf := 'msc_exception_pkg.export_exceptions_f: '||sqlerrm;
951: msc_phub_util.log(errbuf);
952: end export_exceptions_f;
953:
954: procedure import_exceptions_f (
955: errbuf out nocopy varchar2, retcode out nocopy varchar2,

Line 964: msc_phub_util.log('msc_exception_pkg.import_exceptions_f');

960: l_staging_table varchar2(30) := 'msc_st_exceptions_f';
961: l_fact_table varchar2(30) := 'msc_exceptions_f';
962: l_result number := 0;
963: begin
964: msc_phub_util.log('msc_exception_pkg.import_exceptions_f');
965: retcode := 0;
966: errbuf := null;
967:
968: l_result := l_result + msc_phub_util.prepare_staging_dates(

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

964: msc_phub_util.log('msc_exception_pkg.import_exceptions_f');
965: retcode := 0;
966: errbuf := null;
967:
968: l_result := l_result + msc_phub_util.prepare_staging_dates(
969: l_staging_table, 'analysis_date', p_st_transaction_id,
970: p_upload_mode, p_overwrite_after_date,
971: p_plan_start_date, p_plan_cutoff_date);
972:

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

969: l_staging_table, 'analysis_date', p_st_transaction_id,
970: p_upload_mode, p_overwrite_after_date,
971: p_plan_start_date, p_plan_cutoff_date);
972:
973: l_result := l_result + msc_phub_util.prepare_fact_dates(
974: l_fact_table, 1, 'analysis_date', p_plan_id, p_plan_run_id,
975: p_upload_mode, p_overwrite_after_date);
976:
977: l_result := l_result + msc_phub_util.decode_organization_key(

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

973: l_result := l_result + msc_phub_util.prepare_fact_dates(
974: l_fact_table, 1, 'analysis_date', p_plan_id, p_plan_run_id,
975: p_upload_mode, p_overwrite_after_date);
976:
977: l_result := l_result + msc_phub_util.decode_organization_key(
978: l_staging_table, p_st_transaction_id, p_def_instance_code,
979: 'sr_instance_id', 'organization_id', 'organization_code');
980:
981: l_result := l_result + msc_phub_util.decode_organization_key(

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

977: l_result := l_result + msc_phub_util.decode_organization_key(
978: l_staging_table, p_st_transaction_id, p_def_instance_code,
979: 'sr_instance_id', 'organization_id', 'organization_code');
980:
981: l_result := l_result + msc_phub_util.decode_organization_key(
982: l_staging_table, p_st_transaction_id, p_def_instance_code,
983: 'owning_inst_id', 'owning_org_id', 'owning_org_code');
984:
985: l_result := l_result + msc_phub_util.decode_item_key(

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

981: l_result := l_result + msc_phub_util.decode_organization_key(
982: l_staging_table, p_st_transaction_id, p_def_instance_code,
983: 'owning_inst_id', 'owning_org_id', 'owning_org_code');
984:
985: l_result := l_result + msc_phub_util.decode_item_key(
986: l_staging_table, p_st_transaction_id, 'inventory_item_id', 'item_name');
987:
988: l_result := l_result + msc_phub_util.decode_customer_key(
989: l_staging_table, p_st_transaction_id,

Line 988: l_result := l_result + msc_phub_util.decode_customer_key(

984:
985: l_result := l_result + msc_phub_util.decode_item_key(
986: l_staging_table, p_st_transaction_id, 'inventory_item_id', 'item_name');
987:
988: l_result := l_result + msc_phub_util.decode_customer_key(
989: l_staging_table, p_st_transaction_id,
990: 'customer_id', 'customer_site_id', 'owning_inst_id', 'customer_region_id',
991: 'customer_name', 'customer_site_code', 'customer_zone');
992:

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

989: l_staging_table, p_st_transaction_id,
990: 'customer_id', 'customer_site_id', 'owning_inst_id', 'customer_region_id',
991: 'customer_name', 'customer_site_code', 'customer_zone');
992:
993: l_result := l_result + msc_phub_util.decode_supplier_key(
994: l_staging_table, p_st_transaction_id,
995: 'supplier_id', 'supplier_site_id',
996: 'supplier_name', 'supplier_site_code');
997:

Line 998: l_result := l_result + msc_phub_util.decode_resource_key(

994: l_staging_table, p_st_transaction_id,
995: 'supplier_id', 'supplier_site_id',
996: 'supplier_name', 'supplier_site_code');
997:
998: l_result := l_result + msc_phub_util.decode_resource_key(
999: l_staging_table, p_st_transaction_id);
1000:
1001: l_result := l_result + msc_phub_util.decode_project_key(
1002: l_staging_table, p_st_transaction_id);

Line 1001: l_result := l_result + msc_phub_util.decode_project_key(

997:
998: l_result := l_result + msc_phub_util.decode_resource_key(
999: l_staging_table, p_st_transaction_id);
1000:
1001: l_result := l_result + msc_phub_util.decode_project_key(
1002: l_staging_table, p_st_transaction_id);
1003:
1004: msc_phub_util.log('msc_exception_pkg.import_exceptions_f: insert into msc_exceptions_f');
1005: insert into msc_exceptions_f (

Line 1004: msc_phub_util.log('msc_exception_pkg.import_exceptions_f: insert into msc_exceptions_f');

1000:
1001: l_result := l_result + msc_phub_util.decode_project_key(
1002: l_staging_table, p_st_transaction_id);
1003:
1004: msc_phub_util.log('msc_exception_pkg.import_exceptions_f: insert into msc_exceptions_f');
1005: insert into msc_exceptions_f (
1006: plan_id,
1007: plan_run_id,
1008: sr_instance_id,

Line 1071: msc_phub_util.log('msc_exception_pkg.import_exceptions_f: inserted='||sql%rowcount);

1067: fnd_global.user_id, sysdate, fnd_global.login_id
1068: from msc_st_exceptions_f
1069: where st_transaction_id=p_st_transaction_id and error_code=0;
1070:
1071: msc_phub_util.log('msc_exception_pkg.import_exceptions_f: inserted='||sql%rowcount);
1072: commit;
1073:
1074: summarize_exceptions_f(errbuf, retcode, p_plan_id, p_plan_run_id);
1075:

Line 1080: msc_phub_util.log('msc_exception_pkg.import_exceptions_f: complete, retcode='||retcode);

1076: if (l_result > 0) then
1077: retcode := -1;
1078: end if;
1079:
1080: msc_phub_util.log('msc_exception_pkg.import_exceptions_f: complete, retcode='||retcode);
1081:
1082: exception
1083: when others then
1084: retcode := 2;

Line 1086: msc_phub_util.log(errbuf);

1082: exception
1083: when others then
1084: retcode := 2;
1085: errbuf := 'msc_exception_pkg.import_exceptions_f: '||sqlerrm;
1086: msc_phub_util.log(errbuf);
1087: end import_exceptions_f;
1088:
1089: end msc_exception_pkg;