DBA Data[Home] [Help]

APPS.WSH_TRIP_VALIDATIONS dependencies on WSH_TRIP_STOPS

Line 37: FROM wsh_trip_stops

33: p_caller IN VARCHAR2) IS
34:
35: CURSOR stops_exist IS
36: SELECT count(*)
37: FROM wsh_trip_stops
38: WHERE trip_id = p_trip_id;
39:
40: CURSOR trip_info IS
41: SELECT vehicle_item_id,

Line 50: wsh_trip_stops st,

46:
47: CURSOR deliveries_exist IS
48: SELECT dl.delivery_id
49: FROM wsh_trips t,
50: wsh_trip_stops st,
51: wsh_delivery_legs dg,
52: wsh_new_deliveries dl
53: WHERE t.trip_id = p_trip_id AND
54: st.trip_id = t.trip_id AND

Line 63: FROM wsh_trip_stops

59: SELECT stop_id,
60: departure_fill_percent,
61: departure_gross_weight,
62: departure_volume
63: FROM wsh_trip_stops
64: WHERE trip_id = p_trip_id;
65:
66: CURSOR vehicle_info IS
67: SELECT msi.minimum_fill_percent,

Line 226: FND_MESSAGE.SET_TOKEN('STOP_NAME',wsh_trip_stops_pvt.get_name(st.stop_id,p_caller));

222: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_TRIPS_PVT.GET_NAME',WSH_DEBUG_SV.C_PROC_LEVEL);
223: END IF;
224: --
225: -- Bug 3697947
226: FND_MESSAGE.SET_TOKEN('STOP_NAME',wsh_trip_stops_pvt.get_name(st.stop_id,p_caller));
227: x_return_status := WSH_UTIL_CORE.G_RET_STS_WARNING;
228: WSH_UTIL_CORE.ADD_MESSAGE(x_return_status);
229: ELSIF ((st.departure_fill_percent IS NOT NULL) AND (st.departure_fill_percent > 100)) THEN
230: FND_MESSAGE.SET_NAME('WSH','WSH_STOP_FILL_PC_MAX');

Line 239: FND_MESSAGE.SET_TOKEN('STOP_NAME',wsh_trip_stops_pvt.get_name(st.stop_id,p_caller));

235: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_TRIPS_PVT.GET_NAME',WSH_DEBUG_SV.C_PROC_LEVEL);
236: END IF;
237: --
238: -- Bug 3697947
239: FND_MESSAGE.SET_TOKEN('STOP_NAME',wsh_trip_stops_pvt.get_name(st.stop_id,p_caller));
240: x_return_status := WSH_UTIL_CORE.G_RET_STS_WARNING;
241: WSH_UTIL_CORE.ADD_MESSAGE(x_return_status);
242: END IF;
243: IF ((st.departure_gross_weight IS NOT NULL) AND ( l_max_wt IS NOT NULL) AND (st.departure_gross_weight > l_max_wt)) OR

Line 254: FND_MESSAGE.SET_TOKEN('STOP_NAME', wsh_trip_stops_pvt.get_name(st.stop_id, p_caller));

250: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_TRIPS_PVT.GET_NAME',WSH_DEBUG_SV.C_PROC_LEVEL);
251: END IF;
252: --
253: -- Bug 3697947
254: FND_MESSAGE.SET_TOKEN('STOP_NAME', wsh_trip_stops_pvt.get_name(st.stop_id, p_caller));
255: x_return_status := WSH_UTIL_CORE.G_RET_STS_WARNING;
256: WSH_UTIL_CORE.ADD_MESSAGE(x_return_status);
257: END IF;
258:

Line 385: FROM wsh_trip_stops ds,

381:
382: CURSOR prev_stop_info IS
383: SELECT 1 from dual
384: WHERE exists ( select 1
385: FROM wsh_trip_stops ds,
386: wsh_delivery_legs dg,
387: wsh_new_deliveries dl
388: WHERE ds.trip_id = p_trip_id
389: AND dg.drop_off_stop_id = p_stop_id

Line 430: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_TRIP_STOPS_PVT.GET_NAME',WSH_DEBUG_SV.C_PROC_LEVEL);

426: --
427: -- Debug Statements
428: --
429: IF l_debug_on THEN
430: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_TRIP_STOPS_PVT.GET_NAME',WSH_DEBUG_SV.C_PROC_LEVEL);
431: END IF;
432: --
433: FND_MESSAGE.SET_TOKEN('STOP_NAME', wsh_trip_stops_pvt.get_name(p_stop_id, p_caller));
434: close prev_stop_info;

Line 433: FND_MESSAGE.SET_TOKEN('STOP_NAME', wsh_trip_stops_pvt.get_name(p_stop_id, p_caller));

429: IF l_debug_on THEN
430: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_TRIP_STOPS_PVT.GET_NAME',WSH_DEBUG_SV.C_PROC_LEVEL);
431: END IF;
432: --
433: FND_MESSAGE.SET_TOKEN('STOP_NAME', wsh_trip_stops_pvt.get_name(p_stop_id, p_caller));
434: close prev_stop_info;
435: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
436: WSH_UTIL_CORE.ADD_MESSAGE(x_return_status);
437: --

Line 494: FROM wsh_trip_stops

490: CURSOR c_linked_stop(p_trip_id IN NUMBER,
491: p_stop_id IN NUMBER) IS
492: SELECT physical_stop_id linked_stop_id,
493: 1 link_type
494: FROM wsh_trip_stops
495: WHERE stop_id = p_stop_id
496: AND physical_stop_id IS NOT NULL
497: UNION
498: SELECT stop_id linked_stop_id,

Line 500: FROM wsh_trip_stops

496: AND physical_stop_id IS NOT NULL
497: UNION
498: SELECT stop_id linked_stop_id,
499: 2 link_type
500: FROM wsh_trip_stops
501: WHERE trip_id = p_trip_id
502: AND physical_stop_id = p_stop_id
503: AND status_code = 'OP';
504:

Line 518: FROM wsh_trip_stops

514: SELECT stop_id,
515: status_code,
516: stop_sequence_number,
517: nvl(shipments_type_flag, 'O') shipments_type_flag
518: FROM wsh_trip_stops
519: WHERE trip_id = p_trip_id AND
520: stop_sequence_number < p_curr_stop_seq AND
521: NVL(physical_stop_id,-1) <> p_stop_id AND --wr
522: status_code IN ('OP', 'AR') --wr

Line 605: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_TRIP_STOPS_PVT.GET_NAME',WSH_DEBUG_SV.C_PROC_LEVEL);

601: --
602: -- Debug Statements
603: --
604: IF l_debug_on THEN
605: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_TRIP_STOPS_PVT.GET_NAME',WSH_DEBUG_SV.C_PROC_LEVEL);
606: END IF;
607: --
608: FND_MESSAGE.SET_TOKEN('STOP_NAME', wsh_trip_stops_pvt.get_name(prev_stop_rec.stop_id));
609: -- Pack J IB: KVENKATE

Line 608: FND_MESSAGE.SET_TOKEN('STOP_NAME', wsh_trip_stops_pvt.get_name(prev_stop_rec.stop_id));

604: IF l_debug_on THEN
605: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_TRIP_STOPS_PVT.GET_NAME',WSH_DEBUG_SV.C_PROC_LEVEL);
606: END IF;
607: --
608: FND_MESSAGE.SET_TOKEN('STOP_NAME', wsh_trip_stops_pvt.get_name(prev_stop_rec.stop_id));
609: -- Pack J IB: KVENKATE
610: -- Set the return status based on checks of shipment_type_flag
611: -- of current stop and the previous stop
612:

Line 684: FROM wsh_trip_stops st

680: x_return_status OUT NOCOPY VARCHAR2) IS
681:
682: CURSOR open_stop(v_trip_id NUMBER) IS
683: SELECT 'OPEN STOP'
684: FROM wsh_trip_stops st
685: WHERE st.trip_id = v_trip_id
686: AND st.status_code <> 'CL';
687:
688:

Line 781: FROM wsh_trip_stops

777: WHERE trip_id = p_trip_id;
778:
779: CURSOR stops_info IS
780: SELECT stop_id
781: FROM wsh_trip_stops
782: WHERE trip_id = p_trip_id;
783:
784: CURSOR freight_costs_exist IS
785: SELECT freight_cost_id

Line 970: FROM wsh_trip_stops t,

966: WHERE trip_id = p_trip_id;
967:
968: CURSOR group_by_carrier_set IS
969: SELECT count(*)
970: FROM wsh_trip_stops t,
971: wsh_delivery_legs dg,
972: wsh_new_deliveries dl,
973: wsh_shipping_parameters wsp
974: WHERE t.stop_id = p_trip_id AND

Line 1096: FROM wsh_trip_stops

1092: SELECT stop_sequence_number,
1093: status_code,
1094: trip_id,
1095: nvl(shipments_type_flag, 'O') shipments_type_flag
1096: FROM wsh_trip_stops
1097: WHERE stop_id = p_stop_id;
1098:
1099: l_stop_date DATE;
1100: l_status_code VARCHAR2(2);

Line 1225: FROM wsh_trip_stops

1221: CURSOR stop_info IS
1222: SELECT planned_departure_date,
1223: status_code,
1224: trip_id
1225: FROM wsh_trip_stops
1226: WHERE stop_id = p_stop_id;
1227:
1228: -- bug 1550824: find delivery not confirmed, in transit or closed.
1229: CURSOR deliveries_still_open(p_stop_id NUMBER) IS

Line 1302: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_TRIP_STOPS_PVT.GET_NAME',WSH_DEBUG_SV.C_PROC_LEVEL);

1298: --
1299: -- Debug Statements
1300: --
1301: IF l_debug_on THEN
1302: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_TRIP_STOPS_PVT.GET_NAME',WSH_DEBUG_SV.C_PROC_LEVEL);
1303: END IF;
1304: --
1305: FND_MESSAGE.SET_TOKEN('STOP_NAME',wsh_trip_stops_pvt.get_name(p_stop_id, p_caller));
1306: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;

Line 1305: FND_MESSAGE.SET_TOKEN('STOP_NAME',wsh_trip_stops_pvt.get_name(p_stop_id, p_caller));

1301: IF l_debug_on THEN
1302: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_TRIP_STOPS_PVT.GET_NAME',WSH_DEBUG_SV.C_PROC_LEVEL);
1303: END IF;
1304: --
1305: FND_MESSAGE.SET_TOKEN('STOP_NAME',wsh_trip_stops_pvt.get_name(p_stop_id, p_caller));
1306: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
1307: WSH_UTIL_CORE.ADD_MESSAGE(x_return_status);
1308: --
1309: -- Debug Statements

Line 1420: wsh_trip_stops st

1416: t.planned_flag,
1417: st.status_code,
1418: t.trip_id
1419: FROM wsh_trips t,
1420: wsh_trip_stops st
1421: WHERE st.stop_id = p_stop_id AND
1422: st.trip_id = t.trip_id;
1423:
1424: CURSOR pickup_deliveries IS

Line 1426: FROM wsh_trip_stops t,

1422: st.trip_id = t.trip_id;
1423:
1424: CURSOR pickup_deliveries IS
1425: SELECT dg.delivery_id
1426: FROM wsh_trip_stops t,
1427: wsh_delivery_legs dg
1428: WHERE t.stop_id = p_stop_id AND
1429: dg.pick_up_stop_id = t.stop_id
1430: FOR UPDATE NOWAIT;

Line 1434: FROM wsh_trip_stops t,

1430: FOR UPDATE NOWAIT;
1431:
1432: CURSOR dropoff_deliveries IS
1433: SELECT dg.delivery_id
1434: FROM wsh_trip_stops t,
1435: wsh_delivery_legs dg
1436: WHERE t.stop_id = p_stop_id AND
1437: dg.drop_off_stop_id = t.stop_id
1438: FOR UPDATE NOWAIT;

Line 1590: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_TRIP_STOPS_PVT.GET_NAME',WSH_DEBUG_SV.C_PROC_LEVEL);

1586: --
1587: -- Debug Statements
1588: --
1589: IF l_debug_on THEN
1590: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_TRIP_STOPS_PVT.GET_NAME',WSH_DEBUG_SV.C_PROC_LEVEL);
1591: END IF;
1592: --
1593: FND_MESSAGE.SET_TOKEN('STOP_NAME', wsh_trip_stops_pvt.get_name(p_stop_id, p_caller));
1594: x_return_status := WSH_UTIL_CORE.G_RET_STS_WARNING;

Line 1593: FND_MESSAGE.SET_TOKEN('STOP_NAME', wsh_trip_stops_pvt.get_name(p_stop_id, p_caller));

1589: IF l_debug_on THEN
1590: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_TRIP_STOPS_PVT.GET_NAME',WSH_DEBUG_SV.C_PROC_LEVEL);
1591: END IF;
1592: --
1593: FND_MESSAGE.SET_TOKEN('STOP_NAME', wsh_trip_stops_pvt.get_name(p_stop_id, p_caller));
1594: x_return_status := WSH_UTIL_CORE.G_RET_STS_WARNING;
1595: WSH_UTIL_CORE.ADD_MESSAGE(x_return_status);
1596: END IF;
1597:

Line 1610: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_TRIP_STOPS_PVT.GET_NAME',WSH_DEBUG_SV.C_PROC_LEVEL);

1606: --
1607: -- Debug Statements
1608: --
1609: IF l_debug_on THEN
1610: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_TRIP_STOPS_PVT.GET_NAME',WSH_DEBUG_SV.C_PROC_LEVEL);
1611: END IF;
1612: --
1613: FND_MESSAGE.SET_TOKEN('STOP_NAME', wsh_trip_stops_pvt.get_name(p_stop_id,p_caller));
1614: x_return_status := WSH_UTIL_CORE.G_RET_STS_WARNING;

Line 1613: FND_MESSAGE.SET_TOKEN('STOP_NAME', wsh_trip_stops_pvt.get_name(p_stop_id,p_caller));

1609: IF l_debug_on THEN
1610: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_TRIP_STOPS_PVT.GET_NAME',WSH_DEBUG_SV.C_PROC_LEVEL);
1611: END IF;
1612: --
1613: FND_MESSAGE.SET_TOKEN('STOP_NAME', wsh_trip_stops_pvt.get_name(p_stop_id,p_caller));
1614: x_return_status := WSH_UTIL_CORE.G_RET_STS_WARNING;
1615: WSH_UTIL_CORE.ADD_MESSAGE(x_return_status);
1616: END IF;
1617:

Line 1995: FROM wsh_trip_stops

1991:
1992: CURSOR c_get_stop_seq IS
1993: SELECT stop_sequence_number,
1994: trip_id
1995: FROM wsh_trip_stops
1996: WHERE stop_id = p_stop_id;
1997:
1998: -- kept it separte because this need not execute everytime
1999: CURSOR c_get_trip_planned(v_trip_id IN NUMBER) IS

Line 2139: wsh_trip_stops wts1,

2135: NVL(wnd.tms_interface_flag,WSH_NEW_DELIVERIES_PVT.C_TMS_NOT_TO_BE_SENT) tms_interface_flag, -- OTM R12, glog proj
2136: wsp.otm_enabled -- OTM R12, glog proj
2137: FROM wsh_new_deliveries wnd,
2138: wsh_delivery_legs wdl,
2139: wsh_trip_stops wts1,
2140: wsh_trip_stops wts2,
2141: wsh_trips wt,
2142: wsh_shipping_parameters wsp -- OTM R12, glog proj
2143: WHERE wnd.delivery_id = wdl.delivery_id

Line 2140: wsh_trip_stops wts2,

2136: wsp.otm_enabled -- OTM R12, glog proj
2137: FROM wsh_new_deliveries wnd,
2138: wsh_delivery_legs wdl,
2139: wsh_trip_stops wts1,
2140: wsh_trip_stops wts2,
2141: wsh_trips wt,
2142: wsh_shipping_parameters wsp -- OTM R12, glog proj
2143: WHERE wnd.delivery_id = wdl.delivery_id
2144: AND wts1.stop_id = wdl.PICK_UP_STOP_ID

Line 4026: FROM wsh_trip_stops

4022: CURSOR any_open_stop (p_trip_id NUMBER,
4023: p_stop_id NUMBER,
4024: p_linked_stop_id NUMBER) IS
4025: SELECT stop_id
4026: FROM wsh_trip_stops
4027: WHERE trip_id = p_trip_id
4028: AND stop_id <> NVL(p_stop_id,-9999)
4029: AND stop_id <> NVL(p_linked_stop_id,-9999)
4030: AND status_code <> 'CL';

Line 4324: FROM wsh_trip_stops

4320: -- Check if trip has any closed stop
4321: --
4322: CURSOR any_closed_stop (p_trip_id NUMBER) IS
4323: SELECT stop_id
4324: FROM wsh_trip_stops
4325: WHERE trip_id = p_trip_id
4326: AND status_code = 'CL';
4327: --
4328: l_num_warnings NUMBER;

Line 4727: wsh_trip_stops wts

4723: IS
4724: SELECT 1
4725: FROM wsh_delivery_legs wdl,
4726: wsh_new_deliveries wnd,
4727: wsh_trip_stops wts
4728: WHERE wts.trip_id = p_trip_id
4729: AND wdl.delivery_id = wnd.delivery_id
4730: AND NVL(wnd.shipment_direction,'O') IN ( 'O','IO' )
4731: AND ( p_stop_id is null or wts.stop_id = p_stop_id ) --Bugfix 3639920

Line 4837: wsh_trip_stops wts

4833: IS
4834: SELECT 1
4835: FROM wsh_delivery_legs wdl,
4836: wsh_new_deliveries wnd,
4837: wsh_trip_stops wts
4838: WHERE wts.trip_id = p_trip_id
4839: AND wdl.delivery_id = wnd.delivery_id
4840: AND NVL(wnd.shipment_direction,'O') NOT IN ( 'O','IO' )
4841: AND ( p_stop_id is null or wts.stop_id = p_stop_id ) --Bugfix 3639920

Line 5850: FROM wsh_trip_stops cur, wsh_trip_stops nxt

5846: cur.planned_arrival_date cur_arr_date,
5847: cur.planned_departure_date cur_dep_date,
5848: nxt.stop_location_id nxt_location_id,
5849: nxt.planned_arrival_date nxt_arr_date
5850: FROM wsh_trip_stops cur, wsh_trip_stops nxt
5851: WHERE cur.trip_id = p_trip_id
5852: AND cur.trip_id = nxt.trip_id
5853: AND cur.stop_id <> nxt.stop_id
5854: AND (( cur.planned_departure_date > nxt.planned_arrival_date

Line 5898: FROM wsh_trip_stops cur,

5894: cur.stop_location_id cur_location_id,
5895: cur.stop_id cur_stop_id,
5896: cur.stop_sequence_number cur_stop_seq_num,
5897: prv.planned_arrival_date prv_arr_date
5898: FROM wsh_trip_stops cur,
5899: wsh_trip_stops prv
5900: WHERE cur.trip_id = p_trip_id
5901: AND cur.trip_id = prv.trip_id
5902: AND cur.stop_id <> prv.stop_id

Line 5899: wsh_trip_stops prv

5895: cur.stop_id cur_stop_id,
5896: cur.stop_sequence_number cur_stop_seq_num,
5897: prv.planned_arrival_date prv_arr_date
5898: FROM wsh_trip_stops cur,
5899: wsh_trip_stops prv
5900: WHERE cur.trip_id = p_trip_id
5901: AND cur.trip_id = prv.trip_id
5902: AND cur.stop_id <> prv.stop_id
5903: AND cur.planned_arrival_date <= prv.planned_arrival_date

Line 5916: wsh_trip_stops pickup,

5912:
5913: CURSOR get_deliveries_to_unassign IS
5914: SELECT leg.delivery_id
5915: FROM wsh_delivery_legs leg,
5916: wsh_trip_stops pickup,
5917: wsh_trip_stops dropoff
5918: WHERE pickup.trip_id = p_trip_id
5919: AND pickup.trip_id = dropoff.trip_id
5920: AND pickup.stop_id <> dropoff.stop_id

Line 5917: wsh_trip_stops dropoff

5913: CURSOR get_deliveries_to_unassign IS
5914: SELECT leg.delivery_id
5915: FROM wsh_delivery_legs leg,
5916: wsh_trip_stops pickup,
5917: wsh_trip_stops dropoff
5918: WHERE pickup.trip_id = p_trip_id
5919: AND pickup.trip_id = dropoff.trip_id
5920: AND pickup.stop_id <> dropoff.stop_id
5921: AND pickup.status_code = 'OP'

Line 6116: FND_MESSAGE.SET_TOKEN('STOP_NAME',wsh_trip_stops_pvt.get_name(l_invalid_plarrival_date.cur_stop_id,p_caller));

6112: WHEN invalid_arrival_date THEN
6113: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
6114:
6115: FND_MESSAGE.SET_NAME('WSH', 'WSH_INVALID_STOP_DATE');
6116: FND_MESSAGE.SET_TOKEN('STOP_NAME',wsh_trip_stops_pvt.get_name(l_invalid_plarrival_date.cur_stop_id,p_caller));
6117: wsh_util_core.add_message(wsh_util_core.g_ret_sts_error, l_module_name);
6118:
6119: IF l_debug_on THEN
6120: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:invalid_planned_arrival_date');

Line 6137: wsh_util_core.default_handler('WSH_TRIP_STOPS_VALIDATIONS.Validate_Stop_Dates',l_module_name);

6133:
6134: IF get_deliveries_to_unassign%ISOPEN THEN
6135: close get_deliveries_to_unassign;
6136: END IF;
6137: wsh_util_core.default_handler('WSH_TRIP_STOPS_VALIDATIONS.Validate_Stop_Dates',l_module_name);
6138: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR;
6139: IF l_debug_on THEN
6140: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
6141: END IF;