DBA Data[Home] [Help]

APPS.OE_SHIP_CONFIRMATION_PUB SQL Statements

The following lines contain the word 'select', 'insert', 'update' or 'delete':

Line: 137

     SELECT WDD.LOT_NUMBER,
       --     WDD.SUBLOT_NUMBER,	 INVCONV
            WDD.SHIPPED_QUANTITY

     FROM   WSH_DELIVERY_DETAILS WDD

     WHERE  WDD.SOURCE_LINE_ID = p_line_Id
     AND    WDD.RELEASED_STATUS ='C'
     AND    WDD.SOURCE_CODE='OE'
     AND    NVL ( WDD.OE_INTERFACED_FLAG , 'N' )  <> 'Y';
Line: 187

            SELECT  ordered_quantity,
                    order_quantity_uom,
                    inventory_item_id,
                    top_model_line_id,
                    ato_line_id,
                    item_type_code,
                    line_set_id,
                    ship_from_org_id,
                    ordered_quantity2
            INTO    l_ordered_quantity,
                    l_order_quantity_uom,
                    l_inventory_item_id,
                    l_top_model_line_id,
                    l_ato_line_id,
                    l_item_type_code,
                    l_line_set_id,
                    l_ship_from_org_id,
                    l_ordered_quantity2
            FROM    OE_ORDER_LINES
            WHERE   line_id = p_req_qty_tbl(J).line_id;
Line: 246

                          oe_debug_pub.add(  'OPM PROCESS SHIPPING UPDATE ' , 1 ) ;
Line: 339

            l_split_line_tbl(1).operation := OE_GLOBALS.G_OPR_UPDATE;
Line: 447

            SELECT OE_PRICE_ADJUSTMENTS_S.nextval
            INTO l_price_adjustment_id
            FROM DUAL;
Line: 453

            l_Line_adj_rec.last_update_date := SYSDATE;
Line: 454

            l_Line_adj_rec.last_updated_by := FND_GLOBAL.USER_ID;
Line: 455

            l_Line_adj_rec.last_update_login := FND_GLOBAL.LOGIN_ID;
Line: 464

                oe_debug_pub.add(  'INSERTING THE ADJ RECORD '||TO_CHAR ( L_LINE_ADJ_REC.PRICE_ADJUSTMENT_ID ) , 2 ) ;
Line: 466

            OE_LINE_ADJ_UTIL.INSERT_ROW(p_Line_Adj_rec => l_line_adj_rec);
Line: 475

	-- Update Line records for required attributes..

        FOR J IN 1..p_line_tbl.COUNT
        LOOP

            SELECT top_model_line_id
            INTO   l_top_model_line_id
            FROM   oe_order_lines
            WHERE  line_id = p_line_tbl(J).line_id;
Line: 499

                SELECT top_model_line_id
                INTO   l_top_model_line_id
                FROM   oe_order_lines
                WHERE  line_id = l_top_model_line_id
                FOR UPDATE NOWAIT;
Line: 511

            SELECT  shipping_quantity,
                    shipping_quantity_uom,
                    order_quantity_uom,
                    actual_shipment_date,
                    inventory_item_id,
                    ship_from_org_id,
                    ship_set_id,
                    top_model_line_id,
                    ato_line_id,
                    model_remnant_flag,
                    ordered_quantity,
                    ship_tolerance_below,
                    over_ship_reason_code,
                    item_type_code,
                    header_id,
                    calculate_price_flag,
                    ship_model_complete_flag
            INTO    l_shipping_quantity,
                    l_shipping_quantity_uom,
                    l_order_quantity_uom,
                    l_actual_shipment_date,
                    l_inventory_item_id,
                    l_ship_from_org_id,
                    l_ship_set_id,
                    l_top_model_line_id,
                    l_ato_line_id,
                    l_model_remnant_flag,
                    l_ordered_quantity,
                    l_ship_tolerance_below,
                    l_over_ship_reason_code,
                    l_item_type_code,
                    l_header_id,
                    l_calculate_price_flag,
                    l_smc_flag
            FROM OE_ORDER_LINES
            WHERE line_id = p_line_tbl(J).line_id
            FOR UPDATE NOWAIT;
Line: 616

                          oe_debug_pub.add(  'DUAL ITEM  - SHIPPING UPDATE ' , 1 ) ;
Line: 639

                            SELECT ic.lot_id
                            INTO   l_lot_id
                            FROM   ic_lots_mst ic
                            WHERE  ic.lot_no = LOT.lot_number
                            AND    ic.item_id = l_item_rec.opm_item_id
                            AND    ic.sublot_no = LOT.sublot_number;
Line: 655

                            SELECT ic.lot_id
                            INTO   l_lot_id
                            FROM   ic_lots_mst ic
                            WHERE  ic.lot_no = LOT.lot_number
                            AND    ic.item_id = l_item_rec.opm_item_id
                            AND    ic.sublot_no IS NULL;
Line: 722

                          oe_debug_pub.add(  'DUAL PROCESS SHIPPING UPDATE CONVERSION' || ' GIVES SHIPPED QUANTITY OF ' ||
                          L_TEMP_SHIPPED_QUANTITY , 1 ) ;
