DBA Data[Home] [Help]

APPS.MSC_ATP_PVT dependencies on MRP_ATP_DETAILS_TEMP

Line 4011: update mrp_atp_details_temp

4007: l_atp_rec.error_code := ALLSUCCESS;
4008: --here we mark the constraint path for UI so that they can show the constraiend nodes
4009: ---bug 27744106: Improve the query for performance
4010: /*-- performance dsting merged queries, added distinct
4011: update mrp_atp_details_temp
4012: set constrained_path = 1
4013: where record_type = 3
4014: and session_id = MSC_ATP_PVT.G_SESSION_ID
4015: and pegging_id in

Line 4017: from mrp_atp_details_temp madt

4013: where record_type = 3
4014: and session_id = MSC_ATP_PVT.G_SESSION_ID
4015: and pegging_id in
4016: (select distinct madt.pegging_id
4017: from mrp_atp_details_temp madt
4018: where record_type = 3
4019: and session_id = MSC_ATP_PVT.G_SESSION_ID
4020: start with madt.pegging_id in (
4021: select pegging_id

Line 4022: from mrp_atp_details_temp madt1

4018: where record_type = 3
4019: and session_id = MSC_ATP_PVT.G_SESSION_ID
4020: start with madt.pegging_id in (
4021: select pegging_id
4022: from mrp_atp_details_temp madt1
4023: where session_id = MSC_ATP_PVT.G_SESSION_ID
4024: and record_type = 3
4025: and end_pegging_id = MSC_ATP_PVT.G_DEMAND_PEGGING_ID
4026: and constraint_type is not null)

Line 4031: UPDATE mrp_atp_details_temp

4027: connect by madt.pegging_id = PRIOR parent_pegging_id);
4028: */
4029: --3751114: replace hardcoded values with local varibales
4030: --- so that they do not show up as literals
4031: UPDATE mrp_atp_details_temp
4032: set constrained_path = l_constraint_path_flag
4033: where record_type = l_peg_record_type
4034: and session_id = MSC_ATP_PVT.G_SESSION_ID
4035: and pegging_id in

Line 4037: from mrp_atp_details_temp

4033: where record_type = l_peg_record_type
4034: and session_id = MSC_ATP_PVT.G_SESSION_ID
4035: and pegging_id in
4036: (select pegging_id
4037: from mrp_atp_details_temp
4038: where record_type = l_peg_record_type
4039: and session_id = MSC_ATP_PVT.G_SESSION_ID
4040: start with session_id = MSC_ATP_PVT.G_SESSION_ID
4041: and record_type = l_peg_record_type

Line 4377: FROM mrp_atp_details_temp

4373: /* Read demand_id from madt*/
4374: BEGIN
4375: SELECT identifier3
4376: INTO l_ship_arrival_date_rec.demand_id
4377: FROM mrp_atp_details_temp
4378: WHERE pegging_id = MSC_ATP_PVT.G_DEMAND_PEGGING_ID
4379: AND session_id = MSC_ATP_PVT.G_SESSION_ID
4380: AND record_type = 3;
4381: EXCEPTION

Line 6072: SELECT pegging_id INTO l_tmp_pegging_id FROM mrp_atp_details_temp

6068: -- x_atp_table.Error_Code(i) := GROUPEL_ERROR;
6069: --END IF;
6070: -- Remove invalid SD recs.
6071: BEGIN
6072: SELECT pegging_id INTO l_tmp_pegging_id FROM mrp_atp_details_temp
6073: WHERE session_id = MSC_ATP_PVT.G_SESSION_ID
6074: AND order_line_id = x_atp_table.identifier(i)
6075: AND parent_pegging_id is NULL
6076: AND record_type in (3,4);

Line 6218: SELECT pegging_id INTO l_tmp_pegging_id FROM mrp_atp_details_temp

6214: IF ((NVL(x_atp_table.Error_code(i),-1)) in (-1,0,61,150)) THEN
6215: x_atp_table.Error_Code(i) := ATP_INVALID_OBJECTS; -- NO OBJECTS FOUND
6216: END IF;
6217: BEGIN
6218: SELECT pegging_id INTO l_tmp_pegging_id FROM mrp_atp_details_temp
6219: WHERE session_id = MSC_ATP_PVT.G_SESSION_ID
6220: AND order_line_id = x_atp_table.identifier(i)
6221: AND parent_pegging_id is NULL
6222: AND record_type in (3,4);

Line 6374: SELECT pegging_id INTO l_tmp_pegging_id FROM mrp_atp_details_temp

6370: x_atp_table.error_code(i) in (0,61,150) THEN
6371: x_atp_table.Error_Code(i) := NO_MATCHING_CAL_DATE;
6372: END IF;
6373: BEGIN
6374: SELECT pegging_id INTO l_tmp_pegging_id FROM mrp_atp_details_temp
6375: WHERE session_id = MSC_ATP_PVT.G_SESSION_ID
6376: AND order_line_id = x_atp_table.identifier(i)
6377: AND parent_pegging_id is NULL
6378: AND record_type in (3,4);

Line 6548: SELECT pegging_id INTO l_tmp_pegging_id FROM mrp_atp_details_temp

6544: x_atp_table.error_code(i) in (0,61,150) THEN
6545: x_atp_table.Error_Code(i) := l_error_code;
6546: END IF;
6547: BEGIN
6548: SELECT pegging_id INTO l_tmp_pegging_id FROM mrp_atp_details_temp
6549: WHERE session_id = MSC_ATP_PVT.G_SESSION_ID
6550: AND order_line_id = x_atp_table.identifier(i)
6551: AND parent_pegging_id is NULL
6552: AND record_type in (3,4);

Line 6700: l_pegging_rec mrp_atp_details_temp%ROWTYPE;

6696: l_inv_item_id NUMBER;
6697:
6698: temp NUMBER;
6699: g_atp_record MRP_ATP_PVT.AtpRec;
6700: l_pegging_rec mrp_atp_details_temp%ROWTYPE;
6701: l_pegging_id NUMBER;
6702: l_parent_pegging_id NUMBER;
6703: l_atp_pegging_id NUMBER;
6704: l_future_pegging_id NUMBER;

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

9927: --AND p_parent_pegging_id is not null)
9928: --THEN
9929: --bug 3328421: required date contains the original request date
9930: -- actual_supply_demand_date contain the actual sd date
9931: --update mrp_atp_details_temp set required_date = TRUNC(l_atp_date_this_level) + MSC_ATP_PVT.G_END_OF_DAY
9932: update mrp_atp_details_temp set actual_supply_demand_date =
9933: TRUNC(l_atp_date_this_level)--4460369 + MSC_ATP_PVT.G_END_OF_DAY
9934: where session_id = MSC_ATP_PVT.G_SESSION_ID
9935: and pegging_id = l_pegging_id

