DBA Data[Home] [Help]

VIEW: APPS.MST_AT_LOADS_V

Source

View Text - Preformatted

SELECT mt.plan_id , mt.trip_id , mt.trip_number , mt.carrier_id , mt.origin_location_id , mt.destination_location_id , wc.freight_code , mt.service_level , wlk.meaning , mt.mode_of_transport , msikfv.concatenated_segments , substr(mst_wb_util.get_name(mt.origin_location_id),1,80) , flp1.facility_code , flp1.description , wl1.city , wl1.state , wl1.postal_code , wl1.country , substr(mst_wb_util.get_name(mt.destination_location_id),1,80) , flp2.facility_code , flp2.description , wl2.city , wl2.state , wl2.postal_code , wl2.country , nvl(mt.total_trip_distance,0) , nvl(mt.total_basic_transport_cost,0) + nvl(mt.total_stop_cost,0) + nvl(mt.total_accessorial_cost,0) + nvl(mt.total_load_unload_cost,0) + nvl(mt.total_layover_cost,0) + nvl(mt.total_handling_cost,0) , nvl(sum(md.gross_weight),0) , nvl(sum(md.volume),0) , nvl(sum(md.number_of_pallets),0) , nvl(sum(md.number_of_pieces),0) , nvl(mst_wb_util.Get_Trip_Orders(mt.plan_id,mt.trip_id),0) , mp.weight_uom , mp.volume_uom , mp.currency_uom , ml1.meaning , ml2.meaning , ml3.meaning , mt.release_date , fnd_date.date_to_chardt(mt.release_date) , mt.auto_release_flag , mt.selected_for_release , mt.release_status from mst_plans mp , mst_trips mt , mst_delivery_legs mdl , mst_deliveries md , wsh_carriers wc , wsh_locations wl1 , wsh_locations wl2 , fte_location_parameters flp1 , fte_location_parameters flp2 , fte_vehicle_types fvt , mtl_system_items_kfv msikfv , mfg_lookups ml1 , mfg_lookups ml2 , mfg_lookups ml3 , wsh_lookups wlk WHERE mp.plan_id = mt.plan_id and mt.mode_of_transport = 'TRUCK' and mt.plan_id = mdl.plan_id (+) and mt.trip_id = mdl.trip_id (+) and mdl.plan_id = md.plan_id (+) and mdl.delivery_id = md.delivery_id (+) and mt.carrier_id = wc.carrier_id and mt.vehicle_type_id = fvt.vehicle_type_id and fvt.inventory_item_id = msikfv.inventory_item_id and fvt.organization_id = msikfv.organization_id and mt.origin_location_id = wl1.wsh_location_id and mt.destination_location_id = wl2.wsh_location_id and mt.origin_location_id = flp1.location_id and mt.destination_location_id = flp2.location_id and nvl(mt.planned_flag,3) = ml1.lookup_code and ml1.lookup_type = 'MST_TRIP_PLANNED_FLAG' and nvl(mt.selected_for_release,2) = ml2.lookup_code and ml2.lookup_type = 'MST_SELECTED_FOR_RELEASE' and nvl(mt.release_status,5) = ml3.lookup_code and ml3.lookup_type = 'MST_RELEASE_STATUS' and wlk.lookup_code = mt.service_level and wlk.lookup_type = 'WSH_SERVICE_LEVELS' group by mt.plan_id , mt.trip_id , mt.trip_number , mt.carrier_id , mt.origin_location_id , mt.destination_location_id , wc.freight_code , mt.service_level , wlk.meaning , mt.mode_of_transport , msikfv.concatenated_segments , substr(mst_wb_util.get_name(mt.origin_location_id),1,80) , flp1.facility_code , flp1.description , wl1.city , wl1.state , wl1.postal_code , wl1.country , substr(mst_wb_util.get_name(mt.destination_location_id),1,80) , flp2.facility_code , flp2.description , wl2.city , wl2.state , wl2.postal_code , wl2.country , nvl(mt.total_trip_distance,0) , nvl(mt.total_basic_transport_cost,0) + nvl(mt.total_stop_cost,0) + nvl(mt.total_accessorial_cost,0) + nvl(mt.total_load_unload_cost,0) + nvl(mt.total_layover_cost,0) + nvl(mt.total_handling_cost,0) , mp.weight_uom , mp.volume_uom , mp.currency_uom , ml1.meaning , ml2.meaning , ml3.meaning , mt.release_date , fnd_date.date_to_chardt(mt.release_date) , mt.auto_release_flag , mt.selected_for_release , mt.release_status
View Text - HTML Formatted

SELECT MT.PLAN_ID
, MT.TRIP_ID
, MT.TRIP_NUMBER
, MT.CARRIER_ID
, MT.ORIGIN_LOCATION_ID
, MT.DESTINATION_LOCATION_ID
, WC.FREIGHT_CODE
, MT.SERVICE_LEVEL
, WLK.MEANING
, MT.MODE_OF_TRANSPORT
, MSIKFV.CONCATENATED_SEGMENTS
, SUBSTR(MST_WB_UTIL.GET_NAME(MT.ORIGIN_LOCATION_ID)
, 1
, 80)
, FLP1.FACILITY_CODE
, FLP1.DESCRIPTION
, WL1.CITY
, WL1.STATE
, WL1.POSTAL_CODE
, WL1.COUNTRY
, SUBSTR(MST_WB_UTIL.GET_NAME(MT.DESTINATION_LOCATION_ID)
, 1
, 80)
, FLP2.FACILITY_CODE
, FLP2.DESCRIPTION
, WL2.CITY
, WL2.STATE
, WL2.POSTAL_CODE
, WL2.COUNTRY
, NVL(MT.TOTAL_TRIP_DISTANCE
, 0)
, NVL(MT.TOTAL_BASIC_TRANSPORT_COST
, 0) + NVL(MT.TOTAL_STOP_COST
, 0) + NVL(MT.TOTAL_ACCESSORIAL_COST
, 0) + NVL(MT.TOTAL_LOAD_UNLOAD_COST
, 0) + NVL(MT.TOTAL_LAYOVER_COST
, 0) + NVL(MT.TOTAL_HANDLING_COST
, 0)
, NVL(SUM(MD.GROSS_WEIGHT)
, 0)
, NVL(SUM(MD.VOLUME)
, 0)
, NVL(SUM(MD.NUMBER_OF_PALLETS)
, 0)
, NVL(SUM(MD.NUMBER_OF_PIECES)
, 0)
, NVL(MST_WB_UTIL.GET_TRIP_ORDERS(MT.PLAN_ID
, MT.TRIP_ID)
, 0)
, MP.WEIGHT_UOM
, MP.VOLUME_UOM
, MP.CURRENCY_UOM
, ML1.MEANING
, ML2.MEANING
, ML3.MEANING
, MT.RELEASE_DATE
, FND_DATE.DATE_TO_CHARDT(MT.RELEASE_DATE)
, MT.AUTO_RELEASE_FLAG
, MT.SELECTED_FOR_RELEASE
, MT.RELEASE_STATUS
FROM MST_PLANS MP
, MST_TRIPS MT
, MST_DELIVERY_LEGS MDL
, MST_DELIVERIES MD
, WSH_CARRIERS WC
, WSH_LOCATIONS WL1
, WSH_LOCATIONS WL2
, FTE_LOCATION_PARAMETERS FLP1
, FTE_LOCATION_PARAMETERS FLP2
, FTE_VEHICLE_TYPES FVT
, MTL_SYSTEM_ITEMS_KFV MSIKFV
, MFG_LOOKUPS ML1
, MFG_LOOKUPS ML2
, MFG_LOOKUPS ML3
, WSH_LOOKUPS WLK
WHERE MP.PLAN_ID = MT.PLAN_ID
AND MT.MODE_OF_TRANSPORT = 'TRUCK'
AND MT.PLAN_ID = MDL.PLAN_ID (+)
AND MT.TRIP_ID = MDL.TRIP_ID (+)
AND MDL.PLAN_ID = MD.PLAN_ID (+)
AND MDL.DELIVERY_ID = MD.DELIVERY_ID (+)
AND MT.CARRIER_ID = WC.CARRIER_ID
AND MT.VEHICLE_TYPE_ID = FVT.VEHICLE_TYPE_ID
AND FVT.INVENTORY_ITEM_ID = MSIKFV.INVENTORY_ITEM_ID
AND FVT.ORGANIZATION_ID = MSIKFV.ORGANIZATION_ID
AND MT.ORIGIN_LOCATION_ID = WL1.WSH_LOCATION_ID
AND MT.DESTINATION_LOCATION_ID = WL2.WSH_LOCATION_ID
AND MT.ORIGIN_LOCATION_ID = FLP1.LOCATION_ID
AND MT.DESTINATION_LOCATION_ID = FLP2.LOCATION_ID
AND NVL(MT.PLANNED_FLAG
, 3) = ML1.LOOKUP_CODE
AND ML1.LOOKUP_TYPE = 'MST_TRIP_PLANNED_FLAG'
AND NVL(MT.SELECTED_FOR_RELEASE
, 2) = ML2.LOOKUP_CODE
AND ML2.LOOKUP_TYPE = 'MST_SELECTED_FOR_RELEASE'
AND NVL(MT.RELEASE_STATUS
, 5) = ML3.LOOKUP_CODE
AND ML3.LOOKUP_TYPE = 'MST_RELEASE_STATUS'
AND WLK.LOOKUP_CODE = MT.SERVICE_LEVEL
AND WLK.LOOKUP_TYPE = 'WSH_SERVICE_LEVELS' GROUP BY MT.PLAN_ID
, MT.TRIP_ID
, MT.TRIP_NUMBER
, MT.CARRIER_ID
, MT.ORIGIN_LOCATION_ID
, MT.DESTINATION_LOCATION_ID
, WC.FREIGHT_CODE
, MT.SERVICE_LEVEL
, WLK.MEANING
, MT.MODE_OF_TRANSPORT
, MSIKFV.CONCATENATED_SEGMENTS
, SUBSTR(MST_WB_UTIL.GET_NAME(MT.ORIGIN_LOCATION_ID)
, 1
, 80)
, FLP1.FACILITY_CODE
, FLP1.DESCRIPTION
, WL1.CITY
, WL1.STATE
, WL1.POSTAL_CODE
, WL1.COUNTRY
, SUBSTR(MST_WB_UTIL.GET_NAME(MT.DESTINATION_LOCATION_ID)
, 1
, 80)
, FLP2.FACILITY_CODE
, FLP2.DESCRIPTION
, WL2.CITY
, WL2.STATE
, WL2.POSTAL_CODE
, WL2.COUNTRY
, NVL(MT.TOTAL_TRIP_DISTANCE
, 0)
, NVL(MT.TOTAL_BASIC_TRANSPORT_COST
, 0) + NVL(MT.TOTAL_STOP_COST
, 0) + NVL(MT.TOTAL_ACCESSORIAL_COST
, 0) + NVL(MT.TOTAL_LOAD_UNLOAD_COST
, 0) + NVL(MT.TOTAL_LAYOVER_COST
, 0) + NVL(MT.TOTAL_HANDLING_COST
, 0)
, MP.WEIGHT_UOM
, MP.VOLUME_UOM
, MP.CURRENCY_UOM
, ML1.MEANING
, ML2.MEANING
, ML3.MEANING
, MT.RELEASE_DATE
, FND_DATE.DATE_TO_CHARDT(MT.RELEASE_DATE)
, MT.AUTO_RELEASE_FLAG
, MT.SELECTED_FOR_RELEASE
, MT.RELEASE_STATUS