DBA Data[Home] [Help]

APPS.MSC_ATP_PF dependencies on MSC_ALLOC_TEMP

Line 5834: FROM msc_alloc_temp

5830: AND AD.ALLOCATED_QUANTITY <> 0 --4501434
5831: AND AD.ORIGINATION_TYPE <> 52 -- Ignore copy SO and copy stealing records for summary enhancement
5832: AND AD.DEMAND_CLASS IN (
5833: SELECT demand_class
5834: FROM msc_alloc_temp
5835: WHERE demand_class IS NOT NULL)
5836: --bug3700564 added trunc
5837: AND TRUNC(AD.DEMAND_DATE) < p_itf
5838:

Line 5857: FROM msc_alloc_temp

5853: 28, TRUNC(SYSDATE),
5854: TRUNC(SA.SUPPLY_DATE))
5855: AND SA.DEMAND_CLASS IN (
5856: SELECT demand_class
5857: FROM msc_alloc_temp
5858: WHERE demand_class IS NOT NULL)
5859: --bug3700564 added trunc
5860: AND TRUNC(SA.SUPPLY_DATE) < p_itf
5861: )

Line 5923: FROM msc_alloc_temp

5919: AND S.INVENTORY_ITEM_ID in (p_member_id, p_family_id)
5920: AND S.ORGANIZATION_ID = p_org_id
5921: AND S.DEMAND_CLASS IN (
5922: SELECT demand_class
5923: FROM msc_alloc_temp
5924: WHERE demand_class IS NOT NULL)
5925: AND S.SD_DATE < p_itf
5926:
5927: UNION ALL

Line 5942: FROM msc_alloc_temp

5938: AND AD.INVENTORY_ITEM_ID in (p_member_id, p_family_id)
5939: AND AD.ORGANIZATION_ID = p_org_id
5940: AND AD.DEMAND_CLASS IN (
5941: SELECT demand_class
5942: FROM msc_alloc_temp
5943: WHERE demand_class IS NOT NULL)
5944: --bug3700564 added trunc
5945: AND TRUNC(AD.DEMAND_DATE) < p_itf
5946: AND P.PLAN_ID = AD.PLAN_ID

Line 5965: FROM msc_alloc_temp

5961: AND SA.INVENTORY_ITEM_ID in (p_member_id, p_family_id)
5962: AND SA.ORGANIZATION_ID = p_org_id
5963: AND SA.DEMAND_CLASS IN (
5964: SELECT demand_class
5965: FROM msc_alloc_temp
5966: WHERE demand_class IS NOT NULL)
5967: --bug3700564 added trunc
5968: AND TRUNC(SA.SUPPLY_DATE) < p_itf
5969: AND P.PLAN_ID = SA.PLAN_ID

Line 6095: MSC_ALLOC_TEMP TEMP,

6091: AD.DEMAND_CLASS col29, --bug3263368
6092: AD.REQUEST_DATE col30 --bug3263368
6093: FROM
6094: MSC_ALLOC_DEMANDS AD,
6095: MSC_ALLOC_TEMP TEMP,
6096: MSC_TRADING_PARTNERS MTP,--bug3263368
6097: MSC_TRADING_PARTNER_SITES MTPS, --bug3263368
6098: MSC_SYSTEM_ITEMS msi --bug3671294
6099: WHERE

Line 6160: MSC_ALLOC_TEMP TEMP,

6156: SA.DEMAND_CLASS col29, --bug3684383
6157: l_null_date col30 --bug3684383 -- Bug 3875786 - local variable used for NULL
6158: FROM
6159: MSC_ALLOC_SUPPLIES SA,
6160: MSC_ALLOC_TEMP TEMP,
6161: MSC_SYSTEM_ITEMS msi, --bug3671294
6162: MSC_TRADING_PARTNER_SITES MTPS, --bug3684383
6163: MSC_TRADING_PARTNERS MTP --bug3684383
6164: WHERE

Line 6655: MSC_ALLOC_TEMP TEMP,

