[Home] [Help]
1: PACKAGE BODY gme_debug AS
2: /* $Header: GMEUDBGB.pls 120.5 2011/09/14 13:48:58 adeshmuk ship $ */
3: g_debug VARCHAR2 (5)
4: := NVL (fnd_profile.VALUE ('AFLOG_LEVEL')
5: ,-1);
2: /* $Header: GMEUDBGB.pls 120.5 2011/09/14 13:48:58 adeshmuk ship $ */
3: g_debug VARCHAR2 (5)
4: := NVL (fnd_profile.VALUE ('AFLOG_LEVEL')
5: ,-1);
6: g_pkg_name CONSTANT VARCHAR2 (30) := 'GME_DEBUG';
7:
8: /*
9: REM *********************************************************************
10: REM *
8: /*
9: REM *********************************************************************
10: REM *
11: REM * FILE: GMEUDBGB.pls
12: REM * PURPOSE: Package Body for the GME debug utilities
13: REM * AUTHOR: Olivier DABOVAL, OPM Development
14: REM * DATE: 27th MAY 2001
15: REM *
16: REM * PROCEDURE log_initialize
106: END IF;
107: END IF;
108: EXCEPTION
109: WHEN OTHERS THEN
110: fnd_msg_pub.add_exc_msg ('GME_DEBUG', 'LOG_INITIALIZE');
111:
112: IF g_debug IS NOT NULL THEN
113: gme_debug.put_line ('Error in ' || SQLERRM);
114: END IF;
109: WHEN OTHERS THEN
110: fnd_msg_pub.add_exc_msg ('GME_DEBUG', 'LOG_INITIALIZE');
111:
112: IF g_debug IS NOT NULL THEN
113: gme_debug.put_line ('Error in ' || SQLERRM);
114: END IF;
115: END log_initialize;
116:
117: --========================================================================
184: fnd_msg_pub.get (p_msg_index => i
185: ,p_data => MESSAGE
186: ,p_encoded => 'F'
187: ,p_msg_index_out => dummy);
188: gme_debug.put_line ('Message ' || TO_CHAR (i) || ' ' || MESSAGE);
189: END LOOP;
190: --Bug2804440
191: EXCEPTION
192: WHEN OTHERS THEN
222: AND (line_id = v_line_id OR v_line_id IS NULL)
223: AND delete_mark = v_delete_mark
224: ORDER BY doc_id, line_id, resources, poc_trans_id;
225: BEGIN
226: gme_debug.put_line ('Resource transactions temp table');
227: gme_debug.put_line
228: ('organization_id/line_id/trans_id/trans_date/resources/resource_usage/trans_um/overrided_protected_ind/completed_ind/action_code/reason_id');
229:
230: IF p_batchstep_id IS NOT NULL THEN
223: AND delete_mark = v_delete_mark
224: ORDER BY doc_id, line_id, resources, poc_trans_id;
225: BEGIN
226: gme_debug.put_line ('Resource transactions temp table');
227: gme_debug.put_line
228: ('organization_id/line_id/trans_id/trans_date/resources/resource_usage/trans_um/overrided_protected_ind/completed_ind/action_code/reason_id');
229:
230: IF p_batchstep_id IS NOT NULL THEN
231: OPEN get_batchstep_resource_id (p_batchstep_id);
249: WHILE i <= l_resources LOOP
250: FOR rec IN get_temp_table (p_batch_id
251: ,l_resource_ids (i)
252: ,p_delete_mark) LOOP
253: gme_debug.put_line (rec.organization_id ||'/'
254: || rec.line_id
255: || '/'
256: || rec.poc_trans_id
257: || '/'
301: AND ( material_detail_id = v_material_detail_id
302: OR v_material_detail_id IS NULL)
303: ORDER BY batch_id, material_detail_id;
304: BEGIN
305: gme_debug.put_line ('Exceptions temp table');
306: gme_debug.put_line
307: ('batch_id/material_detail_id/Pend MO/Pend Rsv/onhand/ATT/ATR/TRANSACTED/EXCEPTION');
308:
309: FOR rec IN get_temp_table (p_organization_id
302: OR v_material_detail_id IS NULL)
303: ORDER BY batch_id, material_detail_id;
304: BEGIN
305: gme_debug.put_line ('Exceptions temp table');
306: gme_debug.put_line
307: ('batch_id/material_detail_id/Pend MO/Pend Rsv/onhand/ATT/ATR/TRANSACTED/EXCEPTION');
308:
309: FOR rec IN get_temp_table (p_organization_id
310: ,p_batch_id
308:
309: FOR rec IN get_temp_table (p_organization_id
310: ,p_batch_id
311: ,p_material_detail_id) LOOP
312: gme_debug.put_line ( rec.batch_id
313: || '/'
314: || rec.material_detail_id
315: || '/'
316: || rec.pending_move_order_ind
353: ###############################################################*/
354: PROCEDURE dump_temp_txns_exceptions IS
355: BEGIN
356: IF (g_debug IS NOT NULL) THEN
357: gme_debug.put_line('***** Txns created automatically by release/complete/IB etc. *****');
358: FOR get_rec IN (SELECT * FROM mtl_material_transactions_temp WHERE transaction_header_id = gme_common_pvt.g_transaction_header_id) LOOP
359: gme_debug.put_line('Batch_id = '||get_rec.transaction_source_id||' material_detail_id = '||get_rec.trx_source_line_id||
360: ' inventory_item_id = '||get_rec.inventory_item_id||' revision = '||get_rec.revision||
361: ' subinventory = '||get_rec.subinventory_code||' locator_id = '||get_rec.locator_id||
355: BEGIN
356: IF (g_debug IS NOT NULL) THEN
357: gme_debug.put_line('***** Txns created automatically by release/complete/IB etc. *****');
358: FOR get_rec IN (SELECT * FROM mtl_material_transactions_temp WHERE transaction_header_id = gme_common_pvt.g_transaction_header_id) LOOP
359: gme_debug.put_line('Batch_id = '||get_rec.transaction_source_id||' material_detail_id = '||get_rec.trx_source_line_id||
360: ' inventory_item_id = '||get_rec.inventory_item_id||' revision = '||get_rec.revision||
361: ' subinventory = '||get_rec.subinventory_code||' locator_id = '||get_rec.locator_id||
362: ' transaction_quantity = '||get_rec.transaction_quantity||' transaction_uom = '||get_rec.transaction_uom||
363: ' sec_transaction_qty = '||get_rec.secondary_transaction_quantity);
361: ' subinventory = '||get_rec.subinventory_code||' locator_id = '||get_rec.locator_id||
362: ' transaction_quantity = '||get_rec.transaction_quantity||' transaction_uom = '||get_rec.transaction_uom||
363: ' sec_transaction_qty = '||get_rec.secondary_transaction_quantity);
364: END LOOP;
365: gme_debug.put_line('***** End Txns created automatically by release/complete/IB etc. ***** ');
366: gme_debug.put_line('***** Exceptions created by release/complete/IB etc. *****');
367: FOR get_rec IN (SELECT * FROM gme_exceptions_gtmp) LOOP
368: gme_debug.put_line('Batch_id = '||get_rec.batch_id||' material_detail_id = '||get_rec.material_detail_id||
369: ' transacted_qty = '||get_rec.transacted_qty||' exception_qty = '||get_rec.exception_qty||
362: ' transaction_quantity = '||get_rec.transaction_quantity||' transaction_uom = '||get_rec.transaction_uom||
363: ' sec_transaction_qty = '||get_rec.secondary_transaction_quantity);
364: END LOOP;
365: gme_debug.put_line('***** End Txns created automatically by release/complete/IB etc. ***** ');
366: gme_debug.put_line('***** Exceptions created by release/complete/IB etc. *****');
367: FOR get_rec IN (SELECT * FROM gme_exceptions_gtmp) LOOP
368: gme_debug.put_line('Batch_id = '||get_rec.batch_id||' material_detail_id = '||get_rec.material_detail_id||
369: ' transacted_qty = '||get_rec.transacted_qty||' exception_qty = '||get_rec.exception_qty||
370: ' pending_move_order = '||get_rec.pending_move_order_ind||' pending_rsv_ind = '||get_rec.pending_reservations_ind);
364: END LOOP;
365: gme_debug.put_line('***** End Txns created automatically by release/complete/IB etc. ***** ');
366: gme_debug.put_line('***** Exceptions created by release/complete/IB etc. *****');
367: FOR get_rec IN (SELECT * FROM gme_exceptions_gtmp) LOOP
368: gme_debug.put_line('Batch_id = '||get_rec.batch_id||' material_detail_id = '||get_rec.material_detail_id||
369: ' transacted_qty = '||get_rec.transacted_qty||' exception_qty = '||get_rec.exception_qty||
370: ' pending_move_order = '||get_rec.pending_move_order_ind||' pending_rsv_ind = '||get_rec.pending_reservations_ind);
371: END LOOP;
372: gme_debug.put_line('***** End Exceptions created by release/complete/IB etc. *****');
368: gme_debug.put_line('Batch_id = '||get_rec.batch_id||' material_detail_id = '||get_rec.material_detail_id||
369: ' transacted_qty = '||get_rec.transacted_qty||' exception_qty = '||get_rec.exception_qty||
370: ' pending_move_order = '||get_rec.pending_move_order_ind||' pending_rsv_ind = '||get_rec.pending_reservations_ind);
371: END LOOP;
372: gme_debug.put_line('***** End Exceptions created by release/complete/IB etc. *****');
373: END IF;
374: END dump_temp_txns_exceptions;
375:
376: END gme_debug;
372: gme_debug.put_line('***** End Exceptions created by release/complete/IB etc. *****');
373: END IF;
374: END dump_temp_txns_exceptions;
375:
376: END gme_debug;