DBA Data[Home] [Help]

APPS.MSC_X_REPLENISH dependencies on MSC_SUP_DEM_ENTRIES

Line 115: FROM msc_sup_dem_entries sd1,

111: its.plan_id,
112: its.sr_instance_id,
113: its.supplier_id,
114: its.supplier_site_id
115: FROM msc_sup_dem_entries sd1,
116: msc_item_suppliers its,
117: msc_trading_partners tp,
118: msc_trading_partner_maps map,
119: msc_trading_partner_maps map2,

Line 156: FROM msc_sup_dem_entries sd1,

152: its.plan_id,
153: its.sr_instance_id,
154: its.supplier_id,
155: its.supplier_site_id
156: FROM msc_sup_dem_entries sd1,
157: msc_item_suppliers its,
158: msc_trading_partners tp,
159: msc_trading_partner_maps map,
160: msc_trading_partner_maps map2,

Line 199: /* also net vmi items with auto='Y' which have no tx in msc_sup_dem_entries */

195: --case where someone changes this from Y to N.
196: --In this case we need to close out any workflow
197: --that may exist as well as delete any old replenishment record
198:
199: /* also net vmi items with auto='Y' which have no tx in msc_sup_dem_entries */
200: cursor c_netting_items_notx is
201: SELECT distinct its.inventory_item_id,
202: its.organization_id,
203: its.plan_id,

Line 217: AND NOT EXISTS ( SELECT 1 FROM MSC_SUP_DEM_ENTRIES SD

213: AND its.enable_vmi_auto_replenish_flag = 'Y'
214: AND its.supplier_id = iut.tp_key
215: AND its.organization_id = iot.sr_tp_id
216: AND its.supplier_site_id = ist.tp_key
217: AND NOT EXISTS ( SELECT 1 FROM MSC_SUP_DEM_ENTRIES SD
218: WHERE SD.PLAN_ID = -1
219: AND SD.INVENTORY_ITEM_ID = ITS.INVENTORY_ITEM_ID
220: AND SD.PUBLISHER_ORDER_TYPE IN (9, 13, 15, 16, 20)
221: AND SD.CUSTOMER_SITE_ID = iot.COMPANY_KEY

Line 255: from msc_sup_dem_entries

251: -- sup_dem_entries currently
252:
253: select NVL(max(last_refresh_number), 0)
254: into l_curr_max_refresh_number
255: from msc_sup_dem_entries
256: where plan_id = -1;
257:
258: print_user_info('Current maximum refresh number = ' || l_curr_max_refresh_number);
259: begin

Line 354: -- which does not have any transactions in msc_sup_dem_entries

350:
351: /* ----- no tx items ----- */
352:
353: -- do netting for each item/org/plan/sr_instance_id/supplier/supplier_site combination
354: -- which does not have any transactions in msc_sup_dem_entries
355: temp_tables();
356: OPEN c_netting_items_notx;
357:
358: print_debug_info('Start of loop for combinations with no transaction data in CP');

Line 624: FROM msc_sup_dem_entries sd

620: l_del_repl_record := true;
621: begin
622: SELECT sd.transaction_id, rowid
623: INTO l_del_transaction_id, l_del_rowid
624: FROM msc_sup_dem_entries sd
625: WHERE sd.publisher_site_id = l_sce_organization_id
626: AND sd.inventory_item_id = p_inventory_item_id
627: AND sd.publisher_order_type = REPLENISHMENT
628: AND sd.plan_id = p_plan_id

Line 674: DELETE FROM msc_sup_dem_entries

670:
671: /* delete repl record */
672: print_debug_info(' delete obsolete replenishment record with transaction id = '
673: || l_del_transaction_id);
674: DELETE FROM msc_sup_dem_entries
675: WHERE ROWID = l_del_rowid;
676: end if;
677: elsif (l_enable_vmi_auto_repl_flag = 'Y') then
678: -- get the next replenishment transaction id

Line 679: SELECT msc_sup_dem_entries_s.nextval

675: WHERE ROWID = l_del_rowid;
676: end if;
677: elsif (l_enable_vmi_auto_repl_flag = 'Y') then
678: -- get the next replenishment transaction id
679: SELECT msc_sup_dem_entries_s.nextval
680: INTO l_rep_transaction_id FROM DUAL;
681:
682: print_debug_info(' new replenishment transaction id = ' || l_rep_transaction_id);
683:

Line 1217: FROM msc_sup_dem_entries sd

1213: , sd.supplier_id, sd.tp_quantity
1214: , sd.primary_quantity
1215: )
1216: )
1217: FROM msc_sup_dem_entries sd
1218: WHERE sd.inventory_item_id = l_inventory_item_id
1219: AND sd.supplier_site_id = l_sce_supplier_site_id
1220: AND sd.supplier_id = l_sce_supplier_id
1221: AND sd.plan_id = l_plan_id

Line 1234: FROM msc_sup_dem_entries sd

1230: -- time window
1231: CURSOR c_allocated_onhand_quantity
1232: IS
1233: SELECT sd.primary_quantity
1234: FROM msc_sup_dem_entries sd
1235: WHERE sd.inventory_item_id = l_inventory_item_id
1236: AND sd.publisher_site_id = l_sce_organization_id
1237: AND sd.plan_id = l_plan_id
1238: AND sd.publisher_order_type = ALLOCATED_ONHAND