6651: AD.DEMAND_CLASS col30, --bug3263368
6652: AD.REQUEST_DATE col31 --bug3263368
6653: FROM
6654: MSC_ALLOC_DEMANDS AD,
6655: MSC_ALLOC_TEMP TEMP,
6656: MSC_TRADING_PARTNERS MTP,--bug3263368
6657: MSC_TRADING_PARTNER_SITES MTPS, --bug3263368
6658: MSC_SYSTEM_ITEMS msi --bug3671294
6659: WHERE

Line 6765: MSC_ALLOC_TEMP TEMP,

6761: l_null_date col31 --bug3263368 ORIG_REQUEST_DATE -- Bug 3875786 - local variable used for NULL
6762:
6763: FROM
6764: MSC_ALLOC_SUPPLIES SA,
6765: MSC_ALLOC_TEMP TEMP,
6766: MSC_SYSTEM_ITEMS msi --bug3671294
6767: WHERE
6768: SA.PLAN_ID = p_plan_id
6769: AND SA.SR_INSTANCE_ID = p_instance_id

Line 7330: /* Clear msc_alloc_temp before use */

7326:
7327: -- Initializing API return code
7328: x_return_status := FND_API.G_RET_STS_SUCCESS;
7329:
7330: /* Clear msc_alloc_temp before use */
7331: DELETE msc_alloc_temp;
7332:
7333: IF p_table = MADT THEN
7334:

Line 7331: DELETE msc_alloc_temp;

7327: -- Initializing API return code
7328: x_return_status := FND_API.G_RET_STS_SUCCESS;
7329:
7330: /* Clear msc_alloc_temp before use */
7331: DELETE msc_alloc_temp;
7332:
7333: IF p_table = MADT THEN
7334:
7335: /* Do netting in SQL and insert original demand qtys in alloc temp table*/

