DBA Data[Home] [Help]

APPS.MSC_PHUB_COST_PKG dependencies on MSC_COSTS_F

Line 404: -- msc_costs_f:final

400:
401: msc_phub_util.log('insert into msc_st_costs_f:RP: '||sql%rowcount);
402: commit;
403:
404: -- msc_costs_f:final
405: msc_phub_util.unusuable_local_index('MSC_COSTS_F', p_plan_run_id, 1);
406: insert into msc_costs_f (
407: plan_id,
408: plan_run_id,

Line 405: msc_phub_util.unusuable_local_index('MSC_COSTS_F', p_plan_run_id, 1);

401: msc_phub_util.log('insert into msc_st_costs_f:RP: '||sql%rowcount);
402: commit;
403:
404: -- msc_costs_f:final
405: msc_phub_util.unusuable_local_index('MSC_COSTS_F', p_plan_run_id, 1);
406: insert into msc_costs_f (
407: plan_id,
408: plan_run_id,
409: io_plan_flag,

Line 406: insert into msc_costs_f (

402: commit;
403:
404: -- msc_costs_f:final
405: msc_phub_util.unusuable_local_index('MSC_COSTS_F', p_plan_run_id, 1);
406: insert into msc_costs_f (
407: plan_id,
408: plan_run_id,
409: io_plan_flag,
410: owning_inst_id,

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

572: where f.currency_code=mcc.from_currency(+)
573: and fnd_profile.value('MSC_HUB_CUR_CODE_RPT')=mcc.to_currency(+)
574: and f.detail_date=mcc.calendar_date(+);
575:
576: msc_phub_util.log('insert into msc_costs_f:final: '||sql%rowcount);
577: commit;
578: msc_phub_util.unusuable_local_index('MSC_COSTS_F', p_plan_run_id, 2);
579: msc_phub_util.gather_table_stats(msc_phub_util.stats_fact, 'MSC_COSTS_F', p_plan_run_id);
580:

Line 578: msc_phub_util.unusuable_local_index('MSC_COSTS_F', p_plan_run_id, 2);

574: and f.detail_date=mcc.calendar_date(+);
575:
576: msc_phub_util.log('insert into msc_costs_f:final: '||sql%rowcount);
577: commit;
578: msc_phub_util.unusuable_local_index('MSC_COSTS_F', p_plan_run_id, 2);
579: msc_phub_util.gather_table_stats(msc_phub_util.stats_fact, 'MSC_COSTS_F', p_plan_run_id);
580:
581: summarize_costs_f(errbuf, retcode, p_plan_id, p_plan_run_id);
582: l_complete_time := systimestamp;

Line 579: msc_phub_util.gather_table_stats(msc_phub_util.stats_fact, 'MSC_COSTS_F', p_plan_run_id);

575:
576: msc_phub_util.log('insert into msc_costs_f:final: '||sql%rowcount);
577: commit;
578: msc_phub_util.unusuable_local_index('MSC_COSTS_F', p_plan_run_id, 2);
579: msc_phub_util.gather_table_stats(msc_phub_util.stats_fact, 'MSC_COSTS_F', p_plan_run_id);
580:
581: summarize_costs_f(errbuf, retcode, p_plan_id, p_plan_run_id);
582: l_complete_time := systimestamp;
583: msc_phub_util.log('msc_phub_cost_pkg.populate_details.complete, duration='||(l_complete_time-l_start_time));

Line 602: delete from msc_costs_f

598: msc_phub_util.log('msc_phub_cost_pkg.summarize_costs_f');
599: retcode := 0;
600: errbuf := '';
601:
602: delete from msc_costs_f
603: where plan_id=p_plan_id and plan_run_id=p_plan_run_id and aggr_type>0;
604: msc_phub_util.log('msc_phub_cost_pkg.summarize_costs_f, delete='||sql%rowcount);
605: commit;
606:

Line 608: insert into msc_costs_f (

604: msc_phub_util.log('msc_phub_cost_pkg.summarize_costs_f, delete='||sql%rowcount);
605: commit;
606:
607: -- level 1
608: insert into msc_costs_f (
609: plan_id, plan_run_id,
610: owning_inst_id, owning_org_id,
611: sr_instance_id, organization_id,
612: source_org_instance_id, source_organization_id,

Line 694: msc_costs_f f,

690: sysdate, fnd_global.user_id, fnd_global.login_id,
691: fnd_global.conc_program_id, fnd_global.conc_login_id,
692: fnd_global.prog_appl_id, fnd_global.conc_request_id
693: from
694: msc_costs_f f,
695: msc_phub_item_categories_mv q
696: where f.plan_id = p_plan_id and f.plan_run_id = p_plan_run_id
697: and f.aggr_type=0
698: and f.sr_instance_id=q.sr_instance_id(+)

Line 926: ' '||l_apps_schema||'.msc_costs_f'||l_suffix||' f,'||

922: ' f.total_build_qty,'||
923: ' fnd_global.user_id, sysdate,'||
924: ' fnd_global.user_id, sysdate, fnd_global.login_id'||
925: ' from'||
926: ' '||l_apps_schema||'.msc_costs_f'||l_suffix||' f,'||
927: ' '||l_apps_schema||'.msc_trading_partners'||l_suffix||' mtp,'||
928: ' '||l_apps_schema||'.msc_trading_partners'||l_suffix||' mtp2,'||
929: ' '||l_apps_schema||'.msc_trading_partners'||l_suffix||' mtp3,'||
930: ' '||l_apps_schema||'.msc_items'||l_suffix||' mi,'||

Line 974: l_fact_table varchar2(30) := 'msc_costs_f';

970: p_plan_type number, p_plan_start_date date, p_plan_cutoff_date date,
971: p_upload_mode number, p_overwrite_after_date date, p_def_instance_code varchar2)
972: is
973: l_staging_table varchar2(30) := 'msc_st_costs_f';
974: l_fact_table varchar2(30) := 'msc_costs_f';
975: l_result number := 0;
976: begin
977: msc_phub_util.log('msc_phub_cost_pkg.import_costs_f');
978: retcode := 0;

Line 1015: msc_phub_util.log('msc_phub_cost_pkg.import_costs_f: insert into msc_costs_f');

1011: l_staging_table, p_st_transaction_id,
1012: 'supplier_id', 'supplier_site_id',
1013: 'supplier_name', 'supplier_site_code');
1014:
1015: msc_phub_util.log('msc_phub_cost_pkg.import_costs_f: insert into msc_costs_f');
1016: insert into msc_costs_f (
1017: plan_id,
1018: plan_run_id,
1019: sr_instance_id,

Line 1016: insert into msc_costs_f (

1012: 'supplier_id', 'supplier_site_id',
1013: 'supplier_name', 'supplier_site_code');
1014:
1015: msc_phub_util.log('msc_phub_cost_pkg.import_costs_f: insert into msc_costs_f');
1016: insert into msc_costs_f (
1017: plan_id,
1018: plan_run_id,
1019: sr_instance_id,
1020: organization_id,

Line 1144: l_costs_f varchar2(30) := 'MSC_COSTS_F';

1140: dummy2 varchar2(100);
1141: l_sql varchar2(2000);
1142: l_need_migrate number := 0;
1143:
1144: l_costs_f varchar2(30) := 'MSC_COSTS_F';
1145: l_next_id number;
1146:
1147: cursor c2 is
1148: select distinct plan_run_id

Line 1150: where not exists (select 1 from msc_costs_f where plan_run_id=f.plan_run_id)

1146:
1147: cursor c2 is
1148: select distinct plan_run_id
1149: from msc_item_inventory_f f
1150: where not exists (select 1 from msc_costs_f where plan_run_id=f.plan_run_id)
1151: order by plan_run_id;
1152: begin
1153: msc_phub_util.log('msc_phub_cost_pkg.migrate');
1154:

Line 1184: execute immediate l_sql into l_next_id using 'MSC_COSTS_F', 'MSC_COSTS_F', r.plan_run_id;

1180: ' from sys.all_tab_partitions'||
1181: ' where table_name=:table_name) t'||
1182: ' where partition_id>=:plan_run_id';
1183:
1184: execute immediate l_sql into l_next_id using 'MSC_COSTS_F', 'MSC_COSTS_F', r.plan_run_id;
1185:
1186:
1187: --msc_phub_util.log(r.plan_run_id||','||l_next_id);
1188: if (l_next_id=-1) then

Line 1199: ' insert into msc_costs_f ('||

1195: --msc_phub_util.log(l_sql);
1196: end if;
1197:
1198: l_sql :=
1199: ' insert into msc_costs_f ('||
1200: ' plan_id,'||
1201: ' plan_run_id,'||
1202: ' sr_instance_id,'||
1203: ' organization_id,'||

Line 1325: execute immediate l_sql into l_n2 using 'MSC_COSTS_F', 'COSTS_F_0';

1321: ' and partition_name<>:base_partition_name'||
1322: ' and rownum=1';
1323:
1324: execute immediate l_sql into l_n1 using 'MSC_ITEM_INVENTORY_F', 'ITEM_INVENTORY_F_0';
1325: execute immediate l_sql into l_n2 using 'MSC_COSTS_F', 'COSTS_F_0';
1326: return (case when l_n1=1 and l_n2=0 then 1 else 0 end);
1327: end;
1328:
1329: end msc_phub_cost_pkg;