DBA Data[Home] [Help]

APPS.MSC_PHUB_FILE_PKG dependencies on MSC_PHUB_PKG

Line 8: select upper('msc_st_'||entity_name||'_f') into l_entity_name from table(msc_phub_pkg.meta_info) where fact_type=p_fact_type;

4: function get_staging_table(p_fact_type number) return varchar2
5: is
6: l_entity_name varchar2(30);
7: begin
8: select upper('msc_st_'||entity_name||'_f') into l_entity_name from table(msc_phub_pkg.meta_info) where fact_type=p_fact_type;
9: return l_entity_name;
10: end;
11:
12: procedure export_table(

Line 24: l_meta_info msc_apcc_fact_type_table := msc_phub_pkg.meta_info;

20: l_source_dblink varchar2(30);
21: l_source_version varchar2(20);
22: l_export_level number;
23:
24: l_meta_info msc_apcc_fact_type_table := msc_phub_pkg.meta_info;
25: l_package varchar2(30);
26: l_entity_name varchar2(30);
27: l_sql varchar2(200);
28: begin

Line 85: l_transfer_id := msc_phub_pkg.create_staging_partitions(null, null);

81: e_prepare_transfer_tables_ui exception;
82: begin
83: -- dup data from query_id
84: msc_phub_util.log('msc_phub_file_pkg.prepare_transfer_tables_ui('||p_query_id||')');
85: l_transfer_id := msc_phub_pkg.create_staging_partitions(null, null);
86:
87: select count(*) into n
88: from msc_hub_query
89: where query_id=p_query_id and number1=1;

Line 199: l_transfer_id := msc_phub_pkg.create_staging_partitions(null, null);

195: l_organization_id number;
196: begin
197: msc_phub_util.log('msc_phub_file_pkg.prepare_transfer_tables');
198:
199: l_transfer_id := msc_phub_pkg.create_staging_partitions(null, null);
200:
201: begin
202: select instance_id
203: into l_sr_instance_id

Line 274: (select rownum fact_type, entity_name, initial_verion from table(msc_phub_pkg.meta_info))

270: select
271: l_transfer_id, fact_type, upper('msc_st_'||entity_name||'_f')||'.csv',
272: fnd_global.user_id, sysdate, fnd_global.user_id, sysdate, fnd_global.login_id
273: from
274: (select rownum fact_type, entity_name, initial_verion from table(msc_phub_pkg.meta_info))
275: where decode(fact_type,4,p_include_ods,p_include_pds)=1
276: and initial_verion<=nvl(p_source_version, msc_phub_util.g_version);
277: commit;
278:

Line 383: prepare_context(errbuf, retcode, p_transfer_id, msc_phub_pkg.sys_no);

379: request_id=fnd_global.conc_request_id
380: where transfer_id=p_transfer_id;
381: commit;
382:
383: prepare_context(errbuf, retcode, p_transfer_id, msc_phub_pkg.sys_no);
384: if (retcode <> 0) then
385: raise e_prepare_import;
386: end if;
387:

Line 404: l_keep_previous number := msc_phub_pkg.sys_yes;

400: is
401: l_upload_mode number;
402: l_plan_id number;
403: l_plan_run_id number;
404: l_keep_previous number := msc_phub_pkg.sys_yes;
405: e_finanlize_import exception;
406: begin
407: msc_phub_util.log('msc_phub_file_pkg.finalize_import('||p_transfer_id||')');
408:

Line 415: l_keep_previous := msc_phub_pkg.sys_no;

411: from msc_apcc_upload
412: where transfer_id=p_transfer_id;
413:
414: if (l_upload_mode = msc_phub_util.upload_create_purge_prev) then
415: l_keep_previous := msc_phub_pkg.sys_no;
416: end if;
417:
418: if (l_plan_id is not null) then
419: msc_phub_pkg.finalize_plan_run(l_plan_id, l_plan_run_id, null,

Line 419: msc_phub_pkg.finalize_plan_run(l_plan_id, l_plan_run_id, null,

415: l_keep_previous := msc_phub_pkg.sys_no;
416: end if;
417:
418: if (l_plan_id is not null) then
419: msc_phub_pkg.finalize_plan_run(l_plan_id, l_plan_run_id, null,
420: msc_phub_pkg.sys_yes, msc_phub_pkg.sys_yes, l_keep_previous);
421: if (retcode <> 0) then
422: raise e_finanlize_import;
423: end if;

Line 420: msc_phub_pkg.sys_yes, msc_phub_pkg.sys_yes, l_keep_previous);

416: end if;
417:
418: if (l_plan_id is not null) then
419: msc_phub_pkg.finalize_plan_run(l_plan_id, l_plan_run_id, null,
420: msc_phub_pkg.sys_yes, msc_phub_pkg.sys_yes, l_keep_previous);
421: if (retcode <> 0) then
422: raise e_finanlize_import;
423: end if;
424:

Line 425: msc_phub_pkg.build_items_from_apcc(l_plan_id, l_plan_run_id);

421: if (retcode <> 0) then
422: raise e_finanlize_import;
423: end if;
424:
425: msc_phub_pkg.build_items_from_apcc(l_plan_id, l_plan_run_id);
426: end if;
427:
428: update msc_apcc_upload
429: set transfer_status=status_transfered

Line 453: l_pi msc_phub_pkg.plan_info;

449: n number;
450: e_prepare_context exception;
451: l_include_ods boolean := false;
452: l_import_level number;
453: l_pi msc_phub_pkg.plan_info;
454: begin
455: retcode := 0;
456: errbuf := null;
457:

Line 535: fnd_message.set_token('PLAN_TYPE', msc_phub_pkg.get_plan_type_meaning(l_plan_type2));

531: if (l_plan_type2 <> l_pi.plan_type) then
532: retcode := 1;
533: fnd_message.set_name('MSC', 'MSC_APCC_PLAN_INFO_E03');
534: fnd_message.set_token('PLAN', l_pi.plan_name);
535: fnd_message.set_token('PLAN_TYPE', msc_phub_pkg.get_plan_type_meaning(l_plan_type2));
536: errbuf := fnd_message.get;
537: raise e_prepare_context;
538: end if;
539:

Line 548: if (nvl(p_validate_only, msc_phub_pkg.sys_yes) = msc_phub_pkg.sys_yes) then

544: errbuf := fnd_message.get;
545: raise e_prepare_context;
546: end if;
547:
548: if (nvl(p_validate_only, msc_phub_pkg.sys_yes) = msc_phub_pkg.sys_yes) then
549: return;
550: end if;
551:
552: if (l_upload_mode = msc_phub_util.upload_create or

Line 554: l_plan_run_id := msc_phub_pkg.create_plan_run(null, null, msc_phub_pkg.sys_no, l_pi);

550: end if;
551:
552: if (l_upload_mode = msc_phub_util.upload_create or
553: l_upload_mode = msc_phub_util.upload_create_purge_prev) then
554: l_plan_run_id := msc_phub_pkg.create_plan_run(null, null, msc_phub_pkg.sys_no, l_pi);
555: else
556: update msc_plan_runs
557: set plan_description = nvl(l_pi.plan_description, plan_description),
558: sr_instance_id = nvl(l_pi.sr_instance_id, sr_instance_id),

Line 576: if (nvl(p_validate_only, msc_phub_pkg.sys_yes) = msc_phub_pkg.sys_yes) then

572: l_upload_mode = msc_phub_util.upload_create or
573: l_upload_mode = msc_phub_util.upload_create_purge_prev) then
574:
575: if (l_pi.plan_type = 10) then
576: if (nvl(p_validate_only, msc_phub_pkg.sys_yes) = msc_phub_pkg.sys_yes) then
577: return;
578: end if;
579:
580: select msc_plans_s.nextval into l_pi.plan_id from dual;

Line 607: fnd_message.set_token('PLAN_TYPE', msc_phub_pkg.get_plan_type_meaning(l_plan_type2));

603: if (l_plan_type2 <> l_pi.plan_type) then
604: retcode := 1;
605: fnd_message.set_name('MSC', 'MSC_APCC_PLAN_INFO_E03');
606: fnd_message.set_token('PLAN', l_pi.plan_name);
607: fnd_message.set_token('PLAN_TYPE', msc_phub_pkg.get_plan_type_meaning(l_plan_type2));
608: errbuf := fnd_message.get;
609: raise e_prepare_context;
610: end if;
611:

Line 628: if (nvl(p_validate_only, msc_phub_pkg.sys_yes) = msc_phub_pkg.sys_yes) then

624: raise e_prepare_context;
625: end if;
626: end if;
627:
628: if (nvl(p_validate_only, msc_phub_pkg.sys_yes) = msc_phub_pkg.sys_yes) then
629: return;
630: end if;
631:
632: if (l_pi.plan_id is null) then

Line 637: l_plan_run_id := msc_phub_pkg.create_plan_run(null, null, msc_phub_pkg.sys_no, l_pi);

633: l_pi.plan_id := create_plan(errbuf, retcode, p_transfer_id);
634: end if;
635: end if;
636:
637: l_plan_run_id := msc_phub_pkg.create_plan_run(null, null, msc_phub_pkg.sys_no, l_pi);
638:
639: update msc_apcc_upload
640: set plan_id=l_pi.plan_id, plan_run_id=l_plan_run_id
641: where transfer_id=p_transfer_id;

Line 677: l_meta_info msc_apcc_fact_type_table := msc_phub_pkg.meta_info;

673: l_def_instance_code varchar2(3) := null;
674: l_def_instance_id number;
675: e_import_table exception;
676:
677: l_meta_info msc_apcc_fact_type_table := msc_phub_pkg.meta_info;
678: l_package varchar2(30);
679: l_entity_name varchar2(30);
680: l_sql varchar2(1000);
681: begin

Line 870: msc_phub_pkg.drop_staging_partitions(p_transfer_id, null, null);

866: p_transfer_id number)
867: is
868: begin
869: msc_phub_util.log('msc_phub_file_pkg.cleanup('||p_transfer_id||')');
870: msc_phub_pkg.drop_staging_partitions(p_transfer_id, null, null);
871:
872: update msc_apcc_upload_detail set file_data=null where transfer_id=p_transfer_id;
873: commit;
874:

Line 905: and source_plan_run_id in (select column_value from table(msc_phub_pkg.list_plan_runs(p_plan_name, p_plan_run_id))))

