[Home] [Help]
568: /* Convert order quantity into item's uom quantity */
569: /* If order UM differs from inventory UM, conversion is required.*/
570: /* The allocations are recorded as transactions written in the inventory UM */
571: /* ============================================================================== */
572: GMI_reservation_Util.PrintLn('(opm_dbg) in Util Create_default_lot. before call GMICUOM order_um1='
573: ||p_allocation_rec.order_um1||', item_um='||p_ic_item_mst_rec.item_um||'.' );
574: IF (p_allocation_rec.order_um1 <> p_ic_item_mst_rec.item_um)
575: THEN
576: GMICUOM.icuomcv(pitem_id => p_ic_item_mst_rec.item_id,
572: GMI_reservation_Util.PrintLn('(opm_dbg) in Util Create_default_lot. before call GMICUOM order_um1='
573: ||p_allocation_rec.order_um1||', item_um='||p_ic_item_mst_rec.item_um||'.' );
574: IF (p_allocation_rec.order_um1 <> p_ic_item_mst_rec.item_um)
575: THEN
576: GMICUOM.icuomcv(pitem_id => p_ic_item_mst_rec.item_id,
577: plot_id => 0,
578: pcur_qty => p_allocation_rec.order_qty1,
579: pcur_uom => p_allocation_rec.order_um1,
580: pnew_uom => p_ic_item_mst_rec.item_um,
601: THEN
602: GMI_reservation_Util.PrintLn('(opm_dbg) in Util Create_default_lot. Need to populate qty2/um2.');
603: l_ictran_rec.trans_um2 := p_ic_item_mst_rec.item_um2;
604:
605: GMICUOM.icuomcv(pitem_id => p_ic_item_mst_rec.item_id,
606: plot_id => 0,
607: pcur_qty => l_ictran_rec.trans_qty,
608: pcur_uom => l_ictran_rec.trans_um,
609: pnew_uom => l_ictran_rec.trans_um2,
934:
935: IF (x_allocation_rec.order_um1 <> x_ic_item_mst_rec.item_um
936: AND (x_ic_item_mst_rec.alloc_class = ' ' OR x_ic_item_mst_rec.alloc_class IS NULL))
937: THEN
938: GMICUOM.icuomcv(pitem_id => x_ic_item_mst_rec.item_id,
939: plot_id => 0,
940: pcur_qty => p_mtl_rsv_rec.reservation_quantity,
941: pcur_uom => x_allocation_rec.order_um1,
942: pnew_uom => x_ic_item_mst_rec.item_um,
953: IF x_ic_item_mst_rec.dualum_ind > 0
954: THEN
955: x_allocation_rec.order_um2 := x_ic_item_mst_rec.item_um2;
956:
957: GMICUOM.icuomcv(pitem_id => x_ic_item_mst_rec.item_id,
958: plot_id => 0,
959: pcur_qty => x_allocation_rec.order_qty1,
960: pcur_uom => x_allocation_rec.order_um1,
961: pnew_uom => x_allocation_rec.order_um2,
3245:
3246: -- Bug 3829535 added IF condition
3247: IF (l_order_uom <> l_trans_um) THEN
3248: GMI_reservation_Util.PrintLn('(opm_dbg)converting order qty: '||l_line_rec.ordered_quantity||' to item uom '||l_trans_um);
3249: GMICUOM.icuomcv
3250: (
3251: pitem_id => l_opm_item_id
3252: , plot_id => 0
3253: , pcur_qty => l_line_rec.ordered_quantity
4072: , x_msg_count => x_msg_count
4073: , x_msg_data => x_msg_data);
4074:
4075: IF l_ictran_rec.trans_um <> l_uom THEN
4076: GMICUOM.icuomcv(pitem_id => l_ictran_rec.item_id ,
4077: plot_id => l_ictran_rec.lot_id,
4078: pcur_qty => p_qty1,
4079: pcur_uom => l_uom,
4080: pnew_uom => l_ictran_rec.trans_um,
4446: RAISE FND_API.G_EXC_ERROR;
4447: END IF;
4448: GMI_reservation_Util.PrintLn('to uom (OPM) '||l_opm_to_uom);
4449:
4450: GMICUOM.icuomcv(
4451: pitem_id =>l_ic_item_mst_rec.item_id,
4452: plot_id =>p_lot_id,
4453: pcur_qty =>p_original_qty,
4454: pcur_uom =>l_opm_from_uom,
4455: pnew_uom =>l_opm_to_uom,
4456: onew_qty =>l_converted_qty);
4457: IF l_converted_qty < 0 THEN
4458: GMI_reservation_Util.PrintLn('conversion error code'|| l_converted_qty);
4459: FND_MESSAGE.Set_Name('GMI','GMICUOM.icuomcv');
4460: FND_MESSAGE.Set_Token('CONVERSION_ERROR', p_apps_to_uom);
4461: FND_MSG_PUB.Add;
4462: RAISE FND_API.G_EXC_ERROR;
4463: END IF;