DBA Data[Home] [Help]

APPS.INV_HV_TXN_PURGE dependencies on MTL_TRANSACTION_ACCOUNTS

Line 118: FROM MTL_TRANSACTION_ACCOUNTS

114:
115:
116: CURSOR c_mta IS
117: SELECT ROWID
118: FROM MTL_TRANSACTION_ACCOUNTS
119: WHERE transaction_date < l_cut_off_date
120: AND (p_organization_id IS NULL OR organization_id = p_organization_id);
121:
122:

Line 795: --Purging MTL_TRANSACTION_ACCOUNTS

791: END;
792:
793:
794:
795: --Purging MTL_TRANSACTION_ACCOUNTS
796: BEGIN
797:
798: IF (l_debug = 1) THEN
799: inv_trx_util_pub.TRACE(' Purging MTL_TRANSACTION_ACCOUNTS ... ' );

Line 799: inv_trx_util_pub.TRACE(' Purging MTL_TRANSACTION_ACCOUNTS ... ' );

795: --Purging MTL_TRANSACTION_ACCOUNTS
796: BEGIN
797:
798: IF (l_debug = 1) THEN
799: inv_trx_util_pub.TRACE(' Purging MTL_TRANSACTION_ACCOUNTS ... ' );
800: END IF;
801:
802: -- This will get the count of rows to be deleted
803: BEGIN

Line 807: FROM mtl_transaction_accounts

803: BEGIN
804: --Start bug 7336061
805: /*SELECT count(transaction_id)
806: INTO rows_to_del
807: FROM mtl_transaction_accounts
808: WHERE transaction_date < l_cut_off_date
809: AND (p_organization_id IS NULL OR organization_id = p_organization_id);*/
810:
811: IF p_organization_id IS NULL THEN

Line 815: FROM mtl_transaction_accounts

811: IF p_organization_id IS NULL THEN
812:
813: SELECT COUNT(transaction_id)
814: INTO rows_to_del
815: FROM mtl_transaction_accounts
816: WHERE transaction_date < l_cut_off_date ;
817:
818: ELSE
819:

Line 822: FROM mtl_transaction_accounts

818: ELSE
819:
820: SELECT COUNT(transaction_id)
821: INTO rows_to_del
822: FROM mtl_transaction_accounts
823: WHERE transaction_date < l_cut_off_date
824: AND organization_id = p_organization_id ;
825:
826: END IF ;

Line 849: inv_trx_util_pub.TRACE(' Deleting from MTL_TRANSACTION_ACCOUNTS -- Direct deletion approach' );

845: IF rows_to_del < max_rows_to_del THEN
846: --Rows to be deleted are less hence delete them directly
847:
848: IF (l_debug = 1) THEN
849: inv_trx_util_pub.TRACE(' Deleting from MTL_TRANSACTION_ACCOUNTS -- Direct deletion approach' );
850: END IF;
851:
852: OPEN c_mta;
853: LOOP

Line 862: DELETE FROM mtl_transaction_accounts

858: EXIT;
859: END IF;
860:
861: FORALL i IN rowid_list.first .. rowid_list.last
862: DELETE FROM mtl_transaction_accounts
863: WHERE ROWID = rowid_list(i);
864: COMMIT;
865: EXIT WHEN c_mta%notfound;
866: END LOOP;

Line 869: inv_trx_util_pub.TRACE(' Deleted ' || rows_to_del || ' row(s) from MTL_TRANSACTION_ACCOUNTS ' );

865: EXIT WHEN c_mta%notfound;
866: END LOOP;
867:
868: IF (l_debug = 1) THEN
869: inv_trx_util_pub.TRACE(' Deleted ' || rows_to_del || ' row(s) from MTL_TRANSACTION_ACCOUNTS ' );
870: END IF;
871:
872: CLOSE c_mta;
873:

Line 875: inv_trx_util_pub.TRACE(' Purged MTL_TRANSACTION_ACCOUNTS sucessfully ' );

871:
872: CLOSE c_mta;
873:
874: IF (l_debug = 1) THEN
875: inv_trx_util_pub.TRACE(' Purged MTL_TRANSACTION_ACCOUNTS sucessfully ' );
876: END IF;
877:
878: ELSE
879:

Line 881: s_sql_stmt := ' CREATE TABLE mtl_transaction_accounts_bu '

877:
878: ELSE
879:
880: -- Rows to be delted are more hence follow Temp table creation method
881: s_sql_stmt := ' CREATE TABLE mtl_transaction_accounts_bu '
882: || ' STORAGE (initial 1 M next 1 M minextents 1 maxextents unlimited) '
883: || ' NOLOGGING AS '
884: || ' SELECT * FROM MTL_TRANSACTION_ACCOUNTS '
885: || ' WHERE 1 = 1 ' ;

Line 884: || ' SELECT * FROM MTL_TRANSACTION_ACCOUNTS '

880: -- Rows to be delted are more hence follow Temp table creation method
881: s_sql_stmt := ' CREATE TABLE mtl_transaction_accounts_bu '
882: || ' STORAGE (initial 1 M next 1 M minextents 1 maxextents unlimited) '
883: || ' NOLOGGING AS '
884: || ' SELECT * FROM MTL_TRANSACTION_ACCOUNTS '
885: || ' WHERE 1 = 1 ' ;
886:
887: IF p_organization_id IS NOT NULL THEN
888: s_sql_stmt := s_sql_stmt || ' and organization_id <> ' || p_organization_id;

Line 901: inv_trx_util_pub.TRACE(' Temp Table mtl_transaction_accounts_bu created.' );

897: rows_processed := dbms_sql.execute(cursor_name);
898: DBMS_SQL.close_cursor(cursor_name);
899:
900: IF (l_debug = 1) THEN
901: inv_trx_util_pub.TRACE(' Temp Table mtl_transaction_accounts_bu created.' );
902: END IF;
903:
904: --Truncate the original table
905: s_sql_stmt := 'TRUNCATE TABLE '|| inv_user_name || '.MTL_TRANSACTION_ACCOUNTS';

Line 905: s_sql_stmt := 'TRUNCATE TABLE '|| inv_user_name || '.MTL_TRANSACTION_ACCOUNTS';

901: inv_trx_util_pub.TRACE(' Temp Table mtl_transaction_accounts_bu created.' );
902: END IF;
903:
904: --Truncate the original table
905: s_sql_stmt := 'TRUNCATE TABLE '|| inv_user_name || '.MTL_TRANSACTION_ACCOUNTS';
906: cursor_name := dbms_sql.open_cursor;
907: DBMS_SQL.PARSE(cursor_name, s_sql_stmt, dbms_sql.native);
908: rows_processed := dbms_sql.execute(cursor_name);
909: DBMS_SQL.close_cursor(cursor_name);

Line 912: inv_trx_util_pub.TRACE(' Truncated the table MTL_TRANSACTION_ACCOUNTS');

908: rows_processed := dbms_sql.execute(cursor_name);
909: DBMS_SQL.close_cursor(cursor_name);
910:
911: IF (l_debug = 1) THEN
912: inv_trx_util_pub.TRACE(' Truncated the table MTL_TRANSACTION_ACCOUNTS');
913: END IF;
914:
915: -- Insert required rows back to original table
916: s_sql_stmt := 'INSERT INTO MTL_TRANSACTION_ACCOUNTS SELECT * FROM mtl_transaction_accounts_bu';

Line 916: s_sql_stmt := 'INSERT INTO MTL_TRANSACTION_ACCOUNTS SELECT * FROM mtl_transaction_accounts_bu';

912: inv_trx_util_pub.TRACE(' Truncated the table MTL_TRANSACTION_ACCOUNTS');
913: END IF;
914:
915: -- Insert required rows back to original table
916: s_sql_stmt := 'INSERT INTO MTL_TRANSACTION_ACCOUNTS SELECT * FROM mtl_transaction_accounts_bu';
917: cursor_name := dbms_sql.open_cursor;
918: DBMS_SQL.PARSE(cursor_name, s_sql_stmt, dbms_sql.native);
919: rows_processed := dbms_sql.execute(cursor_name);
920: DBMS_SQL.close_cursor(cursor_name);

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

919: rows_processed := dbms_sql.execute(cursor_name);
920: DBMS_SQL.close_cursor(cursor_name);
921:
922: IF (l_debug = 1) THEN
923: inv_trx_util_pub.TRACE(' Inserted ' || rows_processed || ' row(s) into the table MTL_TRANSACTION_ACCOUNTS');
924: END IF;
925:
926: --Commit the transaction
927: COMMIT;

Line 933: s_sql_stmt := 'DROP TABLE mtl_transaction_accounts_bu';

929: inv_trx_util_pub.TRACE(' Commited the transactions ');
930: END IF;
931:
932: --Drop the temporary table
933: s_sql_stmt := 'DROP TABLE mtl_transaction_accounts_bu';
934: cursor_name := dbms_sql.open_cursor;
935: DBMS_SQL.PARSE(cursor_name, s_sql_stmt, dbms_sql.native);
936: rows_processed := dbms_sql.execute(cursor_name);
937: DBMS_SQL.close_cursor(cursor_name);

Line 940: inv_trx_util_pub.TRACE(' Dropped the temporary table mtl_transaction_accounts_bu');

936: rows_processed := dbms_sql.execute(cursor_name);
937: DBMS_SQL.close_cursor(cursor_name);
938:
939: IF (l_debug = 1) THEN
940: inv_trx_util_pub.TRACE(' Dropped the temporary table mtl_transaction_accounts_bu');
941: END IF;
942:
943: END IF;
944: