DBA Data[Home] [Help]

APPS.MST_WB_UTIL dependencies on MST_DELIVERIES

Line 302: FROM mst_deliveries d

298: pp_trip_id IN NUMBER,
299: pp_stop_id IN NUMBER ) IS
300: SELECT NVL(SUM(d.gross_weight),0), NVL(SUM(d.volume),0),
301: NVL(SUM(d.number_of_pallets),0),NVL(SUM(d.number_of_pieces),0)
302: FROM mst_deliveries d
303: WHERE d.plan_id = pp_plan_id
304: AND d.delivery_id IN
305: (SELECT delivery_id
306: FROM mst_delivery_legs dl,

Line 319: FROM mst_deliveries d

315: pp_trip_id in NUMBER,
316: pp_stop_id in NUMBER ) IS
317: SELECT NVL(SUM(d.gross_weight),0), NVL(SUM(d.volume),0),
318: NVL(SUM(d.number_of_pallets),0), NVL(SUM(d.number_of_pieces),0)
319: FROM mst_deliveries d
320: WHERE d.plan_id = pp_plan_id
321: AND d.delivery_id IN
322: (SELECT delivery_id
323: FROM mst_delivery_legs dl,

Line 372: FROM MST_DELIVERIES D

368:
369: CURSOR Cur_Stop_Det(pp_plan_id IN NUMBER,PP_TRIP_ID IN NUMBER ) IS
370: SELECT NVL(SUM(D.Gross_Weight),0), NVL(SUM(D.Volume),0),
371: NVL(SUM(D.NUMBER_OF_Pallets),0), NVL(SUM(D.NUMBER_OF_PIECES),0)
372: FROM MST_DELIVERIES D
373: WHERE D.PLAN_ID = pp_plan_id
374: AND D.DELIVERY_ID IN
375: (SELECT DL.DELIVERY_ID
376: FROM MST_DELIVERY_LEGS DL

Line 418: FROM mst_deliveries md,

414: FROM mst_delivery_details mdd
415: WHERE mdd.plan_id = p_plan_id
416: AND mdd.delivery_detail_id IN
417: ( SELECT mda.delivery_detail_id
418: FROM mst_deliveries md,
419: mst_delivery_assignments mda,
420: mst_delivery_legs mdl
421: WHERE mda.plan_id = mdd.plan_id
422: AND mda.plan_id = md.plan_id

Line 1637: from mst_deliveries md, mst_exception_details med

1633: fnd_message.set_name('MST', 'MST_EXCEP_TOKEN_707_1');
1634: --Delivery_number
1635: select md.delivery_number
1636: into l_id1
1637: from mst_deliveries md, mst_exception_details med
1638: where med.delivery_id = md.delivery_id
1639: and med.plan_id=p_plan_id
1640: and med.plan_id = md.plan_id
1641: and med.exception_detail_id=p_exception_detail_id;

Line 2554: mst_deliveries md,

2550: into l_total_orders
2551: from mst_trips mt,
2552: mst_trip_stops mts,
2553: mst_delivery_legs mdl,
2554: mst_deliveries md,
2555: mst_delivery_details mdd,
2556: mst_delivery_assignments mda
2557: where mt.plan_id = p_plan_id
2558: and mt.mode_of_transport = p_mode

Line 2575: mst_deliveries md,

2571: into l_total_orders
2572: from mst_trips mt,
2573: mst_trip_stops mts,
2574: mst_delivery_legs mdl,
2575: mst_deliveries md,
2576: mst_delivery_details mdd,
2577: mst_delivery_assignments mda
2578: where mt.plan_id = p_plan_id
2579: and mt.mode_of_transport = p_mode

Line 2595: mst_deliveries md,

2591: into l_total_orders
2592: from mst_trips mt,
2593: mst_trip_stops mts,
2594: mst_delivery_legs mdl,
2595: mst_deliveries md,
2596: mst_delivery_details mdd,
2597: mst_delivery_assignments mda
2598: where mt.plan_id = p_plan_id
2599: and mt.mode_of_transport = p_mode

Line 2615: mst_deliveries md,

2611: /*
2612: select count(distinct mdd.source_header_number)
2613: into l_total_orders
2614: from mst_delivery_details mdd,
2615: mst_deliveries md,
2616: mst_delivery_assignments mda
2617: where md.plan_id = mda.plan_id
2618: and md.delivery_id = mda.delivery_id
2619: and md.delivery_id in

Line 2706: mst_deliveries md

2702: into l_loading_weight
2703: from mst_trips mt,
2704: mst_trip_stops mts,
2705: mst_delivery_legs mdl,
2706: mst_deliveries md
2707: where mt.plan_id = p_plan_id
2708: and mt.mode_of_transport = p_mode
2709: and mts.trip_id = mt.trip_id
2710: and mts.plan_id = mt.plan_id

Line 2737: mst_deliveries md

2733: into l_loading_cube
2734: from mst_trips mt,
2735: mst_trip_stops mts,
2736: mst_delivery_legs mdl,
2737: mst_deliveries md
2738: where mt.plan_id = p_plan_id
2739: and mt.mode_of_transport = p_mode
2740: and mts.trip_id = mt.trip_id
2741: and mts.plan_id = mt.plan_id

Line 2769: mst_deliveries md

2765: into l_loading_pieces
2766: from mst_trips mt,
2767: mst_trip_stops mts,
2768: mst_delivery_legs mdl,
2769: mst_deliveries md
2770: where mt.plan_id = p_plan_id
2771: and mt.mode_of_transport = p_mode
2772: and mts.trip_id = mt.trip_id
2773: and mts.plan_id = mt.plan_id

Line 2835: mst_deliveries md,

2831:
2832: select count(distinct mdd.source_header_number)
2833: into l_total_orders
2834: from mst_delivery_details mdd,
2835: mst_deliveries md,
2836: mst_delivery_assignments mda
2837: where md.plan_id = mda.plan_id
2838: and md.delivery_id = mda.delivery_id
2839: and md.delivery_id in

Line 2984: , mst_deliveries md

2980: select count(distinct nvl(mdd.split_from_delivery_detail_id, mdd.delivery_detail_id))
2981: into l_count_origin_orders
2982: from mst_delivery_details mdd
2983: , mst_delivery_assignments mda
2984: , mst_deliveries md
2985: where md.plan_id = mda.plan_id
2986: and md.delivery_id = mda.delivery_id
2987: and md.pickup_location_id = p_origin_id
2988: and mdd.plan_id = mda.plan_id

Line 3031: from mst_deliveries md

3027: l_total_weight_origin number;
3028: begin
3029: select sum(md.gross_weight)
3030: into l_total_weight_origin
3031: from mst_deliveries md
3032: where md.plan_id = p_plan_id
3033: and md.pickup_location_id = p_origin_id;
3034:
3035: return l_total_weight_origin;

Line 3050: from mst_deliveries md

3046: l_total_volume_origin number;
3047: begin
3048: select sum(md.volume)
3049: into l_total_volume_origin
3050: from mst_deliveries md
3051: where md.plan_id = p_plan_id
3052: and md.pickup_location_id = p_origin_id;
3053:
3054: return l_total_volume_origin;

Line 3070: from mst_deliveries md

3066: l_total_pieces_origin number;
3067: begin
3068: select sum(md.number_of_pieces)
3069: into l_total_pieces_origin
3070: from mst_deliveries md
3071: where md.plan_id = p_plan_id
3072: and md.pickup_location_id = p_origin_id;
3073:
3074: return l_total_pieces_origin;

Line 3229: , mst_deliveries md

3225: select count(distinct nvl(mdd.split_from_delivery_detail_id, mdd.delivery_detail_id))
3226: into l_count_dest_orders
3227: from mst_delivery_details mdd
3228: , mst_delivery_assignments mda
3229: , mst_deliveries md
3230: where md.plan_id = mda.plan_id
3231: and md.delivery_id = mda.delivery_id
3232: and md.dropoff_location_id = p_dest_id
3233: and mdd.plan_id = mda.plan_id

Line 3276: from mst_deliveries md

3272: l_total_weight_dest number;
3273: begin
3274: select sum(md.gross_weight)
3275: into l_total_weight_dest
3276: from mst_deliveries md
3277: where md.plan_id = p_plan_id
3278: and md.dropoff_location_id = p_dest_id;
3279:
3280: return l_total_weight_dest;

Line 3295: from mst_deliveries md

3291: l_total_volume_dest number;
3292: begin
3293: select sum(md.volume)
3294: into l_total_volume_dest
3295: from mst_deliveries md
3296: where md.plan_id = p_plan_id
3297: and md.dropoff_location_id = p_dest_id;
3298:
3299: return l_total_volume_dest;

Line 3313: from mst_deliveries md

3309: l_total_pieces_dest number;
3310: begin
3311: select sum(md.number_of_pieces)
3312: into l_total_pieces_dest
3313: from mst_deliveries md
3314: where md.plan_id = p_plan_id
3315: and md.dropoff_location_id = p_dest_id;
3316:
3317: return l_total_pieces_dest;

Line 3434: , mst_deliveries md

3430: and mt.trip_id IN
3431: (select distinct mts.trip_id
3432: from mst_trip_stops mts
3433: , mst_delivery_legs mdl
3434: , mst_deliveries md
3435: where md.plan_id = mdl.plan_id
3436: and md.customer_id = p_customer_id
3437: and mts.plan_id = md.plan_id
3438: and mts.stop_location_id = md.dropoff_location_id

Line 3470: , mst_deliveries md

3466: and mdl.trip_id IN
3467: (select distinct mts.trip_id
3468: from mst_trip_stops mts
3469: , mst_delivery_legs mdl
3470: , mst_deliveries md
3471: where md.plan_id = mdl.plan_id
3472: and md.customer_id = p_customer_id
3473: and mts.plan_id = md.plan_id
3474: and mts.stop_location_id = md.dropoff_location_id

Line 3502: , mst_deliveries md

3498: and mt.trip_id in
3499: (select distinct mts.trip_id
3500: from mst_trip_stops mts
3501: , mst_delivery_legs mdl
3502: , mst_deliveries md
3503: where md.plan_id = mt.plan_id
3504: and md.customer_id = p_customer_id
3505: and mts.plan_id = md.plan_id
3506: and mts.stop_location_id = md.dropoff_location_id

Line 3541: , mst_deliveries md

3537: and mt.trip_id in
3538: (select distinct mts.trip_id
3539: from mst_trip_stops mts
3540: , mst_delivery_legs mdl
3541: , mst_deliveries md
3542: where md.plan_id = mt.plan_id
3543: and md.customer_id = p_customer_id
3544: and mts.plan_id = md.plan_id
3545: and mts.stop_location_id = md.dropoff_location_id

Line 3578: , MST_DELIVERIES MD

3574: AND MT.TRIP_ID IN
3575: (SELECT DISTINCT MTS.TRIP_ID
3576: FROM MST_TRIP_STOPS MTS
3577: , MST_DELIVERY_LEGS MDL
3578: , MST_DELIVERIES MD
3579: WHERE MD.PLAN_ID = MT.PLAN_ID
3580: AND MD.CUSTOMER_ID = p_customer_id
3581: AND MTS.PLAN_ID = MD.PLAN_ID
3582: AND MTS.STOP_LOCATION_ID = MD.DROPOFF_LOCATION_ID

Line 3595: from mst_deliveries md

3591: + nvl(mdl.ALLOCATED_FAC_SHP_HAND_COST,0)
3592: + nvl(mdl.ALLOCATED_FAC_REC_HAND_COST,0)
3593: + nvl(mdl.allocated_transport_cost,0)),0)
3594: into l_cost
3595: from mst_deliveries md
3596: , mst_delivery_legs mdl
3597: , mst_trips mt
3598: where md.plan_id = p_plan_id
3599: and md.customer_id = p_customer_id

Line 3626: , mst_deliveries md

3622: and mt.trip_id in
3623: (select distinct mts.trip_id
3624: from mst_trip_stops mts
3625: , mst_delivery_legs mdl
3626: , mst_deliveries md
3627: where md.plan_id = mt.plan_id
3628: and md.customer_id = p_customer_id
3629: and mts.plan_id = md.plan_id
3630: and mts.stop_location_id = md.dropoff_location_id

Line 3670: , mst_deliveries md

3666: and mt.trip_id IN
3667: (select distinct mts.trip_id
3668: from mst_trip_stops mts
3669: , mst_delivery_legs mdl
3670: , mst_deliveries md
3671: where md.plan_id = mdl.plan_id
3672: and md.supplier_id = p_supplier_id
3673: and mts.plan_id = md.plan_id
3674: and mts.stop_location_id = md.pickup_location_id

Line 3705: , mst_deliveries md

3701: and mdl.trip_id IN
3702: (select distinct mts.trip_id
3703: from mst_trip_stops mts
3704: , mst_delivery_legs mdl
3705: , mst_deliveries md
3706: where md.plan_id = mdl.plan_id
3707: and md.supplier_id = p_supplier_id
3708: and mts.plan_id = md.plan_id
3709: and mts.stop_location_id = md.pickup_location_id

Line 3737: , mst_deliveries md

3733: and mt.trip_id in
3734: (select distinct mts.trip_id
3735: from mst_trip_stops mts
3736: , mst_delivery_legs mdl
3737: , mst_deliveries md
3738: where md.plan_id = mt.plan_id
3739: and md.supplier_id = p_supplier_id
3740: and mts.plan_id = md.plan_id
3741: and mts.stop_location_id = md.pickup_location_id

Line 3777: , mst_deliveries md

3773: and mt.trip_id in
3774: (select distinct mts.trip_id
3775: from mst_trip_stops mts
3776: , mst_delivery_legs mdl
3777: , mst_deliveries md
3778: where md.plan_id = mt.plan_id
3779: and md.supplier_id = p_supplier_id
3780: and mts.plan_id = md.plan_id
3781: and mts.stop_location_id = md.pickup_location_id

Line 3815: , MST_DELIVERIES MD

3811: AND MT.TRIP_ID IN
3812: (SELECT DISTINCT MTS.TRIP_ID
3813: FROM MST_TRIP_STOPS MTS
3814: , MST_DELIVERY_LEGS MDL
3815: , MST_DELIVERIES MD
3816: WHERE MD.PLAN_ID = MT.PLAN_ID
3817: AND MD.SUPPLIER_ID = p_supplier_id
3818: AND MTS.PLAN_ID = MD.PLAN_ID
3819: AND MTS.STOP_LOCATION_ID = MD.PICKUP_LOCATION_ID

Line 3832: from mst_deliveries md

3828: + nvl(mdl.ALLOCATED_FAC_SHP_HAND_COST,0)
3829: + nvl(mdl.ALLOCATED_FAC_REC_HAND_COST,0)
3830: + nvl(mdl.allocated_transport_cost,0)),0)
3831: into l_cost
3832: from mst_deliveries md
3833: , mst_delivery_legs mdl
3834: , mst_trips mt
3835: where md.plan_id = p_plan_id
3836: and md.supplier_id = p_supplier_id

Line 3864: , mst_deliveries md

3860: and mt.trip_id in
3861: (select distinct mts.trip_id
3862: from mst_trip_stops mts
3863: , mst_delivery_legs mdl
3864: , mst_deliveries md
3865: where md.plan_id = mt.plan_id
3866: and md.supplier_id = p_supplier_id
3867: and mts.plan_id = md.plan_id
3868: and mts.stop_location_id = md.pickup_location_id

Line 4178: from mst_deliveries md

4174: leg_pickup_loc_id number;
4175:
4176: cursor pickup_loc_cur is
4177: select mt.destination_location_id
4178: from mst_deliveries md
4179: , mst_delivery_legs mdl
4180: , mst_trips mt
4181: where md.plan_id = p_plan_id
4182: and md.delivery_id = p_delivery_id

Line 4225: from mst_deliveries md

4221: leg_dropoff_loc_id number;
4222:
4223: cursor dropoff_loc_cur is
4224: select mt.origin_location_id
4225: from mst_deliveries md
4226: , mst_delivery_legs mdl
4227: , mst_trips mt
4228: where md.plan_id = p_plan_id
4229: and md.delivery_id = p_delivery_id

Line 5739: delete from MST_DELIVERIES

5735:
5736: delete from MST_DELIVERY_DETAILS
5737: where plan_id = p_plan_id;
5738:
5739: delete from MST_DELIVERIES
5740: where plan_id = p_plan_id;
5741:
5742: delete from MST_EXCEPTION_DETAILS
5743: where plan_id = p_plan_id;

Line 5824: from mst_deliveries md

5820:
5821: function get_org_id(p_plan_id in number, p_delivery_id in number) return number is
5822: cursor cur_orgs is
5823: select mdd.organization_id
5824: from mst_deliveries md
5825: , mst_delivery_assignments mda
5826: , mst_delivery_details mdd
5827: where mdd.plan_id = mda.plan_id
5828: and mdd.delivery_detail_id = mda.delivery_detail_id

Line 5980: FROM MST_DELIVERIES md

5976:
5977: CURSOR cur_affected_deliveries(p_plan_id IN NUMBER,
5978: p_trip_id IN NUMBER) IS
5979: SELECT DELIVERY_ID, PLANNED_FLAG, KNOWN_TE_FIRM_STATUS, PRESERVE_GROUPING_FLAG
5980: FROM MST_DELIVERIES md
5981: WHERE md.plan_id = p_plan_id
5982: AND md.DELIVERY_ID IN (SELECT mdl.DELIVERY_ID
5983: FROM MST_DELIVERY_LEGS mdl
5984: WHERE mdl.PLAN_ID = md.Plan_Id

Line 6014: l_update_stmt := 'UPDATE MST_DELIVERIES '||

6010: l_planned_flag := NULL;
6011: FETCH cur_affected_deliveries INTO l_rec_affected_deliveries;
6012: EXIT WHEN cur_affected_deliveries%NOTFOUND;
6013:
6014: l_update_stmt := 'UPDATE MST_DELIVERIES '||
6015: ' SET PLANNED_FLAG = decode(:p_Planned_Flag,1,1,3,2,PLANNED_FLAG) '||
6016: ' , PRESERVE_GROUPING_FLAG = DECODE(:p_Planned_Flag, '||
6017: ' 3, DECODE(KNOWN_TE_FIRM_STATUS, '||
6018: ' 2 , 1, '||