DBA Data[Home] [Help]

APPS.MSC_ATP_PF dependencies on MSC_ALLOC_TEMP

Line 5808: FROM msc_alloc_temp

5804: AND AD.ALLOCATED_QUANTITY <> 0 --4501434
5805: AND AD.ORIGINATION_TYPE <> 52 -- Ignore copy SO and copy stealing records for summary enhancement
5806: AND AD.DEMAND_CLASS IN (
5807: SELECT demand_class
5808: FROM msc_alloc_temp
5809: WHERE demand_class IS NOT NULL)
5810: --bug3700564 added trunc
5811: AND TRUNC(AD.DEMAND_DATE) < p_itf
5812:

Line 5831: FROM msc_alloc_temp

5827: 28, TRUNC(SYSDATE),
5828: TRUNC(SA.SUPPLY_DATE))
5829: AND SA.DEMAND_CLASS IN (
5830: SELECT demand_class
5831: FROM msc_alloc_temp
5832: WHERE demand_class IS NOT NULL)
5833: --bug3700564 added trunc
5834: AND TRUNC(SA.SUPPLY_DATE) < p_itf
5835: )

Line 5897: FROM msc_alloc_temp

5893: AND S.INVENTORY_ITEM_ID in (p_member_id, p_family_id)
5894: AND S.ORGANIZATION_ID = p_org_id
5895: AND S.DEMAND_CLASS IN (
5896: SELECT demand_class
5897: FROM msc_alloc_temp
5898: WHERE demand_class IS NOT NULL)
5899: AND S.SD_DATE < p_itf
5900:
5901: UNION ALL

Line 5916: FROM msc_alloc_temp

5912: AND AD.INVENTORY_ITEM_ID in (p_member_id, p_family_id)
5913: AND AD.ORGANIZATION_ID = p_org_id
5914: AND AD.DEMAND_CLASS IN (
5915: SELECT demand_class
5916: FROM msc_alloc_temp
5917: WHERE demand_class IS NOT NULL)
5918: --bug3700564 added trunc
5919: AND TRUNC(AD.DEMAND_DATE) < p_itf
5920: AND P.PLAN_ID = AD.PLAN_ID

Line 5939: FROM msc_alloc_temp

5935: AND SA.INVENTORY_ITEM_ID in (p_member_id, p_family_id)
5936: AND SA.ORGANIZATION_ID = p_org_id
5937: AND SA.DEMAND_CLASS IN (
5938: SELECT demand_class
5939: FROM msc_alloc_temp
5940: WHERE demand_class IS NOT NULL)
5941: --bug3700564 added trunc
5942: AND TRUNC(SA.SUPPLY_DATE) < p_itf
5943: AND P.PLAN_ID = SA.PLAN_ID

Line 6069: MSC_ALLOC_TEMP TEMP,

6065: AD.DEMAND_CLASS col29, --bug3263368
6066: AD.REQUEST_DATE col30 --bug3263368
6067: FROM
6068: MSC_ALLOC_DEMANDS AD,
6069: MSC_ALLOC_TEMP TEMP,
6070: MSC_TRADING_PARTNERS MTP,--bug3263368
6071: MSC_TRADING_PARTNER_SITES MTPS, --bug3263368
6072: MSC_SYSTEM_ITEMS msi --bug3671294
6073: WHERE

Line 6134: MSC_ALLOC_TEMP TEMP,

6130: SA.DEMAND_CLASS col29, --bug3684383
6131: l_null_date col30 --bug3684383 -- Bug 3875786 - local variable used for NULL
6132: FROM
6133: MSC_ALLOC_SUPPLIES SA,
6134: MSC_ALLOC_TEMP TEMP,
6135: MSC_SYSTEM_ITEMS msi, --bug3671294
6136: MSC_TRADING_PARTNER_SITES MTPS, --bug3684383
6137: MSC_TRADING_PARTNERS MTP --bug3684383
6138: WHERE

Line 6629: MSC_ALLOC_TEMP TEMP,

6625: AD.DEMAND_CLASS col30, --bug3263368
6626: AD.REQUEST_DATE col31 --bug3263368
6627: FROM
6628: MSC_ALLOC_DEMANDS AD,
6629: MSC_ALLOC_TEMP TEMP,
6630: MSC_TRADING_PARTNERS MTP,--bug3263368
6631: MSC_TRADING_PARTNER_SITES MTPS, --bug3263368
6632: MSC_SYSTEM_ITEMS msi --bug3671294
6633: WHERE

Line 6739: MSC_ALLOC_TEMP TEMP,

6735: l_null_date col31 --bug3263368 ORIG_REQUEST_DATE -- Bug 3875786 - local variable used for NULL
6736:
6737: FROM
6738: MSC_ALLOC_SUPPLIES SA,
6739: MSC_ALLOC_TEMP TEMP,
6740: MSC_SYSTEM_ITEMS msi --bug3671294
6741: WHERE
6742: SA.PLAN_ID = p_plan_id
6743: AND SA.SR_INSTANCE_ID = p_instance_id

Line 7304: /* Clear msc_alloc_temp before use */

7300:
7301: -- Initializing API return code
7302: x_return_status := FND_API.G_RET_STS_SUCCESS;
7303:
7304: /* Clear msc_alloc_temp before use */
7305: DELETE msc_alloc_temp;
7306:
7307: IF p_table = MADT THEN
7308:

Line 7305: DELETE msc_alloc_temp;

7301: -- Initializing API return code
7302: x_return_status := FND_API.G_RET_STS_SUCCESS;
7303:
7304: /* Clear msc_alloc_temp before use */
7305: DELETE msc_alloc_temp;
7306:
7307: IF p_table = MADT THEN
7308:
7309: /* Do netting in SQL and insert original demand qtys in alloc temp table*/

Line 7310: INSERT INTO MSC_ALLOC_TEMP(

7306:
7307: IF p_table = MADT THEN
7308:
7309: /* Do netting in SQL and insert original demand qtys in alloc temp table*/
7310: INSERT INTO MSC_ALLOC_TEMP(
7311: demand_class,
7312: demand_id,
7313: supply_demand_quantity
7314: )

Line 7336: from msc_alloc_temp mat

7332: /* Now update original demand qtys in mrp_atp_details_temp table*/
7333: UPDATE mrp_atp_details_temp madt
7334: SET madt.original_demand_quantity =
7335: (select -1*mat.supply_demand_quantity
7336: from msc_alloc_temp mat
7337: where mat.demand_class = madt.demand_class
7338: and mat.demand_id = madt.identifier3)
7339: WHERE madt.session_id = p_session_id
7340: AND madt.supply_demand_type = 1

Line 7346: INSERT INTO MSC_ALLOC_TEMP(

7342:
7343: ELSIF p_table = MASDDT THEN
7344:
7345: /* Do netting in SQL and insert original demand qtys in alloc temp table*/
7346: INSERT INTO MSC_ALLOC_TEMP(
7347: demand_id,
7348: supply_demand_quantity
7349: )
7350: SELECT parent_demand_id,

Line 7366: from msc_alloc_temp mat

7362: /* Now update original demand qtys in msc_atp_sd_details_temp table*/
7363: UPDATE msc_atp_sd_details_temp masddt
7364: SET masddt.original_demand_quantity =
7365: (select -1*mat.supply_demand_quantity
7366: from msc_alloc_temp mat
7367: where mat.demand_id = masddt.identifier3)
7368: WHERE masddt.supply_demand_type = 1;
7369:
7370: END IF;

Line 9089: insert into msc_alloc_temp(

9085: -- initialize API return status to success
9086: x_return_status := FND_API.G_RET_STS_SUCCESS;
9087:
9088: /* populate allocated quantity for planned order at product family that are blown down as production forecasts*/
9089: insert into msc_alloc_temp(
9090: transaction_id,
9091: demand_class,
9092: supply_demand_quantity
9093: )

Line 9130: /* update msc_alloc_temp mat1

9126: );
9127:
9128: -- update allocation percentages
9129: --changed update statement for bug3387166
9130: /* update msc_alloc_temp mat1
9131: set mat1.allocation_percent =
9132: mat1.supply_demand_quantity/(select sum(mat2.supply_demand_quantity)
9133: from msc_alloc_temp mat2
9134: where mat2.transaction_id = mat1.transaction_id

Line 9133: from msc_alloc_temp mat2

9129: --changed update statement for bug3387166
9130: /* update msc_alloc_temp mat1
9131: set mat1.allocation_percent =
9132: mat1.supply_demand_quantity/(select sum(mat2.supply_demand_quantity)
9133: from msc_alloc_temp mat2
9134: where mat2.transaction_id = mat1.transaction_id
9135: ); */
9136: update msc_alloc_temp mat1
9137: set mat1.allocation_percent =

Line 9136: update msc_alloc_temp mat1

9132: mat1.supply_demand_quantity/(select sum(mat2.supply_demand_quantity)
9133: from msc_alloc_temp mat2
9134: where mat2.transaction_id = mat1.transaction_id
9135: ); */
9136: update msc_alloc_temp mat1
9137: set mat1.allocation_percent =
9138: (select mat1.supply_demand_quantity/sum(mat2.supply_demand_quantity)
9139: from msc_alloc_temp mat2
9140: where mat2.transaction_id = mat1.transaction_id

Line 9139: from msc_alloc_temp mat2

9135: ); */
9136: update msc_alloc_temp mat1
9137: set mat1.allocation_percent =
9138: (select mat1.supply_demand_quantity/sum(mat2.supply_demand_quantity)
9139: from msc_alloc_temp mat2
9140: where mat2.transaction_id = mat1.transaction_id
9141: );
9142:
9143: IF PG_DEBUG in ('Y', 'C') THEN

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

9140: where mat2.transaction_id = mat1.transaction_id
9141: );
9142:
9143: IF PG_DEBUG in ('Y', 'C') THEN
9144: msc_util.msc_log('Calculate_Alloc_Percentages: ' || 'Row Count in MSC_ALLOC_TEMP = '|| SQL%ROWCOUNT);
9145: msc_util.msc_log('*********End of procedure Calculate_Alloc_Percentages ********');
9146: END IF;
9147:
9148: EXCEPTION

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

9364:
9365: /* forecast at PF changes begin
9366: Changes to populate demand class allocation information in a temp table*/
9367: IF p_demand_priority = 'Y' THEN
9368: l_alloc_temp_table := 'MSC_ALLOC_TEMP_' || to_char(p_plan_id);
9369:
9370: msc_util.msc_log('temp table : ' || l_alloc_temp_table);
9371:
9372: /* Create temp table in tablespace of MSC_ALLOC_DEMANDS*/

Line 9460: msc_alloc_temp mat

9456: decode(mat.transaction_id, NULL, 1,
9457: mat.allocation_percent)
9458: from msc_full_pegging peg1,
9459: msc_demands d,
9460: msc_alloc_temp mat
9461: where peg1.plan_id = :p_plan_id
9462: and peg1.pegging_id = peg1.end_pegging_id
9463: and peg1.demand_id = d.demand_id
9464: and peg1.plan_id = d.plan_id

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

9505: msc_util.msc_log('Done creating indexes on temp table');
9506: msc_util.msc_log('Gather Table Stats');
9507:
9508: -- Use p_plan_id instead of l_plan_id
9509: --fnd_stats.gather_table_stats('MSC', 'MSC_ALLOC_TEMP_' || to_char(l_plan_id), granularity => 'ALL');
9510: fnd_stats.gather_table_stats('MSC', l_alloc_temp_table, granularity => 'ALL');
9511: END IF;
9512: /* forecast at PF changes end*/
9513: