DBA Data[Home] [Help]

APPS.MRP_MANAGER_PK dependencies on MRP_SALES_ORDER_UPDATES

Line 219: -- 1. Items in MRP_SALES_ORDER_UPDATES

215: 'MRP_SCHED_MGR_BATCH_SIZE')), SYS_YES);
216:
217: --
218: -- Insert the following into MRP_FORM_QUERY:
219: -- 1. Items in MRP_SALES_ORDER_UPDATES
220: -- 2. Product family of items in (1)
221: -- 3. Components of items in (1)
222: -- 4. Other items that are in the same product family as items in (1)
223: --

Line 233: SELECT /*+ INDEX (upd MRP_SALES_ORDER_UPDATES_N4) */

229: last_update_date,
230: last_updated_by,
231: creation_date,
232: created_by)
233: SELECT /*+ INDEX (upd MRP_SALES_ORDER_UPDATES_N4) */
234: var_batch_id,
235: upd.inventory_item_id,
236: upd.organization_id,
237: -1,

Line 242: FROM mrp_sales_order_updates upd

238: SYSDATE,
239: -1,
240: SYSDATE,
241: -1
242: FROM mrp_sales_order_updates upd
243: WHERE upd.process_status = 3
244: UNION
245: SELECT /*+ INDEX (upd1 MRP_SALES_ORDER_UPDATES_N4)
246: ORDERED

Line 245: SELECT /*+ INDEX (upd1 MRP_SALES_ORDER_UPDATES_N4)

241: -1
242: FROM mrp_sales_order_updates upd
243: WHERE upd.process_status = 3
244: UNION
245: SELECT /*+ INDEX (upd1 MRP_SALES_ORDER_UPDATES_N4)
246: ORDERED
247: USE_NL (upd1, item) */
248: var_batch_id, /* product family */
249: item.product_family_item_id,

Line 256: FROM mrp_sales_order_updates upd1,

252: SYSDATE,
253: -1,
254: SYSDATE,
255: -1
256: FROM mrp_sales_order_updates upd1,
257: mtl_system_items item
258: WHERE item.organization_id = upd1.organization_id
259: AND item.inventory_item_id = upd1.inventory_item_id
260: AND upd1.request_id IS NOT NULL

Line 264: SELECT /*+ INDEX (upd2 MRP_SALES_ORDER_UPDATES_N4)

260: AND upd1.request_id IS NOT NULL
261: AND upd1.error_message IS NULL
262: AND upd1.process_status = 3
263: UNION
264: SELECT /*+ INDEX (upd2 MRP_SALES_ORDER_UPDATES_N4)
265: ORDERED
266: USE_NL (upd2, bom_item,bom,comp,comp_item) */
267: var_batch_id,
268: comp.component_item_id, /* items's children */

Line 275: FROM mrp_sales_order_updates upd2,

271: SYSDATE,
272: -1,
273: SYSDATE,
274: -1
275: FROM mrp_sales_order_updates upd2,
276: mtl_system_items bom_item,
277: bom_bill_of_materials bom,
278: bom_inventory_components comp,
279: mtl_system_items comp_item

Line 304: SELECT /*+ INDEX (upd3 MRP_SALES_ORDER_UPDATES_N4)

300: AND upd2.request_id IS NOT NULL
301: AND upd2.error_message IS NULL
302: AND upd2.process_status = 3
303: UNION
304: SELECT /*+ INDEX (upd3 MRP_SALES_ORDER_UPDATES_N4)
305: INDEX (item2 MTL_SYSTEM_ITEMS_B_N7)
306: ORDERED
307: USE_NL (upd3, item1,item2) */
308: var_batch_id,

Line 316: FROM mrp_sales_order_updates upd3,

312: SYSDATE,
313: -1,
314: SYSDATE,
315: -1
316: FROM mrp_sales_order_updates upd3,
317: mtl_system_items item1,
318: mtl_system_items item2
319: WHERE item2.product_family_item_id = item1.product_family_item_id
320: AND item2.organization_id = item1.organization_id

Line 423: SELECT /*+ index(upd2 mrp_sales_order_updates_n4) */

