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 884: | the sales order is already in MRP_SALES_ORDER_UPDATES |

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

Line 1038: 'mrp_sales_order_updates',

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

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

1042: 'Y');
1043:
1044: */
1045:
1046: LOCK TABLE mrp_sales_order_updates IN SHARE ROW EXCLUSIVE MODE;
1047:
1048:
1049: /*
1050: mrp_print_pk.stop_watch(arg_request_id,

Line 1063: 'mrp_sales_order_updates',

1059: var_watch_id := mrp_print_pk.start_watch('GEN-SELECTING',
1060: arg_request_id,
1061: arg_user_id,
1062: 'ENTITY',
1063: 'mrp_sales_order_updates',
1064: 'N');
1065: */
1066:
1067: LOOP

Line 1258: * mrp_sales_order_updates where the line

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

Line 1276: UPDATE mrp_sales_order_updates upd

1272: affect forecast consumption. */
1273:
1274: to_update := to_update + 1;
1275:
1276: UPDATE mrp_sales_order_updates upd
1277: SET
1278: last_update_date = SYSDATE,
1279: last_updated_by = arg_user_id,
1280: last_update_login = -1,

Line 1328: FROM mrp_sales_order_updates

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

Line 1340: INSERT INTO mrp_sales_order_updates

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

Line 1371: (mrp_sales_order_updates_s.nextval,

1367: previous_demand_class,
1368: ordered_item_id,
1369: completed_quantity)
1370: VALUES
1371: (mrp_sales_order_updates_s.nextval,
1372: SYSDATE,
1373: arg_user_id,
1374: SYSDATE,
1375: arg_user_id,

Line 1409: UPDATE mrp_sales_order_updates

1405:
1406: -- Need to update the record for the existing
1407: -- Org(s) to 0.
1408:
1409: UPDATE mrp_sales_order_updates
1410: SET
1411: last_update_date = SYSDATE,
1412: last_updated_by = arg_user_id,
1413: last_update_login = -1,

Line 1430: --update mrp_sales_order_updates

1426: END IF;
1427: -- Commented out the following update statement
1428: -- for the bug 2296197
1429:
1430: --update mrp_sales_order_updates
1431: -- set old_schedule_date=new_schedule_date,
1432: -- old_schedule_quantity=new_schedule_quantity,
1433: -- previous_customer_id = current_customer_id,
1434: -- previous_ship_id = current_ship_id,

Line 1442: INSERT INTO mrp_sales_order_updates

1438: end if;
1439:
1440:
1441: ELSIF var_dem_available_to_mrp = 'Y' THEN
1442: INSERT INTO mrp_sales_order_updates
1443: (update_seq_num ,
1444: last_update_date,
1445: last_updated_by,
1446: creation_date,

Line 1473: (mrp_sales_order_updates_s.nextval,

1469: previous_demand_class,
1470: ordered_item_id,
1471: completed_quantity)
1472: VALUES
1473: (mrp_sales_order_updates_s.nextval,
1474: SYSDATE,
1475: arg_user_id,
1476: SYSDATE,
1477: arg_user_id,

Line 1515: * then this update of mrp_sales_order_updates

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

Line 1532: UPDATE mrp_sales_order_updates upd

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

Line 1621: 'mrp_sales_order_updates',

1617: 'NUMBER',
1618: to_char(insert_count),
1619: 'N',
1620: 'TABLE',
1621: 'mrp_sales_order_updates',
1622: 'N');
1623:
1624: mrp_print_pk.stop_watch(arg_request_id,
1625: var_watch_id);

Line 1631: 'mrp_sales_order_updates',

1627: var_watch_id := mrp_print_pk.start_watch('GEN-updated',
1628: arg_request_id,
1629: arg_user_id,
1630: 'ENTITY',
1631: 'mrp_sales_order_updates',
1632: 'N');
1633:
1634: mrp_print_pk.stop_watch(arg_request_id,
1635: var_watch_id,

Line 1700: from mrp_sales_order_updates

1696: arg_user_id,
1697: SYSDATE,
1698: arg_user_id,
1699: -1
1700: from mrp_sales_order_updates
1701: where organization_id = var_org_id
1702: and process_status = 1
1703: and (new_schedule_date < var_min_cal_date
1704: or new_schedule_date > var_max_cal_date);

Line 1751: 'mrp_sales_order_updates',

1747: var_watch_id := mrp_print_pk.start_watch('GEN-updated',
1748: arg_request_id,
1749: arg_user_id,
1750: 'ENTITY',
1751: 'mrp_sales_order_updates',
1752: 'N');
1753: END IF;
1754: */
1755: UPDATE mrp_sales_order_updates upd

Line 1755: UPDATE mrp_sales_order_updates upd

1751: 'mrp_sales_order_updates',
1752: 'N');
1753: END IF;
1754: */
1755: UPDATE mrp_sales_order_updates upd
1756: SET old_schedule_date = GREATEST(var_min_cal_date,
1757: LEAST(var_max_cal_date, old_schedule_date)),
1758: new_schedule_date = GREATEST(var_min_cal_date,
1759: LEAST(var_max_cal_date, new_schedule_date)),

Line 1809: UPDATE mrp_sales_order_updates upd

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

Line 1858: mrp_sales_order_updates updates1

1854: SELECT demand.rowid,
1855: updates1.new_schedule_quantity,
1856: updates1.new_schedule_date
1857: FROM mtl_demand demand,
1858: mrp_sales_order_updates updates1
1859: WHERE updates1.sales_order_id = demand.demand_id
1860: AND updates1.request_id = arg_request_id
1861: AND updates1.process_status = 3
1862: AND updates1.error_message IS NULL

Line 1927: 'mrp_sales_order_updates',

1923: var_watch_id := mrp_print_pk.start_watch('GEN-updated',
1924: arg_request_id,
1925: arg_user_id,
1926: 'ENTITY',
1927: 'mrp_sales_order_updates',
1928: 'N');
1929: UPDATE mrp_sales_order_updates
1930: SET old_schedule_date = new_schedule_date,
1931: old_schedule_quantity = new_schedule_quantity,

Line 1929: UPDATE mrp_sales_order_updates

1925: arg_user_id,
1926: 'ENTITY',
1927: 'mrp_sales_order_updates',
1928: 'N');
1929: UPDATE mrp_sales_order_updates
1930: SET old_schedule_date = new_schedule_date,
1931: old_schedule_quantity = new_schedule_quantity,
1932: previous_customer_id = current_customer_id,
1933: previous_ship_id = current_ship_id,