Line: 795

                  SELECT ato_line_id
                  INTO   l_count
                  FROM   oe_order_lines
                  WHERE  line_id = l_top_model_line_id;
Line: 809

                  SELECT COUNT(*)
                  INTO   l_shippable_lines
                  FROM   OE_ORDER_LINES
                  WHERE  top_model_line_id = l_top_model_line_id
                  AND    NVL(CANCELLED_FLAG,'N')='N'
                  AND    NVL(SHIPPABLE_FLAG,'N')='Y';
Line: 818

                    SELECT count(*)
                    INTO   l_count
                    FROM   oe_order_lines
                    WHERE  top_model_line_id = l_top_model_line_id
                    AND    cancelled_flag = 'N'
                    AND    source_type_code = 'EXTERNAL';
Line: 839

                    SELECT count(*)
                    INTO   l_count
                    FROM   oe_order_lines oe1
                    WHERE  top_model_line_id = l_top_model_line_id
                    AND    ato_line_id = line_id
                    AND    item_type_code = 'CLASS'
                    AND    cancelled_flag = 'N'
                    AND    not exists
                           (SELECT NULL
                            FROM   oe_order_lines_all
                            WHERE  top_model_line_id = l_top_model_line_id
                            AND    ato_line_id = oe1.line_id
                            AND    cancelled_flag = 'N'
                            AND    item_type_code = 'CONFIG');
Line: 865

                    SELECT 1 INTO   l_count
                    FROM DUAL
                    WHERE EXISTS (
                                 SELECT NULL
                                 FROM   oe_order_lines
                                 WHERE  top_model_line_id = l_top_model_line_id
                                 AND    cancelled_flag = 'N'
                                 AND    schedule_ship_date  is NULL);
Line: 890

                      UPDATE oe_order_lines
                      SET    model_remnant_flag = 'Y'
                      WHERE  top_model_line_id = l_top_model_line_id;
Line: 1051

                  END IF; /* need to update global picture */
Line: 1053

                UPDATE OE_ORDER_LINES
                SET shipping_quantity = p_line_tbl(J).shipping_quantity,
                shipping_quantity2 = p_line_tbl(J).shipping_quantity2,
                shipped_quantity2 = p_line_tbl(J).shipping_quantity2,
                shipping_quantity_uom = p_line_tbl(J).shipping_quantity_uom,
                shipping_quantity_uom2 = p_line_tbl(J).shipping_quantity_uom2, -- INVCONV
                actual_shipment_date = p_line_tbl(J).actual_shipment_date,
                ship_tolerance_below = l_ship_tolerance_below_upd,
                over_ship_reason_code = l_over_ship_reason_code_upd,
                shipped_quantity = l_shipped_quantity
                WHERE line_id = p_line_tbl(J).line_id;
Line: 1086

		END IF; /* need to update global picture */
Line: 1107

				UPDATE OE_ORDER_LINES
				SET shipping_quantity = p_line_tbl(J).shipping_quantity,
				shipping_quantity2 = p_line_tbl(J).shipping_quantity2,
				shipped_quantity2 = p_line_tbl(J).shipping_quantity2,
				shipping_quantity_uom = p_line_tbl(J).shipping_quantity_uom,
		 	  shipping_quantity_uom2 = p_line_tbl(J).shipping_quantity_uom2, -- INVCONV
				actual_shipment_date = p_line_tbl(J).actual_shipment_date,
				ship_tolerance_below = l_ship_tolerance_below_upd,
				over_ship_reason_code = l_over_ship_reason_code_upd,
				shipped_quantity = l_shipped_quantity,
				calculate_price_flag = l_calculate_price_flag
				WHERE line_id = p_line_tbl(J).line_id;
Line: 1196

    OE_ORDER_UTIL.Update_Global_Picture
	(p_Upd_New_Rec_If_Exists =>FALSE
        , p_header_id           => l_line_tbl(l_loop_index).header_id
	, p_line_rec		=> l_line_tbl(l_loop_index)
	, p_old_line_rec	=> l_old_line_tbl(l_loop_index)
        , p_line_id 		=> l_line_tbl(l_loop_index).line_id
        , x_index 		=> l_notify_index
        , x_return_status 	=> l_return_status);
Line: 1206

        oe_debug_pub.add('UPDATE_GLOBAL RET_STATUS FOR LINE_ID '||L_LINE_TBL ( L_LOOP_INDEX ) .LINE_ID ||' IS: ' || L_RETURN_STATUS , 1
        ) ;
Line: 1208

        oe_debug_pub.add('UPDATE_GLOBAL INDEX FOR LINE_ID '||L_LINE_TBL ( L_LOOP_INDEX ) .LINE_ID ||' IS: ' || L_NOTIFY_INDEX , 1 ) ;
Line: 1226

    OE_ORDER_UTIL.g_line_tbl(l_notify_index).last_update_date := l_line_tbl(l_loop_index).last_update_date;
Line: 1275

  END LOOP; -- over each line to update global picture
Line: 1402

          ,p_delete        => FND_API.G_TRUE
          ,x_return_status => l_return_status
          );
Line: 1413

          ,p_delete        => FND_API.G_TRUE
          ,x_return_status => l_return_status
          );
Line: 1424

          ,p_delete        => FND_API.G_TRUE
          ,x_return_status => l_return_status
          );
Line: 1435

          ,p_delete        => FND_API.G_TRUE
          ,x_return_status => l_return_status
          );
Line: 1446

          ,p_delete        => FND_API.G_TRUE
          ,x_return_status => l_return_status
          );
Line: 1457

          ,p_delete        => FND_API.G_TRUE
          ,x_return_status => l_return_status
          );
Line: 1468

          ,p_delete        => FND_API.G_TRUE
          ,x_return_status => l_return_status
          );
Line: 1479

          ,p_delete        => FND_API.G_TRUE
          ,x_return_status => l_return_status
          );
Line: 1490

          ,p_delete        => FND_API.G_TRUE
          ,x_return_status => l_return_status
          );
Line: 1501

          ,p_delete        => FND_API.G_TRUE
          ,x_return_status => l_return_status
          );
Line: 1512

          ,p_delete        => FND_API.G_TRUE
          ,x_return_status => l_return_status
          );
Line: 1604

        oe_debug_pub.add(  'DUAL PROCESS SHIPPING UPDATE ', 5); -- INVCONV
Line: 1768

         SELECT count(*)
          INTO l_wdd_count
          FROM wsh_delivery_details
         WHERE source_line_id = p_requested_line_rec.line_id(I)
          AND  released_status <> 'D'
          AND  source_code = 'OE'
          AND  oe_interfaced_flag = 'N';
Line: 1831

      l_split_line_rec.operation         := OE_GLOBALS.G_OPR_UPDATE;
Line: 1838

           oe_debug_pub.add(1 ||' opr update qty '
                        || l_split_line_tbl(1).ordered_quantity, 1);
Line: 1840

	   oe_debug_pub.add(1 ||' opr update qty2 '
                           || l_split_line_tbl(1).ordered_quantity2, 1);
Line: 1921

 select order_quantity_uom2??
-------------------------------------------------------------*/
PROCEDURE Split_Line
( p_ship_line_rec          IN OUT NOCOPY Ship_Line_Rec_Type
-- ,p_opm_check              IN VARCHAR2 := 'Y' -- INVCONV - NOT NEEDed NOW
 ,p_index                  IN NUMBER
 ,p_split_model            IN VARCHAR2 := 'N')
IS
  l_line_tbl             OE_Order_Pub.Line_Tbl_Type;
Line: 1946

  l_line_tbl(1).operation            := OE_GLOBALS.G_OPR_UPDATE;
Line: 2001

      SELECT item_type_code
      INTO l_line_tbl(1).item_type_code
      FROM oe_order_lines_all
      WHERE line_id =  p_ship_line_rec.ato_line_id(p_index);
Line: 2268

    SELECT line_id, ordered_quantity
          ,ordered_quantity2 -- bug 12731457
	  ,header_id, actual_shipment_date, order_firmed_date
          ,blanket_number,blanket_line_number,blanket_version_number
    FROM   oe_order_lines
    WHERE  top_model_line_id = p_top_model_line_id
    AND    nvl(ato_line_id,-99) = -99 /*added for bug 6640292*/
    AND    shippable_flag = 'N'
    AND    model_remnant_flag = 'Y';
Line: 2360

          l_fulfill_tbl(l_fulfill_index).operation := OE_GLOBALS.G_OPR_UPDATE;
Line: 2396

      OE_Order_WF_Util.Update_Flow_Status_Code
      (p_header_id        =>  l_fulfill_tbl(l_fulfill_index).header_id,
       p_line_id          =>  l_fulfill_tbl(l_fulfill_index).line_id,
       p_flow_status_code =>  'FULFILLED',
       x_return_status    =>  l_return_status);
Line: 2489

    UPDATE oe_order_lines
    SET    shipped_quantity = (ordered_quantity *
                               p_ship_line_rec.shipped_quantity(p_index)/
                               p_ship_line_rec.ordered_quantity(p_index))
           ,actual_shipment_date
            = p_ship_line_rec.actual_shipment_date(p_index)
           ,lock_control     = lock_control + 1
           --last_updated_by**
    WHERE  ato_line_id = p_ship_line_rec.ato_line_id(p_index)
    AND    header_id   = p_ship_line_rec.header_id(p_index)
    AND    shippable_flag = 'N';
Line: 2601

               SELECT count(*)
               INTO   l_wdd_count
               FROM   wsh_delivery_details
               WHERE  source_line_id = p_ship_line_rec.line_id(p_index)
               AND    released_status <> 'D'
               AND    source_code = 'OE'
               AND    oe_interfaced_flag = 'N';
Line: 2680

    oe_debug_pub.add('calling Update_Flow_Status_Code', 3);
Line: 2683

  OE_Order_WF_Util.Update_Flow_Status_Code
  (p_header_id          =>  p_ship_line_rec.header_id(p_index),
   p_line_id            =>  p_ship_line_rec.line_id(p_index),
   p_flow_status_code   =>  'SHIPPED',
   x_return_status      =>  l_return_status );
Line: 2737

    SELECT line_id, ordered_quantity, shipped_quantity
    FROM   oe_order_lines
    WHERE  shippable_flag = 'Y'
    AND    shipped_quantity is NOT NULL
    AND    top_model_line_id = p_top_model_line_id;
