DBA Data[Home] [Help]

APPS.MSC_ATP_PROC dependencies on MSC_SYSTEM_ITEMS

Line 998: -- BUG 2283260 Join to msc_system_items to only obtain sources

994:
995: IF PG_DEBUG in ('Y', 'C') THEN
996: msc_sch_wb.atp_debug('Atp_Sources: ' || 'ship_count >1 ');
997: END IF;
998: -- BUG 2283260 Join to msc_system_items to only obtain sources
999: -- which are valid for the item(s).
1000:
1001: -- Rewriting the dynamic SQL into static one for bug 2585710.
1002:

Line 1032: msc_system_items msi,

1028: msc_sourcing_rules msr,
1029: msc_sr_receipt_org receiptorg,
1030: msc_sr_source_org sourceorg,
1031: msc_sr_assignments msa,
1032: msc_system_items msi,
1033: msc_ship_set_temp msst
1034: WHERE
1035: msa.assignment_type = 3
1036: AND msa.assignment_set_id = p_assign_set_id

Line 1135: -- BUG 2283260 Join to msc_system_items to only obtain sources

1131: IF PG_DEBUG in ('Y', 'C') THEN
1132: msc_sch_wb.atp_debug('Atp_Sources: ' || 'Lookup for item-cat assignment failed.');
1133: msc_sch_wb.atp_debug('Atp_Sources: ' || 'Check on global-BOD level.');
1134: END IF;
1135: -- BUG 2283260 Join to msc_system_items to only obtain sources
1136: -- which are valid for the item(s).
1137: l_organization_id := p_organization_id; -- local var for testing
1138: IF PG_DEBUG in ('Y', 'C') THEN
1139: msc_sch_wb.atp_debug('Atp_Sources: ' || ' Org Id := ' || l_organization_id);

Line 1171: msc_system_items msi,

1167: msc_sourcing_rules msr,
1168: msc_sr_receipt_org receiptorg,
1169: msc_sr_source_org sourceorg,
1170: msc_sr_assignments msa,
1171: msc_system_items msi,
1172: msc_ship_set_temp msst
1173: WHERE
1174: msa.assignment_type = 1
1175: AND msa.assignment_set_id = p_assign_set_id

Line 1202: -- BUG 2283260 Join to msc_system_items to only obtain sources

1198: IF PG_DEBUG in ('Y', 'C') THEN
1199: msc_sch_wb.atp_debug('Atp_Sources: ' || 'Lookup for GLOBAL-BOD assignment failed.');
1200: msc_sch_wb.atp_debug('Atp_Sources: ' || 'Check on global level');
1201: END IF;
1202: -- BUG 2283260 Join to msc_system_items to only obtain sources
1203: -- which are valid for the item(s).
1204:
1205: -- Rewriting the SQL into a static one for bug 2585710.
1206: SELECT

Line 1235: msc_system_items msi,

1231: msc_sourcing_rules msr,
1232: msc_sr_receipt_org receiptorg,
1233: msc_sr_source_org sourceorg,
1234: msc_sr_assignments msa,
1235: msc_system_items msi,
1236: msc_ship_set_temp msst
1237: WHERE
1238: msa.assignment_type = 1
1239: AND msa.assignment_set_id = p_assign_set_id

Line 1264: -- BUG 2283260 Join to msc_system_items to only obtain sources

1260: IF PG_DEBUG in ('Y', 'C') THEN
1261: msc_sch_wb.atp_debug('Atp_Sources: ' || 'at item level');
1262: msc_sch_wb.atp_debug('Atp_Sources: ' || 'ITEM Inv item Id := ' || l_inv_item_id);
1263: END IF;
1264: -- BUG 2283260 Join to msc_system_items to only obtain sources
1265: -- which are valid for the item(s).
1266: SELECT NVL(SOURCE_ORG.SOURCE_ORGANIZATION_ID, -1),
1267: NVL(SOURCE_ORG.SOURCE_ORG_INSTANCE_ID,-1),
1268: NVL(SOURCE_ORG.SOURCE_PARTNER_ID, -1),

Line 1293: msc_system_items msi

1289: FROM msc_sourcing_rules msr,
1290: msc_sr_receipt_org receipt_org,
1291: msc_sr_source_org source_org,
1292: msc_sr_assignments msa,
1293: msc_system_items msi
1294: WHERE msa.assignment_type = 3 and
1295: msa.assignment_set_id = p_assign_set_id and
1296: msa.inventory_item_id = l_inv_item_id and
1297: msa.sourcing_rule_id = msr.sourcing_rule_id and

Line 1314: -- BUG 2283260 Note that join happens between msc_system_items(msi)

1310: NVL(source_org.circular_src, 'N') <> 'Y' AND
1311: msa.inventory_item_id = msi.inventory_item_id and
1312: msi.plan_id = -1
1313: ORDER BY rank asc, allocation_percent desc;
1314: -- BUG 2283260 Note that join happens between msc_system_items(msi)
1315: -- and msc_sr_source_org (src) for org, instance as in certain cases
1316: -- join with msc_sr_assignments (msa) will bring no rows.
1317: -- Filter on item in msc_system_items.
1318:

Line 1317: -- Filter on item in msc_system_items.

1313: ORDER BY rank asc, allocation_percent desc;
1314: -- BUG 2283260 Note that join happens between msc_system_items(msi)
1315: -- and msc_sr_source_org (src) for org, instance as in certain cases
1316: -- join with msc_sr_assignments (msa) will bring no rows.
1317: -- Filter on item in msc_system_items.
1318:
1319: IF PG_DEBUG in ('Y', 'C') THEN
1320: msc_sch_wb.atp_debug('Count after item level = '||x_atp_sources.organization_id.count);
1321: END IF;

Line 1388: -- BUG 2283260 Join to msc_system_items to only obtain sources

1384: IF PG_DEBUG in ('Y', 'C') THEN
1385: msc_sch_wb.atp_debug('Atp_Sources: ' || ' Org Id := ' || l_organization_id);
1386: END IF;
1387:
1388: -- BUG 2283260 Join to msc_system_items to only obtain sources
1389: -- which are valid for the item(s).
1390: SELECT NVL(SOURCE_ORG.SOURCE_ORGANIZATION_ID, -1),
1391: NVL(SOURCE_ORG.SOURCE_ORG_INSTANCE_ID,-1),
1392: NVL(SOURCE_ORG.SOURCE_PARTNER_ID, -1),

Line 1416: msc_system_items msi

1412: FROM msc_sourcing_rules msr,
1413: msc_sr_receipt_org receipt_org,
1414: msc_sr_source_org source_org,
1415: msc_sr_assignments msa,
1416: msc_system_items msi
1417: WHERE msa.assignment_type = 1 and
1418: msa.assignment_set_id = p_assign_set_id and
1419: ---msa.inventory_item_id = l_inv_item_id and
1420: msa.sourcing_rule_id = msr.sourcing_rule_id and

Line 1439: -- BUG 2283260 Note that join happens between msc_system_items(msi)

1435: NVL(source_org.circular_src, 'N') <> 'Y' AND
1436: msi.inventory_item_id = l_inv_item_id and
1437: msi.plan_id = -1
1438: ORDER BY rank asc, allocation_percent desc;
1439: -- BUG 2283260 Note that join happens between msc_system_items(msi)
1440: -- and msc_sr_source_org (src) for org, instance as in certain cases
1441: -- join with msc_sr_assignments (msa) will bring no rows.
1442: -- Filter on item in msc_system_items.
1443: END IF;

Line 1442: -- Filter on item in msc_system_items.

1438: ORDER BY rank asc, allocation_percent desc;
1439: -- BUG 2283260 Note that join happens between msc_system_items(msi)
1440: -- and msc_sr_source_org (src) for org, instance as in certain cases
1441: -- join with msc_sr_assignments (msa) will bring no rows.
1442: -- Filter on item in msc_system_items.
1443: END IF;
1444:
1445: IF (x_atp_sources.organization_id.count = 0) then
1446: IF PG_DEBUG in ('Y', 'C') THEN

Line 1450: -- BUG 2283260 Join to msc_system_items to only obtain sources

1446: IF PG_DEBUG in ('Y', 'C') THEN
1447: msc_sch_wb.atp_debug('Atp_Sources: ' || 'no sources on global_bod level. look at global level');
1448: END IF;
1449:
1450: -- BUG 2283260 Join to msc_system_items to only obtain sources
1451: -- which are valid for the item(s).
1452: SELECT NVL(SOURCE_ORG.SOURCE_ORGANIZATION_ID, -1),
1453: NVL(SOURCE_ORG.SOURCE_ORG_INSTANCE_ID,-1),
1454: NVL(SOURCE_ORG.SOURCE_PARTNER_ID, -1),

Line 1478: msc_system_items msi

1474: FROM msc_sourcing_rules msr,
1475: msc_sr_receipt_org receipt_org,
1476: msc_sr_source_org source_org,
1477: msc_sr_assignments msa,
1478: msc_system_items msi
1479: WHERE msa.assignment_type = 1 and
1480: msa.assignment_set_id = p_assign_set_id and
1481: ---msa.inventory_item_id = l_inv_item_id and
1482: msa.sourcing_rule_id = msr.sourcing_rule_id and

Line 1499: -- BUG 2283260 Note that join happens between msc_system_items(msi)

1495: NVL(source_org.circular_src, 'N') <> 'Y' AND
1496: msi.inventory_item_id = l_inv_item_id and
1497: msi.plan_id = -1
1498: ORDER BY rank asc, allocation_percent desc;
1499: -- BUG 2283260 Note that join happens between msc_system_items(msi)
1500: -- and msc_sr_source_org (src) for org, instance as in certain cases
1501: -- join with msc_sr_assignments (msa) will bring no rows.
1502: -- Filter on item in msc_system_items.
1503: END IF;

Line 1502: -- Filter on item in msc_system_items.

1498: ORDER BY rank asc, allocation_percent desc;
1499: -- BUG 2283260 Note that join happens between msc_system_items(msi)
1500: -- and msc_sr_source_org (src) for org, instance as in certain cases
1501: -- join with msc_sr_assignments (msa) will bring no rows.
1502: -- Filter on item in msc_system_items.
1503: END IF;
1504:
1505: END IF;
1506: FOR i in 1..x_atp_sources.Organization_Id.count Loop

Line 2149: instead of connecting to msc_system_items table

2145: msc_sch_wb.atp_debug('inv_primary_uom_conversion : ' || 'primary_uom_code - ' || MSC_ATP_PVT.G_ITEM_INFO_REC.uom_code);
2146: END IF;
2147: /* Tuned for performance bug 2484964 */
2148: /* 4192057: Use the item info available in G_item_ifo_rec
2149: instead of connecting to msc_system_items table
2150: SELECT items.uom_code,
2151: conversion_rate
2152: INTO x_primary_uom_code,
2153: x_conversion_rate

Line 2155: msc_system_items items

2151: conversion_rate
2152: INTO x_primary_uom_code,
2153: x_conversion_rate
2154: FROM msc_uom_conversions_view mucv,
2155: msc_system_items items
2156: WHERE items.sr_inventory_item_id = p_inventory_item_id
2157: AND items.organization_id = p_organization_id
2158: AND items.plan_id = -1
2159: AND items.sr_instance_id = p_instance_id

Line 2296: FROM msc_system_items

2292: IF p_parent_plan_id is not null then
2293: BEGIN
2294: SELECT plan_id
2295: INTO x_plan_info_rec.plan_id
2296: FROM msc_system_items
2297: WHERE sr_instance_id = p_instance_id
2298: AND organization_id = p_organization_id
2299: AND sr_inventory_item_id = p_inventory_item_id
2300: AND plan_id = p_parent_plan_id;

Line 2325: FROM msc_system_items mi,

2321: FROM msc_atp_rules
2322: WHERE sr_instance_id = p_instance_id
2323: AND rule_id IN (
2324: SELECT distinct NVL(mi.atp_rule_id, tp.default_atp_rule_id)
2325: FROM msc_system_items mi,
2326: msc_trading_partners tp
2327: WHERE mi.organization_id = tp.sr_tp_id
2328: AND mi.sr_instance_id = tp.sr_instance_id
2329: AND tp.partner_type = 3

Line 2971: FROM MSC_SYSTEM_ITEMS I,

2967: l_coproducts_rec.quantity
2968: FROM (SELECT MBC.inventory_item_id,
2969: ABS(NVL(MBC.usage_quantity,1) * p_assembly_qty/
2970: NVL(MB.assembly_quantity,1)) quantity
2971: FROM MSC_SYSTEM_ITEMS I,
2972: MSC_BOMS MB,
2973: MSC_BOM_COMPONENTS MBC,
2974: MSC_CALENDAR_DATES C,
2975: MSC_TRADING_PARTNERS TP

Line 4354: FROM msc_system_items i

4350: , p_item_attribute_rec.product_family_id -- time_phased_atp
4351: ---bug 3917625
4352: ,p_item_attribute_rec.plan_id
4353: , p_item_attribute_rec.lowest_level_src -- ATP4drp obtain flag applicable to DRP plan items.
4354: FROM msc_system_items i
4355: WHERE i.sr_inventory_item_id = p_inventory_item_id
4356: AND i.organization_id = p_organization_id
4357: --- bug 3917625: Read item attribute from planned data
4358: --AND i.plan_id = -1

Line 4769: FROM msc_system_items i

4765: msc_sch_wb.atp_debug('get_infinite_time_fence_date: ' || 'selecting item type for PDS');
4766: END IF;
4767: SELECT i.bom_item_type
4768: INTO l_item_type
4769: FROM msc_system_items i
4770: WHERE i.plan_id = p_plan_id
4771: AND i.sr_instance_id = p_instance_id
4772: AND i.organization_id = p_organization_id
4773: AND i.sr_inventory_item_id = p_inventory_item_id;

Line 4803: msc_system_items i

4799: FROM msc_calendar_dates c2,
4800: msc_calendar_dates c1,
4801: msc_atp_rules r,
4802: msc_trading_partners tp,
4803: msc_system_items i
4804: WHERE i.sr_inventory_item_id = p_inventory_item_id
4805: AND i.organization_id = p_organization_id
4806: --AND i.plan_id = p_plan_id
4807: AND i.plan_id = -1 -- for 1478110

Line 5577: MSC_SYSTEM_ITEMS ITEM,

5573: x_atp_sources.Lead_Time,
5574: x_atp_sources.Ship_Method,
5575: x_atp_sources.Sup_Cap_Type -- For supplier intransit LT project
5576: FROM
5577: MSC_SYSTEM_ITEMS ITEM,
5578: MSC_SR_SOURCE_ORG SOURCE_ORG,
5579: MSC_SR_RECEIPT_ORG RECEIPT_ORG,
5580: MSC_SOURCING_RULES MSR,
5581: MSC_SR_ASSIGNMENTS MSRA,

Line 5639: MSC_SYSTEM_ITEMS ITEM_INNER,

5635: -- Search for sources for which following expression is minimum
5636: SELECT NVL(MIN(2000 + ((10 - NVL(MRT_INNER.REGION_TYPE, 0)) * 10) + DECODE(MRT_INNER.ZONE_FLAG, 'Y', 1, 0)), 0)
5637: INTO l_min_region_value
5638: FROM
5639: MSC_SYSTEM_ITEMS ITEM_INNER,
5640: MSC_SR_SOURCE_ORG SOURCE_ORG_INNER,
5641: MSC_SR_RECEIPT_ORG RECEIPT_ORG_INNER,
5642: MSC_SOURCING_RULES MSR_INNER,
5643: MSC_SR_ASSIGNMENTS MSRA_INNER,

Line 5701: MSC_SYSTEM_ITEMS ITEM,

5697: x_atp_sources.Lead_Time,
5698: x_atp_sources.Ship_Method,
5699: x_atp_sources.Sup_Cap_Type -- For supplier intransit LT project
5700: FROM
5701: MSC_SYSTEM_ITEMS ITEM,
5702: MSC_SR_SOURCE_ORG SOURCE_ORG,
5703: MSC_SR_RECEIPT_ORG RECEIPT_ORG,
5704: MSC_SOURCING_RULES MSR,
5705: MSC_SR_ASSIGNMENTS MSRA,

Line 5867: MSC_SYSTEM_ITEMS ITEM,

5863: x_atp_sources.Lead_Time,
5864: x_atp_sources.Ship_Method,
5865: x_atp_sources.Sup_Cap_Type -- For supplier intransit LT project
5866: FROM
5867: MSC_SYSTEM_ITEMS ITEM,
5868: MSC_SR_SOURCE_ORG SOURCE_ORG,
5869: MSC_SR_RECEIPT_ORG RECEIPT_ORG,
5870: MSC_SOURCING_RULES MSR,
5871: -- MSC_TRADING_PARTNER_SITES TP,

Line 6156: MSC_SYSTEM_ITEMS ITEM,

6152: x_atp_sources.Lead_Time,
6153: x_atp_sources.Ship_Method,
6154: x_atp_sources.Sup_Cap_Type -- For supplier intransit LT project
6155: FROM
6156: MSC_SYSTEM_ITEMS ITEM,
6157: MSC_SR_SOURCE_ORG SOURCE_ORG,
6158: MSC_SR_RECEIPT_ORG RECEIPT_ORG,
6159: MSC_SOURCING_RULES MSR,
6160: MSC_SR_ASSIGNMENTS MSRA,

Line 6216: MSC_SYSTEM_ITEMS ITEM_INNER,

6212: -- Searching sources for min expression value
6213: SELECT NVL(MIN(8000 + ((10 - NVL(MRT_INNER.REGION_TYPE, 0)) * 100) + DECODE(MRT_INNER.ZONE_FLAG, 'Y', 1, 0)), 0)
6214: INTO l_min_region_value
6215: FROM
6216: MSC_SYSTEM_ITEMS ITEM_INNER,
6217: MSC_SR_SOURCE_ORG SOURCE_ORG_INNER,
6218: MSC_SR_RECEIPT_ORG RECEIPT_ORG_INNER,
6219: MSC_SOURCING_RULES MSR_INNER,
6220: MSC_SR_ASSIGNMENTS MSRA_INNER,

Line 6277: MSC_SYSTEM_ITEMS ITEM,

6273: x_atp_sources.Lead_Time,
6274: x_atp_sources.Ship_Method,
6275: x_atp_sources.Sup_Cap_Type -- For supplier intransit LT project
6276: FROM
6277: MSC_SYSTEM_ITEMS ITEM,
6278: MSC_SR_SOURCE_ORG SOURCE_ORG,
6279: MSC_SR_RECEIPT_ORG RECEIPT_ORG,
6280: MSC_SOURCING_RULES MSR,
6281: MSC_SR_ASSIGNMENTS MSRA,

Line 6359: MSC_SYSTEM_ITEMS ITEM,

6355: x_atp_sources.Lead_Time,
6356: x_atp_sources.Ship_Method,
6357: x_atp_sources.Sup_Cap_Type -- For supplier intransit LT project
6358: FROM
6359: MSC_SYSTEM_ITEMS ITEM,
6360: -- MSC_TRADING_PARTNER_SITES TP,
6361: MSC_SR_SOURCE_ORG SOURCE_ORG,
6362: MSC_SR_RECEIPT_ORG RECEIPT_ORG,
6363: MSC_SOURCING_RULES MSR,

Line 6450: MSC_SYSTEM_ITEMS ITEM,

6446: 0,
6447: -1,
6448: '@@@'
6449: FROM
6450: MSC_SYSTEM_ITEMS ITEM,
6451: MSC_SR_SOURCE_ORG SOURCE_ORG,
6452: MSC_SR_RECEIPT_ORG RECEIPT_ORG,
6453: MSC_SOURCING_RULES MSR,
6454: MSC_SR_ASSIGNMENTS MSRA,

Line 6586: MSC_SYSTEM_ITEMS ITEM_INNER,

6582: BULK COLLECT INTO
6583: l_inventory_item_id_arr,
6584: l_min_region_value_arr
6585: FROM
6586: MSC_SYSTEM_ITEMS ITEM_INNER,
6587: MSC_SR_SOURCE_ORG SOURCE_ORG_INNER,
6588: MSC_SR_RECEIPT_ORG RECEIPT_ORG_INNER,
6589: MSC_SOURCING_RULES MSR_INNER,
6590: MSC_SR_ASSIGNMENTS MSRA_INNER,

Line 6660: MSC_SYSTEM_ITEMS ITEM,

6656: 0,
6657: -1,
6658: '@@@'
6659: FROM
6660: MSC_SYSTEM_ITEMS ITEM,
6661: MSC_SR_SOURCE_ORG SOURCE_ORG,
6662: MSC_SR_RECEIPT_ORG RECEIPT_ORG,
6663: MSC_SOURCING_RULES MSR,
6664: MSC_SR_ASSIGNMENTS MSRA,

Line 6942: MSC_SYSTEM_ITEMS ITEM,

6938: 0,
6939: -1,
6940: '@@@'
6941: FROM
6942: MSC_SYSTEM_ITEMS ITEM,
6943: -- MSC_TRADING_PARTNER_SITES TP,
6944: MSC_SR_SOURCE_ORG SOURCE_ORG,
6945: MSC_SR_RECEIPT_ORG RECEIPT_ORG,
6946: MSC_SOURCING_RULES MSR,

Line 7418: MSC_SYSTEM_ITEMS ITEM,

7414: 0,
7415: -1,
7416: '@@@'
7417: FROM
7418: MSC_SYSTEM_ITEMS ITEM,
7419: MSC_SR_SOURCE_ORG SOURCE_ORG,
7420: MSC_SR_RECEIPT_ORG RECEIPT_ORG,
7421: MSC_SOURCING_RULES MSR,
7422: MSC_SR_ASSIGNMENTS MSRA,

Line 7551: MSC_SYSTEM_ITEMS ITEM_INNER,

7547: BULK COLLECT INTO
7548: l_inventory_item_id_arr,
7549: l_min_region_value_arr
7550: FROM
7551: MSC_SYSTEM_ITEMS ITEM_INNER,
7552: MSC_SR_SOURCE_ORG SOURCE_ORG_INNER,
7553: MSC_SR_RECEIPT_ORG RECEIPT_ORG_INNER,
7554: MSC_SOURCING_RULES MSR_INNER,
7555: MSC_SR_ASSIGNMENTS MSRA_INNER,

Line 7622: MSC_SYSTEM_ITEMS ITEM,

7618: 0,
7619: -1,
7620: '@@@'
7621: FROM
7622: MSC_SYSTEM_ITEMS ITEM,
7623: MSC_SR_SOURCE_ORG SOURCE_ORG,
7624: MSC_SR_RECEIPT_ORG RECEIPT_ORG,
7625: MSC_SOURCING_RULES MSR,
7626: MSC_SR_ASSIGNMENTS MSRA,

Line 7746: MSC_SYSTEM_ITEMS ITEM,

7742: 0,
7743: -1,
7744: '@@@'
7745: FROM
7746: MSC_SYSTEM_ITEMS ITEM,
7747: -- MSC_TRADING_PARTNER_SITES TP,
7748: MSC_SR_SOURCE_ORG SOURCE_ORG,
7749: MSC_SR_RECEIPT_ORG RECEIPT_ORG,
7750: MSC_SOURCING_RULES MSR,