DBA Data[Home] [Help]

APPS.CTO_MSUTIL_PUB dependencies on MRP_SR_ASSIGNMENTS

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

3005: --
3006: -- bug 6617686
3007: -- The MRP API uses a ASSIGNMENT_ID = p_Assignment_Id OR
3008: -- ASSIGNMENT_SET_ID = p_Assignment_Set_Id that leads to
3009: -- a full table scan on MRP_SR_ASSIGNMENTS and consequent
3010: -- performance issues. Since CTO does not pass ASSIGNMENT_SET_ID
3011: -- into the procedure, it is performance effective to directly
3012: -- query the MRP table
3013: -- ntungare

Line 3094: FROM MRP_SR_ASSIGNMENTS

3090: , lAssignmentRec.SECONDARY_INVENTORY
3091: , lAssignmentRec.SHIP_TO_SITE_ID
3092: , lAssignmentRec.SOURCING_RULE_ID
3093: , lAssignmentRec.SOURCING_RULE_TYPE
3094: FROM MRP_SR_ASSIGNMENTS
3095: WHERE ASSIGNMENT_ID = lAssignmentId;*/
3096:
3097: /*-------------------
3098: bug 8789722

Line 3177: FROM MRP_SR_ASSIGNMENTS A

3173: , lAssignmentRec.SECONDARY_INVENTORY
3174: , lAssignmentRec.SHIP_TO_SITE_ID
3175: , lAssignmentRec.SOURCING_RULE_ID
3176: , lAssignmentRec.SOURCING_RULE_TYPE
3177: FROM MRP_SR_ASSIGNMENTS A
3178: WHERE ASSIGNMENT_ID = lAssignmentId
3179: AND NOT EXISTS(SELECT /*+ INDEX(B MRP_SR_ASSIGNMENTS_U2)*/ 1
3180: FROM MRP_SR_ASSIGNMENTS B
3181: --Bugfix 14270815: Checking for the config assignment in lUPGAssignmentSet also.

Line 3179: AND NOT EXISTS(SELECT /*+ INDEX(B MRP_SR_ASSIGNMENTS_U2)*/ 1

3175: , lAssignmentRec.SOURCING_RULE_ID
3176: , lAssignmentRec.SOURCING_RULE_TYPE
3177: FROM MRP_SR_ASSIGNMENTS A
3178: WHERE ASSIGNMENT_ID = lAssignmentId
3179: AND NOT EXISTS(SELECT /*+ INDEX(B MRP_SR_ASSIGNMENTS_U2)*/ 1
3180: FROM MRP_SR_ASSIGNMENTS B
3181: --Bugfix 14270815: Checking for the config assignment in lUPGAssignmentSet also.
3182: --WHERE a.assignment_set_id = b.assignment_set_id and
3183: WHERE (a.assignment_set_id = b.assignment_set_id or

Line 3180: FROM MRP_SR_ASSIGNMENTS B

3176: , lAssignmentRec.SOURCING_RULE_TYPE
3177: FROM MRP_SR_ASSIGNMENTS A
3178: WHERE ASSIGNMENT_ID = lAssignmentId
3179: AND NOT EXISTS(SELECT /*+ INDEX(B MRP_SR_ASSIGNMENTS_U2)*/ 1
3180: FROM MRP_SR_ASSIGNMENTS B
3181: --Bugfix 14270815: Checking for the config assignment in lUPGAssignmentSet also.
3182: --WHERE a.assignment_set_id = b.assignment_set_id and
3183: WHERE (a.assignment_set_id = b.assignment_set_id or
3184: b.assignment_set_id = lUPGAssignmentSet) and

Line 3268: FROM MRP_SR_ASSIGNMENTS A

3264: , lAssignmentRec.SECONDARY_INVENTORY
3265: , lAssignmentRec.SHIP_TO_SITE_ID
3266: , lAssignmentRec.SOURCING_RULE_ID
3267: , lAssignmentRec.SOURCING_RULE_TYPE
3268: FROM MRP_SR_ASSIGNMENTS A
3269: WHERE ASSIGNMENT_ID = lAssignmentId
3270: AND NOT EXISTS(SELECT /*+ INDEX(B MRP_SR_ASSIGNMENTS_U2)*/ 1
3271: FROM MRP_SR_ASSIGNMENTS B
3272: --Bugfix 14270815: Checking for the config assignment in lUPGAssignmentSet also.

Line 3270: AND NOT EXISTS(SELECT /*+ INDEX(B MRP_SR_ASSIGNMENTS_U2)*/ 1

3266: , lAssignmentRec.SOURCING_RULE_ID
3267: , lAssignmentRec.SOURCING_RULE_TYPE
3268: FROM MRP_SR_ASSIGNMENTS A
3269: WHERE ASSIGNMENT_ID = lAssignmentId
3270: AND NOT EXISTS(SELECT /*+ INDEX(B MRP_SR_ASSIGNMENTS_U2)*/ 1
3271: FROM MRP_SR_ASSIGNMENTS B
3272: --Bugfix 14270815: Checking for the config assignment in lUPGAssignmentSet also.
3273: --WHERE a.assignment_set_id = b.assignment_set_id and
3274: WHERE (a.assignment_set_id = b.assignment_set_id or

Line 3271: FROM MRP_SR_ASSIGNMENTS B

3267: , lAssignmentRec.SOURCING_RULE_TYPE
3268: FROM MRP_SR_ASSIGNMENTS A
3269: WHERE ASSIGNMENT_ID = lAssignmentId
3270: AND NOT EXISTS(SELECT /*+ INDEX(B MRP_SR_ASSIGNMENTS_U2)*/ 1
3271: FROM MRP_SR_ASSIGNMENTS B
3272: --Bugfix 14270815: Checking for the config assignment in lUPGAssignmentSet also.
3273: --WHERE a.assignment_set_id = b.assignment_set_id and
3274: WHERE (a.assignment_set_id = b.assignment_set_id or
3275: b.assignment_set_id = lUPGAssignmentSet) and

Line 3332: -- from mrp_sr_assignments

3328: -- -- bug 6617686
3329: -- IF pConfigId IS NOT NULL THEN
3330: -- select 1
3331: -- into lAssignmentExists
3332: -- from mrp_sr_assignments
3333: -- where assignment_set_id = lUPGAssignmentSet /* lAssignmentRec.assignment_set_id commented for upgrade logic */
3334: -- and assignment_type = lAssignmentRec.assignment_type
3335: -- and nvl(organization_id,-1) = nvl(lAssignmentRec.organization_id,-1)
3336: -- and nvl(customer_id,-1) = nvl(lAssignmentRec.customer_id,-1)

Line 3344: -- from mrp_sr_assignments

3340: -- and nvl(category_id,-1) = nvl(lAssignmentRec.category_id,-1);
3341: -- ELSE
3342: -- select 1
3343: -- into lAssignmentExists
3344: -- from mrp_sr_assignments
3345: -- where assignment_set_id = lUPGAssignmentSet /* lAssignmentRec.assignment_set_id commented for upgrade logic */
3346: -- and assignment_type = lAssignmentRec.assignment_type
3347: -- and nvl(organization_id,-1) = nvl(lAssignmentRec.organization_id,-1)
3348: -- and nvl(customer_id,-1) = nvl(lAssignmentRec.customer_id,-1)

Line 3377: SELECT mrp_sr_assignments_s.nextval

3373:
3374: --
3375: -- get assignment id for config item
3376: --
3377: SELECT mrp_sr_assignments_s.nextval
3378: INTO lConfigAssignmentId
3379: FROM DUAL;
3380:
3381: --

Line 3602: --process_assignment throws ORA-00001: unique constraint (MRP.MRP_SR_ASSIGNMENTS_U2)

3598: --Transfer from M1:50%, M2:30%, M3:15%, M4:5%
3599: --For this sourcing rule, there would be 4 records in table mrp_sr_source_org for one
3600: --value of sr_receipt_id.
3601: --The result is that the same assignment is attempted multiple times. MRP API
3602: --process_assignment throws ORA-00001: unique constraint (MRP.MRP_SR_ASSIGNMENTS_U2)
3603: --violated error.
3604: distinct
3605: assg.assignment_id,
3606: assg.assignment_type

Line 3610: mrp_sr_assignments assg,

3606: assg.assignment_type
3607: from
3608: mrp_sr_receipt_org rcv,
3609: mrp_sr_source_org src,
3610: mrp_sr_assignments assg,
3611: mrp_sourcing_rules rule,
3612: po_vendor_sites_all vend
3613: where
3614: assg.assignment_set_id = c_def_assg_set

Line 3633: from mrp_sr_assignments

3629: customer_id,
3630: ship_to_site_id,
3631: sourcing_rule_type,
3632: category_id
3633: from mrp_sr_assignments
3634: where assignment_set_id = c_def_assg_set
3635: and inventory_item_id = c_item_id;
3636: BEGIN
3637:

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

3754: --
3755: -- bug 6617686
3756: -- The MRP API uses a ASSIGNMENT_ID = p_Assignment_Id OR
3757: -- ASSIGNMENT_SET_ID = p_Assignment_Set_Id that leads to
3758: -- a full table scan on MRP_SR_ASSIGNMENTS and consequent
3759: -- performance issues. Since CTO does not pass ASSIGNMENT_SET_ID
3760: -- into the procedure, it is performance effective to directly
3761: -- query the MRP table
3762: -- ntungare

Line 3843: FROM MRP_SR_ASSIGNMENTS

3839: , lAssignmentRec.SECONDARY_INVENTORY
3840: , lAssignmentRec.SHIP_TO_SITE_ID
3841: , lAssignmentRec.SOURCING_RULE_ID
3842: , lAssignmentRec.SOURCING_RULE_TYPE
3843: FROM MRP_SR_ASSIGNMENTS
3844: WHERE ASSIGNMENT_ID = lAssignmentId;*/
3845:
3846: /*-------------------
3847: bug 8789722

Line 3926: FROM MRP_SR_ASSIGNMENTS A

3922: , lAssignmentRec.SECONDARY_INVENTORY
3923: , lAssignmentRec.SHIP_TO_SITE_ID
3924: , lAssignmentRec.SOURCING_RULE_ID
3925: , lAssignmentRec.SOURCING_RULE_TYPE
3926: FROM MRP_SR_ASSIGNMENTS A
3927: WHERE ASSIGNMENT_ID = lAssignmentId
3928: AND NOT EXISTS(SELECT /*+ INDEX(B MRP_SR_ASSIGNMENTS_U2)*/ 1
3929: FROM MRP_SR_ASSIGNMENTS B
3930: --Bugfix 14270815: Checking for the config assignment in lUPGAssignmentSet also.

Line 3928: AND NOT EXISTS(SELECT /*+ INDEX(B MRP_SR_ASSIGNMENTS_U2)*/ 1

3924: , lAssignmentRec.SOURCING_RULE_ID
3925: , lAssignmentRec.SOURCING_RULE_TYPE
3926: FROM MRP_SR_ASSIGNMENTS A
3927: WHERE ASSIGNMENT_ID = lAssignmentId
3928: AND NOT EXISTS(SELECT /*+ INDEX(B MRP_SR_ASSIGNMENTS_U2)*/ 1
3929: FROM MRP_SR_ASSIGNMENTS B
3930: --Bugfix 14270815: Checking for the config assignment in lUPGAssignmentSet also.
3931: --WHERE a.assignment_set_id = b.assignment_set_id and
3932: WHERE (a.assignment_set_id = b.assignment_set_id or

Line 3929: FROM MRP_SR_ASSIGNMENTS B

3925: , lAssignmentRec.SOURCING_RULE_TYPE
3926: FROM MRP_SR_ASSIGNMENTS A
3927: WHERE ASSIGNMENT_ID = lAssignmentId
3928: AND NOT EXISTS(SELECT /*+ INDEX(B MRP_SR_ASSIGNMENTS_U2)*/ 1
3929: FROM MRP_SR_ASSIGNMENTS B
3930: --Bugfix 14270815: Checking for the config assignment in lUPGAssignmentSet also.
3931: --WHERE a.assignment_set_id = b.assignment_set_id and
3932: WHERE (a.assignment_set_id = b.assignment_set_id or
3933: b.assignment_set_id = lUPGAssignmentSet) and

Line 4017: FROM MRP_SR_ASSIGNMENTS A

4013: , lAssignmentRec.SECONDARY_INVENTORY
4014: , lAssignmentRec.SHIP_TO_SITE_ID
4015: , lAssignmentRec.SOURCING_RULE_ID
4016: , lAssignmentRec.SOURCING_RULE_TYPE
4017: FROM MRP_SR_ASSIGNMENTS A
4018: WHERE ASSIGNMENT_ID = lAssignmentId
4019: AND NOT EXISTS(SELECT /*+ INDEX(B MRP_SR_ASSIGNMENTS_U2)*/ 1
4020: FROM MRP_SR_ASSIGNMENTS B
4021: --Bugfix 14270815: Checking for the config assignment in lUPGAssignmentSet also.

Line 4019: AND NOT EXISTS(SELECT /*+ INDEX(B MRP_SR_ASSIGNMENTS_U2)*/ 1

4015: , lAssignmentRec.SOURCING_RULE_ID
4016: , lAssignmentRec.SOURCING_RULE_TYPE
4017: FROM MRP_SR_ASSIGNMENTS A
4018: WHERE ASSIGNMENT_ID = lAssignmentId
4019: AND NOT EXISTS(SELECT /*+ INDEX(B MRP_SR_ASSIGNMENTS_U2)*/ 1
4020: FROM MRP_SR_ASSIGNMENTS B
4021: --Bugfix 14270815: Checking for the config assignment in lUPGAssignmentSet also.
4022: --WHERE a.assignment_set_id = b.assignment_set_id and
4023: WHERE (a.assignment_set_id = b.assignment_set_id or

Line 4020: FROM MRP_SR_ASSIGNMENTS B

4016: , lAssignmentRec.SOURCING_RULE_TYPE
4017: FROM MRP_SR_ASSIGNMENTS A
4018: WHERE ASSIGNMENT_ID = lAssignmentId
4019: AND NOT EXISTS(SELECT /*+ INDEX(B MRP_SR_ASSIGNMENTS_U2)*/ 1
4020: FROM MRP_SR_ASSIGNMENTS B
4021: --Bugfix 14270815: Checking for the config assignment in lUPGAssignmentSet also.
4022: --WHERE a.assignment_set_id = b.assignment_set_id and
4023: WHERE (a.assignment_set_id = b.assignment_set_id or
4024: b.assignment_set_id = lUPGAssignmentSet) and

Line 4083: -- from mrp_sr_assignments

4079: -- -- bug 6617686
4080: -- IF pConfigId IS NOT NULL THEN
4081: -- select 1
4082: -- into lAssignmentExists
4083: -- from mrp_sr_assignments
4084: -- where assignment_set_id = lUPGAssignmentSet /* commented for upgrade issues lAssignmentRec.assignment_set_id */
4085: -- and assignment_type = lAssignmentRec.assignment_type
4086: -- and nvl(organization_id,-1) = nvl(lAssignmentRec.organization_id,-1)
4087: -- and nvl(customer_id,-1) = nvl(lAssignmentRec.customer_id,-1)

Line 4095: -- from mrp_sr_assignments

4091: -- and nvl(category_id,-1) = nvl(lAssignmentRec.category_id,-1);
4092: -- ELSE
4093: -- select 1
4094: -- into lAssignmentExists
4095: -- from mrp_sr_assignments
4096: -- where assignment_set_id = lUPGAssignmentSet /* commented for upgrade issues lAssignmentRec.assignment_set_id */
4097: -- and assignment_type = lAssignmentRec.assignment_type
4098: -- and nvl(organization_id,-1) = nvl(lAssignmentRec.organization_id,-1)
4099: -- and nvl(customer_id,-1) = nvl(lAssignmentRec.customer_id,-1)

Line 4137: SELECT mrp_sr_assignments_s.nextval

4133: --
4134:
4135:
4136:
4137: SELECT mrp_sr_assignments_s.nextval
4138: INTO lConfigAssignmentId
4139: FROM DUAL;
4140:
4141: --