DBA Data[Home] [Help]

APPS.WSH_TRIP_STOPS_ACTIONS dependencies on WSH_TRIP_STOPS

Line 1: PACKAGE BODY WSH_TRIP_STOPS_ACTIONS as

1: PACKAGE BODY WSH_TRIP_STOPS_ACTIONS as
2: /* $Header: WSHSTACB.pls 120.4 2007/05/08 12:12:22 mvudugul noship $ */
3:
4:
5: --

Line 6: G_PKG_NAME CONSTANT VARCHAR2(50) := 'WSH_TRIP_STOPS_ACTIONS';

2: /* $Header: WSHSTACB.pls 120.4 2007/05/08 12:12:22 mvudugul noship $ */
3:
4:
5: --
6: G_PKG_NAME CONSTANT VARCHAR2(50) := 'WSH_TRIP_STOPS_ACTIONS';
7: --
8:
9:
10: --OTM R12 Org-Specific. Declare of local procedure.

Line 27: (p_trip_id IN WSH_TRIP_STOPS.TRIP_ID%TYPE,

23: -- Assumption : p_trip_id and p_stop_id as passed by the calling API
24: ---------------------------------------------------------------------------
25:
26: PROCEDURE last_pickup_stop_closed
27: (p_trip_id IN WSH_TRIP_STOPS.TRIP_ID%TYPE,
28: p_stop_id IN WSH_TRIP_STOPS.STOP_ID%TYPE,
29: x_last_pickup_stop_closed OUT NOCOPY VARCHAR2,
30: x_eligible_for_asr OUT NOCOPY VARCHAR2,
31: x_return_status OUT NOCOPY VARCHAR2);

Line 28: p_stop_id IN WSH_TRIP_STOPS.STOP_ID%TYPE,

24: ---------------------------------------------------------------------------
25:
26: PROCEDURE last_pickup_stop_closed
27: (p_trip_id IN WSH_TRIP_STOPS.TRIP_ID%TYPE,
28: p_stop_id IN WSH_TRIP_STOPS.STOP_ID%TYPE,
29: x_last_pickup_stop_closed OUT NOCOPY VARCHAR2,
30: x_eligible_for_asr OUT NOCOPY VARCHAR2,
31: x_return_status OUT NOCOPY VARCHAR2);
32: --OTM R12 End

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

46:
47:
48: cursor get_pickup_del is
49: select dg.delivery_id, st.stop_sequence_number,st.trip_id
50: from wsh_trip_stops st, wsh_delivery_legs dg, wsh_new_deliveries dl
51: where st.stop_id = p_stop_id
52: and dg.delivery_id = dl.delivery_id
53: and st.stop_location_id = dl.initial_pickup_location_id
54: and st.stop_id = dg.pick_up_stop_id

Line 280: wsh_util_core.default_handler('WSH_TRIP_STOPS_ACTIONS.CONFIRM_STOP');

276: END IF;
277:
278: EXCEPTION
279: WHEN others THEN
280: wsh_util_core.default_handler('WSH_TRIP_STOPS_ACTIONS.CONFIRM_STOP');
281: rollback to sp_confirm_stop;
282: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR;
283: IF l_debug_on THEN
284: WSH_DEBUG_SV.log(l_module_name,'Unexpected Error has Occured.Oracle error message is'||SQLERRM,WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);

Line 301: FROM wsh_trip_stops

297:
298: CURSOR stop_info (l_stop_id NUMBER) IS
299: SELECT trip_id,
300: status_code
301: FROM wsh_trip_stops
302: WHERE stop_id = l_stop_id;
303:
304: CURSOR stop_dropoffs (l_stop_id NUMBER) IS
305: SELECT dl.delivery_id

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

399: --
400: -- Debug Statements
401: --
402: IF l_debug_on THEN
403: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_TRIP_STOPS_PVT.GET_NAME',WSH_DEBUG_SV.C_PROC_LEVEL);
404: END IF;
405: --
406: FND_MESSAGE.SET_TOKEN('STOP_NAME',wsh_trip_stops_pvt.get_name(p_stop_rows(i),p_caller));
407: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;

Line 406: FND_MESSAGE.SET_TOKEN('STOP_NAME',wsh_trip_stops_pvt.get_name(p_stop_rows(i),p_caller));

402: IF l_debug_on THEN
403: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_TRIP_STOPS_PVT.GET_NAME',WSH_DEBUG_SV.C_PROC_LEVEL);
404: END IF;
405: --
406: FND_MESSAGE.SET_TOKEN('STOP_NAME',wsh_trip_stops_pvt.get_name(p_stop_rows(i),p_caller));
407: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
408: wsh_util_core.add_message(x_return_status);
409: --
410: -- Debug Statements

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

431: --
432: -- Debug Statements
433: --
434: IF l_debug_on THEN
435: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_TRIP_STOPS_PVT.GET_NAME',WSH_DEBUG_SV.C_PROC_LEVEL);
436: END IF;
437: --
438: FND_MESSAGE.SET_TOKEN('STOP_NAME',wsh_trip_stops_pvt.get_name(p_stop_rows(i),p_caller));
439: x_return_status := WSH_UTIL_CORE.G_RET_STS_WARNING;

Line 438: FND_MESSAGE.SET_TOKEN('STOP_NAME',wsh_trip_stops_pvt.get_name(p_stop_rows(i),p_caller));

434: IF l_debug_on THEN
435: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_TRIP_STOPS_PVT.GET_NAME',WSH_DEBUG_SV.C_PROC_LEVEL);
436: END IF;
437: --
438: FND_MESSAGE.SET_TOKEN('STOP_NAME',wsh_trip_stops_pvt.get_name(p_stop_rows(i),p_caller));
439: x_return_status := WSH_UTIL_CORE.G_RET_STS_WARNING;
440: wsh_util_core.add_message(x_return_status);
441: --
442: -- Debug Statements

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

457: --
458: -- Debug Statements
459: --
460: IF l_debug_on THEN
461: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_TRIP_STOPS_PVT.GET_NAME',WSH_DEBUG_SV.C_PROC_LEVEL);
462: END IF;
463: --
464: FND_MESSAGE.SET_TOKEN('STOP_NAME',wsh_trip_stops_pvt.get_name(p_stop_rows(i),p_caller));
465: x_return_status := WSH_UTIL_CORE.G_RET_STS_WARNING;

Line 464: FND_MESSAGE.SET_TOKEN('STOP_NAME',wsh_trip_stops_pvt.get_name(p_stop_rows(i),p_caller));

460: IF l_debug_on THEN
461: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_TRIP_STOPS_PVT.GET_NAME',WSH_DEBUG_SV.C_PROC_LEVEL);
462: END IF;
463: --
464: FND_MESSAGE.SET_TOKEN('STOP_NAME',wsh_trip_stops_pvt.get_name(p_stop_rows(i),p_caller));
465: x_return_status := WSH_UTIL_CORE.G_RET_STS_WARNING;
466: wsh_util_core.add_message(x_return_status);
467:
468: END IF;

Line 488: wsh_util_core.default_handler('WSH_TRIP_STOPS_ACTIONS.CHECK_UPDATE');

484: END IF;
485: --
486: EXCEPTION
487: WHEN others THEN
488: wsh_util_core.default_handler('WSH_TRIP_STOPS_ACTIONS.CHECK_UPDATE');
489: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR;
490:
491: --
492: -- Debug Statements

Line 514: l_in_rec WSH_TRIP_STOPS_VALIDATIONS.chkClose_in_rec_type;

510: l_return_status VARCHAR2(1);
511: others EXCEPTION;
512: --
513: --
514: l_in_rec WSH_TRIP_STOPS_VALIDATIONS.chkClose_in_rec_type;
515: l_out_rec WSH_TRIP_STOPS_VALIDATIONS.chkClose_out_rec_type;
516: --
517: l_stopsProcessed NUMBER;
518: l_stopsProcessedWarnings NUMBER;

Line 515: l_out_rec WSH_TRIP_STOPS_VALIDATIONS.chkClose_out_rec_type;

511: others EXCEPTION;
512: --
513: --
514: l_in_rec WSH_TRIP_STOPS_VALIDATIONS.chkClose_in_rec_type;
515: l_out_rec WSH_TRIP_STOPS_VALIDATIONS.chkClose_out_rec_type;
516: --
517: l_stopsProcessed NUMBER;
518: l_stopsProcessedWarnings NUMBER;
519: l_stopsNotProcessedWarnings NUMBER;

Line 602: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_TRIP_STOPS_VALIDATIONS.CHECK_STOP_CLOSE',WSH_DEBUG_SV.C_PROC_LEVEL);

598: l_in_rec.actual_date := p_actual_date;
599: --
600: --
601: IF l_debug_on THEN
602: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_TRIP_STOPS_VALIDATIONS.CHECK_STOP_CLOSE',WSH_DEBUG_SV.C_PROC_LEVEL);
603: END IF;
604: --
605: WSH_TRIP_STOPS_VALIDATIONS.check_stop_close
606: (

Line 605: WSH_TRIP_STOPS_VALIDATIONS.check_stop_close

601: IF l_debug_on THEN
602: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_TRIP_STOPS_VALIDATIONS.CHECK_STOP_CLOSE',WSH_DEBUG_SV.C_PROC_LEVEL);
603: END IF;
604: --
605: WSH_TRIP_STOPS_VALIDATIONS.check_stop_close
606: (
607: p_in_rec => l_in_rec,
608: x_out_rec => l_out_rec,
609: x_return_status => l_return_status

Line 642: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_TRIP_STOPS_ACTIONS.SETCLOSE',WSH_DEBUG_SV.C_PROC_LEVEL);

638: END IF;
639: --
640: --
641: IF l_debug_on THEN
642: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_TRIP_STOPS_ACTIONS.SETCLOSE',WSH_DEBUG_SV.C_PROC_LEVEL);
643: END IF;
644: --
645: WSH_TRIP_STOPS_ACTIONS.setClose
646: (

Line 645: WSH_TRIP_STOPS_ACTIONS.setClose

641: IF l_debug_on THEN
642: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_TRIP_STOPS_ACTIONS.SETCLOSE',WSH_DEBUG_SV.C_PROC_LEVEL);
643: END IF;
644: --
645: WSH_TRIP_STOPS_ACTIONS.setClose
646: (
647: p_in_rec => l_in_rec,
648: p_in_rec1 => l_out_rec,
649: p_defer_interface_flag => p_defer_interface_flag,

Line 708: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_TRIP_STOPS_VALIDATIONS.CHECK_STOP_ARRIVE',WSH_DEBUG_SV.C_PROC_LEVEL);

704: l_in_rec.actual_date := p_actual_date;
705: --
706: --
707: IF l_debug_on THEN
708: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_TRIP_STOPS_VALIDATIONS.CHECK_STOP_ARRIVE',WSH_DEBUG_SV.C_PROC_LEVEL);
709: END IF;
710: --
711: WSH_TRIP_VALIDATIONS.check_stop_arrive
712: (

Line 726: UPDATE wsh_trip_stops

722: x_num_warnings => l_num_warnings,
723: x_num_errors => l_num_errors
724: );
725: --
726: UPDATE wsh_trip_stops
727: SET status_code = 'AR',
728: actual_arrival_date = nvl(p_actual_date, SYSDATE)
729: WHERE stop_id IN (p_stop_rows(i), l_linked_stop_id) --wr
730: RETURNING stop_id BULK COLLECT INTO l_stop_tab; -- Added for DBI Project;

Line 772: -- Updating WSH_TRIP_STOPS.

768: -- End of code for Workflow project
769:
770: --
771: -- DBI Project
772: -- Updating WSH_TRIP_STOPS.
773: -- Call DBI API after the Update.
774: -- This API will also check for DBI Installed or not
775: IF l_debug_on THEN
776: WSH_DEBUG_SV.log(l_module_name,'Calling DBI API.Stop Count -',l_stop_tab.count);

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

820: THEN
821: FND_MESSAGE.SET_NAME('WSH','WSH_STOP_ARRIVE_ERROR');
822: --
823: IF l_debug_on THEN
824: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_TRIP_STOPS_PVT.GET_NAME',WSH_DEBUG_SV.C_PROC_LEVEL);
825: END IF;
826: --
827: FND_MESSAGE.SET_TOKEN('stop_name',wsh_trip_stops_pvt.get_name(p_stop_rows(i),p_caller));
828: END IF;

Line 827: FND_MESSAGE.SET_TOKEN('stop_name',wsh_trip_stops_pvt.get_name(p_stop_rows(i),p_caller));

823: IF l_debug_on THEN
824: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_TRIP_STOPS_PVT.GET_NAME',WSH_DEBUG_SV.C_PROC_LEVEL);
825: END IF;
826: --
827: FND_MESSAGE.SET_TOKEN('stop_name',wsh_trip_stops_pvt.get_name(p_stop_rows(i),p_caller));
828: END IF;
829: --
830: wsh_util_core.add_message(WSH_UTIL_CORE.G_RET_STS_ERROR,l_module_name);
831: --}

Line 969: from wsh_trip_stops st, wsh_trips tr

965:
966: CURSOR get_status(l_stop_id NUMBER) IS
967: select st.status_code, tr.status_code ,
968: NVL(st.shipments_type_flag,'O') -- J-IB-NPARIKH
969: from wsh_trip_stops st, wsh_trips tr
970: where st.stop_id = l_stop_id
971: and st.trip_id = tr.trip_id;
972:
973: others EXCEPTION;

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

1060: --
1061: -- Debug Statements
1062: --
1063: IF l_debug_on THEN
1064: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_TRIP_STOPS_PVT.GET_NAME',WSH_DEBUG_SV.C_PROC_LEVEL);
1065: END IF;
1066: --
1067: FND_MESSAGE.SET_TOKEN('STOP_NAME',wsh_trip_stops_pvt.get_name(p_stop_rows(i),p_caller));
1068: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;

Line 1067: FND_MESSAGE.SET_TOKEN('STOP_NAME',wsh_trip_stops_pvt.get_name(p_stop_rows(i),p_caller));

1063: IF l_debug_on THEN
1064: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_TRIP_STOPS_PVT.GET_NAME',WSH_DEBUG_SV.C_PROC_LEVEL);
1065: END IF;
1066: --
1067: FND_MESSAGE.SET_TOKEN('STOP_NAME',wsh_trip_stops_pvt.get_name(p_stop_rows(i),p_caller));
1068: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
1069: wsh_util_core.add_message(x_return_status);
1070: l_num_error := l_num_error + 1;
1071:

Line 1133: wsh_util_core.default_handler('WSH_TRIP_STOPS_ACTIONS.CHANGE_STATUS');

1129: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:INVALID_STOP');
1130: END IF;
1131: --
1132: WHEN others THEN
1133: wsh_util_core.default_handler('WSH_TRIP_STOPS_ACTIONS.CHANGE_STATUS');
1134: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR;
1135:
1136:
1137: --

Line 1209: from wsh_trip_stops where stop_id=p_stop_rows(i);

1205:
1206: FOR i IN 1..p_stop_rows.count LOOP
1207:
1208: select trip_id into dummy_trip_ids(i)
1209: from wsh_trip_stops where stop_id=p_stop_rows(i);
1210: END LOOP;
1211:
1212: END IF;
1213:

Line 1240: wsh_util_core.default_handler('WSH_TRIP_STOPS_ACTIONS.CALC_STOP_WEIGHT_VOLUME');

1236: END IF;
1237: --
1238: EXCEPTION
1239: WHEN others THEN
1240: wsh_util_core.default_handler('WSH_TRIP_STOPS_ACTIONS.CALC_STOP_WEIGHT_VOLUME');
1241: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR;
1242:
1243: --
1244: -- Debug Statements

Line 1279: p_in_rec IN WSH_TRIP_STOPS_VALIDATIONS.chkClose_in_rec_type,

1275: --========================================================================
1276: --
1277: PROCEDURE autoCloseOpen
1278: (
1279: p_in_rec IN WSH_TRIP_STOPS_VALIDATIONS.chkClose_in_rec_type,
1280: p_reopenStop IN BOOLEAN DEFAULT FALSE,
1281: x_stop_processed OUT NOCOPY VARCHAR2,
1282: x_return_status OUT NOCOPY VARCHAR2
1283: )

Line 1292: l_in_rec WSH_TRIP_STOPS_VALIDATIONS.chkClose_in_rec_type;

1288: l_num_warnings NUMBER;
1289: l_num_errors NUMBER;
1290: --
1291: l_actual_date DATE := NULL;
1292: l_in_rec WSH_TRIP_STOPS_VALIDATIONS.chkClose_in_rec_type;
1293: l_out_rec WSH_TRIP_STOPS_VALIDATIONS.chkClose_out_rec_type;
1294: --
1295: l_debug_on BOOLEAN;
1296: --

Line 1293: l_out_rec WSH_TRIP_STOPS_VALIDATIONS.chkClose_out_rec_type;

1289: l_num_errors NUMBER;
1290: --
1291: l_actual_date DATE := NULL;
1292: l_in_rec WSH_TRIP_STOPS_VALIDATIONS.chkClose_in_rec_type;
1293: l_out_rec WSH_TRIP_STOPS_VALIDATIONS.chkClose_out_rec_type;
1294: --
1295: l_debug_on BOOLEAN;
1296: --
1297: l_module_name CONSTANT VARCHAR2(100) := 'wsh.plsql.' || G_PKG_NAME || '.' || 'autoCloseOpen';

Line 1334: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_TRIP_STOPS_VALIDATIONS.CHECK_STOP_CLOSE',WSH_DEBUG_SV.C_PROC_LEVEL);

1330: --
1331: --
1332: IF l_debug_on THEN
1333: WSH_DEBUG_SV.log(l_module_name,'l_in_rec.caller',l_in_rec.caller);
1334: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_TRIP_STOPS_VALIDATIONS.CHECK_STOP_CLOSE',WSH_DEBUG_SV.C_PROC_LEVEL);
1335: END IF;
1336: --
1337: -- Check if stop can be closed or not.
1338: --

Line 1339: WSH_TRIP_STOPS_VALIDATIONS.check_stop_close

1335: END IF;
1336: --
1337: -- Check if stop can be closed or not.
1338: --
1339: WSH_TRIP_STOPS_VALIDATIONS.check_stop_close
1340: (
1341: p_in_rec => l_in_rec,
1342: x_out_rec => l_out_rec,
1343: x_return_status => l_return_status

Line 1358: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_TRIP_STOPS_VALIDATIONS.get_stop_close_date',WSH_DEBUG_SV.C_PROC_LEVEL);

1354: AND NOT(p_reopenStop)
1355: THEN
1356: --{
1357: IF l_debug_on THEN
1358: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_TRIP_STOPS_VALIDATIONS.get_stop_close_date',WSH_DEBUG_SV.C_PROC_LEVEL);
1359: END IF;
1360: --
1361: -- Stop can be closed and input parameter p_reopenStop is FALSE.
1362: -- First, determine the stop close date

Line 1365: WSH_TRIP_STOPS_VALIDATIONS.get_stop_close_date

1361: -- Stop can be closed and input parameter p_reopenStop is FALSE.
1362: -- First, determine the stop close date
1363: -- and then call stop close api
1364: --
1365: WSH_TRIP_STOPS_VALIDATIONS.get_stop_close_date
1366: (
1367: p_trip_id => l_out_rec.trip_id,
1368: p_stop_id => p_in_rec.stop_id,
1369: p_stop_sequence_number => l_out_rec.stop_sequence_number,

Line 1387: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_TRIP_STOPS_ACTIONS.setClose',WSH_DEBUG_SV.C_PROC_LEVEL);

1383: l_in_rec.put_messages := TRUE;
1384: --
1385: --
1386: IF l_debug_on THEN
1387: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_TRIP_STOPS_ACTIONS.setClose',WSH_DEBUG_SV.C_PROC_LEVEL);
1388: END IF;
1389: --
1390: WSH_TRIP_STOPS_ACTIONS.setClose
1391: (

Line 1390: WSH_TRIP_STOPS_ACTIONS.setClose

1386: IF l_debug_on THEN
1387: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_TRIP_STOPS_ACTIONS.setClose',WSH_DEBUG_SV.C_PROC_LEVEL);
1388: END IF;
1389: --
1390: WSH_TRIP_STOPS_ACTIONS.setClose
1391: (
1392: p_in_rec => l_in_rec,
1393: p_in_rec1 => l_out_rec,
1394: p_defer_interface_flag => 'Y',

Line 1419: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_TRIP_STOPS_ACTIONS.setOpen',WSH_DEBUG_SV.C_PROC_LEVEL);

1415: l_in_rec.put_messages := TRUE;
1416: --
1417: --
1418: IF l_debug_on THEN
1419: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_TRIP_STOPS_ACTIONS.setOpen',WSH_DEBUG_SV.C_PROC_LEVEL);
1420: END IF;
1421: --
1422: WSH_TRIP_STOPS_ACTIONS.setOpen
1423: (

Line 1422: WSH_TRIP_STOPS_ACTIONS.setOpen

1418: IF l_debug_on THEN
1419: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_TRIP_STOPS_ACTIONS.setOpen',WSH_DEBUG_SV.C_PROC_LEVEL);
1420: END IF;
1421: --
1422: WSH_TRIP_STOPS_ACTIONS.setOpen
1423: (
1424: p_in_rec => l_in_rec,
1425: p_in_rec1 => l_out_rec,
1426: x_return_status => l_return_status

Line 1489: wsh_util_core.default_handler('WSH_TRIP_STOPS_ACTIONS.autoCloseOpen', l_module_name);

1485: --
1486: WHEN OTHERS THEN
1487:
1488: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR ;
1489: wsh_util_core.default_handler('WSH_TRIP_STOPS_ACTIONS.autoCloseOpen', l_module_name);
1490: IF l_debug_on THEN
1491: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
1492: END IF;
1493: --

Line 1508: -- WSH_TRIP_STOPS_VALIDATIONS.check_stop_close, which in turn will set its out

1504: -- x_return_status Return status of API
1505: --
1506: -- PRE-REQS : Caller should set all the attributes of input parameters p_in_rec and p_in_rec1.
1507: -- Typically, this procedure gets called after call to
1508: -- WSH_TRIP_STOPS_VALIDATIONS.check_stop_close, which in turn will set its out
1509: -- parameter x_out_rec which can be passed as input (p_in_rec1) to this API.
1510: --
1511: --
1512: -- COMMENT : This API performs the stop close operation

Line 1530: p_in_rec IN WSH_TRIP_STOPS_VALIDATIONS.chkClose_in_rec_type,

1526: --========================================================================
1527: --
1528: PROCEDURE setClose
1529: (
1530: p_in_rec IN WSH_TRIP_STOPS_VALIDATIONS.chkClose_in_rec_type,
1531: p_in_rec1 IN WSH_TRIP_STOPS_VALIDATIONS.chkClose_out_rec_type,
1532: p_defer_interface_Flag IN VARCHAR2,
1533: x_return_status OUT NOCOPY VARCHAR2
1534: )

Line 1531: p_in_rec1 IN WSH_TRIP_STOPS_VALIDATIONS.chkClose_out_rec_type,

1527: --
1528: PROCEDURE setClose
1529: (
1530: p_in_rec IN WSH_TRIP_STOPS_VALIDATIONS.chkClose_in_rec_type,
1531: p_in_rec1 IN WSH_TRIP_STOPS_VALIDATIONS.chkClose_out_rec_type,
1532: p_defer_interface_Flag IN VARCHAR2,
1533: x_return_status OUT NOCOPY VARCHAR2
1534: )
1535: IS

Line 1554: l_stop_in_rec WSH_TRIP_STOPS_VALIDATIONS.chkClose_in_rec_type;

1550: l_warehouse_type VARCHAR2(30);
1551: l_cms_flag VARCHAR2(1);
1552: l_in_rec WSH_DELIVERY_VALIDATIONS.ChgStatus_in_rec_type;
1553: l_trip_in_rec WSH_TRIP_VALIDATIONS.ChgStatus_in_rec_type;
1554: l_stop_in_rec WSH_TRIP_STOPS_VALIDATIONS.chkClose_in_rec_type;
1555: --
1556: --
1557: l_stop_closed VARCHAR2(10);
1558: l_stop_opened VARCHAR2(10);

Line 1866: l_tms_interface_flag := WSH_TRIP_STOPS_PVT.C_TMS_ACTUAL_REQUEST;

1862: wsh_util_core.add_message(l_return_status);
1863: RAISE FND_API.G_EXC_ERROR;
1864: END IF;
1865: IF l_last_pickup_stop_closed = 'Y' AND l_eligible_for_asr = 'Y' THEN --{
1866: l_tms_interface_flag := WSH_TRIP_STOPS_PVT.C_TMS_ACTUAL_REQUEST;
1867: ELSE
1868: l_tms_interface_flag := WSH_TRIP_STOPS_PVT.C_TMS_NOT_TO_BE_SENT;
1869: END IF; --}
1870: --OTM R12 End

Line 1868: l_tms_interface_flag := WSH_TRIP_STOPS_PVT.C_TMS_NOT_TO_BE_SENT;

1864: END IF;
1865: IF l_last_pickup_stop_closed = 'Y' AND l_eligible_for_asr = 'Y' THEN --{
1866: l_tms_interface_flag := WSH_TRIP_STOPS_PVT.C_TMS_ACTUAL_REQUEST;
1867: ELSE
1868: l_tms_interface_flag := WSH_TRIP_STOPS_PVT.C_TMS_NOT_TO_BE_SENT;
1869: END IF; --}
1870: --OTM R12 End
1871: END IF; --} -- gc3 is installed
1872: --

Line 1877: UPDATE wsh_trip_stops

1873:
1874: --
1875: -- Bug 3901377, actual_arrival_date could have been populated if stop was marked as arrived
1876: -- before. To preserve that date use an extra NVL
1877: UPDATE wsh_trip_stops
1878: SET pending_interface_flag = DECODE(l_cnt,0,pending_interface_flag,'Y'),
1879: status_code = 'CL',
1880: actual_departure_date = NVL(p_in_rec.actual_date, SYSDATE),
1881: actual_arrival_date = NVL(actual_arrival_date,NVL(p_in_rec.actual_date,SYSDATE)), -- Bug 3901377

Line 1938: -- Updating WSH_TRIP_STOPS.

1934: END IF;
1935: -- End of code for Workflow project
1936: --
1937: -- DBI Project
1938: -- Updating WSH_TRIP_STOPS.
1939: -- Call DBI API after the Update.
1940: -- This API will also check for DBI Installed or not
1941: IF l_debug_on THEN
1942: WSH_DEBUG_SV.log(l_module_name,'Calling DBI API.Stop Count -',l_stop_tab.count);

Line 2298: wsh_util_core.default_handler('WSH_TRIP_STOPS_ACTIONS.setClose',l_module_name);

2294: WSH_DEBUG_SV.logmsg(l_module_name,'WSH_UTIL_CORE.G_EXC_WARNING exception has occured ',WSH_DEBUG_SV.C_EXCEP_LEVEL);
2295: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:WSH_UTIL_CORE.G_EXC_WARNING');
2296: END IF;
2297: WHEN others THEN
2298: wsh_util_core.default_handler('WSH_TRIP_STOPS_ACTIONS.setClose',l_module_name);
2299: --
2300: --ROLLBACK TO close_stop_begin_sp;
2301: --
2302: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR;

Line 2325: -- WSH_TRIP_STOPS_VALIDATIONS.check_stop_close, which in turn will set its out

2321: -- x_return_status Return status of API
2322: --
2323: -- PRE-REQS : Caller should set all the attributes of input parameters p_in_rec and p_in_rec1.
2324: -- Typically, this procedure gets called after call to
2325: -- WSH_TRIP_STOPS_VALIDATIONS.check_stop_close, which in turn will set its out
2326: -- parameter x_out_rec which can be passed as input (p_in_rec1) to this API.
2327: --
2328: --
2329: -- COMMENT : This API performs the stop open operation. This is only required for

Line 2345: p_in_rec IN WSH_TRIP_STOPS_VALIDATIONS.chkClose_in_rec_type,

2341: --========================================================================
2342: --
2343: PROCEDURE setOpen
2344: (
2345: p_in_rec IN WSH_TRIP_STOPS_VALIDATIONS.chkClose_in_rec_type,
2346: p_in_rec1 IN WSH_TRIP_STOPS_VALIDATIONS.chkClose_out_rec_type,
2347: x_return_status OUT NOCOPY VARCHAR2
2348: )
2349: IS

Line 2346: p_in_rec1 IN WSH_TRIP_STOPS_VALIDATIONS.chkClose_out_rec_type,

2342: --
2343: PROCEDURE setOpen
2344: (
2345: p_in_rec IN WSH_TRIP_STOPS_VALIDATIONS.chkClose_in_rec_type,
2346: p_in_rec1 IN WSH_TRIP_STOPS_VALIDATIONS.chkClose_out_rec_type,
2347: x_return_status OUT NOCOPY VARCHAR2
2348: )
2349: IS
2350: --{

Line 2357: FROM wsh_trip_stops

2353: CURSOR next_ib_stops_cur (p_trip_id IN NUMBER, p_stop_sequence_number IN NUMBER)
2354: IS
2355: SELECT stop_id, stop_sequence_number,
2356: NVL(shipments_type_flag,'O') shipments_type_flag
2357: FROM wsh_trip_stops
2358: WHERE trip_id = p_trip_id
2359: AND stop_sequence_number > p_stop_sequence_number
2360: AND NVL(shipments_type_flag,'O') IN ( 'I','M')
2361: AND status_code = 'CL'

Line 2385: wsh_trip_stops wts

2381: IS
2382: SELECT wnd.delivery_id, wts.stop_location_id, wnd.ultimate_dropoff_location_id
2383: FROM wsh_delivery_legs wdl,
2384: wsh_new_deliveries wnd,
2385: wsh_trip_stops wts
2386: WHERE wdl.drop_off_stop_id = p_stop_id
2387: AND wts.stop_id = p_stop_id
2388: AND wdl.delivery_id = wnd.delivery_id
2389: AND NVL(wnd.shipment_direction,'O') NOT IN ('O','IO');

Line 2406: FROM wsh_trip_stops next_leg_do_stop,

2402: next_leg_pu_stop.stop_id pu_stop_id,
2403: NVL(wnd.shipment_direction,'O') shipment_direction,
2404: wnd.status_code dlvy_status_code,
2405: wnd.ultimatE_dropoff_location_id dlvy_ultimate_doLocationId
2406: FROM wsh_trip_stops next_leg_do_stop,
2407: wsh_trip_stops next_leg_pu_stop,
2408: wsh_trip_stops curr_leg_do_stop,
2409: wsh_delivery_legs next_leg,
2410: wsh_delivery_legs curr_leg,

Line 2407: wsh_trip_stops next_leg_pu_stop,

2403: NVL(wnd.shipment_direction,'O') shipment_direction,
2404: wnd.status_code dlvy_status_code,
2405: wnd.ultimatE_dropoff_location_id dlvy_ultimate_doLocationId
2406: FROM wsh_trip_stops next_leg_do_stop,
2407: wsh_trip_stops next_leg_pu_stop,
2408: wsh_trip_stops curr_leg_do_stop,
2409: wsh_delivery_legs next_leg,
2410: wsh_delivery_legs curr_leg,
2411: wsh_new_deliveries wnd

Line 2408: wsh_trip_stops curr_leg_do_stop,

2404: wnd.status_code dlvy_status_code,
2405: wnd.ultimatE_dropoff_location_id dlvy_ultimate_doLocationId
2406: FROM wsh_trip_stops next_leg_do_stop,
2407: wsh_trip_stops next_leg_pu_stop,
2408: wsh_trip_stops curr_leg_do_stop,
2409: wsh_delivery_legs next_leg,
2410: wsh_delivery_legs curr_leg,
2411: wsh_new_deliveries wnd
2412: WHERE next_leg.drop_off_stop_id = next_leg_do_stop.stop_id

Line 2435: l_stop_in_rec WSH_TRIP_STOPS_VALIDATIONS.chkClose_in_rec_type;

2431: l_stop_opened VARCHAR2(10);
2432: l_allowed VARCHAR2(10);
2433: --
2434: l_trip_in_rec WSH_TRIP_VALIDATIONS.ChgStatus_in_rec_type;
2435: l_stop_in_rec WSH_TRIP_STOPS_VALIDATIONS.chkClose_in_rec_type;
2436: l_stop_id_tbl WSH_UTIL_CORE.id_tab_type;
2437: l_stop_cnt NUMBER := 0;
2438: l_index NUMBER;
2439: l_stop_id NUMBER;

Line 2481: UPDATE wsh_trip_stops

2477: l_num_warnings := 0;
2478: l_num_errors := 0;
2479: --
2480: --
2481: UPDATE wsh_trip_stops
2482: SET status_code = 'OP',
2483: actual_departure_date = NULL,
2484: actual_arrival_date = NULL, -- Bug 3901377
2485: --actual_departure_date = nvl(p_in_rec.actual_date, SYSDATE),

Line 2520: -- Updating WSH_TRIP_STOPS.

2516: END IF;
2517: -- End of code for Workflow project
2518: --
2519: -- DBI Project
2520: -- Updating WSH_TRIP_STOPS.
2521: -- Call DBI API after the Update.
2522: -- This API will also check for DBI Installed or not
2523: IF l_debug_on THEN
2524: WSH_DEBUG_SV.log(l_module_name,'Calling DBI API.Stop Count -',l_stop_tab.count);

Line 2575: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_TRIP_STOPS_ACTIONS.autoCLOSE',WSH_DEBUG_SV.C_PROC_LEVEL);

2571: l_stop_in_rec.actual_date := p_in_rec.actual_date;
2572: --
2573: --
2574: IF l_debug_on THEN
2575: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_TRIP_STOPS_ACTIONS.autoCLOSE',WSH_DEBUG_SV.C_PROC_LEVEL);
2576: END IF;
2577: --
2578: WSH_TRIP_STOPS_ACTIONS.autoCloseOpen
2579: (

Line 2578: WSH_TRIP_STOPS_ACTIONS.autoCloseOpen

2574: IF l_debug_on THEN
2575: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_TRIP_STOPS_ACTIONS.autoCLOSE',WSH_DEBUG_SV.C_PROC_LEVEL);
2576: END IF;
2577: --
2578: WSH_TRIP_STOPS_ACTIONS.autoCloseOpen
2579: (
2580: p_in_rec => l_stop_in_rec,
2581: p_reopenStop => TRUE,
2582: x_stop_processed => l_stop_opened,

Line 2798: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_TRIP_STOPS_ACTIONS.autoCLOSE',WSH_DEBUG_SV.C_PROC_LEVEL);

2794: l_stop_in_rec.actual_date := p_in_rec.actual_date;
2795: --
2796: --
2797: IF l_debug_on THEN
2798: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_TRIP_STOPS_ACTIONS.autoCLOSE',WSH_DEBUG_SV.C_PROC_LEVEL);
2799: END IF;
2800: --
2801: WSH_TRIP_STOPS_ACTIONS.autoCloseOpen
2802: (

Line 2801: WSH_TRIP_STOPS_ACTIONS.autoCloseOpen

2797: IF l_debug_on THEN
2798: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_TRIP_STOPS_ACTIONS.autoCLOSE',WSH_DEBUG_SV.C_PROC_LEVEL);
2799: END IF;
2800: --
2801: WSH_TRIP_STOPS_ACTIONS.autoCloseOpen
2802: (
2803: p_in_rec => l_stop_in_rec,
2804: p_reopenStop => TRUE,
2805: x_stop_processed => l_stop_opened,

Line 2832: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_TRIP_STOPS_ACTIONS.autoCLOSE',WSH_DEBUG_SV.C_PROC_LEVEL);

2828: l_stop_in_rec.actual_date := p_in_rec.actual_date;
2829: --
2830: --
2831: IF l_debug_on THEN
2832: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_TRIP_STOPS_ACTIONS.autoCLOSE',WSH_DEBUG_SV.C_PROC_LEVEL);
2833: END IF;
2834: --
2835: WSH_TRIP_STOPS_ACTIONS.autoCloseOpen
2836: (

Line 2835: WSH_TRIP_STOPS_ACTIONS.autoCloseOpen

2831: IF l_debug_on THEN
2832: WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_TRIP_STOPS_ACTIONS.autoCLOSE',WSH_DEBUG_SV.C_PROC_LEVEL);
2833: END IF;
2834: --
2835: WSH_TRIP_STOPS_ACTIONS.autoCloseOpen
2836: (
2837: p_in_rec => l_stop_in_rec,
2838: p_reopenStop => TRUE,
2839: x_stop_processed => l_stop_opened,

Line 2930: wsh_util_core.default_handler('WSH_TRIP_STOPS_ACTIONS.setOpen',l_module_name);

2926: WSH_DEBUG_SV.logmsg(l_module_name,'WSH_UTIL_CORE.G_EXC_WARNING exception has occured ',WSH_DEBUG_SV.C_EXCEP_LEVEL);
2927: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:WSH_UTIL_CORE.G_EXC_WARNING');
2928: END IF;
2929: WHEN others THEN
2930: wsh_util_core.default_handler('WSH_TRIP_STOPS_ACTIONS.setOpen',l_module_name);
2931: --
2932: --ROLLBACK TO open_stop_begin_sp;
2933: --
2934: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR;

Line 2951: ( p_stop_details_rec IN OUT NOCOPY WSH_TRIP_STOPS_VALIDATIONS.stop_details,

2947: --
2948: --
2949:
2950: PROCEDURE RESET_STOP_SEQ_NUMBERS
2951: ( p_stop_details_rec IN OUT NOCOPY WSH_TRIP_STOPS_VALIDATIONS.stop_details,
2952: x_return_status OUT NOCOPY VARCHAR2
2953: ) IS
2954:
2955:

Line 2958: FROM wsh_trip_stops

2954:
2955:
2956: CURSOR get_max_closed_seq (c_trip_id number) is
2957: SELECT max(stop_sequence_number)
2958: FROM wsh_trip_stops
2959: WHERE trip_id = c_trip_id
2960: AND status_code in ('AR', 'CL');
2961: -- Bug 3814592
2962: -- look for open stops higher than closed/arrived stops

Line 2970: FROM wsh_trip_stops

2966: c_sequence_number NUMBER) is
2967: SELECT planned_arrival_date,
2968: stop_id,
2969: physical_stop_id -- SSN change
2970: FROM wsh_trip_stops
2971: WHERE trip_id = c_trip_id
2972: and status_code = 'OP'
2973: and (stop_sequence_number > c_sequence_number -- Update existing stops
2974: OR stop_sequence_number < 1) -- Newly created stops

Line 2978: l_stop_rec_tab WSH_TRIP_STOPS_VALIDATIONS.stop_details_tab;

2974: OR stop_sequence_number < 1) -- Newly created stops
2975: FOR update nowait
2976: ORDER BY 1, 2;
2977:
2978: l_stop_rec_tab WSH_TRIP_STOPS_VALIDATIONS.stop_details_tab;
2979: l_max_seq_number NUMBER;
2980: l_trip_id_tmp NUMBER;
2981: l_locking_stops VARCHAR2(1);
2982: i NUMBER;

Line 3073: update wsh_trip_stops set stop_sequence_number = l_max_seq_number

3069: l_max_seq_number := l_max_seq_number + l_seq_offset;
3070: l_seq_offset := l_normal_seq_offset; -- always reset for next normal stop.
3071: END IF;
3072:
3073: update wsh_trip_stops set stop_sequence_number = l_max_seq_number
3074: where stop_id = l_stop_rec_tab(i).stop_id;
3075:
3076: IF l_debug_on THEN
3077: WSH_DEBUG_SV.logmsg(l_module_name,'updated stop '||l_stop_rec_tab(i).stop_id||' with sequence number '||to_char(l_max_seq_number));

Line 3147: wsh_util_core.default_handler('WSH_TRIP_STOPS_ACTIONS.reset_stop_sequence_numbers',l_module_name);

3143: END IF;
3144:
3145: WHEN OTHERS THEN
3146:
3147: wsh_util_core.default_handler('WSH_TRIP_STOPS_ACTIONS.reset_stop_sequence_numbers',l_module_name);
3148: IF get_all_open_stops%ISOPEN THEN
3149: close get_all_open_stops;
3150: END IF;
3151: ROLLBACK TO begin_reset_stop_seq;

Line 3184: (p_trip_id IN WSH_TRIP_STOPS.TRIP_ID%TYPE,

3180: -- Assumption : p_trip_id and p_stop_id as passed by the calling API
3181: ---------------------------------------------------------------------------
3182:
3183: PROCEDURE LAST_PICKUP_STOP_CLOSED
3184: (p_trip_id IN WSH_TRIP_STOPS.TRIP_ID%TYPE,
3185: p_stop_id IN WSH_TRIP_STOPS.STOP_ID%TYPE,
3186: x_last_pickup_stop_closed OUT NOCOPY VARCHAR2,
3187: x_eligible_for_asr OUT NOCOPY VARCHAR2,
3188: x_return_status OUT NOCOPY VARCHAR2) IS

Line 3185: p_stop_id IN WSH_TRIP_STOPS.STOP_ID%TYPE,

3181: ---------------------------------------------------------------------------
3182:
3183: PROCEDURE LAST_PICKUP_STOP_CLOSED
3184: (p_trip_id IN WSH_TRIP_STOPS.TRIP_ID%TYPE,
3185: p_stop_id IN WSH_TRIP_STOPS.STOP_ID%TYPE,
3186: x_last_pickup_stop_closed OUT NOCOPY VARCHAR2,
3187: x_eligible_for_asr OUT NOCOPY VARCHAR2,
3188: x_return_status OUT NOCOPY VARCHAR2) IS
3189:

Line 3194: FROM wsh_trip_stops wts

3190: --OTM R12 Org-Specific. (Reviewed by perf team)
3191: CURSOR pickup_stop_csr IS
3192: SELECT stop_id
3193: FROM ( SELECT wts.stop_id
3194: FROM wsh_trip_stops wts
3195: WHERE wts.trip_id = p_trip_id
3196: AND wts.status_code IN ( 'OP', 'AR')
3197: AND EXISTS ( SELECT 'c'
3198: FROM wsh_delivery_legs wdl

Line 3206: FROM wsh_trip_stops wts

3202:
3203: --OTM R12 Org-Specific (Reviewed by perf team)
3204: CURSOR check_eligible_for_asr_csr IS
3205: SELECT 1
3206: FROM wsh_trip_stops wts
3207: ,wsh_delivery_legs wdl
3208: ,wsh_new_deliveries wnd
3209: WHERE wts.trip_id = p_trip_id
3210: AND wts.stop_id = wdl.pick_up_stop_id

Line 3218: FROM wsh_trip_stops wts

3214: WHERE wnd.organization_id = wsp.organization_id
3215: AND wsp.otm_enabled = 'Y'
3216: )
3217: AND NOT EXISTS ( SELECT 1
3218: FROM wsh_trip_stops wts
3219: ,wsh_delivery_legs wdl
3220: ,wsh_new_deliveries wnd
3221: WHERE wts.trip_id = p_trip_id
3222: AND wts.stop_id = wdl.pick_up_stop_id

Line 3233: l_stop_id wsh_trip_stops.stop_id%TYPE;

3229: AND ROWNUM = 1;
3230: --OTM R12
3231:
3232: --OTM R12 Org-Specific start.
3233: l_stop_id wsh_trip_stops.stop_id%TYPE;
3234: l_id NUMBER;
3235: --OTM R12 End ;
3236:
3237: l_debug_on BOOLEAN;

Line 3345: wsh_util_core.default_handler('wsh_trip_stops_actions.last_pickup_stop_closed',

3341: IF check_eligible_for_asr_csr%ISOPEN THEN
3342: CLOSE check_eligible_for_asr_csr;
3343: END IF;
3344:
3345: wsh_util_core.default_handler('wsh_trip_stops_actions.last_pickup_stop_closed',
3346: l_module_name);
3347: --
3348: IF l_debug_on THEN
3349: WSH_DEBUG_SV.log(l_module_name,

Line 3357: END WSH_TRIP_STOPS_ACTIONS;

3353: END IF;
3354:
3355: END LAST_PICKUP_STOP_CLOSED;
3356:
3357: END WSH_TRIP_STOPS_ACTIONS;