112:
113: l_temp_requested_quantity NUMBER;
114: l_temp_requested_quantity2 NUMBER; -- INVCONV
115:
116: -- HW addeded variables for DUAL (OPM)
117: -- l_OPM_requested_quantity NUMBER; INVCONV
118: l_ordered_quantity2 NUMBER;
119: l_split_line_tbl OE_ORDER_PUB.Line_Tbl_Type;
120: l_line_set_id NUMBER;
146: AND NVL ( WDD.OE_INTERFACED_FLAG , 'N' ) <> 'Y';
147:
148: LOT LOT_INFO%ROWTYPE;
149:
150: l_temp_dual_shipped_qty NUMBER; -- INVCONV
151:
152: -- HW OPM end of changes for 2415731
153: --bug3480047 start
154: l_shippable_lines NUMBER;
182: FOR J IN 1..p_req_qty_tbl.count
183:
184: LOOP
185: -- HW Retrieve ship_from_org_id,inventory_item_id and ordered_quantity2
186: -- to determine if the line is dual
187: SELECT ordered_quantity,
188: order_quantity_uom,
189: inventory_item_id,
190: top_model_line_id,
445: FOR J IN 1..p_line_adj_tbl.COUNT
446: LOOP
447: SELECT OE_PRICE_ADJUSTMENTS_S.nextval
448: INTO l_price_adjustment_id
449: FROM DUAL;
450:
451: l_line_adj_rec := p_line_adj_tbl(J);
452: l_Line_adj_rec.price_adjustment_id := l_price_adjustment_id;
453: l_Line_adj_rec.last_update_date := SYSDATE;
604: IF p_line_tbl(J).shipping_quantity_uom <> l_order_quantity_uom THEN
605:
606: /* --OPM 06/SEP/00 invoke process Uom Conversion for process line
607: --============================================================ */
608: -- Invoke lot Uom Conversion possibly if for DUAL line INVCONV
609:
610: IF oe_line_util.dual_uom_control
611: (l_inventory_item_id
612: ,l_ship_from_org_id
606: /* --OPM 06/SEP/00 invoke process Uom Conversion for process line
607: --============================================================ */
608: -- Invoke lot Uom Conversion possibly if for DUAL line INVCONV
609:
610: IF oe_line_util.dual_uom_control
611: (l_inventory_item_id
612: ,l_ship_from_org_id
613: ,l_item_rec) THEN
614:
612: ,l_ship_from_org_id
613: ,l_item_rec) THEN
614:
615: IF l_debug_level > 0 THEN
616: oe_debug_pub.add( 'DUAL ITEM - SHIPPING UPDATE ' , 1 ) ;
617: END IF;
618:
619: -- HW OPM BUG#:2415731 Since OM does not save lot and sublot information and shipping does,
620: -- we need to retrieve the information from wsh_delivery_details
618:
619: -- HW OPM BUG#:2415731 Since OM does not save lot and sublot information and shipping does,
620: -- we need to retrieve the information from wsh_delivery_details
621:
622: l_temp_dual_shipped_qty := 0;
623:
624: -- Fetch lot information from shipping table
625:
626: OPEN LOT_INFO(p_line_tbl(J).line_id);
702: ,NULL -- To uom name
703: );
704:
705: -- BUG 2415731, sum the shipped_qty -- INVCONV
706: l_temp_dual_shipped_qty := l_temp_dual_shipped_qty + l_temp_shipped_quantity; -- INVCONV
707:
708: IF l_debug_level > 0 THEN
709: oe_debug_pub.add( 'OPM , VALUE OF TEMP_DUAL_SHIPPED_QTY IS '||L_TEMP_DUAL_SHIPPED_QTY , 1 ) ; -- INVCONV
710: END IF;
705: -- BUG 2415731, sum the shipped_qty -- INVCONV
706: l_temp_dual_shipped_qty := l_temp_dual_shipped_qty + l_temp_shipped_quantity; -- INVCONV
707:
708: IF l_debug_level > 0 THEN
709: oe_debug_pub.add( 'OPM , VALUE OF TEMP_DUAL_SHIPPED_QTY IS '||L_TEMP_DUAL_SHIPPED_QTY , 1 ) ; -- INVCONV
710: END IF;
711:
712: -- HW BUG#:2415731 Fetch the next record and close the cursor
713: FETCH LOT_INFO into LOT;
714: END LOOP;
715: << loop_end>>
716: CLOSE LOT_INFO;
717:
718: l_temp_shipped_quantity := l_temp_dual_shipped_qty; --INVCONV
719: -- HW end of changes for bug 2415731
720:
721: IF l_debug_level > 0 THEN
722: oe_debug_pub.add( 'DUAL PROCESS SHIPPING UPDATE CONVERSION' || ' GIVES SHIPPED QUANTITY OF ' ||
718: l_temp_shipped_quantity := l_temp_dual_shipped_qty; --INVCONV
719: -- HW end of changes for bug 2415731
720:
721: IF l_debug_level > 0 THEN
722: oe_debug_pub.add( 'DUAL PROCESS SHIPPING UPDATE CONVERSION' || ' GIVES SHIPPED QUANTITY OF ' ||
723: L_TEMP_SHIPPED_QUANTITY , 1 ) ;
724: END IF;
725:
726: ELSE
735: );
736: IF l_debug_level > 0 THEN
737: oe_debug_pub.add( 'CONVERTED SHIPPED QUANTITY : '|| TO_CHAR ( L_TEMP_SHIPPED_QUANTITY ) , 1 ) ;
738: END IF;
739: END IF; --IF oe_line_util.dual_uom_control -- INVCONV
740:
741: --OPM 06/SEP/00 END
742:
743:
862: IF l_make_remnant <> 'Y' THEN -- bug 4701487
863: l_count := 0;
864: BEGIN
865: SELECT 1 INTO l_count
866: FROM DUAL
867: WHERE EXISTS (
868: SELECT NULL
869: FROM oe_order_lines
870: WHERE top_model_line_id = l_top_model_line_id
1547: PROCEDURE Validate_Quantity
1548: ( p_ship_line_rec IN OUT NOCOPY Ship_Line_Rec_Type
1549: ,p_handle_req_qty IN VARCHAR2 := 'N'
1550: ,p_index IN NUMBER )
1551: --,x_dual_item OUT NOCOPY VARCHAR2) INVCONV
1552: IS
1553: l_item_rec OE_ORDER_CACHE.item_rec_type;
1554: l_return_status VARCHAR2(1);
1555: l_primary_quantity NUMBER;
1594: ELSE
1595: l_primary_quantity := p_ship_line_rec.shipping_quantity(p_index);
1596: END IF;
1597:
1598: /* IF OE_Line_Util.dual_uom_control -- INVCONV RENAME PROCess_Characteristics INVCONV NO LONGER NEEDED
1599: (p_inventory_item_id => p_ship_line_rec.inventory_item_id(p_index)
1600: ,p_ship_from_org_id => p_ship_line_rec.ship_from_org_id(p_index)
1601: ,x_item_rec => l_item_rec) THEN
1602:
1600: ,p_ship_from_org_id => p_ship_line_rec.ship_from_org_id(p_index)
1601: ,x_item_rec => l_item_rec) THEN
1602:
1603: IF l_debug_level > 0 THEN
1604: oe_debug_pub.add( 'DUAL PROCESS SHIPPING UPDATE ', 5); -- INVCONV
1605: END IF;
1606:
1607: x_dual_item := 'Y'; -- INVCONV
1608:
1603: IF l_debug_level > 0 THEN
1604: oe_debug_pub.add( 'DUAL PROCESS SHIPPING UPDATE ', 5); -- INVCONV
1605: END IF;
1606:
1607: x_dual_item := 'Y'; -- INVCONV
1608:
1609: p_ship_line_rec.shipped_quantity(p_index) :=
1610: GMI_Reservation_Util.get_opm_converted_qty
1611: (p_apps_item_id => p_ship_line_rec.inventory_item_id(p_index),
1791: Validate_Quantity
1792: ( p_ship_line_rec => p_requested_line_rec
1793: ,p_handle_req_qty => 'Y'
1794: ,p_index => I );
1795: -- ,x_dual_item => l_return_status); -- INVCONV
1796:
1797: l_split_line_Rec := OE_ORDER_PUB.G_MISS_LINE_REC;
1798:
1799: --J := J + 1; bug 4422886
2155:
2156:
2157: IF l_debug_level > 0 THEN
2158: oe_debug_pub.add
2159: ('DUAL 3RD CONVERSION 1 '||l_line_tbl(1).ORDERED_QUANTITY2,1);
2160: END IF;
2161:
2162: ELSE -- order uom = order uom 2
2163:
2805: IF l_make_remnant <> 'Y' THEN -- bug 4701487
2806: l_count := 0;
2807: BEGIN
2808: SELECT 1 INTO l_count
2809: FROM DUAL
2810: WHERE EXISTS (
2811: SELECT NULL
2812: FROM oe_order_lines
2813: WHERE top_model_line_id = p_top_model_line_id
3963:
3964: Validate_Quantity
3965: ( p_ship_line_rec => p_ship_line_rec
3966: ,p_index => I );
3967: -- ,x_dual_item => l_varchar1); -- INVCONV
3968:
3969: /* IF l_debug_level > 0 THEN INVCONV WHOLE IF l_varchar1 = 'Y' THEN NOT USED.
3970: Oe_Debug_pub.Add('after Validate_Quantity '|| l_varchar1, 3);
3971: END IF;