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 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 6205: msc_demands_s.nextval,

6201: SR_INSTANCE_ID,
6202: NVL(DEMAND_CLASS, -1),
6203: TRUNC(SYSDATE),
6204: RESERVED_QUANTITY,
6205: msc_demands_s.nextval,
6206: -100,
6207: ORDER_NUMBER,
6208: SALES_ORDER_LINE_ID,
6209: CREATED_BY,

Line 6214: from msc_demands

6210: CREATION_DATE,
6211: LAST_UPDATED_BY,
6212: LAST_UPDATE_DATE,
6213: using_requirement_quantity
6214: from msc_demands
6215: where plan_id = p_plan_id
6216: and origination_type in (30,6)
6217: and RESERVED_QUANTITY <> 0
6218: );

Line 6705: MSC_DEMANDS D,

6701: p_sys_date creation_date,
6702: l_user_id created_by
6703: FROM MSC_SYSTEM_ITEMS I,
6704: MSC_TRADING_PARTNERS P,
6705: MSC_DEMANDS D,
6706: MSC_CALENDAR_DATES C
6707: WHERE I.ATP_FLAG = 'Y'
6708: AND I.PLAN_ID = p_plan_id
6709: AND D.PLAN_ID = I.PLAN_ID

Line 6844: MSC_DEMANDS D,

6840: p_sys_date creation_date,
6841: l_user_id created_by
6842: FROM MSC_SYSTEM_ITEMS I,
6843: MSC_TRADING_PARTNERS P,
6844: MSC_DEMANDS D,
6845: MSC_CALENDAR_DATES C
6846: WHERE I.ATP_FLAG = 'Y'
6847: AND I.PLAN_ID = p_plan_id
6848: AND D.PLAN_ID = I.PLAN_ID

Line 7022: MSC_DEMANDS D

7018: l_user_id created_by
7019: FROM MSC_SYSTEM_ITEMS I,
7020: -- MSC_TRADING_PARTNERS P, -- Removed with summary enhancement changes
7021: -- Not required as calendar has been removed
7022: MSC_DEMANDS D
7023: WHERE I.ATP_FLAG = 'Y'
7024: AND I.PLAN_ID = p_plan_id
7025: AND D.PLAN_ID = I.PLAN_ID
7026: AND D.SR_INSTANCE_ID = I.SR_INSTANCE_ID

Line 7130: MSC_DEMANDS D

7126: l_user_id created_by
7127: FROM MSC_SYSTEM_ITEMS I,
7128: -- MSC_TRADING_PARTNERS P, -- Removed with summary enhancement changes
7129: -- Not required as calendar has been removed
7130: MSC_DEMANDS D
7131: WHERE I.ATP_FLAG = 'Y'
7132: AND I.PLAN_ID = p_plan_id
7133: AND D.PLAN_ID = I.PLAN_ID
7134: AND D.SR_INSTANCE_ID = I.SR_INSTANCE_ID

Line 7355: MSC_DEMANDS D

7351: decode(D.USING_REQUIREMENT_QUANTITY, -- Consider unscheduled orders as dummy supplies
7352: 0, D.OLD_DEMAND_QUANTITY, -- For summary enhancement
7353: -1 * D.USING_REQUIREMENT_QUANTITY) SD_QTY
7354: FROM MSC_SYSTEM_ITEMS I,
7355: MSC_DEMANDS D
7356: WHERE I.ATP_FLAG = 'Y'
7357: AND I.PLAN_ID = p_plan_id
7358: AND D.PLAN_ID = I.PLAN_ID
7359: AND D.SR_INSTANCE_ID = I.SR_INSTANCE_ID

Line 7411: MSC_DEMANDS D

7407: decode(D.USING_REQUIREMENT_QUANTITY, -- Consider unscheduled orders as dummy supplies
7408: 0, D.OLD_DEMAND_QUANTITY, -- For summary enhancement
7409: -1 * D.USING_REQUIREMENT_QUANTITY) SD_QTY
7410: FROM MSC_SYSTEM_ITEMS I,
7411: MSC_DEMANDS D
7412: WHERE I.ATP_FLAG = 'Y'
7413: AND I.PLAN_ID = p_plan_id
7414: AND D.PLAN_ID = I.PLAN_ID
7415: AND D.SR_INSTANCE_ID = I.SR_INSTANCE_ID