Line 7336: INSERT INTO MSC_ALLOC_TEMP(

7332:
7333: IF p_table = MADT THEN
7334:
7335: /* Do netting in SQL and insert original demand qtys in alloc temp table*/
7336: INSERT INTO MSC_ALLOC_TEMP(
7337: demand_class,
7338: demand_id,
7339: supply_demand_quantity
7340: )

Line 7362: from msc_alloc_temp mat

7358: /* Now update original demand qtys in mrp_atp_details_temp table*/
7359: UPDATE mrp_atp_details_temp madt
7360: SET madt.original_demand_quantity =
7361: (select -1*mat.supply_demand_quantity
7362: from msc_alloc_temp mat
7363: where mat.demand_class = madt.demand_class
7364: and mat.demand_id = madt.identifier3)
7365: WHERE madt.session_id = p_session_id
7366: AND madt.supply_demand_type = 1

Line 7372: INSERT INTO MSC_ALLOC_TEMP(

7368:
7369: ELSIF p_table = MASDDT THEN
7370:
7371: /* Do netting in SQL and insert original demand qtys in alloc temp table*/
7372: INSERT INTO MSC_ALLOC_TEMP(
7373: demand_id,
7374: supply_demand_quantity
7375: )
7376: SELECT parent_demand_id,

Line 7392: from msc_alloc_temp mat

7388: /* Now update original demand qtys in msc_atp_sd_details_temp table*/
7389: UPDATE msc_atp_sd_details_temp masddt
7390: SET masddt.original_demand_quantity =
7391: (select -1*mat.supply_demand_quantity
7392: from msc_alloc_temp mat
7393: where mat.demand_id = masddt.identifier3)
7394: WHERE masddt.supply_demand_type = 1;
7395:
7396: END IF;

Line 9115: insert into msc_alloc_temp(

9111: -- initialize API return status to success
9112: x_return_status := FND_API.G_RET_STS_SUCCESS;
9113:
9114: /* populate allocated quantity for planned order at product family that are blown down as production forecasts*/
9115: insert into msc_alloc_temp(
9116: transaction_id,
9117: demand_class,
9118: supply_demand_quantity
9119: )

Line 9156: /* update msc_alloc_temp mat1

9152: );
9153:
9154: -- update allocation percentages
9155: --changed update statement for bug3387166
9156: /* update msc_alloc_temp mat1
9157: set mat1.allocation_percent =
9158: mat1.supply_demand_quantity/(select sum(mat2.supply_demand_quantity)
9159: from msc_alloc_temp mat2
9160: where mat2.transaction_id = mat1.transaction_id

Line 9159: from msc_alloc_temp mat2

9155: --changed update statement for bug3387166
9156: /* update msc_alloc_temp mat1
9157: set mat1.allocation_percent =
9158: mat1.supply_demand_quantity/(select sum(mat2.supply_demand_quantity)
9159: from msc_alloc_temp mat2
9160: where mat2.transaction_id = mat1.transaction_id
9161: ); */
9162: update msc_alloc_temp mat1
9163: set mat1.allocation_percent =

Line 9162: update msc_alloc_temp mat1

9158: mat1.supply_demand_quantity/(select sum(mat2.supply_demand_quantity)
9159: from msc_alloc_temp mat2
9160: where mat2.transaction_id = mat1.transaction_id
9161: ); */
9162: update msc_alloc_temp mat1
9163: set mat1.allocation_percent =
9164: (select mat1.supply_demand_quantity/sum(mat2.supply_demand_quantity)
9165: from msc_alloc_temp mat2
9166: where mat2.transaction_id = mat1.transaction_id

Line 9165: from msc_alloc_temp mat2

9161: ); */
9162: update msc_alloc_temp mat1
9163: set mat1.allocation_percent =
9164: (select mat1.supply_demand_quantity/sum(mat2.supply_demand_quantity)
9165: from msc_alloc_temp mat2
9166: where mat2.transaction_id = mat1.transaction_id
9167: );
9168:
9169: IF PG_DEBUG in ('Y', 'C') THEN

Line 9170: msc_util.msc_log('Calculate_Alloc_Percentages: ' || 'Row Count in MSC_ALLOC_TEMP = '|| SQL%ROWCOUNT);

9166: where mat2.transaction_id = mat1.transaction_id
9167: );
9168:
9169: IF PG_DEBUG in ('Y', 'C') THEN
9170: msc_util.msc_log('Calculate_Alloc_Percentages: ' || 'Row Count in MSC_ALLOC_TEMP = '|| SQL%ROWCOUNT);
9171: msc_util.msc_log('*********End of procedure Calculate_Alloc_Percentages ********');
9172: END IF;
9173:
9174: EXCEPTION

Line 9394: l_alloc_temp_table := 'MSC_ALLOC_TEMP_' || to_char(p_plan_id);

9390:
9391: /* forecast at PF changes begin
9392: Changes to populate demand class allocation information in a temp table*/
9393: IF p_demand_priority = 'Y' THEN
9394: l_alloc_temp_table := 'MSC_ALLOC_TEMP_' || to_char(p_plan_id);
9395:
9396: msc_util.msc_log('temp table : ' || l_alloc_temp_table);
9397:
9398: /* Create temp table in tablespace of MSC_ALLOC_DEMANDS*/

Line 9486: msc_alloc_temp mat

9482: decode(mat.transaction_id, NULL, 1,
9483: mat.allocation_percent)
9484: from msc_full_pegging peg1,
9485: msc_demands d,
9486: msc_alloc_temp mat
9487: where peg1.plan_id = :p_plan_id
9488: and peg1.pegging_id = peg1.end_pegging_id
9489: and peg1.demand_id = d.demand_id
9490: and peg1.plan_id = d.plan_id

Line 9535: --fnd_stats.gather_table_stats('MSC', 'MSC_ALLOC_TEMP_' || to_char(l_plan_id), granularity => 'ALL');

9531: msc_util.msc_log('Done creating indexes on temp table');
9532: msc_util.msc_log('Gather Table Stats');
9533:
9534: -- Use p_plan_id instead of l_plan_id
9535: --fnd_stats.gather_table_stats('MSC', 'MSC_ALLOC_TEMP_' || to_char(l_plan_id), granularity => 'ALL');
9536: fnd_stats.gather_table_stats(l_msc_schema, l_alloc_temp_table, granularity => 'ALL');
9537: END IF;
9538: /* forecast at PF changes end*/
9539: