DBA Data[Home] [Help]

APPS.MSC_ATP_PROC dependencies on MSC_SYSTEM_ITEMS

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

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

Line 1031: msc_system_items msi,

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

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

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

Line 1170: msc_system_items msi,

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

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

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

Line 1234: msc_system_items msi,

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

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

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

Line 1292: msc_system_items msi

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

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

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

Line 1316: -- Filter on item in msc_system_items.

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

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

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

Line 1415: msc_system_items msi

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

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

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

Line 1441: -- Filter on item in msc_system_items.

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

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

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

Line 1477: msc_system_items msi

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

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

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

Line 1501: -- Filter on item in msc_system_items.

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

Line 2148: instead of connecting to msc_system_items table

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

Line 2154: msc_system_items items

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

Line 2295: FROM msc_system_items

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

Line 2324: FROM msc_system_items mi,

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

Line 2963: FROM MSC_SYSTEM_ITEMS I,

2959: l_coproducts_rec.quantity
2960: FROM (SELECT MBC.inventory_item_id,
2961: ABS(NVL(MBC.usage_quantity,1) * p_assembly_qty/
2962: NVL(MB.assembly_quantity,1)) quantity
2963: FROM MSC_SYSTEM_ITEMS I,
2964: MSC_BOMS MB,
2965: MSC_BOM_COMPONENTS MBC,
2966: MSC_CALENDAR_DATES C,
2967: MSC_TRADING_PARTNERS TP

Line 4345: FROM msc_system_items i

4341: , p_item_attribute_rec.product_family_id -- time_phased_atp
4342: ---bug 3917625
4343: ,p_item_attribute_rec.plan_id
4344: , p_item_attribute_rec.lowest_level_src -- ATP4drp obtain flag applicable to DRP plan items.
4345: FROM msc_system_items i
4346: WHERE i.sr_inventory_item_id = p_inventory_item_id
4347: AND i.organization_id = p_organization_id
4348: --- bug 3917625: Read item attribute from planned data
4349: --AND i.plan_id = -1

Line 4760: FROM msc_system_items i

4756: msc_sch_wb.atp_debug('get_infinite_time_fence_date: ' || 'selecting item type for PDS');
4757: END IF;
4758: SELECT i.bom_item_type
4759: INTO l_item_type
4760: FROM msc_system_items i
4761: WHERE i.plan_id = p_plan_id
4762: AND i.sr_instance_id = p_instance_id
4763: AND i.organization_id = p_organization_id
4764: AND i.sr_inventory_item_id = p_inventory_item_id;

Line 4794: msc_system_items i

4790: FROM msc_calendar_dates c2,
4791: msc_calendar_dates c1,
4792: msc_atp_rules r,
4793: msc_trading_partners tp,
4794: msc_system_items i
4795: WHERE i.sr_inventory_item_id = p_inventory_item_id
4796: AND i.organization_id = p_organization_id
4797: --AND i.plan_id = p_plan_id
4798: AND i.plan_id = -1 -- for 1478110

Line 5566: MSC_SYSTEM_ITEMS ITEM,

5562: x_atp_sources.Lead_Time,
5563: x_atp_sources.Ship_Method,
5564: x_atp_sources.Sup_Cap_Type -- For supplier intransit LT project
5565: FROM
5566: MSC_SYSTEM_ITEMS ITEM,
5567: MSC_SR_SOURCE_ORG SOURCE_ORG,
5568: MSC_SR_RECEIPT_ORG RECEIPT_ORG,
5569: MSC_SOURCING_RULES MSR,
5570: MSC_SR_ASSIGNMENTS MSRA,

Line 5628: MSC_SYSTEM_ITEMS ITEM_INNER,

5624: -- Search for sources for which following expression is minimum
5625: SELECT NVL(MIN(2000 + ((10 - NVL(MRT_INNER.REGION_TYPE, 0)) * 10) + DECODE(MRT_INNER.ZONE_FLAG, 'Y', 1, 0)), 0)
5626: INTO l_min_region_value
5627: FROM
5628: MSC_SYSTEM_ITEMS ITEM_INNER,
5629: MSC_SR_SOURCE_ORG SOURCE_ORG_INNER,
5630: MSC_SR_RECEIPT_ORG RECEIPT_ORG_INNER,
5631: MSC_SOURCING_RULES MSR_INNER,
5632: MSC_SR_ASSIGNMENTS MSRA_INNER,

Line 5690: MSC_SYSTEM_ITEMS ITEM,

5686: x_atp_sources.Lead_Time,
5687: x_atp_sources.Ship_Method,
5688: x_atp_sources.Sup_Cap_Type -- For supplier intransit LT project
5689: FROM
5690: MSC_SYSTEM_ITEMS ITEM,
5691: MSC_SR_SOURCE_ORG SOURCE_ORG,
5692: MSC_SR_RECEIPT_ORG RECEIPT_ORG,
5693: MSC_SOURCING_RULES MSR,
5694: MSC_SR_ASSIGNMENTS MSRA,

Line 5856: MSC_SYSTEM_ITEMS ITEM,

5852: x_atp_sources.Lead_Time,
5853: x_atp_sources.Ship_Method,
5854: x_atp_sources.Sup_Cap_Type -- For supplier intransit LT project
5855: FROM
5856: MSC_SYSTEM_ITEMS ITEM,
5857: MSC_SR_SOURCE_ORG SOURCE_ORG,
5858: MSC_SR_RECEIPT_ORG RECEIPT_ORG,
5859: MSC_SOURCING_RULES MSR,
5860: -- MSC_TRADING_PARTNER_SITES TP,

Line 6145: MSC_SYSTEM_ITEMS ITEM,

6141: x_atp_sources.Lead_Time,
6142: x_atp_sources.Ship_Method,
6143: x_atp_sources.Sup_Cap_Type -- For supplier intransit LT project
6144: FROM
6145: MSC_SYSTEM_ITEMS ITEM,
6146: MSC_SR_SOURCE_ORG SOURCE_ORG,
6147: MSC_SR_RECEIPT_ORG RECEIPT_ORG,
6148: MSC_SOURCING_RULES MSR,
6149: MSC_SR_ASSIGNMENTS MSRA,

Line 6205: MSC_SYSTEM_ITEMS ITEM_INNER,

6201: -- Searching sources for min expression value
6202: SELECT NVL(MIN(8000 + ((10 - NVL(MRT_INNER.REGION_TYPE, 0)) * 100) + DECODE(MRT_INNER.ZONE_FLAG, 'Y', 1, 0)), 0)
6203: INTO l_min_region_value
6204: FROM
6205: MSC_SYSTEM_ITEMS ITEM_INNER,
6206: MSC_SR_SOURCE_ORG SOURCE_ORG_INNER,
6207: MSC_SR_RECEIPT_ORG RECEIPT_ORG_INNER,
6208: MSC_SOURCING_RULES MSR_INNER,
6209: MSC_SR_ASSIGNMENTS MSRA_INNER,

Line 6266: MSC_SYSTEM_ITEMS ITEM,

6262: x_atp_sources.Lead_Time,
6263: x_atp_sources.Ship_Method,
6264: x_atp_sources.Sup_Cap_Type -- For supplier intransit LT project
6265: FROM
6266: MSC_SYSTEM_ITEMS ITEM,
6267: MSC_SR_SOURCE_ORG SOURCE_ORG,
6268: MSC_SR_RECEIPT_ORG RECEIPT_ORG,
6269: MSC_SOURCING_RULES MSR,
6270: MSC_SR_ASSIGNMENTS MSRA,

Line 6348: MSC_SYSTEM_ITEMS ITEM,

6344: x_atp_sources.Lead_Time,
6345: x_atp_sources.Ship_Method,
6346: x_atp_sources.Sup_Cap_Type -- For supplier intransit LT project
6347: FROM
6348: MSC_SYSTEM_ITEMS ITEM,
6349: -- MSC_TRADING_PARTNER_SITES TP,
6350: MSC_SR_SOURCE_ORG SOURCE_ORG,
6351: MSC_SR_RECEIPT_ORG RECEIPT_ORG,
6352: MSC_SOURCING_RULES MSR,

Line 6439: MSC_SYSTEM_ITEMS ITEM,

6435: 0,
6436: -1,
6437: '@@@'
6438: FROM
6439: MSC_SYSTEM_ITEMS ITEM,
6440: MSC_SR_SOURCE_ORG SOURCE_ORG,
6441: MSC_SR_RECEIPT_ORG RECEIPT_ORG,
6442: MSC_SOURCING_RULES MSR,
6443: MSC_SR_ASSIGNMENTS MSRA,

Line 6575: MSC_SYSTEM_ITEMS ITEM_INNER,

6571: BULK COLLECT INTO
6572: l_inventory_item_id_arr,
6573: l_min_region_value_arr
6574: FROM
6575: MSC_SYSTEM_ITEMS ITEM_INNER,
6576: MSC_SR_SOURCE_ORG SOURCE_ORG_INNER,
6577: MSC_SR_RECEIPT_ORG RECEIPT_ORG_INNER,
6578: MSC_SOURCING_RULES MSR_INNER,
6579: MSC_SR_ASSIGNMENTS MSRA_INNER,

Line 6649: MSC_SYSTEM_ITEMS ITEM,

6645: 0,
6646: -1,
6647: '@@@'
6648: FROM
6649: MSC_SYSTEM_ITEMS ITEM,
6650: MSC_SR_SOURCE_ORG SOURCE_ORG,
6651: MSC_SR_RECEIPT_ORG RECEIPT_ORG,
6652: MSC_SOURCING_RULES MSR,
6653: MSC_SR_ASSIGNMENTS MSRA,

Line 6931: MSC_SYSTEM_ITEMS ITEM,

6927: 0,
6928: -1,
6929: '@@@'
6930: FROM
6931: MSC_SYSTEM_ITEMS ITEM,
6932: -- MSC_TRADING_PARTNER_SITES TP,
6933: MSC_SR_SOURCE_ORG SOURCE_ORG,
6934: MSC_SR_RECEIPT_ORG RECEIPT_ORG,
6935: MSC_SOURCING_RULES MSR,

Line 7407: MSC_SYSTEM_ITEMS ITEM,

7403: 0,
7404: -1,
7405: '@@@'
7406: FROM
7407: MSC_SYSTEM_ITEMS ITEM,
7408: MSC_SR_SOURCE_ORG SOURCE_ORG,
7409: MSC_SR_RECEIPT_ORG RECEIPT_ORG,
7410: MSC_SOURCING_RULES MSR,
7411: MSC_SR_ASSIGNMENTS MSRA,

Line 7540: MSC_SYSTEM_ITEMS ITEM_INNER,

7536: BULK COLLECT INTO
7537: l_inventory_item_id_arr,
7538: l_min_region_value_arr
7539: FROM
7540: MSC_SYSTEM_ITEMS ITEM_INNER,
7541: MSC_SR_SOURCE_ORG SOURCE_ORG_INNER,
7542: MSC_SR_RECEIPT_ORG RECEIPT_ORG_INNER,
7543: MSC_SOURCING_RULES MSR_INNER,
7544: MSC_SR_ASSIGNMENTS MSRA_INNER,

Line 7611: MSC_SYSTEM_ITEMS ITEM,

7607: 0,
7608: -1,
7609: '@@@'
7610: FROM
7611: MSC_SYSTEM_ITEMS ITEM,
7612: MSC_SR_SOURCE_ORG SOURCE_ORG,
7613: MSC_SR_RECEIPT_ORG RECEIPT_ORG,
7614: MSC_SOURCING_RULES MSR,
7615: MSC_SR_ASSIGNMENTS MSRA,

Line 7735: MSC_SYSTEM_ITEMS ITEM,

7731: 0,
7732: -1,
7733: '@@@'
7734: FROM
7735: MSC_SYSTEM_ITEMS ITEM,
7736: -- MSC_TRADING_PARTNER_SITES TP,
7737: MSC_SR_SOURCE_ORG SOURCE_ORG,
7738: MSC_SR_RECEIPT_ORG RECEIPT_ORG,
7739: MSC_SOURCING_RULES MSR,