DBA Data[Home] [Help]

APPS.OE_DROP_SHIP_GRP SQL Statements

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

Line: 32

Select Count(*)
From OE_DROP_SHIP_SOURCES
Where Drop_Ship_Source_ID = P_Drop_Ship_Source_ID ;
Line: 54

PROCEDURE :  Insert_OE_Drop_Ship_Source
DESCRIPTION:
-----------------------------------------------------------------*/

PROCEDURE Insert_OE_Drop_Ship_Sources
         (P_Drop_Ship_Source_ID         In Number,
          P_Header_ID                   In Number,
          P_Line_ID                     In Number,
          P_Org_ID                      In Number,
          P_Destination_Organization_ID In Number,
          P_Requisition_Header_ID       In Number,
          P_Requisition_Line_ID         In Number,
          P_PO_Header_ID                In Number,
          P_PO_Line_ID                  In Number,
          P_Line_Location_ID            In Number,                                        P_PO_Release_ID               In Number Default Null)
IS
--
l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;
Line: 75

   Insert Into OE_Drop_Ship_Sources
   (
    Drop_Ship_Source_ID,
    Header_ID,
    Line_ID,
    Org_ID,
    Destination_Organization_ID,
    Requisition_Header_ID,
    Requisition_Line_ID,
    PO_Header_ID,
    PO_Line_ID,
    Line_Location_ID,
    PO_Release_ID,
    Creation_Date,
    Created_By,
    Last_Update_Date,
    Last_Updated_By
   )
    Values
   (
    P_Drop_Ship_Source_ID,
    P_Header_ID,
    P_Line_ID,
    P_Org_ID,
    P_Destination_Organization_ID,
    P_Requisition_Header_ID,
    P_Requisition_Line_ID,
    P_PO_Header_ID,
    P_PO_Line_ID,
    P_Line_Location_ID,
    P_PO_Release_ID,
    Trunc(Sysdate),
    Nvl(To_Number(FND_PROFILE.VALUE('USER_ID')),-1),
    Trunc(Sysdate),
    Nvl(To_Number(FND_PROFILE.VALUE('USER_ID')),-1)
   );
Line: 112

End Insert_OE_Drop_Ship_Sources;
Line: 115

PROCEDURE :  Update_Req_Info
DESCRIPTION: Update_Req_Info is an OE procedure that is called by
             Oracle Purchasing to update requisition information for
             a drop shipped line. This procedure is called in the
             Requisition Import (ReqImport) process of Oracle Purchasing
-----------------------------------------------------------------*/

PROCEDURE Update_Req_Info
              (P_API_Version              In  Number,
P_Return_Status out nocopy Varchar2,

P_Msg_Count out nocopy Number,

P_MSG_Data out nocopy Varchar2,

               P_Interface_Source_Code    In  Varchar2,
               P_Interface_Source_Line_ID In  Number,
               P_Requisition_Header_ID    In  Number,
               P_Requisition_Line_ID      In  Number)
IS

L_API_Name    Constant Varchar2(30) := 'UPDATE_REQ_INFO';
Line: 142

SELECT Drop_Ship_Source_ID,
       Header_ID,
       Line_ID,
       Org_ID,
       Destination_Organization_ID,
       Requisition_Header_ID,
       Requisition_Line_ID,
       PO_Header_ID,
       PO_Line_ID
FROM  OE_Drop_Ship_Sources
WHERE Drop_Ship_source_ID = P_Interface_Source_Line_ID
FOR UPDATE OF Requisition_Header_ID NOWAIT; -- bug 4503620
Line: 160

    SavePoint Update_Req_Info_GRP;
Line: 184

      Rollback to Update_Req_INfo_GRP;
Line: 206

            UPDATE OE_Drop_Ship_Sources
            SET Requisition_Header_ID = P_Requisition_Header_ID,
	           Requisition_LIne_ID   = P_Requisition_Line_ID,
	           Last_Update_Date      = Trunc(Sysdate),
	           Last_Updated_By       = Nvl(To_Number(FND_PROFILE.VALUE
                                                       ('USER_ID')),-1)
           WHERE Current of L_OE_Drop_Ship_Source_Csr;
Line: 216

           Insert_OE_Drop_Ship_Sources
               (P_Drop_Ship_Source_ID => G_Drop_Ship_Source_ID,
                P_Header_ID           => G_Header_ID,
                P_Line_ID             => G_Line_ID,
                P_Org_ID              => G_Org_ID,
                P_Destination_Organization_ID =>
                G_Destination_Organization_ID,
                P_Requisition_Header_ID =>
                P_Requisition_Header_ID,
                P_Requisition_LIne_ID => P_Requisition_Line_ID,
                P_PO_Header_ID        => Null,
                P_PO_Line_ID          => Null,
                P_Line_Location_ID    => Null);
Line: 235

       Rollback to Update_Req_Info_Grp;
Line: 237

         oe_debug_pub.add('OEXUDSHB.pls:Update_Req_Info- unable to lock the line',1);
Line: 246

       Rollback to Update_Req_Info_Grp;
Line: 254

END Update_Req_Info;
Line: 258

PROCEDURE :  Update_All_Reqs_In_Process
DESCRIPTION: Update_All_Reqs_In_Process is an OE procedure that is
             called by Oracle Purchasing to update requisition
             information for a drop shipped line.  This procedure is
             called in the Requisition Import (ReqImport) process of
             Oracle Purchasing.
-----------------------------------------------------------------*/

PROCEDURE Update_All_Reqs_In_Process
(P_API_Version             In  Number,
P_Return_Status out nocopy Varchar2,

P_Msg_Count out nocopy Number,

P_MSG_Data out nocopy Varchar2,

P_Requisition_Header_ID    In  Number,
P_Request_Id               In  Number,
P_Process_Flag             In  Varchar2)
IS
L_API_Name                 Constant Varchar2(30)
							:= 'UPDATE_ALL_REQS_IN_PROCESS';
Line: 290

SELECT Interface_Source_Code,Interface_source_line_id,
        requisition_header_id,requisition_line_id
FROM po_requisitions_interface
WHERE requisition_header_id = P_Requisition_Header_ID
      AND process_flag      = P_Process_Flag
      AND request_id        = P_Request_Id;
Line: 301

  SAVEPOINT UPDATE_ALL_REQS_IN_PROCESS;
Line: 322

     Update_Req_Info(1.0,
                     L_Return_Status,
                     L_Msg_Count,
                     L_MSG_Data,
                     L_Interface_Source_Code,
                     L_Interface_Source_Line_ID,
                     L_Requisition_Header_ID,
                     L_Requisition_Line_ID);
Line: 347

      ROLLBACK TO UPDATE_ALL_REQS_IN_PROCESS;
Line: 355

END Update_All_Reqs_In_Process;
Line: 358

PROCEDURE :  Update_PO_Info
DESCRIPTION: Update_PO_Info is an OE procedure that is called by
             Oracle Purchasing to update purchase order information
             for a drop shipped line. This procedure is called in the
             Auto create process of Oracle Purchasing
-----------------------------------------------------------------*/

PROCEDURE Update_PO_Info (P_API_Version          In  Number,
P_Return_Status out nocopy Varchar2,

P_Msg_Count out nocopy Number,

P_MSG_Data out nocopy Varchar2,

                          P_Req_Header_ID        In  Number,
                          P_Req_Line_ID          In  Number,
                          P_PO_Header_Id         In  Number,
                          P_PO_Line_Id           In  Number,
                          P_Line_Location_ID     In  Number,
                          P_PO_Release_ID        In  Number Default Null)
IS

L_API_Name    Constant Varchar2(30) := 'UPDATE_PO_INFO';
Line: 385

IS SELECT Drop_Ship_Source_ID,
	  Header_ID,
	  Line_ID,
	  Org_ID,
	  Destination_Organization_ID,
          Requisition_Header_ID,
          Requisition_Line_ID,
          PO_Header_ID,
	  PO_Line_ID
   FROM  OE_Drop_Ship_Sources
   WHERE Requisition_Line_ID   = P_Req_Line_ID
   AND Requisition_Header_ID = P_Req_Header_ID
   FOR Update of PO_Header_ID NOWAIT; -- bug 4503620
Line: 404

    SavePoint Update_PO_Info_GRP;
Line: 429

               Update OE_Drop_Ship_Sources
               SET PO_Header_ID     = P_PO_Header_ID,
	           PO_Line_ID       = P_PO_Line_ID,
	           Line_Location_ID = P_Line_Location_ID,
	           PO_Release_ID    = Nvl(P_PO_Release_Id,PO_Release_ID),
	           Last_Update_Date = Trunc(Sysdate),
	           Last_Updated_By  = Nvl(To_Number(FND_PROFILE.VALUE('USER_ID')),-1)
               WHERE Current of L_OE_Drop_Ship_Source_Csr;
Line: 438

              Insert_OE_Drop_Ship_Sources
                (P_Drop_Ship_Source_ID => G_Drop_Ship_Source_ID,
                 P_Header_ID           => G_Header_ID,
                 P_Line_ID             => G_Line_ID,
                 P_Org_ID              => G_Org_ID,
                 P_Destination_Organization_ID => G_Destination_Organization_ID,
                 P_Requisition_Header_ID => G_Requisition_Header_ID,
                 P_Requisition_Line_ID => G_Requisition_Line_ID,
                 P_PO_Header_ID        => P_PO_Header_ID,
                 P_PO_Line_ID          => P_PO_Line_ID,
                 P_Line_Location_ID    => P_Line_Location_ID,
		 P_PO_Release_Id       => P_PO_Release_ID);
Line: 457

       Rollback to Update_PO_Info_GRP;
Line: 459

         oe_debug_pub.add('OEXUDSHB.pls:Update_PO_Info-unable to lock the line',1);
Line: 468

       ROLLBACK TO Update_PO_Info_GRP;
Line: 476

END Update_PO_Info;
Line: 489

 SELECT Line_Id
 FROM OE_Drop_Ship_Sources
 WHERE Requisition_Line_ID = P_Req_Line_ID;
Line: 521

 SELECT Line_Id
 FROM OE_Drop_Ship_Sources
 WHERE Line_Location_Id = P_PO_Line_Location_ID;
Line: 545

Procedure   : Update_Drop_Ship_Links
Description : This procedure will be called by PO
in the case of supplier initiated PO cancellation.
This will update line in oe dropship sources
with new requistion id.
----------------------------------------------------*/

Procedure Update_Drop_Ship_Links
( p_api_version          IN             NUMBER
 ,p_po_header_id         IN             NUMBER
 ,p_po_line_id           IN             NUMBER
 ,p_po_line_location_id  IN             NUMBER
 ,p_po_release_id        IN             NUMBER
 ,p_new_req_hdr_id       IN             NUMBER
 ,p_new_req_line_id      IN             NUMBER
 ,x_msg_data             OUT NOCOPY     VARCHAR2
 ,x_msg_count            OUT NOCOPY     NUMBER
 ,x_return_status        OUT NOCOPY     VARCHAR2
)
IS
l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;
Line: 575

  SAVEPOINT Update_Drop_Ship_Links_GRP;
Line: 578

     OE_DEBUG_PUB.Add('Entering Update_Drop_Ship_Links...',1);
Line: 594

     UPDATE oe_drop_ship_sources
        SET requisition_header_id = p_new_req_hdr_id,
            requisition_line_id   = p_new_req_line_id,
            po_header_id          = NULL,
            po_line_id            = NULL,
            po_release_id         = NULL,
            line_location_id      = NULL,
            last_update_date      = Trunc(Sysdate),
            last_updated_by       = NVL(To_Number(FND_PROFILE.VALUE('USER_ID')),-1),
            last_update_login     = NVL(To_Number(FND_PROFILE.VALUE('USER_ID')),-1)
      WHERE line_id   = l_line_id
        AND header_id = l_header_id;
Line: 608

         OE_DEBUG_PUB.Add('Updated the Drop Ship Links...',1);
Line: 614

    OE_DEBUG_PUB.Add('Exiting  Update_Drop_Ship_Links...',1);
Line: 622

          OE_DEBUG_PUB.Add('No DAta Found in Update_Drop_Ship_Links...',1);
Line: 627

       ROLLBACK TO Update_Drop_Ship_Links;
Line: 632

       ROLLBACK TO Update_Drop_Ship_Links;
Line: 640

                 'Update_Drop_Ship_Links');
Line: 645

END Update_Drop_Ship_Links;
Line: 667

  SELECT ol.line_id
   INTO  l_line_id
   FROM  oe_order_lines_all  ol,
         oe_drop_ship_sources   od,
         rcv_transactions       rt
   WHERE ol.line_id          = od.line_id
     AND ol.source_type_code = 'EXTERNAL'
     AND od.po_header_id     = rt.po_header_id
     AND od.po_line_id       = rt.po_line_id
     AND od.line_location_id = rt.po_line_location_id
     AND rt.transaction_id   = p_rcv_transaction_id
     AND ROWNUM = 1;
Line: 744

      SELECT oel.line_id,
             oel.header_id,
             oel.org_id
      INTO   x_line_id,
             x_header_id,
             x_org_id
      FROM   oe_drop_ship_sources ds,
             oe_order_lines_all oel
      WHERE  line_location_id       = p_po_line_location_id
      AND    oel.line_id            = ds.line_id
      AND    oel.header_id          = ds.header_id
      AND    nvl(oel.open_flag,'Y') = 'Y'
      AND    oel.shipped_quantity is NULL;
Line: 779

            SELECT oel.line_id,
                   oel.header_id,
                   oel.org_id
            INTO   x_line_id,
                   x_header_id,
                   x_org_id
            FROM   oe_drop_ship_sources ds,
                   oe_order_lines_all oel
            WHERE  line_location_id       = p_po_line_location_id
            AND    oel.line_id            = ds.line_id
            AND    oel.header_id          = ds.header_id;
Line: 804

              SELECT oel.header_id,
                     oel.org_id
              INTO   x_header_id,
                     x_org_id
              FROM   oe_drop_ship_sources ds,
                     oe_order_lines_all oel
              WHERE  line_location_id = p_po_line_location_id
              AND    oel.line_id      = ds.line_id
              AND    oel.header_id    = ds.header_id
              AND    rownum           = 1;
Line: 831

    SELECT MAX(OL.line_id)
    INTO   x_line_id
    FROM   oe_order_lines_all   OL,
           oe_drop_ship_sources OD,
           rcv_transactions     RT
    WHERE  OL.line_id          = OD.line_id
    AND    OL.source_type_code = 'EXTERNAL'
    AND    OD.po_header_id     = RT.po_header_id
    AND    OD.po_line_id       = RT.po_line_id
    AND    OD.line_location_id = RT.po_line_location_id
    AND    RT.transaction_id   = p_rcv_transaction_id
    AND    OL.shipped_quantity is NOT NULL;
Line: 849

  SELECT count(*)
  INTO   x_num_lines
  FROM   oe_drop_ship_sources ds,
         oe_order_lines_all oel
  WHERE  line_location_id  = p_po_line_location_id
  AND    oel.line_id       = ds.line_id
  AND    oel.header_id     = ds.header_id;
Line: 971

          OE_DEBUG_PUB.Add('No DAta Found in Update_Drop_Ship_Links...',1);
Line: 976

       ROLLBACK TO Update_Drop_Ship_Links;
Line: 1089

  SELECT org_id
  INTO   l_po_org_id  -- l_num_lines 4148163
  FROM   po_line_locations_all
  WHERE  line_location_id = p_po_line_location_id;
Line: 1159

  SELECT order_number
  INTO   x_order_line_info_rec.sales_order_number
  FROM   oe_order_headers_all --oe_order_headers --Changes for BUG#6032405
  WHERE  header_id = l_header_id;
Line: 1174

    SELECT ship_to_contact_id,
           deliver_to_contact_id,
           ship_to_org_id,
           deliver_to_org_id,
           sold_to_org_id,
           shipping_method_code,
           shipping_instructions,
           packing_instructions,
           inventory_item_id,
           item_identifier_type,
           ordered_item,
	   ordered_item_id, -- Bug# 13100856
           user_item_description,
           cust_po_number,
           customer_line_number,
           customer_shipment_number,
           DECODE(p_mode, 0, null, RTRIM(line_number || '.'
           || shipment_number || '.'
           || option_number || '.'
           || component_number || '.'
           || service_number, '.')),
           DECODE(p_mode, 0, null, ordered_quantity),
           DECODE(p_mode, 0, null, shipped_quantity),
           DECODE(p_mode, 0, null, ordered_quantity2), -- INVCONV
           DECODE(p_mode, 0, null, shipped_quantity2), -- INVCONV
           DECODE(p_mode, 0, null, oelup.meaning)
    INTO   l_ship_to_contact_id,
           l_deliver_to_contact_id,
           l_ship_to_org_id,
           l_deliver_to_org_id,
           l_sold_to_org_id,
           l_shipping_method_code,
           x_order_line_info_rec.shipping_instructions,
           x_order_line_info_rec.packing_instructions,
           l_inventory_item_id,
           l_item_identifier_type,
           l_ordered_item,
	   l_ordered_item_id, -- Bug# 13100856
           x_order_line_info_rec.customer_product_description,
           x_order_line_info_rec.customer_po_number,
           x_order_line_info_rec.customer_po_line_number,
           x_order_line_info_rec.customer_po_shipment_number,
           x_order_line_info_rec.sales_order_line_number,
           x_order_line_info_rec.sales_order_line_ordered_qty,
           x_order_line_info_rec.sales_order_line_shipped_qty,
           x_order_line_info_rec.sales_order_line_ordered_qty2, -- INVCONV
           x_order_line_info_rec.sales_order_line_shipped_qty2, -- INVCONV

           x_order_line_info_rec.sales_order_line_status
    FROM   oe_order_lines_all oel, --oe_order_lines oel,   -- Changes for BUG#6032405
           oe_lookups oelup
    WHERE  line_id = l_line_id
    AND    oelup.lookup_code = oel.flow_status_code
    AND    oelup.lookup_type = 'LINE_FLOW_STATUS';
Line: 1407

      SELECT ship_method_meaning
      INTO   x_order_line_info_rec.shipping_method
      FROM   wsh_carrier_services wshca
      WHERE  SHIP_METHOD_CODE = l_shipping_method_code;
Line: 1493

 SELECT line_id
   FROM oe_drop_ship_sources
  WHERE (p_entity = 'PO_REQUISITION_HEADERS' AND
            requisition_header_id = cp_entity_id) OR
         (p_entity = 'PO_HEADERS' AND
             po_header_id = cp_entity_id)
  FOR UPDATE NOWAIT;
Line: 1531

         DELETE
         FROM oe_drop_ship_sources
         WHERE (p_entity = 'PO_REQUISITION_HEADERS' AND
                     requisition_header_id = p_entity_id_tbl(I)) OR
                (p_entity = 'PO_HEADERS' AND
                     po_header_id = p_entity_id_tbl(I));
Line: 1621

              SELECT count(*)
                INTO l_count
                FROM oe_drop_ship_sources ds,
                     oe_order_lines_all l
               WHERE requisition_header_id = p_entity_id_tbl(I)
                 AND l.line_id        = ds.line_id
                 AND l.header_id      = ds.header_id
                 AND nvl(l.open_flag,'Y') = 'Y'
                 AND l.shipped_quantity is NULL;
Line: 1631

              SELECT count(*)
                INTO l_count
                FROM oe_drop_ship_sources ds,
                     oe_order_lines_all l
               WHERE po_header_id = p_entity_id_tbl(I)
                 AND l.line_id        = ds.line_id
                 AND l.header_id      = ds.header_id
                 AND nvl(l.open_flag,'Y') = 'Y'
                 AND l.shipped_quantity is NULL;