Line 9932: update mrp_atp_details_temp set actual_supply_demand_date =

9928: --THEN
9929: --bug 3328421: required date contains the original request date
9930: -- actual_supply_demand_date contain the actual sd date
9931: --update mrp_atp_details_temp set required_date = TRUNC(l_atp_date_this_level) + MSC_ATP_PVT.G_END_OF_DAY
9932: update mrp_atp_details_temp set actual_supply_demand_date =
9933: TRUNC(l_atp_date_this_level)--4460369 + MSC_ATP_PVT.G_END_OF_DAY
9934: where session_id = MSC_ATP_PVT.G_SESSION_ID
9935: and pegging_id = l_pegging_id
9936: and record_type = 3;

Line 10813: update mrp_atp_details_temp

10809:
10810: IF l_return_status = MSC_ATP_PVT.CTO_OSS_ERROR Then
10811: --- Model has option specific sources which do not match with sourcing of model
10812: --update the demand pegging
10813: update mrp_atp_details_temp
10814: set error_code = MSC_ATP_PVT.OSS_ERROR_AT_THIS_LEVEL
10815: where session_id = MSC_ATP_PVT.G_SESSION_ID
10816: and pegging_id = l_pegging_id
10817: and record_type = 3;

Line 13330: --update mrp_atp_details_temp set required_date =

13326: --OR (NVL(C_ITEM_INFO_REC.cto_source_org_id, -1) <> p_atp_record.organization_id
13327: --AND p_parent_pegging_id is not null)
13328: THEN
13329: --bug 3328421: Update actual_supply_demand_date column
13330: --update mrp_atp_details_temp set required_date =
13331: update mrp_atp_details_temp set actual_supply_demand_date =
13332: TRUNC(p_atp_record.ship_date) + MSC_ATP_PVT.G_END_OF_DAY
13333: where session_id = MSC_ATP_PVT.G_SESSION_ID
13334: and pegging_id = l_parent_pegging_id

Line 13331: update mrp_atp_details_temp set actual_supply_demand_date =

