DBA Data[Home] [Help]

APPS.RCV_SHIPMENT_LINES_PKG dependencies on MTL_SUPPLY

Line 298: MTL_SUPPLY

294: TO_ORGANIZATION_ID,
295: TO_CHAR(RECEIPT_DATE,'DDMMYYYY'),
296: ROWID
297: FROM
298: MTL_SUPPLY
299: WHERE CHANGE_FLAG = 'Y';
300:
301: /* Bug 8899316 */
302:

Line 306: FROM MTL_SUPPLY

302:
303: cursor supply_dist_info(p_po_line_location_id NUMBER, p_shipment_line_id NUMBER) IS
304: SELECT quantity,
305: po_distribution_id
306: FROM MTL_SUPPLY
307: WHERE supply_type_code = 'SHIPMENT'
308: AND po_line_location_id = p_po_line_location_id
309: AND shipment_line_id = p_shipment_line_id;
310:

Line 404: /* Bug 8899316: Commenting this code as mtl_supply logic is incorrect */

400: debug_log(FND_LOG.LEVEL_STATEMENT,l_api_name,
401: 'p_shipment_line_id '||p_shipment_line_id );
402: end if;
403:
404: /* Bug 8899316: Commenting this code as mtl_supply logic is incorrect */
405:
406: /*
407: select po_distribution_id
408: into l_distribution_id

Line 409: from mtl_supply

405:
406: /*
407: select po_distribution_id
408: into l_distribution_id
409: from mtl_supply
410: where supply_type_code = 'SHIPMENT'
411: and po_line_location_id = l_line_location_id
412: and shipment_line_id = p_shipment_line_id;
413:

Line 419: update mtl_supply

415: debug_log(FND_LOG.LEVEL_STATEMENT,l_api_name,
416: 'l_distribution_id '||l_distribution_id );
417: end if;
418:
419: update mtl_supply
420: set quantity = quantity + l_qty_shipped,
421: change_flag = 'Y'
422: where supply_type_code = 'SHIPMENT'
423: and po_line_location_id = l_line_location_id

Line 431: update mtl_supply

427: debug_log(FND_LOG.LEVEL_STATEMENT,l_api_name,
428: 'After update to shipment supply' );
429: end if;
430:
431: update mtl_supply
432: set quantity = quantity + l_qty_shipped,
433: change_flag = 'Y'
434: where supply_type_code = 'PO'
435: and po_distribution_id = l_distribution_id;

Line 445: /* Bug 8899316: Logic for updating mtl_supply */

441: end if;
442:
443: */
444:
445: /* Bug 8899316: Logic for updating mtl_supply */
446:
447: /* Update last distribution in case of over receipt across the pay item */
448:
449: select Sum(quantity), Max(po_distribution_id)

Line 451: from mtl_supply

447: /* Update last distribution in case of over receipt across the pay item */
448:
449: select Sum(quantity), Max(po_distribution_id)
450: into l_sum_qty, l_distribution_id
451: from mtl_supply
452: where supply_type_code = 'SHIPMENT'
453: and po_line_location_id = l_line_location_id
454: and shipment_line_id = p_shipment_line_id;
455:

Line 458: update mtl_supply

454: and shipment_line_id = p_shipment_line_id;
455:
456: IF (p_quantity_shipped > l_sum_qty) THEN
457:
458: update mtl_supply
459: set quantity = quantity + (p_quantity_shipped - l_sum_qty),
460: change_flag = 'Y'
461: where supply_type_code = 'SHIPMENT'
462: and po_distribution_id = l_distribution_id

Line 478: mtl_supply for distribution */

474:
475: l_remaining_qty := l_wc_qty - dist_info.quantity ;
476:
477: /* If quantity on Work Confirmation is greater than the distribution quantity, do not update
478: mtl_supply for distribution */
479:
480: IF ( l_remaining_qty > 0) THEN
481: l_wc_qty := l_remaining_qty;
482:

Line 490: UPDATE mtl_supply

486:
487: /* If quantity on Work Confirmation is less than the distribution quantity, delete 'SHIPMENT' supply
488: for the distribution and re-create 'PO' supply. Re-create PO supply for all subsequent distributions */
489:
490: UPDATE mtl_supply
491: SET quantity = (quantity + l_remaining_qty),
492: change_flag = 'Y'
493: where supply_type_code = 'SHIPMENT'
494: and po_distribution_id = l_distribution_id;

Line 496: insert into mtl_supply

492: change_flag = 'Y'
493: where supply_type_code = 'SHIPMENT'
494: and po_distribution_id = l_distribution_id;
495:
496: insert into mtl_supply
497: (supply_type_code,
498: supply_source_id,
499: last_updated_by,
500: last_update_date,

Line 557: from mtl_supply ms1

553: and nvl(pll.approved_flag, 'Y') = 'Y'
554: and pll.quantity is not NULL
555: and not exists
556: (select 'Supply Exists'
557: from mtl_supply ms1
558: where ms1.supply_type_code = 'PO'
559: and ms1.supply_source_id = pd.po_distribution_id);
560:
561: END IF; --End IF ( l_remaining_qty > 0)

Line 601: delete from mtl_supply

597: debug_log(FND_LOG.LEVEL_STATEMENT,l_api_name,
598: 'Before Delete' );
599: end if;
600:
601: delete from mtl_supply
602: where rowid = l_supply_rowid;
603: IF (g_asn_debug = 'Y') THEN
604: debug_log(FND_LOG.LEVEL_STATEMENT,l_api_name,
605: 'After Delete' );

Line 645: 'Before update to mtl_supply.quantity' );

641: );
642:
643: IF (g_asn_debug = 'Y') THEN
644: debug_log(FND_LOG.LEVEL_STATEMENT,l_api_name,
645: 'Before update to mtl_supply.quantity' );
646: end if;
647: UPDATE MTL_SUPPLY
648: SET TO_ORG_PRIMARY_QUANTITY = l_primary_qty,
649: TO_ORG_PRIMARY_UOM = l_primary_uom,

Line 647: UPDATE MTL_SUPPLY

643: IF (g_asn_debug = 'Y') THEN
644: debug_log(FND_LOG.LEVEL_STATEMENT,l_api_name,
645: 'Before update to mtl_supply.quantity' );
646: end if;
647: UPDATE MTL_SUPPLY
648: SET TO_ORG_PRIMARY_QUANTITY = l_primary_qty,
649: TO_ORG_PRIMARY_UOM = l_primary_uom,
650: CHANGE_FLAG = NULL,
651: CHANGE_TYPE = null,

Line 661: 'After update to mtl_supply.quantity' );

657: WHERE ROWID = l_supply_rowid;
658:
659: IF (g_asn_debug = 'Y') THEN
660: debug_log(FND_LOG.LEVEL_STATEMENT,l_api_name,
661: 'After update to mtl_supply.quantity' );
662: end if;
663:
664:
665: end loop;