DBA Data[Home] [Help]

APPS.MSC_RESOURCE_PKG dependencies on MSC_RESOURCE_PKG

Line 1: package body msc_resource_pkg as

1: package body msc_resource_pkg as
2: /* $Header: MSCHBRSB.pls 120.61.12020000.2 2012/10/11 13:59:00 wexia ship $ */
3: l_constrained_plan number ;
4:
5: procedure populate_details(errbuf out nocopy varchar2, retcode out nocopy varchar2, p_plan_id in number, p_plan_run_id in number) is

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

16: l_constrained_plan number := null;
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_resource_pkg.populate_details');
21: l_constrained_plan := msc_phub_util.is_plan_constrained(p_plan_id);
22: retcode := 0;
23: errbuf := null;
24:

Line 66: msc_phub_util.log('msc_resource_pkg.populate_details: '||

62: end if;
63: end if;
64: end if;
65:
66: msc_phub_util.log('msc_resource_pkg.populate_details: '||
67: p_plan_id||','||p_plan_run_id||','||l_plan_type||','||
68: l_sr_instance_id||','||l_plan_start_date||','||l_plan_cutoff_date||','||
69: l_transfer_id||','||l_refresh_mode||','||l_res_rn_qid);
70:

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

497: if (l_rowcount2 > 0) then
498: summarize_resources_cum_f(errbuf, retcode, p_plan_id, p_plan_run_id);
499: end if;
500:
501: msc_phub_util.log('msc_resource_pkg.populate_details.complete, duration='||(systimestamp-l_start_time));
502:
503: exception
504: when others then
505: msc_phub_util.log('msc_resource_pkg.populate_details: '||sqlerrm);

Line 505: msc_phub_util.log('msc_resource_pkg.populate_details: '||sqlerrm);

501: msc_phub_util.log('msc_resource_pkg.populate_details.complete, duration='||(systimestamp-l_start_time));
502:
503: exception
504: when others then
505: msc_phub_util.log('msc_resource_pkg.populate_details: '||sqlerrm);
506: raise;
507:
508: end populate_details;
509:

Line 515: msc_phub_util.log('msc_resource_pkg.summarize_resources_f');

511: procedure summarize_resources_f(errbuf out nocopy varchar2, retcode out nocopy varchar2,
512: p_plan_id number, p_plan_run_id number)
513: is
514: begin
515: msc_phub_util.log('msc_resource_pkg.summarize_resources_f');
516: retcode := 0;
517: errbuf := '';
518:
519: delete from msc_resources_f

Line 521: msc_phub_util.log('msc_resource_pkg.summarize_resources_f, delete='||sql%rowcount);

517: errbuf := '';
518:
519: delete from msc_resources_f
520: where plan_id=p_plan_id and plan_run_id=p_plan_run_id and aggr_type>0;
521: msc_phub_util.log('msc_resource_pkg.summarize_resources_f, delete='||sql%rowcount);
522: commit;
523:
524: -- level 1
525: insert into msc_resources_f (

Line 610: msc_phub_util.log('msc_resource_pkg.summarize_resources_f, level1='||sql%rowcount);

606: f.sr_instance_id, f.organization_id,
607: f.inventory_item_id, f.analysis_date,
608: nvl(r.resource_group_id, '-23453');
609:
610: msc_phub_util.log('msc_resource_pkg.summarize_resources_f, level1='||sql%rowcount);
611: commit;
612:
613: -- level 2
614: insert into msc_resources_f (

Line 700: msc_phub_util.log('msc_resource_pkg.summarize_resources_f, level2='||sql%rowcount);

696: f.department_id, f.resource_id,
697: f.inventory_item_id, d.fis_period_start_date,
698: f.resource_group;
699:
700: msc_phub_util.log('msc_resource_pkg.summarize_resources_f, level2='||sql%rowcount);
701: commit;
702:
703: exception
704: when others then

Line 706: errbuf := 'msc_resource_pkg.summarize_demands_f: '||sqlerrm;

702:
703: exception
704: when others then
705: retcode := 2;
706: errbuf := 'msc_resource_pkg.summarize_demands_f: '||sqlerrm;
707: raise;
708:
709: end summarize_resources_f;
710:

Line 715: msc_phub_util.log('msc_resource_pkg.summarize_resources_cum_f');

711: procedure summarize_resources_cum_f(errbuf out nocopy varchar2, retcode out nocopy varchar2,
712: p_plan_id number, p_plan_run_id number)
713: is
714: begin
715: msc_phub_util.log('msc_resource_pkg.summarize_resources_cum_f');
716: retcode := 0;
717: errbuf := '';
718:
719: delete from msc_resources_cum_f

Line 721: msc_phub_util.log('msc_resource_pkg.summarize_resources_cum_f, delete='||sql%rowcount);

717: errbuf := '';
718:
719: delete from msc_resources_cum_f
720: where plan_id=p_plan_id and plan_run_id=p_plan_run_id and aggr_type>0;
721: msc_phub_util.log('msc_resource_pkg.summarize_resources_cum_f, delete='||sql%rowcount);
722: commit;
723:
724: -- level 1
725: insert into msc_resources_cum_f (

Line 789: msc_phub_util.log('msc_resource_pkg.summarize_resources_cum_f, level1='||sql%rowcount);

785: f.sr_instance_id, f.organization_id,
786: f.inventory_item_id, f.analysis_date,
787: nvl(r.resource_group_id, '-23453');
788:
789: msc_phub_util.log('msc_resource_pkg.summarize_resources_cum_f, level1='||sql%rowcount);
790: commit;
791:
792: exception
793: when others then

Line 795: errbuf := 'msc_resource_pkg.summarize_resources_cum_f: '||sqlerrm;

791:
792: exception
793: when others then
794: retcode := 2;
795: errbuf := 'msc_resource_pkg.summarize_resources_cum_f: '||sqlerrm;
796: raise;
797: end summarize_resources_cum_f;
798:
799: procedure export_resources_f (

Line 808: msc_phub_util.log('msc_resource_pkg.export_resources_f');

804: l_sql varchar2(5000);
805: l_suffix varchar2(32) := msc_phub_util.suffix(p_dblink);
806: l_apps_schema varchar2(30) := msc_phub_util.apps_schema;
807: begin
808: msc_phub_util.log('msc_resource_pkg.export_resources_f');
809: retcode := 0;
810: errbuf := null;
811:
812: delete from msc_st_resources_f where st_transaction_id=p_st_transaction_id;

Line 886: msc_phub_util.log('msc_resource_pkg.export_resources_f: complete, retcode='||retcode);

882: ' and mdr.organization_id(+)=f.organization_id';
883:
884: execute immediate l_sql using p_st_transaction_id, p_plan_run_id;
885: commit;
886: msc_phub_util.log('msc_resource_pkg.export_resources_f: complete, retcode='||retcode);
887:
888: exception
889: when others then
890: retcode := 2;

Line 891: errbuf := 'msc_resource_pkg.export_resources_f: '||sqlerrm;

887:
888: exception
889: when others then
890: retcode := 2;
891: errbuf := 'msc_resource_pkg.export_resources_f: '||sqlerrm;
892: msc_phub_util.log(errbuf);
893: end export_resources_f;
894:
895: procedure export_resources_cum_f (

Line 904: msc_phub_util.log('msc_resource_pkg.export_resources_cum_f');

900: l_sql varchar2(5000);
901: l_suffix varchar2(32) := msc_phub_util.suffix(p_dblink);
902: l_apps_schema varchar2(30) := msc_phub_util.apps_schema;
903: begin
904: msc_phub_util.log('msc_resource_pkg.export_resources_cum_f');
905: retcode := 0;
906: errbuf := null;
907:
908: delete from msc_st_resources_cum_f where st_transaction_id=p_st_transaction_id;

Line 974: msc_phub_util.log('msc_resource_pkg.export_resources_cum_f: complete, retcode='||retcode);

970: ' and mdr.organization_id(+)=f.organization_id';
971:
972: execute immediate l_sql using p_st_transaction_id, p_plan_run_id;
973: commit;
974: msc_phub_util.log('msc_resource_pkg.export_resources_cum_f: complete, retcode='||retcode);
975:
976: exception
977: when others then
978: retcode := 2;

Line 979: errbuf := 'msc_resource_pkg.export_resources_cum_f: '||sqlerrm;

975:
976: exception
977: when others then
978: retcode := 2;
979: errbuf := 'msc_resource_pkg.export_resources_cum_f: '||sqlerrm;
980: msc_phub_util.log(errbuf);
981: end export_resources_cum_f;
982:
983: procedure import_resources_f (

Line 993: msc_phub_util.log('msc_resource_pkg.import_resources_f');

989: l_staging_table varchar2(30) := 'msc_st_resources_f';
990: l_fact_table varchar2(30) := 'msc_resources_f';
991: l_result number := 0;
992: begin
993: msc_phub_util.log('msc_resource_pkg.import_resources_f');
994: retcode := 0;
995: errbuf := null;
996:
997: l_result := l_result + msc_phub_util.prepare_staging_dates(

Line 1016: msc_phub_util.log('msc_resource_pkg.import_resources_f: insert into msc_resources_f');

1012:
1013: l_result := l_result + msc_phub_util.decode_resource_key(
1014: l_staging_table, p_st_transaction_id);
1015:
1016: msc_phub_util.log('msc_resource_pkg.import_resources_f: insert into msc_resources_f');
1017: insert into msc_resources_f (
1018: plan_id,
1019: plan_run_id,
1020: sr_instance_id,

Line 1061: msc_phub_util.log('msc_resource_pkg.import_resources_f: inserted='||sql%rowcount);

1057: fnd_global.user_id, sysdate, fnd_global.login_id
1058: from msc_st_resources_f
1059: where st_transaction_id=p_st_transaction_id and error_code=0;
1060:
1061: msc_phub_util.log('msc_resource_pkg.import_resources_f: inserted='||sql%rowcount);
1062: commit;
1063:
1064: summarize_resources_f(errbuf, retcode, p_plan_id, p_plan_run_id);
1065:

Line 1070: msc_phub_util.log('msc_resource_pkg.import_resources_f: complete, retcode='||retcode);

1066: if (l_result > 0) then
1067: retcode := -1;
1068: end if;
1069:
1070: msc_phub_util.log('msc_resource_pkg.import_resources_f: complete, retcode='||retcode);
1071:
1072: exception
1073: when others then
1074: retcode := 2;

Line 1075: errbuf := 'msc_resource_pkg.import_resources_f: '||sqlerrm;

1071:
1072: exception
1073: when others then
1074: retcode := 2;
1075: errbuf := 'msc_resource_pkg.import_resources_f: '||sqlerrm;
1076: msc_phub_util.log(errbuf);
1077: end import_resources_f;
1078:
1079: procedure import_resources_cum_f (

Line 1089: msc_phub_util.log('msc_resource_pkg.import_resources_cum_f');

1085: l_staging_table varchar2(30) := 'msc_st_resources_cum_f';
1086: l_fact_table varchar2(30) := 'msc_resources_cum_f';
1087: l_result number := 0;
1088: begin
1089: msc_phub_util.log('msc_resource_pkg.import_resources_cum_f');
1090: retcode := 0;
1091: errbuf := null;
1092:
1093: l_result := l_result + msc_phub_util.prepare_staging_dates(

Line 1112: msc_phub_util.log('msc_resource_pkg.import_resources_cum_f: insert into msc_resources_cum_f');

1108:
1109: l_result := l_result + msc_phub_util.decode_resource_key(
1110: l_staging_table, p_st_transaction_id);
1111:
1112: msc_phub_util.log('msc_resource_pkg.import_resources_cum_f: insert into msc_resources_cum_f');
1113: insert into msc_resources_cum_f (
1114: plan_id,
1115: plan_run_id,
1116: sr_instance_id,

Line 1143: msc_phub_util.log('msc_resource_pkg.import_resources_cum_f: inserted='||sql%rowcount);

1139: fnd_global.user_id, sysdate, fnd_global.login_id
1140: from msc_st_resources_cum_f
1141: where st_transaction_id=p_st_transaction_id and error_code=0;
1142:
1143: msc_phub_util.log('msc_resource_pkg.import_resources_cum_f: inserted='||sql%rowcount);
1144: commit;
1145:
1146: summarize_resources_cum_f(errbuf, retcode, p_plan_id, p_plan_run_id);
1147:

Line 1152: msc_phub_util.log('msc_resource_pkg.import_resources_cum_f: complete, retcode='||retcode);

1148: if (l_result > 0) then
1149: retcode := -1;
1150: end if;
1151:
1152: msc_phub_util.log('msc_resource_pkg.import_resources_cum_f: complete, retcode='||retcode);
1153:
1154: exception
1155: when others then
1156: retcode := 2;

Line 1157: errbuf := 'msc_resource_pkg.import_resources_cum_f: '||sqlerrm;

1153:
1154: exception
1155: when others then
1156: retcode := 2;
1157: errbuf := 'msc_resource_pkg.import_resources_cum_f: '||sqlerrm;
1158: msc_phub_util.log(errbuf);
1159: end import_resources_cum_f;
1160:
1161: end msc_resource_pkg;

Line 1161: end msc_resource_pkg;

1157: errbuf := 'msc_resource_pkg.import_resources_cum_f: '||sqlerrm;
1158: msc_phub_util.log(errbuf);
1159: end import_resources_cum_f;
1160:
1161: end msc_resource_pkg;