DBA Data[Home] [Help]

APPS.WSH_TP_RELEASE dependencies on WSH_TRIPS

Line 50: FROM wsh_trips t, wsh_trip_stops st, wsh_delivery_legs dg, wsh_new_deliveries dl

46: CURSOR c_get_deliveries (p_tripid NUMBER) IS
47: SELECT dl.delivery_id, dl.planned_flag, dl.status_code, dl.ignore_for_planning, dl.name delivery_name,
48: dl.organization_id organization_id, -- LPN CONV. rv
49: nvl(dl.shipment_direction,'O') shipment_direction -- LPN CONV. rv
50: FROM wsh_trips t, wsh_trip_stops st, wsh_delivery_legs dg, wsh_new_deliveries dl
51: WHERE t.trip_id = p_tripid AND
52: st.trip_id = t.trip_id AND
53: dg.pick_up_stop_id = st.stop_id AND
54: dl.delivery_id = dg.delivery_id;

Line 58: FROM wsh_trips t, wsh_trip_stops st, wsh_delivery_legs dg, wsh_new_deliveries dl

54: dl.delivery_id = dg.delivery_id;
55:
56: CURSOR c_get_dels_diff_ignoreflag (p_delid NUMBER, p_tripid NUMBER, p_ignoreplan VARCHAR2) IS
57: SELECT dl.name delivery_name, t.name trip_name
58: FROM wsh_trips t, wsh_trip_stops st, wsh_delivery_legs dg, wsh_new_deliveries dl
59: WHERE t.trip_id <> p_tripid AND
60: st.trip_id = t.trip_id AND
61: dg.pick_up_stop_id = st.stop_id AND
62: dl.delivery_id = dg.delivery_id AND

Line 69: FROM wsh_trips t, wsh_trip_stops st, wsh_delivery_legs dg

65: -- OR t.planned_flag='F'); --change in design - firm check not needed
66:
67: CURSOR c_get_del_trips (p_delid NUMBER, p_tripid NUMBER) IS
68: SELECT t.trip_id, t.name trip_name
69: FROM wsh_trips t, wsh_trip_stops st, wsh_delivery_legs dg
70: WHERE t.trip_id <> p_tripid AND
71: st.trip_id = t.trip_id AND
72: dg.pick_up_stop_id = st.stop_id AND
73: dg.delivery_id=p_delid;

Line 78: FROM wsh_trips t, wsh_trip_stops st, wsh_delivery_legs dg, wsh_new_deliveries dl

74: -- AND t.planned_flag <> 'F'; --change in design - firm check not needed
75:
76: CURSOR c_get_del_ignoreflag_difftrip (p_delid NUMBER, p_ignoreplan VARCHAR2) IS
77: SELECT dl.name delivery_name, t.name trip_name
78: FROM wsh_trips t, wsh_trip_stops st, wsh_delivery_legs dg, wsh_new_deliveries dl
79: WHERE st.trip_id = t.trip_id AND
80: dg.pick_up_stop_id = st.stop_id AND
81: dl.delivery_id = dg.delivery_id AND
82: dl.delivery_id=p_delid AND

Line 276: FND_MESSAGE.SET_TOKEN('TRIP_NAME',wsh_trips_pvt.get_name(p_in_ids(i)));

272: END IF;
273: END LOOP;
274: IF l_okay='F' THEN -- atleast one of the trips the del is assigned to is not in list of ids
275: FND_MESSAGE.SET_NAME('WSH','WSH_TRIP_IGNOREPLAN_ERROR');
276: FND_MESSAGE.SET_TOKEN('TRIP_NAME',wsh_trips_pvt.get_name(p_in_ids(i)));
277: FND_MESSAGE.SET_TOKEN('DEL_NAME',l_del_cur.delivery_name);
278: FND_MESSAGE.SET_TOKEN('REL_TRIP_NAME',cur_othertrip.trip_name);
279: wsh_util_core.add_message(WSH_UTIL_CORE.g_ret_sts_error,l_module_name);
280:

Line 481: FND_MESSAGE.SET_TOKEN('NAME',wsh_trips_pvt.get_name(p_in_ids(i)));

477: rollback to before_update;
478: FND_MESSAGE.SET_NAME('WSH','WSH_IGNOREPLAN_UPDATE_ERROR');
479: l_entity := FND_MESSAGE.GET_STRING('WSH','WSH_ENTITY_TRIP');
480: FND_MESSAGE.SET_TOKEN('ENTITY',l_entity);
481: FND_MESSAGE.SET_TOKEN('NAME',wsh_trips_pvt.get_name(p_in_ids(i)));
482: wsh_util_core.add_message(WSH_UTIL_CORE.g_ret_sts_error,l_module_name);
483: l_num_error:=l_num_error+1;
484: GOTO next_trip;
485: END IF;

