DBA Data[Home] [Help]

APPS.INV_HV_TXN_PURGE dependencies on INV_TRX_UTIL_PUB

Line 125: inv_trx_util_pub.TRACE('Debug Level = '|| l_debug);

121:
122:
123: BEGIN
124:
125: inv_trx_util_pub.TRACE('Debug Level = '|| l_debug);
126: inv_trx_util_pub.TRACE('Organization Id = '|| p_organization_id);
127: inv_trx_util_pub.TRACE('Cut off date = '|| p_cut_off_date);
128:
129: --l_cut_off_date := To_Date( To_Char(fnd_date.canonical_to_date(p_cut_off_date),'MM-DD-RRRR'), 'MM-DD-RRRR');

Line 126: inv_trx_util_pub.TRACE('Organization Id = '|| p_organization_id);

122:
123: BEGIN
124:
125: inv_trx_util_pub.TRACE('Debug Level = '|| l_debug);
126: inv_trx_util_pub.TRACE('Organization Id = '|| p_organization_id);
127: inv_trx_util_pub.TRACE('Cut off date = '|| p_cut_off_date);
128:
129: --l_cut_off_date := To_Date( To_Char(fnd_date.canonical_to_date(p_cut_off_date),'MM-DD-RRRR'), 'MM-DD-RRRR');
130: s_cut_off_date := To_Char(fnd_date.canonical_to_date(p_cut_off_date),'MM-DD-RRRR');

Line 127: inv_trx_util_pub.TRACE('Cut off date = '|| p_cut_off_date);

123: BEGIN
124:
125: inv_trx_util_pub.TRACE('Debug Level = '|| l_debug);
126: inv_trx_util_pub.TRACE('Organization Id = '|| p_organization_id);
127: inv_trx_util_pub.TRACE('Cut off date = '|| p_cut_off_date);
128:
129: --l_cut_off_date := To_Date( To_Char(fnd_date.canonical_to_date(p_cut_off_date),'MM-DD-RRRR'), 'MM-DD-RRRR');
130: s_cut_off_date := To_Char(fnd_date.canonical_to_date(p_cut_off_date),'MM-DD-RRRR');
131: inv_trx_util_pub.TRACE('Cut off date (' || l_cut_off_date || ') in MM-DD-RRRR format = '|| s_cut_off_date);

Line 131: inv_trx_util_pub.TRACE('Cut off date (' || l_cut_off_date || ') in MM-DD-RRRR format = '|| s_cut_off_date);

127: inv_trx_util_pub.TRACE('Cut off date = '|| p_cut_off_date);
128:
129: --l_cut_off_date := To_Date( To_Char(fnd_date.canonical_to_date(p_cut_off_date),'MM-DD-RRRR'), 'MM-DD-RRRR');
130: s_cut_off_date := To_Char(fnd_date.canonical_to_date(p_cut_off_date),'MM-DD-RRRR');
131: inv_trx_util_pub.TRACE('Cut off date (' || l_cut_off_date || ') in MM-DD-RRRR format = '|| s_cut_off_date);
132:
133: inv_user_name := upper('INV');
134: inv_trx_util_pub.TRACE('Inventory User Name = '|| inv_user_name);
135:

Line 134: inv_trx_util_pub.TRACE('Inventory User Name = '|| inv_user_name);

130: s_cut_off_date := To_Char(fnd_date.canonical_to_date(p_cut_off_date),'MM-DD-RRRR');
131: inv_trx_util_pub.TRACE('Cut off date (' || l_cut_off_date || ') in MM-DD-RRRR format = '|| s_cut_off_date);
132:
133: inv_user_name := upper('INV');
134: inv_trx_util_pub.TRACE('Inventory User Name = '|| inv_user_name);
135:
136: /*
137: Validate to see if the accounting period is open.
138: If period is open then raise bad_input_period exception, else we do nothing.

Line 145: inv_trx_util_pub.TRACE(' Accounting period check' );

141: */
142: BEGIN
143:
144: IF (l_debug = 1) THEN
145: inv_trx_util_pub.TRACE(' Accounting period check' );
146: END IF;
147:
148: --Organization entered, so check the period of that org only
149: IF p_organization_id is not null THEN

Line 156: inv_trx_util_pub.TRACE(' Organization_Id = ' || p_organization_id || ' Status = ' || x_validation );

152: FETCH get_open_period INTO x_validation;
153: CLOSE get_open_period;
154:
155: IF (l_debug = 1) THEN
156: inv_trx_util_pub.TRACE(' Organization_Id = ' || p_organization_id || ' Status = ' || x_validation );
157: END IF;
158:
159: --Organization not provided, so Loop throught all organizations
160: ELSE

Line 171: inv_trx_util_pub.TRACE('Accounting period is open for Organization_Id = ' || i.organization_id || ' Status = ' || x_validation );

167: CLOSE get_open_period;
168:
169: IF x_validation = 'OPEN' THEN
170: IF (l_debug = 1) THEN
171: inv_trx_util_pub.TRACE('Accounting period is open for Organization_Id = ' || i.organization_id || ' Status = ' || x_validation );
172: END IF;
173: -- Period is open so exit out of the organization loop
174: EXIT;
175: END IF;

Line 187: inv_trx_util_pub.TRACE(' Open period check completed sucessfully ' );

183: RAISE bad_input_period;
184: END IF;
185:
186: IF (l_debug = 1) THEN
187: inv_trx_util_pub.TRACE(' Open period check completed sucessfully ' );
188: END IF;
189:
190: EXCEPTION
191: WHEN bad_input_period THEN

Line 193: inv_trx_util_pub.TRACE(' Accounting Period is open. Please check the cut-off date ' || l_cut_off_date);

189:
190: EXCEPTION
191: WHEN bad_input_period THEN
192: IF (l_debug = 1) THEN
193: inv_trx_util_pub.TRACE(' Accounting Period is open. Please check the cut-off date ' || l_cut_off_date);
194: END IF;
195: RAISE fnd_api.g_exc_error;
196:
197: WHEN OTHERS THEN

Line 199: inv_trx_util_pub.TRACE(' Exception in open period check: ' || SQLERRM);

195: RAISE fnd_api.g_exc_error;
196:
197: WHEN OTHERS THEN
198: IF (l_debug = 1) THEN
199: inv_trx_util_pub.TRACE(' Exception in open period check: ' || SQLERRM);
200: END IF;
201: RAISE fnd_api.g_exc_unexpected_error;
202: END;
203:

Line 210: inv_trx_util_pub.TRACE(' Purging MTL_MATERIAL_TXN_ALLOCATIONS ... ' );

206: --Purging MTL_MATERIAL_TXN_ALLOCATIONS
207: BEGIN
208:
209: IF (l_debug = 1) THEN
210: inv_trx_util_pub.TRACE(' Purging MTL_MATERIAL_TXN_ALLOCATIONS ... ' );
211: END IF;
212:
213: -- This will get the count of rows to be deleted
214: BEGIN

Line 225: inv_trx_util_pub.TRACE(' Exception: ' || SQLERRM );

221: EXCEPTION
222: -- Some exception has occured
223: WHEN no_data_found THEN
224: IF (l_debug = 1) THEN
225: inv_trx_util_pub.TRACE(' Exception: ' || SQLERRM );
226: END IF;
227: rows_to_del := 0;
228:
229:

Line 232: inv_trx_util_pub.TRACE(' Exception: ' || SQLERRM );

228:
229:
230: WHEN OTHERS THEN
231: IF (l_debug = 1) THEN
232: inv_trx_util_pub.TRACE(' Exception: ' || SQLERRM );
233: END IF;
234: rows_to_del := max_rows_to_del + 1;
235: END;
236:

Line 242: inv_trx_util_pub.TRACE(' Deleting from MTL_MATERIAL_TXN_ALLOCATIONS -- Direct deletion approach' );

238: IF rows_to_del < max_rows_to_del THEN
239: --Rows to be deleted are less hence delete them directly
240:
241: IF (l_debug = 1) THEN
242: inv_trx_util_pub.TRACE(' Deleting from MTL_MATERIAL_TXN_ALLOCATIONS -- Direct deletion approach' );
243: END IF;
244:
245: OPEN c_mmta;
246: LOOP

Line 251: inv_trx_util_pub.TRACE(' exiting out of the loop since there are no more records to delete ' );

247:
248: FETCH c_mmta bulk collect INTO rowid_list limit l_bulk_limit;
249:
250: IF rowid_list.first IS NULL THEN
251: inv_trx_util_pub.TRACE(' exiting out of the loop since there are no more records to delete ' );
252: EXIT;
253: END IF;
254:
255: FORALL i IN rowid_list.first .. rowid_list.last

Line 264: inv_trx_util_pub.TRACE(' Deleted ' || rows_to_del || ' row(s) from MTL_MATERIAL_TXN_ALLOCATIONS ' );

260: EXIT WHEN c_mmta%notfound;
261: END LOOP;
262:
263: IF (l_debug = 1) THEN
264: inv_trx_util_pub.TRACE(' Deleted ' || rows_to_del || ' row(s) from MTL_MATERIAL_TXN_ALLOCATIONS ' );
265: END IF;
266:
267: CLOSE c_mmta;
268:

Line 270: inv_trx_util_pub.TRACE(' Purged MTL_MATERIAL_TXN_ALLOCATIONS sucessfully ' );

266:
267: CLOSE c_mmta;
268:
269: IF (l_debug = 1) THEN
270: inv_trx_util_pub.TRACE(' Purged MTL_MATERIAL_TXN_ALLOCATIONS sucessfully ' );
271: END IF;
272:
273: ELSE
274: -- Rows to be delted are more hence follow Temp table creation method

Line 295: inv_trx_util_pub.TRACE(' Temp Table mtl_material_txn_alloc_bu created.' );

291: rows_processed := dbms_sql.execute(cursor_name);
292: DBMS_SQL.close_cursor(cursor_name);
293:
294: IF (l_debug = 1) THEN
295: inv_trx_util_pub.TRACE(' Temp Table mtl_material_txn_alloc_bu created.' );
296: END IF;
297:
298: --Truncate the original table
299: s_sql_stmt := 'TRUNCATE TABLE '|| inv_user_name || '.MTL_MATERIAL_TXN_ALLOCATIONS';

Line 306: inv_trx_util_pub.TRACE(' Truncated the table MTL_MATERIAL_TXN_ALLOCATIONS');

302: rows_processed := dbms_sql.execute(cursor_name);
303: DBMS_SQL.close_cursor(cursor_name);
304:
305: IF (l_debug = 1) THEN
306: inv_trx_util_pub.TRACE(' Truncated the table MTL_MATERIAL_TXN_ALLOCATIONS');
307: END IF;
308:
309: -- Insert required rows back to original table
310: s_sql_stmt := 'INSERT INTO MTL_MATERIAL_TXN_ALLOCATIONS SELECT * FROM mtl_material_txn_alloc_bu';

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

313: rows_processed := dbms_sql.execute(cursor_name);
314: DBMS_SQL.close_cursor(cursor_name);
315:
316: IF (l_debug = 1) THEN
317: inv_trx_util_pub.TRACE(' Inserted ' || rows_processed || ' row(s) into the table MTL_MATERIAL_TXN_ALLOCATIONS');
318: END IF;
319:
320: --Commit the transaction
321: COMMIT;

Line 323: inv_trx_util_pub.TRACE(' Commited the transactions ');

319:
320: --Commit the transaction
321: COMMIT;
322: IF (l_debug = 1) THEN
323: inv_trx_util_pub.TRACE(' Commited the transactions ');
324: END IF;
325:
326: --Drop the temporary table
327: s_sql_stmt := 'DROP TABLE mtl_material_txn_alloc_bu';

Line 334: inv_trx_util_pub.TRACE(' Dropped the temporary table mtl_material_txn_alloc_bu');

330: rows_processed := dbms_sql.execute(cursor_name);
331: DBMS_SQL.close_cursor(cursor_name);
332:
333: IF (l_debug = 1) THEN
334: inv_trx_util_pub.TRACE(' Dropped the temporary table mtl_material_txn_alloc_bu');
335: END IF;
336:
337: END IF;
338:

Line 342: inv_trx_util_pub.TRACE(' Exception: ' || SQLERRM );

338:
339: EXCEPTION
340: WHEN OTHERS THEN
341: IF (l_debug = 1) THEN
342: inv_trx_util_pub.TRACE(' Exception: ' || SQLERRM );
343: END IF;
344:
345: IF DBMS_SQL.IS_OPEN(cursor_name) THEN
346: DBMS_SQL.CLOSE_CURSOR(cursor_name);

Line 358: inv_trx_util_pub.TRACE(' Purging MTL_MATERIAL_TRANSACTIONS ... ' );

354: --Purging MTL_MATERIAL_TRANSACTIONS
355: BEGIN
356:
357: IF (l_debug = 1) THEN
358: inv_trx_util_pub.TRACE(' Purging MTL_MATERIAL_TRANSACTIONS ... ' );
359: END IF;
360:
361: -- This will get the count of rows to be deleted
362: BEGIN

Line 373: inv_trx_util_pub.TRACE(' Exception: ' || SQLERRM );

369: EXCEPTION
370: -- Some exception has occured
371: WHEN no_data_found THEN
372: IF (l_debug = 1) THEN
373: inv_trx_util_pub.TRACE(' Exception: ' || SQLERRM );
374: END IF;
375: rows_to_del := 0;
376:
377:

Line 380: inv_trx_util_pub.TRACE(' Exception: ' || SQLERRM );

376:
377:
378: WHEN OTHERS THEN
379: IF (l_debug = 1) THEN
380: inv_trx_util_pub.TRACE(' Exception: ' || SQLERRM );
381: END IF;
382: rows_to_del := max_rows_to_del + 1;
383: END;
384:

Line 390: inv_trx_util_pub.TRACE(' Deleting from MTL_MATERIAL_TRANSACTIONS -- Direct deletion approach' );

386: IF rows_to_del < max_rows_to_del THEN
387: --Rows to be deleted are less hence delete them directly
388:
389: IF (l_debug = 1) THEN
390: inv_trx_util_pub.TRACE(' Deleting from MTL_MATERIAL_TRANSACTIONS -- Direct deletion approach' );
391: END IF;
392:
393: OPEN c_mmt;
394: LOOP

Line 398: inv_trx_util_pub.TRACE(' exiting out of the loop since there are no more records to delete ' );

394: LOOP
395: FETCH c_mmt bulk collect INTO rowid_list limit l_bulk_limit;
396:
397: IF rowid_list.first IS NULL THEN
398: inv_trx_util_pub.TRACE(' exiting out of the loop since there are no more records to delete ' );
399: EXIT;
400: END IF;
401:
402: FORALL i IN rowid_list.first .. rowid_list.last

Line 410: inv_trx_util_pub.TRACE(' Deleted ' || rows_to_del || ' row(s) from MTL_MATERIAL_TRANSACTIONS ' );

406: EXIT WHEN c_mmt%notfound;
407: END LOOP;
408:
409: IF (l_debug = 1) THEN
410: inv_trx_util_pub.TRACE(' Deleted ' || rows_to_del || ' row(s) from MTL_MATERIAL_TRANSACTIONS ' );
411: END IF;
412:
413: CLOSE c_mmt;
414:

Line 416: inv_trx_util_pub.TRACE(' Purged MTL_MATERIAL_TRANSACTIONS sucessfully ' );

412:
413: CLOSE c_mmt;
414:
415: IF (l_debug = 1) THEN
416: inv_trx_util_pub.TRACE(' Purged MTL_MATERIAL_TRANSACTIONS sucessfully ' );
417: END IF;
418:
419: ELSE
420:

Line 442: inv_trx_util_pub.TRACE(' Temp Table mtl_material_transactions_bu created.' );

438: rows_processed := dbms_sql.execute(cursor_name);
439: DBMS_SQL.close_cursor(cursor_name);
440:
441: IF (l_debug = 1) THEN
442: inv_trx_util_pub.TRACE(' Temp Table mtl_material_transactions_bu created.' );
443: END IF;
444:
445: --Truncate the original table
446: s_sql_stmt := 'TRUNCATE TABLE '|| inv_user_name || '.MTL_MATERIAL_TRANSACTIONS';

Line 453: inv_trx_util_pub.TRACE(' Truncated the table MTL_MATERIAL_TRANSACTIONS');

449: rows_processed := dbms_sql.execute(cursor_name);
450: DBMS_SQL.close_cursor(cursor_name);
451:
452: IF (l_debug = 1) THEN
453: inv_trx_util_pub.TRACE(' Truncated the table MTL_MATERIAL_TRANSACTIONS');
454: END IF;
455:
456: -- Insert required rows back to original table
457: s_sql_stmt := 'INSERT INTO MTL_MATERIAL_TRANSACTIONS SELECT * FROM mtl_material_transactions_bu';

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

460: rows_processed := dbms_sql.execute(cursor_name);
461: DBMS_SQL.close_cursor(cursor_name);
462:
463: IF (l_debug = 1) THEN
464: inv_trx_util_pub.TRACE(' Inserted ' || rows_processed || ' row(s) into the table MTL_MATERIAL_TRANSACTIONS');
465: END IF;
466:
467: --Commit the transaction
468: COMMIT;

Line 470: inv_trx_util_pub.TRACE(' Commited the transactions ');

466:
467: --Commit the transaction
468: COMMIT;
469: IF (l_debug = 1) THEN
470: inv_trx_util_pub.TRACE(' Commited the transactions ');
471: END IF;
472:
473: --Drop the temporary table
474: s_sql_stmt := 'DROP TABLE mtl_material_transactions_bu';

Line 481: inv_trx_util_pub.TRACE(' Dropped the temporary table mtl_material_transactions_bu');

477: rows_processed := dbms_sql.execute(cursor_name);
478: DBMS_SQL.close_cursor(cursor_name);
479:
480: IF (l_debug = 1) THEN
481: inv_trx_util_pub.TRACE(' Dropped the temporary table mtl_material_transactions_bu');
482: END IF;
483:
484: END IF;
485:

Line 489: inv_trx_util_pub.TRACE(' Exception: ' || SQLERRM );

485:
486: EXCEPTION
487: WHEN OTHERS THEN
488: IF (l_debug = 1) THEN
489: inv_trx_util_pub.TRACE(' Exception: ' || SQLERRM );
490: END IF;
491:
492: IF DBMS_SQL.IS_OPEN(cursor_name) THEN
493: DBMS_SQL.CLOSE_CURSOR(cursor_name);

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 520: inv_trx_util_pub.TRACE(' Exception: ' || SQLERRM );

516: EXCEPTION
517: -- Some exception has occured
518: WHEN no_data_found THEN
519: IF (l_debug = 1) THEN
520: inv_trx_util_pub.TRACE(' Exception: ' || SQLERRM );
521: END IF;
522: rows_to_del := 0;
523:
524:

Line 527: inv_trx_util_pub.TRACE(' Exception: ' || SQLERRM );

523:
524:
525: WHEN OTHERS THEN
526: IF (l_debug = 1) THEN
527: inv_trx_util_pub.TRACE(' Exception: ' || SQLERRM );
528: END IF;
529: rows_to_del := max_rows_to_del + 1;
530: END;
531:

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 545: inv_trx_util_pub.TRACE(' exiting out of the loop since there are no more records to delete ' );

541: LOOP
542: FETCH c_mtlt bulk collect INTO rowid_list limit l_bulk_limit;
543:
544: IF rowid_list.first IS NULL THEN
545: inv_trx_util_pub.TRACE(' exiting out of the loop since there are no more records to delete ' );
546: EXIT;
547: END IF;
548:
549: FORALL i IN rowid_list.first .. rowid_list.last

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 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 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 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 617: inv_trx_util_pub.TRACE(' Commited the transactions ');

613:
614: --Commit the transaction
615: COMMIT;
616: IF (l_debug = 1) THEN
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';

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:

Line 636: inv_trx_util_pub.TRACE(' Exception: ' || SQLERRM );

632:
633: EXCEPTION
634: WHEN OTHERS THEN
635: IF (l_debug = 1) THEN
636: inv_trx_util_pub.TRACE(' Exception: ' || SQLERRM );
637: END IF;
638:
639: IF DBMS_SQL.IS_OPEN(cursor_name) THEN
640: DBMS_SQL.CLOSE_CURSOR(cursor_name);

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 667: inv_trx_util_pub.TRACE(' Exception: ' || SQLERRM );

663: EXCEPTION
664: -- Some exception has occured
665: WHEN no_data_found THEN
666: IF (l_debug = 1) THEN
667: inv_trx_util_pub.TRACE(' Exception: ' || SQLERRM );
668: END IF;
669: rows_to_del := 0;
670:
671:

Line 674: inv_trx_util_pub.TRACE(' Exception: ' || SQLERRM );

670:
671:
672: WHEN OTHERS THEN
673: IF (l_debug = 1) THEN
674: inv_trx_util_pub.TRACE(' Exception: ' || SQLERRM );
675: END IF;
676: rows_to_del := max_rows_to_del + 1;
677: END;
678:

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 692: inv_trx_util_pub.TRACE(' exiting out of the loop since there are no more records to delete ' );

688: LOOP
689: FETCH c_mut bulk collect INTO rowid_list limit l_bulk_limit;
690:
691: IF rowid_list.first IS NULL THEN
692: inv_trx_util_pub.TRACE(' exiting out of the loop since there are no more records to delete ' );
693: EXIT;
694: END IF;
695:
696: FORALL i IN rowid_list.first .. rowid_list.last

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 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 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 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 764: inv_trx_util_pub.TRACE(' Commited the transactions ');

760:
761: --Commit the transaction
762: COMMIT;
763: IF (l_debug = 1) THEN
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';

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:

Line 783: inv_trx_util_pub.TRACE(' Exception: ' || SQLERRM );

779:
780: EXCEPTION
781: WHEN OTHERS THEN
782: IF (l_debug = 1) THEN
783: inv_trx_util_pub.TRACE(' Exception: ' || SQLERRM );
784: END IF;
785:
786: IF DBMS_SQL.IS_OPEN(cursor_name) THEN
787: DBMS_SQL.CLOSE_CURSOR(cursor_name);

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 832: inv_trx_util_pub.TRACE(' Exception: ' || SQLERRM );

828: EXCEPTION
829: -- Some exception has occured
830: WHEN no_data_found THEN
831: IF (l_debug = 1) THEN
832: inv_trx_util_pub.TRACE(' Exception: ' || SQLERRM );
833: END IF;
834: rows_to_del := 0;
835:
836:

Line 839: inv_trx_util_pub.TRACE(' Exception: ' || SQLERRM );

835:
836:
837: WHEN OTHERS THEN
838: IF (l_debug = 1) THEN
839: inv_trx_util_pub.TRACE(' Exception: ' || SQLERRM );
840: END IF;
841: rows_to_del := max_rows_to_del + 1;
842: END;
843:

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 857: inv_trx_util_pub.TRACE(' exiting out of the loop since there are no more records to delete ' );

853: LOOP
854: FETCH c_mta bulk collect INTO rowid_list limit l_bulk_limit;
855:
856: IF rowid_list.first IS NULL THEN
857: inv_trx_util_pub.TRACE(' exiting out of the loop since there are no more records to delete ' );
858: EXIT;
859: END IF;
860:
861: FORALL i IN rowid_list.first .. rowid_list.last

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 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 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 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 929: inv_trx_util_pub.TRACE(' Commited the transactions ');

925:
926: --Commit the transaction
927: COMMIT;
928: IF (l_debug = 1) THEN
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';

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:

Line 948: inv_trx_util_pub.TRACE(' Exception: ' || SQLERRM );

944:
945: EXCEPTION
946: WHEN OTHERS THEN
947: IF (l_debug = 1) THEN
948: inv_trx_util_pub.TRACE(' Exception: ' || SQLERRM );
949: END IF;
950:
951: IF DBMS_SQL.IS_OPEN(cursor_name) THEN
952: DBMS_SQL.CLOSE_CURSOR(cursor_name);

Line 963: inv_trx_util_pub.TRACE('High Volume Transactions Purge completed sucessfully');

959: l_ret_msg := fnd_concurrent.set_completion_status('NORMAL', 'NORMAL');
960: x_retcode := retcode_success;
961: x_errbuf := NULL;
962:
963: inv_trx_util_pub.TRACE('High Volume Transactions Purge completed sucessfully');
964:
965: EXCEPTION
966:
967: WHEN fnd_api.g_exc_error THEN

Line 970: inv_trx_util_pub.TRACE('The error is '|| error, 'INVHVPG', 9);

966:
967: WHEN fnd_api.g_exc_error THEN
968: error := SQLERRM;
969: IF (l_debug = 1) THEN
970: inv_trx_util_pub.TRACE('The error is '|| error, 'INVHVPG', 9);
971: END IF;
972:
973: IF c_mmta%ISOPEN THEN
974: CLOSE c_mmta;

Line 1000: inv_trx_util_pub.TRACE('The error is '|| error, 'INVHVPG', 9);

996:
997: WHEN fnd_api.g_exc_unexpected_error THEN
998: error := SQLERRM;
999: IF (l_debug = 1) THEN
1000: inv_trx_util_pub.TRACE('The error is '|| error, 'INVHVPG', 9);
1001: END IF;
1002:
1003: IF c_mmta%ISOPEN THEN
1004: CLOSE c_mmta;

Line 1030: inv_trx_util_pub.TRACE('The error is '|| error, 'INVHVPG', 9);

1026:
1027: WHEN OTHERS THEN
1028: error := SQLERRM;
1029: IF (l_debug = 1) THEN
1030: inv_trx_util_pub.TRACE('The error is '|| error, 'INVHVPG', 9);
1031: END IF;
1032:
1033: IF c_mmta%ISOPEN THEN
1034: CLOSE c_mmta;