DBA Data[Home] [Help]

APPS.WSH_PO_INTEGRATION_GRP SQL Statements

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

Line: 249

  UPDATE wsh_delivery_details
  SET released_status = 'P'
  where source_header_id = p_in_rec.header_ids(i)
        AND source_code = 'PO'
  RETURNING delivery_detail_id BULK COLLECT INTO l_detail_tab;
Line: 263

  WSH_INTEGRATION.DBI_Update_Detail_Log
   (p_delivery_detail_id_tab => l_detail_tab,
    p_dml_type               => 'UPDATE',
    x_return_status          => l_dbi_rs);
Line: 439

  SELECT wth.shipment_header_id, wth.last_update_date, wnd.last_update_date
  FROM   wsh_inbound_txn_history wth, wsh_new_deliveries wnd
  WHERE  receipt_number like p_respNum
  AND    shipment_header_id = wnd.delivery_id
  AND    transaction_type = 'ROUTING_RESPONSE'
  ORDER BY NVL(revision_number, -99) DESC;
Line: 446

  CURSOR c_GetLastUpdateDates(p_delId NUMBER) IS
  SELECT MAX(wda.last_update_date), MAX(wdd.last_update_date)
  FROM wsh_delivery_assignments_v wda,wsh_delivery_details wdd
  WHERE wdd.delivery_detail_id = wda.delivery_detail_id
  AND   wda.delivery_id = p_delId;
Line: 454

  CURSOR c_GetPTripLastUpdateDate(p_delId NUMBER) IS
  SELECT wts.last_update_date, wdl.last_update_date, wt.last_update_date
  FROM   wsh_new_deliveries wnd,
         wsh_delivery_legs wdl,
         wsh_trip_stops wts,
         wsh_trips wt
  WHERE  wnd.delivery_id = p_delId
  AND    wnd.delivery_id = wdl.delivery_id
  AND    wdl.pick_up_stop_id = wts.stop_id
  AND    wnd.initial_pickup_location_id = wts.stop_location_id
  AND    wts.trip_id = wt.trip_id
  AND    wnd.shipping_control='BUYER';
Line: 469

  CURSOR c_GetDTripLastUpdateDate(p_delId NUMBER) IS
  SELECT wts.last_update_date, wdl.last_update_date, wt.last_update_date
  FROM   wsh_new_deliveries wnd,
         wsh_delivery_legs wdl,
         wsh_trip_stops wts,
         wsh_trips wt
  WHERE  wnd.delivery_id = p_delId
  AND    wnd.delivery_id = wdl.delivery_id
  AND    wdl.pick_up_stop_id = wts.stop_id
  AND    wnd.ultimate_dropoff_location_id = wts.stop_location_id
  AND    wts.trip_id = wt.trip_id
  AND    wnd.shipping_control='BUYER';
Line: 482

  CURSOR c_GetCarrierLastUpdateDate(p_delId NUMBER) IS
  SELECT MAX(wcs.last_update_date), MAX(wocs.last_update_date)
  FROM   wsh_new_deliveries wnd, wsh_carrier_sites wcs,
         wsh_org_carrier_sites wocs
  WHERE wnd.organization_id = wocs.organization_id
  AND   wcs.carrier_id = wnd.carrier_id
  AND   wnd.delivery_id = p_delId;
Line: 491

  l_wndUpdateDate	DATE;
Line: 492

  l_wdaUpdateDate	DATE;
Line: 493

  l_wddUpdateDate	DATE;
Line: 494

  l_wdlUpdateDate	DATE;
Line: 495

  l_wtsUpdateDate	DATE;
Line: 496

  l_wtUpdateDate	DATE;
Line: 497

  l_wdlUpdateDate1	DATE;
Line: 498

  l_wtsUpdateDate1	DATE;
Line: 499

  l_wtUpdateDate1	DATE;
Line: 500

  l_ibUpdateDate	DATE;
Line: 501

  l_wcsUpdateDate	DATE;
Line: 502

  l_wocsUpdateDate	DATE;
Line: 544

  FETCH c_GetDelId INTO l_deliveryId, l_ibUpdateDate, l_wndUpdateDate;
Line: 549

    wsh_debug_sv.log(l_module_name, 'last update date in IB TXN history', l_ibUpdateDate);
Line: 550

    wsh_debug_sv.log(l_module_name, 'WND Last Update Date', l_wndUpdateDate);
Line: 555

  OPEN c_GetLastUpdateDates(l_deliveryId);
Line: 556

  FETCH c_GetLastUpdateDates INTO l_wdaUpdateDate, l_wddUpdateDate;
Line: 557

  CLOSE c_GetLastUpdateDates;
Line: 559

  OPEN c_GetPTripLastUpdateDate(l_deliveryId);
Line: 560

  FETCH c_GetPTripLastUpdateDate INTO l_wtsUpdateDate, l_wdlUpdateDate, l_wtUpdateDate;
Line: 561

  CLOSE c_GetPTripLastUpdateDate;
Line: 563

  OPEN c_GetDTripLastUpdateDate(l_deliveryId);
Line: 564

  FETCH c_GetDTripLastUpdateDate INTO l_wtsUpdateDate1, l_wdlUpdateDate1, l_wtUpdateDate1;
Line: 565

  CLOSE c_GetDTripLastUpdateDate;
Line: 567

  OPEN c_GetCarrierLastUpdateDate(l_deliveryId);
Line: 568

  FETCH c_GetCarrierLastUpdateDate INTO l_wcsUpdateDate, l_wocsUpdateDate;
Line: 569

  CLOSE c_GetCarrierLastUpdateDate;
Line: 572

   wsh_debug_sv.log(l_module_name, 'WND Update Date', l_wndUpdateDate);
Line: 573

   wsh_debug_sv.log(l_module_name, 'WDA Update Date', l_wdaUpdateDate);
Line: 574

   wsh_debug_sv.log(l_module_name, 'WDD Update Date', l_wddUpdateDate);
Line: 575

   wsh_debug_sv.log(l_module_name, 'WTS Update Date using Pickup Stop', l_wtsUpdateDate);
Line: 576

   wsh_debug_sv.log(l_module_name, 'WDL Update Date using Pickup Stop', l_wdlUpdateDate);
Line: 577

   wsh_debug_sv.log(l_module_name, 'WT  Update Date using Pickup Stop',  l_wtUpdateDate);
Line: 578

   wsh_debug_sv.log(l_module_name, 'WTS Update Date using Dropoff Stop', l_wtsUpdateDate1);
Line: 579

   wsh_debug_sv.log(l_module_name, 'WDL Update Date using Dropoff Stop', l_wdlUpdateDate1);
Line: 580

   wsh_debug_sv.log(l_module_name, 'WT  Update Date using Dropoff Stop',  l_wtUpdateDate1);
Line: 581

   wsh_debug_sv.log(l_module_name, 'WCS  Update Date',  l_wcsUpdateDate);
Line: 582

   wsh_debug_sv.log(l_module_name, 'WOCS Update Date',  l_wocsUpdateDate);
Line: 587

  IF l_ibUpdateDate < l_wndUpdateDate  OR
     l_ibUpdateDate < l_wdaUpdateDate  OR
     l_ibUpdateDate < l_wddUpdateDate  OR
     l_ibUpdateDate < l_wtsUpdateDate  OR
     l_ibUpdateDate < l_wdlUpdateDate  OR
     l_ibUpdateDate < l_wtUpdateDate   OR
     l_ibUpdateDate < l_wtsUpdateDate1 OR
     l_ibUpdateDate < l_wdlUpdateDate1 OR
     l_ibUpdateDate < l_wtUpdateDate1  OR
     l_ibUpdateDate < l_wcsUpdateDate  OR
     l_ibUpdateDate < l_wocsUpdateDate THEN
    l_changed := TRUE;
Line: 713

Select wsh_location_id
from wsh_locations
where
      source_location_id   = p_location_id
  and location_source_code = 'HZ';
Line: 724

Select 1
from wsh_delivery_details
where
po_shipment_line_id = p_shipment_line_id
and (ship_from_location_id = p_location_id  or  ship_from_location_id = -1 )
and released_status = 'X'
and source_code = 'PO'
and source_line_id = p_po_line_id
and rownum=1;
Line: 737

Select 1
from wsh_delivery_details
where
po_shipment_line_id = p_shipment_line_id
and released_status = 'X'
and source_code = 'PO'
and source_line_id = p_po_line_id
and rownum =1;