DBA Data[Home] [Help]

APPS.BIL_BI_OPDTL_F_PKG dependencies on BIL_BI_OPDTL_F

Line 1: PACKAGE BODY BIL_BI_OPDTL_F_PKG AS

1: PACKAGE BODY BIL_BI_OPDTL_F_PKG AS
2: /*$Header: bilos1b.pls 120.11 2006/10/05 16:32:57 esapozhn noship $*/
3:
4: g_retcode VARCHAR2(20);
5: g_start_date DATE;

Line 191: g_pkg := 'bil.patch.115.sql.bil_bi_opdtl_f_pkg.';

187: IS
188: l_valid_setup BOOLEAN;
189: l_proc VARCHAR2(100);
190: BEGIN
191: g_pkg := 'bil.patch.115.sql.bil_bi_opdtl_f_pkg.';
192: l_proc := 'Init_load';
193:
194: l_valid_setup := BIS_COLLECTION_UTILITIES.SETUP('BIL_BI_OPDTL_F');
195: IF (not l_valid_setup) THEN

Line 194: l_valid_setup := BIS_COLLECTION_UTILITIES.SETUP('BIL_BI_OPDTL_F');

190: BEGIN
191: g_pkg := 'bil.patch.115.sql.bil_bi_opdtl_f_pkg.';
192: l_proc := 'Init_load';
193:
194: l_valid_setup := BIS_COLLECTION_UTILITIES.SETUP('BIL_BI_OPDTL_F');
195: IF (not l_valid_setup) THEN
196: IF bil_bi_util_collection_pkg.chkLogLevel(fnd_log.LEVEL_EVENT) THEN
197: bil_bi_util_collection_pkg.writeLog(
198: p_log_level => fnd_log.LEVEL_EVENT,

Line 262: g_pkg := 'bil.patch.115.sql.bil_bi_opdtl_f_pkg.';

258: l_proc VARCHAR2(100);
259: l_valid_setup BOOLEAN;
260: BEGIN
261: l_proc := 'Incr_load';
262: g_pkg := 'bil.patch.115.sql.bil_bi_opdtl_f_pkg.';
263:
264: l_valid_setup := BIS_COLLECTION_UTILITIES.SETUP('BIL_BI_OPDTL_F');
265:
266: IF (not l_valid_setup) THEN

Line 264: l_valid_setup := BIS_COLLECTION_UTILITIES.SETUP('BIL_BI_OPDTL_F');

260: BEGIN
261: l_proc := 'Incr_load';
262: g_pkg := 'bil.patch.115.sql.bil_bi_opdtl_f_pkg.';
263:
264: l_valid_setup := BIS_COLLECTION_UTILITIES.SETUP('BIL_BI_OPDTL_F');
265:
266: IF (not l_valid_setup) THEN
267: IF bil_bi_util_collection_pkg.chkLogLevel(fnd_log.LEVEL_EVENT) THEN
268: bil_bi_util_collection_pkg.writeLog(

Line 283: to_char(fnd_date.displaydt_to_date(BIS_COLLECTION_UTILITIES.get_last_refresh_period('BIL_BI_OPDTL_F'))

279: p_module => g_pkg || l_proc || ' begin',
280: p_msg => 'Start of Procedure '|| l_proc);
281: END IF;
282: l_start_date :=
283: to_char(fnd_date.displaydt_to_date(BIS_COLLECTION_UTILITIES.get_last_refresh_period('BIL_BI_OPDTL_F'))
284: ,'YYYY/MM/DD HH24:MI:SS');
285:
286: -- Find the last collection time and use it as the start date for
287: -- this time period.

Line 420: Init(p_object_name => 'BIL_BI_OPDTL_F');

416: G_Refresh_Flag := p_truncate;
417:
418:
419: /*For initial set up call INIT*/
420: Init(p_object_name => 'BIL_BI_OPDTL_F');
421:
422: /*ctoba ER 4160374 - uptake of BIS API */
423:
424: l_failure_date := fnd_date.displaydt_to_date(BIS_COLLECTION_UTILITIES.get_last_failure_period('BIL_BI_OPDTL_F'));

Line 424: l_failure_date := fnd_date.displaydt_to_date(BIS_COLLECTION_UTILITIES.get_last_failure_period('BIL_BI_OPDTL_F'));

420: Init(p_object_name => 'BIL_BI_OPDTL_F');
421:
422: /*ctoba ER 4160374 - uptake of BIS API */
423:
424: l_failure_date := fnd_date.displaydt_to_date(BIS_COLLECTION_UTILITIES.get_last_failure_period('BIL_BI_OPDTL_F'));
425:
426:
427:
428:

Line 463: SELECT count(1) INTO l_count FROM BIL_BI_OPDTL_F WHERE rownum < 2;

459: p_module => g_pkg || l_proc ,
460: p_msg =>'Summary Error Check Successful!'
461: );
462: END IF;
463: SELECT count(1) INTO l_count FROM BIL_BI_OPDTL_F WHERE rownum < 2;
464: IF (l_count > 0) THEN
465: Insert_Into_Sumry_Incr;
466: ELSE
467: Insert_Into_Sumry_Init;

Line 524: BIS_COLLECTION_UTILITIES.deleteLogForObject ('BIL_BI_OPDTL_F');

520: p_module => g_pkg || l_proc ,
521: p_msg => 'Default Parameter : Global Start Date ='||G_global_Start_date);
522: END IF;
523: IF(g_refresh_flag = 'Y') THEN
524: BIS_COLLECTION_UTILITIES.deleteLogForObject ('BIL_BI_OPDTL_F');
525: bil_bi_util_collection_pkg.Truncate_Table('BIL_BI_OPDTL_F');
526:
527: IF p_start_date IS NOT NULL THEN
528: G_Start_date := TO_DATE(p_start_date, l_date_format);

Line 525: bil_bi_util_collection_pkg.Truncate_Table('BIL_BI_OPDTL_F');

521: p_msg => 'Default Parameter : Global Start Date ='||G_global_Start_date);
522: END IF;
523: IF(g_refresh_flag = 'Y') THEN
524: BIS_COLLECTION_UTILITIES.deleteLogForObject ('BIL_BI_OPDTL_F');
525: bil_bi_util_collection_pkg.Truncate_Table('BIL_BI_OPDTL_F');
526:
527: IF p_start_date IS NOT NULL THEN
528: G_Start_date := TO_DATE(p_start_date, l_date_format);
529: IF(G_START_DATE <= sysdate) THEN

Line 551: fnd_date.displaydt_to_date(BIS_COLLECTION_UTILITIES.get_last_refresh_period('BIL_BI_OPDTL_F'));

547: END IF;
548: END IF;
549: ELSE
550: G_Start_date :=
551: fnd_date.displaydt_to_date(BIS_COLLECTION_UTILITIES.get_last_refresh_period('BIL_BI_OPDTL_F'));
552: IF bil_bi_util_collection_pkg.chkLogLevel(fnd_log.LEVEL_EVENT) THEN
553: bil_bi_util_collection_pkg.writeLog(
554: p_log_level => fnd_log.LEVEL_EVENT,
555: p_module => g_pkg || l_proc ,

Line 585: SELECT COUNT(1) into l_fact_count FROM BIL_BI_OPDTL_F where rownum < 2;

581: END IF;
582: /*If the Initial Load is ran without setting the truncate flag to 'Y'*/
583: ELSE
584: /* if both staing and fact has zero rows, treat it as an initial load */
585: SELECT COUNT(1) into l_fact_count FROM BIL_BI_OPDTL_F where rownum < 2;
586:
587: /* resume should called wrap up which should have set last_refresh_period */
588:
589: l_max_date := fnd_date.displaydt_to_date(BIS_COLLECTION_UTILITIES.get_last_refresh_period('BIL_BI_OPDTL_F'));

Line 589: l_max_date := fnd_date.displaydt_to_date(BIS_COLLECTION_UTILITIES.get_last_refresh_period('BIL_BI_OPDTL_F'));

585: SELECT COUNT(1) into l_fact_count FROM BIL_BI_OPDTL_F where rownum < 2;
586:
587: /* resume should called wrap up which should have set last_refresh_period */
588:
589: l_max_date := fnd_date.displaydt_to_date(BIS_COLLECTION_UTILITIES.get_last_refresh_period('BIL_BI_OPDTL_F'));
590: IF bil_bi_util_collection_pkg.chkLogLevel(fnd_log.LEVEL_EVENT) THEN
591: bil_bi_util_collection_pkg.writeLog(
592: p_log_level => fnd_log.LEVEL_EVENT,
593: p_module => g_pkg || l_proc ,

Line 700: bil_bi_util_collection_pkg.analyze_table('BIL_BI_OPDTL_F',TRUE, 10, 'GLOBAL');

696: G_status := TRUE;
697: Clean_up;
698: IF (G_refresh_flag = 'Y') THEN
699: --- why 99 percent
700: bil_bi_util_collection_pkg.analyze_table('BIL_BI_OPDTL_F',TRUE, 10, 'GLOBAL');
701: END IF;
702:
703:
704:

Line 1285: --Delete BIL_BI_OPDTL_F ???? too much cost here

1281:
1282: END LOOP;
1283: CLOSE c_item_prod;
1284:
1285: --Delete BIL_BI_OPDTL_F ???? too much cost here
1286:
1287: --Delete BIL_BI_OPDTL_STG WHERE
1288:
1289: --(item_id = -1 and nvl(product_category_id,-1)=-1) or valid_flag = 'F';

Line 1359: l_start_date := fnd_date.displaydt_to_date(get_first_success_period('BIL_BI_OPDTL_F'));

1355: p_module => g_pkg || l_proc || ' begin',
1356: p_msg => 'Start of Procedure '|| l_proc);
1357: END IF;
1358:
1359: l_start_date := fnd_date.displaydt_to_date(get_first_success_period('BIL_BI_OPDTL_F'));
1360:
1361: IF bil_bi_util_collection_pkg.chkLogLevel(fnd_log.LEVEL_EVENT) THEN
1362: bil_bi_util_collection_pkg.writeLog(
1363: p_log_level => fnd_log.LEVEL_EVENT,

Line 1531: /*delete from bil.bil_bi_opdtl_f a where exists

1527: p_module => g_pkg || l_proc ,
1528: p_msg => 'Rows Inserted into staging table are: '||l_cnt);
1529: END IF;
1530:
1531: /*delete from bil.bil_bi_opdtl_f a where exists
1532: (select lead_id from as_leads_all b where
1533: a.opty_id=b.lead_id and b.last_update_date >=G_Start_Date
1534: and b.lead_id not in (select distinct lead_id from as_sales_credits));
1535:

Line 1781: -- DELETE /*+ index_ffs(f,BIL_BI_OPDTL_F_U1) */ FROM BIL_BI_OPDTL_F f

1777: p_msg => 'Start of Procedure '|| l_proc);
1778: END IF;
1779:
1780:
1781: -- DELETE /*+ index_ffs(f,BIL_BI_OPDTL_F_U1) */ FROM BIL_BI_OPDTL_F f
1782: -- WHERE EXISTS(
1783: -- SELECT /*+ index_ffs(stg,BIL_BI_OPDTL_STG_U1) */ 1
1784: -- FROM BIL_BI_OPDTL_STG stg
1785: -- WHERE f.opty_id = stg.lead_id

Line 1788: DELETE FROM BIL_BI_OPDTL_F f

1784: -- FROM BIL_BI_OPDTL_STG stg
1785: -- WHERE f.opty_id = stg.lead_id
1786: -- );
1787:
1788: DELETE FROM BIL_BI_OPDTL_F f
1789: WHERE NOT EXISTS
1790: ( SELECT 1 FROM AS_SALES_CREDITS sc WHERE f.sales_credit_id = sc.sales_credit_id );
1791:
1792:

Line 1799: p_msg => 'Deleted '|| l_count ||' from BIL_BI_OPDTL_F');

1795: IF bil_bi_util_collection_pkg.chkLogLevel(fnd_log.LEVEL_EVENT) THEN
1796: bil_bi_util_collection_pkg.writeLog(
1797: p_log_level => fnd_log.LEVEL_EVENT,
1798: p_module => g_pkg || l_proc ,
1799: p_msg => 'Deleted '|| l_count ||' from BIL_BI_OPDTL_F');
1800: END IF;
1801:
1802: MERGE INTO BIL_BI_OPDTL_F fact
1803: USING

Line 1802: MERGE INTO BIL_BI_OPDTL_F fact

1798: p_module => g_pkg || l_proc ,
1799: p_msg => 'Deleted '|| l_count ||' from BIL_BI_OPDTL_F');
1800: END IF;
1801:
1802: MERGE INTO BIL_BI_OPDTL_F fact
1803: USING
1804: (SELECT
1805: lead_id
1806: ,to_number(to_char(txn_date, 'J')) txn_time_id

Line 1966: INSERT INTO BIL_BI_OPDTL_F sumry (

1962: ,stage.program_id,stage.program_update_date
1963: ,stage.lead_line_id,stage.sales_credit_id,stage.opty_effective_time_id,stage.opty_rank);
1964:
1965: /*
1966: INSERT INTO BIL_BI_OPDTL_F sumry (
1967: opty_id
1968: ,txn_time_id
1969: ,opty_close_time_id
1970: ,opty_ld_conversion_time_id

Line 2080: p_msg => 'Inserted '|| g_row_num ||' into BIL_BI_OPDTL_F table from BIL_BI_OPDTL_STG');

2076: IF bil_bi_util_collection_pkg.chkLogLevel(fnd_log.LEVEL_EVENT) THEN
2077: bil_bi_util_collection_pkg.writeLog(
2078: p_log_level => fnd_log.LEVEL_EVENT,
2079: p_module => g_pkg || l_proc ,
2080: p_msg => 'Inserted '|| g_row_num ||' into BIL_BI_OPDTL_F table from BIL_BI_OPDTL_STG');
2081: END IF;
2082:
2083: IF bil_bi_util_collection_pkg.chkLogLevel(fnd_log.LEVEL_PROCEDURE) THEN
2084: bil_bi_util_collection_pkg.writeLog(

Line 2119: INSERT /*+ APPEND PARALLEL(sumry)*/ INTO BIL_BI_OPDTL_F sumry

2115: p_module => g_pkg || l_proc || ' begin',
2116: p_msg => 'Start of Procedure '|| l_proc);
2117: END IF;
2118:
2119: INSERT /*+ APPEND PARALLEL(sumry)*/ INTO BIL_BI_OPDTL_F sumry
2120: (
2121: opty_id
2122: ,txn_time_id
2123: ,opty_close_time_id

Line 2240: p_msg => 'Inserted '||g_row_num||' into BIL_BI_OPDTL_F table from BIL_BI_OPDTL_STG');

2236: IF bil_bi_util_collection_pkg.chkLogLevel(fnd_log.LEVEL_EVENT) THEN
2237: bil_bi_util_collection_pkg.writeLog(
2238: p_log_level => fnd_log.LEVEL_EVENT,
2239: p_module => g_pkg || l_proc ,
2240: p_msg => 'Inserted '||g_row_num||' into BIL_BI_OPDTL_F table from BIL_BI_OPDTL_STG');
2241: END IF;
2242: IF bil_bi_util_collection_pkg.chkLogLevel(fnd_log.LEVEL_PROCEDURE) THEN
2243: bil_bi_util_collection_pkg.writeLog(
2244: p_log_level => fnd_log.LEVEL_PROCEDURE,

Line 2594: END BIL_BI_OPDTL_F_PKG;

2590:
2591: RAISE;
2592: END Populate_Currency_Rate;
2593:
2594: END BIL_BI_OPDTL_F_PKG;