901:
902: update msc_apcc_upload
903: set transfer_status=status_purging
904: where ((export_level>0 and source_dblink is null
905: and source_plan_run_id in (select column_value from table(msc_phub_pkg.list_plan_runs(p_plan_name, p_plan_run_id))))
906: or (import_level>0
907: and plan_run_id in (select column_value from table(msc_phub_pkg.list_plan_runs(p_plan_name, p_plan_run_id)))));
908: commit;
909:

Line 907: and plan_run_id in (select column_value from table(msc_phub_pkg.list_plan_runs(p_plan_name, p_plan_run_id)))));

903: set transfer_status=status_purging
904: where ((export_level>0 and source_dblink is null
905: and source_plan_run_id in (select column_value from table(msc_phub_pkg.list_plan_runs(p_plan_name, p_plan_run_id))))
906: or (import_level>0
907: and plan_run_id in (select column_value from table(msc_phub_pkg.list_plan_runs(p_plan_name, p_plan_run_id)))));
908: commit;
909:
910: for r in c loop
911: begin

Line 912: msc_phub_pkg.drop_staging_partitions(r.transfer_id, null, null);

908: commit;
909:
910: for r in c loop
911: begin
912: msc_phub_pkg.drop_staging_partitions(r.transfer_id, null, null);
913: exception
914: when others then null;
915: end;
916: end loop;

Line 925: msc_phub_pkg.purge_details(p_plan_name, p_plan_run_id);

921:
922: delete from msc_apcc_upload where transfer_status=status_purging;
923: commit;
924:
925: msc_phub_pkg.purge_details(p_plan_name, p_plan_run_id);
926: msc_phub_util.log(fnd_message.get_string('MSC','MSC_HUB_PURGE_ENDS'));
927:
928: exception
929: when others then