DBA Data[Home] [Help]

APPS.MSC_POST_PRO dependencies on MSC_DEMANDS

Line 375: MSC_DEMANDS D,

371: FROM
372: MSC_SYSTEM_ITEMS I,
373: MSC_SYSTEM_ITEMS I2,
374: MSC_ATP_RULES R,
375: MSC_DEMANDS D,
376: MSC_CALENDAR_DATES C,
377: MSC_CALENDAR_DATES C2,
378: MSC_TRADING_PARTNERS TP
379: WHERE I.ATP_FLAG = 'Y'

Line 797: msc_util.msc_log('LOAD_PLAN_SD: deleting reservation records from msc_demands'); --5027568

793: --bug 3713374: Missing brackets was making OR condition to be stand alone filtering criteria
794: AND (mst1.atp_flag <> 'N' OR mst1.atp_components_flag <> 'N');
795:
796: --5027568
797: msc_util.msc_log('LOAD_PLAN_SD: deleting reservation records from msc_demands'); --5027568
798:
799: Delete MSC_DEMANDS
800: where origination_type = -100
801: and plan_id = p_plan_id

Line 799: Delete MSC_DEMANDS

795:
796: --5027568
797: msc_util.msc_log('LOAD_PLAN_SD: deleting reservation records from msc_demands'); --5027568
798:
799: Delete MSC_DEMANDS
800: where origination_type = -100
801: and plan_id = p_plan_id
802: and ORGANIZATION_ID = l_organization_id(j)
803: and sr_instance_id = l_sr_instance_id(j);

Line 806: --5027568, to insert a record for hard reservation in msc_demands.

