DBA Data[Home] [Help]

APPS.OE_SERVICE_UTIL SQL Statements

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

Line: 151

  OE_SERVICE_UTIL.CHECK_PROC('ASO_ORDER_FEEDBACK_PUB.UPDATE_NOTICE', l_return_status);
Line: 183

    ASO_ORDER_FEEDBACK_PUB.UPDATE_NOTICE(
        1.0
      , :p_init_msg_list
      , :p_commit
      , :x_return_status
      , :x_msg_count
      , :x_msg_data
      , OE_SERVICE_UTIL.g_header_rec
      , OE_SERVICE_UTIL.g_old_header_rec
      , OE_SERVICE_UTIL.g_header_adj_tbl
      , OE_SERVICE_UTIL.g_old_header_adj_tbl
      , OE_SERVICE_UTIL.g_header_price_att_tbl
      , OE_SERVICE_UTIL.g_old_header_price_att_tbl
      , OE_SERVICE_UTIL.g_header_adj_att_tbl
      , OE_SERVICE_UTIL.g_old_header_adj_att_tbl
      , OE_SERVICE_UTIL.g_header_adj_assoc_tbl
      , OE_SERVICE_UTIL.g_old_header_adj_assoc_tbl
      , OE_SERVICE_UTIL.g_header_scredit_tbl
      , OE_SERVICE_UTIL.g_old_header_scredit_tbl
      , OE_SERVICE_UTIL.g_line_tbl
      , OE_SERVICE_UTIL.g_old_line_tbl
      , OE_SERVICE_UTIL.g_line_adj_tbl
      , OE_SERVICE_UTIL.g_old_line_adj_tbl
      , OE_SERVICE_UTIL.g_line_price_att_tbl
      , OE_SERVICE_UTIL.g_old_line_price_att_tbl
      , OE_SERVICE_UTIL.g_line_adj_att_tbl
      , OE_SERVICE_UTIL.g_old_line_adj_att_tbl
      , OE_SERVICE_UTIL.g_line_adj_assoc_tbl
      , OE_SERVICE_UTIL.g_old_line_adj_assoc_tbl
      , OE_SERVICE_UTIL.g_line_scredit_tbl
      , OE_SERVICE_UTIL.g_old_line_scredit_tbl
      , OE_SERVICE_UTIL.g_lot_serial_tbl
      , OE_SERVICE_UTIL.g_old_lot_serial_tbl
	 , OE_SERVICE_UTIL.g_action_request_tbl);
Line: 270

        oe_debug_pub.add(  'CSS: BEFORE CALLS UPDATE_NOTICE ',0.5 ) ;  -- debug level 0.5 added for bug 13435459
Line: 273

    ASO_ORDER_FEEDBACK_PUB.UPDATE_NOTICE(
        p_api_version => 1.0
      , p_init_msg_list => p_init_msg_list
      , p_commit => l_commit
      , x_return_status => l_return_status
      , x_msg_count => l_msg_count
      , x_msg_data => l_msg_data
      , p_header_rec => OE_SERVICE_UTIL.g_header_rec
      , p_old_header_rec => OE_SERVICE_UTIL.g_old_header_rec
      , p_Header_Adj_tbl => OE_SERVICE_UTIL.g_header_adj_tbl
      , p_old_Header_Adj_tbl => OE_SERVICE_UTIL.g_old_header_adj_tbl
      , p_Header_price_Att_tbl => OE_SERVICE_UTIL.g_header_price_att_tbl
      , p_old_Header_Price_Att_tbl => OE_SERVICE_UTIL.g_old_header_price_att_tbl
      , p_Header_Adj_Att_tbl => OE_SERVICE_UTIL.g_header_adj_att_tbl
      , p_old_Header_Adj_Att_tbl => OE_SERVICE_UTIL.g_old_header_adj_att_tbl
      , p_Header_Adj_Assoc_tbl => OE_SERVICE_UTIL.g_header_adj_assoc_tbl
      , p_old_Header_Adj_Assoc_tbl => OE_SERVICE_UTIL.g_old_header_adj_assoc_tbl
      , p_Header_Scredit_tbl => OE_SERVICE_UTIL.g_header_scredit_tbl
      , p_old_Header_Scredit_tbl => OE_SERVICE_UTIL.g_old_header_scredit_tbl
      , p_line_tbl => OE_SERVICE_UTIL.g_line_tbl
      , p_old_line_tbl => OE_SERVICE_UTIL.g_old_line_tbl
      , p_Line_Adj_tbl => OE_SERVICE_UTIL.g_line_adj_tbl
      , p_old_Line_Adj_tbl => OE_SERVICE_UTIL.g_old_line_adj_tbl
      , p_Line_Price_Att_tbl => OE_SERVICE_UTIL.g_line_price_att_tbl
      , p_old_Line_Price_Att_tbl => OE_SERVICE_UTIL.g_old_line_price_att_tbl
      , p_Line_Adj_Att_tbl => OE_SERVICE_UTIL.g_line_adj_att_tbl
      , p_old_Line_Adj_Att_tbl => OE_SERVICE_UTIL.g_old_line_adj_att_tbl
      , p_Line_Adj_Assoc_tbl => OE_SERVICE_UTIL.g_line_adj_assoc_tbl
      , p_old_Line_Adj_Assoc_tbl => OE_SERVICE_UTIL.g_old_line_adj_assoc_tbl
      , p_Line_Scredit_tbl => OE_SERVICE_UTIL.g_line_scredit_tbl
      , p_old_Line_Scredit_tbl => OE_SERVICE_UTIL.g_old_line_scredit_tbl
      , p_Lot_Serial_tbl => OE_SERVICE_UTIL.g_lot_serial_tbl
      , p_old_Lot_Serial_tbl => OE_SERVICE_UTIL.g_old_lot_serial_tbl
	 , p_action_request_tbl => OE_SERVICE_UTIL.g_action_request_tbl);
Line: 767

        OE_MSG_PUB.Update_Msg_Context(p_attribute_code => 'SERVICE_REFERENCE_TYPE_CODE');
Line: 772

        OE_MSG_PUB.Update_Msg_Context(p_attribute_code => null);
Line: 798

         SELECT  /* MOAC_SQL_CHANGE */  l.line_number
           , l.shipment_number
           , l.option_number
           , l.component_number
           , l.service_number
           , l.ordered_quantity
           , l.order_quantity_uom
           , l.header_id
           , l.line_id
           , l.inventory_item_id
           , l.blanket_number
           , l.cust_po_number
           , l.fulfilled_quantity --5699215
         INTO   l_line_number
           , l_shipment_number
           , l_option_number
           , l_component_number
           , l_service_number
           , l_service_qty
           , l_service_uom
           , l_header_id
           , l_line_id
           , l_inventory_item_id
           , l_blanket_number
           , l_cust_po_number
		   , l_fulfilled_quantity --5699215
         FROM   oe_order_lines_all l, oe_order_headers h
         WHERE  h.order_number         = p_x_line_rec.service_ref_order_number
         AND    l.line_number          = p_x_line_rec.service_ref_line_number
         AND    l.shipment_number      = p_x_line_rec.service_ref_shipment_number
         AND    NVL(l.option_number,0) = NVL(p_x_line_rec.service_ref_option_number, 0)
         AND    l.header_id            = h.header_id
         AND    rownum                 < 2;
Line: 832

         SELECT /* MOAC_SQL_CHANGE */  l.line_number
	   , l.shipment_number
	   , l.option_number
           , l.component_number
           , l.service_number
           , l.ordered_quantity
           , l.order_quantity_uom
           , l.header_id
           , l.line_id
           , l.inventory_item_id
		   , l.fulfilled_quantity --5699215
         INTO   l_line_number
	   , l_shipment_number
	   , l_option_number
           , l_component_number
           , l_service_number
           , l_service_qty
           , l_service_uom
           , l_header_id
           , l_line_id
           , l_inventory_item_id
		   , l_fulfilled_quantity --5699215
         FROM   oe_order_lines_all l, oe_order_headers h
         WHERE  h.order_number         = p_x_line_rec.service_ref_order_number
         AND    l.line_number          = p_x_line_rec.service_ref_line_number
         AND    l.shipment_number      = p_x_line_rec.service_ref_shipment_number
         AND    NVL(l.option_number,0) = NVL(p_x_line_rec.service_ref_option_number, 0)
         AND    l.header_id            = h.header_id
         AND    rownum                 < 2;
Line: 867

            oe_debug_pub.add(  'IN SELECT USING REF LINEID#  WITH BLANKET'
                                  || TO_CHAR ( P_X_LINE_REC.SERVICE_REFERENCE_LINE_ID ) ) ;
Line: 871

         SELECT l.line_number
           , l.shipment_number
           , l.option_number
           , l.component_number
           , l.service_number
           , l.ordered_quantity
           , l.order_quantity_uom
           , l.header_id
           , l.line_id
           , l.inventory_item_id
           , l.top_model_line_id -- 2331301
           , NVL(m.serviceable_product_flag, 'N') -- 2331301
           , l.blanket_number
           , l.cust_po_number
		   , l.fulfilled_quantity --5699215
         INTO   l_line_number
           , l_shipment_number
           , l_option_number
           , l_component_number
           , l_service_number
           , l_service_qty
           , l_service_uom
           , l_header_id
           , l_line_id
           , l_inventory_item_id
           , l_top_model_id  -- 2331301
           , l_serviceable  -- 2331301
           , l_blanket_number
           , l_cust_po_number
		   , l_fulfilled_quantity --5699215
         FROM   oe_order_lines l,
             mtl_system_items m
         WHERE  l.line_id    = p_x_line_rec.service_reference_line_id
         AND    l.inventory_item_id = m.inventory_item_id
         AND    m.organization_id = to_number(OE_Sys_Parameters.VALUE('MASTER_ORGANIZATION_ID'));
Line: 919

		SELECT blanket_number into l_blanket_number
		FROM oe_order_lines where line_id = l_top_model_id;
Line: 932

             oe_debug_pub.add(  'IN SELECT USING REF LINEID# ' || TO_CHAR ( P_X_LINE_REC.SERVICE_REFERENCE_LINE_ID ) ) ;
Line: 934

         SELECT l.line_number
	   , l.shipment_number
	   , l.option_number
           , l.component_number
           , l.service_number
           , l.ordered_quantity
           , l.order_quantity_uom
           , l.header_id
           , l.line_id
           , l.inventory_item_id
           , l.top_model_line_id -- 2331301
           , NVL(m.serviceable_product_flag, 'N') -- 2331301
		   , l.fulfilled_quantity --5699215
         INTO   l_line_number
	   , l_shipment_number
	   , l_option_number
           , l_component_number
           , l_service_number
           , l_service_qty
           , l_service_uom
           , l_header_id
           , l_line_id
           , l_inventory_item_id
           , l_top_model_id  -- 2331301
           , l_serviceable  -- 2331301
		   , l_fulfilled_quantity --5699215
         FROM   oe_order_lines l,
             mtl_system_items m
         WHERE  l.line_id    = p_x_line_rec.service_reference_line_id
         AND    l.inventory_item_id = m.inventory_item_id
         AND    m.organization_id = to_number(OE_Sys_Parameters.VALUE('MASTER_ORGANIZATION_ID'));
Line: 969

          oe_debug_pub.add(  'AFTER SELECT OF ORDER REF' ) ;
Line: 1063

            OE_MSG_PUB.Update_Msg_Context(p_attribute_code =>'ORDERED_ITEM');
Line: 1068

            OE_MSG_PUB.Update_Msg_Context(p_attribute_code => null);
Line: 1147

	    select nvl(max(service_number)+1,1)
	    into l_service_number
	    from oe_order_lines
	    where header_id = l_header_id
	    and   line_number = l_line_number
	    and   shipment_number = l_shipment_number
	    and   nvl(option_number,0) = nvl(l_option_number,0)
	    and   nvl(component_number,0) = nvl(l_component_number,0)
	    and   item_type_code = 'SERVICE';
Line: 1259

        SELECT quantity, unit_of_measure_code
       FROM   cs_customer_products_rg_v
       WHERE  customer_product_id = :b1 AND account_id = :b2 AND rownum < 2 ';
Line: 1264

        SELECT quantity, unit_of_measure_code
        FROM   csi_instance_accts_rg_v
        WHERE  customer_product_id = :b1 AND account_id = :b2 AND rownum < 2 ';
Line: 1275

				SELECT quantity, unit_of_measure_code
				FROM   csi_instance_accts_rg_v
		        WHERE  customer_product_id = :b1 ';
Line: 1283

		l_sql_stat := l_sql_stat ||' SELECT cust_account_id';
Line: 1416

            OE_MSG_PUB.Update_Msg_Context(p_attribute_code =>'ORDERED_ITEM');
Line: 1421

            OE_MSG_PUB.Update_Msg_Context(p_attribute_code => null);
Line: 1438

          OE_MSG_PUB.Update_Msg_Context(p_attribute_code =>'ORDERED_QUANTITY');
Line: 1443

          OE_MSG_PUB.Update_Msg_Context(p_attribute_code => null);
Line: 1643

        OE_MSG_PUB.Update_Msg_Context(p_attribute_code => 'SERVICE_REFERENCE_TYPE_CODE');
Line: 1648

        OE_MSG_PUB.Update_Msg_Context(p_attribute_code => null);
Line: 1659

      SELECT l.line_number
		 , l.shipment_number
		 , l.option_number
           , l.service_number
           , l.ordered_quantity
           , l.order_quantity_uom
           , l.header_id
           , l.line_id
           , l.inventory_item_id
           , l.top_model_line_id  -- 2331301
           , NVL(m.serviceable_product_flag, 'N')
		   , l.fulfilled_quantity --5699215
      INTO   l_line_number
		 , l_shipment_number
		 , l_option_number
           , l_service_number
           , l_service_qty
           , l_service_uom
           , l_header_id
           , l_line_id
           , l_inventory_item_id
           , l_top_model_id   -- 2331301
           , l_serviceable
		   , l_fulfilled_quantity --5699215
      FROM   oe_order_lines l,
             mtl_system_items m
      WHERE  l.line_id    = p_line_rec.service_reference_line_id
      AND    l.inventory_item_id = m.inventory_item_id
      AND    m.organization_id = to_number(OE_Sys_Parameters.VALUE('MASTER_ORGANIZATION_ID'));
Line: 1772

            OE_MSG_PUB.Update_Msg_Context(p_attribute_code =>'ORDERED_ITEM');
Line: 1777

            OE_MSG_PUB.Update_Msg_Context(p_attribute_code => null);
Line: 1788

          OE_MSG_PUB.Update_Msg_Context(p_attribute_code =>'ORDERED_QUANTITY');
Line: 1793

          OE_MSG_PUB.Update_Msg_Context(p_attribute_code => null);
Line: 1807

	    select nvl(max(service_number)+1,1)
	    into l_service_number
	    from oe_order_lines
	    where header_id = l_header_id
	    and   line_number = l_line_number
	    and   shipment_number = l_shipment_number
	    and   option_number = l_option_number
	    and   item_type_code = 'SERVICE';
Line: 1822

           SELECT NVL(MAX(l.line_number)+1,1)
           INTO   l_line_number
           FROM   oe_order_lines l
           WHERE  l.header_id      = p_line_rec.header_id;
Line: 1869

        SELECT quantity
             , unit_of_measure_code
        FROM   cs_customer_products_rg_v
        WHERE  customer_product_id    = p_line_rec.service_reference_line_id
	AND    rownum                 < 2';
Line: 1878

        SELECT quantity
             , unit_of_measure_code
        FROM   csi_instance_accts_rg_v
        WHERE  customer_product_id    = p_line_rec.service_reference_line_id
	AND    rownum                 < 2';
Line: 1970

            OE_MSG_PUB.Update_Msg_Context(p_attribute_code =>'ORDERED_ITEM');
Line: 1975

            OE_MSG_PUB.Update_Msg_Context(p_attribute_code => null);
Line: 1986

          OE_MSG_PUB.Update_Msg_Context(p_attribute_code =>'ORDERED_QUANTITY');
Line: 1991

          OE_MSG_PUB.Update_Msg_Context(p_attribute_code => null);
Line: 2045

       SELECT  /* MOAC_SQL_CHANGE */  l.line_id
       INTO     x_reference_line_id
       FROM     oe_order_lines_all l, oe_order_headers h
       WHERE    h.order_number     = p_order_number
       AND      h.header_id        = l.header_id
       AND      l.line_number      = p_line_number
       AND      l.shipment_number  = p_shipment_number
       AND      nvl(l.option_number, 0) = nvl(p_option_number, 0)
	  AND      l.item_type_code <> 'SERVICE';
Line: 2095

       SELECT 'Y'
      INTO   l_exists
      FROM   user_views
      WHERE  view_name = 'CS_SYSTEMS_RG_V'
      AND    ROWNUM < 2;
Line: 2103

      SELECT 'Y'
    INTO   l_exists
    FROM   user_views
    WHERE  view_name = 'CSI_SYSTEMS_RG_V'
    AND    ROWNUM < 2;
Line: 2115

    SELECT   system_id
    FROM     cs_systems_rg_v
    WHERE    customer_id = :l_customer_id
    AND      system      = :l_system_number';
Line: 2122

    SELECT   system_id
    FROM     csi_systems_rg_v
    WHERE    customer_id = :l_customer_id
    AND      system      = :l_system_number';
Line: 2172

       SELECT 'Y'
      INTO   l_exists
      FROM   user_views
      WHERE  view_name = 'CS_SYSTEMS_RG_V'
      AND    ROWNUM < 2;
Line: 2180

      SELECT 'Y'
      INTO   l_exists
      FROM   user_views
      WHERE  view_name = 'CSI_SYSTEMS_RG_V'
      AND    ROWNUM < 2;
Line: 2192

		SELECT   NAME
          FROM     cs_systems
          WHERE    system_id = :l_system_id'; /*commented for 4731582
Line: 2198

		SELECT   NAME
          FROM     csi_systems_vl
          WHERE    system_id = :l_system_id';/*commented for 4731582
Line: 2251

       SELECT 'Y'
      INTO   l_exists
      FROM   user_views
      WHERE  view_name = 'CS_CUSTOMER_PRODUCTS_RG_V'
      AND    ROWNUM < 2;
Line: 2259

      SELECT 'Y'
      INTO   l_exists
      FROM   user_views
      WHERE  view_name = 'CSI_INSTANCE_ACCTS_RG_V'
      AND    ROWNUM < 2;
Line: 2274

          SELECT   PRODUCT
          FROM     cs_customer_products_rg_v
          WHERE    customer_product_id = :l_customer_product_id';
Line: 2280

          SELECT   PRODUCT
          FROM    csi_instance_accts_rg_v
          WHERE    customer_product_id = :l_customer_product_id';
Line: 2349

        SELECT 'Y'
        INTO   l_exists
        FROM   user_views
        WHERE  view_name = 'CS_CUSTOMER_PRODUCTS_RG_V'
        AND    ROWNUM < 2;
Line: 2357

      SELECT 'Y'
      INTO   l_exists
      FROM   user_views
      WHERE  view_name = 'CSI_INSTANCE_ACCTS_RG_V'
      AND    ROWNUM < 2;
Line: 2373

          SELECT   ORIGINAL_ORDER_LINE_ID
          FROM     cs_customer_products_rg_v
          WHERE    customer_product_id = :l_customer_product_id
	     AND      account_id          = :l_customer_id';
Line: 2380

          SELECT   ORIGINAL_ORDER_LINE_ID
          FROM     csi_instance_accts_rg_v
          WHERE    customer_product_id = :l_customer_product_id';
Line: 2476

       SELECT 'Y'
       INTO   l_exists
       FROM   user_views
       WHERE  view_name = 'CS_CUSTOMER_PRODUCTS_RG_V'
       AND    ROWNUM < 2;
Line: 2484

      SELECT 'Y'
      INTO   l_exists
      FROM   user_views
      WHERE  view_name = 'CSI_INSTANCE_ACCTS_RG_V'
      AND    ROWNUM < 2;
Line: 2498

          OE_SERVICE_UTIL.l_srv_cust_prod_tbl.DELETE; -- 2225343 end
Line: 2503

         'SELECT   CUSTOMER_PRODUCT_ID, PRODUCT, PRODUCT_DESCRIPTION, REFERENCE_NUMBER, CURRENT_SERIAL_NUMBER
          FROM     cs_customer_products_rg_v
          WHERE    account_id          = :l_customer_id' USING p_customer_id;
Line: 2509

         'SELECT   CUSTOMER_PRODUCT_ID, PRODUCT, PRODUCT_DESCRIPTION, REFERENCE_NUMBER, CURRENT_SERIAL_NUMBER
          FROM     csi_instance_accts_rg_v
          WHERE    account_id          = :l_customer_id' USING p_customer_id;
Line: 2681

Select 'EXISTS' into
   l_exists
   from oe_order_lines_all
   where service_reference_line_id = l_line_id;
Line: 2695

PROCEDURE Update_Service_Lines
(p_x_line_tbl IN OUT NOCOPY OE_ORDER_PUB.Line_Tbl_Type,
x_return_status OUT NOCOPY VARCHAR2

 )
IS

l_line_rec         OE_Order_PUB.Line_Rec_Type;
Line: 2716

SELECT line_id
FROM oe_order_lines
WHERE p_service_reference_line_id = service_reference_line_id
ORDER BY line_id;
Line: 2749

          p_x_line_tbl(i).operation= OE_GLOBALS.G_OPR_UPDATE) THEN

   IF l_debug_level  > 0 THEN
       oe_debug_pub.add(  'IN OE_SERVICE_UTIL.UPDATE_SERVICE_LINES.ENTERING OE_SERVICE_UTIL.NEW_SERVICE_LINES' , 1 ) ;
Line: 2804

        OE_LINE_UTIL.Update_Row(p_line_rec => l_new_line_rec);
Line: 2819

        oe_debug_pub.add(  'EXITING OE_SERVICE_UTIL.UPDATE_SERVICE_LINES' , 1 ) ;
Line: 2840

            ,   'Update_Service_Lines'
            );
Line: 2844

END Update_Service_Lines;
Line: 2885

     SELECT l.line_id
     FROM   oe_order_lines l
     WHERE  l.top_model_line_id = l_service_reference_line_id
     AND    l.item_type_code in ('INCLUDED','CLASS','OPTION')
     AND    exists (select null from mtl_system_items mtl where
            mtl.inventory_item_id = l.inventory_item_id and
            mtl.serviceable_product_flag = 'Y');
Line: 2955

     SELECT LINE_ID
       INTO l_line_id
       FROM OE_ORDER_LINES
      WHERE INVENTORY_ITEM_ID = l_inventory_item_id
        AND service_reference_line_id = child_line_id
        AND item_type_code = 'SERVICE'
--      AND ordered_item IS NULL  This AND commented for 2556516
        AND service_reference_type_code = 'ORDER'
      FOR UPDATE NOWAIT;
Line: 3015

      l_line_tbl(I).OPERATION := OE_GLOBALS.G_OPR_UPDATE;
Line: 3080

	l_line_tbl.DELETE;
Line: 3083

      oe_debug_pub.add(  'EXITING UPDATE_SERVICE_FOR_OPTIONS' , 1 ) ;
Line: 3111

            ,  'UPDATE_SERVICE_FOR_OPTIONS'
            );
Line: 3135

   SELECT 'Y'
   INTO l_exists
   FROM all_tables
   where table_name='CSI_INSTALL_PARAMETERS';
Line: 3146

     SELECT freeze_flag
     FROM csi_install_parameters
     WHERE rownum = 1';
Line: 3201

PROCEDURE Update_Service_Option_Numbers
( p_top_model_line_id IN NUMBER )
IS
  CURSOR option_lines IS
  SELECT line_id, option_number
  FROM   oe_order_lines
  WHERE  top_model_line_id = p_top_model_line_id;
Line: 3218

      oe_debug_pub.add(  'ENTERING OE_SERVICE_UTIL.UPDATE_SERVICE_OPTION_NUMBERS' , 2 ) ;
Line: 3226

      UPDATE oe_order_lines_all
      SET    option_number             = l_option_numbers(i)
      WHERE  service_reference_line_id = l_line_ids(i)
      AND service_reference_type_code  = l_ref_type_code; -- For Bug 3087370
Line: 3232

      oe_debug_pub.add(  'LEAVING UPDATE_SERVICE_OPTION_NUMBERS' , 2 ) ;