419: last_update_date,
420: last_updated_by,
421: creation_date,
422: created_by)
423: SELECT /*+ index(upd2 mrp_sales_order_updates_n4) */
424: var_batch_id,
425: -1,
426: inventory_item_id,
427: -1,

Line 432: FROM mrp_sales_order_updates upd2

428: SYSDATE,
429: -1,
430: SYSDATE,
431: -1
432: FROM mrp_sales_order_updates upd2
433: WHERE (upd2.new_schedule_date <>
434: NVL(upd2.old_schedule_date,
435: upd2.new_schedule_date + 1)
436: OR upd2.new_schedule_quantity <>

Line 603: mrp_sales_order_updates upd,

599: dem.ato_line_id,
600: upd.rowid
601: FROM
602: oe_order_lines_all dem,
603: mrp_sales_order_updates upd,
604: mtl_parameters param
605: WHERE NVL(upd.process_status, -1) <> 3
606: AND upd.sales_order_id(+) = dem.line_id
607: AND param.calendar_code IS NOT NULL

Line 626: FROM mrp_sales_order_updates updates

622: -- the value current_ cols in upd with
623: -- the corresponding values in dem.
624: AND (NOT EXISTS
625: (SELECT NULL
626: FROM mrp_sales_order_updates updates
627: WHERE updates.sales_order_id = dem.line_id
628: AND (
629: decode(nvl(dem.mfg_lead_time,0),
630: 0,updates.new_schedule_date,

Line 726: mrp_sales_order_updates upd,

722: FROM MRP_SO_LINES_TEMP
723: WHERE process_status = 3
724: AND request_id = arg_request_id) V,
725: oe_order_lines_all dem,
726: mrp_sales_order_updates upd,
727: mtl_parameters param
728: WHERE NVL(upd.process_status, -1) <> 3
729: AND upd.sales_order_id(+) = dem.line_id
730: AND param.calendar_code IS NOT NULL

Line 760: FROM mrp_sales_order_updates updates

756: SELECT demand.rowid
757: FROM mtl_demand_omoe demand
758: WHERE ((EXISTS
759: (SELECT NULL
760: FROM mrp_sales_order_updates updates
761: WHERE updates.sales_order_id = demand.demand_id
762: AND updates.old_schedule_date = demand.requirement_date
763: AND updates.old_schedule_quantity =
764: demand.primary_uom_quantity

Line 789: mrp_sales_order_updates mrp

785: SELECT DISTINCT calendar_code,
786: calendar_exception_set_id,
787: param.organization_id
788: from mtl_parameters param,
789: mrp_sales_order_updates mrp
790: where param.organization_id = mrp.organization_id
791: and mrp.process_status = 1
792: order by calendar_code, calendar_exception_set_id;
793:

Line 847: FROM mrp_sales_order_updates upd

843: AND mslt.request_id is NULL
844: AND rownum <= UPDATE_BATCH_SIZE
845: AND NOT EXISTS
846: (SELECT 1
847: FROM mrp_sales_order_updates upd
848: WHERE
849: upd.sales_order_id = mslt.line_id
850: AND upd.process_status = 3)
851: AND NOT EXISTS

Line 888: | the sales order is already in MRP_SALES_ORDER_UPDATES |

884: /*------------------------------------------------------+
885: | |
886: | Set updated flag to SYS_NO if none of the attributes |
887: | that affect sales order consumption have changed and |
888: | the sales order is already in MRP_SALES_ORDER_UPDATES |
889: | |
890: +------------------------------------------------------
891: LOOP
892: BEGIN

Line 1042: 'mrp_sales_order_updates',

1038: var_watch_id := mrp_print_pk.start_watch('GEN-LOCK TABLE',
1039: arg_request_id,
1040: arg_user_id,
1041: 'TABLE',
1042: 'mrp_sales_order_updates',
1043: 'N',
1044: 'DATE',
1045: to_char(sysdate,'dd-mon hh24:mi:ss'),
1046: 'Y');

Line 1050: LOCK TABLE mrp_sales_order_updates IN SHARE ROW EXCLUSIVE MODE;

1046: 'Y');
1047:
1048: */
1049:
1050: LOCK TABLE mrp_sales_order_updates IN SHARE ROW EXCLUSIVE MODE;
1051:
1052:
1053: /*
1054: mrp_print_pk.stop_watch(arg_request_id,

Line 1067: 'mrp_sales_order_updates',

1063: var_watch_id := mrp_print_pk.start_watch('GEN-SELECTING',
1064: arg_request_id,
1065: arg_user_id,
1066: 'ENTITY',
1067: 'mrp_sales_order_updates',
1068: 'N');
1069: */
1070:
1071: LOOP

Line 1262: * mrp_sales_order_updates where the line

1258: END IF;
1259: IF (config_line_id <> -1) THEN
1260: /* We should insert/update 0 for the
1261: * new_schedule_quantity in the table
1262: * mrp_sales_order_updates where the line
1263: * being processed is of model/option class
1264: * or for the option item
1265: */
1266: var_dem_primary_uom_quantity := 0;

Line 1280: UPDATE mrp_sales_order_updates upd

1276: affect forecast consumption. */
1277:
1278: to_update := to_update + 1;
1279:
1280: UPDATE mrp_sales_order_updates upd
1281: SET
1282: last_update_date = SYSDATE,
1283: last_updated_by = arg_user_id,
1284: last_update_login = -1,

Line 1332: FROM mrp_sales_order_updates

1328: -- exists in the table already.
1329:
1330: SELECT COUNT(*)
1331: INTO new_org_rec_count
1332: FROM mrp_sales_order_updates
1333: WHERE
1334: sales_order_id = var_dem_demand_id
1335: AND inventory_item_id = var_dem_inventory_item_id
1336: AND organization_id = var_dem_organization_id;

Line 1344: INSERT INTO mrp_sales_order_updates

1340: -- Need to insert a record for the new org.
1341:
1342: IF var_dem_available_to_mrp = 'Y' THEN
1343:
1344: INSERT INTO mrp_sales_order_updates
1345: (update_seq_num ,
1346: last_update_date,
1347: last_updated_by,
1348: creation_date,

Line 1375: (mrp_sales_order_updates_s.nextval,

1371: previous_demand_class,
1372: ordered_item_id,
1373: completed_quantity)
1374: VALUES
1375: (mrp_sales_order_updates_s.nextval,
1376: SYSDATE,
1377: arg_user_id,
1378: SYSDATE,
1379: arg_user_id,

Line 1413: UPDATE mrp_sales_order_updates

1409:
1410: -- Need to update the record for the existing
1411: -- Org(s) to 0.
1412:
1413: UPDATE mrp_sales_order_updates
1414: SET
1415: last_update_date = SYSDATE,
1416: last_updated_by = arg_user_id,
1417: last_update_login = -1,

Line 1434: --update mrp_sales_order_updates

1430: END IF;
1431: -- Commented out the following update statement
1432: -- for the bug 2296197
1433:
1434: --update mrp_sales_order_updates
1435: -- set old_schedule_date=new_schedule_date,
1436: -- old_schedule_quantity=new_schedule_quantity,
1437: -- previous_customer_id = current_customer_id,
1438: -- previous_ship_id = current_ship_id,

Line 1446: INSERT INTO mrp_sales_order_updates

1442: end if;
1443:
1444:
1445: ELSIF var_dem_available_to_mrp = 'Y' THEN
1446: INSERT INTO mrp_sales_order_updates
1447: (update_seq_num ,
1448: last_update_date,
1449: last_updated_by,
1450: creation_date,

Line 1477: (mrp_sales_order_updates_s.nextval,

1473: previous_demand_class,
1474: ordered_item_id,
1475: completed_quantity)
1476: VALUES
1477: (mrp_sales_order_updates_s.nextval,
1478: SYSDATE,
1479: arg_user_id,
1480: SYSDATE,
1481: arg_user_id,

Line 1519: * then this update of mrp_sales_order_updates

1515: if(var_dem_demand_type = 4) then
1516: /* Scope for further optimization.
1517: * If the ATO model and Configured item are
1518: * in the same set of records being processed
1519: * then this update of mrp_sales_order_updates
1520: * is redundant as we have already inserted/
1521: * updated the new_schedule_quantity to 0
1522: */
1523:

Line 1536: UPDATE mrp_sales_order_updates upd

1532: EXIT WHEN CUR_MODEL_OPT%NOTFOUND;
1533:
1534: /* 2463192 - update the record only if new_schedule_quantity <> 0 */
1535:
1536: UPDATE mrp_sales_order_updates upd
1537: SET
1538: last_update_date = SYSDATE,
1539: last_updated_by = arg_user_id,
1540: last_update_login = -1,

Line 1626: 'mrp_sales_order_updates',

1622: 'NUMBER',
1623: to_char(insert_count),
1624: 'N',
1625: 'TABLE',
1626: 'mrp_sales_order_updates',
1627: 'N');
1628:
1629: mrp_print_pk.stop_watch(arg_request_id,
1630: var_watch_id);

Line 1636: 'mrp_sales_order_updates',

1632: var_watch_id := mrp_print_pk.start_watch('GEN-updated',
1633: arg_request_id,
1634: arg_user_id,
1635: 'ENTITY',
1636: 'mrp_sales_order_updates',
1637: 'N');
1638:
1639: mrp_print_pk.stop_watch(arg_request_id,
1640: var_watch_id,

Line 1705: from mrp_sales_order_updates

1701: arg_user_id,
1702: SYSDATE,
1703: arg_user_id,
1704: -1
1705: from mrp_sales_order_updates
1706: where organization_id = var_org_id
1707: and process_status = 1
1708: and (new_schedule_date < var_min_cal_date
1709: or new_schedule_date > var_max_cal_date);

Line 1756: 'mrp_sales_order_updates',

1752: var_watch_id := mrp_print_pk.start_watch('GEN-updated',
1753: arg_request_id,
1754: arg_user_id,
1755: 'ENTITY',
1756: 'mrp_sales_order_updates',
1757: 'N');
1758: END IF;
1759: */
1760: UPDATE mrp_sales_order_updates upd

Line 1760: UPDATE mrp_sales_order_updates upd

1756: 'mrp_sales_order_updates',
1757: 'N');
1758: END IF;
1759: */
1760: UPDATE mrp_sales_order_updates upd
1761: SET old_schedule_date = GREATEST(var_min_cal_date,
1762: LEAST(var_max_cal_date, old_schedule_date)),
1763: new_schedule_date = GREATEST(var_min_cal_date,
1764: LEAST(var_max_cal_date, new_schedule_date)),

Line 1814: UPDATE mrp_sales_order_updates upd

1810: * mrp_so_lines_temp, with the process_status as 3
1811: * but their corresponding record is not found in the
1812: * table oe_order_lines_all as they have been deleted.
1813: */
1814: UPDATE mrp_sales_order_updates upd
1815: SET
1816: last_update_date = SYSDATE,
1817: last_updated_by = arg_user_id,
1818: last_update_login = -1,

Line 1863: mrp_sales_order_updates updates1

1859: SELECT demand.rowid,
1860: updates1.new_schedule_quantity,
1861: updates1.new_schedule_date
1862: FROM mtl_demand demand,
1863: mrp_sales_order_updates updates1
1864: WHERE updates1.sales_order_id = demand.demand_id
1865: AND updates1.request_id = arg_request_id
1866: AND updates1.process_status = 3
1867: AND updates1.error_message IS NULL

Line 1932: 'mrp_sales_order_updates',

1928: var_watch_id := mrp_print_pk.start_watch('GEN-updated',
1929: arg_request_id,
1930: arg_user_id,
1931: 'ENTITY',
1932: 'mrp_sales_order_updates',
1933: 'N');
1934: UPDATE mrp_sales_order_updates
1935: SET old_schedule_date = new_schedule_date,
1936: old_schedule_quantity = new_schedule_quantity,

Line 1934: UPDATE mrp_sales_order_updates

1930: arg_user_id,
1931: 'ENTITY',
1932: 'mrp_sales_order_updates',
1933: 'N');
1934: UPDATE mrp_sales_order_updates
1935: SET old_schedule_date = new_schedule_date,
1936: old_schedule_quantity = new_schedule_quantity,
1937: previous_customer_id = current_customer_id,
1938: previous_ship_id = current_ship_id,