DBA Data[Home] [Help]

APPS.WSH_TRIPS_ACTIONS dependencies on WSH_DELIVERY_LEGS

Line 96: wsh_delivery_legs dg

92:
93: cursor get_pickup_stop (c_trip_id number) is
94: select distinct st.stop_id, st.stop_location_id
95: from wsh_trip_stops st,
96: wsh_delivery_legs dg
97: where st.trip_id = c_trip_id
98: and dg.pick_up_stop_id = st.stop_id;
99: -- Bug 9002479 : Select '1' changed to Select 1
100: cursor get_pickup_delivery (c_stop_id number, c_stop_location_id number) is

Line 105: wsh_delivery_legs dg

101: select 1
102: from dual
103: where exists (select dl.delivery_id
104: from wsh_new_deliveries dl,
105: wsh_delivery_legs dg
106: where dg.pick_up_stop_id = c_stop_id
107: and dl.initial_pickup_location_id = c_stop_location_id
108: AND nvl(dl.shipment_direction,'O') IN ('O','IO') -- J-IB-NPARIKH
109: and dl.delivery_id = dg.delivery_id );

Line 113: from wsh_trip_stops st, wsh_delivery_legs dg, wsh_new_deliveries dl

109: and dl.delivery_id = dg.delivery_id );
110:
111: cursor get_org_id (c_trip_id number) is
112: select distinct dl.organization_id
113: from wsh_trip_stops st, wsh_delivery_legs dg, wsh_new_deliveries dl
114: where st.trip_id = c_trip_id
115: and dg.delivery_id = dl.delivery_id
116: and st.stop_location_id = dl.initial_pickup_location_id
117: and st.stop_id = dg.pick_up_stop_id;

Line 299: wsh_delivery_legs dg

295:
296: cursor get_pickup_stop is
297: select t.stop_id
298: from wsh_trip_stops t,
299: wsh_delivery_legs dg
300: where t.trip_id = p_trip_id
301: and dg.pick_up_stop_id = t.stop_id
302: and t.status_code IN ('OP','AR')
303: and nvl(SHIPMENTS_TYPE_FLAG, 'O') IN ('O', 'M'); -- J Inbound Logistics jckwok

Line 316: wsh_delivery_legs dg,

312: --Bug#: 2867209 - Start
313: CURSOR c_stop_del_status(p_stop_id NUMBER) IS
314: SELECT 1
315: FROM wsh_new_deliveries dl,
316: wsh_delivery_legs dg,
317: wsh_trip_stops st,
318: wsh_trips t
319: WHERE dl.delivery_id = dg.delivery_id AND
320: (dg.pick_up_stop_id = st.stop_id OR dg.drop_off_stop_id = st.stop_id) AND

Line 1200: FROM wsh_delivery_legs wdl, wsh_trip_stops wts

1196: --{
1197: --- TP release
1198: CURSOR c_getdels IS
1199: SELECT delivery_id
1200: FROM wsh_delivery_legs wdl, wsh_trip_stops wts
1201: WHERE wdl.pick_up_stop_id=wts.stop_id AND
1202: wts.trip_id=p_in_rec.trip_id;
1203:
1204:

Line 1545: wsh_Delivery_legs wdl,

1541: CURSOR dlvy_csr(p_trip_id NUMBER)
1542: IS
1543: SELECT wdl.delivery_id, wt.name
1544: FROM wsh_trip_stops wts,
1545: wsh_Delivery_legs wdl,
1546: wsh_new_deliveries wnd,
1547: wsh_trips wt
1548: WHERE wt.trip_id = p_trip_id
1549: AND wts.trip_id = p_trip_id

Line 2503: FROM wsh_delivery_legs

2499: p_sc_dropoff_date IN DATE DEFAULT NULL) IS
2500:
2501: CURSOR check_assigned(p_del_id IN NUMBER) IS
2502: SELECT delivery_id
2503: FROM wsh_delivery_legs
2504: WHERE delivery_id = p_del_id;
2505:
2506: -- When OTM is installed and user performs autocreate Trip action
2507: -- the trip would be created as Ignore for Planning(based on the delivery)

Line 2797: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_DELIVERY_LEGS_ACTIONS.ASSIGN_DELIVERIES',WSH_DEBUG_SV.C_PROC_LEVEL);

2793: --
2794: END IF;
2795: --
2796: IF l_debug_on THEN
2797: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_DELIVERY_LEGS_ACTIONS.ASSIGN_DELIVERIES',WSH_DEBUG_SV.C_PROC_LEVEL);
2798: END IF;
2799: --
2800: wsh_delivery_legs_actions.assign_deliveries(
2801: p_del_rows => l_good_dels,

Line 2800: wsh_delivery_legs_actions.assign_deliveries(

2796: IF l_debug_on THEN
2797: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_DELIVERY_LEGS_ACTIONS.ASSIGN_DELIVERIES',WSH_DEBUG_SV.C_PROC_LEVEL);
2798: END IF;
2799: --
2800: wsh_delivery_legs_actions.assign_deliveries(
2801: p_del_rows => l_good_dels,
2802: p_trip_id => x_trip_id,
2803: p_create_flag => 'Y',
2804: x_leg_rows => l_del_legs,

Line 2816: wsh_debug_sv.log(l_module_name, 'Return Status after calling wsh_delivery_legs_actions.assign_deliveries', x_return_Status);

2812:
2813: IF x_return_status in ( WSH_UTIL_CORE.G_RET_STS_ERROR, WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR) THEN
2814: --
2815: IF l_debug_on THEN
2816: wsh_debug_sv.log(l_module_name, 'Return Status after calling wsh_delivery_legs_actions.assign_deliveries', x_return_Status);
2817: WSH_DEBUG_SV.pop(l_module_name);
2818: END IF;
2819: --
2820: RETURN;

Line 3897: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_DELIVERY_LEGS_ACTIONS.ASSIGN_DELIVERIES',WSH_DEBUG_SV.C_PROC_LEVEL);

3893: --
3894: -- Debug Statements
3895: --
3896: IF l_debug_on THEN
3897: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_DELIVERY_LEGS_ACTIONS.ASSIGN_DELIVERIES',WSH_DEBUG_SV.C_PROC_LEVEL);
3898: END IF;
3899: --
3900: wsh_delivery_legs_actions.assign_deliveries(
3901: p_del_rows => x_del_rows,

Line 3900: wsh_delivery_legs_actions.assign_deliveries(

3896: IF l_debug_on THEN
3897: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_DELIVERY_LEGS_ACTIONS.ASSIGN_DELIVERIES',WSH_DEBUG_SV.C_PROC_LEVEL);
3898: END IF;
3899: --
3900: wsh_delivery_legs_actions.assign_deliveries(
3901: p_del_rows => x_del_rows,
3902: p_trip_id => p_trip_id,
3903: p_create_flag => 'Y',
3904: x_leg_rows => l_del_legs,

Line 3975: wsh_delivery_legs dg

3971: CURSOR pickup_leg_check (l_delivery_id IN NUMBER) IS
3972: SELECT dg.delivery_leg_id,
3973: st.stop_id
3974: FROM wsh_trip_stops st,
3975: wsh_delivery_legs dg
3976: WHERE dg.delivery_id = l_delivery_id AND
3977: dg.pick_up_stop_id = st.stop_id AND
3978: st.stop_location_id = p_pickup_location_id;
3979:

Line 3984: wsh_delivery_legs dg

3980: CURSOR dropoff_leg_check (l_delivery_id IN NUMBER) IS
3981: SELECT dg.delivery_leg_id,
3982: st.stop_id
3983: FROM wsh_trip_stops st,
3984: wsh_delivery_legs dg
3985: WHERE dg.delivery_id = l_delivery_id AND
3986: dg.drop_off_stop_id = st.stop_id AND
3987: st.stop_location_id = p_dropoff_location_id;
3988:

Line 4083: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_DELIVERY_LEGS_PVT.DELETE_DELIVERY_LEG',WSH_DEBUG_SV.C_PROC_LEVEL);

4079: --
4080: -- Debug Statements
4081: --
4082: IF l_debug_on THEN
4083: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_DELIVERY_LEGS_PVT.DELETE_DELIVERY_LEG',WSH_DEBUG_SV.C_PROC_LEVEL);
4084: END IF;
4085: --
4086: wsh_delivery_legs_pvt.delete_delivery_leg(NULL, l_delivery_leg_id, x_return_status);
4087:

Line 4086: wsh_delivery_legs_pvt.delete_delivery_leg(NULL, l_delivery_leg_id, x_return_status);

4082: IF l_debug_on THEN
4083: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_DELIVERY_LEGS_PVT.DELETE_DELIVERY_LEG',WSH_DEBUG_SV.C_PROC_LEVEL);
4084: END IF;
4085: --
4086: wsh_delivery_legs_pvt.delete_delivery_leg(NULL, l_delivery_leg_id, x_return_status);
4087:
4088: END IF;
4089:
4090: l_delivery_leg_id := NULL;

Line 4116: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_DELIVERY_LEGS_PVT.DELETE_DELIVERY_LEG',WSH_DEBUG_SV.C_PROC_LEVEL);

4112: --
4113: -- Debug Statements
4114: --
4115: IF l_debug_on THEN
4116: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_DELIVERY_LEGS_PVT.DELETE_DELIVERY_LEG',WSH_DEBUG_SV.C_PROC_LEVEL);
4117: END IF;
4118: --
4119: wsh_delivery_legs_pvt.delete_delivery_leg(NULL, l_delivery_leg_id, x_return_status);
4120:

Line 4119: wsh_delivery_legs_pvt.delete_delivery_leg(NULL, l_delivery_leg_id, x_return_status);

4115: IF l_debug_on THEN
4116: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_DELIVERY_LEGS_PVT.DELETE_DELIVERY_LEG',WSH_DEBUG_SV.C_PROC_LEVEL);
4117: END IF;
4118: --
4119: wsh_delivery_legs_pvt.delete_delivery_leg(NULL, l_delivery_leg_id, x_return_status);
4120:
4121: END IF;
4122:
4123: -- Security rule check for assigning

Line 4254: FROM wsh_delivery_legs wdl

4250: WHERE stop_id = l_trip_stop_id;
4251:
4252: CURSOR c_any_activity_exists(p_stop_id IN NUMBER) IS
4253: SELECT '1'
4254: FROM wsh_delivery_legs wdl
4255: WHERE (wdl.pick_up_stop_id=p_stop_id OR wdl.drop_off_stop_id=p_stop_id)
4256: AND rownum=1;
4257:
4258: CURSOR c_get_stops IS

Line 4774: wsh_delivery_legs dg

4770:
4771: CURSOR get_pickup_stop (l_loc_id IN NUMBER, l_del_id IN NUMBER) IS
4772: SELECT st.stop_id
4773: FROM wsh_trip_stops st,
4774: wsh_delivery_legs dg
4775: WHERE st.stop_location_id = l_loc_id AND
4776: dg.pick_up_stop_id = st.stop_id AND
4777: dg.delivery_id = l_del_id;
4778:

Line 4782: wsh_delivery_legs dg

4778:
4779: CURSOR get_dropoff_stop (l_loc_id IN NUMBER, l_del_id IN NUMBER) IS
4780: SELECT st.stop_id
4781: FROM wsh_trip_stops st,
4782: wsh_delivery_legs dg
4783: WHERE st.stop_location_id = l_loc_id AND
4784: dg.drop_off_stop_id = st.stop_id AND
4785: dg.delivery_id = l_del_id;
4786:

Line 4985: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_DELIVERY_LEGS_ACTIONS.ASSIGN_DELIVERIES for internal deliveries',WSH_DEBUG_SV.C_PROC_LEVEL);

4981: -- end of SSN Change, add conditional check
4982:
4983: IF l_internal_del_ids IS NOT NULL and l_internal_del_ids.count>0 THEN
4984: IF l_debug_on THEN
4985: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_DELIVERY_LEGS_ACTIONS.ASSIGN_DELIVERIES for internal deliveries',WSH_DEBUG_SV.C_PROC_LEVEL);
4986: END IF;
4987: wsh_delivery_legs_actions.assign_deliveries(
4988: p_del_rows => l_internal_del_ids,
4989: p_trip_id => p_trip_id,

Line 4987: wsh_delivery_legs_actions.assign_deliveries(

4983: IF l_internal_del_ids IS NOT NULL and l_internal_del_ids.count>0 THEN
4984: IF l_debug_on THEN
4985: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_DELIVERY_LEGS_ACTIONS.ASSIGN_DELIVERIES for internal deliveries',WSH_DEBUG_SV.C_PROC_LEVEL);
4986: END IF;
4987: wsh_delivery_legs_actions.assign_deliveries(
4988: p_del_rows => l_internal_del_ids,
4989: p_trip_id => p_trip_id,
4990: p_pickup_stop_id => l_pickup_stop_id,
4991: p_pickup_stop_seq => l_pickup_stop_seq,

Line 5006: WSH_DEBUG_SV.log(l_module_name,'wsh_delivery_legs_actions.assign_deliveries return_status',l_return_status);

5002: p_dropoff_arr_date => p_dropoff_arr_date,
5003: p_dropoff_dep_date => p_dropoff_dep_date);
5004:
5005: IF l_debug_on THEN
5006: WSH_DEBUG_SV.log(l_module_name,'wsh_delivery_legs_actions.assign_deliveries return_status',l_return_status);
5007: END IF;
5008:
5009: IF (l_return_status IN (WSH_UTIL_CORE.G_RET_STS_ERROR, WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR)) THEN
5010: x_return_status := l_return_status;

Line 5023: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_DELIVERY_LEGS_ACTIONS.ASSIGN_DELIVERIES for regular deliveries',WSH_DEBUG_SV.C_PROC_LEVEL);

5019:
5020:
5021: IF l_del_ids IS NOT NULL and l_del_ids.count>0 THEN
5022: IF l_debug_on THEN
5023: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_DELIVERY_LEGS_ACTIONS.ASSIGN_DELIVERIES for regular deliveries',WSH_DEBUG_SV.C_PROC_LEVEL);
5024: END IF;
5025: wsh_delivery_legs_actions.assign_deliveries(
5026: p_del_rows => l_del_ids,
5027: p_trip_id => p_trip_id,

Line 5025: wsh_delivery_legs_actions.assign_deliveries(

5021: IF l_del_ids IS NOT NULL and l_del_ids.count>0 THEN
5022: IF l_debug_on THEN
5023: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_DELIVERY_LEGS_ACTIONS.ASSIGN_DELIVERIES for regular deliveries',WSH_DEBUG_SV.C_PROC_LEVEL);
5024: END IF;
5025: wsh_delivery_legs_actions.assign_deliveries(
5026: p_del_rows => l_del_ids,
5027: p_trip_id => p_trip_id,
5028: p_pickup_stop_id => l_pickup_stop_id,
5029: p_pickup_stop_seq => l_pickup_stop_seq,

Line 5044: WSH_DEBUG_SV.log(l_module_name,'wsh_delivery_legs_actions.assign_deliveries return_status',l_return_status);

5040: p_dropoff_arr_date => p_dropoff_arr_date,
5041: p_dropoff_dep_date => p_dropoff_dep_date);
5042:
5043: IF l_debug_on THEN
5044: WSH_DEBUG_SV.log(l_module_name,'wsh_delivery_legs_actions.assign_deliveries return_status',l_return_status);
5045: END IF;
5046:
5047: IF (l_return_status IN (WSH_UTIL_CORE.G_RET_STS_ERROR, WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR)) THEN
5048: x_return_status := l_return_status;

Line 5452: wsh_delivery_legs dg,

5448: dl.net_weight,
5449: dl.volume,
5450: dl.organization_id
5451: FROM wsh_trip_stops t,
5452: wsh_delivery_legs dg,
5453: wsh_new_deliveries dl
5454: WHERE t.stop_id = l_stop_id AND
5455: dg.pick_up_stop_id = t.stop_id AND
5456: dl.delivery_id = dg.delivery_id AND

Line 5463: wsh_delivery_legs dg,

5459: CURSOR dropoff_deliveries (l_stop_id NUMBER) IS
5460: SELECT dl.delivery_id d_id,
5461: dl.organization_id
5462: FROM wsh_trip_stops t,
5463: wsh_delivery_legs dg,
5464: wsh_new_deliveries dl
5465: WHERE t.stop_id = l_stop_id AND
5466: dg.drop_off_stop_id = t.stop_id AND
5467: dl.delivery_id = dg.delivery_id AND

Line 6499: 'from wsh_trip_stops st, wsh_delivery_legs dg, wsh_trips tr '||

6495:
6496: -- bug 2374603: we cannot unassign from PLANNED trips
6497: --J can assign from planned trip
6498: stmt_str := 'select st.trip_id, count(*) '||
6499: 'from wsh_trip_stops st, wsh_delivery_legs dg, wsh_trips tr '||
6500: 'where dg.pick_up_stop_id = st.stop_id AND '||
6501: 'tr.trip_id = st.trip_id AND tr.planned_flag IN (''N'',''Y'') AND ' ||
6502: 'dg.delivery_id IN (' || del_str || ') ' ||
6503: 'group by st.trip_id '||

Line 6557: select l.delivery_id from wsh_delivery_legs l, wsh_trip_stops s

6553: WHERE trip_id = p_trip_id;
6554:
6555:
6556: cursor get_consol_child_deliveries(p_trip_id in number, p_delivery_id in number) is
6557: select l.delivery_id from wsh_delivery_legs l, wsh_trip_stops s
6558: where l.delivery_id = p_delivery_id
6559: and l.parent_delivery_leg_id is not null
6560: and l.pick_up_stop_id = s.stop_id
6561: and s.trip_id = p_trip_id;

Line 6660: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_DELIVERY_LEGS_ACTIONS.UNASSIGN_DELIVERIES',WSH_DEBUG_SV.C_PROC_LEVEL);

6656: --
6657: -- Debug Statements
6658: --
6659: IF l_debug_on THEN
6660: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_DELIVERY_LEGS_ACTIONS.UNASSIGN_DELIVERIES',WSH_DEBUG_SV.C_PROC_LEVEL);
6661: END IF;
6662: --
6663: wsh_delivery_legs_actions.unassign_deliveries( p_del_rows, p_trip_id, NULL, NULL, l_return_status);
6664: IF l_return_status IN (WSH_UTIL_CORE.G_RET_STS_ERROR, WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR) THEN

Line 6663: wsh_delivery_legs_actions.unassign_deliveries( p_del_rows, p_trip_id, NULL, NULL, l_return_status);

6659: IF l_debug_on THEN
6660: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_DELIVERY_LEGS_ACTIONS.UNASSIGN_DELIVERIES',WSH_DEBUG_SV.C_PROC_LEVEL);
6661: END IF;
6662: --
6663: wsh_delivery_legs_actions.unassign_deliveries( p_del_rows, p_trip_id, NULL, NULL, l_return_status);
6664: IF l_return_status IN (WSH_UTIL_CORE.G_RET_STS_ERROR, WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR) THEN
6665: raise unassign_deliveries_err;
6666: ELSE
6667: x_return_status := l_return_status;

Line 6684: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_DELIVERY_LEGS_ACTIONS.MARK_REPRICE_REQUIRED',WSH_DEBUG_SV.C_PROC_LEVEL);

6680: --
6681: -- Debug Statements
6682: --
6683: IF l_debug_on THEN
6684: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_DELIVERY_LEGS_ACTIONS.MARK_REPRICE_REQUIRED',WSH_DEBUG_SV.C_PROC_LEVEL);
6685: END IF;
6686: --
6687: WSH_DELIVERY_LEGS_ACTIONS.Mark_Reprice_Required(
6688: p_entity_type => 'TRIP',

Line 6687: WSH_DELIVERY_LEGS_ACTIONS.Mark_Reprice_Required(

6683: IF l_debug_on THEN
6684: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_DELIVERY_LEGS_ACTIONS.MARK_REPRICE_REQUIRED',WSH_DEBUG_SV.C_PROC_LEVEL);
6685: END IF;
6686: --
6687: WSH_DELIVERY_LEGS_ACTIONS.Mark_Reprice_Required(
6688: p_entity_type => 'TRIP',
6689: p_entity_ids => l_trip_tab,
6690: x_return_status => l_return_status);
6691: IF l_return_status = WSH_UTIL_CORE.G_RET_STS_ERROR THEN

Line 7558: wsh_delivery_legs wlg

7554:
7555: CURSOR c_flip_disallowed(c_dummy_stop_id NUMBER , c_physical_stop_id NUMBER ) IS
7556: select delivery_leg_id
7557: from
7558: wsh_delivery_legs wlg
7559: where
7560: pick_up_stop_id = c_physical_stop_id
7561: AND drop_off_stop_id = c_dummy_stop_id
7562: AND rownum = 1;

Line 8152: wsh_delivery_legs wdl,

8148: SELECT wnd.DELIVERY_ID
8149: , wnd.CUSTOMER_ID
8150: , wnd.ORGANIZATION_ID
8151: FROM wsh_new_deliveries wnd,
8152: wsh_delivery_legs wdl,
8153: wsh_trip_stops wts1
8154: WHERE wnd.delivery_id = wdl.delivery_id
8155: AND wdl.pick_up_stop_id = wts1.stop_id
8156: AND wnd.initial_pickup_location_id = wts1.stop_location_id

Line 8165: wsh_delivery_legs wdl,

8161: SELECT wnd.DELIVERY_ID
8162: , wnd.CUSTOMER_ID
8163: , wnd.ORGANIZATION_ID
8164: FROM wsh_new_deliveries wnd,
8165: wsh_delivery_legs wdl,
8166: wsh_trip_stops wts1
8167: WHERE wnd.delivery_id = wdl.delivery_id
8168: AND wdl.drop_off_stop_id = wts1.stop_id
8169: AND wnd.ultimate_dropoff_location_id = wts1.stop_location_id

Line 8907: from wsh_new_deliveries d, wsh_trip_stops s, wsh_delivery_legs l

8903: x_return_status OUT NOCOPY VARCHAR2) IS
8904:
8905: cursor c_get_trip_deliveries(p_trip_id in number) is
8906: select d.delivery_id, d.delivery_type
8907: from wsh_new_deliveries d, wsh_trip_stops s, wsh_delivery_legs l
8908: where d.delivery_id = l.delivery_id
8909: and l.pick_up_stop_id = s.stop_id
8910: and s.trip_id = p_trip_id
8911: order by d.delivery_type;