Line 1248: FROM msc_sup_dem_entries sd

1244:
1245: -- check if there is already replenishment record exists
1246: CURSOR c_old_replenishment_row IS
1247: SELECT sd.transaction_id, sd.primary_quantity
1248: FROM msc_sup_dem_entries sd
1249: WHERE sd.publisher_site_id = l_sce_organization_id
1250: AND sd.inventory_item_id = l_inventory_item_id
1251: AND sd.publisher_order_type = REPLENISHMENT
1252: AND sd.plan_id = l_plan_id

Line 1260: FROM msc_sup_dem_entries sd

1256:
1257: -- get the shipment receipt quantity
1258: CURSOR c_shipment_receipt_quantity IS
1259: SELECT SUM(sd.primary_quantity)
1260: FROM msc_sup_dem_entries sd
1261: WHERE sd.publisher_site_id = l_sce_organization_id
1262: AND sd.inventory_item_id = l_inventory_item_id
1263: AND sd.publisher_order_type = SHIPMENT_RECEIPT
1264: AND sd.plan_id = l_plan_id

Line 1274: FROM msc_sup_dem_entries sd

1270:
1271: -- get the requisition quantity
1272: CURSOR c_requisition_quantity IS
1273: SELECT SUM(sd.primary_quantity)
1274: FROM msc_sup_dem_entries sd
1275: WHERE sd.publisher_site_id = l_sce_organization_id
1276: AND sd.inventory_item_id = l_inventory_item_id
1277: AND sd.publisher_order_type = REQUISITION
1278: AND sd.plan_id = l_plan_id

Line 1289: FROM msc_sup_dem_entries sd

1285:
1286: -- get the purchase order quantity
1287: CURSOR c_po_quantity IS
1288: SELECT SUM(sd.primary_quantity)
1289: FROM msc_sup_dem_entries sd
1290: WHERE sd.publisher_site_id = l_sce_organization_id
1291: AND sd.inventory_item_id = l_inventory_item_id
1292: AND sd.publisher_order_type = PURCHASE_ORDER
1293: AND sd.plan_id = l_plan_id

Line 1702: INSERT INTO msc_sup_dem_entries

1698: print_debug_info(' no old replenishment record, create a new one');
1699:
1700: -- no replenishment order record exists for this item/org/supplier,
1701: -- create a new record
1702: INSERT INTO msc_sup_dem_entries
1703: (
1704: transaction_id
1705: , plan_id
1706: , sr_instance_id

Line 1963: UPDATE msc_sup_dem_entries sd

1959: END;
1960:
1961: -- since replenishment order record exists for this item/org/supplier/supplier site,
1962: -- update the existing record
1963: UPDATE msc_sup_dem_entries sd
1964: SET
1965: transaction_id = l_rep_transaction_id
1966: , uom_code = l_customer_uom_code
1967: , quantity = l_order_quantity -- l_customer_order_quantity

Line 2059: DELETE FROM msc_sup_dem_entries sd

2055:
2056: print_debug_info(' current workflow process aborted');
2057:
2058: IF (l_replenishment_row <> 0) THEN -- replenishment record exists
2059: DELETE FROM msc_sup_dem_entries sd
2060: WHERE sd.publisher_site_id = l_sce_organization_id
2061: AND sd.inventory_item_id = l_inventory_item_id
2062: AND sd.publisher_order_type = REPLENISHMENT
2063: AND sd.plan_id = l_plan_id

Line 2389: FROM msc_sup_dem_entries sd,

2385: NULL, --sd.unit_number, -- end_item_unit_number
2386: NULL, --DECODE(sd.project_number, NULL, 'N', 'Y'), -- project_accounting_context
2387: si.sr_instance_id, -- sr_instance_id
2388: 1 -- vmi_flag
2389: FROM msc_sup_dem_entries sd,
2390: msc_system_items si,
2391: msc_trading_partners tp,
2392: msc_tp_id_lid tplid,
2393: msc_trading_partner_sites tps,

Line 2494: UPDATE msc_sup_dem_entries sd

2490:
2491: -- change the release status of the replenishment record from
2492: -- from UNRELEASED to RELEASED
2493:
2494: UPDATE msc_sup_dem_entries sd
2495: SET sd.release_status = RELEASED
2496: ,sd.quantity_in_process = l_order_quantity
2497: WHERE sd.publisher_site_id = l_sce_organization_id
2498: AND sd.inventory_item_id = l_inventory_item_id

Line 2926: UPDATE msc_sup_dem_entries sd

2922: IF funcmode = 'RUN' THEN
2923:
2924: -- change the release status of the replenishment record from
2925: -- from UNRELEASED to REJECTED
2926: UPDATE msc_sup_dem_entries sd
2927: SET release_status = REJECTED
2928: WHERE sd.publisher_site_id = l_sce_organization_id
2929: AND sd.inventory_item_id = l_inventory_item_id
2930: AND sd.publisher_order_type = REPLENISHMENT