DBA Data[Home] [Help]

APPS.RCV_QUANTITIES_S dependencies on ASN_DEBUG

Line 4: g_asn_debug VARCHAR2(1) := NVL(FND_PROFILE.VALUE('RCV_DEBUG_MODE'),'N');

1: PACKAGE BODY RCV_QUANTITIES_S AS
2: /* $Header: RCVTXQUB.pls 120.5 2006/09/15 05:49:49 amony noship $*/
3:
4: g_asn_debug VARCHAR2(1) := NVL(FND_PROFILE.VALUE('RCV_DEBUG_MODE'),'N');
5:
6: /*
7: ** Forward declarations of all the local procedures and functions called
8: ** by get_available_quantity().

Line 371: IF (g_asn_debug = 'Y') THEN

367: BEGIN
368:
369: x_progress := '005';
370:
371: IF (g_asn_debug = 'Y') THEN
372: asn_debug.put_line('p_transaction_type '||p_transaction_type);
373: asn_debug.put_line('p_parent_id '||p_parent_id);
374: asn_debug.put_line('p_parent_transaction_type '||p_parent_transaction_type);
375: asn_debug.put_line('p_grand_parent_id '||p_grand_parent_id);

Line 372: asn_debug.put_line('p_transaction_type '||p_transaction_type);

368:
369: x_progress := '005';
370:
371: IF (g_asn_debug = 'Y') THEN
372: asn_debug.put_line('p_transaction_type '||p_transaction_type);
373: asn_debug.put_line('p_parent_id '||p_parent_id);
374: asn_debug.put_line('p_parent_transaction_type '||p_parent_transaction_type);
375: asn_debug.put_line('p_grand_parent_id '||p_grand_parent_id);
376: asn_debug.put_line('p_correction_type '||p_correction_type);

Line 373: asn_debug.put_line('p_parent_id '||p_parent_id);

369: x_progress := '005';
370:
371: IF (g_asn_debug = 'Y') THEN
372: asn_debug.put_line('p_transaction_type '||p_transaction_type);
373: asn_debug.put_line('p_parent_id '||p_parent_id);
374: asn_debug.put_line('p_parent_transaction_type '||p_parent_transaction_type);
375: asn_debug.put_line('p_grand_parent_id '||p_grand_parent_id);
376: asn_debug.put_line('p_correction_type '||p_correction_type);
377: END IF;

Line 374: asn_debug.put_line('p_parent_transaction_type '||p_parent_transaction_type);

370:
371: IF (g_asn_debug = 'Y') THEN
372: asn_debug.put_line('p_transaction_type '||p_transaction_type);
373: asn_debug.put_line('p_parent_id '||p_parent_id);
374: asn_debug.put_line('p_parent_transaction_type '||p_parent_transaction_type);
375: asn_debug.put_line('p_grand_parent_id '||p_grand_parent_id);
376: asn_debug.put_line('p_correction_type '||p_correction_type);
377: END IF;
378: IF p_transaction_type = 'RECEIVE' THEN

Line 375: asn_debug.put_line('p_grand_parent_id '||p_grand_parent_id);

371: IF (g_asn_debug = 'Y') THEN
372: asn_debug.put_line('p_transaction_type '||p_transaction_type);
373: asn_debug.put_line('p_parent_id '||p_parent_id);
374: asn_debug.put_line('p_parent_transaction_type '||p_parent_transaction_type);
375: asn_debug.put_line('p_grand_parent_id '||p_grand_parent_id);
376: asn_debug.put_line('p_correction_type '||p_correction_type);
377: END IF;
378: IF p_transaction_type = 'RECEIVE' THEN
379:

Line 376: asn_debug.put_line('p_correction_type '||p_correction_type);

372: asn_debug.put_line('p_transaction_type '||p_transaction_type);
373: asn_debug.put_line('p_parent_id '||p_parent_id);
374: asn_debug.put_line('p_parent_transaction_type '||p_parent_transaction_type);
375: asn_debug.put_line('p_grand_parent_id '||p_grand_parent_id);
376: asn_debug.put_line('p_correction_type '||p_correction_type);
377: END IF;
378: IF p_transaction_type = 'RECEIVE' THEN
379:
380: get_receive_amount(p_parent_id, p_receipt_source_code,

Line 410: IF (g_asn_debug = 'Y') THEN

406: RAISE invalid_transaction_type;
407:
408: END IF;
409:
410: IF (g_asn_debug = 'Y') THEN
411: asn_debug.put_line('Exit get_available_amt '||p_transaction_type);
412: asn_debug.put_line('p_available_amt '||p_available_amount);
413: asn_debug.put_line('p_tolerable_amount '||p_tolerable_amount);
414: end if;

Line 411: asn_debug.put_line('Exit get_available_amt '||p_transaction_type);

407:
408: END IF;
409:
410: IF (g_asn_debug = 'Y') THEN
411: asn_debug.put_line('Exit get_available_amt '||p_transaction_type);
412: asn_debug.put_line('p_available_amt '||p_available_amount);
413: asn_debug.put_line('p_tolerable_amount '||p_tolerable_amount);
414: end if;
415: EXCEPTION

Line 412: asn_debug.put_line('p_available_amt '||p_available_amount);

408: END IF;
409:
410: IF (g_asn_debug = 'Y') THEN
411: asn_debug.put_line('Exit get_available_amt '||p_transaction_type);
412: asn_debug.put_line('p_available_amt '||p_available_amount);
413: asn_debug.put_line('p_tolerable_amount '||p_tolerable_amount);
414: end if;
415: EXCEPTION
416:

Line 413: asn_debug.put_line('p_tolerable_amount '||p_tolerable_amount);

409:
410: IF (g_asn_debug = 'Y') THEN
411: asn_debug.put_line('Exit get_available_amt '||p_transaction_type);
412: asn_debug.put_line('p_available_amt '||p_available_amount);
413: asn_debug.put_line('p_tolerable_amount '||p_tolerable_amount);
414: end if;
415: EXCEPTION
416:
417: WHEN invalid_transaction_type THEN

Line 429: IF (g_asn_debug = 'Y') THEN

425: RAISE;
426:
427: WHEN OTHERS THEN
428:
429: IF (g_asn_debug = 'Y') THEN
430: asn_debug.put_line('When others exception in get_available_amt' );
431: end if;
432: po_message_s.sql_error('get_available_amount', x_progress, sqlcode);
433:

Line 430: asn_debug.put_line('When others exception in get_available_amt' );

426:
427: WHEN OTHERS THEN
428:
429: IF (g_asn_debug = 'Y') THEN
430: asn_debug.put_line('When others exception in get_available_amt' );
431: end if;
432: po_message_s.sql_error('get_available_amount', x_progress, sqlcode);
433:
434: RAISE;

Line 526: IF (g_asn_debug = 'Y') THEN

522:
523: invalid_receipt_source_code EXCEPTION;
524:
525: BEGIN
526: IF (g_asn_debug = 'Y') THEN
527: asn_debug.put_line('in get_receive_amount ' );
528: asn_debug.put_line('p_parent_id '||p_parent_id);
529: asn_debug.put_line('p_receipt_source_code '||p_receipt_source_code);
530: END IF;

Line 527: asn_debug.put_line('in get_receive_amount ' );

523: invalid_receipt_source_code EXCEPTION;
524:
525: BEGIN
526: IF (g_asn_debug = 'Y') THEN
527: asn_debug.put_line('in get_receive_amount ' );
528: asn_debug.put_line('p_parent_id '||p_parent_id);
529: asn_debug.put_line('p_receipt_source_code '||p_receipt_source_code);
530: END IF;
531:

Line 528: asn_debug.put_line('p_parent_id '||p_parent_id);

524:
525: BEGIN
526: IF (g_asn_debug = 'Y') THEN
527: asn_debug.put_line('in get_receive_amount ' );
528: asn_debug.put_line('p_parent_id '||p_parent_id);
529: asn_debug.put_line('p_receipt_source_code '||p_receipt_source_code);
530: END IF;
531:
532: IF (p_receipt_source_code = 'VENDOR') THEN

Line 529: asn_debug.put_line('p_receipt_source_code '||p_receipt_source_code);

525: BEGIN
526: IF (g_asn_debug = 'Y') THEN
527: asn_debug.put_line('in get_receive_amount ' );
528: asn_debug.put_line('p_parent_id '||p_parent_id);
529: asn_debug.put_line('p_receipt_source_code '||p_receipt_source_code);
530: END IF;
531:
532: IF (p_receipt_source_code = 'VENDOR') THEN
533: IF (g_asn_debug = 'Y') THEN

Line 533: IF (g_asn_debug = 'Y') THEN

529: asn_debug.put_line('p_receipt_source_code '||p_receipt_source_code);
530: END IF;
531:
532: IF (p_receipt_source_code = 'VENDOR') THEN
533: IF (g_asn_debug = 'Y') THEN
534: asn_debug.put_line('before get_po_amount ' );
535: end if;
536:
537: get_po_amount(p_parent_id, p_available_amount,

Line 534: asn_debug.put_line('before get_po_amount ' );

530: END IF;
531:
532: IF (p_receipt_source_code = 'VENDOR') THEN
533: IF (g_asn_debug = 'Y') THEN
534: asn_debug.put_line('before get_po_amount ' );
535: end if;
536:
537: get_po_amount(p_parent_id, p_available_amount,
538: p_tolerable_amount);

Line 551: IF (g_asn_debug = 'Y') THEN

547: RAISE invalid_receipt_source_code;
548:
549: END IF;
550:
551: IF (g_asn_debug = 'Y') THEN
552: asn_debug.put_line('p_available_amount '||p_available_amount);
553: asn_debug.put_line('p_tolerable_amount '||p_tolerable_amount);
554: END IF;
555: EXCEPTION

Line 552: asn_debug.put_line('p_available_amount '||p_available_amount);

548:
549: END IF;
550:
551: IF (g_asn_debug = 'Y') THEN
552: asn_debug.put_line('p_available_amount '||p_available_amount);
553: asn_debug.put_line('p_tolerable_amount '||p_tolerable_amount);
554: END IF;
555: EXCEPTION
556:

Line 553: asn_debug.put_line('p_tolerable_amount '||p_tolerable_amount);

549: END IF;
550:
551: IF (g_asn_debug = 'Y') THEN
552: asn_debug.put_line('p_available_amount '||p_available_amount);
553: asn_debug.put_line('p_tolerable_amount '||p_tolerable_amount);
554: END IF;
555: EXCEPTION
556:
557: WHEN invalid_receipt_source_code THEN

Line 569: IF (g_asn_debug = 'Y') THEN

565: RAISE;
566:
567: WHEN OTHERS THEN
568:
569: IF (g_asn_debug = 'Y') THEN
570: asn_debug.put_line('Exception get_receive_amount ' );
571: end if;
572: po_message_s.sql_error('get_receive_amount', x_progress, sqlcode);
573:

Line 570: asn_debug.put_line('Exception get_receive_amount ' );

566:
567: WHEN OTHERS THEN
568:
569: IF (g_asn_debug = 'Y') THEN
570: asn_debug.put_line('Exception get_receive_amount ' );
571: end if;
572: po_message_s.sql_error('get_receive_amount', x_progress, sqlcode);
573:
574: RAISE;

Line 1023: asn_debug.put_line('***BEGIN*** get_po_quantity');

1019: AND processing_status_code <> 'ERROR')
1020: AND transaction_type IN('RECEIVE', 'MATCH', 'CORRECT', 'SHIP')
1021: AND oe_order_line_id = p_oe_order_line_id;
1022: BEGIN
1023: asn_debug.put_line('***BEGIN*** get_po_quantity');
1024: asn_debug.put_line('p_oe_order_line_id = ' || p_oe_order_line_id);
1025: asn_debug.put_line('p_available_quantity = ' || p_available_quantity);
1026: asn_debug.put_line('p_tolerable_quantity = ' || p_tolerable_quantity);
1027: asn_debug.put_line('p_unit_of_measure = ' || p_unit_of_measure);

Line 1024: asn_debug.put_line('p_oe_order_line_id = ' || p_oe_order_line_id);

1020: AND transaction_type IN('RECEIVE', 'MATCH', 'CORRECT', 'SHIP')
1021: AND oe_order_line_id = p_oe_order_line_id;
1022: BEGIN
1023: asn_debug.put_line('***BEGIN*** get_po_quantity');
1024: asn_debug.put_line('p_oe_order_line_id = ' || p_oe_order_line_id);
1025: asn_debug.put_line('p_available_quantity = ' || p_available_quantity);
1026: asn_debug.put_line('p_tolerable_quantity = ' || p_tolerable_quantity);
1027: asn_debug.put_line('p_unit_of_measure = ' || p_unit_of_measure);
1028: asn_debug.put_line('p_secondary_available_qty = ' || p_secondary_available_qty);

Line 1025: asn_debug.put_line('p_available_quantity = ' || p_available_quantity);

1021: AND oe_order_line_id = p_oe_order_line_id;
1022: BEGIN
1023: asn_debug.put_line('***BEGIN*** get_po_quantity');
1024: asn_debug.put_line('p_oe_order_line_id = ' || p_oe_order_line_id);
1025: asn_debug.put_line('p_available_quantity = ' || p_available_quantity);
1026: asn_debug.put_line('p_tolerable_quantity = ' || p_tolerable_quantity);
1027: asn_debug.put_line('p_unit_of_measure = ' || p_unit_of_measure);
1028: asn_debug.put_line('p_secondary_available_qty = ' || p_secondary_available_qty);
1029: x_progress := '010';

Line 1026: asn_debug.put_line('p_tolerable_quantity = ' || p_tolerable_quantity);

1022: BEGIN
1023: asn_debug.put_line('***BEGIN*** get_po_quantity');
1024: asn_debug.put_line('p_oe_order_line_id = ' || p_oe_order_line_id);
1025: asn_debug.put_line('p_available_quantity = ' || p_available_quantity);
1026: asn_debug.put_line('p_tolerable_quantity = ' || p_tolerable_quantity);
1027: asn_debug.put_line('p_unit_of_measure = ' || p_unit_of_measure);
1028: asn_debug.put_line('p_secondary_available_qty = ' || p_secondary_available_qty);
1029: x_progress := '010';
1030:

Line 1027: asn_debug.put_line('p_unit_of_measure = ' || p_unit_of_measure);

1023: asn_debug.put_line('***BEGIN*** get_po_quantity');
1024: asn_debug.put_line('p_oe_order_line_id = ' || p_oe_order_line_id);
1025: asn_debug.put_line('p_available_quantity = ' || p_available_quantity);
1026: asn_debug.put_line('p_tolerable_quantity = ' || p_tolerable_quantity);
1027: asn_debug.put_line('p_unit_of_measure = ' || p_unit_of_measure);
1028: asn_debug.put_line('p_secondary_available_qty = ' || p_secondary_available_qty);
1029: x_progress := '010';
1030:
1031: SELECT NVL(oel.ordered_quantity2, 0),

Line 1028: asn_debug.put_line('p_secondary_available_qty = ' || p_secondary_available_qty);

1024: asn_debug.put_line('p_oe_order_line_id = ' || p_oe_order_line_id);
1025: asn_debug.put_line('p_available_quantity = ' || p_available_quantity);
1026: asn_debug.put_line('p_tolerable_quantity = ' || p_tolerable_quantity);
1027: asn_debug.put_line('p_unit_of_measure = ' || p_unit_of_measure);
1028: asn_debug.put_line('p_secondary_available_qty = ' || p_secondary_available_qty);
1029: x_progress := '010';
1030:
1031: SELECT NVL(oel.ordered_quantity2, 0),
1032: NVL(oel.shipped_quantity2, 0),

Line 1105: asn_debug.put_line('p_oe_order_line_id = ' || p_oe_order_line_id);

1101: /*
1102: ** Return the PO unit of measure
1103: */
1104: p_unit_of_measure := x_oe_uom;
1105: asn_debug.put_line('p_oe_order_line_id = ' || p_oe_order_line_id);
1106: asn_debug.put_line('p_available_quantity = ' || p_available_quantity);
1107: asn_debug.put_line('p_tolerable_quantity = ' || p_tolerable_quantity);
1108: asn_debug.put_line('p_unit_of_measure = ' || p_unit_of_measure);
1109: asn_debug.put_line('p_secondary_available_qty = ' || p_secondary_available_qty);

