DBA Data[Home] [Help]

APPS.CTO_OSS_SOURCE_PK dependencies on MRP_SR_ASSIGNMENTS

Line 290: delete from mrp_sr_assignments

286: is
287: pragma autonomous_transaction;
288: begin
289:
290: delete from mrp_sr_assignments
291: where assignment_set_id = G_def_assg_set
292: and inventory_item_id = p_config_id;
293:
294: If PG_DEBUG <> 0 Then

Line 510: from mrp_sr_assignments assg,

506: and msi.organization_id = bcol.ship_from_org_id
507: and msi.option_specific_sourced is not null
508: and bcol.ship_from_org_id in
509: (select assg.organization_id
510: from mrp_sr_assignments assg,
511: mrp_sr_receipt_org rcv,
512: mrp_sr_source_org src
513: where assg.inventory_item_id = bcol.config_item_id
514: and assg.sourcing_rule_id = rcv.sourcing_rule_id

Line 520: from mrp_sr_assignments assg,

516: and nvl(rcv.disable_date,sysdate+1)>sysdate
517: and rcv.SR_RECEIPT_ID = src.sr_receipt_id
518: union
519: select src.source_organization_id
520: from mrp_sr_assignments assg,
521: mrp_sr_receipt_org rcv,
522: mrp_sr_source_org src
523: where assg.inventory_item_id = bcol.config_item_id
524: and assg.sourcing_rule_id = rcv.sourcing_rule_id

Line 554: from mrp_sr_assignments assg,

550: and msi.organization_id = bcol.ship_from_org_id
551: and msi.option_specific_sourced is not null
552: and bcol.ship_from_org_id in
553: (select assg.organization_id org_id
554: from mrp_sr_assignments assg,
555: mrp_sr_receipt_org rcv,
556: mrp_sr_source_org src
557: where assg.inventory_item_id = bcol.config_item_id
558: and assg.sourcing_rule_id = rcv.sourcing_rule_id

Line 565: from mrp_sr_assignments assg,

561: and rcv.SR_RECEIPT_ID = src.sr_receipt_id
562: and src.source_type in (2,3)
563: union
564: select src.source_organization_id org_id
565: from mrp_sr_assignments assg,
566: mrp_sr_receipt_org rcv,
567: mrp_sr_source_org src
568: where assg.inventory_item_id = bcol.config_item_id
569: and assg.sourcing_rule_id = rcv.sourcing_rule_id

Line 575: from mrp_sr_assignments assg,

571: and nvl(rcv.disable_date,sysdate+1)>sysdate
572: and rcv.SR_RECEIPT_ID = src.sr_receipt_id
573: and src.source_organization_id not in
574: (Select assg.organization_id
575: from mrp_sr_assignments assg,
576: mrp_sr_receipt_org rcv,
577: mrp_sr_source_org src
578: Where assg.inventory_item_id = bcol.config_item_id
579: and assg.sourcing_rule_id = rcv.sourcing_rule_id

Line 1995: mrp_sr_assignments src_asg

1991: src_asg.ship_to_site_id ship_to_site_id,
1992: src_asg.sourcing_rule_type sourcing_rule_type,
1993: src_asg.sourcing_rule_id sourcing_rule_id
1994: from bom_cto_oss_source_gt oss_src,
1995: mrp_sr_assignments src_asg
1996: where oss_src.line_id = p_line_id
1997: and nvl(oss_src.reuse_flag,'Y') = 'N'
1998: and valid_flag = 'P'
1999: and src_asg.assignment_id = oss_src.assignment_id

Line 2001: from mrp_sr_assignments src_asg1

1997: and nvl(oss_src.reuse_flag,'Y') = 'N'
1998: and valid_flag = 'P'
1999: and src_asg.assignment_id = oss_src.assignment_id
2000: and nvl(src_asg.organization_id,-1) not in (select nvl(organization_id,-1)
2001: from mrp_sr_assignments src_asg1
2002: where inventory_item_id = p_config_item_id
2003: and assignment_set_id = G_def_assg_set)
2004:
2005:

Line 2046: (SELECT /*+ INDEX (msa MRP_SR_ASSIGNMENTS_N3) */ 1

2042: AND leaf_node = 'Y'
2043: AND assignment_id IS NULL
2044: AND RCV_ORG_ID IS NOT NULL
2045: AND NOT EXISTS
2046: (SELECT /*+ INDEX (msa MRP_SR_ASSIGNMENTS_N3) */ 1
2047: FROM MRP_SR_ASSIGNMENTS msa
2048: WHERE INVENTORY_ITEM_ID = p_config_item_id
2049: AND ASSIGNMENT_SET_ID = G_def_assg_set
2050: AND ORGANIZATION_ID = RCV_ORG_ID

Line 2047: FROM MRP_SR_ASSIGNMENTS msa

2043: AND assignment_id IS NULL
2044: AND RCV_ORG_ID IS NOT NULL
2045: AND NOT EXISTS
2046: (SELECT /*+ INDEX (msa MRP_SR_ASSIGNMENTS_N3) */ 1
2047: FROM MRP_SR_ASSIGNMENTS msa
2048: WHERE INVENTORY_ITEM_ID = p_config_item_id
2049: AND ASSIGNMENT_SET_ID = G_def_assg_set
2050: AND ORGANIZATION_ID = RCV_ORG_ID
2051: AND Rownum = 1

Line 2075: (SELECT /*+ INDEX (msa MRP_SR_ASSIGNMENTS_N3) */ 1

2071: and VALID_FLAG = 'P'
2072: and NVL(REUSE_FLAG,'Y') = 'Y'
2073: and RCV_ORG_ID IS NOT NULL
2074: and NOT EXISTS
2075: (SELECT /*+ INDEX (msa MRP_SR_ASSIGNMENTS_N3) */ 1
2076: FROM MRP_SR_ASSIGNMENTS msa
2077: WHERE INVENTORY_ITEM_ID = p_config_item_id
2078: AND ASSIGNMENT_SET_ID = G_def_assg_set
2079: AND ORGANIZATION_ID = RCV_ORG_ID

Line 2076: FROM MRP_SR_ASSIGNMENTS msa

2072: and NVL(REUSE_FLAG,'Y') = 'Y'
2073: and RCV_ORG_ID IS NOT NULL
2074: and NOT EXISTS
2075: (SELECT /*+ INDEX (msa MRP_SR_ASSIGNMENTS_N3) */ 1
2076: FROM MRP_SR_ASSIGNMENTS msa
2077: WHERE INVENTORY_ITEM_ID = p_config_item_id
2078: AND ASSIGNMENT_SET_ID = G_def_assg_set
2079: AND ORGANIZATION_ID = RCV_ORG_ID
2080: AND Rownum = 1

Line 3126: -- a full table scan on MRP_SR_ASSIGNMENTS and consequent

3122: --
3123: -- bug 6617686
3124: -- The MRP API uses a ASSIGNMENT_ID = p_Assignment_Id OR
3125: -- ASSIGNMENT_SET_ID = p_Assignment_Set_Id that leads to
3126: -- a full table scan on MRP_SR_ASSIGNMENTS and consequent
3127: -- performance issues. Since CTO does not pass ASSIGNMENT_SET_ID
3128: -- into the procedure, it is performance effective to directly
3129: -- query the MRP table
3130: -- ntungare

Line 3208: FROM MRP_SR_ASSIGNMENTS

3204: , lAssignmentRec.SECONDARY_INVENTORY
3205: , lAssignmentRec.SHIP_TO_SITE_ID
3206: , lAssignmentRec.SOURCING_RULE_ID
3207: , lAssignmentRec.SOURCING_RULE_TYPE
3208: FROM MRP_SR_ASSIGNMENTS
3209: WHERE ASSIGNMENT_ID = oss_reused_assg_rec.assignment_id;
3210:
3211: If PG_DEBUG <> 0 Then
3212: oe_debug_pub.add(lpad(' ',g_pg_level)||'CREATE_OSS_SOURCING_RULES: Loading the assignment into assignment record ',5);

Line 4610: mrp_sr_assignments assg,

4606: vend.VENDOR_SITE_CODE
4607:
4608: from mrp_sr_receipt_org rcv,
4609: mrp_sr_source_org src,
4610: mrp_sr_assignments assg,
4611: bom_cto_order_lines_gt bcol,
4612: mtl_system_items msi,
4613: ap_supplier_sites_all vend
4614:

Line 4631: from mrp_sr_assignments

4627: and nvl(rcv.disable_date,sysdate+1)>sysdate
4628: and rcv.SR_RECEIPT_ID = src.sr_receipt_id
4629: and src.vendor_site_id = vend.vendor_site_id(+)
4630: and not exists (select 'X'
4631: from mrp_sr_assignments
4632: where inventory_item_id = bcol.config_item_id
4633: and organization_id is null
4634: and msi.option_specific_sourced = 3)
4635: UNION

Line 4644: from mrp_sr_assignments assg,

4640: assg.organization_id,
4641: to_number(null), --3894241
4642: null
4643:
4644: from mrp_sr_assignments assg,
4645: bom_cto_order_lines_gt bcol,
4646: mtl_system_items msi
4647:
4648: where

Line 4659: from mrp_sr_assignments

4655: and assg.assignment_set_id = p_assignment_id
4656: and assg.customer_id is null
4657: and assg.inventory_item_id = msi.inventory_item_id
4658: and not exists (select 'X'
4659: from mrp_sr_assignments
4660: where inventory_item_id = bcol.config_item_id
4661: and organization_id is null
4662: and msi.option_specific_sourced = 3)
4663:

Line 4675: mrp_sr_assignments assg,

4671: vend.VENDOR_SITE_CODE
4672:
4673: from mrp_sr_receipt_org rcv,
4674: mrp_sr_source_org src,
4675: mrp_sr_assignments assg,
4676: bom_cto_order_lines_gt bcol,
4677: mtl_system_items msi,
4678: ap_supplier_sites_all vend
4679:

Line 4698: from mrp_sr_assignments

4694: and nvl(rcv.disable_date,sysdate+1)>sysdate
4695: and rcv.SR_RECEIPT_ID = src.sr_receipt_id
4696: and src.vendor_site_id = vend.vendor_site_id(+)
4697: and not exists (select 'X'
4698: from mrp_sr_assignments
4699: where inventory_item_id = bcol.config_item_id
4700: and organization_id is null
4701: and msi.option_specific_sourced = 3)
4702:

Line 4712: from mrp_sr_assignments assg,

4708: assg.organization_id,
4709: to_number(null),--bugfix3894241
4710: null
4711:
4712: from mrp_sr_assignments assg,
4713: bom_cto_order_lines_gt bcol,
4714: mtl_system_items msi
4715:
4716: where

Line 4730: from mrp_sr_assignments

4726: and assg.assignment_set_id = p_assignment_id
4727: and assg.customer_id is null
4728: and assg.inventory_item_id = msi.inventory_item_id
4729: and not exists (select 'X'
4730: from mrp_sr_assignments
4731: where inventory_item_id = bcol.config_item_id
4732: and organization_id is null
4733: and msi.option_specific_sourced = 3);
4734:

Line 5235: mrp_sr_assignments assg,

5231:
5232: from
5233: mrp_sr_receipt_org rcv,
5234: mrp_sr_source_org src,
5235: mrp_sr_assignments assg,
5236: mrp_sourcing_rules rule,
5237: po_vendor_sites_all vend,
5238: bom_cto_order_lines_gt bcol
5239: where

Line 5304: mrp_sr_assignments assg,

5300:
5301: from
5302: mrp_sr_receipt_org rcv,
5303: mrp_sr_source_org src,
5304: mrp_sr_assignments assg,
5305: mrp_sourcing_rules rule,
5306: po_vendor_sites_all vend,
5307: bom_cto_order_lines_gt bcol
5308: where

Line 5373: mrp_sr_assignments assg,

5369:
5370: from
5371: mrp_sr_receipt_org rcv,
5372: mrp_sr_source_org src,
5373: mrp_sr_assignments assg,
5374: mrp_sourcing_rules rule,
5375: po_vendor_sites_all vend
5376: where
5377: assg.assignment_set_id = g_def_assg_set

Line 5994: mrp_sr_assignments assg,

5990:
5991: from
5992: mrp_sr_receipt_org rcv,
5993: mrp_sr_source_org src,
5994: mrp_sr_assignments assg,
5995: mrp_sourcing_rules rule,
5996: po_vendor_sites_all vend
5997: where
5998: assg.assignment_set_id = g_def_assg_set

Line 6059: mrp_sr_assignments assg,

6055:
6056: from
6057: mrp_sr_receipt_org rcv,
6058: mrp_sr_source_org src,
6059: mrp_sr_assignments assg,
6060: mrp_sourcing_rules rule,
6061: po_vendor_sites_all vend,
6062: bom_cto_order_lines_gt bcol
6063: where

Line 6146: mrp_sr_assignments assg,

6142:
6143: from
6144: mrp_sr_receipt_org rcv,
6145: mrp_sr_source_org src,
6146: mrp_sr_assignments assg,
6147: mrp_sourcing_rules rule,
6148: po_vendor_sites_all vend,
6149: bom_cto_order_lines_gt bcol
6150: where