13327: --AND p_parent_pegging_id is not null)
13328: THEN
13329: --bug 3328421: Update actual_supply_demand_date column
13330: --update mrp_atp_details_temp set required_date =
13331: update mrp_atp_details_temp set actual_supply_demand_date =
13332: TRUNC(p_atp_record.ship_date) + MSC_ATP_PVT.G_END_OF_DAY
13333: where session_id = MSC_ATP_PVT.G_SESSION_ID
13334: and pegging_id = l_parent_pegging_id
13335: and record_type = 3;

Line 13376: --update mrp_atp_details_temp set required_date =

13372: --OR (NVL(C_ITEM_INFO_REC.cto_source_org_id, -1) <> p_atp_record.organization_id
13373: --AND p_parent_pegging_id is not null)
13374: THEN
13375: --bug 3328421: update actual suply demand date
13376: --update mrp_atp_details_temp set required_date =
13377: update mrp_atp_details_temp set actual_supply_demand_date =
13378: TRUNC(l_ship_date) + MSC_ATP_PVT.G_END_OF_DAY
13379: where session_id = MSC_ATP_PVT.G_SESSION_ID
13380: and pegging_id = l_parent_pegging_id

Line 13377: update mrp_atp_details_temp set actual_supply_demand_date =

13373: --AND p_parent_pegging_id is not null)
13374: THEN
13375: --bug 3328421: update actual suply demand date
13376: --update mrp_atp_details_temp set required_date =
13377: update mrp_atp_details_temp set actual_supply_demand_date =
13378: TRUNC(l_ship_date) + MSC_ATP_PVT.G_END_OF_DAY
13379: where session_id = MSC_ATP_PVT.G_SESSION_ID
13380: and pegging_id = l_parent_pegging_id
13381: and record_type = 3;

Line 15586: UPDATE mrp_atp_details_temp

15582: END IF;
15583:
15584: --5553953
15585: --in order to update the demand id for the pegging line, otherwise demand will remain in the system
15586: UPDATE mrp_atp_details_temp
15587: SET identifier3 = l_demand_id
15588: WHERE pegging_id = l_substitutes_rec.pegging_id(l_index)
15589: AND session_id = MSC_ATP_PVT.G_SESSION_ID
15590: AND record_type = 3;

Line 15933: update mrp_atp_details_temp

15929: msc_sch_wb.atp_debug('ATP_Check: ' || 'Check this scenario, bacward case 2');
15930: msc_sch_wb.atp_debug('ATP_Check: ' || 'adjust demand record, l_parent_pegging_id = '||l_parent_pegging_id);
15931: END IF;
15932: /* bug 1235225
15933: update mrp_atp_details_temp
15934: set supply_demand_quantity =
15935: (supply_demand_quantity - l_net_demand)
15936: where session_id = MSC_ATP_PVT.G_SESSION_ID
15937: and pegging_id = l_parent_pegging_id

Line 15943: FROM mrp_atp_details_temp

15939: */
15940:
15941: SELECT supply_demand_quantity
15942: INTO l_peg_qty
15943: FROM mrp_atp_details_temp
15944: WHERE session_id = MSC_ATP_PVT.G_SESSION_ID
15945: AND pegging_id = l_parent_pegging_id
15946: AND record_type = 3;
15947:

Line 16067: --update mrp_atp_details_temp set required_date =

16063: --OR (NVL(C_ITEM_INFO_REC.cto_source_org_id, -1) <> p_atp_record.organization_id
16064: --AND p_parent_pegging_id is not null)
16065: --THEN
16066: --bug 3328421: update actual date
16067: --update mrp_atp_details_temp set required_date =
16068: update mrp_atp_details_temp set actual_supply_demand_date =
16069: TRUNC(p_atp_record.ship_date) + MSC_ATP_PVT.G_END_OF_DAY
16070: where session_id = MSC_ATP_PVT.G_SESSION_ID
16071: and pegging_id = l_parent_pegging_id

Line 16068: update mrp_atp_details_temp set actual_supply_demand_date =

16064: --AND p_parent_pegging_id is not null)
16065: --THEN
16066: --bug 3328421: update actual date
16067: --update mrp_atp_details_temp set required_date =
16068: update mrp_atp_details_temp set actual_supply_demand_date =
16069: TRUNC(p_atp_record.ship_date) + MSC_ATP_PVT.G_END_OF_DAY
16070: where session_id = MSC_ATP_PVT.G_SESSION_ID
16071: and pegging_id = l_parent_pegging_id
16072: and record_type = 3;

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