Line 512: FND_MESSAGE.SET_TOKEN('NAME',wsh_trips_pvt.get_name(p_in_ids(i)));

508: rollback to before_update;
509: FND_MESSAGE.SET_NAME('WSH','WSH_IGNOREPLAN_UPDATE_ERROR');
510: l_entity := FND_MESSAGE.GET_STRING('WSH','WSH_ENTITY_TRIP');
511: FND_MESSAGE.SET_TOKEN('ENTITY',l_entity);
512: FND_MESSAGE.SET_TOKEN('NAME',wsh_trips_pvt.get_name(p_in_ids(i)));
513: wsh_util_core.add_message(WSH_UTIL_CORE.g_ret_sts_error,l_module_name);
514: l_num_error:=l_num_error+1;
515: GOTO next_trip;
516: END IF;

Line 541: UPDATE wsh_trips

537:
538: --update trips
539: -- OTM R12, glog proj, check the condition first and then update
540: IF l_tp_plan_name_update = 'Y' THEN
541: UPDATE wsh_trips
542: SET ignore_for_planning = l_ignoreplan,
543: tp_plan_name = NULL, -- OTM R12, glog proj
544: last_update_date = sysdate,
545: last_updated_by = FND_GLOBAL.USER_ID,

Line 550: UPDATE wsh_trips

546: last_update_login = FND_GLOBAL.LOGIN_ID -- OTM R12, glog proj
547: WHERE trip_id=p_in_ids(i);
548:
549: ELSE -- l_tp_plan_name_update is null or N, do not update tp_plan_name
550: UPDATE wsh_trips
551: SET ignore_for_planning = l_ignoreplan,
552: last_update_date = sysdate,
553: last_updated_by = FND_GLOBAL.USER_ID,
554: last_update_login = FND_GLOBAL.LOGIN_ID -- OTM R12, glog proj

Line 565: FND_MESSAGE.SET_TOKEN('NAME',wsh_trips_pvt.get_name(p_in_ids(i)));

561: rollback to before_update;
562: FND_MESSAGE.SET_NAME('WSH','WSH_IGNOREPLAN_UPDATE_ERROR');
563: l_entity := FND_MESSAGE.GET_STRING('WSH','WSH_ENTITY_TRIP');
564: FND_MESSAGE.SET_TOKEN('ENTITY',l_entity);
565: FND_MESSAGE.SET_TOKEN('NAME',wsh_trips_pvt.get_name(p_in_ids(i)));
566: wsh_util_core.add_message(WSH_UTIL_CORE.g_ret_sts_error,l_module_name);
567: l_num_error:=l_num_error+1;
568: END IF;
569:

Line 1355: FROM wsh_trips t,

1351: x_return_status OUT NOCOPY VARCHAR2) IS
1352:
1353: CURSOR c_deliveries (c_trip_id NUMBER) IS
1354: SELECT dg.delivery_id
1355: FROM wsh_trips t,
1356: wsh_trip_stops st,
1357: wsh_delivery_legs dg
1358: WHERE t.trip_id = c_trip_id AND
1359: st.trip_id = t.trip_id AND

Line 1366: FROM wsh_trips t,

1362: --for related trips
1363: -- bug 3687559: we only need to look for unfirmed related trips
1364: CURSOR c_trips (c_trip_id NUMBER, c_delid NUMBER) IS
1365: SELECT t.trip_id
1366: FROM wsh_trips t,
1367: wsh_trip_stops st,
1368: wsh_delivery_legs dg
1369: WHERE t.trip_id <> c_trip_id AND
1370: st.trip_id = t.trip_id AND

Line 1379: FROM wsh_trips t,

1375: --for related trips for this delivery, find atleast one delivery which is either planned/unplanned
1376: --trip doesnot have to be firmed for this case. just planned is enough
1377: CURSOR c_find_planunplandeliveries (c_tripid NUMBER, c_delid NUMBER) IS
1378: SELECT dg.delivery_id
1379: FROM wsh_trips t,
1380: wsh_trip_stops st,
1381: wsh_delivery_legs dg,
1382: wsh_new_deliveries dl
1383: WHERE t.trip_id = c_tripid AND

Line 1398: wsh_trips t

1394: CURSOR c_dlvy_trips (c_delid NUMBER) IS
1395: SELECT distinct st.trip_id, t.planned_flag
1396: FROM wsh_trip_stops st,
1397: wsh_delivery_legs dg,
1398: wsh_trips t
1399: WHERE dg.pick_up_stop_id = st.stop_id AND
1400: dg.delivery_id=c_delid AND
1401: st.trip_id = t.trip_id;
1402:

Line 1477: FND_MESSAGE.SET_TOKEN('TRIP_NAME',wsh_trips_pvt.get_name(l_trips_cur.trip_id));

1473: x_return_status => x_return_status);
1474: IF (x_return_status = WSH_UTIL_CORE.G_RET_STS_ERROR) OR (x_return_status = WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR) THEN
1475: rollback to before_firm;
1476: FND_MESSAGE.SET_NAME('WSH','WSH_TRIP_CANNOT_FIRM');
1477: FND_MESSAGE.SET_TOKEN('TRIP_NAME',wsh_trips_pvt.get_name(l_trips_cur.trip_id));
1478: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
1479: wsh_util_core.add_message(x_return_status);
1480: IF l_debug_on THEN
1481: WSH_DEBUG_SV.pop(l_module_name);

Line 1489: UPDATE wsh_trips

1485:
1486: -- bug 3687559: related trips should become RF (not RCF)
1487: l_plannedflag:='Y';
1488:
1489: UPDATE wsh_trips
1490: SET planned_flag = l_plannedflag,
1491: last_update_date = sysdate,
1492: last_updated_by = FND_GLOBAL.USER_ID
1493: WHERE trip_id = l_trips_cur.trip_id;

Line 1499: FND_MESSAGE.SET_TOKEN('NAME',wsh_trips_pvt.get_name(l_trips_cur.trip_id));

1495: IF (SQL%NOTFOUND) THEN
1496: FND_MESSAGE.SET_NAME('WSH','WSH_FIRM_UPDATE_ERROR');
1497: l_entity := FND_MESSAGE.GET_STRING('WSH','WSH_ENTITY_RELATED_TRIP');
1498: FND_MESSAGE.SET_TOKEN('ENTITY',l_entity);
1499: FND_MESSAGE.SET_TOKEN('NAME',wsh_trips_pvt.get_name(l_trips_cur.trip_id));
1500: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
1501: wsh_util_core.add_message(x_return_status);
1502: IF l_debug_on THEN
1503: WSH_DEBUG_SV.pop(l_module_name);

Line 1515: FND_MESSAGE.SET_TOKEN('TRIP_NAME',wsh_trips_pvt.get_name(p_entity_id));

1511:
1512: --if l_deliveries_exist is null, no deliveries exist for trip => trip can't be firmed
1513: IF l_deliveries_exist IS null THEN
1514: FND_MESSAGE.SET_NAME('WSH','WSH_FIRM_TRIP_ERROR');
1515: FND_MESSAGE.SET_TOKEN('TRIP_NAME',wsh_trips_pvt.get_name(p_entity_id));
1516: wsh_util_core.add_message(WSH_UTIL_CORE.g_ret_sts_error,l_module_name);
1517: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
1518: IF l_debug_on THEN
1519: WSH_DEBUG_SV.pop(l_module_name);

Line 1524: UPDATE wsh_trips

1520: END IF;
1521: rollback to before_firm;
1522: RETURN;
1523: ELSE
1524: UPDATE wsh_trips
1525: SET planned_flag = c_routing_firm_flag ,
1526: last_update_date = sysdate,
1527: last_updated_by = FND_GLOBAL.USER_ID
1528: WHERE trip_id = p_entity_id;

Line 1559: FND_MESSAGE.SET_TOKEN('TRIP_NAME',wsh_trips_pvt.get_name(l_trips_cur.trip_id));

1555: x_return_status => x_return_status);
1556: IF (x_return_status = WSH_UTIL_CORE.G_RET_STS_ERROR) OR (x_return_status = WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR) THEN
1557: rollback to before_firm;
1558: FND_MESSAGE.SET_NAME('WSH','WSH_TRIP_CANNOT_FIRM');
1559: FND_MESSAGE.SET_TOKEN('TRIP_NAME',wsh_trips_pvt.get_name(l_trips_cur.trip_id));
1560: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
1561: wsh_util_core.add_message(x_return_status);
1562: IF l_debug_on THEN
1563: WSH_DEBUG_SV.pop(l_module_name);

Line 1568: UPDATE wsh_trips

1564: END IF;
1565: RETURN;
1566: END IF;
1567:
1568: UPDATE wsh_trips
1569: SET planned_flag = l_plannedflag,
1570: last_update_date = sysdate,
1571: last_updated_by = FND_GLOBAL.USER_ID
1572: WHERE trip_id = l_trips_cur.trip_id;

Line 1579: FND_MESSAGE.SET_TOKEN('NAME',wsh_trips_pvt.get_name(l_trips_cur.trip_id));

1575: IF (SQL%NOTFOUND) THEN
1576: FND_MESSAGE.SET_NAME('WSH','WSH_FIRM_UPDATE_ERROR');
1577: l_entity := FND_MESSAGE.GET_STRING('WSH','WSH_ENTITY_RELATED_TRIP');
1578: FND_MESSAGE.SET_TOKEN('ENTITY',l_entity);
1579: FND_MESSAGE.SET_TOKEN('NAME',wsh_trips_pvt.get_name(l_trips_cur.trip_id));
1580: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
1581: wsh_util_core.add_message(x_return_status);
1582: IF l_debug_on THEN
1583: WSH_DEBUG_SV.pop(l_module_name);

Line 1674: FROM wsh_trips t,

1670:
1671: --for related trips
1672: CURSOR c_trips (p_delid NUMBER) IS
1673: SELECT t.trip_id
1674: FROM wsh_trips t,
1675: wsh_trip_stops st,
1676: wsh_delivery_legs dg
1677: WHERE t.trip_id <> p_entity_id AND
1678: st.trip_id = t.trip_id AND

Line 1687: FROM wsh_trips t,

1683: /******DLVY*****/
1684: --for related trips
1685: CURSOR c_dlvy_trips IS
1686: SELECT t.trip_id
1687: FROM wsh_trips t,
1688: wsh_trip_stops st,
1689: wsh_delivery_legs dg
1690: WHERE st.trip_id = t.trip_id AND
1691: dg.pick_up_stop_id = st.stop_id AND

Line 1697: from wsh_trips

1693: and t.planned_flag='F';
1694:
1695: CURSOR c_gettripplannedflag IS
1696: select planned_flag
1697: from wsh_trips
1698: where trip_id=p_entity_id;
1699:
1700: l_tripplan VARCHAR2(1);
1701:

Line 1741: UPDATE wsh_trips

1737: OPEN c_gettripplannedflag;
1738: FETCH c_gettripplannedflag INTO l_tripplan;
1739: CLOSE c_gettripplannedflag;
1740:
1741: UPDATE wsh_trips
1742: SET planned_flag = l_action,
1743: last_update_date = sysdate,
1744: last_updated_by = FND_GLOBAL.USER_ID
1745: WHERE trip_id = p_entity_id;

Line 1789: UPDATE wsh_trips

1785: END IF;
1786:
1787:
1788: FOR l_trips_cur IN c_trips(del_cur.delivery_id) LOOP
1789: UPDATE wsh_trips
1790: SET planned_flag = 'Y',
1791: last_update_date = sysdate,
1792: last_updated_by = FND_GLOBAL.USER_ID
1793: WHERE trip_id = l_trips_cur.trip_id;

Line 1799: FND_MESSAGE.SET_TOKEN('NAME',wsh_trips_pvt.get_name(l_trips_cur.trip_id));

1795: IF (SQL%NOTFOUND) THEN
1796: FND_MESSAGE.SET_NAME('WSH','WSH_FIRM_UPDATE_ERROR');
1797: l_entity := FND_MESSAGE.GET_STRING('WSH','WSH_ENTITY_RELATED_TRIP');
1798: FND_MESSAGE.SET_TOKEN('ENTITY',l_entity);
1799: FND_MESSAGE.SET_TOKEN('NAME',wsh_trips_pvt.get_name(l_trips_cur.trip_id));
1800: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
1801: wsh_util_core.add_message(x_return_status);
1802: IF l_debug_on THEN
1803: WSH_DEBUG_SV.pop(l_module_name);

Line 1832: UPDATE wsh_trips

1828: RETURN;
1829: END IF;
1830:
1831: FOR cur_deltrip IN c_dlvy_trips LOOP
1832: UPDATE wsh_trips
1833: SET planned_flag = 'Y',
1834: last_update_date = sysdate,
1835: last_updated_by = FND_GLOBAL.USER_ID
1836: WHERE trip_id = cur_deltrip.trip_id;

Line 1843: FND_MESSAGE.SET_TOKEN('NAME',wsh_trips_pvt.get_name(p_entity_id));

1839: IF (SQL%NOTFOUND) THEN
1840: FND_MESSAGE.SET_NAME('WSH','WSH_FIRM_UPDATE_ERROR');
1841: l_entity := FND_MESSAGE.GET_STRING('WSH','WSH_ENTITY_RELATED_TRIP');
1842: FND_MESSAGE.SET_TOKEN('ENTITY',l_entity);
1843: FND_MESSAGE.SET_TOKEN('NAME',wsh_trips_pvt.get_name(p_entity_id));
1844: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
1845: wsh_util_core.add_message(x_return_status);
1846: IF l_debug_on THEN
1847: WSH_DEBUG_SV.pop(l_module_name);