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 2140: wsh_trip_stops wts1,

2136: NVL(mcp.otm_enabled,wsp.otm_enabled) otm_enabled, -- OTM R12, glog proj-- LSP PROJECT : checking OTM enabled flag on client parameters.
2137: mcp.client_id -- LSP PROJECT
2138: FROM wsh_new_deliveries wnd,
2139: wsh_delivery_legs wdl,
2140: wsh_trip_stops wts1,
2141: wsh_trip_stops wts2,
2142: wsh_trips wt,
2143: wsh_shipping_parameters wsp, -- OTM R12, glog proj
2144: mtl_client_parameters_v mcp -- LSP PROJECT

Line 2141: wsh_trip_stops wts2,

2137: mcp.client_id -- LSP PROJECT
2138: FROM wsh_new_deliveries wnd,
2139: wsh_delivery_legs wdl,
2140: wsh_trip_stops wts1,
2141: wsh_trip_stops wts2,
2142: wsh_trips wt,
2143: wsh_shipping_parameters wsp, -- OTM R12, glog proj
2144: mtl_client_parameters_v mcp -- LSP PROJECT
2145: WHERE wnd.delivery_id = wdl.delivery_id

Line 4029: FROM wsh_trip_stops

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

Line 4327: FROM wsh_trip_stops

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

Line 4730: wsh_trip_stops wts

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

Line 4840: wsh_trip_stops wts

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

Line 5853: FROM wsh_trip_stops cur, wsh_trip_stops nxt

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

Line 5901: FROM wsh_trip_stops cur,

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

Line 5902: wsh_trip_stops prv

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

Line 5919: wsh_trip_stops pickup,

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

Line 5920: wsh_trip_stops dropoff

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

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

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

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

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