802: and ORGANIZATION_ID = l_organization_id(j)
803: and sr_instance_id = l_sr_instance_id(j);
804:
805: msc_util.msc_log('LOAD_PLAN_SD: no of records deleted: '|| SQL%ROWCOUNT);
806: --5027568, to insert a record for hard reservation in msc_demands.
807:
808: msc_util.msc_log('LOAD_PLAN_SD: populating msc_demands with reservation records');
809:
810: INSERT INTO MSC_DEMANDS(

Line 808: msc_util.msc_log('LOAD_PLAN_SD: populating msc_demands with reservation records');

804:
805: msc_util.msc_log('LOAD_PLAN_SD: no of records deleted: '|| SQL%ROWCOUNT);
806: --5027568, to insert a record for hard reservation in msc_demands.
807:
808: msc_util.msc_log('LOAD_PLAN_SD: populating msc_demands with reservation records');
809:
810: INSERT INTO MSC_DEMANDS(
811: DEMAND_ID,
812: USING_REQUIREMENT_QUANTITY,

Line 810: INSERT INTO MSC_DEMANDS(

806: --5027568, to insert a record for hard reservation in msc_demands.
807:
808: msc_util.msc_log('LOAD_PLAN_SD: populating msc_demands with reservation records');
809:
810: INSERT INTO MSC_DEMANDS(
811: DEMAND_ID,
812: USING_REQUIREMENT_QUANTITY,
813: RESERVED_QUANTITY,
814: USING_ASSEMBLY_DEMAND_DATE,

Line 843: msc_demands_s.nextval,

839: LINK_TO_LINE_ID,
840: wip_supply_type,
841: ORIGINAL_ITEM_ID )
842: (select
843: msc_demands_s.nextval,
844: RESERVED_QUANTITY,
845: 0, --putting 0 in reserved qty
846: sysdate, --USING_ASSEMBLY_DEMAND_DATE,
847: DEMAND_TYPE,

Line 874: from msc_demands

870: DISPOSITION_ID,
871: LINK_TO_LINE_ID,
872: wip_supply_type,
873: ORIGINAL_ITEM_ID
874: from msc_demands
875: where plan_id = p_plan_id
876: and reserved_quantity <> 0
877: and organization_id = l_organization_id(j)
878: and sr_instance_id = l_sr_instance_id(j)

Line 965: update msc_demands dem

961:
962: if(l_is_cmro > 0) then
963: msc_util.msc_log ('This is a CMRO scenario...');
964: FORALL j IN l_organization_id.first.. l_organization_id.last
965: update msc_demands dem
966: set demand_source_type = (select distinct demand_source_type
967: from msc_sales_orders so
968: where so.sales_order_number = dem.order_number
969: and so.organization_id = dem.organization_id

Line 1296: update msc_demands

1292: -- Reset the ATP_SYNCHRONIZATION_FLAG to 0 for the original plan.
1293: -- Moved this from MSCPLAPB.pls
1294: msc_util.msc_debug('Update atp_synchronization_flag for 24x7 plan to support re-run after sync failure');
1295:
1296: update msc_demands
1297: set atp_synchronization_flag = 0 -- null
1298: where (plan_id, sr_instance_id, organization_id) IN
1299: (select mpo.plan_id, mpo.sr_instance_id, mpo.organization_id
1300: from msc_plan_organizations mpo

Line 1487: FROM msc_demands

1483: -- Obtain the new refresh number
1484: SELECT max(refresh_number)
1485: INTO l_new_refresh_number
1486: FROM (SELECT refresh_number
1487: FROM msc_demands
1488: WHERE plan_id = p_plan_id
1489:
1490: UNION ALL
1491:

Line 2890: MSC_DEMANDS D,

2886: C.PRIOR_DATE SD_DATE,
2887: -1* D.USING_REQUIREMENT_QUANTITY SD_QTY
2888: --2 SD_TYPE
2889: FROM MSC_CALENDAR_DATES C,
2890: MSC_DEMANDS D,
2891: MSC_ATP_RULES R,
2892: MSC_SYSTEM_ITEMS I,
2893: MSC_SYSTEM_ITEMS I2
2894: WHERE I.ATP_FLAG = 'Y' --- I.SR_INVENTORY_ITEM_ID = p_inventory_item_id

Line 2945: MSC_DEMANDS D,

2941: C.PRIOR_DATE SD_DATE,
2942: NVL(D.OLD_USING_REQUIREMENT_QUANTITY,0) SD_QTY
2943: --2 SD_TYPE
2944: FROM MSC_CALENDAR_DATES C,
2945: MSC_DEMANDS D,
2946: MSC_ATP_RULES R,
2947: MSC_SYSTEM_ITEMS I,
2948: MSC_SYSTEM_ITEMS I2
2949: WHERE I.ATP_FLAG = 'Y' --- I.SR_INVENTORY_ITEM_ID = p_inventory_item_id

Line 4410: FROM msc_demands d2,

4406: --peg2.demand_quantity -- ssurendr 25-NOV-2002: added for alloc w/b
4407: --bug3684383
4408: d2.customer_id,
4409: d2.ship_to_site_id
4410: FROM msc_demands d2,
4411: msc_full_pegging peg2,
4412: msc_full_pegging peg1 ,
4413: msc_demands d1
4414: -- time_phased_atp

Line 4413: msc_demands d1

4409: d2.ship_to_site_id
4410: FROM msc_demands d2,
4411: msc_full_pegging peg2,
4412: msc_full_pegging peg1 ,
4413: msc_demands d1
4414: -- time_phased_atp
4415: -- msc_trading_partners tp
4416: -- 2859130
4417: -- msc_calendar_dates cal

Line 4575: msc_demands d,

4571: decode(d.order_date_type_code,2,d.request_date,
4572: d.request_ship_date)request_date --bug3263368
4573: FROM msc_full_pegging peg2,
4574: msc_full_pegging peg1,
4575: msc_demands d,
4576: msc_supplies s
4577: WHERE peg1.plan_id = :p_plan_id
4578: AND peg2.plan_id = peg1.plan_id
4579: AND peg2.pegging_id = peg1.end_pegging_id

Line 4678: msc_demands d

4674: decode(d.order_date_type_code,2,d.request_date, -- Bug 3370201
4675: d.request_ship_date)request_date --bug3263368
4676: FROM msc_full_pegging peg2,
4677: msc_full_pegging peg1,
4678: msc_demands d
4679: -- time_phased_atp msc_trading_partners tp
4680: -- 2859130 msc_calendar_dates cal
4681: WHERE peg1.plan_id = :p_plan_id
4682: AND peg2.plan_id = peg1.plan_id

Line 4807: msc_demands d

4803: --peg2.supply_quantity -- ssurendr 25-NOV-2002: added for alloc w/b
4804: FROM msc_supplies s,
4805: msc_full_pegging peg2,
4806: msc_full_pegging peg1,
4807: msc_demands d
4808: -- time_phased_atp msc_trading_partners tp
4809: -- 2859130 msc_calendar_dates cal
4810: WHERE peg2.plan_id = peg1.plan_id
4811: AND peg2.end_pegging_id = peg1.pegging_id

Line 5277: FROM msc_demands d2,

5273: d2.request_ship_date) request_date, -- Bug 3370201
5274: --bug3684383
5275: d2.customer_id,
5276: d2.ship_to_site_id
5277: FROM msc_demands d2,
5278: msc_full_pegging peg2,
5279: msc_full_pegging peg1,
5280: msc_demands d1
5281: -- time_phased_atp msc_trading_partners tp

Line 5280: msc_demands d1

5276: d2.ship_to_site_id
5277: FROM msc_demands d2,
5278: msc_full_pegging peg2,
5279: msc_full_pegging peg1,
5280: msc_demands d1
5281: -- time_phased_atp msc_trading_partners tp
5282: -- 2859130 msc_calendar_dates cal
5283: WHERE peg2.plan_id = peg1.plan_id
5284: AND peg2.end_pegging_id = peg1.pegging_id

Line 5431: msc_demands d,

5427: decode(d.order_date_type_code,2,d.request_date,
5428: d.request_ship_date) request_date -- Bug 3370201
5429: FROM msc_full_pegging peg2,
5430: msc_full_pegging peg1,
5431: msc_demands d,
5432: msc_supplies s
5433: WHERE peg1.plan_id = :p_plan_id
5434: AND peg2.plan_id = peg1.plan_id
5435: AND peg2.pegging_id = peg1.end_pegging_id

Line 5529: msc_demands d

5525: decode(d.order_date_type_code,2,d.request_date,
5526: d.request_ship_date) request_date -- Bug 3370201
5527: FROM msc_full_pegging peg2,
5528: msc_full_pegging peg1,
5529: msc_demands d
5530: -- time_phased_atp msc_trading_partners tp
5531: -- 2859130 msc_calendar_dates cal
5532: WHERE peg1.plan_id = :p_plan_id
5533: AND peg2.plan_id = peg1.plan_id

Line 5804: msc_demands d

5800: --peg2.supply_quantity -- ssurendr 25-NOV-2002: added for alloc w/b
5801: FROM msc_supplies s,
5802: msc_full_pegging peg2,
5803: msc_full_pegging peg1,
5804: msc_demands d
5805: -- time_phased_atp msc_trading_partners tp
5806: -- 2859130 msc_calendar_dates cal
5807: WHERE peg2.plan_id = peg1.plan_id
5808: AND peg2.end_pegging_id = peg1.pegging_id

Line 6222: from msc_demands

6218: CREATION_DATE,
6219: LAST_UPDATED_BY,
6220: LAST_UPDATE_DATE,
6221: using_requirement_quantity
6222: from msc_demands
6223: where plan_id = p_plan_id
6224: and origination_type = -100
6225: and using_requirement_quantity <> 0
6226: );

Line 6734: MSC_DEMANDS D,

6730: p_sys_date creation_date,
6731: l_user_id created_by
6732: FROM MSC_SYSTEM_ITEMS I,
6733: MSC_TRADING_PARTNERS P,
6734: MSC_DEMANDS D,
6735: MSC_CALENDAR_DATES C
6736: WHERE I.ATP_FLAG = 'Y'
6737: AND I.PLAN_ID = p_plan_id
6738: AND D.PLAN_ID = I.PLAN_ID

Line 6873: MSC_DEMANDS D,

6869: p_sys_date creation_date,
6870: l_user_id created_by
6871: FROM MSC_SYSTEM_ITEMS I,
6872: MSC_TRADING_PARTNERS P,
6873: MSC_DEMANDS D,
6874: MSC_CALENDAR_DATES C
6875: WHERE I.ATP_FLAG = 'Y'
6876: AND I.PLAN_ID = p_plan_id
6877: AND D.PLAN_ID = I.PLAN_ID

Line 7051: MSC_DEMANDS D

7047: l_user_id created_by
7048: FROM MSC_SYSTEM_ITEMS I,
7049: -- MSC_TRADING_PARTNERS P, -- Removed with summary enhancement changes
7050: -- Not required as calendar has been removed
7051: MSC_DEMANDS D
7052: WHERE I.ATP_FLAG = 'Y'
7053: AND I.PLAN_ID = p_plan_id
7054: AND D.PLAN_ID = I.PLAN_ID
7055: AND D.SR_INSTANCE_ID = I.SR_INSTANCE_ID

Line 7159: MSC_DEMANDS D

7155: l_user_id created_by
7156: FROM MSC_SYSTEM_ITEMS I,
7157: -- MSC_TRADING_PARTNERS P, -- Removed with summary enhancement changes
7158: -- Not required as calendar has been removed
7159: MSC_DEMANDS D
7160: WHERE I.ATP_FLAG = 'Y'
7161: AND I.PLAN_ID = p_plan_id
7162: AND D.PLAN_ID = I.PLAN_ID
7163: AND D.SR_INSTANCE_ID = I.SR_INSTANCE_ID

Line 7384: MSC_DEMANDS D

7380: decode(D.USING_REQUIREMENT_QUANTITY, -- Consider unscheduled orders as dummy supplies
7381: 0, D.OLD_DEMAND_QUANTITY, -- For summary enhancement
7382: -1 * D.USING_REQUIREMENT_QUANTITY) SD_QTY
7383: FROM MSC_SYSTEM_ITEMS I,
7384: MSC_DEMANDS D
7385: WHERE I.ATP_FLAG = 'Y'
7386: AND I.PLAN_ID = p_plan_id
7387: AND D.PLAN_ID = I.PLAN_ID
7388: AND D.SR_INSTANCE_ID = I.SR_INSTANCE_ID

Line 7440: MSC_DEMANDS D

7436: decode(D.USING_REQUIREMENT_QUANTITY, -- Consider unscheduled orders as dummy supplies
7437: 0, D.OLD_DEMAND_QUANTITY, -- For summary enhancement
7438: -1 * D.USING_REQUIREMENT_QUANTITY) SD_QTY
7439: FROM MSC_SYSTEM_ITEMS I,
7440: MSC_DEMANDS D
7441: WHERE I.ATP_FLAG = 'Y'
7442: AND I.PLAN_ID = p_plan_id
7443: AND D.PLAN_ID = I.PLAN_ID
7444: AND D.SR_INSTANCE_ID = I.SR_INSTANCE_ID