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:
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 297: wsh_delivery_legs dg

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

Line 314: wsh_delivery_legs dg,

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

Line 1198: FROM wsh_delivery_legs wdl, wsh_trip_stops wts

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

Line 1543: wsh_Delivery_legs wdl,

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

Line 2501: FROM wsh_delivery_legs

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

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

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

Line 2798: wsh_delivery_legs_actions.assign_deliveries(

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

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

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

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

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

Line 3898: wsh_delivery_legs_actions.assign_deliveries(

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

Line 3973: wsh_delivery_legs dg

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

Line 3982: wsh_delivery_legs dg

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

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

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

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

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

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

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

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

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

Line 4252: FROM wsh_delivery_legs wdl

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

Line 4772: wsh_delivery_legs dg

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

Line 4780: wsh_delivery_legs dg

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

Line 4983: 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);

4979: -- end of SSN Change, add conditional check
4980:
4981: IF l_internal_del_ids IS NOT NULL and l_internal_del_ids.count>0 THEN
4982: IF l_debug_on THEN
4983: 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);
4984: END IF;
4985: wsh_delivery_legs_actions.assign_deliveries(
4986: p_del_rows => l_internal_del_ids,
4987: p_trip_id => p_trip_id,

Line 4985: wsh_delivery_legs_actions.assign_deliveries(

4981: IF l_internal_del_ids IS NOT NULL and l_internal_del_ids.count>0 THEN
4982: IF l_debug_on THEN
4983: 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);
4984: END IF;
4985: wsh_delivery_legs_actions.assign_deliveries(
4986: p_del_rows => l_internal_del_ids,
4987: p_trip_id => p_trip_id,
4988: p_pickup_stop_id => l_pickup_stop_id,
4989: p_pickup_stop_seq => l_pickup_stop_seq,

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

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

Line 5021: 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);

5017:
5018:
5019: IF l_del_ids IS NOT NULL and l_del_ids.count>0 THEN
5020: IF l_debug_on THEN
5021: 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);
5022: END IF;
5023: wsh_delivery_legs_actions.assign_deliveries(
5024: p_del_rows => l_del_ids,
5025: p_trip_id => p_trip_id,

Line 5023: wsh_delivery_legs_actions.assign_deliveries(

5019: IF l_del_ids IS NOT NULL and l_del_ids.count>0 THEN
5020: IF l_debug_on THEN
5021: 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);
5022: END IF;
5023: wsh_delivery_legs_actions.assign_deliveries(
5024: p_del_rows => l_del_ids,
5025: p_trip_id => p_trip_id,
5026: p_pickup_stop_id => l_pickup_stop_id,
5027: p_pickup_stop_seq => l_pickup_stop_seq,

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

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

Line 5450: wsh_delivery_legs dg,

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

Line 5461: wsh_delivery_legs dg,

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

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

6484:
6485: -- bug 2374603: we cannot unassign from PLANNED trips
6486: --J can assign from planned trip
6487: stmt_str := 'select st.trip_id, count(*) '||
6488: 'from wsh_trip_stops st, wsh_delivery_legs dg, wsh_trips tr '||
6489: 'where dg.pick_up_stop_id = st.stop_id AND '||
6490: 'tr.trip_id = st.trip_id AND tr.planned_flag IN (''N'',''Y'') AND ' ||
6491: 'dg.delivery_id IN (' || del_str || ') ' ||
6492: 'group by st.trip_id '||

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

6542: WHERE trip_id = p_trip_id;
6543:
6544:
6545: cursor get_consol_child_deliveries(p_trip_id in number, p_delivery_id in number) is
6546: select l.delivery_id from wsh_delivery_legs l, wsh_trip_stops s
6547: where l.delivery_id = p_delivery_id
6548: and l.parent_delivery_leg_id is not null
6549: and l.pick_up_stop_id = s.stop_id
6550: and s.trip_id = p_trip_id;

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

6645: --
6646: -- Debug Statements
6647: --
6648: IF l_debug_on THEN
6649: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_DELIVERY_LEGS_ACTIONS.UNASSIGN_DELIVERIES',WSH_DEBUG_SV.C_PROC_LEVEL);
6650: END IF;
6651: --
6652: wsh_delivery_legs_actions.unassign_deliveries( p_del_rows, p_trip_id, NULL, NULL, l_return_status);
6653: IF l_return_status IN (WSH_UTIL_CORE.G_RET_STS_ERROR, WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR) THEN

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

6648: IF l_debug_on THEN
6649: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_DELIVERY_LEGS_ACTIONS.UNASSIGN_DELIVERIES',WSH_DEBUG_SV.C_PROC_LEVEL);
6650: END IF;
6651: --
6652: wsh_delivery_legs_actions.unassign_deliveries( p_del_rows, p_trip_id, NULL, NULL, l_return_status);
6653: IF l_return_status IN (WSH_UTIL_CORE.G_RET_STS_ERROR, WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR) THEN
6654: raise unassign_deliveries_err;
6655: ELSE
6656: x_return_status := l_return_status;

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

6669: --
6670: -- Debug Statements
6671: --
6672: IF l_debug_on THEN
6673: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_DELIVERY_LEGS_ACTIONS.MARK_REPRICE_REQUIRED',WSH_DEBUG_SV.C_PROC_LEVEL);
6674: END IF;
6675: --
6676: WSH_DELIVERY_LEGS_ACTIONS.Mark_Reprice_Required(
6677: p_entity_type => 'TRIP',

Line 6676: WSH_DELIVERY_LEGS_ACTIONS.Mark_Reprice_Required(

6672: IF l_debug_on THEN
6673: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_DELIVERY_LEGS_ACTIONS.MARK_REPRICE_REQUIRED',WSH_DEBUG_SV.C_PROC_LEVEL);
6674: END IF;
6675: --
6676: WSH_DELIVERY_LEGS_ACTIONS.Mark_Reprice_Required(
6677: p_entity_type => 'TRIP',
6678: p_entity_ids => l_trip_tab,
6679: x_return_status => l_return_status);
6680: IF l_return_status = WSH_UTIL_CORE.G_RET_STS_ERROR THEN

Line 7547: wsh_delivery_legs wlg

7543:
7544: CURSOR c_flip_disallowed(c_dummy_stop_id NUMBER , c_physical_stop_id NUMBER ) IS
7545: select delivery_leg_id
7546: from
7547: wsh_delivery_legs wlg
7548: where
7549: pick_up_stop_id = c_physical_stop_id
7550: AND drop_off_stop_id = c_dummy_stop_id
7551: AND rownum = 1;

Line 8141: wsh_delivery_legs wdl,

8137: SELECT wnd.DELIVERY_ID
8138: , wnd.CUSTOMER_ID
8139: , wnd.ORGANIZATION_ID
8140: FROM wsh_new_deliveries wnd,
8141: wsh_delivery_legs wdl,
8142: wsh_trip_stops wts1
8143: WHERE wnd.delivery_id = wdl.delivery_id
8144: AND wdl.pick_up_stop_id = wts1.stop_id
8145: AND wnd.initial_pickup_location_id = wts1.stop_location_id

Line 8154: wsh_delivery_legs wdl,

8150: SELECT wnd.DELIVERY_ID
8151: , wnd.CUSTOMER_ID
8152: , wnd.ORGANIZATION_ID
8153: FROM wsh_new_deliveries wnd,
8154: wsh_delivery_legs wdl,
8155: wsh_trip_stops wts1
8156: WHERE wnd.delivery_id = wdl.delivery_id
8157: AND wdl.drop_off_stop_id = wts1.stop_id
8158: AND wnd.ultimate_dropoff_location_id = wts1.stop_location_id

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

8892: x_return_status OUT NOCOPY VARCHAR2) IS
8893:
8894: cursor c_get_trip_deliveries(p_trip_id in number) is
8895: select d.delivery_id, d.delivery_type
8896: from wsh_new_deliveries d, wsh_trip_stops s, wsh_delivery_legs l
8897: where d.delivery_id = l.delivery_id
8898: and l.pick_up_stop_id = s.stop_id
8899: and s.trip_id = p_trip_id
8900: order by d.delivery_type;