DBA Data[Home] [Help]

APPS.MSC_ATP_PVT dependencies on MRP_ATP_DETAILS_TEMP

Line 3420: update mrp_atp_details_temp

3416: l_atp_rec.error_code := ALLSUCCESS;
3417: --here we mark the constraint path for UI so that they can show the constraiend nodes
3418: ---bug 27744106: Improve the query for performance
3419: /*-- performance dsting merged queries, added distinct
3420: update mrp_atp_details_temp
3421: set constrained_path = 1
3422: where record_type = 3
3423: and session_id = MSC_ATP_PVT.G_SESSION_ID
3424: and pegging_id in

Line 3426: from mrp_atp_details_temp madt

3422: where record_type = 3
3423: and session_id = MSC_ATP_PVT.G_SESSION_ID
3424: and pegging_id in
3425: (select distinct madt.pegging_id
3426: from mrp_atp_details_temp madt
3427: where record_type = 3
3428: and session_id = MSC_ATP_PVT.G_SESSION_ID
3429: start with madt.pegging_id in (
3430: select pegging_id

Line 3431: from mrp_atp_details_temp madt1

3427: where record_type = 3
3428: and session_id = MSC_ATP_PVT.G_SESSION_ID
3429: start with madt.pegging_id in (
3430: select pegging_id
3431: from mrp_atp_details_temp madt1
3432: where session_id = MSC_ATP_PVT.G_SESSION_ID
3433: and record_type = 3
3434: and end_pegging_id = MSC_ATP_PVT.G_DEMAND_PEGGING_ID
3435: and constraint_type is not null)

Line 3440: UPDATE mrp_atp_details_temp

3436: connect by madt.pegging_id = PRIOR parent_pegging_id);
3437: */
3438: --3751114: replace hardcoded values with local varibales
3439: --- so that they do not show up as literals
3440: UPDATE mrp_atp_details_temp
3441: set constrained_path = l_constraint_path_flag
3442: where record_type = l_peg_record_type
3443: and session_id = MSC_ATP_PVT.G_SESSION_ID
3444: and pegging_id in

Line 3446: from mrp_atp_details_temp

3442: where record_type = l_peg_record_type
3443: and session_id = MSC_ATP_PVT.G_SESSION_ID
3444: and pegging_id in
3445: (select pegging_id
3446: from mrp_atp_details_temp
3447: where record_type = l_peg_record_type
3448: and session_id = MSC_ATP_PVT.G_SESSION_ID
3449: start with session_id = MSC_ATP_PVT.G_SESSION_ID
3450: and record_type = l_peg_record_type

Line 3776: FROM mrp_atp_details_temp

3772: /* Read demand_id from madt*/
3773: BEGIN
3774: SELECT identifier3
3775: INTO l_ship_arrival_date_rec.demand_id
3776: FROM mrp_atp_details_temp
3777: WHERE pegging_id = MSC_ATP_PVT.G_DEMAND_PEGGING_ID
3778: AND session_id = MSC_ATP_PVT.G_SESSION_ID
3779: AND record_type = 3;
3780: EXCEPTION

Line 5462: SELECT pegging_id INTO l_tmp_pegging_id FROM mrp_atp_details_temp

5458: -- x_atp_table.Error_Code(i) := GROUPEL_ERROR;
5459: --END IF;
5460: -- Remove invalid SD recs.
5461: BEGIN
5462: SELECT pegging_id INTO l_tmp_pegging_id FROM mrp_atp_details_temp
5463: WHERE session_id = MSC_ATP_PVT.G_SESSION_ID
5464: AND order_line_id = x_atp_table.identifier(i)
5465: AND parent_pegging_id is NULL
5466: AND record_type in (3,4);

Line 5606: SELECT pegging_id INTO l_tmp_pegging_id FROM mrp_atp_details_temp

5602: IF ((NVL(x_atp_table.Error_code(i),-1)) in (-1,0,61,150)) THEN
5603: x_atp_table.Error_Code(i) := ATP_INVALID_OBJECTS; -- NO OBJECTS FOUND
5604: END IF;
5605: BEGIN
5606: SELECT pegging_id INTO l_tmp_pegging_id FROM mrp_atp_details_temp
5607: WHERE session_id = MSC_ATP_PVT.G_SESSION_ID
5608: AND order_line_id = x_atp_table.identifier(i)
5609: AND parent_pegging_id is NULL
5610: AND record_type in (3,4);

Line 5760: SELECT pegging_id INTO l_tmp_pegging_id FROM mrp_atp_details_temp

5756: x_atp_table.error_code(i) in (0,61,150) THEN
5757: x_atp_table.Error_Code(i) := NO_MATCHING_CAL_DATE;
5758: END IF;
5759: BEGIN
5760: SELECT pegging_id INTO l_tmp_pegging_id FROM mrp_atp_details_temp
5761: WHERE session_id = MSC_ATP_PVT.G_SESSION_ID
5762: AND order_line_id = x_atp_table.identifier(i)
5763: AND parent_pegging_id is NULL
5764: AND record_type in (3,4);

Line 5932: SELECT pegging_id INTO l_tmp_pegging_id FROM mrp_atp_details_temp

5928: x_atp_table.error_code(i) in (0,61,150) THEN
5929: x_atp_table.Error_Code(i) := l_error_code;
5930: END IF;
5931: BEGIN
5932: SELECT pegging_id INTO l_tmp_pegging_id FROM mrp_atp_details_temp
5933: WHERE session_id = MSC_ATP_PVT.G_SESSION_ID
5934: AND order_line_id = x_atp_table.identifier(i)
5935: AND parent_pegging_id is NULL
5936: AND record_type in (3,4);

Line 6084: l_pegging_rec mrp_atp_details_temp%ROWTYPE;

6080: l_inv_item_id NUMBER;
6081:
6082: temp NUMBER;
6083: g_atp_record MRP_ATP_PVT.AtpRec;
6084: l_pegging_rec mrp_atp_details_temp%ROWTYPE;
6085: l_pegging_id NUMBER;
6086: l_parent_pegging_id NUMBER;
6087: l_atp_pegging_id NUMBER;
6088: l_future_pegging_id NUMBER;

Line 9226: --update mrp_atp_details_temp set required_date = TRUNC(l_atp_date_this_level) + MSC_ATP_PVT.G_END_OF_DAY

9222: --AND p_parent_pegging_id is not null)
9223: --THEN
9224: --bug 3328421: required date contains the original request date
9225: -- actual_supply_demand_date contain the actual sd date
9226: --update mrp_atp_details_temp set required_date = TRUNC(l_atp_date_this_level) + MSC_ATP_PVT.G_END_OF_DAY
9227: update mrp_atp_details_temp set actual_supply_demand_date =
9228: TRUNC(l_atp_date_this_level)--4460369 + MSC_ATP_PVT.G_END_OF_DAY
9229: where session_id = MSC_ATP_PVT.G_SESSION_ID
9230: and pegging_id = l_pegging_id

Line 9227: update mrp_atp_details_temp set actual_supply_demand_date =

9223: --THEN
9224: --bug 3328421: required date contains the original request date
9225: -- actual_supply_demand_date contain the actual sd date
9226: --update mrp_atp_details_temp set required_date = TRUNC(l_atp_date_this_level) + MSC_ATP_PVT.G_END_OF_DAY
9227: update mrp_atp_details_temp set actual_supply_demand_date =
9228: TRUNC(l_atp_date_this_level)--4460369 + MSC_ATP_PVT.G_END_OF_DAY
9229: where session_id = MSC_ATP_PVT.G_SESSION_ID
9230: and pegging_id = l_pegging_id
9231: and record_type = 3;

Line 10104: update mrp_atp_details_temp

10100:
10101: IF l_return_status = MSC_ATP_PVT.CTO_OSS_ERROR Then
10102: --- Model has option specific sources which do not match with sourcing of model
10103: --update the demand pegging
10104: update mrp_atp_details_temp
10105: set error_code = MSC_ATP_PVT.OSS_ERROR_AT_THIS_LEVEL
10106: where session_id = MSC_ATP_PVT.G_SESSION_ID
10107: and pegging_id = l_pegging_id
10108: and record_type = 3;

Line 12542: --update mrp_atp_details_temp set required_date =

12538: --OR (NVL(C_ITEM_INFO_REC.cto_source_org_id, -1) <> p_atp_record.organization_id
12539: --AND p_parent_pegging_id is not null)
12540: THEN
12541: --bug 3328421: Update actual_supply_demand_date column
12542: --update mrp_atp_details_temp set required_date =
12543: update mrp_atp_details_temp set actual_supply_demand_date =
12544: TRUNC(p_atp_record.ship_date) + MSC_ATP_PVT.G_END_OF_DAY
12545: where session_id = MSC_ATP_PVT.G_SESSION_ID
12546: and pegging_id = l_parent_pegging_id

Line 12543: update mrp_atp_details_temp set actual_supply_demand_date =

12539: --AND p_parent_pegging_id is not null)
12540: THEN
12541: --bug 3328421: Update actual_supply_demand_date column
12542: --update mrp_atp_details_temp set required_date =
12543: update mrp_atp_details_temp set actual_supply_demand_date =
12544: TRUNC(p_atp_record.ship_date) + MSC_ATP_PVT.G_END_OF_DAY
12545: where session_id = MSC_ATP_PVT.G_SESSION_ID
12546: and pegging_id = l_parent_pegging_id
12547: and record_type = 3;

Line 12588: --update mrp_atp_details_temp set required_date =

12584: --OR (NVL(C_ITEM_INFO_REC.cto_source_org_id, -1) <> p_atp_record.organization_id
12585: --AND p_parent_pegging_id is not null)
12586: THEN
12587: --bug 3328421: update actual suply demand date
12588: --update mrp_atp_details_temp set required_date =
12589: update mrp_atp_details_temp set actual_supply_demand_date =
12590: TRUNC(l_ship_date) + MSC_ATP_PVT.G_END_OF_DAY
12591: where session_id = MSC_ATP_PVT.G_SESSION_ID
12592: and pegging_id = l_parent_pegging_id

Line 12589: update mrp_atp_details_temp set actual_supply_demand_date =

12585: --AND p_parent_pegging_id is not null)
12586: THEN
12587: --bug 3328421: update actual suply demand date
12588: --update mrp_atp_details_temp set required_date =
12589: update mrp_atp_details_temp set actual_supply_demand_date =
12590: TRUNC(l_ship_date) + MSC_ATP_PVT.G_END_OF_DAY
12591: where session_id = MSC_ATP_PVT.G_SESSION_ID
12592: and pegging_id = l_parent_pegging_id
12593: and record_type = 3;

Line 14745: UPDATE mrp_atp_details_temp

14741: END IF;
14742:
14743: --5553953
14744: --in order to update the demand id for the pegging line, otherwise demand will remain in the system
14745: UPDATE mrp_atp_details_temp
14746: SET identifier3 = l_demand_id
14747: WHERE pegging_id = l_substitutes_rec.pegging_id(l_index)
14748: AND session_id = MSC_ATP_PVT.G_SESSION_ID
14749: AND record_type = 3;

Line 15084: update mrp_atp_details_temp

15080: msc_sch_wb.atp_debug('ATP_Check: ' || 'Check this scenario, bacward case 2');
15081: msc_sch_wb.atp_debug('ATP_Check: ' || 'adjust demand record, l_parent_pegging_id = '||l_parent_pegging_id);
15082: END IF;
15083: /* bug 1235225
15084: update mrp_atp_details_temp
15085: set supply_demand_quantity =
15086: (supply_demand_quantity - l_net_demand)
15087: where session_id = MSC_ATP_PVT.G_SESSION_ID
15088: and pegging_id = l_parent_pegging_id

Line 15094: FROM mrp_atp_details_temp

15090: */
15091:
15092: SELECT supply_demand_quantity
15093: INTO l_peg_qty
15094: FROM mrp_atp_details_temp
15095: WHERE session_id = MSC_ATP_PVT.G_SESSION_ID
15096: AND pegging_id = l_parent_pegging_id
15097: AND record_type = 3;
15098:

Line 15217: --update mrp_atp_details_temp set required_date =

15213: --OR (NVL(C_ITEM_INFO_REC.cto_source_org_id, -1) <> p_atp_record.organization_id
15214: --AND p_parent_pegging_id is not null)
15215: --THEN
15216: --bug 3328421: update actual date
15217: --update mrp_atp_details_temp set required_date =
15218: update mrp_atp_details_temp set actual_supply_demand_date =
15219: TRUNC(p_atp_record.ship_date) + MSC_ATP_PVT.G_END_OF_DAY
15220: where session_id = MSC_ATP_PVT.G_SESSION_ID
15221: and pegging_id = l_parent_pegging_id

Line 15218: update mrp_atp_details_temp set actual_supply_demand_date =

15214: --AND p_parent_pegging_id is not null)
15215: --THEN
15216: --bug 3328421: update actual date
15217: --update mrp_atp_details_temp set required_date =
15218: update mrp_atp_details_temp set actual_supply_demand_date =
15219: TRUNC(p_atp_record.ship_date) + MSC_ATP_PVT.G_END_OF_DAY
15220: where session_id = MSC_ATP_PVT.G_SESSION_ID
15221: and pegging_id = l_parent_pegging_id
15222: and record_type = 3;

Line 17694: --Bug 3629191: Insert Offset Record to MRP_ATP_DETAILS_TEMP with record_type = 3

