DBA Data[Home] [Help]

APPS.MSC_SCE_LOADS_PKG dependencies on MSC_SUP_DEM_ENTRIES

Line 2390: FROM msc_sup_dem_entries sd

2386: WHERE flv.language = p_language AND
2387: flv.lookup_type = 'MSC_X_ORDER_TYPE' AND
2388: flv.lookup_code IN (G_SALES_ORDER)) AND
2389: exists (SELECT 'exists'
2390: FROM msc_sup_dem_entries sd
2391: WHERE Upper(sd.publisher_name) = Upper(ln.publisher_company)
2392: AND Upper(sd.publisher_site_name) = Upper(ln.publisher_site)
2393: AND Upper(sd.customer_name) = Upper(ln.customer_company)
2394: AND Upper(sd.customer_site_name) = Upper(ln.customer_site)

Line 2871: DELETE FROM msc_sup_dem_entries sd

2867: t_del_item_id;
2868: CLOSE c_delete_supply_commit;
2869: IF t_del_pub_id IS NOT NULL AND t_del_pub_id.COUNT > 0 THEN
2870: forall j IN t_del_pub_id.first..t_del_pub_id.last
2871: DELETE FROM msc_sup_dem_entries sd
2872: WHERE sd.publisher_id = t_del_pub_id(j)
2873: AND sd.publisher_site_id = t_del_pub_site_id(j)
2874: AND sd.customer_id = t_del_cust_id(j)
2875: AND sd.customer_site_id = t_del_cust_site_id(j)

Line 2895: DELETE FROM msc_sup_dem_entries sd

2891: t_del_item_id;
2892: CLOSE c_delete_order_forecast;
2893: IF t_del_pub_id IS NOT NULL AND t_del_pub_id.COUNT > 0 THEN
2894: forall j IN t_del_pub_id.first..t_del_pub_id.last
2895: DELETE FROM msc_sup_dem_entries sd
2896: WHERE sd.publisher_id = t_del_pub_id(j)
2897: AND sd.publisher_site_id = t_del_pub_site_id(j)
2898: AND sd.supplier_id = t_del_supp_id(j)
2899: AND sd.supplier_site_id = t_del_supp_site_id(j)

Line 3215: msc_sup_dem_entries sd

3211: from msc_supdem_lines_interface ln,
3212: msc_companies c,
3213: msc_company_sites s ,
3214: fnd_lookup_values flv,
3215: msc_sup_dem_entries sd
3216: where ln.parent_header_id = p_header_id and
3217: ln.line_id between p_start_line and p_end_line and
3218: NVL(ln.row_status, G_PROCESS) = G_SUCCESS and
3219: UPPER(c.company_name) = UPPER(NVL(ln.publisher_company, ln.posting_party_name)) and

Line 3275: msc_sup_dem_entries sd

3271: from msc_supdem_lines_interface ln,
3272: msc_companies c,
3273: msc_company_sites s ,
3274: fnd_lookup_values flv,
3275: msc_sup_dem_entries sd
3276: where ln.parent_header_id = p_header_id and
3277: ln.line_id between p_start_line and p_end_line and
3278: NVL(ln.row_status, G_PROCESS) = G_SUCCESS and
3279: UPPER(c.company_name) = UPPER(NVL(ln.publisher_company, ln.posting_party_name)) and

Line 3322: msc_sup_dem_entries sd

3318: from msc_supdem_lines_interface ln,
3319: msc_companies c,
3320: msc_company_sites s ,
3321: fnd_lookup_values flv,
3322: msc_sup_dem_entries sd
3323: where ln.parent_header_id = p_header_id and
3324: ln.line_id between p_start_line and p_end_line and
3325: NVL(ln.row_status, G_PROCESS) = G_SUCCESS and
3326: UPPER(c.company_name) = UPPER(NVL(ln.publisher_company, ln.posting_party_name)) and

Line 5101: from msc_sup_dem_entries sd

5097: nvl(sd.customer_site_id, sd.publisher_site_id),
5098: nvl(sd.supplier_id, sd.publisher_id),
5099: nvl(sd.supplier_site_id, sd.publisher_site_id),
5100: sd.primary_uom
5101: from msc_sup_dem_entries sd
5102: where sd.ref_header_id = p_header_id and
5103: sd.publisher_order_type = G_REQUISITION;
5104:
5105: CURSOR c_sc_admins

Line 5434: UPDATE msc_sup_dem_entries msde

5430: if (t_transaction_id is not null) and (t_transaction_id.COUNT > 0) then
5431: log_debug('RecordS fetched: ' || t_transaction_id.COUNT);
5432: BEGIN
5433: FORALL i IN t_transaction_id.FIRST..t_transaction_id.LAST
5434: UPDATE msc_sup_dem_entries msde
5435: SET msde.quantity = 0,
5436: msde.tp_quantity = 0,
5437: msde.primary_quantity = 0,
5438: msde.ref_header_id = p_header_id,

Line 7252: delete from msc_sup_dem_entries sd

7248:
7249: ***************/
7250: /* Delete the work orders that have been deleted */
7251: BEGIN
7252: delete from msc_sup_dem_entries sd
7253: where sd.plan_id = -1
7254: and sd.publisher_order_type = G_WORK_ORDER
7255: and sd.last_update_login = G_DELETED;
7256:

Line 8007: UPDATE msc_sup_dem_entries

8003: log_debug('Records fetched :' || t_line_id.COUNT);
8004: BEGIN
8005: log_debug('At 1');
8006: FORALL j in t_line_id.FIRST..t_line_id.LAST
8007: UPDATE msc_sup_dem_entries
8008: SET number1 = primary_quantity
8009: WHERE ROWID IN
8010: (SELECT ROWID FROM MSC_SUP_DEM_ENTRIES
8011: WHERE plan_id = G_PLAN_ID AND

Line 8010: (SELECT ROWID FROM MSC_SUP_DEM_ENTRIES

8006: FORALL j in t_line_id.FIRST..t_line_id.LAST
8007: UPDATE msc_sup_dem_entries
8008: SET number1 = primary_quantity
8009: WHERE ROWID IN
8010: (SELECT ROWID FROM MSC_SUP_DEM_ENTRIES
8011: WHERE plan_id = G_PLAN_ID AND
8012: sr_instance_id = G_SR_INSTANCE_ID AND
8013: (nvl(quantity,0) <> 0 OR (Nvl(quantity,0) = 0 AND t_order_type(j) IN (G_ORDER_FORECAST, G_SUPPLY_COMMIT))) AND
8014: publisher_id = t_pub_id(j) AND

Line 8035: SELECT ROWID FROM MSC_SUP_DEM_ENTRIES

8031: G_PROJ_AVAI_BAL) AND
8032: NVL(key_date, sysdate) = NVL(t_key_date(j), sysdate) AND
8033: NVL(bucket_type, G_NULL_STRING) = NVL(t_bkt_type(j), G_NULL_STRING)
8034: UNION ALL
8035: SELECT ROWID FROM MSC_SUP_DEM_ENTRIES
8036: WHERE plan_id = G_PLAN_ID AND
8037: sr_instance_id = G_SR_INSTANCE_ID AND
8038: (nvl(quantity,0) <> 0 OR (Nvl(quantity,0) = 0 AND t_order_type(j) IN (G_ORDER_FORECAST, G_SUPPLY_COMMIT))) AND
8039: publisher_id = t_pub_id(j) AND

Line 8063: SELECT ROWID FROM MSC_SUP_DEM_ENTRIES

8059: NVL(end_order_number, G_NULL_STRING) = NVL(t_end_ord(j), G_NULL_STRING) AND
8060: NVL(end_order_rel_number, G_NULL_STRING) = NVL(t_end_rel(j), G_NULL_STRING) AND
8061: NVL(end_order_line_number, G_NULL_STRING) = NVL(t_end_line(j), G_NULL_STRING)
8062: UNION ALL
8063: SELECT ROWID FROM MSC_SUP_DEM_ENTRIES
8064: WHERE plan_id = G_PLAN_ID AND
8065: sr_instance_id = G_SR_INSTANCE_ID AND
8066: (nvl(quantity,0) <> 0 OR (Nvl(quantity,0) = 0 AND t_order_type(j) IN (G_ORDER_FORECAST, G_SUPPLY_COMMIT))) AND
8067: publisher_id = t_pub_id(j) AND

Line 8081: UPDATE msc_sup_dem_entries

8077: );
8078:
8079: log_debug('At 2');
8080: FORALL j in t_line_id.FIRST..t_line_id.LAST
8081: UPDATE msc_sup_dem_entries
8082: SET last_refresh_number = msc_cl_refresh_s.nextval,
8083: ref_header_id = p_header_id,
8084: ref_line_id = t_line_id(j),
8085: quantity = round(nvl(t_quantity(j),0),6),

Line 8153: (SELECT ROWID FROM MSC_SUP_DEM_ENTRIES

8149: uom_code = nvl(t_uom(j),'Ea'),
8150: last_update_date = sysdate,
8151: last_updated_by = p_user_id
8152: WHERE ROWID IN
8153: (SELECT ROWID FROM MSC_SUP_DEM_ENTRIES
8154: WHERE plan_id = G_PLAN_ID AND
8155: sr_instance_id = G_SR_INSTANCE_ID AND
8156: (nvl(quantity,0) <> 0 OR (Nvl(quantity,0) = 0 AND t_order_type(j) IN (G_ORDER_FORECAST, G_SUPPLY_COMMIT))) AND
8157: publisher_id = t_pub_id(j) AND

Line 8178: SELECT ROWID FROM MSC_SUP_DEM_ENTRIES

8174: G_PROJ_AVAI_BAL) AND
8175: NVL(key_date, sysdate) = NVL(t_key_date(j), sysdate) AND
8176: NVL(bucket_type, G_NULL_STRING) = NVL(t_bkt_type(j), G_NULL_STRING)
8177: UNION ALL
8178: SELECT ROWID FROM MSC_SUP_DEM_ENTRIES
8179: WHERE plan_id = G_PLAN_ID AND
8180: sr_instance_id = G_SR_INSTANCE_ID AND
8181: (nvl(quantity,0) <> 0 OR (Nvl(quantity,0) = 0 AND t_order_type(j) IN (G_ORDER_FORECAST, G_SUPPLY_COMMIT))) AND
8182: publisher_id = t_pub_id(j) AND

Line 8205: SELECT ROWID FROM MSC_SUP_DEM_ENTRIES

8201: NVL(end_order_number, G_NULL_STRING) = NVL(t_end_ord(j), G_NULL_STRING) AND
8202: NVL(end_order_rel_number, G_NULL_STRING) = NVL(t_end_rel(j), G_NULL_STRING) AND
8203: NVL(end_order_line_number, G_NULL_STRING) = NVL(t_end_line(j), G_NULL_STRING)
8204: UNION ALL
8205: SELECT ROWID FROM MSC_SUP_DEM_ENTRIES
8206: WHERE plan_id = G_PLAN_ID AND
8207: sr_instance_id = G_SR_INSTANCE_ID AND
8208: (nvl(quantity,0) <> 0 OR (Nvl(quantity,0) = 0 AND t_order_type(j) IN (G_ORDER_FORECAST, G_SUPPLY_COMMIT))) AND
8209: publisher_id = t_pub_id(j) AND

Line 8220: SELECT ROWID FROM MSC_SUP_DEM_ENTRIES

8216: inventory_item_id = t_item_id(j) AND
8217: publisher_order_type = G_WORK_ORDER AND
8218: NVL(order_number, G_NULL_STRING) = NVL(t_ord_num(j), G_NULL_STRING)
8219: UNION ALL
8220: SELECT ROWID FROM MSC_SUP_DEM_ENTRIES
8221: WHERE plan_id = G_PLAN_ID AND
8222: sr_instance_id = G_SR_INSTANCE_ID AND
8223: (nvl(quantity,0) <> 0 OR (Nvl(quantity,0) = 0 AND t_order_type(j) IN (G_ORDER_FORECAST, G_SUPPLY_COMMIT))) AND
8224: publisher_id = t_pub_id(j) AND

Line 8794: INSERT INTO msc_sup_dem_entries (

8790: if t_insert_id IS NOT NULL and t_insert_id.COUNT > 0 THEN
8791: log_debug('At 6' || ' t_insert_id.COUNT := ' || t_insert_id.COUNT);
8792: FORALL i in t_insert_id.FIRST..t_insert_id.LAST
8793:
8794: INSERT INTO msc_sup_dem_entries (
8795: ref_header_id,
8796: ref_line_id,
8797: transaction_id,
8798: plan_id,

Line 8911: msc_sup_dem_entries_s.nextval,

8907: ,planner_code--Bug 4424426
8908: ) VALUES (
8909: p_header_id,
8910: t_ins_line_id(i),
8911: msc_sup_dem_entries_s.nextval,
8912: G_PLAN_ID,
8913: G_SR_INSTANCE_ID,
8914: t_ins_pub(i),
8915: t_ins_pub_id(i),

Line 9110: from msc_sup_dem_entries sd1,

9106: sd1.last_update_date, --Fix for bug 5599903
9107: sd1.last_updated_by,
9108: ln.sync_indicator, --Fix for bug 6147298
9109: ln.quantity
9110: from msc_sup_dem_entries sd1,
9111: msc_supdem_lines_interface ln
9112: where sd1.ref_header_id = p_header_id and
9113: sd1.plan_id = -1 and
9114: sd1.publisher_order_type = 15 and --ASN

Line 9146: from msc_sup_dem_entries sd1,

9142: sd1.end_order_line_number,
9143: sd2.end_order_number,
9144: sd2.end_order_rel_number,
9145: sd2.end_order_line_number
9146: from msc_sup_dem_entries sd1,
9147: msc_sup_dem_entries sd2
9148: where sd1.ref_header_id = p_header_id and
9149: sd1.plan_id = -1 and
9150: sd1.publisher_order_type = 15 and --ASN

Line 9147: msc_sup_dem_entries sd2

9143: sd2.end_order_number,
9144: sd2.end_order_rel_number,
9145: sd2.end_order_line_number
9146: from msc_sup_dem_entries sd1,
9147: msc_sup_dem_entries sd2
9148: where sd1.ref_header_id = p_header_id and
9149: sd1.plan_id = -1 and
9150: sd1.publisher_order_type = 15 and --ASN
9151: sd1.end_order_type = 14 and --SO pegged to the ASN

Line 9178: from msc_sup_dem_entries sd1

9174: sd1.supplier_site_id,
9175: sd1.end_order_number,
9176: sd1.end_order_rel_number,
9177: sd1.end_order_line_number
9178: from msc_sup_dem_entries sd1
9179: where sd1.ref_header_id = p_header_id and
9180: sd1.plan_id = -1 and
9181: sd1.publisher_order_type = 16 and --Shipment Receipt
9182: sd1.end_order_type = 15; --ASN

Line 9198: from msc_sup_dem_entries sd1

9194: sd1.supplier_site_id,
9195: sd1.end_order_number,
9196: sd1.end_order_rel_number,
9197: sd1.end_order_line_number
9198: from msc_sup_dem_entries sd1
9199: where sd1.ref_header_id = p_header_id and
9200: sd1.plan_id = -1 and
9201: sd1.publisher_order_type = 16 and --Shipment Receipt
9202: sd1.end_order_type = 13; --PO

Line 9215: from msc_sup_dem_entries sd1,

9211: sd1.supplier_site_id,
9212: sd2.order_number,
9213: sd2.release_number,
9214: sd2.line_number
9215: from msc_sup_dem_entries sd1,
9216: msc_sup_dem_entries sd2
9217: where sd1.ref_header_id = p_header_id and
9218: sd1.plan_id = -1 and
9219: sd1.publisher_order_type = 16 and

Line 9216: msc_sup_dem_entries sd2

9212: sd2.order_number,
9213: sd2.release_number,
9214: sd2.line_number
9215: from msc_sup_dem_entries sd1,
9216: msc_sup_dem_entries sd2
9217: where sd1.ref_header_id = p_header_id and
9218: sd1.plan_id = -1 and
9219: sd1.publisher_order_type = 16 and
9220: sd1.end_order_type = 13 and

Line 9243: from msc_sup_dem_entries sd1

9239: select sd1.inventory_item_id,
9240: sd1.publisher_id,
9241: sd1.publisher_site_id,
9242: sd1.new_schedule_date
9243: from msc_sup_dem_entries sd1
9244: where sd1.ref_header_id = p_header_id and
9245: sd1.plan_id = -1 and
9246: sd1.publisher_order_type in (9,10); --Allocated + Unallocated onhand
9247:

Line 9281: update msc_sup_dem_entries sd

9277: --==================================
9278: if (t_pri_qty is not null) and (t_pri_qty.COUNT > 0 ) THEN
9279:
9280: FORALL j in t_pri_qty.FIRST..t_pri_qty.LAST
9281: update msc_sup_dem_entries sd
9282: set sd.number1 = DECODE(t_sync_id(j),'R',sd.primary_quantity,'D',sd.number1) --Fix for bug 6147298
9283: where sd.publisher_order_type = 13 and --PO
9284: sd.plan_id = -1 and
9285: sd.inventory_item_id = t_item_id(j) and

Line 9296: update msc_sup_dem_entries sd

9292: nvl(sd.line_number,-99) = nvl(t_end_ord_line_num(j), -99) and
9293: sd.quantity > 0;
9294:
9295: FORALL j in t_pri_qty.FIRST..t_pri_qty.LAST
9296: update msc_sup_dem_entries sd
9297: set sd.primary_quantity = DECODE(t_sync_id(j),'R',round(sd.primary_quantity - decode(t_number1(j),NULL,t_tp_qty(j),Decode(t_pri_qty(j),0, -t_number1(j), t_tp_qty(j) - (t_number1(j)/Decode(t_pri_qty(j),0,1,t_pri_qty(j)))*t_tp_qty(j))), 6),
9298: 'D',round(sd.primary_quantity + t_del_qty(j),6)),
9299: sd.tp_quantity = DECODE(t_sync_id(j),'R',round(sd.tp_quantity - decode(t_number1(j),NULL,t_pri_qty(j),t_pri_qty(j)-t_number1(j)), 6),'D',round(sd.tp_quantity + t_del_qty(j),6)) --Fix for bug 6147298
9300: where sd.publisher_order_type = 13 and --PO

Line 9313: update msc_sup_dem_entries sd

9309: nvl(sd.line_number,-99) = nvl(t_end_ord_line_num(j), -99) and
9310: sd.quantity > 0;
9311:
9312: FORALL j in t_pri_qty.FIRST..t_pri_qty.LAST
9313: update msc_sup_dem_entries sd
9314: set sd.quantity = get_quantity(sd.primary_quantity, sd.primary_uom, sd.uom_code, sd.inventory_item_id),
9315: sd.last_updated_by = t_last_updated_by(j),
9316: sd.last_update_date = t_last_update_date(j) --Fix for bug 5599903
9317: where sd.publisher_order_type = 13 and --PO

Line 9335: update msc_sup_dem_entries sd

9331: --==================================
9332: --Consume SO quantity
9333: --==================================
9334: FORALL j in t_pri_qty.FIRST..t_pri_qty.LAST
9335: update msc_sup_dem_entries sd
9336: set sd.number1 = sd.primary_quantity
9337: where sd.publisher_order_type = 14 and --SO
9338: sd.plan_id = -1 and
9339: sd.inventory_item_id = t_item_id(j) and

Line 9351: update msc_sup_dem_entries sd

9347: sd.quantity > 0;
9348:
9349:
9350: FORALL j in t_pri_qty.FIRST..t_pri_qty.last
9351: update msc_sup_dem_entries sd
9352: set sd.primary_quantity = round(sd.primary_quantity - decode(t_number1(j),NULL,t_pri_qty(j),t_pri_qty(j)-t_number1(j)), 6),
9353: sd.tp_quantity = round(sd.tp_quantity - decode(t_number1(j), NULL, t_tp_qty(j), Decode(t_pri_qty(j),0,-t_number1(j),t_tp_qty(j) - (t_number1(j)/Decode(t_pri_qty(j),0,1,t_pri_qty(j)))*t_tp_qty(j))), 6)
9354: where sd.publisher_order_type = 14 and --SO
9355: sd.plan_id = -1 and

Line 9367: update msc_sup_dem_entries sd

9363: nvl(sd.end_order_line_number, -99) = nvl(t_end_ord_line_num(j), -99) and
9364: sd.quantity > 0;
9365:
9366: FORALL j in t_pri_qty.FIRST..t_pri_qty.LAST
9367: update msc_sup_dem_entries sd
9368: set sd.quantity = get_quantity(sd.primary_quantity, sd.primary_uom, sd.uom_code, sd.inventory_item_id)
9369: where sd.publisher_order_type = 14 and --SO
9370: sd.plan_id = -1 and
9371: sd.inventory_item_id = t_item_id(j) and

Line 9413: update msc_sup_dem_entries sd

9409: --Consume SO quantity
9410: --==================================
9411: if (t_pri_qty is not NULL) and (t_pri_qty.COUNT > 0) then
9412: FORALL j in t_pri_qty.FIRST..t_pri_qty.LAST
9413: update msc_sup_dem_entries sd
9414: set sd.number1 = sd.primary_quantity
9415: where sd.inventory_item_id = t_item_id(j) and
9416: sd.plan_id = -1 and
9417: sd.publisher_order_type = 14 and --SO

Line 9428: update msc_sup_dem_entries sd

9424: nvl(sd.line_number,-99) = nvl(t_end_ord_line_num(j), -99) and
9425: sd.quantity > 0;
9426:
9427: FORALL j in t_pri_qty.FIRST..t_pri_qty.LAST
9428: update msc_sup_dem_entries sd
9429: set sd.primary_quantity = round(sd.primary_quantity - decode(t_number1(j),NULL,t_pri_qty(j),t_pri_qty(j)-t_number1(j)), 6),
9430: sd.tp_quantity = round(sd.tp_quantity - decode(t_number1(j), NULL, t_tp_qty(j), Decode(t_pri_qty(j),0, -t_number1(j), t_tp_qty(j) - (t_number1(j)/Decode(t_pri_qty(j),0,1,t_pri_qty(j)))*t_tp_qty(j))), 6)
9431: where sd.inventory_item_id = t_item_id(j) and
9432: sd.plan_id = -1 and

Line 9444: update msc_sup_dem_entries sd

9440: nvl(sd.line_number,-99) = nvl(t_end_ord_line_num(j), -99) and
9441: sd.quantity > 0;
9442:
9443: FORALL j in t_pri_qty.FIRST..t_pri_qty.LAST
9444: update msc_sup_dem_entries sd
9445: set sd.quantity = get_quantity(sd.primary_quantity, sd.primary_uom, sd.uom_code, sd.inventory_item_id)
9446: where sd.inventory_item_id = t_item_id(j) and
9447: sd.plan_id = -1 and
9448: sd.publisher_order_type = 14 and --SO

Line 9464: update msc_sup_dem_entries sd

9460: --==================================
9461: --Consume PO quantity
9462: --==================================
9463: FORALL j in t_pri_qty.FIRST..t_pri_qty.LAST
9464: update msc_sup_dem_entries sd
9465: set sd.number1 = sd.primary_quantity
9466: where sd.inventory_item_id = t_item_id(j) and
9467: sd.plan_id = -1 and
9468: sd.publisher_order_type = 13 and --PO

Line 9479: update msc_sup_dem_entries sd

9475: nvl(sd.line_number,-99) = nvl(t_end_ord_line_num1(j), -99) and
9476: sd.quantity > 0;
9477:
9478: FORALL j in t_pri_qty.FIRST..t_pri_qty.LAST
9479: update msc_sup_dem_entries sd
9480: set sd.primary_quantity = round(sd.primary_quantity - decode(t_number1(j),NULL,t_tp_qty(j), Decode(t_pri_qty(j),0,-t_number1(j), t_tp_qty(j)-(t_number1(j)/Decode(t_pri_qty(j),0,1,t_pri_qty(j)))*t_tp_qty(j))), 6),
9481: sd.tp_quantity = round(sd.tp_quantity - decode(t_number1(j), NULL, t_pri_qty(j), t_pri_qty(j)-t_number1(j)), 6)
9482: where sd.inventory_item_id = t_item_id(j) and
9483: sd.plan_id = -1 and

Line 9495: update msc_sup_dem_entries sd

9491: nvl(sd.line_number,-99) = nvl(t_end_ord_line_num1(j), -99) and
9492: sd.quantity > 0;
9493:
9494: FORALL j in t_pri_qty.FIRST..t_pri_qty.LAST
9495: update msc_sup_dem_entries sd
9496: set sd.quantity = get_quantity(sd.primary_quantity, sd.primary_uom, sd.uom_code, sd.inventory_item_id),
9497: sd.last_updated_by = t_last_updated_by(j),
9498: sd.last_update_date = t_last_update_date(j) --Fix for bug 5599903
9499: where sd.inventory_item_id = t_item_id(j) and

Line 9533: update msc_sup_dem_entries sd

9529: --Consume ASN quantity
9530: --==================================
9531: if (t_item_id is not null ) and (t_item_id.COUNT > 0) then
9532: FORALL j in t_item_id.FIRST..t_item_id.LAST
9533: update msc_sup_dem_entries sd
9534: set sd.quantity = 0,
9535: sd.primary_quantity = 0,
9536: sd.tp_quantity = 0,
9537: sd.last_update_login = -99

Line 9569: update msc_sup_dem_entries sd

9565:
9566: --Update ASN's pegged to the PO
9567: if (t_item_id is not null ) and (t_item_id.COUNT > 0) then
9568: FORALL j in t_item_id.FIRST..t_item_id.LAST
9569: update msc_sup_dem_entries sd
9570: set sd.quantity = 0,
9571: sd.primary_quantity = 0,
9572: sd.tp_quantity = 0,
9573: sd.last_update_login = -99

Line 9602: UPDATE msc_sup_dem_entries sd

9598: t_end_ord_line_num;
9599: CLOSE c_receipts_pegged_to_po1;
9600: if (t_item_id IS NOT NULL) and (t_item_id.COUNT > 0) then
9601: FORALL j in t_item_id.FIRST..t_item_id.LAST
9602: UPDATE msc_sup_dem_entries sd
9603: SET sd.quantity = 0,
9604: sd.primary_quantity = 0,
9605: sd.tp_quantity = 0,
9606: sd.last_update_login = -99

Line 9635: update msc_sup_dem_entries sd

9631: CLOSE c_onhand_records;
9632:
9633: if (t_item_id is not NULL) and (t_item_id.COUNT > 0) then
9634: FORALL j in t_item_id.FIRST..t_item_id.LAST
9635: update msc_sup_dem_entries sd
9636: set sd.quantity = 0,
9637: sd.primary_quantity = 0,
9638: sd.tp_quantity = 0,
9639: sd.last_update_login = -99

Line 10160: FROM msc_sup_dem_entries msde

10156: UPDATE /*+ parallel(mssn,5) */
10157: msc_st_serial_numbers mssn
10158: SET mssn.serial_txn_id = (SELECT /*+ parallel(msde,5) */
10159: msde.transaction_id
10160: FROM msc_sup_dem_entries msde
10161: WHERE msde.plan_id = -1 AND
10162: msde.publisher_id = mssn.publisher_id AND
10163: msde.publisher_site_id = mssn.publisher_site_id AND
10164: msde.inventory_item_id = mssn.inventory_item_id AND