18564: END IF;
18565: MSC_ATP_PVT.G_COPY_DEMAND_ID := MRP_ATP_PUB.number_arr();
18566: MSC_ATP_PVT.G_COPY_DEMAND_PLAN_ID := MRP_ATP_PUB.number_arr();
18567:
18568: --Bug 3629191: Insert Offset Record to MRP_ATP_DETAILS_TEMP with record_type = 3
18569: -- and these will be inserted with NULL in all the three pegging_id columns
18570:
18571: IF PG_DEBUG in ('Y', 'C') THEN
18572: msc_sch_wb.atp_debug('Call_Schedule: G_OFF_DEM_TRANS_ID.count ' || G_OFF_DEM_TRANS_ID.count);

Line 18580: INSERT INTO MRP_ATP_DETAILS_TEMP(

18576: END IF;
18577:
18578: IF (MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y') THEN
18579: FORALL i in 1..G_OFF_DEM_TRANS_ID.count
18580: INSERT INTO MRP_ATP_DETAILS_TEMP(
18581: session_id,
18582: identifier1,
18583: identifier2,
18584: identifier3,

Line 18636: FROM mrp_atp_details_temp

18632: BEGIN
18633: -- Bug 3444096, use x_atp_table.match_item_id for match cases in CTO
18634: SELECT MAX(supply_demand_date)
18635: INTO l_avail_date
18636: FROM mrp_atp_details_temp
18637: WHERE session_id = p_session_id
18638: AND order_line_id = x_atp_table.identifier(k)
18639: AND parent_pegging_id = end_pegging_id
18640: AND supply_demand_type = 2

Line 18672: FROM mrp_atp_details_temp

18668: BEGIN
18669: -- Bug 3444096, use x_atp_table.match_item_id for match cases in CTO
18670: SELECT NVL(sum(NVL(allocated_quantity, 0)), 0)
18671: INTO l_stealing_qty
18672: FROM mrp_atp_details_temp
18673: WHERE session_id = p_session_id
18674: AND order_line_id = x_atp_table.identifier(k)
18675: AND parent_pegging_id = end_pegging_id
18676: AND char1 IS NOT NULL

Line 18698: -- Get the demand_id from mrp_atp_details_temp

18694: END IF; --IF MSC_ATP_PVT.G_ALLOCATED_ATP = 'Y' THEN
18695:
18696: IF NVL(l_wf_start, 'N') = 'Y' THEN
18697:
18698: -- Get the demand_id from mrp_atp_details_temp
18699: BEGIN
18700: -- Bug 3444096, use x_atp_table.match_item_id for match cases in CTO
18701: SELECT p_session_id ||':'||mrp_atp_schedule_temp_s.nextval,
18702: DECODE(x_atp_table.Requested_Ship_Date(k),

Line 18711: FROM mrp_atp_details_temp

18707: INTO l_wf_item_key,
18708: l_req_ship_date,
18709: l_exception_rec.demand_id,
18710: l_plan_id
18711: FROM mrp_atp_details_temp
18712: WHERE session_id = p_session_id
18713: AND order_line_id = x_atp_table.identifier(k)
18714: AND inventory_item_id = NVL(x_atp_table.match_item_id(k), x_atp_table.inventory_item_id(k))
18715: AND record_type = 3

Line 18830: -- Get the demand_id from mrp_atp_details_temp

18826: END IF;
18827: -- End 24x7
18828:
18829: If l_exception_rec.demand_id is null THEN
18830: -- Get the demand_id from mrp_atp_details_temp
18831: BEGIN
18832: -- Bug 3444096, use x_atp_table.match_item_id for match cases in CTO
18833: SELECT identifier3,
18834: identifier2

Line 18837: FROM mrp_atp_details_temp

18833: SELECT identifier3,
18834: identifier2
18835: INTO l_exception_rec.demand_id,
18836: l_plan_id
18837: FROM mrp_atp_details_temp
18838: WHERE session_id = p_session_id
18839: AND order_line_id = x_atp_table.identifier(k)
18840: AND inventory_item_id = NVL(x_atp_table.match_item_id(k), x_atp_table.inventory_item_id(k))
18841: AND record_type = 3

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

19365: IF PG_DEBUG in ('Y', 'C') THEN
19366: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'here');
19367: END IF;
19368: IF l_dblink IS NOT NULL THEN
19369: MSC_ATP_UTILS.Transfer_mrp_atp_details_temp(l_dblink, p_session_id);
19370: END IF;
19371:
19372: -- Bug 2387242 : krajan
19373: -- Set Sql Trace.