1: PACKAGE BODY WSH_TRIP_STOPS_VALIDATIONS as
2: /* $Header: WSHSTVLB.pls 120.5.12000000.4 2007/06/29 21:45:07 dramamoo ship $ */
3:
4: --
5: G_PKG_NAME CONSTANT VARCHAR2(50) := 'WSH_TRIP_STOPS_VALIDATIONS';
1: PACKAGE BODY WSH_TRIP_STOPS_VALIDATIONS as
2: /* $Header: WSHSTVLB.pls 120.5.12000000.4 2007/06/29 21:45:07 dramamoo ship $ */
3:
4: --
5: G_PKG_NAME CONSTANT VARCHAR2(50) := 'WSH_TRIP_STOPS_VALIDATIONS';
6:
7: --3509004 :public api changes
8: PROCEDURE user_non_updatable_columns
9: (p_user_in_rec IN WSH_TRIP_STOPS_PVT.trip_stop_rec_type,
5: G_PKG_NAME CONSTANT VARCHAR2(50) := 'WSH_TRIP_STOPS_VALIDATIONS';
6:
7: --3509004 :public api changes
8: PROCEDURE user_non_updatable_columns
9: (p_user_in_rec IN WSH_TRIP_STOPS_PVT.trip_stop_rec_type,
10: p_out_rec IN WSH_TRIP_STOPS_PVT.trip_stop_rec_type,
11: p_in_rec IN WSH_TRIP_STOPS_GRP.stopInRecType,
12: x_return_status OUT NOCOPY VARCHAR2);
13:
6:
7: --3509004 :public api changes
8: PROCEDURE user_non_updatable_columns
9: (p_user_in_rec IN WSH_TRIP_STOPS_PVT.trip_stop_rec_type,
10: p_out_rec IN WSH_TRIP_STOPS_PVT.trip_stop_rec_type,
11: p_in_rec IN WSH_TRIP_STOPS_GRP.stopInRecType,
12: x_return_status OUT NOCOPY VARCHAR2);
13:
14:
7: --3509004 :public api changes
8: PROCEDURE user_non_updatable_columns
9: (p_user_in_rec IN WSH_TRIP_STOPS_PVT.trip_stop_rec_type,
10: p_out_rec IN WSH_TRIP_STOPS_PVT.trip_stop_rec_type,
11: p_in_rec IN WSH_TRIP_STOPS_GRP.stopInRecType,
12: x_return_status OUT NOCOPY VARCHAR2);
13:
14:
15: /*
228:
229: -- nvl is if no records exist
230: CURSOR c_check_max IS
231: SELECT nvl(max(stop_sequence_number),0) stop_sequence_number
232: FROM wsh_trip_stops
233: WHERE trip_id = p_trip_id
234: AND status_code IN ('AR','CL');
235:
236: l_max_sequence NUMBER;
301: x_return_status OUT NOCOPY VARCHAR2) IS
302:
303: CURSOR c_check_unique IS
304: SELECT stop_id
305: FROM wsh_trip_stops
306: WHERE trip_id = p_trip_id
307: AND stop_sequence_number = p_stop_sequence_number
308: AND rownum = 1 ;
309:
514:
515: CURSOR c_stop_details IS
516: SELECT stop_sequence_number,
517: stop_id
518: FROM wsh_trip_stops
519: WHERE trip_id = p_trip_id
520: AND status_code = 'OP' -- this is a case only for Open stops
521: AND stop_id <> p_stop_id ;
522:
519: WHERE trip_id = p_trip_id
520: AND status_code = 'OP' -- this is a case only for Open stops
521: AND stop_id <> p_stop_id ;
522:
523: l_rec_stop WSH_TRIP_STOPS_VALIDATIONS.stop_details_tab;
524:
525: -- Question , Can there be multiple record with same stop id as pickup
526: CURSOR c_wdl_details1 IS
527: SELECT pick_up_stop_id,
537: delivery_id
538: FROM wsh_delivery_legs
539: WHERE drop_off_stop_id = p_stop_id;
540:
541: l_rec_wdl1 WSH_TRIP_STOPS_VALIDATIONS.dleg_details_tab;
542: --l_rec_wdl2 c_wdl_details%TYPE;
543:
544: stop_count NUMBER := 0;
545: dleg_count NUMBER := 0;
760: ) IS
761:
762: CURSOR c_get_max_sequence IS
763: SELECT nvl(max(stop_sequence_number),0) stop_sequence_number
764: FROM wsh_trip_stops
765: WHERE trip_id = p_trip_id;
766:
767: l_stop_sequence_number NUMBER;
768:
904: /*J inbound logistics new column jckwok*/
905: NVL(wnd.shipment_direction, 'O') shipment_direction,
906: wnd.delivery_type, --MDC
907: NVL(wnd.ignore_for_planning, 'N') ignore_for_planning, --OTM R12, glog proj
908: NVL(wnd.tms_interface_flag,WSH_TRIP_STOPS_PVT.C_TMS_NOT_TO_BE_SENT) tms_interface_flag, -- OTM R12, glog proj
909: wsp.otm_enabled
910: from wsh_new_deliveries wnd,
911: wsh_delivery_legs wdl,
912: wsh_shipping_parameters wsp
1279:
1280:
1281:
1282: PROCEDURE eliminate_displayonly_fields (
1283: p_stop_rec IN WSH_TRIP_STOPS_PVT.trip_stop_rec_type
1284: , p_in_rec IN WSH_TRIP_STOPS_GRP.stopInRecType
1285: , x_stop_rec IN OUT NOCOPY WSH_TRIP_STOPS_PVT.trip_stop_rec_type
1286: )
1287: IS
1280:
1281:
1282: PROCEDURE eliminate_displayonly_fields (
1283: p_stop_rec IN WSH_TRIP_STOPS_PVT.trip_stop_rec_type
1284: , p_in_rec IN WSH_TRIP_STOPS_GRP.stopInRecType
1285: , x_stop_rec IN OUT NOCOPY WSH_TRIP_STOPS_PVT.trip_stop_rec_type
1286: )
1287: IS
1288: BEGIN
1281:
1282: PROCEDURE eliminate_displayonly_fields (
1283: p_stop_rec IN WSH_TRIP_STOPS_PVT.trip_stop_rec_type
1284: , p_in_rec IN WSH_TRIP_STOPS_GRP.stopInRecType
1285: , x_stop_rec IN OUT NOCOPY WSH_TRIP_STOPS_PVT.trip_stop_rec_type
1286: )
1287: IS
1288: BEGIN
1289:
1316: (WSH_TRIPS_ACTIONS.GET_STOP_SEQ_MODE = WSH_INTERFACE_GRP.G_STOP_SEQ_MODE_PAD))
1317: THEN
1318: -- csun stop sequence enhancement for 11.5.10, the stop sequence number for a
1319: -- trip stop is set to -99 initially since it is a required filed in the table,
1320: -- it will be re-sequenced in WSH_TRIP_STOPS_GRP.CREATE_UPDATE_STOP right after
1321: -- it is created.
1322: x_stop_rec.STOP_SEQUENCE_NUMBER := -99;
1323: -- but for mode = SSN, stop_sequence_number field would always have to be specified
1324: -- when creating a stop
1583: -----------------------------------------------------------*/
1584:
1585: PROCEDURE disable_from_list(
1586: p_disabled_list IN WSH_UTIL_CORE.column_tab_type
1587: , p_in_rec IN WSH_TRIP_STOPS_PVT.trip_stop_rec_type
1588: , x_out_rec IN OUT NOCOPY WSH_TRIP_STOPS_PVT.trip_stop_rec_type
1589: , x_return_status OUT NOCOPY VARCHAR2
1590: , x_field_name OUT NOCOPY VARCHAR2
1591:
1584:
1585: PROCEDURE disable_from_list(
1586: p_disabled_list IN WSH_UTIL_CORE.column_tab_type
1587: , p_in_rec IN WSH_TRIP_STOPS_PVT.trip_stop_rec_type
1588: , x_out_rec IN OUT NOCOPY WSH_TRIP_STOPS_PVT.trip_stop_rec_type
1589: , x_return_status OUT NOCOPY VARCHAR2
1590: , x_field_name OUT NOCOPY VARCHAR2
1591:
1592: ) IS
1769: -----------------------------------------------------------*/
1770:
1771: PROCEDURE enable_from_list(
1772: p_disabled_list IN WSH_UTIL_CORE.column_tab_type
1773: , p_in_rec IN WSH_TRIP_STOPS_PVT.trip_stop_rec_type
1774: , x_out_rec IN OUT NOCOPY WSH_TRIP_STOPS_PVT.trip_stop_rec_type
1775: , x_return_status OUT NOCOPY VARCHAR2
1776: , x_field_name OUT NOCOPY VARCHAR2
1777:
1770:
1771: PROCEDURE enable_from_list(
1772: p_disabled_list IN WSH_UTIL_CORE.column_tab_type
1773: , p_in_rec IN WSH_TRIP_STOPS_PVT.trip_stop_rec_type
1774: , x_out_rec IN OUT NOCOPY WSH_TRIP_STOPS_PVT.trip_stop_rec_type
1775: , x_return_status OUT NOCOPY VARCHAR2
1776: , x_field_name OUT NOCOPY VARCHAR2
1777:
1778: ) IS
1976: --
1977: -- Bug 2678363 - Added p_in_rec as a parameter instead of p_action
1978: --
1979: PROCEDURE Get_Disabled_List (
1980: p_stop_rec IN WSH_TRIP_STOPS_PVT.trip_stop_rec_type
1981: , p_parent_entity_id IN NUMBER
1982: , p_in_rec IN WSH_TRIP_STOPS_GRP.stopInRecType
1983: , x_return_status OUT NOCOPY VARCHAR2
1984: , x_msg_count OUT NOCOPY NUMBER
1978: --
1979: PROCEDURE Get_Disabled_List (
1980: p_stop_rec IN WSH_TRIP_STOPS_PVT.trip_stop_rec_type
1981: , p_parent_entity_id IN NUMBER
1982: , p_in_rec IN WSH_TRIP_STOPS_GRP.stopInRecType
1983: , x_return_status OUT NOCOPY VARCHAR2
1984: , x_msg_count OUT NOCOPY NUMBER
1985: , x_msg_data OUT NOCOPY VARCHAR2
1986: , x_stop_rec OUT NOCOPY WSH_TRIP_STOPS_PVT.trip_stop_rec_type
1982: , p_in_rec IN WSH_TRIP_STOPS_GRP.stopInRecType
1983: , x_return_status OUT NOCOPY VARCHAR2
1984: , x_msg_count OUT NOCOPY NUMBER
1985: , x_msg_data OUT NOCOPY VARCHAR2
1986: , x_stop_rec OUT NOCOPY WSH_TRIP_STOPS_PVT.trip_stop_rec_type
1987: )
1988: IS
1989: l_disabled_list WSH_UTIL_CORE.column_tab_type;
1990: l_db_col_rec WSH_TRIP_STOPS_PVT.trip_stop_rec_type;
1986: , x_stop_rec OUT NOCOPY WSH_TRIP_STOPS_PVT.trip_stop_rec_type
1987: )
1988: IS
1989: l_disabled_list WSH_UTIL_CORE.column_tab_type;
1990: l_db_col_rec WSH_TRIP_STOPS_PVT.trip_stop_rec_type;
1991: l_return_status VARCHAR2(30);
1992: l_field_name VARCHAR2(100);
1993: l_parent_entity_id NUMBER;
1994: l_debug_on BOOLEAN;
1996: 'wsh.plsql.' || G_PKG_NAME || '.' || 'GET_DISABLED_LIST';
1997:
1998: CURSOR get_trip_id(p_stop_id NUMBER) IS
1999: SELECT trip_id
2000: FROM wsh_trip_stops
2001: WHERE stop_id = p_stop_rec.STOP_ID;
2002:
2003: CURSOR c_tbl_rec IS
2004: SELECT STOP_ID
2085: , tp_stop_id
2086: , physical_stop_id
2087: , physical_location_id
2088: , TMS_INTERFACE_FLAG -- OTM R12, glog proj
2089: FROM wsh_trip_stops
2090: WHERE stop_id = p_stop_rec.STOP_ID;
2091:
2092: e_dp_no_entity EXCEPTION;
2093: e_bad_field EXCEPTION;
2169: l_caller := p_in_rec.caller;
2170: IF (l_caller like 'FTE%' AND l_caller <> 'FTE_TMS_INTEGRATION') THEN
2171: l_caller := 'WSH_PUB';
2172: END IF;
2173: WSH_TRIP_STOPS_PVT.Get_Disabled_List( p_stop_rec.stop_id
2174: ,l_parent_entity_id
2175: , 'FORM'
2176: , x_return_status
2177: , l_disabled_list
2359: IF c_tbl_rec%ISOPEN THEN
2360: CLOSE c_tbl_rec;
2361: END IF;
2362: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR;
2363: wsh_util_core.default_handler('WSH_TRIP_STOPS_VALIDATIONS.get_disabled_list', l_module_name);
2364: IF l_debug_on THEN
2365: WSH_DEBUG_SV.log(l_module_name,'Error:',SUBSTR(SQLERRM,1,200));
2366: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
2367: END IF;
2467: END IF;
2468: EXCEPTION
2469: WHEN OTHERS THEN
2470: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR;
2471: wsh_util_core.default_handler('WSH_TRIP_STOPS_VALIDATIONS.get_disabled_list', l_module_name);
2472: IF l_debug_on THEN
2473: WSH_DEBUG_SV.log(l_module_name,'Error:',SUBSTR(SQLERRM,1,200));
2474: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
2475: END IF;
2737: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:WSH_UTIL_CORE.G_EXC_WARNING');
2738: END IF;
2739: WHEN OTHERS THEN
2740: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR ;
2741: wsh_util_core.default_handler('WSH_TRIP_STOPS_VALIDATIONS.refreshShipmentsTypeFlag', l_module_name);
2742: IF l_debug_on THEN
2743: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
2744: END IF;
2745: --}
2807: -- J: W/V Changes
2808: wts.departure_gross_weight,
2809: wts.departure_volume,
2810: wts.physical_location_id
2811: FROM wsh_trip_stops wts,
2812: wsh_trips wt
2813: WHERE stop_id = p_stop_id
2814: AND wts.trip_id = wt.trip_id;
2815: --
2836: nvl(wts.shipments_type_flag,'O') shipments_Type_flag,
2837: wts.stop_location_id,
2838: wts.departure_gross_weight,
2839: wts.departure_volume
2840: FROM wsh_trip_stops wts
2841: WHERE wts.physical_stop_id = p_stop_id
2842: AND wts.trip_id = p_trip_id
2843: AND wts.status_code IN ('OP', 'AR');
2844: --
2862: wts.shipments_type_flag shipments_Type_flag,
2863: wts.stop_location_id,
2864: wts.departure_gross_weight,
2865: wts.departure_volume
2866: FROM wsh_trip_stops wts
2867: WHERE wts.physical_stop_id = p_stop_id
2868: AND wts.trip_id = p_trip_id
2869: AND wts.status_code IN ('OP', 'AR')
2870: AND wts.shipments_type_flag = 'I';
2887: )
2888: IS
2889: SELECT nvl(shipments_type_flag,'O') shipments_Type_flag,
2890: stop_location_id
2891: FROM wsh_trip_stops
2892: WHERE trip_id = p_trip_id
2893: AND status_code IN ('OP','AR')
2894: AND stop_sequence_number < p_stop_sequence
2895: AND stop_id <> NVL(p_linked_stop_id, -1)
2974: DECODE(prev_leg_do_stop.status_code,'OP','OP','XX') do_stop_status_code_ord,
2975: DECODE(prev_leg_pu_stop.status_code,'OP','OP','XX') pu_stop_status_code_ord,
2976: prev_leg_do_stop.trip_id prev_leg_trip_id,
2977: wt.name prev_leg_trip_name
2978: FROM wsh_trip_stops prev_leg_do_stop,
2979: wsh_trip_stops prev_leg_pu_stop,
2980: wsh_trip_stops curr_leg_pu_stop,
2981: wsh_delivery_legs prev_leg,
2982: wsh_delivery_legs curr_leg,
2975: DECODE(prev_leg_pu_stop.status_code,'OP','OP','XX') pu_stop_status_code_ord,
2976: prev_leg_do_stop.trip_id prev_leg_trip_id,
2977: wt.name prev_leg_trip_name
2978: FROM wsh_trip_stops prev_leg_do_stop,
2979: wsh_trip_stops prev_leg_pu_stop,
2980: wsh_trip_stops curr_leg_pu_stop,
2981: wsh_delivery_legs prev_leg,
2982: wsh_delivery_legs curr_leg,
2983: wsh_new_deliveries wnd,
2976: prev_leg_do_stop.trip_id prev_leg_trip_id,
2977: wt.name prev_leg_trip_name
2978: FROM wsh_trip_stops prev_leg_do_stop,
2979: wsh_trip_stops prev_leg_pu_stop,
2980: wsh_trip_stops curr_leg_pu_stop,
2981: wsh_delivery_legs prev_leg,
2982: wsh_delivery_legs curr_leg,
2983: wsh_new_deliveries wnd,
2984: wsh_trips wt
3032: DECODE(prev_leg_do_stop.status_code,'OP','OP','XX') do_stop_status_code_ord,
3033: DECODE(prev_leg_pu_stop.status_code,'OP','OP','XX') pu_stop_status_code_ord,
3034: prev_leg_do_stop.trip_id prev_leg_trip_id,
3035: wt.name prev_leg_trip_name
3036: FROM wsh_trip_stops prev_leg_do_stop,
3037: wsh_trip_stops prev_leg_pu_stop,
3038: wsh_trip_stops curr_leg_pu_stop,
3039: wsh_delivery_legs prev_leg,
3040: wsh_delivery_legs curr_leg,
3033: DECODE(prev_leg_pu_stop.status_code,'OP','OP','XX') pu_stop_status_code_ord,
3034: prev_leg_do_stop.trip_id prev_leg_trip_id,
3035: wt.name prev_leg_trip_name
3036: FROM wsh_trip_stops prev_leg_do_stop,
3037: wsh_trip_stops prev_leg_pu_stop,
3038: wsh_trip_stops curr_leg_pu_stop,
3039: wsh_delivery_legs prev_leg,
3040: wsh_delivery_legs curr_leg,
3041: wsh_new_deliveries wnd,
3034: prev_leg_do_stop.trip_id prev_leg_trip_id,
3035: wt.name prev_leg_trip_name
3036: FROM wsh_trip_stops prev_leg_do_stop,
3037: wsh_trip_stops prev_leg_pu_stop,
3038: wsh_trip_stops curr_leg_pu_stop,
3039: wsh_delivery_legs prev_leg,
3040: wsh_delivery_legs curr_leg,
3041: wsh_new_deliveries wnd,
3042: wsh_trips wt
3071: st1.stop_id pu_stop_id,
3072: wnd.delivery_id delivery_id,
3073: wnd.status_code delivery_statusCode,
3074: wnd.initial_pickup_location_id dlvy_initialPULocationId
3075: FROM wsh_trip_stops st1,
3076: wsh_delivery_legs dl2,
3077: wsh_new_deliveries wnd
3078: WHERE dl2.pick_up_stop_id = st1.stop_id
3079: AND st1.status_code = 'CL'
3093: dl.name,
3094: dl.status_code
3095: FROM wsh_new_deliveries dl,
3096: wsh_delivery_legs dg,
3097: wsh_trip_stops st
3098: WHERE dg.delivery_id = dl.delivery_id
3099: AND st.stop_location_id = dl.initial_pickup_location_id
3100: AND st.stop_id = dg.pick_up_stop_id
3101: AND st.stop_id = p_stop_id
3116: dl.status_code,
3117: dg.drop_off_stop_id
3118: FROM wsh_new_deliveries dl,
3119: wsh_delivery_legs dg,
3120: wsh_trip_stops st
3121: WHERE dg.delivery_id = dl.delivery_id
3122: AND st.stop_location_id = dl.ultimate_dropoff_location_id
3123: AND st.stop_id = dg.drop_off_stop_id
3124: AND st.stop_id IN (p_stop_id, p_dummy_stop_id)
3194: --
3195: l_location_id NUMBER;
3196:
3197: --
3198: l_virtual_shipments_type_flag WSH_TRIP_STOPS.SHIPMENTS_TYPE_FLAG%TYPE;
3199:
3200: -- Following three variables are added for BufFix #3947506
3201: l_out_entity_id VARCHAR2(100);
3202: l_out_entity_name VARCHAR2(100);
3438: ELSIF l_exceptions_tbl(exp_cnt).exception_behavior = 'WARNING' THEN
3439: IF l_exceptions_tbl(exp_cnt).entity_name = 'STOP' THEN
3440: FND_MESSAGE.SET_NAME('WSH','WSH_XC_EXIST_ENTITY');
3441: FND_MESSAGE.SET_TOKEN('ENTITY_NAME','Stop');
3442: FND_MESSAGE.SET_TOKEN('ENTITY_ID',wsh_trip_stops_pvt.get_name(l_exceptions_tbl(exp_cnt).entity_id)); --BugFix #3925590
3443: FND_MESSAGE.SET_TOKEN('EXCEPTION_BEHAVIOR','Warning');
3444: x_return_status := WSH_UTIL_CORE.G_RET_STS_WARNING;
3445: wsh_util_core.add_message(x_return_status);
3446: l_stop_warnings := l_stop_warnings + 1;
4365:
4366: IF (l_param_info.percent_fill_basis_flag = 'W' and l_stop_info_rec.departure_gross_weight is NULL) THEN
4367: FND_MESSAGE.SET_NAME('WSH','WSH_NULL_WV');
4368: IF l_debug_on THEN
4369: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_TRIP_STOPS_PVT.GET_NAME',WSH_DEBUG_SV.C_PROC_LEVEL);
4370: END IF;
4371: --
4372: FND_MESSAGE.SET_TOKEN('ENTITY_TYPE','Stop');
4373: FND_MESSAGE.SET_TOKEN('ENTITY_NAME',wsh_trip_stops_pvt.get_name(p_in_rec.stop_id,p_in_rec.caller));
4369: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_TRIP_STOPS_PVT.GET_NAME',WSH_DEBUG_SV.C_PROC_LEVEL);
4370: END IF;
4371: --
4372: FND_MESSAGE.SET_TOKEN('ENTITY_TYPE','Stop');
4373: FND_MESSAGE.SET_TOKEN('ENTITY_NAME',wsh_trip_stops_pvt.get_name(p_in_rec.stop_id,p_in_rec.caller));
4374: FND_MESSAGE.SET_TOKEN('WV','Weight');
4375: x_return_status := WSH_UTIL_CORE.G_RET_STS_WARNING;
4376: wsh_util_core.add_message(x_return_status);
4377: l_stop_warnings := l_stop_warnings + 1;
4379:
4380: IF (l_param_info.percent_fill_basis_flag = 'V' and l_stop_info_rec.departure_volume is NULL) THEN
4381: FND_MESSAGE.SET_NAME('WSH','WSH_NULL_WV');
4382: IF l_debug_on THEN
4383: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_TRIP_STOPS_PVT.GET_NAME',WSH_DEBUG_SV.C_PROC_LEVEL);
4384: END IF;
4385: --
4386: FND_MESSAGE.SET_TOKEN('ENTITY_TYPE','Stop');
4387: FND_MESSAGE.SET_TOKEN('ENTITY_NAME',wsh_trip_stops_pvt.get_name(p_in_rec.stop_id,p_in_rec.caller));
4383: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_TRIP_STOPS_PVT.GET_NAME',WSH_DEBUG_SV.C_PROC_LEVEL);
4384: END IF;
4385: --
4386: FND_MESSAGE.SET_TOKEN('ENTITY_TYPE','Stop');
4387: FND_MESSAGE.SET_TOKEN('ENTITY_NAME',wsh_trip_stops_pvt.get_name(p_in_rec.stop_id,p_in_rec.caller));
4388: FND_MESSAGE.SET_TOKEN('WV','Volume');
4389: x_return_status := WSH_UTIL_CORE.G_RET_STS_WARNING;
4390: wsh_util_core.add_message(x_return_status);
4391: l_stop_warnings := l_stop_warnings + 1;
5057: SELECT wnd.initial_pickup_date delivery_Date,
5058: DECODE(wts.stop_location_id,wnd.initial_pickup_location_id,1,3) order_seq
5059: FROM wsh_new_deliveries wnd,
5060: wsh_delivery_legs wdl,
5061: wsh_trip_stops wts
5062: WHERE wts.stop_id = p_stop_id
5063: AND wdl.pick_up_stop_id = wts.stop_id
5064: AND wdl.delivery_id = wnd.delivery_id
5065: UNION
5066: SELECT wnd.ultimate_dropoff_date delivery_Date,
5067: DECODE(wts.stop_location_id,wnd.ultimate_dropoff_location_id,2,4) order_seq
5068: FROM wsh_new_deliveries wnd,
5069: wsh_delivery_legs wdl,
5070: wsh_trip_stops wts
5071: WHERE wts.stop_id = p_stop_id
5072: AND wdl.drop_off_stop_id = wts.stop_id
5073: AND wdl.delivery_id = wnd.delivery_id
5074: ORDER BY order_seq ASC;
5075: --
5076: CURSOR prev_stop_cur (p_trip_id IN NUMBER, p_stop_sequence_number IN NUMBER)
5077: IS
5078: SELECT actual_departure_date
5079: FROM wsh_trip_stops
5080: WHERE trip_id = p_trip_id
5081: AND stop_sequence_number < p_stop_sequence_number
5082: ORDER BY stop_sequence_number DESC;
5083: --
5083: --
5084: CURSOR next_stop_cur (p_trip_id IN NUMBER, p_stop_sequence_number IN NUMBER)
5085: IS
5086: SELECT actual_departure_date
5087: FROM wsh_trip_stops
5088: WHERE trip_id = p_trip_id
5089: AND stop_sequence_number > p_stop_sequence_number
5090: ORDER BY stop_sequence_number ASC;
5091: --
5219: --
5220: WHEN OTHERS THEN
5221:
5222: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR ;
5223: wsh_util_core.default_handler('WSH_TRIP_STOPS_VALIDATIONS.get_stop_close_date', l_module_name);
5224: IF l_debug_on THEN
5225: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
5226: END IF;
5227: --
5233:
5234:
5235: --3509004:public api change
5236: PROCEDURE user_non_updatable_columns
5237: (p_user_in_rec IN WSH_TRIP_STOPS_PVT.trip_stop_rec_type,
5238: p_out_rec IN WSH_TRIP_STOPS_PVT.trip_stop_rec_type,
5239: p_in_rec IN WSH_TRIP_STOPS_GRP.stopInRecType,
5240: x_return_status OUT NOCOPY VARCHAR2)
5241:
5234:
5235: --3509004:public api change
5236: PROCEDURE user_non_updatable_columns
5237: (p_user_in_rec IN WSH_TRIP_STOPS_PVT.trip_stop_rec_type,
5238: p_out_rec IN WSH_TRIP_STOPS_PVT.trip_stop_rec_type,
5239: p_in_rec IN WSH_TRIP_STOPS_GRP.stopInRecType,
5240: x_return_status OUT NOCOPY VARCHAR2)
5241:
5242: IS
5235: --3509004:public api change
5236: PROCEDURE user_non_updatable_columns
5237: (p_user_in_rec IN WSH_TRIP_STOPS_PVT.trip_stop_rec_type,
5238: p_out_rec IN WSH_TRIP_STOPS_PVT.trip_stop_rec_type,
5239: p_in_rec IN WSH_TRIP_STOPS_GRP.stopInRecType,
5240: x_return_status OUT NOCOPY VARCHAR2)
5241:
5242: IS
5243: l_attributes VARCHAR2(2500) ;
5793: --
5794: END user_non_updatable_columns;
5795:
5796:
5797: END WSH_TRIP_STOPS_VALIDATIONS;