Line 1106: asn_debug.put_line('p_available_quantity = ' || p_available_quantity);

1102: ** Return the PO unit of measure
1103: */
1104: p_unit_of_measure := x_oe_uom;
1105: asn_debug.put_line('p_oe_order_line_id = ' || p_oe_order_line_id);
1106: asn_debug.put_line('p_available_quantity = ' || p_available_quantity);
1107: asn_debug.put_line('p_tolerable_quantity = ' || p_tolerable_quantity);
1108: asn_debug.put_line('p_unit_of_measure = ' || p_unit_of_measure);
1109: asn_debug.put_line('p_secondary_available_qty = ' || p_secondary_available_qty);
1110: asn_debug.put_line('***END*** get_po_quantity');

Line 1107: asn_debug.put_line('p_tolerable_quantity = ' || p_tolerable_quantity);

1103: */
1104: p_unit_of_measure := x_oe_uom;
1105: asn_debug.put_line('p_oe_order_line_id = ' || p_oe_order_line_id);
1106: asn_debug.put_line('p_available_quantity = ' || p_available_quantity);
1107: asn_debug.put_line('p_tolerable_quantity = ' || p_tolerable_quantity);
1108: asn_debug.put_line('p_unit_of_measure = ' || p_unit_of_measure);
1109: asn_debug.put_line('p_secondary_available_qty = ' || p_secondary_available_qty);
1110: asn_debug.put_line('***END*** get_po_quantity');
1111: EXCEPTION

Line 1108: asn_debug.put_line('p_unit_of_measure = ' || p_unit_of_measure);

1104: p_unit_of_measure := x_oe_uom;
1105: asn_debug.put_line('p_oe_order_line_id = ' || p_oe_order_line_id);
1106: asn_debug.put_line('p_available_quantity = ' || p_available_quantity);
1107: asn_debug.put_line('p_tolerable_quantity = ' || p_tolerable_quantity);
1108: asn_debug.put_line('p_unit_of_measure = ' || p_unit_of_measure);
1109: asn_debug.put_line('p_secondary_available_qty = ' || p_secondary_available_qty);
1110: asn_debug.put_line('***END*** get_po_quantity');
1111: EXCEPTION
1112: WHEN OTHERS THEN

Line 1109: asn_debug.put_line('p_secondary_available_qty = ' || p_secondary_available_qty);

1105: asn_debug.put_line('p_oe_order_line_id = ' || p_oe_order_line_id);
1106: asn_debug.put_line('p_available_quantity = ' || p_available_quantity);
1107: asn_debug.put_line('p_tolerable_quantity = ' || p_tolerable_quantity);
1108: asn_debug.put_line('p_unit_of_measure = ' || p_unit_of_measure);
1109: asn_debug.put_line('p_secondary_available_qty = ' || p_secondary_available_qty);
1110: asn_debug.put_line('***END*** get_po_quantity');
1111: EXCEPTION
1112: WHEN OTHERS THEN
1113: po_message_s.sql_error('get_rma_quantity',

Line 1110: asn_debug.put_line('***END*** get_po_quantity');

1106: asn_debug.put_line('p_available_quantity = ' || p_available_quantity);
1107: asn_debug.put_line('p_tolerable_quantity = ' || p_tolerable_quantity);
1108: asn_debug.put_line('p_unit_of_measure = ' || p_unit_of_measure);
1109: asn_debug.put_line('p_secondary_available_qty = ' || p_secondary_available_qty);
1110: asn_debug.put_line('***END*** get_po_quantity');
1111: EXCEPTION
1112: WHEN OTHERS THEN
1113: po_message_s.sql_error('get_rma_quantity',
1114: x_progress,

Line 1326: IF (g_asn_debug = 'Y') THEN

1322: ** needs to be trapped here
1323: */
1324:
1325: -- bug 4873207
1326: IF (g_asn_debug = 'Y') THEN
1327: asn_debug.put_line('get_transaction_quantity >> ' || x_progress );
1328: asn_debug.put_line('p_transaction_id ' || p_transaction_id);
1329: END IF;
1330: -- bug 4873207

Line 1327: asn_debug.put_line('get_transaction_quantity >> ' || x_progress );

1323: */
1324:
1325: -- bug 4873207
1326: IF (g_asn_debug = 'Y') THEN
1327: asn_debug.put_line('get_transaction_quantity >> ' || x_progress );
1328: asn_debug.put_line('p_transaction_id ' || p_transaction_id);
1329: END IF;
1330: -- bug 4873207
1331:

Line 1328: asn_debug.put_line('p_transaction_id ' || p_transaction_id);

1324:
1325: -- bug 4873207
1326: IF (g_asn_debug = 'Y') THEN
1327: asn_debug.put_line('get_transaction_quantity >> ' || x_progress );
1328: asn_debug.put_line('p_transaction_id ' || p_transaction_id);
1329: END IF;
1330: -- bug 4873207
1331:
1332: BEGIN

Line 1397: IF (g_asn_debug = 'Y') THEN

1393:
1394: END;
1395:
1396: -- bug 4873207
1397: IF (g_asn_debug = 'Y') THEN
1398: asn_debug.put_line('get_transaction_quantity >> ');
1399: asn_debug.put_line('x_transaction_quantity '||x_transaction_quantity);
1400: asn_debug.put_line('x_transaction_uom '||x_transaction_uom);
1401: asn_debug.put_line('item_id '||x_item_id);

Line 1398: asn_debug.put_line('get_transaction_quantity >> ');

1394: END;
1395:
1396: -- bug 4873207
1397: IF (g_asn_debug = 'Y') THEN
1398: asn_debug.put_line('get_transaction_quantity >> ');
1399: asn_debug.put_line('x_transaction_quantity '||x_transaction_quantity);
1400: asn_debug.put_line('x_transaction_uom '||x_transaction_uom);
1401: asn_debug.put_line('item_id '||x_item_id);
1402: asn_debug.put_line('x_secondary_transaction_qty '||x_secondary_transaction_qty);

Line 1399: asn_debug.put_line('x_transaction_quantity '||x_transaction_quantity);

1395:
1396: -- bug 4873207
1397: IF (g_asn_debug = 'Y') THEN
1398: asn_debug.put_line('get_transaction_quantity >> ');
1399: asn_debug.put_line('x_transaction_quantity '||x_transaction_quantity);
1400: asn_debug.put_line('x_transaction_uom '||x_transaction_uom);
1401: asn_debug.put_line('item_id '||x_item_id);
1402: asn_debug.put_line('x_secondary_transaction_qty '||x_secondary_transaction_qty);
1403: END IF;

Line 1400: asn_debug.put_line('x_transaction_uom '||x_transaction_uom);

1396: -- bug 4873207
1397: IF (g_asn_debug = 'Y') THEN
1398: asn_debug.put_line('get_transaction_quantity >> ');
1399: asn_debug.put_line('x_transaction_quantity '||x_transaction_quantity);
1400: asn_debug.put_line('x_transaction_uom '||x_transaction_uom);
1401: asn_debug.put_line('item_id '||x_item_id);
1402: asn_debug.put_line('x_secondary_transaction_qty '||x_secondary_transaction_qty);
1403: END IF;
1404: -- bug 4873207

Line 1401: asn_debug.put_line('item_id '||x_item_id);

1397: IF (g_asn_debug = 'Y') THEN
1398: asn_debug.put_line('get_transaction_quantity >> ');
1399: asn_debug.put_line('x_transaction_quantity '||x_transaction_quantity);
1400: asn_debug.put_line('x_transaction_uom '||x_transaction_uom);
1401: asn_debug.put_line('item_id '||x_item_id);
1402: asn_debug.put_line('x_secondary_transaction_qty '||x_secondary_transaction_qty);
1403: END IF;
1404: -- bug 4873207
1405:

Line 1402: asn_debug.put_line('x_secondary_transaction_qty '||x_secondary_transaction_qty);

1398: asn_debug.put_line('get_transaction_quantity >> ');
1399: asn_debug.put_line('x_transaction_quantity '||x_transaction_quantity);
1400: asn_debug.put_line('x_transaction_uom '||x_transaction_uom);
1401: asn_debug.put_line('item_id '||x_item_id);
1402: asn_debug.put_line('x_secondary_transaction_qty '||x_secondary_transaction_qty);
1403: END IF;
1404: -- bug 4873207
1405:
1406:

Line 1446: IF (g_asn_debug = 'Y') THEN

1442: /*
1443: ** There is unprocessed quantity. Convert it to the transaction uom
1444: ** so that the available quantity can be calculated in the trx uom
1445: */
1446: IF (g_asn_debug = 'Y') THEN
1447: asn_debug.put_line('Before uom_convert:');
1448: asn_debug.put_line('x_interface_quantity:' || x_interface_quantity);
1449: asn_debug.put_line('x_primary_uom:' || x_primary_uom);
1450: asn_debug.put_line('x_transaction_uom:' || x_transaction_uom);

Line 1447: asn_debug.put_line('Before uom_convert:');

1443: ** There is unprocessed quantity. Convert it to the transaction uom
1444: ** so that the available quantity can be calculated in the trx uom
1445: */
1446: IF (g_asn_debug = 'Y') THEN
1447: asn_debug.put_line('Before uom_convert:');
1448: asn_debug.put_line('x_interface_quantity:' || x_interface_quantity);
1449: asn_debug.put_line('x_primary_uom:' || x_primary_uom);
1450: asn_debug.put_line('x_transaction_uom:' || x_transaction_uom);
1451: asn_debug.put_line('x_item_id:' || x_item_id);

Line 1448: asn_debug.put_line('x_interface_quantity:' || x_interface_quantity);

1444: ** so that the available quantity can be calculated in the trx uom
1445: */
1446: IF (g_asn_debug = 'Y') THEN
1447: asn_debug.put_line('Before uom_convert:');
1448: asn_debug.put_line('x_interface_quantity:' || x_interface_quantity);
1449: asn_debug.put_line('x_primary_uom:' || x_primary_uom);
1450: asn_debug.put_line('x_transaction_uom:' || x_transaction_uom);
1451: asn_debug.put_line('x_item_id:' || x_item_id);
1452: END IF;

Line 1449: asn_debug.put_line('x_primary_uom:' || x_primary_uom);

1445: */
1446: IF (g_asn_debug = 'Y') THEN
1447: asn_debug.put_line('Before uom_convert:');
1448: asn_debug.put_line('x_interface_quantity:' || x_interface_quantity);
1449: asn_debug.put_line('x_primary_uom:' || x_primary_uom);
1450: asn_debug.put_line('x_transaction_uom:' || x_transaction_uom);
1451: asn_debug.put_line('x_item_id:' || x_item_id);
1452: END IF;
1453:

Line 1450: asn_debug.put_line('x_transaction_uom:' || x_transaction_uom);

1446: IF (g_asn_debug = 'Y') THEN
1447: asn_debug.put_line('Before uom_convert:');
1448: asn_debug.put_line('x_interface_quantity:' || x_interface_quantity);
1449: asn_debug.put_line('x_primary_uom:' || x_primary_uom);
1450: asn_debug.put_line('x_transaction_uom:' || x_transaction_uom);
1451: asn_debug.put_line('x_item_id:' || x_item_id);
1452: END IF;
1453:
1454: x_progress := '015';

Line 1451: asn_debug.put_line('x_item_id:' || x_item_id);

1447: asn_debug.put_line('Before uom_convert:');
1448: asn_debug.put_line('x_interface_quantity:' || x_interface_quantity);
1449: asn_debug.put_line('x_primary_uom:' || x_primary_uom);
1450: asn_debug.put_line('x_transaction_uom:' || x_transaction_uom);
1451: asn_debug.put_line('x_item_id:' || x_item_id);
1452: END IF;
1453:
1454: x_progress := '015';
1455: po_uom_s.uom_convert(x_interface_quantity, x_primary_uom, x_item_id,

Line 1538: IF (g_asn_debug = 'Y') THEN

1534: /*
1535: ** Get available amount information from processed transactions.
1536: */
1537:
1538: IF (g_asn_debug = 'Y') THEN
1539: asn_debug.put_line('get_transaction_amount ' );
1540: asn_debug.put_line('p_transaction_id '||p_transaction_id );
1541: end if;
1542: BEGIN

Line 1539: asn_debug.put_line('get_transaction_amount ' );

1535: ** Get available amount information from processed transactions.
1536: */
1537:
1538: IF (g_asn_debug = 'Y') THEN
1539: asn_debug.put_line('get_transaction_amount ' );
1540: asn_debug.put_line('p_transaction_id '||p_transaction_id );
1541: end if;
1542: BEGIN
1543:

Line 1540: asn_debug.put_line('p_transaction_id '||p_transaction_id );

1536: */
1537:
1538: IF (g_asn_debug = 'Y') THEN
1539: asn_debug.put_line('get_transaction_amount ' );
1540: asn_debug.put_line('p_transaction_id '||p_transaction_id );
1541: end if;
1542: BEGIN
1543:
1544: SELECT nvl(sum(amount),0)

Line 1550: IF (g_asn_debug = 'Y') THEN

1546: from rcv_transactions
1547: where parent_transaction_id = p_transaction_id
1548: and transaction_type = 'CORRECT';
1549:
1550: IF (g_asn_debug = 'Y') THEN
1551: asn_debug.put_line('l_receive_correct '||l_receive_correct);
1552: end if;
1553: select transaction_id
1554: into l_deliver_id

Line 1551: asn_debug.put_line('l_receive_correct '||l_receive_correct);

1547: where parent_transaction_id = p_transaction_id
1548: and transaction_type = 'CORRECT';
1549:
1550: IF (g_asn_debug = 'Y') THEN
1551: asn_debug.put_line('l_receive_correct '||l_receive_correct);
1552: end if;
1553: select transaction_id
1554: into l_deliver_id
1555: from rcv_transactions

Line 1559: IF (g_asn_debug = 'Y') THEN

1555: from rcv_transactions
1556: where parent_transaction_id= p_transaction_id
1557: and transaction_type='DELIVER';
1558:
1559: IF (g_asn_debug = 'Y') THEN
1560: asn_debug.put_line('l_deliver_id '||l_deliver_id);
1561: end if;
1562: SELECT nvl(sum(amount),0)
1563: into l_deliver_correct

Line 1560: asn_debug.put_line('l_deliver_id '||l_deliver_id);

1556: where parent_transaction_id= p_transaction_id
1557: and transaction_type='DELIVER';
1558:
1559: IF (g_asn_debug = 'Y') THEN
1560: asn_debug.put_line('l_deliver_id '||l_deliver_id);
1561: end if;
1562: SELECT nvl(sum(amount),0)
1563: into l_deliver_correct
1564: from rcv_transactions

Line 1568: IF (g_asn_debug = 'Y') THEN

1564: from rcv_transactions
1565: where parent_transaction_id = l_deliver_id
1566: and transaction_type = 'CORRECT';
1567:
1568: IF (g_asn_debug = 'Y') THEN
1569: asn_debug.put_line('l_deliver_correct '||l_deliver_correct);
1570: end if;
1571:
1572: EXCEPTION

Line 1569: asn_debug.put_line('l_deliver_correct '||l_deliver_correct);

1565: where parent_transaction_id = l_deliver_id
1566: and transaction_type = 'CORRECT';
1567:
1568: IF (g_asn_debug = 'Y') THEN
1569: asn_debug.put_line('l_deliver_correct '||l_deliver_correct);
1570: end if;
1571:
1572: EXCEPTION
1573: WHEN NO_DATA_FOUND THEN

Line 1600: IF (g_asn_debug = 'Y') THEN

1596: WHERE (transaction_status_code = 'PENDING'
1597: and processing_status_code <> 'ERROR')
1598: AND parent_transaction_id = p_transaction_id;
1599:
1600: IF (g_asn_debug = 'Y') THEN
1601: asn_debug.put_line('x_interface_amount '||x_interface_amount);
1602: end if;
1603:
1604: -- do the same for the children of the receive transaction

Line 1601: asn_debug.put_line('x_interface_amount '||x_interface_amount);

1597: and processing_status_code <> 'ERROR')
1598: AND parent_transaction_id = p_transaction_id;
1599:
1600: IF (g_asn_debug = 'Y') THEN
1601: asn_debug.put_line('x_interface_amount '||x_interface_amount);
1602: end if;
1603:
1604: -- do the same for the children of the receive transaction
1605: SELECT nvl(sum(decode(transaction_type,

Line 1615: IF (g_asn_debug = 'Y') THEN

1611: WHERE (transaction_status_code = 'PENDING'
1612: and processing_status_code <> 'ERROR')
1613: AND parent_transaction_id = l_deliver_id;
1614:
1615: IF (g_asn_debug = 'Y') THEN
1616: asn_debug.put_line('x_interface_deliver_amount '||x_interface_deliver_amount);
1617: END IF;
1618:
1619: /*

Line 1616: asn_debug.put_line('x_interface_deliver_amount '||x_interface_deliver_amount);

1612: and processing_status_code <> 'ERROR')
1613: AND parent_transaction_id = l_deliver_id;
1614:
1615: IF (g_asn_debug = 'Y') THEN
1616: asn_debug.put_line('x_interface_deliver_amount '||x_interface_deliver_amount);
1617: END IF;
1618:
1619: /*
1620: ** Calculate the quantity available to be transacted

Line 1625: IF (g_asn_debug = 'Y') THEN

1621: */
1622:
1623: p_available_amount := l_receive_correct - l_deliver_correct - (x_interface_amount - x_interface_deliver_amount);
1624:
1625: IF (g_asn_debug = 'Y') THEN
1626: asn_debug.put_line('p_available_amount '||p_available_amount);
1627: end if;
1628:
1629: EXCEPTION

Line 1626: asn_debug.put_line('p_available_amount '||p_available_amount);

1622:
1623: p_available_amount := l_receive_correct - l_deliver_correct - (x_interface_amount - x_interface_deliver_amount);
1624:
1625: IF (g_asn_debug = 'Y') THEN
1626: asn_debug.put_line('p_available_amount '||p_available_amount);
1627: end if;
1628:
1629: EXCEPTION
1630:

Line 1633: IF (g_asn_debug = 'Y') THEN

1629: EXCEPTION
1630:
1631: WHEN OTHERS THEN
1632:
1633: IF (g_asn_debug = 'Y') THEN
1634: asn_debug.put_line('Exception in get_transaction_amount');
1635: end if;
1636: po_message_s.sql_error('get_transaction_amount', x_progress, sqlcode);
1637:

Line 1634: asn_debug.put_line('Exception in get_transaction_amount');

1630:
1631: WHEN OTHERS THEN
1632:
1633: IF (g_asn_debug = 'Y') THEN
1634: asn_debug.put_line('Exception in get_transaction_amount');
1635: end if;
1636: po_message_s.sql_error('get_transaction_amount', x_progress, sqlcode);
1637:
1638: RAISE;

Line 1670: IF (g_asn_debug = 'Y') THEN

1666: x_interface_qty_in_trx_uom NUMBER := 0;
1667: l_quantity_in_parent_uom RCV_TRANSACTIONS.quantity%TYPE; -- Bug 2737257
1668: BEGIN
1669:
1670: IF (g_asn_debug = 'Y') THEN
1671: asn_debug.put_line(' in get_correction_quantity');
1672: end if;
1673: IF p_correction_type = 'NEGATIVE' THEN
1674:

Line 1671: asn_debug.put_line(' in get_correction_quantity');

1667: l_quantity_in_parent_uom RCV_TRANSACTIONS.quantity%TYPE; -- Bug 2737257
1668: BEGIN
1669:
1670: IF (g_asn_debug = 'Y') THEN
1671: asn_debug.put_line(' in get_correction_quantity');
1672: end if;
1673: IF p_correction_type = 'NEGATIVE' THEN
1674:
1675: /*

Line 1689: IF (g_asn_debug = 'Y') THEN

1685: ** Use get_transaction_quantity logic to get the available quantity
1686: ** and uom.
1687: */
1688:
1689: IF (g_asn_debug = 'Y') THEN
1690: asn_debug.put_line(' Before get_transaction_quantity');
1691: end if;
1692: get_transaction_quantity(p_parent_id, p_available_quantity,
1693: p_unit_of_measure,p_secondary_available_qty);

Line 1690: asn_debug.put_line(' Before get_transaction_quantity');

1686: ** and uom.
1687: */
1688:
1689: IF (g_asn_debug = 'Y') THEN
1690: asn_debug.put_line(' Before get_transaction_quantity');
1691: end if;
1692: get_transaction_quantity(p_parent_id, p_available_quantity,
1693: p_unit_of_measure,p_secondary_available_qty);
1694:

Line 1709: IF (g_asn_debug = 'Y') THEN

1705: ** to Return To Receiving transactions. However, it is a good
1706: ** candidate for an ER. If we do, we need to add to this function
1707: ** to handle this case.
1708: */
1709: IF (g_asn_debug = 'Y') THEN
1710: asn_debug.put_line(' Before get_deliver_quantity');
1711: end if;
1712:
1713: get_deliver_quantity(p_parent_id, p_available_quantity,

Line 1710: asn_debug.put_line(' Before get_deliver_quantity');

1706: ** candidate for an ER. If we do, we need to add to this function
1707: ** to handle this case.
1708: */
1709: IF (g_asn_debug = 'Y') THEN
1710: asn_debug.put_line(' Before get_deliver_quantity');
1711: end if;
1712:
1713: get_deliver_quantity(p_parent_id, p_available_quantity,
1714: p_unit_of_measure,p_secondary_available_qty);

Line 1912: IF (g_asn_debug = 'Y') THEN

1908: X_interface_amount NUMBER := 0;
1909: invalid_parent_trx_type EXCEPTION;
1910: BEGIN
1911:
1912: IF (g_asn_debug = 'Y') THEN
1913: asn_debug.put_line('p_correction_type '||p_correction_type );
1914: asn_debug.put_line('p_parent_transaction_type '||p_parent_transaction_type );
1915: asn_debug.put_line('p_receipt_source_code '||p_receipt_source_code );
1916: asn_debug.put_line('p_parent_id '||p_parent_id );

Line 1913: asn_debug.put_line('p_correction_type '||p_correction_type );

1909: invalid_parent_trx_type EXCEPTION;
1910: BEGIN
1911:
1912: IF (g_asn_debug = 'Y') THEN
1913: asn_debug.put_line('p_correction_type '||p_correction_type );
1914: asn_debug.put_line('p_parent_transaction_type '||p_parent_transaction_type );
1915: asn_debug.put_line('p_receipt_source_code '||p_receipt_source_code );
1916: asn_debug.put_line('p_parent_id '||p_parent_id );
1917: asn_debug.put_line('p_grand_parent_id '||p_grand_parent_id );

Line 1914: asn_debug.put_line('p_parent_transaction_type '||p_parent_transaction_type );

1910: BEGIN
1911:
1912: IF (g_asn_debug = 'Y') THEN
1913: asn_debug.put_line('p_correction_type '||p_correction_type );
1914: asn_debug.put_line('p_parent_transaction_type '||p_parent_transaction_type );
1915: asn_debug.put_line('p_receipt_source_code '||p_receipt_source_code );
1916: asn_debug.put_line('p_parent_id '||p_parent_id );
1917: asn_debug.put_line('p_grand_parent_id '||p_grand_parent_id );
1918: end if;

Line 1915: asn_debug.put_line('p_receipt_source_code '||p_receipt_source_code );

1911:
1912: IF (g_asn_debug = 'Y') THEN
1913: asn_debug.put_line('p_correction_type '||p_correction_type );
1914: asn_debug.put_line('p_parent_transaction_type '||p_parent_transaction_type );
1915: asn_debug.put_line('p_receipt_source_code '||p_receipt_source_code );
1916: asn_debug.put_line('p_parent_id '||p_parent_id );
1917: asn_debug.put_line('p_grand_parent_id '||p_grand_parent_id );
1918: end if;
1919: IF p_correction_type = 'NEGATIVE' THEN

Line 1916: asn_debug.put_line('p_parent_id '||p_parent_id );

1912: IF (g_asn_debug = 'Y') THEN
1913: asn_debug.put_line('p_correction_type '||p_correction_type );
1914: asn_debug.put_line('p_parent_transaction_type '||p_parent_transaction_type );
1915: asn_debug.put_line('p_receipt_source_code '||p_receipt_source_code );
1916: asn_debug.put_line('p_parent_id '||p_parent_id );
1917: asn_debug.put_line('p_grand_parent_id '||p_grand_parent_id );
1918: end if;
1919: IF p_correction_type = 'NEGATIVE' THEN
1920:

Line 1917: asn_debug.put_line('p_grand_parent_id '||p_grand_parent_id );

1913: asn_debug.put_line('p_correction_type '||p_correction_type );
1914: asn_debug.put_line('p_parent_transaction_type '||p_parent_transaction_type );
1915: asn_debug.put_line('p_receipt_source_code '||p_receipt_source_code );
1916: asn_debug.put_line('p_parent_id '||p_parent_id );
1917: asn_debug.put_line('p_grand_parent_id '||p_grand_parent_id );
1918: end if;
1919: IF p_correction_type = 'NEGATIVE' THEN
1920:
1921: /*

Line 1934: IF (g_asn_debug = 'Y') THEN

1930: ** Use get_transaction_quantity logic to get the available quantity
1931: ** and uom.
1932: */
1933:
1934: IF (g_asn_debug = 'Y') THEN
1935: asn_debug.put_line(' before get_transaction_amount');
1936: end if;
1937: get_transaction_amount(p_parent_id, p_available_amount);
1938:

Line 1935: asn_debug.put_line(' before get_transaction_amount');

1931: ** and uom.
1932: */
1933:
1934: IF (g_asn_debug = 'Y') THEN
1935: asn_debug.put_line(' before get_transaction_amount');
1936: end if;
1937: get_transaction_amount(p_parent_id, p_available_amount);
1938:
1939:

Line 1953: IF (g_asn_debug = 'Y') THEN

1949: ** candidate for an ER. If we do, we need to add to this function
1950: ** to handle this case.
1951: */
1952:
1953: IF (g_asn_debug = 'Y') THEN
1954: asn_debug.put_line(' before get_deliver_amount');
1955: end if;
1956: get_deliver_amount(p_parent_id, p_available_amount);
1957:

Line 1954: asn_debug.put_line(' before get_deliver_amount');

1950: ** to handle this case.
1951: */
1952:
1953: IF (g_asn_debug = 'Y') THEN
1954: asn_debug.put_line(' before get_deliver_amount');
1955: end if;
1956: get_deliver_amount(p_parent_id, p_available_amount);
1957:
1958: ELSE

Line 1994: IF (g_asn_debug = 'Y') THEN

1990: ** p_grand_parent_id is either the po_line_location_id or the
1991: ** rcv_shipment_line_id as the case may be.
1992: */
1993:
1994: IF (g_asn_debug = 'Y') THEN
1995: asn_debug.put_line(' before get_receive_amount');
1996: end if;
1997: get_receive_amount(p_grand_parent_id, p_receipt_source_code,
1998: p_available_amount, p_tolerable_amount);

Line 1995: asn_debug.put_line(' before get_receive_amount');

1991: ** rcv_shipment_line_id as the case may be.
1992: */
1993:
1994: IF (g_asn_debug = 'Y') THEN
1995: asn_debug.put_line(' before get_receive_amount');
1996: end if;
1997: get_receive_amount(p_grand_parent_id, p_receipt_source_code,
1998: p_available_amount, p_tolerable_amount);
1999:

Line 2010: IF (g_asn_debug = 'Y') THEN

2006: ** p_grand_parent_id is the grand parent transaction for which
2007: ** we need to get the outstanding quantity.
2008: */
2009:
2010: IF (g_asn_debug = 'Y') THEN
2011: asn_debug.put_line(' before get_transaction_amount');
2012: end if;
2013: get_transaction_amount(p_grand_parent_id, p_available_amount);
2014:

Line 2011: asn_debug.put_line(' before get_transaction_amount');

2007: ** we need to get the outstanding quantity.
2008: */
2009:
2010: IF (g_asn_debug = 'Y') THEN
2011: asn_debug.put_line(' before get_transaction_amount');
2012: end if;
2013: get_transaction_amount(p_grand_parent_id, p_available_amount);
2014:
2015: ELSE

Line 2401: IF (g_asn_debug = 'Y') THEN

2397: IF ( l_consigned_deliver_uom_qty < p_available_quantity ) THEN
2398: p_available_quantity := l_consigned_deliver_uom_qty;
2399: END IF;
2400: ELSE
2401: IF (g_asn_debug = 'Y') THEN
2402: asn_debug.put_line('Error in get_deliver_quantity() during call to INV consigned API');
2403: asn_debug.put_line('Return status : '||l_return_status);
2404: asn_debug.put_line('Error Message : '||SUBSTRB(l_msg_data,1,50));
2405: END IF;

Line 2402: asn_debug.put_line('Error in get_deliver_quantity() during call to INV consigned API');

2398: p_available_quantity := l_consigned_deliver_uom_qty;
2399: END IF;
2400: ELSE
2401: IF (g_asn_debug = 'Y') THEN
2402: asn_debug.put_line('Error in get_deliver_quantity() during call to INV consigned API');
2403: asn_debug.put_line('Return status : '||l_return_status);
2404: asn_debug.put_line('Error Message : '||SUBSTRB(l_msg_data,1,50));
2405: END IF;
2406: APP_EXCEPTION.RAISE_EXCEPTION;

Line 2403: asn_debug.put_line('Return status : '||l_return_status);

2399: END IF;
2400: ELSE
2401: IF (g_asn_debug = 'Y') THEN
2402: asn_debug.put_line('Error in get_deliver_quantity() during call to INV consigned API');
2403: asn_debug.put_line('Return status : '||l_return_status);
2404: asn_debug.put_line('Error Message : '||SUBSTRB(l_msg_data,1,50));
2405: END IF;
2406: APP_EXCEPTION.RAISE_EXCEPTION;
2407: --END IF;

Line 2404: asn_debug.put_line('Error Message : '||SUBSTRB(l_msg_data,1,50));

2400: ELSE
2401: IF (g_asn_debug = 'Y') THEN
2402: asn_debug.put_line('Error in get_deliver_quantity() during call to INV consigned API');
2403: asn_debug.put_line('Return status : '||l_return_status);
2404: asn_debug.put_line('Error Message : '||SUBSTRB(l_msg_data,1,50));
2405: END IF;
2406: APP_EXCEPTION.RAISE_EXCEPTION;
2407: --END IF;
2408: END IF;

Line 2440: IF (g_asn_debug = 'Y') THEN

2436: BEGIN
2437:
2438: x_progress := '005';
2439:
2440: IF (g_asn_debug = 'Y') THEN
2441: asn_debug.put_line('in get_receive_amount ' );
2442: asn_debug.put_line('p_transaction_id '||p_transaction_id);
2443: END IF;
2444: /*

Line 2441: asn_debug.put_line('in get_receive_amount ' );

2437:
2438: x_progress := '005';
2439:
2440: IF (g_asn_debug = 'Y') THEN
2441: asn_debug.put_line('in get_receive_amount ' );
2442: asn_debug.put_line('p_transaction_id '||p_transaction_id);
2443: END IF;
2444: /*
2445: ** Get available transaction amount information.

Line 2442: asn_debug.put_line('p_transaction_id '||p_transaction_id);

2438: x_progress := '005';
2439:
2440: IF (g_asn_debug = 'Y') THEN
2441: asn_debug.put_line('in get_receive_amount ' );
2442: asn_debug.put_line('p_transaction_id '||p_transaction_id);
2443: END IF;
2444: /*
2445: ** Get available transaction amount information.
2446: */

Line 2453: IF (g_asn_debug = 'Y') THEN

2449: into x_deliver_amount
2450: from rcv_transactions rt
2451: where rt.transaction_id = p_transaction_id;
2452:
2453: IF (g_asn_debug = 'Y') THEN
2454: asn_debug.put_line('x_deliver_amount '||x_deliver_amount );
2455: end if;
2456: x_progress := '010';
2457:

Line 2454: asn_debug.put_line('x_deliver_amount '||x_deliver_amount );

2450: from rcv_transactions rt
2451: where rt.transaction_id = p_transaction_id;
2452:
2453: IF (g_asn_debug = 'Y') THEN
2454: asn_debug.put_line('x_deliver_amount '||x_deliver_amount );
2455: end if;
2456: x_progress := '010';
2457:
2458: /*

Line 2473: IF (g_asn_debug = 'Y') THEN

2469: WHERE (transaction_status_code = 'PENDING'
2470: and processing_status_code <> 'ERROR')
2471: AND parent_transaction_id = p_transaction_id;
2472:
2473: IF (g_asn_debug = 'Y') THEN
2474: asn_debug.put_line('x_interface_amount '||x_interface_amount );
2475: end if;
2476: /*
2477: ** Calculate the quantity available to be transacted

Line 2474: asn_debug.put_line('x_interface_amount '||x_interface_amount );

2470: and processing_status_code <> 'ERROR')
2471: AND parent_transaction_id = p_transaction_id;
2472:
2473: IF (g_asn_debug = 'Y') THEN
2474: asn_debug.put_line('x_interface_amount '||x_interface_amount );
2475: end if;
2476: /*
2477: ** Calculate the quantity available to be transacted
2478: */

Line 2482: IF (g_asn_debug = 'Y') THEN

2478: */
2479:
2480: p_available_amount := x_deliver_amount - x_interface_amount;
2481:
2482: IF (g_asn_debug = 'Y') THEN
2483: asn_debug.put_line('p_available_amount '||p_available_amount );
2484: end if;
2485: /*
2486: ** Get any rows already precessed against this transaction

Line 2483: asn_debug.put_line('p_available_amount '||p_available_amount );

2479:
2480: p_available_amount := x_deliver_amount - x_interface_amount;
2481:
2482: IF (g_asn_debug = 'Y') THEN
2483: asn_debug.put_line('p_available_amount '||p_available_amount );
2484: end if;
2485: /*
2486: ** Get any rows already precessed against this transaction
2487: ** parent transaction. x_interface_quantity is in primary uom.

Line 2502: IF (g_asn_debug = 'Y') THEN

2498: FROM rcv_transactions
2499: WHERE parent_transaction_id = p_transaction_id
2500: AND transaction_type = 'CORRECT';
2501:
2502: IF (g_asn_debug = 'Y') THEN
2503: asn_debug.put_line('x_transaction_amount '||x_transaction_amount );
2504: end if;
2505: x_progress := '015';
2506:

Line 2503: asn_debug.put_line('x_transaction_amount '||x_transaction_amount );

2499: WHERE parent_transaction_id = p_transaction_id
2500: AND transaction_type = 'CORRECT';
2501:
2502: IF (g_asn_debug = 'Y') THEN
2503: asn_debug.put_line('x_transaction_amount '||x_transaction_amount );
2504: end if;
2505: x_progress := '015';
2506:
2507: /*

Line 2512: IF (g_asn_debug = 'Y') THEN

2508: ** Calculate the quantity available to be transacted
2509: */
2510:
2511: p_available_amount := p_available_amount + x_transaction_amount;
2512: IF (g_asn_debug = 'Y') THEN
2513: asn_debug.put_line('p_available_amount 1 '||p_available_amount );
2514: end if;
2515:
2516: EXCEPTION

Line 2513: asn_debug.put_line('p_available_amount 1 '||p_available_amount );

2509: */
2510:
2511: p_available_amount := p_available_amount + x_transaction_amount;
2512: IF (g_asn_debug = 'Y') THEN
2513: asn_debug.put_line('p_available_amount 1 '||p_available_amount );
2514: end if;
2515:
2516: EXCEPTION
2517:

Line 3218: IF (g_asn_debug = 'Y') THEN

3214: l_progress VARCHAR2(3) := NULL;
3215: begin
3216:
3217: l_progress := '000';
3218: IF (g_asn_debug = 'Y') THEN
3219: asn_debug.put_line('Enter get_available_asn_quantity ');
3220: asn_debug.put_line('p_transaction_type '||p_transaction_type);
3221: asn_debug.put_line('p_shipment_line_id '||p_shipment_line_id);
3222: asn_debug.put_line('p_line_location_id '||p_line_location_id );

Line 3219: asn_debug.put_line('Enter get_available_asn_quantity ');

3215: begin
3216:
3217: l_progress := '000';
3218: IF (g_asn_debug = 'Y') THEN
3219: asn_debug.put_line('Enter get_available_asn_quantity ');
3220: asn_debug.put_line('p_transaction_type '||p_transaction_type);
3221: asn_debug.put_line('p_shipment_line_id '||p_shipment_line_id);
3222: asn_debug.put_line('p_line_location_id '||p_line_location_id );
3223: asn_debug.put_line('p_distribution_id '||p_distribution_id );

Line 3220: asn_debug.put_line('p_transaction_type '||p_transaction_type);

3216:
3217: l_progress := '000';
3218: IF (g_asn_debug = 'Y') THEN
3219: asn_debug.put_line('Enter get_available_asn_quantity ');
3220: asn_debug.put_line('p_transaction_type '||p_transaction_type);
3221: asn_debug.put_line('p_shipment_line_id '||p_shipment_line_id);
3222: asn_debug.put_line('p_line_location_id '||p_line_location_id );
3223: asn_debug.put_line('p_distribution_id '||p_distribution_id );
3224: asn_debug.put_line('x_unit_of_measure '||x_unit_of_measure );

Line 3221: asn_debug.put_line('p_shipment_line_id '||p_shipment_line_id);

3217: l_progress := '000';
3218: IF (g_asn_debug = 'Y') THEN
3219: asn_debug.put_line('Enter get_available_asn_quantity ');
3220: asn_debug.put_line('p_transaction_type '||p_transaction_type);
3221: asn_debug.put_line('p_shipment_line_id '||p_shipment_line_id);
3222: asn_debug.put_line('p_line_location_id '||p_line_location_id );
3223: asn_debug.put_line('p_distribution_id '||p_distribution_id );
3224: asn_debug.put_line('x_unit_of_measure '||x_unit_of_measure );
3225: END IF;

Line 3222: asn_debug.put_line('p_line_location_id '||p_line_location_id );

3218: IF (g_asn_debug = 'Y') THEN
3219: asn_debug.put_line('Enter get_available_asn_quantity ');
3220: asn_debug.put_line('p_transaction_type '||p_transaction_type);
3221: asn_debug.put_line('p_shipment_line_id '||p_shipment_line_id);
3222: asn_debug.put_line('p_line_location_id '||p_line_location_id );
3223: asn_debug.put_line('p_distribution_id '||p_distribution_id );
3224: asn_debug.put_line('x_unit_of_measure '||x_unit_of_measure );
3225: END IF;
3226:

Line 3223: asn_debug.put_line('p_distribution_id '||p_distribution_id );

3219: asn_debug.put_line('Enter get_available_asn_quantity ');
3220: asn_debug.put_line('p_transaction_type '||p_transaction_type);
3221: asn_debug.put_line('p_shipment_line_id '||p_shipment_line_id);
3222: asn_debug.put_line('p_line_location_id '||p_line_location_id );
3223: asn_debug.put_line('p_distribution_id '||p_distribution_id );
3224: asn_debug.put_line('x_unit_of_measure '||x_unit_of_measure );
3225: END IF;
3226:
3227: IF (p_transaction_type = 'RECEIVE') then --{

Line 3224: asn_debug.put_line('x_unit_of_measure '||x_unit_of_measure );

3220: asn_debug.put_line('p_transaction_type '||p_transaction_type);
3221: asn_debug.put_line('p_shipment_line_id '||p_shipment_line_id);
3222: asn_debug.put_line('p_line_location_id '||p_line_location_id );
3223: asn_debug.put_line('p_distribution_id '||p_distribution_id );
3224: asn_debug.put_line('x_unit_of_measure '||x_unit_of_measure );
3225: END IF;
3226:
3227: IF (p_transaction_type = 'RECEIVE') then --{
3228:

Line 3243: IF (g_asn_debug = 'Y') THEN

3239: x_tolerable_quantity,
3240: x_unit_of_measure,
3241: X_secondary_available_qty);
3242:
3243: IF (g_asn_debug = 'Y') THEN
3244: asn_debug.put_line('x_available_quantity '||x_available_quantity);
3245: asn_debug.put_line('x_tolerable_quantity '||x_tolerable_quantity);
3246: asn_debug.put_line('x_unit_of_measure '||x_unit_of_measure);
3247: asn_debug.put_line('X_secondary_available_qty '||X_secondary_available_qty);

Line 3244: asn_debug.put_line('x_available_quantity '||x_available_quantity);

3240: x_unit_of_measure,
3241: X_secondary_available_qty);
3242:
3243: IF (g_asn_debug = 'Y') THEN
3244: asn_debug.put_line('x_available_quantity '||x_available_quantity);
3245: asn_debug.put_line('x_tolerable_quantity '||x_tolerable_quantity);
3246: asn_debug.put_line('x_unit_of_measure '||x_unit_of_measure);
3247: asn_debug.put_line('X_secondary_available_qty '||X_secondary_available_qty);
3248: END IF;

Line 3245: asn_debug.put_line('x_tolerable_quantity '||x_tolerable_quantity);

3241: X_secondary_available_qty);
3242:
3243: IF (g_asn_debug = 'Y') THEN
3244: asn_debug.put_line('x_available_quantity '||x_available_quantity);
3245: asn_debug.put_line('x_tolerable_quantity '||x_tolerable_quantity);
3246: asn_debug.put_line('x_unit_of_measure '||x_unit_of_measure);
3247: asn_debug.put_line('X_secondary_available_qty '||X_secondary_available_qty);
3248: END IF;
3249:

Line 3246: asn_debug.put_line('x_unit_of_measure '||x_unit_of_measure);

3242:
3243: IF (g_asn_debug = 'Y') THEN
3244: asn_debug.put_line('x_available_quantity '||x_available_quantity);
3245: asn_debug.put_line('x_tolerable_quantity '||x_tolerable_quantity);
3246: asn_debug.put_line('x_unit_of_measure '||x_unit_of_measure);
3247: asn_debug.put_line('X_secondary_available_qty '||X_secondary_available_qty);
3248: END IF;
3249:
3250: l_progress := '010';

Line 3247: asn_debug.put_line('X_secondary_available_qty '||X_secondary_available_qty);

3243: IF (g_asn_debug = 'Y') THEN
3244: asn_debug.put_line('x_available_quantity '||x_available_quantity);
3245: asn_debug.put_line('x_tolerable_quantity '||x_tolerable_quantity);
3246: asn_debug.put_line('x_unit_of_measure '||x_unit_of_measure);
3247: asn_debug.put_line('X_secondary_available_qty '||X_secondary_available_qty);
3248: END IF;
3249:
3250: l_progress := '010';
3251:

Line 3264: IF (g_asn_debug = 'Y') THEN

3260: l_uom_hold,
3261: x_secondary_available_qty);
3262:
3263:
3264: IF (g_asn_debug = 'Y') THEN
3265: asn_debug.put_line('l_available_qty_hold '||l_available_qty_hold);
3266: asn_debug.put_line('x_tolerable_quantity '||x_tolerable_quantity);
3267: asn_debug.put_line('l_uom_hold '||l_uom_hold);
3268: asn_debug.put_line('X_secondary_available_qty '||X_secondary_available_qty);

Line 3265: asn_debug.put_line('l_available_qty_hold '||l_available_qty_hold);

3261: x_secondary_available_qty);
3262:
3263:
3264: IF (g_asn_debug = 'Y') THEN
3265: asn_debug.put_line('l_available_qty_hold '||l_available_qty_hold);
3266: asn_debug.put_line('x_tolerable_quantity '||x_tolerable_quantity);
3267: asn_debug.put_line('l_uom_hold '||l_uom_hold);
3268: asn_debug.put_line('X_secondary_available_qty '||X_secondary_available_qty);
3269: END IF;

Line 3266: asn_debug.put_line('x_tolerable_quantity '||x_tolerable_quantity);

3262:
3263:
3264: IF (g_asn_debug = 'Y') THEN
3265: asn_debug.put_line('l_available_qty_hold '||l_available_qty_hold);
3266: asn_debug.put_line('x_tolerable_quantity '||x_tolerable_quantity);
3267: asn_debug.put_line('l_uom_hold '||l_uom_hold);
3268: asn_debug.put_line('X_secondary_available_qty '||X_secondary_available_qty);
3269: END IF;
3270:

Line 3267: asn_debug.put_line('l_uom_hold '||l_uom_hold);

3263:
3264: IF (g_asn_debug = 'Y') THEN
3265: asn_debug.put_line('l_available_qty_hold '||l_available_qty_hold);
3266: asn_debug.put_line('x_tolerable_quantity '||x_tolerable_quantity);
3267: asn_debug.put_line('l_uom_hold '||l_uom_hold);
3268: asn_debug.put_line('X_secondary_available_qty '||X_secondary_available_qty);
3269: END IF;
3270:
3271: l_progress := '020';

Line 3268: asn_debug.put_line('X_secondary_available_qty '||X_secondary_available_qty);

3264: IF (g_asn_debug = 'Y') THEN
3265: asn_debug.put_line('l_available_qty_hold '||l_available_qty_hold);
3266: asn_debug.put_line('x_tolerable_quantity '||x_tolerable_quantity);
3267: asn_debug.put_line('l_uom_hold '||l_uom_hold);
3268: asn_debug.put_line('X_secondary_available_qty '||X_secondary_available_qty);
3269: END IF;
3270:
3271: l_progress := '020';
3272:

Line 3280: IF (g_asn_debug = 'Y') THEN

3276: where
3277: line_location_id = p_line_location_id;
3278:
3279:
3280: IF (g_asn_debug = 'Y') THEN
3281: asn_debug.put_line('l_quantity_shipped '||l_quantity_shipped);
3282: END IF;
3283:
3284: l_progress := '030';

Line 3281: asn_debug.put_line('l_quantity_shipped '||l_quantity_shipped);

3277: line_location_id = p_line_location_id;
3278:
3279:
3280: IF (g_asn_debug = 'Y') THEN
3281: asn_debug.put_line('l_quantity_shipped '||l_quantity_shipped);
3282: END IF;
3283:
3284: l_progress := '030';
3285:

Line 3292: IF (g_asn_debug = 'Y') THEN

3288: (p_shipment_line_id,
3289: p_line_location_id,
3290: l_ship_qty_int);
3291:
3292: IF (g_asn_debug = 'Y') THEN
3293: asn_debug.put_line('l_ship_qty_int '||l_ship_qty_int);
3294: END IF;
3295:
3296:

Line 3293: asn_debug.put_line('l_ship_qty_int '||l_ship_qty_int);

3289: p_line_location_id,
3290: l_ship_qty_int);
3291:
3292: IF (g_asn_debug = 'Y') THEN
3293: asn_debug.put_line('l_ship_qty_int '||l_ship_qty_int);
3294: END IF;
3295:
3296:
3297: x_tolerable_quantity := x_tolerable_quantity - l_quantity_shipped +

Line 3301: IF (g_asn_debug = 'Y') THEN

3297: x_tolerable_quantity := x_tolerable_quantity - l_quantity_shipped +
3298: x_available_quantity + l_ship_qty_int ;
3299:
3300:
3301: IF (g_asn_debug = 'Y') THEN
3302: asn_debug.put_line('x_tolerable_quantity '||x_tolerable_quantity );
3303: END IF;
3304:
3305: IF x_tolerable_quantity < 0 THEN

Line 3302: asn_debug.put_line('x_tolerable_quantity '||x_tolerable_quantity );

3298: x_available_quantity + l_ship_qty_int ;
3299:
3300:
3301: IF (g_asn_debug = 'Y') THEN
3302: asn_debug.put_line('x_tolerable_quantity '||x_tolerable_quantity );
3303: END IF;
3304:
3305: IF x_tolerable_quantity < 0 THEN
3306: x_tolerable_quantity := 0;

Line 3322: IF (g_asn_debug = 'Y') THEN

3318: where shipment_line_id = p_shipment_line_id and
3319: transaction_type = 'RETURN TO VENDOR';
3320:
3321:
3322: IF (g_asn_debug = 'Y') THEN
3323: asn_debug.put_line('l_quantity_returned '||l_quantity_returned );
3324: END IF;
3325:
3326: IF l_quantity_returned > 0 then --}

Line 3323: asn_debug.put_line('l_quantity_returned '||l_quantity_returned );

3319: transaction_type = 'RETURN TO VENDOR';
3320:
3321:
3322: IF (g_asn_debug = 'Y') THEN
3323: asn_debug.put_line('l_quantity_returned '||l_quantity_returned );
3324: END IF;
3325:
3326: IF l_quantity_returned > 0 then --}
3327:

Line 3340: IF (g_asn_debug = 'Y') THEN

3336: x_tolerable_quantity := 0;
3337: end if;
3338:
3339:
3340: IF (g_asn_debug = 'Y') THEN
3341: asn_debug.put_line('x_available_quantity '||x_available_quantity );
3342: asn_debug.put_line('x_tolerable_quantity '||x_tolerable_quantity );
3343: END IF;
3344:

Line 3341: asn_debug.put_line('x_available_quantity '||x_available_quantity );

3337: end if;
3338:
3339:
3340: IF (g_asn_debug = 'Y') THEN
3341: asn_debug.put_line('x_available_quantity '||x_available_quantity );
3342: asn_debug.put_line('x_tolerable_quantity '||x_tolerable_quantity );
3343: END IF;
3344:
3345: END IF; --}

Line 3342: asn_debug.put_line('x_tolerable_quantity '||x_tolerable_quantity );

3338:
3339:
3340: IF (g_asn_debug = 'Y') THEN
3341: asn_debug.put_line('x_available_quantity '||x_available_quantity );
3342: asn_debug.put_line('x_tolerable_quantity '||x_tolerable_quantity );
3343: END IF;
3344:
3345: END IF; --}
3346:

Line 3350: IF (g_asn_debug = 'Y') THEN

3346:
3347: elsif(p_transaction_type = 'DIRECT RECEIPT') then
3348:
3349:
3350: IF (g_asn_debug = 'Y') THEN
3351: asn_debug.put_line('In direct receipt of ASN ');
3352: END IF;
3353:
3354: BEGIN

Line 3351: asn_debug.put_line('In direct receipt of ASN ');

3347: elsif(p_transaction_type = 'DIRECT RECEIPT') then
3348:
3349:
3350: IF (g_asn_debug = 'Y') THEN
3351: asn_debug.put_line('In direct receipt of ASN ');
3352: END IF;
3353:
3354: BEGIN
3355:

Line 3377: IF (g_asn_debug = 'Y') THEN

3373: WHEN OTHERS THEN RAISE;
3374:
3375: END;
3376:
3377: IF (g_asn_debug = 'Y') THEN
3378: asn_debug.put_line('x_available_quantity '||x_available_quantity);
3379: END IF;
3380:
3381:

Line 3378: asn_debug.put_line('x_available_quantity '||x_available_quantity);

3374:
3375: END;
3376:
3377: IF (g_asn_debug = 'Y') THEN
3378: asn_debug.put_line('x_available_quantity '||x_available_quantity);
3379: END IF;
3380:
3381:
3382: l_progress := '050';

Line 3397: IF (g_asn_debug = 'Y') THEN

3393: AND po_line_location_id = p_line_location_id
3394: AND po_distribution_id = p_distribution_id;
3395:
3396:
3397: IF (g_asn_debug = 'Y') THEN
3398: asn_debug.put_line('l_interface_quantity '||l_interface_quantity);
3399: asn_debug.put_line('l_primary_uom '||l_primary_uom);
3400: END IF;
3401:

Line 3398: asn_debug.put_line('l_interface_quantity '||l_interface_quantity);

3394: AND po_distribution_id = p_distribution_id;
3395:
3396:
3397: IF (g_asn_debug = 'Y') THEN
3398: asn_debug.put_line('l_interface_quantity '||l_interface_quantity);
3399: asn_debug.put_line('l_primary_uom '||l_primary_uom);
3400: END IF;
3401:
3402: IF (l_interface_quantity = 0) THEN

Line 3399: asn_debug.put_line('l_primary_uom '||l_primary_uom);

3395:
3396:
3397: IF (g_asn_debug = 'Y') THEN
3398: asn_debug.put_line('l_interface_quantity '||l_interface_quantity);
3399: asn_debug.put_line('l_primary_uom '||l_primary_uom);
3400: END IF;
3401:
3402: IF (l_interface_quantity = 0) THEN
3403:

Line 3423: IF (g_asn_debug = 'Y') THEN

3419:
3420: END IF;
3421:
3422:
3423: IF (g_asn_debug = 'Y') THEN
3424: asn_debug.put_line('l_interface_qty_in_trx_uom '||l_interface_qty_in_trx_uom);
3425: END IF;
3426:
3427: x_available_quantity := x_available_quantity -

Line 3424: asn_debug.put_line('l_interface_qty_in_trx_uom '||l_interface_qty_in_trx_uom);

3420: END IF;
3421:
3422:
3423: IF (g_asn_debug = 'Y') THEN
3424: asn_debug.put_line('l_interface_qty_in_trx_uom '||l_interface_qty_in_trx_uom);
3425: END IF;
3426:
3427: x_available_quantity := x_available_quantity -
3428: l_interface_qty_in_trx_uom;

Line 3436: IF (g_asn_debug = 'Y') THEN

3432: x_available_quantity := 0;
3433:
3434: END IF;
3435:
3436: IF (g_asn_debug = 'Y') THEN
3437: asn_debug.put_line('x_available_quantity '||x_available_quantity);
3438: END IF;
3439:
3440:

Line 3437: asn_debug.put_line('x_available_quantity '||x_available_quantity);

3433:
3434: END IF;
3435:
3436: IF (g_asn_debug = 'Y') THEN
3437: asn_debug.put_line('x_available_quantity '||x_available_quantity);
3438: END IF;
3439:
3440:
3441:

Line 3460: IF (g_asn_debug = 'Y') THEN

3456: and pod.po_distribution_id = p_distribution_id
3457: and pod.po_line_id = pol.po_line_id;
3458:
3459:
3460: IF (g_asn_debug = 'Y') THEN
3461: asn_debug.put_line('l_qty_rcv_tolerance '||l_qty_rcv_tolerance);
3462: asn_debug.put_line('l_qty_ordered '||l_qty_ordered);
3463: asn_debug.put_line('l_qty_received '||l_qty_received);
3464: asn_debug.put_line('l_qty_cancelled '||l_qty_cancelled);

Line 3461: asn_debug.put_line('l_qty_rcv_tolerance '||l_qty_rcv_tolerance);

3457: and pod.po_line_id = pol.po_line_id;
3458:
3459:
3460: IF (g_asn_debug = 'Y') THEN
3461: asn_debug.put_line('l_qty_rcv_tolerance '||l_qty_rcv_tolerance);
3462: asn_debug.put_line('l_qty_ordered '||l_qty_ordered);
3463: asn_debug.put_line('l_qty_received '||l_qty_received);
3464: asn_debug.put_line('l_qty_cancelled '||l_qty_cancelled);
3465: END IF;

Line 3462: asn_debug.put_line('l_qty_ordered '||l_qty_ordered);

3458:
3459:
3460: IF (g_asn_debug = 'Y') THEN
3461: asn_debug.put_line('l_qty_rcv_tolerance '||l_qty_rcv_tolerance);
3462: asn_debug.put_line('l_qty_ordered '||l_qty_ordered);
3463: asn_debug.put_line('l_qty_received '||l_qty_received);
3464: asn_debug.put_line('l_qty_cancelled '||l_qty_cancelled);
3465: END IF;
3466:

Line 3463: asn_debug.put_line('l_qty_received '||l_qty_received);

3459:
3460: IF (g_asn_debug = 'Y') THEN
3461: asn_debug.put_line('l_qty_rcv_tolerance '||l_qty_rcv_tolerance);
3462: asn_debug.put_line('l_qty_ordered '||l_qty_ordered);
3463: asn_debug.put_line('l_qty_received '||l_qty_received);
3464: asn_debug.put_line('l_qty_cancelled '||l_qty_cancelled);
3465: END IF;
3466:
3467: x_tolerable_quantity := (l_qty_ordered * l_qty_rcv_tolerance)-

Line 3464: asn_debug.put_line('l_qty_cancelled '||l_qty_cancelled);

3460: IF (g_asn_debug = 'Y') THEN
3461: asn_debug.put_line('l_qty_rcv_tolerance '||l_qty_rcv_tolerance);
3462: asn_debug.put_line('l_qty_ordered '||l_qty_ordered);
3463: asn_debug.put_line('l_qty_received '||l_qty_received);
3464: asn_debug.put_line('l_qty_cancelled '||l_qty_cancelled);
3465: END IF;
3466:
3467: x_tolerable_quantity := (l_qty_ordered * l_qty_rcv_tolerance)-
3468: l_qty_received - l_qty_cancelled -

Line 3478: IF (g_asn_debug = 'Y') THEN

3474:
3475: END IF;
3476:
3477:
3478: IF (g_asn_debug = 'Y') THEN
3479: asn_debug.put_line('x_tolerable_quantity '||x_tolerable_quantity);
3480: END IF;
3481:
3482:

Line 3479: asn_debug.put_line('x_tolerable_quantity '||x_tolerable_quantity);

3475: END IF;
3476:
3477:
3478: IF (g_asn_debug = 'Y') THEN
3479: asn_debug.put_line('x_tolerable_quantity '||x_tolerable_quantity);
3480: END IF;
3481:
3482:
3483:

Line 3486: IF (g_asn_debug = 'Y') THEN

3482:
3483:
3484: end if; --}
3485:
3486: IF (g_asn_debug = 'Y') THEN
3487: asn_debug.put_line('Leave get_available_asn_qty ');
3488: END IF;
3489:
3490: EXCEPTION

Line 3487: asn_debug.put_line('Leave get_available_asn_qty ');

3483:
3484: end if; --}
3485:
3486: IF (g_asn_debug = 'Y') THEN
3487: asn_debug.put_line('Leave get_available_asn_qty ');
3488: END IF;
3489:
3490: EXCEPTION
3491: WHEN OTHERS THEN