DBA Data[Home] [Help]

APPS.OE_PROCESS_REQUISITION_PVT SQL Statements

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

Line: 17

g_updated_quantity          NUMBER;
Line: 18

g_line_updated_date         DATE;
Line: 23

g_updated_quantity2         NUMBER; --Bug 14211120
Line: 130

      oe_debug_pub.add( ' RETURN. No notification will be send as nothing has updated on the requisition', 5);
Line: 136

  select to_char(oe_wf_key_s.nextval) into l_wf_item_key
  from dual;
Line: 186

      oe_debug_pub.add( 'Sending notification for requisition line quantity update', 5);
Line: 189

    l_process_name := 'ISO_QTY_UPDATE';
Line: 240

                               , 'UPDATED_QTY'
                               , g_updated_quantity);
Line: 246

                             , 'LINE_UPDATE_DATE'
                             , g_line_updated_date);
Line: 259

                               , 'UPDATED_QTY2'
                               , g_updated_quantity2);
Line: 271

      oe_debug_pub.add( 'Sending notification for requisition line date update', 5);
Line: 274

    l_process_name := 'ISO_SCH_DATE_UPDATE';
Line: 337

                             , 'LINE_UPDATE_DATE'
                             , g_line_updated_date);
Line: 348

      oe_debug_pub.add( 'Sending notification for requisition line quantity and date update', 5);
Line: 351

    l_process_name := 'ISO_QTY_SCH_DATE_UPDATE';
Line: 402

                               , 'UPDATED_QTY'
                               , g_updated_quantity);
Line: 420

                             , 'LINE_UPDATE_DATE'
                             , g_line_updated_date);
Line: 433

                               , 'UPDATED_QTY2'
                               , g_updated_quantity2);
Line: 522

      select user_name
      into l_user_name
      from fnd_user
      where user_id = FND_GLOBAL.USER_ID;
Line: 576

Procedure Update_Internal_Requisition -- Body definition
(  P_Header_id              IN  NUMBER
,  P_Line_id                IN  NUMBER
,  P_Line_ids               IN  VARCHAR2
,  p_num_records            IN  NUMBER
,  P_Req_Header_id          IN   NUMBER
,  P_Req_Line_id            IN   NUMBER
,  P_Quantity_Change        IN  NUMBER
,  P_Quantity2_Change       IN  NUMBER --Bug 14211120
,  P_New_Schedule_Ship_Date IN  DATE
,  P_Cancel_Order           IN  BOOLEAN
,  P_Cancel_Line            IN  BOOLEAN
,  X_msg_count              OUT NOCOPY NUMBER
,  X_msg_data               OUT NOCOPY VARCHAR2
,  X_return_status	       OUT NOCOPY VARCHAR2
) IS
--
-- TYPE Line_id_tbl_TYPE is TABLE OF NUMBER;
Line: 609

l_call_po_api_for_update BOOLEAN := FALSE;
Line: 626

select source_document_line_id
from   oe_order_lines_all
where  header_id = p_header_id
and    open_flag = 'N'
and    nvl(cancelled_flag, 'N') = 'Y'; -- Cursor added for 8583903
Line: 639

    oe_debug_pub.add(  'ENTERING OE_Process_Requisition_Pvt.Update_Internal_Requisition', 1 ) ;
Line: 667

      oe_debug_pub.add( ' Nothing to update on Requisition', 5 ) ;
Line: 675

  SELECT org_id, segment1
  INTO   l_target_org_id, g_requisition_number
  FROM   po_requisition_Headers_all
  WHERE  requisition_header_id = p_req_Header_id;
Line: 686

      oe_debug_pub.add( ' Calling PO_RCO_Validation_GRP.Update_ReqCancel_from_SO', 1 ) ;
Line: 690

    select order_number, last_update_date
    into   g_sales_order_number, g_order_cancellation_date
    from   oe_order_headers_all
    where  header_id = p_header_id;
Line: 708

    PO_RCO_Validation_GRP.Update_ReqCancel_from_SO
    ( p_api_version      => 4.0 -- Bug12970870, 14211120
    , p_req_line_id_tbl  => l_req_line_id_tbl
    --, p_req_can_qty_tbl  => l_req_can_qty_tbl -- Bug12970870
    , p_req_can_prim_qty_tbl => l_req_can_qty_tbl -- Bug 14211120
    , p_req_can_sec_qty_tbl  => l_req_can_qty2_tbl -- Bug 14211120
    , p_req_can_all      => TRUE              -- Bug 12970870
--    , p_req_line_id      => NULL -- Header Level Cancellation -- Api Modified for 8583903
--    , p_req_hdr_id       => P_Req_Header_id
    , x_return_status    => l_return_status
    );
Line: 723

      oe_debug_pub.add( ' After PO_RCO_Validation_GRP.Update_ReqCancel_from_SO '||l_return_status, 1 ) ;
Line: 745

      oe_debug_pub.add( ' Calling PO_RCO_Validation_GRP.Update_ReqCancel_from_SO', 1 ) ;
Line: 749

    select order_number
    into   g_sales_order_number
    from   oe_order_headers_all
    where  header_id = p_header_id;
Line: 761

    select line_number+(shipment_number/power(10,length(shipment_number))) as line_num
    -- Added for bug #8974535
         , nvl(cancelled_quantity,0)
         , last_update_date
    into   g_sales_ord_line_num
         , g_ISO_cancelled_quantity
         , g_line_cancellation_date
    from   oe_order_lines_all
    where  line_id = p_line_id;
Line: 771

    select items.concatenated_segments
         , prl.line_num
         , prl.quantity
         , prl.secondary_quantity --Bug 14211120
    into   g_inventory_item_name
         , g_requisition_line_number
         , g_requested_quantity
         , g_requested_quantity2 --Bug 14211120
    from   mtl_system_items_b_kfv items
         , po_requisition_lines_all prl
         , financials_system_params_all fsp
    where  fsp.org_id = prl.org_id
    and    fsp.inventory_organization_id = items.organization_id
    and    prl.item_id = items.inventory_item_id
    and    prl.requisition_line_id = P_Req_Line_id;
Line: 797

    PO_RCO_Validation_GRP.Update_ReqCancel_from_SO
    ( p_api_version      => 4.0 --Bug12970870 14211120
    , p_req_line_id_tbl  => l_req_line_id_tbl
    --, p_req_can_qty_tbl  => l_req_can_qty_tbl -- Bug12970870
    , p_req_can_prim_qty_tbl  => l_req_can_qty_tbl -- Bug 14211120
    , p_req_can_sec_qty_tbl   => l_req_can_qty2_tbl -- Bug 14211120
    , p_req_can_all      => FALSE --Bug12970870
--    , p_req_line_id      => P_Req_Line_id
--    , p_req_hdr_id       => P_Req_Header_id -- Api modified for 8583903
    , x_return_status    => l_return_status
    );
Line: 812

      oe_debug_pub.add( ' After PO_RCO_Validation_GRP.Update_ReqCancel_from_SO '||l_return_status, 5 ) ;
Line: 838

      oe_debug_pub.add( ' Quantity OR Date changed. Req Line has to be updated', 5 ) ;
Line: 841

    select order_number
    into   g_sales_order_number
    from   oe_order_headers_all
    where  header_id = p_header_id;
Line: 853

    select line_number+(shipment_number/power(10,length(shipment_number))) as line_num
    -- Added for bug 8974535
--         , ordered_quantity
         , schedule_ship_date
         , schedule_arrival_date
         , last_update_date
    into   g_sales_ord_line_num
--         , g_updated_quantity
         , g_schedule_ship_date
         , g_schedule_arrival_date
         , g_line_updated_date
    from   oe_order_lines_all
    where  line_id = p_line_id;
Line: 868

    select items.concatenated_segments
         , prl.line_num
         , prl.quantity
         , prl.secondary_quantity --Bug 14211120
         , prl.need_by_date
         , prl.need_by_date
    into   g_inventory_item_name
         , g_requisition_line_number
         , g_requested_quantity
         , g_requested_quantity2 --Bug 14211120
         , g_need_by_date
         , l_Req_Line_NeedByDate
    from   mtl_system_items_b_kfv items
         , po_requisition_lines_all prl
         , financials_system_params_all fsp
    where  fsp.org_id = prl.org_id
    and    fsp.inventory_organization_id = items.organization_id
    and    prl.item_id = items.inventory_item_id
    and    prl.requisition_line_id = P_Req_Line_id;
Line: 888

    g_updated_quantity := g_requested_quantity + NVL(P_Quantity_Change,0);
Line: 889

    g_updated_quantity2 := g_requested_quantity2 + NVL(P_Quantity2_Change,0); --Bug 14211120
Line: 910

          oe_debug_pub.add( ' Ordered Quantity is changed. Update Req', 5 ) ;
Line: 913

        l_call_po_api_for_update := TRUE;
Line: 918

          oe_debug_pub.add( ' Ordered Quantity and Schedule Ship/Arrival Date are changed. Update Req', 5 ) ;
Line: 921

        l_call_po_api_for_update := TRUE;
Line: 929

        oe_debug_pub.add( ' Ordered Quantity is changed. Update Req', 5 ) ;
Line: 934

      l_call_po_api_for_update := TRUE;
Line: 942

        g_updated_quantity := NULL;
Line: 943

        l_call_po_api_for_update := FALSE;
Line: 953

          oe_debug_pub.add( ' Schedule Ship/Arrival Date is changed. Update Req', 5 ) ;
Line: 955

        g_updated_quantity := NULL;
Line: 957

        l_call_po_api_for_update := TRUE;
Line: 962

    IF l_call_po_api_for_update THEN

      IF l_debug_level > 0 THEN
        oe_debug_pub.add( ' Calling PO_RCO_Validation_GRP.Update_ReqChange_from_SO', 1 ) ;
Line: 970

      PO_RCO_Validation_GRP.Update_ReqChange_from_SO
      ( p_api_version      => 3.0 --Bug 14211120
      , p_req_line_id      => P_Req_Line_id
      --, p_delta_quantity   => P_Quantity_Change --Bug 14211120
      , p_delta_quantity_prim => P_Quantity_Change --Bug 14211120
      , p_delta_quantity_sec  => P_Quantity2_Change --Bug 14211120
      , p_new_need_by_date => l_New_Schedule_Arrival_Date -- l_New_Schedule_Ship_Date
      , x_return_status    => l_return_status
      );
Line: 983

        oe_debug_pub.add( ' After PO_RCO_Validation_GRP.Update_ReqChange_from_SO '||l_return_status, 1);
Line: 1023

        oe_debug_pub.add( ' Update_ReqChange_from_SO is not called as there is no valid change to process', 1);
Line: 1028

  IF OE_Schedule_GRP.G_ISO_Planning_Update THEN
    IF l_debug_level > 0 THEN
      oe_debug_pub.add(' The caller for this change is Planning. Hence notification will not be send',5);
Line: 1145

  g_updated_quantity := NULL;
Line: 1146

  g_line_updated_date := NULL;
Line: 1151

  g_updated_quantity2 := NULL; --Bug 14211120
Line: 1159

    oe_debug_pub.add(  'EXITING OE_Process_Requisition_Pvt.Update_Internal_Requisition', 1 ) ;
Line: 1174

    oe_debug_pub.add(  ' When Others of OE_Process_Requisition_Pvt.Update_Internal_Requisition '||sqlerrm,1);
Line: 1177

      OE_MSG_PUB.Add_Exc_Msg (G_PKG_NAME, 'Update_Internal_Requisition');
Line: 1183

End Update_Internal_Requisition;