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: ELSE --Added for bug 7611042 .More than zero rows updated. So calling the API to update the hash string

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

533: rollback to before_update;
534: FND_MESSAGE.SET_NAME('WSH','WSH_IGNOREPLAN_UPDATE_ERROR');
535: l_entity := FND_MESSAGE.GET_STRING('WSH','WSH_ENTITY_TRIP');
536: FND_MESSAGE.SET_TOKEN('ENTITY',l_entity);
537: FND_MESSAGE.SET_TOKEN('NAME',wsh_trips_pvt.get_name(p_in_ids(i)));
538: wsh_util_core.add_message(WSH_UTIL_CORE.g_ret_sts_error,l_module_name);
539: l_num_error:=l_num_error+1;
540: goto next_trip;
541: END IF;

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

555: rollback to before_update;
556: FND_MESSAGE.SET_NAME('WSH','WSH_IGNOREPLAN_UPDATE_ERROR');
557: l_entity := FND_MESSAGE.GET_STRING('WSH','WSH_ENTITY_TRIP');
558: FND_MESSAGE.SET_TOKEN('ENTITY',l_entity);
559: FND_MESSAGE.SET_TOKEN('NAME',wsh_trips_pvt.get_name(p_in_ids(i)));
560: wsh_util_core.add_message(WSH_UTIL_CORE.g_ret_sts_error,l_module_name);
561: l_num_error:=l_num_error+1;
562: goto next_trip;
563: END IF;

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

578: rollback to before_update;
579: FND_MESSAGE.SET_NAME('WSH','WSH_IGNOREPLAN_UPDATE_ERROR');
580: l_entity := FND_MESSAGE.GET_STRING('WSH','WSH_ENTITY_TRIP');
581: FND_MESSAGE.SET_TOKEN('ENTITY',l_entity);
582: FND_MESSAGE.SET_TOKEN('NAME',wsh_trips_pvt.get_name(p_in_ids(i)));
583: wsh_util_core.add_message(WSH_UTIL_CORE.g_ret_sts_error,l_module_name);
584: l_num_error:=l_num_error+1;
585: goto next_trip;
586: END IF;

Line 614: UPDATE wsh_trips

610:
611: --update trips
612: -- OTM R12, glog proj, check the condition first and then update
613: IF l_tp_plan_name_update = 'Y' THEN
614: UPDATE wsh_trips
615: SET ignore_for_planning = l_ignoreplan,
616: tp_plan_name = NULL, -- OTM R12, glog proj
617: last_update_date = sysdate,
618: last_updated_by = FND_GLOBAL.USER_ID,

Line 623: UPDATE wsh_trips

619: last_update_login = FND_GLOBAL.LOGIN_ID -- OTM R12, glog proj
620: WHERE trip_id=p_in_ids(i);
621:
622: ELSE -- l_tp_plan_name_update is null or N, do not update tp_plan_name
623: UPDATE wsh_trips
624: SET ignore_for_planning = l_ignoreplan,
625: last_update_date = sysdate,
626: last_updated_by = FND_GLOBAL.USER_ID,
627: last_update_login = FND_GLOBAL.LOGIN_ID -- OTM R12, glog proj

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

634: rollback to before_update;
635: FND_MESSAGE.SET_NAME('WSH','WSH_IGNOREPLAN_UPDATE_ERROR');
636: l_entity := FND_MESSAGE.GET_STRING('WSH','WSH_ENTITY_TRIP');
637: FND_MESSAGE.SET_TOKEN('ENTITY',l_entity);
638: FND_MESSAGE.SET_TOKEN('NAME',wsh_trips_pvt.get_name(p_in_ids(i)));
639: wsh_util_core.add_message(WSH_UTIL_CORE.g_ret_sts_error,l_module_name);
640: l_num_error:=l_num_error+1;
641: END IF;
642:

Line 1500: FROM wsh_trips t,

1496: x_return_status OUT NOCOPY VARCHAR2) IS
1497:
1498: CURSOR c_deliveries (c_trip_id NUMBER) IS
1499: SELECT dg.delivery_id
1500: FROM wsh_trips t,
1501: wsh_trip_stops st,
1502: wsh_delivery_legs dg
1503: WHERE t.trip_id = c_trip_id AND
1504: st.trip_id = t.trip_id AND

Line 1511: FROM wsh_trips t,

1507: --for related trips
1508: -- bug 3687559: we only need to look for unfirmed related trips
1509: CURSOR c_trips (c_trip_id NUMBER, c_delid NUMBER) IS
1510: SELECT t.trip_id
1511: FROM wsh_trips t,
1512: wsh_trip_stops st,
1513: wsh_delivery_legs dg
1514: WHERE t.trip_id <> c_trip_id AND
1515: st.trip_id = t.trip_id AND

Line 1524: FROM wsh_trips t,

1520: --for related trips for this delivery, find atleast one delivery which is either planned/unplanned
1521: --trip doesnot have to be firmed for this case. just planned is enough
1522: CURSOR c_find_planunplandeliveries (c_tripid NUMBER, c_delid NUMBER) IS
1523: SELECT dg.delivery_id
1524: FROM wsh_trips t,
1525: wsh_trip_stops st,
1526: wsh_delivery_legs dg,
1527: wsh_new_deliveries dl
1528: WHERE t.trip_id = c_tripid AND

Line 1543: wsh_trips t

1539: CURSOR c_dlvy_trips (c_delid NUMBER) IS
1540: SELECT distinct st.trip_id, t.planned_flag
1541: FROM wsh_trip_stops st,
1542: wsh_delivery_legs dg,
1543: wsh_trips t
1544: WHERE dg.pick_up_stop_id = st.stop_id AND
1545: dg.delivery_id=c_delid AND
1546: st.trip_id = t.trip_id;
1547:

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

1618: x_return_status => x_return_status);
1619: IF (x_return_status = WSH_UTIL_CORE.G_RET_STS_ERROR) OR (x_return_status = WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR) THEN
1620: rollback to before_firm;
1621: FND_MESSAGE.SET_NAME('WSH','WSH_TRIP_CANNOT_FIRM');
1622: FND_MESSAGE.SET_TOKEN('TRIP_NAME',wsh_trips_pvt.get_name(l_trips_cur.trip_id));
1623: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
1624: wsh_util_core.add_message(x_return_status);
1625: IF l_debug_on THEN
1626: WSH_DEBUG_SV.pop(l_module_name);

Line 1634: UPDATE wsh_trips

1630:
1631: -- bug 3687559: related trips should become RF (not RCF)
1632: l_plannedflag:='Y';
1633:
1634: UPDATE wsh_trips
1635: SET planned_flag = l_plannedflag,
1636: last_update_date = sysdate,
1637: last_updated_by = FND_GLOBAL.USER_ID
1638: WHERE trip_id = l_trips_cur.trip_id;

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

1640: IF (SQL%NOTFOUND) THEN
1641: FND_MESSAGE.SET_NAME('WSH','WSH_FIRM_UPDATE_ERROR');
1642: l_entity := FND_MESSAGE.GET_STRING('WSH','WSH_ENTITY_RELATED_TRIP');
1643: FND_MESSAGE.SET_TOKEN('ENTITY',l_entity);
1644: FND_MESSAGE.SET_TOKEN('NAME',wsh_trips_pvt.get_name(l_trips_cur.trip_id));
1645: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
1646: wsh_util_core.add_message(x_return_status);
1647: IF l_debug_on THEN
1648: WSH_DEBUG_SV.pop(l_module_name);

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

1656:
1657: --if l_deliveries_exist is null, no deliveries exist for trip => trip can't be firmed
1658: IF l_deliveries_exist IS null THEN
1659: FND_MESSAGE.SET_NAME('WSH','WSH_FIRM_TRIP_ERROR');
1660: FND_MESSAGE.SET_TOKEN('TRIP_NAME',wsh_trips_pvt.get_name(p_entity_id));
1661: wsh_util_core.add_message(WSH_UTIL_CORE.g_ret_sts_error,l_module_name);
1662: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
1663: IF l_debug_on THEN
1664: WSH_DEBUG_SV.pop(l_module_name);

Line 1669: UPDATE wsh_trips

1665: END IF;
1666: rollback to before_firm;
1667: RETURN;
1668: ELSE
1669: UPDATE wsh_trips
1670: SET planned_flag = c_routing_firm_flag ,
1671: last_update_date = sysdate,
1672: last_updated_by = FND_GLOBAL.USER_ID
1673: WHERE trip_id = p_entity_id;

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

1700: x_return_status => x_return_status);
1701: IF (x_return_status = WSH_UTIL_CORE.G_RET_STS_ERROR) OR (x_return_status = WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR) THEN
1702: rollback to before_firm;
1703: FND_MESSAGE.SET_NAME('WSH','WSH_TRIP_CANNOT_FIRM');
1704: FND_MESSAGE.SET_TOKEN('TRIP_NAME',wsh_trips_pvt.get_name(l_trips_cur.trip_id));
1705: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
1706: wsh_util_core.add_message(x_return_status);
1707: IF l_debug_on THEN
1708: WSH_DEBUG_SV.pop(l_module_name);

Line 1713: UPDATE wsh_trips

1709: END IF;
1710: RETURN;
1711: END IF;
1712:
1713: UPDATE wsh_trips
1714: SET planned_flag = l_plannedflag,
1715: last_update_date = sysdate,
1716: last_updated_by = FND_GLOBAL.USER_ID
1717: WHERE trip_id = l_trips_cur.trip_id;

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

1720: IF (SQL%NOTFOUND) THEN
1721: FND_MESSAGE.SET_NAME('WSH','WSH_FIRM_UPDATE_ERROR');
1722: l_entity := FND_MESSAGE.GET_STRING('WSH','WSH_ENTITY_RELATED_TRIP');
1723: FND_MESSAGE.SET_TOKEN('ENTITY',l_entity);
1724: FND_MESSAGE.SET_TOKEN('NAME',wsh_trips_pvt.get_name(l_trips_cur.trip_id));
1725: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
1726: wsh_util_core.add_message(x_return_status);
1727: IF l_debug_on THEN
1728: WSH_DEBUG_SV.pop(l_module_name);

Line 1819: FROM wsh_trips t,

1815:
1816: --for related trips
1817: CURSOR c_trips (p_delid NUMBER) IS
1818: SELECT t.trip_id
1819: FROM wsh_trips t,
1820: wsh_trip_stops st,
1821: wsh_delivery_legs dg
1822: WHERE t.trip_id <> p_entity_id AND
1823: st.trip_id = t.trip_id AND

Line 1832: FROM wsh_trips t,

1828: /******DLVY*****/
1829: --for related trips
1830: CURSOR c_dlvy_trips IS
1831: SELECT t.trip_id
1832: FROM wsh_trips t,
1833: wsh_trip_stops st,
1834: wsh_delivery_legs dg
1835: WHERE st.trip_id = t.trip_id AND
1836: dg.pick_up_stop_id = st.stop_id AND

Line 1842: from wsh_trips

1838: and t.planned_flag='F';
1839:
1840: CURSOR c_gettripplannedflag IS
1841: select planned_flag
1842: from wsh_trips
1843: where trip_id=p_entity_id;
1844:
1845: l_tripplan VARCHAR2(1);
1846:

Line 1886: UPDATE wsh_trips

1882: OPEN c_gettripplannedflag;
1883: FETCH c_gettripplannedflag INTO l_tripplan;
1884: CLOSE c_gettripplannedflag;
1885:
1886: UPDATE wsh_trips
1887: SET planned_flag = l_action,
1888: last_update_date = sysdate,
1889: last_updated_by = FND_GLOBAL.USER_ID
1890: WHERE trip_id = p_entity_id;

Line 1934: UPDATE wsh_trips

1930: END IF;
1931:
1932:
1933: FOR l_trips_cur IN c_trips(del_cur.delivery_id) LOOP
1934: UPDATE wsh_trips
1935: SET planned_flag = 'Y',
1936: last_update_date = sysdate,
1937: last_updated_by = FND_GLOBAL.USER_ID
1938: WHERE trip_id = l_trips_cur.trip_id;

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

1940: IF (SQL%NOTFOUND) THEN
1941: FND_MESSAGE.SET_NAME('WSH','WSH_FIRM_UPDATE_ERROR');
1942: l_entity := FND_MESSAGE.GET_STRING('WSH','WSH_ENTITY_RELATED_TRIP');
1943: FND_MESSAGE.SET_TOKEN('ENTITY',l_entity);
1944: FND_MESSAGE.SET_TOKEN('NAME',wsh_trips_pvt.get_name(l_trips_cur.trip_id));
1945: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
1946: wsh_util_core.add_message(x_return_status);
1947: IF l_debug_on THEN
1948: WSH_DEBUG_SV.pop(l_module_name);

Line 1977: UPDATE wsh_trips

1973: RETURN;
1974: END IF;
1975:
1976: FOR cur_deltrip IN c_dlvy_trips LOOP
1977: UPDATE wsh_trips
1978: SET planned_flag = 'Y',
1979: last_update_date = sysdate,
1980: last_updated_by = FND_GLOBAL.USER_ID
1981: WHERE trip_id = cur_deltrip.trip_id;

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

1984: IF (SQL%NOTFOUND) THEN
1985: FND_MESSAGE.SET_NAME('WSH','WSH_FIRM_UPDATE_ERROR');
1986: l_entity := FND_MESSAGE.GET_STRING('WSH','WSH_ENTITY_RELATED_TRIP');
1987: FND_MESSAGE.SET_TOKEN('ENTITY',l_entity);
1988: FND_MESSAGE.SET_TOKEN('NAME',wsh_trips_pvt.get_name(p_entity_id));
1989: x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
1990: wsh_util_core.add_message(x_return_status);
1991: IF l_debug_on THEN
1992: WSH_DEBUG_SV.pop(l_module_name);