17690: END IF;
17691: MSC_ATP_PVT.G_COPY_DEMAND_ID := MRP_ATP_PUB.number_arr();
17692: MSC_ATP_PVT.G_COPY_DEMAND_PLAN_ID := MRP_ATP_PUB.number_arr();
17693:
17694: --Bug 3629191: Insert Offset Record to MRP_ATP_DETAILS_TEMP with record_type = 3
17695: -- and these will be inserted with NULL in all the three pegging_id columns
17696:
17697: IF PG_DEBUG in ('Y', 'C') THEN
17698: msc_sch_wb.atp_debug('Call_Schedule: G_OFF_DEM_TRANS_ID.count ' || G_OFF_DEM_TRANS_ID.count);

Line 17706: INSERT INTO MRP_ATP_DETAILS_TEMP(

17702: END IF;
17703:
17704: IF (MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y') THEN
17705: FORALL i in 1..G_OFF_DEM_TRANS_ID.count
17706: INSERT INTO MRP_ATP_DETAILS_TEMP(
17707: session_id,
17708: identifier1,
17709: identifier2,
17710: identifier3,

Line 17762: FROM mrp_atp_details_temp

17758: BEGIN
17759: -- Bug 3444096, use x_atp_table.match_item_id for match cases in CTO
17760: SELECT MAX(supply_demand_date)
17761: INTO l_avail_date
17762: FROM mrp_atp_details_temp
17763: WHERE session_id = p_session_id
17764: AND order_line_id = x_atp_table.identifier(k)
17765: AND parent_pegging_id = end_pegging_id
17766: AND supply_demand_type = 2

Line 17798: FROM mrp_atp_details_temp

17794: BEGIN
17795: -- Bug 3444096, use x_atp_table.match_item_id for match cases in CTO
17796: SELECT NVL(sum(NVL(allocated_quantity, 0)), 0)
17797: INTO l_stealing_qty
17798: FROM mrp_atp_details_temp
17799: WHERE session_id = p_session_id
17800: AND order_line_id = x_atp_table.identifier(k)
17801: AND parent_pegging_id = end_pegging_id
17802: AND char1 IS NOT NULL

Line 17824: -- Get the demand_id from mrp_atp_details_temp

17820: END IF; --IF MSC_ATP_PVT.G_ALLOCATED_ATP = 'Y' THEN
17821:
17822: IF NVL(l_wf_start, 'N') = 'Y' THEN
17823:
17824: -- Get the demand_id from mrp_atp_details_temp
17825: BEGIN
17826: -- Bug 3444096, use x_atp_table.match_item_id for match cases in CTO
17827: SELECT p_session_id ||':'||mrp_atp_schedule_temp_s.nextval,
17828: DECODE(x_atp_table.Requested_Ship_Date(k),

Line 17837: FROM mrp_atp_details_temp

17833: INTO l_wf_item_key,
17834: l_req_ship_date,
17835: l_exception_rec.demand_id,
17836: l_plan_id
17837: FROM mrp_atp_details_temp
17838: WHERE session_id = p_session_id
17839: AND order_line_id = x_atp_table.identifier(k)
17840: AND inventory_item_id = NVL(x_atp_table.match_item_id(k), x_atp_table.inventory_item_id(k))
17841: AND record_type = 3

Line 17956: -- Get the demand_id from mrp_atp_details_temp

17952: END IF;
17953: -- End 24x7
17954:
17955: If l_exception_rec.demand_id is null THEN
17956: -- Get the demand_id from mrp_atp_details_temp
17957: BEGIN
17958: -- Bug 3444096, use x_atp_table.match_item_id for match cases in CTO
17959: SELECT identifier3,
17960: identifier2

Line 17963: FROM mrp_atp_details_temp

17959: SELECT identifier3,
17960: identifier2
17961: INTO l_exception_rec.demand_id,
17962: l_plan_id
17963: FROM mrp_atp_details_temp
17964: WHERE session_id = p_session_id
17965: AND order_line_id = x_atp_table.identifier(k)
17966: AND inventory_item_id = NVL(x_atp_table.match_item_id(k), x_atp_table.inventory_item_id(k))
17967: AND record_type = 3

Line 18489: MSC_ATP_UTILS.Transfer_mrp_atp_details_temp(l_dblink, p_session_id);

18485: IF PG_DEBUG in ('Y', 'C') THEN
18486: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'here');
18487: END IF;
18488: IF l_dblink IS NOT NULL THEN
18489: MSC_ATP_UTILS.Transfer_mrp_atp_details_temp(l_dblink, p_session_id);
18490: END IF;
18491:
18492: -- Bug 2387242 : krajan
18493: -- Set Sql Trace.