44:
45: BEGIN
46:
47:
48: IF NOT bis_collection_utilities.setup(l_object_name) THEN
49: bis_collection_utilities.log('Object BIM_SOURCE_CODE Not Setup Properly');
50: RAISE FND_API.G_EXC_ERROR;
51: END IF;
52: bis_collection_utilities.log('Start of the Source Code Population Program');
45: BEGIN
46:
47:
48: IF NOT bis_collection_utilities.setup(l_object_name) THEN
49: bis_collection_utilities.log('Object BIM_SOURCE_CODE Not Setup Properly');
50: RAISE FND_API.G_EXC_ERROR;
51: END IF;
52: bis_collection_utilities.log('Start of the Source Code Population Program');
53:
48: IF NOT bis_collection_utilities.setup(l_object_name) THEN
49: bis_collection_utilities.log('Object BIM_SOURCE_CODE Not Setup Properly');
50: RAISE FND_API.G_EXC_ERROR;
51: END IF;
52: bis_collection_utilities.log('Start of the Source Code Population Program');
53:
54: -- Standard call to check for call compatibility.
55: IF NOT FND_API.Compatible_API_Call ( l_api_version_number,
56: p_api_version_number,
68:
69: -- Initialize API return status to SUCCESS
70: x_return_status := FND_API.G_RET_STS_SUCCESS;
71:
72: bis_collection_utilities.get_last_refresh_dates(l_object_name,
73: l_conc_start_date,
74: l_conc_end_date,
75: l_start_date,
76: l_end_date);
251: --EXECUTE IMMEDIATE 'TRUNCATE TABLE bim.bim_i_source_codes ';
252:
253:
254: l_table_name := 'BIM_I_SOURCE_CODES';
255: bis_collection_utilities.log('Running Initial Load of Source Codes');
256:
257: EXECUTE IMMEDIATE 'TRUNCATE TABLE '||l_schema||'.BIM_I_SOURCE_CODES';
258:
259: BIS_COLLECTION_UTILITIES.deleteLogForObject('BIM_SOURCE_CODE');
255: bis_collection_utilities.log('Running Initial Load of Source Codes');
256:
257: EXECUTE IMMEDIATE 'TRUNCATE TABLE '||l_schema||'.BIM_I_SOURCE_CODES';
258:
259: BIS_COLLECTION_UTILITIES.deleteLogForObject('BIM_SOURCE_CODE');
260:
261: INSERT /*+ append parallel */
262: INTO BIM_I_SOURCE_CODES SRC
263: (
699: COMMIT;
700:
701:
702:
703: bis_collection_utilities.wrapup(p_status => TRUE
704: ,p_count => sql%rowcount
705: ,p_period_from =>p_start_date
706: ,p_period_to => sysdate
707: );
711: --l_table_name := 'BIM_I_SOURCE_CODES';
712: --fnd_message.set_name('BIM','BIM_R_ANALYZE_TABLE');
713: --fnd_message.set_token('TABLE_NAME',l_table_name,FALSE);
714: --fnd_file.put_line(fnd_file.log,fnd_message.get);
715: bis_collection_utilities.log('Before Analyze of the table BIM_I_SOURCE_CODES');
716:
717: --Analyze the facts table
718: DBMS_STATS.gather_table_stats('BIM','BIM_I_SOURCE_CODES', estimate_percent => 5,
719: degree => 8, granularity => 'GLOBAL', cascade =>TRUE);
727:
728: /*
729:
730:
731: bis_collection_utilities.log('Start of Initial Load of Resource_ids');
732:
733: execute immediate 'truncate table bim.bim_i_resource';
734:
735: insert into bim.bim_i_resource
760:
761: DBMS_STATS.gather_table_stats('BIM','bim_i_resource', estimate_percent => 5,
762: degree => 8, granularity => 'GLOBAL', cascade =>TRUE);
763:
764: bis_collection_utilities.log('End Initial Load of Resource_ids');
765:
766: commit;
767:
768: */
771: /************--End--********To get Resource ids of Active Employees***************************/
772:
773:
774:
775: bis_collection_utilities.log('Successful Completion of Source Codes Population Program');
776:
777:
778: EXCEPTION
779:
882: DELETE FROM bim_i_source_codes WHERE trunc(obj_last_update_date) = p_start_date;
883:
884:
885: l_table_name := 'BIM_I_SOURCE_CODES';
886: bis_collection_utilities.log('Running Incremental Load of Source Codes');
887:
888: MERGE INTO bim_i_source_codes facts
889: USING (
890: SELECT
1435: COMMIT;
1436:
1437:
1438:
1439: bis_collection_utilities.wrapup(p_status => TRUE
1440: ,p_count => sql%rowcount
1441: ,p_period_from => p_start_date
1442: ,p_period_to => sysdate
1443: );
1444:
1445: /***************************************************************/
1446:
1447:
1448: bis_collection_utilities.log('Before Analyze of the table BIM_I_SOURCE_CODES');
1449:
1450: --Analyze the facts table
1451: DBMS_STATS.gather_table_stats('BIM','BIM_I_SOURCE_CODES', estimate_percent => 5,
1452: degree => 8, granularity => 'GLOBAL', cascade =>TRUE);
1453:
1454: /************--Start--********To get Resource ids of Active Employees***************************/
1455:
1456: /*
1457: bis_collection_utilities.log('Start of INCREMENTAL Load of Resource_ids');
1458:
1459: execute immediate 'truncate table bim_i_resource_stg';
1460:
1461: insert into bim.bim_i_resource_stg
1505:
1506: DBMS_STATS.gather_table_stats('BIM','bim_i_resource', estimate_percent => 5,
1507: degree => 8, granularity => 'GLOBAL', cascade =>TRUE);
1508:
1509: bis_collection_utilities.log('End Initial Load of Resource_ids');
1510:
1511: commit;
1512:
1513: */
1513: */
1514:
1515: /************--End--********To get Resource ids of Active Employees***************************/
1516:
1517: bis_collection_utilities.log('Successful Completion of Source Codes Population Program');
1518:
1519:
1520: EXCEPTION
1521: