DBA Data[Home] [Help]

APPS.INV_HV_TXN_PURGE dependencies on MTL_UNIT_TRANSACTIONS

Line 111: FROM MTL_UNIT_TRANSACTIONS

107:
108:
109: CURSOR c_mut IS
110: SELECT ROWID
111: FROM MTL_UNIT_TRANSACTIONS
112: WHERE transaction_date < l_cut_off_date
113: AND (p_organization_id IS NULL OR organization_id = p_organization_id);
114:
115:

Line 648: --Purging MTL_UNIT_TRANSACTIONS

644: END;
645:
646:
647:
648: --Purging MTL_UNIT_TRANSACTIONS
649: BEGIN
650:
651: IF (l_debug = 1) THEN
652: inv_trx_util_pub.TRACE(' Purging MTL_UNIT_TRANSACTIONS ... ' );

Line 652: inv_trx_util_pub.TRACE(' Purging MTL_UNIT_TRANSACTIONS ... ' );

648: --Purging MTL_UNIT_TRANSACTIONS
649: BEGIN
650:
651: IF (l_debug = 1) THEN
652: inv_trx_util_pub.TRACE(' Purging MTL_UNIT_TRANSACTIONS ... ' );
653: END IF;
654:
655: -- This will get the count of rows to be deleted
656: BEGIN

Line 659: FROM mtl_unit_transactions

655: -- This will get the count of rows to be deleted
656: BEGIN
657: SELECT count(transaction_id)
658: INTO rows_to_del
659: FROM mtl_unit_transactions
660: WHERE transaction_date < l_cut_off_date
661: AND (p_organization_id IS NULL OR organization_id = p_organization_id);
662:
663: EXCEPTION

Line 684: inv_trx_util_pub.TRACE(' Deleting from MTL_UNIT_TRANSACTIONS -- Direct deletion approach' );

680: IF rows_to_del < max_rows_to_del THEN
681: --Rows to be deleted are less hence delete them directly
682:
683: IF (l_debug = 1) THEN
684: inv_trx_util_pub.TRACE(' Deleting from MTL_UNIT_TRANSACTIONS -- Direct deletion approach' );
685: END IF;
686:
687: OPEN c_mut;
688: LOOP

Line 697: DELETE FROM mtl_unit_transactions

693: EXIT;
694: END IF;
695:
696: FORALL i IN rowid_list.first .. rowid_list.last
697: DELETE FROM mtl_unit_transactions
698: WHERE ROWID = rowid_list(i);
699: COMMIT;
700: EXIT WHEN c_mut%notfound;
701: END LOOP;

Line 704: inv_trx_util_pub.TRACE(' Deleted ' || rows_to_del || ' row(s) from MTL_UNIT_TRANSACTIONS ' );

700: EXIT WHEN c_mut%notfound;
701: END LOOP;
702:
703: IF (l_debug = 1) THEN
704: inv_trx_util_pub.TRACE(' Deleted ' || rows_to_del || ' row(s) from MTL_UNIT_TRANSACTIONS ' );
705: END IF;
706:
707: CLOSE c_mut;
708:

Line 710: inv_trx_util_pub.TRACE(' Purged MTL_UNIT_TRANSACTIONS sucessfully ' );

706:
707: CLOSE c_mut;
708:
709: IF (l_debug = 1) THEN
710: inv_trx_util_pub.TRACE(' Purged MTL_UNIT_TRANSACTIONS sucessfully ' );
711: END IF;
712:
713: ELSE
714:

Line 716: s_sql_stmt := ' CREATE TABLE mtl_unit_transactions_bu '

712:
713: ELSE
714:
715: -- Rows to be delted are more hence follow Temp table creation method
716: s_sql_stmt := ' CREATE TABLE mtl_unit_transactions_bu '
717: || ' STORAGE (initial 1 M next 1 M minextents 1 maxextents unlimited) '
718: || ' NOLOGGING AS '
719: || ' SELECT * FROM MTL_UNIT_TRANSACTIONS '
720: || ' WHERE 1 = 1 ' ;

Line 719: || ' SELECT * FROM MTL_UNIT_TRANSACTIONS '

715: -- Rows to be delted are more hence follow Temp table creation method
716: s_sql_stmt := ' CREATE TABLE mtl_unit_transactions_bu '
717: || ' STORAGE (initial 1 M next 1 M minextents 1 maxextents unlimited) '
718: || ' NOLOGGING AS '
719: || ' SELECT * FROM MTL_UNIT_TRANSACTIONS '
720: || ' WHERE 1 = 1 ' ;
721:
722: IF p_organization_id IS NOT NULL THEN
723: s_sql_stmt := s_sql_stmt || ' and organization_id <> ' || p_organization_id;

Line 736: inv_trx_util_pub.TRACE(' Temp Table mtl_unit_transactions_bu created.' );

732: rows_processed := dbms_sql.execute(cursor_name);
733: DBMS_SQL.close_cursor(cursor_name);
734:
735: IF (l_debug = 1) THEN
736: inv_trx_util_pub.TRACE(' Temp Table mtl_unit_transactions_bu created.' );
737: END IF;
738:
739: --Truncate the original table
740: s_sql_stmt := 'TRUNCATE TABLE '|| inv_user_name || '.MTL_UNIT_TRANSACTIONS';

Line 740: s_sql_stmt := 'TRUNCATE TABLE '|| inv_user_name || '.MTL_UNIT_TRANSACTIONS';

736: inv_trx_util_pub.TRACE(' Temp Table mtl_unit_transactions_bu created.' );
737: END IF;
738:
739: --Truncate the original table
740: s_sql_stmt := 'TRUNCATE TABLE '|| inv_user_name || '.MTL_UNIT_TRANSACTIONS';
741: cursor_name := dbms_sql.open_cursor;
742: DBMS_SQL.PARSE(cursor_name, s_sql_stmt, dbms_sql.native);
743: rows_processed := dbms_sql.execute(cursor_name);
744: DBMS_SQL.close_cursor(cursor_name);

Line 747: inv_trx_util_pub.TRACE(' Truncated the table MTL_UNIT_TRANSACTIONS');

743: rows_processed := dbms_sql.execute(cursor_name);
744: DBMS_SQL.close_cursor(cursor_name);
745:
746: IF (l_debug = 1) THEN
747: inv_trx_util_pub.TRACE(' Truncated the table MTL_UNIT_TRANSACTIONS');
748: END IF;
749:
750: -- Insert required rows back to original table
751: s_sql_stmt := 'INSERT INTO MTL_UNIT_TRANSACTIONS SELECT * FROM mtl_unit_transactions_bu';

Line 751: s_sql_stmt := 'INSERT INTO MTL_UNIT_TRANSACTIONS SELECT * FROM mtl_unit_transactions_bu';

747: inv_trx_util_pub.TRACE(' Truncated the table MTL_UNIT_TRANSACTIONS');
748: END IF;
749:
750: -- Insert required rows back to original table
751: s_sql_stmt := 'INSERT INTO MTL_UNIT_TRANSACTIONS SELECT * FROM mtl_unit_transactions_bu';
752: cursor_name := dbms_sql.open_cursor;
753: DBMS_SQL.PARSE(cursor_name, s_sql_stmt, dbms_sql.native);
754: rows_processed := dbms_sql.execute(cursor_name);
755: DBMS_SQL.close_cursor(cursor_name);

Line 758: inv_trx_util_pub.TRACE(' Inserted ' || rows_processed || ' row(s) into the table MTL_UNIT_TRANSACTIONS');

754: rows_processed := dbms_sql.execute(cursor_name);
755: DBMS_SQL.close_cursor(cursor_name);
756:
757: IF (l_debug = 1) THEN
758: inv_trx_util_pub.TRACE(' Inserted ' || rows_processed || ' row(s) into the table MTL_UNIT_TRANSACTIONS');
759: END IF;
760:
761: --Commit the transaction
762: COMMIT;

Line 768: s_sql_stmt := 'DROP TABLE mtl_unit_transactions_bu';

764: inv_trx_util_pub.TRACE(' Commited the transactions ');
765: END IF;
766:
767: --Drop the temporary table
768: s_sql_stmt := 'DROP TABLE mtl_unit_transactions_bu';
769: cursor_name := dbms_sql.open_cursor;
770: DBMS_SQL.PARSE(cursor_name, s_sql_stmt, dbms_sql.native);
771: rows_processed := dbms_sql.execute(cursor_name);
772: DBMS_SQL.close_cursor(cursor_name);

Line 775: inv_trx_util_pub.TRACE(' Dropped the temporary table mtl_unit_transactions_bu');

771: rows_processed := dbms_sql.execute(cursor_name);
772: DBMS_SQL.close_cursor(cursor_name);
773:
774: IF (l_debug = 1) THEN
775: inv_trx_util_pub.TRACE(' Dropped the temporary table mtl_unit_transactions_bu');
776: END IF;
777:
778: END IF;
779: