DBA Data[Home] [Help]

APPS.INV_HV_TXN_PURGE dependencies on MTL_TRANSACTION_LOT_NUMBERS

Line 104: FROM MTL_TRANSACTION_LOT_NUMBERS

100:
101:
102: CURSOR c_mtlt IS
103: SELECT ROWID
104: FROM MTL_TRANSACTION_LOT_NUMBERS
105: WHERE transaction_date < l_cut_off_date
106: AND (p_organization_id IS NULL OR organization_id = p_organization_id);
107:
108:

Line 501: --Purging MTL_TRANSACTION_LOT_NUMBERS

497: END;
498:
499:
500:
501: --Purging MTL_TRANSACTION_LOT_NUMBERS
502: BEGIN
503:
504: IF (l_debug = 1) THEN
505: inv_trx_util_pub.TRACE(' Purging MTL_TRANSACTION_LOT_NUMBERS ... ' );

Line 505: inv_trx_util_pub.TRACE(' Purging MTL_TRANSACTION_LOT_NUMBERS ... ' );

501: --Purging MTL_TRANSACTION_LOT_NUMBERS
502: BEGIN
503:
504: IF (l_debug = 1) THEN
505: inv_trx_util_pub.TRACE(' Purging MTL_TRANSACTION_LOT_NUMBERS ... ' );
506: END IF;
507:
508: -- This will get the count of rows to be deleted
509: BEGIN

Line 512: FROM mtl_transaction_lot_numbers

508: -- This will get the count of rows to be deleted
509: BEGIN
510: SELECT count(transaction_id)
511: INTO rows_to_del
512: FROM mtl_transaction_lot_numbers
513: WHERE transaction_date < l_cut_off_date
514: AND (p_organization_id IS NULL OR organization_id = p_organization_id);
515:
516: EXCEPTION

Line 537: inv_trx_util_pub.TRACE(' Deleting from MTL_TRANSACTION_LOT_NUMBERS -- Direct deletion approach' );

533: IF rows_to_del < max_rows_to_del THEN
534: --Rows to be deleted are less hence delete them directly
535:
536: IF (l_debug = 1) THEN
537: inv_trx_util_pub.TRACE(' Deleting from MTL_TRANSACTION_LOT_NUMBERS -- Direct deletion approach' );
538: END IF;
539:
540: OPEN c_mtlt;
541: LOOP

Line 550: DELETE FROM mtl_transaction_lot_numbers

546: EXIT;
547: END IF;
548:
549: FORALL i IN rowid_list.first .. rowid_list.last
550: DELETE FROM mtl_transaction_lot_numbers
551: WHERE ROWID = rowid_list(i);
552: COMMIT;
553: EXIT WHEN c_mtlt%notfound;
554: END LOOP;

Line 557: inv_trx_util_pub.TRACE(' Deleted ' || rows_to_del || ' row(s) from MTL_TRANSACTION_LOT_NUMBERS ' );

553: EXIT WHEN c_mtlt%notfound;
554: END LOOP;
555:
556: IF (l_debug = 1) THEN
557: inv_trx_util_pub.TRACE(' Deleted ' || rows_to_del || ' row(s) from MTL_TRANSACTION_LOT_NUMBERS ' );
558: END IF;
559:
560: CLOSE c_mtlt;
561:

Line 563: inv_trx_util_pub.TRACE(' Purged MTL_TRANSACTION_LOT_NUMBERS sucessfully ' );

559:
560: CLOSE c_mtlt;
561:
562: IF (l_debug = 1) THEN
563: inv_trx_util_pub.TRACE(' Purged MTL_TRANSACTION_LOT_NUMBERS sucessfully ' );
564: END IF;
565:
566: ELSE
567:

Line 569: s_sql_stmt := ' CREATE TABLE mtl_transaction_lot_numbers_bu '

565:
566: ELSE
567:
568: -- Rows to be delted are more hence follow Temp table creation method
569: s_sql_stmt := ' CREATE TABLE mtl_transaction_lot_numbers_bu '
570: || ' STORAGE (initial 1 M next 1 M minextents 1 maxextents unlimited) '
571: || ' NOLOGGING AS '
572: || ' SELECT * FROM MTL_TRANSACTION_LOT_NUMBERS '
573: || ' WHERE 1 = 1 ' ;

Line 572: || ' SELECT * FROM MTL_TRANSACTION_LOT_NUMBERS '

568: -- Rows to be delted are more hence follow Temp table creation method
569: s_sql_stmt := ' CREATE TABLE mtl_transaction_lot_numbers_bu '
570: || ' STORAGE (initial 1 M next 1 M minextents 1 maxextents unlimited) '
571: || ' NOLOGGING AS '
572: || ' SELECT * FROM MTL_TRANSACTION_LOT_NUMBERS '
573: || ' WHERE 1 = 1 ' ;
574:
575: IF p_organization_id IS NOT NULL THEN
576: s_sql_stmt := s_sql_stmt || ' and organization_id <> ' || p_organization_id;

Line 589: inv_trx_util_pub.TRACE(' Temp Table mtl_transaction_lot_numbers_bu created.' );

585: rows_processed := dbms_sql.execute(cursor_name);
586: DBMS_SQL.close_cursor(cursor_name);
587:
588: IF (l_debug = 1) THEN
589: inv_trx_util_pub.TRACE(' Temp Table mtl_transaction_lot_numbers_bu created.' );
590: END IF;
591:
592: --Truncate the original table
593: s_sql_stmt := 'TRUNCATE TABLE '|| inv_user_name || '.MTL_TRANSACTION_LOT_NUMBERS';

Line 593: s_sql_stmt := 'TRUNCATE TABLE '|| inv_user_name || '.MTL_TRANSACTION_LOT_NUMBERS';

589: inv_trx_util_pub.TRACE(' Temp Table mtl_transaction_lot_numbers_bu created.' );
590: END IF;
591:
592: --Truncate the original table
593: s_sql_stmt := 'TRUNCATE TABLE '|| inv_user_name || '.MTL_TRANSACTION_LOT_NUMBERS';
594: cursor_name := dbms_sql.open_cursor;
595: DBMS_SQL.PARSE(cursor_name, s_sql_stmt, dbms_sql.native);
596: rows_processed := dbms_sql.execute(cursor_name);
597: DBMS_SQL.close_cursor(cursor_name);

Line 600: inv_trx_util_pub.TRACE(' Truncated the table MTL_TRANSACTION_LOT_NUMBERS');

596: rows_processed := dbms_sql.execute(cursor_name);
597: DBMS_SQL.close_cursor(cursor_name);
598:
599: IF (l_debug = 1) THEN
600: inv_trx_util_pub.TRACE(' Truncated the table MTL_TRANSACTION_LOT_NUMBERS');
601: END IF;
602:
603: -- Insert required rows back to original table
604: s_sql_stmt := 'INSERT INTO MTL_TRANSACTION_LOT_NUMBERS SELECT * FROM mtl_transaction_lot_numbers_bu';

Line 604: s_sql_stmt := 'INSERT INTO MTL_TRANSACTION_LOT_NUMBERS SELECT * FROM mtl_transaction_lot_numbers_bu';

600: inv_trx_util_pub.TRACE(' Truncated the table MTL_TRANSACTION_LOT_NUMBERS');
601: END IF;
602:
603: -- Insert required rows back to original table
604: s_sql_stmt := 'INSERT INTO MTL_TRANSACTION_LOT_NUMBERS SELECT * FROM mtl_transaction_lot_numbers_bu';
605: cursor_name := dbms_sql.open_cursor;
606: DBMS_SQL.PARSE(cursor_name, s_sql_stmt, dbms_sql.native);
607: rows_processed := dbms_sql.execute(cursor_name);
608: DBMS_SQL.close_cursor(cursor_name);

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

607: rows_processed := dbms_sql.execute(cursor_name);
608: DBMS_SQL.close_cursor(cursor_name);
609:
610: IF (l_debug = 1) THEN
611: inv_trx_util_pub.TRACE(' Inserted ' || rows_processed || ' row(s) into the table MTL_TRANSACTION_LOT_NUMBERS');
612: END IF;
613:
614: --Commit the transaction
615: COMMIT;

Line 621: s_sql_stmt := 'DROP TABLE mtl_transaction_lot_numbers_bu';

617: inv_trx_util_pub.TRACE(' Commited the transactions ');
618: END IF;
619:
620: --Drop the temporary table
621: s_sql_stmt := 'DROP TABLE mtl_transaction_lot_numbers_bu';
622: cursor_name := dbms_sql.open_cursor;
623: DBMS_SQL.PARSE(cursor_name, s_sql_stmt, dbms_sql.native);
624: rows_processed := dbms_sql.execute(cursor_name);
625: DBMS_SQL.close_cursor(cursor_name);

Line 628: inv_trx_util_pub.TRACE(' Dropped the temporary table mtl_transaction_lot_numbers_bu');

624: rows_processed := dbms_sql.execute(cursor_name);
625: DBMS_SQL.close_cursor(cursor_name);
626:
627: IF (l_debug = 1) THEN
628: inv_trx_util_pub.TRACE(' Dropped the temporary table mtl_transaction_lot_numbers_bu');
629: END IF;
630:
631: END IF;
632: