27:
28: BEGIN
29:
30: IF (FND_INSTALLATION.GET_APP_INFO('FII', l_status, l_industry, l_fii_schema)) THEN
31: l_stmt := 'TRUNCATE TABLE ' || l_fii_schema ||'.FII_PA_COST_PK';
32: EXECUTE IMMEDIATE l_stmt;
33: END IF;
34:
35: RETURN TRUE;
83: IS
84: rows2 Number:=0;
85:
86: BEGIN
87: INSERT INTO fii_pa_cost_pk(
88: Primary_Key1,
89: Primary_Key2 )
90: SELECT
91: TO_NUMBER(SUBSTR (COST_PK, 1, INSTR(COST_PK, '-' )-1)),
501: l_count NUMBER;
502:
503: BEGIN
504:
505: INSERT INTO fii_pa_cost_pk
506: (
507: Primary_Key1,
508: Primary_Key2
509: )
522: end if;
523:
524: IF (FND_INSTALLATION.GET_APP_INFO('FII', l_status, l_industry, l_fii_schema)) THEN
525:
526: l_stmt := 'ANALYZE TABLE ' || l_fii_schema || '.FII_PA_COST_PK COMPUTE STATISTICS';
527: EXECUTE IMMEDIATE l_stmt;
528:
529: if g_debug_flag = 'Y' then
530: edw_log.put_line('Analyzed primary key table' );
643:
644: if NOT IDENTIFY_CHANGE THEN
645: RAISE l_iden_change_failure;
646: end if;
647: select count(*) into rows1 from FII_PA_COST_pk;
648:
649: if g_debug_flag = 'Y' then
650: edw_log.put_line('Number of rows in pk after identify change'||rows1 );
651: fii_util.stop_timer;
679: end if;
680:
681: -- --------------------------------------------------------
682: -- 4. Clean up any records left from previous process in
683: -- the FII_PA_COST_PK table
684: -- --------------------------------------------------------
685:
686: if g_debug_flag = 'Y' then
687: edw_log.put_line(' ');
691: -- note that TRUNCATE statement does implicit commit;
692:
693: IF NOT TRUNCATE_PK THEN
694: RAISE l_truncate_tmp_pk_failure;
695: -- select count(*) into rows1 from FII_PA_COST_PK;
696: -- if g_debug_flag = 'Y' then
697: -- edw_log.put_line('rows in tmp_pk after truncating'||to_char(rows1));
698: -- end if;
699: END IF;
696: -- if g_debug_flag = 'Y' then
697: -- edw_log.put_line('rows in tmp_pk after truncating'||to_char(rows1));
698: -- end if;
699: END IF;
700: -- select count(*) into rows1 from FII_PA_COST_PK;
701: -- if g_debug_flag = 'Y' then
702: -- edw_log.put_line('rows in tmp_pk after truncating'||to_char(rows1));
703: -- end if;
704:
800:
801: COMMIT;
802:
803: -- --------------------------------------------------------
804: -- Clean up any records in the FII_PA_COST_PK table
805: -- --------------------------------------------------------
806:
807: if g_debug_flag = 'Y' then
808: edw_log.put_line(' ');