Line: 2744

  SELECT count(*)
  INTO   l_count1
  FROM   oe_order_lines
  WHERE  top_model_line_id = p_top_model_line_id
  AND    cancelled_flag = 'N'
  AND    shippable_flag = 'Y';
Line: 2760

      SELECT count(*)
      INTO   l_count
      FROM   oe_order_lines
      WHERE  top_model_line_id = p_top_model_line_id
      AND    cancelled_flag = 'N'
      AND    source_type_code = 'EXTERNAL';
Line: 2782

      SELECT count(*)
      INTO   l_count
      FROM   oe_order_lines oe1
      WHERE  top_model_line_id = p_top_model_line_id
      AND    ato_line_id = line_id
      AND    item_type_code = 'CLASS'
      AND    cancelled_flag = 'N'
      AND    not exists
             (SELECT NULL
              FROM   oe_order_lines_all
              WHERE  top_model_line_id = p_top_model_line_id
              AND    ato_line_id = oe1.line_id
              AND    cancelled_flag = 'N'
             AND    item_type_code = 'CONFIG');
Line: 2808

      SELECT 1 INTO   l_count
      FROM DUAL
      WHERE EXISTS (
                   SELECT NULL
                   FROM   oe_order_lines
                   WHERE  top_model_line_id = p_top_model_line_id
                   AND    cancelled_flag = 'N'
                   AND    schedule_ship_date  is NULL);
Line: 2834

      UPDATE oe_order_lines
      SET    model_remnant_flag = 'Y'
            ,lock_control       = lock_control + 1
      WHERE  top_model_line_id = p_top_model_line_id
      AND    cancelled_flag = 'N';
Line: 2854

    SELECT count(*)
    INTO   l_count
    FROM   oe_order_lines
    WHERE  top_model_line_id = p_top_model_line_id
    AND    shippable_flag = 'Y'
    AND    NVL(CANCELLED_FLAG,'N')='N' --9822866
    AND    shipped_quantity is NULL;
Line: 2864

        oe_debug_pub.add('1 select '|| l_count , 3);
Line: 2871

        SELECT count(*)
        INTO   l_count
        FROM   oe_order_lines oe1
        WHERE  top_model_line_id = p_top_model_line_id
        AND    shippable_flag = 'Y'
        AND    NVL(OE1.CANCELLED_FLAG,'N')='N' --9822866
        AND    ordered_quantity/shipped_quantity = ALL
                    (SELECT ordered_quantity/shipped_quantity
                     FROM   oe_order_lines_all oe2
                     WHERE  oe2.top_model_line_id = oe1.top_model_line_id
                     AND    oe2.line_id <> oe1.line_id
                     AND    oe2.shippable_flag = 'Y'
                     AND    NVL(OE2.CANCELLED_FLAG,'N')='N' --9822866
                    );
Line: 2887

          oe_debug_pub.add('2 select '|| l_count || l_count1 , 3);
Line: 2897

          SELECT shipped_quantity/ordered_quantity
          INTO l_shipped_ratio
          FROM oe_order_lines_all
          WHERE  top_model_line_id = p_top_model_line_id
          AND  shippable_flag = 'Y'
          AND ROWNUM =1;
Line: 2904

          SELECT ordered_quantity
          into l_model_ordered_qty
          FROM  oe_order_lines_all
          WHERE  line_id = p_top_model_line_id;
Line: 2911

          SELECT shipped_quantity,ordered_quantity
          INTO l_line_model_shipped_qty,l_line_model_ordered_qty
          FROM oe_order_lines_all
          WHERE  top_model_line_id = p_top_model_line_id
          AND  shippable_flag = 'Y'
          AND ROWNUM =1;
Line: 2918

          SELECT ordered_quantity
          into l_model_ordered_qty
          FROM  oe_order_lines_all
          WHERE  line_id = p_top_model_line_id;
Line: 2958

    UPDATE oe_order_lines
    SET    shipped_quantity = (ordered_quantity *
                               p_ship_line_rec.shipped_quantity(p_index)/
                               p_ship_line_rec.ordered_quantity(p_index))
           ,actual_shipment_date =
            p_ship_line_rec.actual_shipment_date(p_index)
           ,lock_control         = lock_control + 1
           --last_updated_by**
    WHERE  top_model_line_id = p_top_model_line_id
    AND    open_flag = 'Y'
    AND    nvl(cancelled_flag, 'N') = 'N'
    AND    source_type_code = 'INTERNAL'
    AND    shippable_flag = 'N';
Line: 2974

        oe_debug_pub.add('nonshippable lines updated '|| sql%rowcount, 3);
Line: 2993

    SELECT line_id, shipped_quantity, ordered_quantity, ordered_quantity_uom2, -- INVCONV 4199186
           ato_line_id,top_model_line_id, item_type_code, ship_from_org_id -- Bug 10338240
    INTO   p_ship_line_rec.line_id(l_index),
           p_ship_line_rec.shipped_quantity(l_index),
           p_ship_line_rec.ordered_quantity(l_index),
           p_ship_line_rec.order_quantity_uom2(l_index),  -- INVCONV 4199186
           p_ship_line_rec.ato_line_id(l_index),
           p_ship_line_rec.top_model_line_id(l_index),
           p_ship_line_rec.item_type_code(l_index),
	   p_ship_line_rec.ship_from_org_id(l_index) -- Bug 10338240
    FROM   oe_order_lines
    WHERE  line_id = p_top_model_line_id;
Line: 3108

        l_split_line_tbl(l_count).operation := OE_GLOBALS.G_OPR_UPDATE;
Line: 3180

          SELECT line_id, shipped_quantity, ordered_quantity,
                 header_id,ato_line_id,item_type_code
          INTO   p_ship_line_rec.line_id(l_index),
                 p_ship_line_rec.shipped_quantity(l_index),
                 p_ship_line_rec.ordered_quantity(l_index),
                 p_ship_line_rec.header_id(l_index),
                 p_ship_line_rec.ato_line_id(l_index),
                 p_ship_line_rec.item_type_code(l_index)
          FROM   oe_order_lines
          WHERE  line_id = l_split_line_tbl(I).line_id;
Line: 3339

  SELECT line_id, line_set_id, ordered_quantity, ordered_quantity2,
         order_quantity_uom, ordered_quantity_uom2, inventory_item_id,
         header_id
  FROM   oe_order_lines oe
  WHERE  line_id in
              (SELECT line_id
               FROM   oe_order_lines_all
               WHERE  line_set_id = p_ship_line_rec.line_set_id(p_index)
               AND    line_id <> p_ship_line_rec.line_id(p_index))
  AND    open_flag = 'Y'
  AND    shipped_quantity is NULL
  AND    line_id in
              (SELECT source_line_id
               FROM   wsh_delivery_details
               WHERE  source_header_id = oe.header_id);
Line: 3369

    SELECT count(*)
    INTO   l_count
    FROM   wsh_delivery_details
    WHERE  source_line_id = line_rec.line_id
    AND    released_status <> 'D';
Line: 3439

         oe_debug_pub.add('Before quantities db update', 3);
Line: 3442

      UPDATE OE_ORDER_LINES
      SET shipping_quantity     = l_line_set_rec.shipping_quantity(I),
          shipped_quantity      = l_line_set_rec.shipped_quantity(I),
          shipping_quantity2    = l_line_set_rec.shipping_quantity2(I),
          shipped_quantity2     = l_line_set_rec.shipped_quantity2(I),
          shipping_quantity_uom = l_line_set_rec.shipping_quantity_uom(I),
          shipping_quantity_uom2 = l_line_set_rec.shipping_quantity_uom2(I),  -- INVCONV
          actual_shipment_date  = l_line_set_rec.actual_shipment_date(I),
          lock_control          = lock_control + 1
          WHERE line_id         = l_line_set_rec.line_id(I);
Line: 3476

    END IF; -- if wdd has lines staged/shipped or not deleted
Line: 3576

    SELECT line_id, item_type_code,
           top_model_line_id,
           nvl(model_remnant_flag, 'N') model_remnant_flag,
           fulfilled_quantity,
           open_flag,
           invoiced_quantity
    FROM   oe_order_lines
    WHERE  ship_set_id = p_ship_set_id
    AND    shipped_quantity is NULL;
Line: 3605

      Oe_Debug_pub.Add('check if set id needs to be updated '|| I, 3);
Line: 3619

            oe_debug_pub.add('DIRECT UPDATE LINE ID: '||line_rec.line_id,3);
Line: 3623

         UPDATE oe_order_lines
         SET    ship_set_id = NULL
         WHERE  line_id=line_rec.line_id;
Line: 3629

         SELECT line_id
         INTO   l_line_id
         FROM   oe_order_lines
         WHERE  line_id = line_rec.line_id
         FOR UPDATE NOWAIT;
Line: 3651

         l_set_tbl(J).operation := OE_GLOBALS.G_OPR_UPDATE;
Line: 3661

        oe_debug_pub.add('UPDATE SHIP SET ID '|| J,3);
Line: 3706

3358774 -- Update Ordered Quantity if there is a call to
           Handle_Requested_Quantity
3613716 -- extend fields ordered_quantuty,ship_tolerance_below
           and ship_tolerance_above
3670530 -- If the order line belongs to a set, lock the
           corresponding set from oe_sets table. handle lock
           exception in the exception handler. also, move the
           code to lock order lines to a separate block
------------------------------------------------------------*/
PROCEDURE Handle_NonBulk_Mode
( p_ship_line_rec      IN OUT NOCOPY Ship_Line_Rec_Type
 ,p_requested_line_rec IN OUT NOCOPY Ship_Line_Rec_Type
 ,x_return_status      OUT NOCOPY    VARCHAR2)
IS
  l_debug_level          CONSTANT NUMBER := oe_debug_pub.g_debug_level;
Line: 3793

       SELECT ordered_quantity,
              ship_tolerance_below,
              ship_tolerance_above
         INTO p_ship_line_rec.ordered_quantity(I),
              p_ship_line_rec.ship_tolerance_below(I),
              p_ship_line_rec.ship_tolerance_above(I)
         FROM oe_order_lines_all
        WHERE line_id =  p_ship_line_rec.line_id(I);
Line: 3856

      SELECT top_model_line_id, shippable_flag
       INTO p_ship_line_rec.top_model_line_id(I), p_ship_line_rec.shippable_flag(I)
       FROM OE_ORDER_LINES
       WHERE line_id = p_ship_line_rec.line_id(I)
       FOR UPDATE NOWAIT;
Line: 3873

        SELECT top_model_line_id
        INTO   l_rem_top_model_line_id
        FROM   oe_order_lines
        WHERE  line_id = p_ship_line_rec.top_model_line_id(I)
        FOR UPDATE NOWAIT;
Line: 3905

        SELECT Set_id
        INTO   l_ship_set_id
        FROM   OE_SETS
        WHERE  set_id = p_ship_line_rec.ship_set_id(I)
        FOR UPDATE NOWAIT ;
Line: 3935

        SELECT Set_id
        INTO   l_arrival_set_id
        FROM   OE_SETS
        WHERE  set_id = p_ship_line_rec.arrival_set_id(I)
        FOR UPDATE NOWAIT ;
Line: 4016

    UPDATE OE_ORDER_LINES
    SET shipping_quantity     = p_ship_line_rec.shipping_quantity(I),
        shipping_quantity2    = p_ship_line_rec.shipping_quantity2(I),
        shipped_quantity2     = p_ship_line_rec.shipping_quantity2(I),
        shipped_quantity      = p_ship_line_rec.shipped_quantity(I),
        shipping_quantity_uom = p_ship_line_rec.shipping_quantity_uom(I),
        shipping_quantity_uom2 = p_ship_line_rec.shipping_quantity_uom2(I), -- INVCONV
        actual_shipment_date  = p_ship_line_rec.actual_shipment_date(I),
        over_ship_reason_code = p_ship_line_rec.over_ship_reason_code(I),
        calculate_price_flag  = p_ship_line_rec.calculate_price_flag(I),
        lock_control          = lock_control + 1
    WHERE line_id = p_ship_line_rec.line_id(I);
Line: 4030

      Oe_Debug_pub.Add('shipped qty updated to: '
      || p_ship_line_rec.shipped_quantity(I) || ' shp qty 2 is :'
      || p_ship_line_rec.shipping_quantity2(I), 3);
Line: 4038

      UPDATE  OE_SETS
      SET     SET_STATUS = 'C'
      WHERE   SET_ID = p_ship_line_rec.arrival_set_id(I)
      AND     SET_STATUS <> 'C';
Line: 4105

        UPDATE OE_SETS
        SET    SET_STATUS = 'C'
        WHERE  SET_ID = p_ship_line_rec.ship_set_id(I)
        AND    SET_STATUS <> 'C';
Line: 4166

	  SELECT Count(*)
	  INTO l_cnt_config
	  FROM oe_order_lines_all
	  WHERE ato_line_id = p_ship_line_rec.ato_line_id(I)
	  AND item_type_code = 'CONFIG'   ;
Line: 4211

     ,p_operation     => OE_GLOBALS.G_OPR_UPDATE);
Line: 4214

  l_change_line_tbl.delete;
Line: 4245

  l_order_has_lines.delete;
Line: 4472

 * locking -- update table will lock rows, not doing for now
 * before notification framework.
 *
 * change record:
 * bug bugs 3544045, 3544209: a mix of internal and external
 * lines with complete shipped quantity should make the
 * model remnant even in case of BULK model call from WSH.
 *
 * Bug 3679500: Changed the return_status variable to be l_return_status
 * in the call to Price_Line and Process_Requests_And_Notify. Previously,
 * x_return_status was being used.
 * ------------------------------------------------------------*/
PROCEDURE Handle_Bulk_Mode_Per_Order
( p_ship_line_rec      IN OUT NOCOPY Ship_Line_Rec_Type
 ,p_line_adj_rec       IN            Ship_Adj_Rec_Type
 ,p_start_index        IN            NUMBER
 ,p_end_index          IN            NUMBER
 ,x_return_status      OUT NOCOPY    VARCHAR2)
IS
  l_debug_level          CONSTANT NUMBER := oe_debug_pub.g_debug_level;
Line: 4548

    UPDATE OE_ORDER_LINES_ALL
    SET shipping_quantity      = p_ship_line_rec.shipping_quantity(I),
        shipping_quantity2     = p_ship_line_rec.shipping_quantity2(I),
        shipped_quantity2      = p_ship_line_rec.shipping_quantity2(I),
        shipped_quantity       = p_ship_line_rec.ordered_quantity(I),
       -- shipped_quantity2       = p_ship_line_rec.ordered_quantity2(I), -- INVCONV
        shipping_quantity_uom  = p_ship_line_rec.shipping_quantity_uom(I),
        shipping_quantity_uom2 = p_ship_line_rec.shipping_quantity_uom2(I),
        actual_shipment_date   = p_ship_line_rec.actual_shipment_date(I),
        flow_status_code       = 'SHIPPED',
	last_update_date      = sysdate,--6901322
        lock_control           = lock_control + 1
    WHERE line_id = p_ship_line_rec.line_id(I);
Line: 4564

    oe_debug_pub.ADD('updated lines with shipped qty '|| sql%rowcount,1);
Line: 4575

    UPDATE OE_ORDER_LINES_ALL oe1
    SET    model_remnant_flag = 'Y'
    WHERE  top_model_line_id is not NULL
    AND    top_model_line_id = p_ship_line_rec.top_model_line_id(I)
    AND    model_remnant_flag is NULL
    AND    (EXISTS (SELECT NULL
                   FROM   oe_order_lines_all oe2
                   WHERE  oe2.top_model_line_id = oe1.top_model_line_id
                   AND    source_type_code =  'EXTERNAL')
            OR -- added for bug 4701487
            EXISTS (SELECT NULL
                    FROM   oe_order_lines_all oe3
                    WHERE  oe3.top_model_line_id = oe1.top_model_line_id
                    AND    cancelled_flag = 'N'
                    AND    schedule_ship_date  is NULL));
Line: 4592

    oe_debug_pub.ADD('updated lines model_remnant_flag '|| sql%rowcount,1);
Line: 4636

      SELECT calculate_price_flag
      INTO   p_ship_line_rec.calculate_price_flag(i)
      FROM   oe_order_lines_all
      WHERE  line_id = p_ship_line_rec.line_id(i);
Line: 4689

         ,p_operation     => OE_GLOBALS.G_OPR_UPDATE);
Line: 4690

        l_change_line_tbl.delete(K);
Line: 4760

  l_order_has_lines.delete;
Line: 4761

  l_change_line_tbl.delete;
Line: 4808

    UPDATE oe_order_lines_all
    SET    shipped_quantity = ordered_quantity, -- INVCONV
    			 shipped_quantity2 = ordered_quantity2  -- INVCONV
          ,actual_shipment_date = p_ship_line_rec.actual_shipment_date(i)
          ,lock_control     = lock_control + 1
    WHERE  line_id in
             (SELECT line_id
              FROM oe_order_lines_all
              WHERE top_model_line_id =
                    p_ship_line_rec.top_model_line_id(i))
    AND    shippable_flag = 'N'
    AND    p_ship_line_rec.error_flag(i) = 'N'
    AND    shipped_quantity is NULL
    AND    open_flag = 'Y'
    AND    nvl(cancelled_flag, 'N') = 'N'
    AND    source_type_code = 'INTERNAL'
           RETURNING line_id,
                     ato_line_id,
                     item_type_code,
                     shipped_quantity,
                     shipped_quantity2, -- INVCONV
                     actual_shipment_date,
                     model_remnant_flag,
                     top_model_line_id
           BULK COLLECT
           INTO  g_non_shippable_rec.line_id,
                 g_non_shippable_rec.ato_line_id,
                 g_non_shippable_rec.item_type_code,
                 g_non_shippable_rec.shipped_quantity,
                 g_non_shippable_rec.shipped_quantity2, -- INVCONV
                 g_non_shippable_rec.actual_shipment_date,
                 g_non_shippable_rec.model_remnant_flag,
                 g_non_shippable_rec.top_model_line_id;
Line: 4845

        oe_debug_pub.ADD('nonshippable lines updated '|| sql%rowcount,1);
Line: 4858

          UPDATE oe_order_lines_all
          SET    shipped_quantity = NULL
                ,actual_shipment_date = NULL
                ,lock_control     = lock_control + 1
          WHERE  line_id = g_non_shippable_rec.line_id(I);
Line: 4901

          UPDATE oe_order_lines_all
          SET    shipped_quantity = null
                ,lock_control     = lock_control + 1
          WHERE  line_id = g_non_shippable_rec.line_id(I);
Line: 4922

      g_non_shippable_rec.line_id.delete;
Line: 4923

      g_non_shippable_rec.ato_line_id.delete;
Line: 4924

      g_non_shippable_rec.item_type_code.delete;
Line: 4925

      g_non_shippable_rec.shipped_quantity.delete;
Line: 4926

      g_non_shippable_rec.shipped_quantity2.delete; -- INVCONV
Line: 4927

      g_non_shippable_rec.actual_shipment_date.delete;
Line: 4932

    UPDATE OE_ORDER_LINES_ALL oe1
    SET    ship_set_id = NULL
    WHERE  ship_set_id is not NULL
    AND    shipped_quantity is NULL
    AND    ship_set_id = p_ship_line_rec.ship_set_id(I);
Line: 4944

    UPDATE oe_sets
    SET    set_status = 'C'
    WHERE  set_id = p_ship_line_rec.ship_set_id(i)
    AND    SET_STATUS <> 'C'
    AND    p_ship_line_rec.error_flag(i) = 'N';
Line: 4956

     UPDATE oe_sets
     SET    set_status = 'C'
     WHERE  set_id = p_ship_line_rec.arrival_set_id(i)
     AND    SET_STATUS <> 'C'
     AND    p_ship_line_rec.error_flag(i) = 'N';
Line: 4969

      UPDATE OE_ORDER_LINES_ALL
      SET shipping_quantity      = null,
          shipping_quantity2     = null,
          shipped_quantity2      = null,
          shipped_quantity       = null,
          shipping_quantity_uom  = null,
          shipping_quantity_uom2 = null,
          actual_shipment_date   = null,
          flow_status_code       = p_ship_line_rec.flow_status_code(i),
          lock_control           = lock_control - 1
      WHERE line_id = p_ship_line_rec.line_id(i)
      AND   p_ship_line_rec.error_flag(i) = 'Y';
Line: 5011

          ,p_delete        => FND_API.G_TRUE
          ,x_return_status => l_return_status
          );
Line: 5095

      oe_debug_pub.add('inserting adjustments '
                        || p_line_adj_rec.line_id.COUNT, 5);
Line: 5101

      DELETE FROM OE_PRICE_ADJUSTMENTS
      WHERE LINE_ID = p_line_adj_rec.line_id(i)
        AND CHARGE_TYPE_CODE IN ('FTEPRICE','FTECHARGE')
        AND p_line_adj_rec.charge_type_code(i) IN ('FTEPRICE','FTECHARGE')
        AND list_line_type_code = 'COST'
        AND p_line_adj_rec.list_line_type_code(i) = 'COST'
        AND ESTIMATED_FLAG = 'Y';
Line: 5111

      INSERT INTO OE_PRICE_ADJUSTMENTS
      ( price_adjustment_id
       ,cost_id
       ,automatic_flag
       ,list_line_type_code
       ,charge_type_code
       ,header_id
       ,line_id
       ,adjusted_amount
       ,arithmetic_operator
       ,last_update_date
       ,last_updated_by
       ,last_update_login
       ,creation_date
       ,created_by)
       VALUES
       ( OE_PRICE_ADJUSTMENTS_S.nextval
        ,p_line_adj_rec.cost_id(i)
        ,p_line_adj_rec.automatic_flag(i)
        ,p_line_adj_rec.list_line_type_code(i)
        ,p_line_adj_rec.charge_type_code(i)
        ,p_line_adj_rec.header_id(i)
        ,p_line_adj_rec.line_id(i)
        ,p_line_adj_rec.adjusted_amount(i)
        ,p_line_adj_rec.arithmetic_operator(i)
        ,SYSDATE
        ,FND_GLOBAL.USER_ID
        ,FND_GLOBAL.LOGIN_ID
        ,SYSDATE
        ,FND_GLOBAL.USER_ID)
       RETURNING price_adjustment_id
       BULK COLLECT
       INTO  p_line_adj_rec.price_adjustment_id;
Line: 5316

     SELECT hsecs INTO l_start_time from v$timer;
Line: 5403

      ('update GLOBAL FLOW_STATUS is: '||l_line_rec.flow_status_code,3);
Line: 5406

    OE_ORDER_UTIL.Update_Global_Picture
    (p_Upd_New_Rec_If_Exists => False,
     --p_header_id             => l_line_rec.header_id,
     p_old_line_rec          => l_old_line_rec,
     p_line_rec              => l_line_rec,
     p_line_id               => l_line_rec.line_id,
     x_index                 => J,
     x_return_status         => l_return_status);
Line: 5416

      oe_debug_pub.add(J || ' UPDATE_GLOBAL ret sts: ' || l_retuRN_STATUS);
Line: 5434

      OE_ORDER_UTIL.g_line_tbl(J).last_update_date := SYSDATE;
Line: 5435

      OE_ORDER_UTIL.g_line_tbl(J).last_updated_by  := FND_GLOBAL.USER_ID;
Line: 5436

      OE_ORDER_UTIL.g_line_tbl(J).last_update_login:= FND_GLOBAL.LOGIN_ID;
Line: 5456

                  := OE_GLOBALS.G_OPR_UPDATE;  -- Bug 8442372
Line: 5460

        ('AFTER UPDATE GLOBAL FLOW_STATUS_CODE IS: '
         || OE_ORDER_UTIL.G_LINE_TBL( J ).FLOW_STATUS_CODE ,1);
Line: 5474

     SELECT hsecs INTO l_end_time from v$timer;
Line: 5514

  l_update_lines_tbl  OE_ORDER_PUB.Request_Tbl_Type;
Line: 5537

  select  Count (1)
  INTO    l_count
  from    wf_item_activity_statuses wias, wf_process_activities wpa
  where   wias.process_activity = wpa.instance_id
  and     to_number(wias.item_key) = p_line_id
  and     wias.item_type = 'OEOL'
  AND     wpa.activity_item_type = wias.item_type
  and     wias.activity_status = 'NOTIFIED'
  and     wpa.activity_name = 'SHIP_LINE';
Line: 5569

  SELECT  Count(1)
  INTO    l_count
  FROM    wsh_delivery_details
  WHERE   source_line_id  = p_line_id
  AND     released_status = 'C';
Line: 5582

  l_update_lines_tbl(1).entity_id := p_line_id;
Line: 5583

  l_update_lines_tbl(1).param1  := FND_API.G_FALSE;
Line: 5584

  l_update_lines_tbl(1).param2  := FND_API.G_FALSE;
Line: 5585

  l_update_lines_tbl(1).param5  := FND_API.G_TRUE;
Line: 5586

  l_update_lines_tbl(1).request_type := OE_GLOBALS.G_OPR_UPDATE;
Line: 5589

  OE_Shipping_Integration_PVT.Update_Shipping_From_OE
  (
    p_update_lines_tbl  =>  l_update_lines_tbl,
    x_return_status     =>  l_return_status
  );
Line: 5604

    ,p_delete        => FND_API.G_TRUE
    ,x_return_status => l_return_status
 );