DBA Data[Home] [Help]

APPS.MSC_ATP_PUB dependencies on MSC_ATP_PVT

Line 549: ) ;--4460369 + MSC_ATP_PVT.G_END_OF_DAY;

545: --x_atp_rec.Ship_Date(i) := p_atp_rec.Requested_Ship_Date(i);
546: x_atp_rec.ship_date(i) := TRUNC(NVL(p_atp_rec.requested_ship_date(i),
547: p_atp_rec.requested_arrival_date(i) -
548: NVL(p_atp_rec.delivery_lead_time(i),0))
549: ) ;--4460369 + MSC_ATP_PVT.G_END_OF_DAY;
550: --bug3609185 Setting the arrival date also.
551: x_atp_rec.arrival_date(i) := TRUNC(NVL(p_atp_rec.requested_arrival_date(i),
552: p_atp_rec.requested_ship_date(i) +
553: NVL(p_atp_rec.delivery_lead_time(i),0))

Line 554: );--4460369 + MSC_ATP_PVT.G_END_OF_DAY;

550: --bug3609185 Setting the arrival date also.
551: x_atp_rec.arrival_date(i) := TRUNC(NVL(p_atp_rec.requested_arrival_date(i),
552: p_atp_rec.requested_ship_date(i) +
553: NVL(p_atp_rec.delivery_lead_time(i),0))
554: );--4460369 + MSC_ATP_PVT.G_END_OF_DAY;
555:
556: IF p_atp_rec.ship_set_name(i) IS NOT NULL THEN
557: -- ship set, set the group date
558: x_atp_rec.group_ship_date(i) := p_atp_rec.requested_ship_date(i);

Line 590: decode(l_atp_rec.oe_flag(i),'Y',(Select decode(MSC_ATP_PVT.G_INV_CTP, 5, l_atp_rec.OE_FLAG(i),

586: values
587: (
588: msc.msc_oe_data_temp_s.NEXTVAL,
589: l_atp_rec.identifier(i),
590: decode(l_atp_rec.oe_flag(i),'Y',(Select decode(MSC_ATP_PVT.G_INV_CTP, 5, l_atp_rec.OE_FLAG(i),
591: decode( prha.interface_source_code, 'MRP', 'Y', 'MSC', 'Y','CTO', 'Y', 'CTO-LOWER LEVEL', 'Y', 'N')) --4889943
592: from po_requisition_headers_all prha
593: where prha.requisition_header_id = l_atp_rec.attribute_01(i))), --5008194/FP 5054154
594:

Line 760: x_atp_rec.Error_Code(i) := MSC_ATP_PVT.ATP_INVALID_OBJECTS;

756: END IF;
757: -- Step 2: Assign Error codes
758: FOR i IN 1..x_atp_rec.Calling_Module.LAST LOOP
759: IF ((NVL(x_atp_rec.Error_Code(i), -1)) in (-1,0,61,150)) THEN
760: x_atp_rec.Error_Code(i) := MSC_ATP_PVT.ATP_INVALID_OBJECTS;
761: END IF;
762: END LOOP;
763: -- Step 3 : Add error to UI display stack
764: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN

Line 800: x_atp_rec.Error_Code(i) := MSC_ATP_PVT.ATP_PROCESSING_ERROR;

796: END IF;
797: END IF;
798: FOR i IN 1..x_atp_rec.Calling_Module.LAST LOOP
799: IF ((NVL(x_atp_rec.Error_Code(i), -1)) in (-1,0,61,150)) THEN
800: x_atp_rec.Error_Code(i) := MSC_ATP_PVT.ATP_PROCESSING_ERROR;
801: END IF;
802: END LOOP;
803: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
804: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME , 'Call_ATP');

Line 1173: MSC_ATP_PVT.G_INSTANCE_ID := l_instance_id;

1169:
1170: END IF; ---bug3049003 end
1171: */
1172:
1173: MSC_ATP_PVT.G_INSTANCE_ID := l_instance_id;
1174:
1175: --- if MRP:ATP Database link profile option and mrp_ap_apps_instances table not in sync then
1176: --- raise an error
1177: /*IF (NVL(UPPER(l_a2m_dblink), -1) <> NVL(UPPER(G_DB_PROFILE), -1)) THEN

Line 1193: MSC_ATP_PVT.G_CALLING_MODULE := NVL(l_atp_rec.Calling_Module(1), -99);

1189: END IF;*/ --bug3049003 changed from G_DB_PROFILE to l_a2m_dblink
1190:
1191: END IF;
1192:
1193: MSC_ATP_PVT.G_CALLING_MODULE := NVL(l_atp_rec.Calling_Module(1), -99);
1194: SELECT mrp_ap_refresh_s.nextval
1195: INTO l_refresh_number
1196: FROM dual;
1197:

Line 1199: MSC_ATP_PVT.G_REFRESH_NUMBER := l_refresh_number;

1195: INTO l_refresh_number
1196: FROM dual;
1197:
1198: --s_cto_rearch: 24x7
1199: MSC_ATP_PVT.G_REFRESH_NUMBER := l_refresh_number;
1200: --e_cto_rearch: 24x7
1201:
1202:
1203: MSC_ATP_CTO.Check_Lines_For_CTO_ATP (l_atp_rec,

Line 1263: l_group_ship_date := TRUNC(sysdate);--4460369 + MSC_ATP_PVT.G_END_OF_DAY;

1259: l_start := l_atp_rec.ACTION.FIRST;
1260: MSC_ATP_PROC.Initialize_Set_Processing(l_atp_rec, l_start);
1261:
1262: -- bug 2748730. Initialize the group_ship_date and group_arrival_date to the end of day
1263: l_group_ship_date := TRUNC(sysdate);--4460369 + MSC_ATP_PVT.G_END_OF_DAY;
1264: l_group_arrival_date := TRUNC(sysdate);--4460369 + MSC_ATP_PVT.G_END_OF_DAY;
1265: -- Bug 2413888, 2281628
1266:
1267: j := l_atp_rec.inventory_item_id.FIRST;

Line 1264: l_group_arrival_date := TRUNC(sysdate);--4460369 + MSC_ATP_PVT.G_END_OF_DAY;

1260: MSC_ATP_PROC.Initialize_Set_Processing(l_atp_rec, l_start);
1261:
1262: -- bug 2748730. Initialize the group_ship_date and group_arrival_date to the end of day
1263: l_group_ship_date := TRUNC(sysdate);--4460369 + MSC_ATP_PVT.G_END_OF_DAY;
1264: l_group_arrival_date := TRUNC(sysdate);--4460369 + MSC_ATP_PVT.G_END_OF_DAY;
1265: -- Bug 2413888, 2281628
1266:
1267: j := l_atp_rec.inventory_item_id.FIRST;
1268:

Line 1294: l_atp_rec.error_code(j) := MSC_ATP_PVT.INVALID_ITEM_ORG_COMBINATION;

1290:
1291: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || ' Invalid Item Org Combo');
1292: END IF;
1293:
1294: l_atp_rec.error_code(j) := MSC_ATP_PVT.INVALID_ITEM_ORG_COMBINATION;
1295:
1296: l_end := j;
1297: IF PG_DEBUG in ('Y', 'C') THEN
1298: msc_sch_wb.atp_debug('identifier := ' || l_atp_rec.identifier(l_end));

Line 1328: MSC_ATP_PVT.process_time_stamp_errors(x_atp_rec, j);--4460369

1324: END IF;
1325:
1326:
1327: MSC_ATP_PROC.Process_Set_Line(x_atp_rec, j, l_line_status);
1328: MSC_ATP_PVT.process_time_stamp_errors(x_atp_rec, j);--4460369
1329: IF (x_atp_rec.ship_set_name(l_start) is not null or
1330: x_atp_rec.arrival_set_name(l_start) is not null) and
1331: (l_end - l_start > 0)
1332: THEN

Line 1639: ) + MSC_ATP_PVT.G_END_OF_DAY;

1635: Moved the code from here for ship_rec_cal inside else of override.
1636: x_atp_rec.ship_date(j) := TRUNC(NVL(x_atp_rec.requested_ship_date(j),
1637: (x_atp_rec.requested_arrival_date(j) -
1638: NVL(x_atp_rec.delivery_lead_time(j),0)))
1639: ) + MSC_ATP_PVT.G_END_OF_DAY;
1640:
1641: -- Bugs 2020607, 2104018, 2031894, 1869748
1642: -- Begin Changes
1643:

Line 1651: x_atp_rec.error_code(j) := MSC_ATP_PVT.NO_MATCHING_CAL_DATE;

1647: IF l_sysdate IS NULL THEN
1648: IF PG_DEBUG in ('Y', 'C') THEN
1649: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Next date not found in Calendar');
1650: END IF;
1651: x_atp_rec.error_code(j) := MSC_ATP_PVT.NO_MATCHING_CAL_DATE;
1652: RAISE NO_DATA_FOUND;
1653: END IF;
1654:
1655: IF x_atp_rec.ship_date(j) < l_sysdate THEN

Line 1667: x_atp_rec.error_code(j) := MSC_ATP_PVT.NO_MATCHING_CAL_DATE;

1663: IF l_prev_work_ship_date IS NULL THEN
1664: IF PG_DEBUG in ('Y', 'C') THEN
1665: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'prev date for ship date not found in Calendar');
1666: END IF;
1667: x_atp_rec.error_code(j) := MSC_ATP_PVT.NO_MATCHING_CAL_DATE;
1668: RAISE NO_DATA_FOUND;
1669: END IF;
1670:
1671: -- Bug 2194850, time stamp not updating for schedule ship date for non-atpable items

Line 1689: x_atp_rec.ship_date(j) := TRUNC(x_atp_rec.requested_ship_date(j));--4460369 + MSC_ATP_PVT.G_END_OF_DAY;

1685: /* Bug 3335268 - We dont require calendar/date calculation in unschedule cases */
1686: IF (x_atp_rec.quantity_ordered(j) = 0) THEN
1687:
1688: IF (x_atp_rec.requested_ship_date(j) is not null) THEN
1689: x_atp_rec.ship_date(j) := TRUNC(x_atp_rec.requested_ship_date(j));--4460369 + MSC_ATP_PVT.G_END_OF_DAY;
1690: x_atp_rec.arrival_date(j) := TRUNC(x_atp_rec.requested_ship_date(j));--4460369 + MSC_ATP_PVT.G_END_OF_DAY;
1691: x_atp_rec.latest_acceptable_date(j) := GREATEST(NVL(x_atp_rec.latest_acceptable_date(j),
1692: x_atp_rec.requested_ship_date(j)),x_atp_rec.requested_ship_date(j)); --5224773
1693: ELSE

Line 1690: x_atp_rec.arrival_date(j) := TRUNC(x_atp_rec.requested_ship_date(j));--4460369 + MSC_ATP_PVT.G_END_OF_DAY;

1686: IF (x_atp_rec.quantity_ordered(j) = 0) THEN
1687:
1688: IF (x_atp_rec.requested_ship_date(j) is not null) THEN
1689: x_atp_rec.ship_date(j) := TRUNC(x_atp_rec.requested_ship_date(j));--4460369 + MSC_ATP_PVT.G_END_OF_DAY;
1690: x_atp_rec.arrival_date(j) := TRUNC(x_atp_rec.requested_ship_date(j));--4460369 + MSC_ATP_PVT.G_END_OF_DAY;
1691: x_atp_rec.latest_acceptable_date(j) := GREATEST(NVL(x_atp_rec.latest_acceptable_date(j),
1692: x_atp_rec.requested_ship_date(j)),x_atp_rec.requested_ship_date(j)); --5224773
1693: ELSE
1694: x_atp_rec.ship_date(j) := TRUNC(x_atp_rec.requested_arrival_date(j));--4460369 + MSC_ATP_PVT.G_END_OF_DAY;

Line 1694: x_atp_rec.ship_date(j) := TRUNC(x_atp_rec.requested_arrival_date(j));--4460369 + MSC_ATP_PVT.G_END_OF_DAY;

1690: x_atp_rec.arrival_date(j) := TRUNC(x_atp_rec.requested_ship_date(j));--4460369 + MSC_ATP_PVT.G_END_OF_DAY;
1691: x_atp_rec.latest_acceptable_date(j) := GREATEST(NVL(x_atp_rec.latest_acceptable_date(j),
1692: x_atp_rec.requested_ship_date(j)),x_atp_rec.requested_ship_date(j)); --5224773
1693: ELSE
1694: x_atp_rec.ship_date(j) := TRUNC(x_atp_rec.requested_arrival_date(j));--4460369 + MSC_ATP_PVT.G_END_OF_DAY;
1695: x_atp_rec.arrival_date(j) := TRUNC(x_atp_rec.requested_arrival_date(j));--4460369 + MSC_ATP_PVT.G_END_OF_DAY;
1696: x_atp_rec.latest_acceptable_date(j) := GREATEST(NVL(x_atp_rec.latest_acceptable_date(j),
1697: x_atp_rec.requested_arrival_date(j)),x_atp_rec.requested_arrival_date(j)); --5224773
1698: END IF;

Line 1695: x_atp_rec.arrival_date(j) := TRUNC(x_atp_rec.requested_arrival_date(j));--4460369 + MSC_ATP_PVT.G_END_OF_DAY;

1691: x_atp_rec.latest_acceptable_date(j) := GREATEST(NVL(x_atp_rec.latest_acceptable_date(j),
1692: x_atp_rec.requested_ship_date(j)),x_atp_rec.requested_ship_date(j)); --5224773
1693: ELSE
1694: x_atp_rec.ship_date(j) := TRUNC(x_atp_rec.requested_arrival_date(j));--4460369 + MSC_ATP_PVT.G_END_OF_DAY;
1695: x_atp_rec.arrival_date(j) := TRUNC(x_atp_rec.requested_arrival_date(j));--4460369 + MSC_ATP_PVT.G_END_OF_DAY;
1696: x_atp_rec.latest_acceptable_date(j) := GREATEST(NVL(x_atp_rec.latest_acceptable_date(j),
1697: x_atp_rec.requested_arrival_date(j)),x_atp_rec.requested_arrival_date(j)); --5224773
1698: END IF;
1699:

Line 1702: IF MSC_ATP_PVT.G_USE_SHIP_REC_CAL='Y' and x_atp_rec.ship_method(j) is not null THEN

1698: END IF;
1699:
1700: ELSE
1701: -- Bug 4000425 Checking for Null ship method.
1702: IF MSC_ATP_PVT.G_USE_SHIP_REC_CAL='Y' and x_atp_rec.ship_method(j) is not null THEN
1703: -- Bug3593394 - Calculate only if parameters have changed
1704: IF (j=1)
1705: --bug 3979115: If previous line is for unscheduling then recalculate again
1706: --as we do not calculate these values for line marked for unscheduling

Line 1748: ELSIF l_customer_site_id IS NOT NULL AND MSC_ATP_PVT.G_USE_SHIP_REC_CAL='Y' THEN

1744: x_atp_rec.receiving_cal_code(j) := MSC_SATP_FUNC.src_get_calendar_code(null, null,
1745: Nvl(x_atp_rec.internal_org_id(j),l_to_organization_id),
1746: x_atp_rec.ship_method(j), MSC_CALENDAR.ORC);
1747: -- Bug 3449812 - handle case where both org and customer are null
1748: ELSIF l_customer_site_id IS NOT NULL AND MSC_ATP_PVT.G_USE_SHIP_REC_CAL='Y' THEN
1749: -- Bug 3647208 - Call CRC only if using ship/rec cal
1750: x_atp_rec.receiving_cal_code(j) := MSC_SATP_FUNC.src_get_calendar_code(l_customer_id, l_customer_site_id, null,
1751: x_atp_rec.ship_method(j), MSC_CALENDAR.CRC);
1752: ELSE

Line 1790: x_atp_rec.ship_date(j) := TRUNC(x_atp_rec.requested_ship_date(j));--4460369 + MSC_ATP_PVT.G_END_OF_DAY;

1786: IF (x_atp_rec.requested_ship_date(j) is not null) THEN
1787: -- ship_rec_cal project changes. Honor atleast VIC and CRC to compute right arrival date
1788: -- x_atp_rec.arrival_date(j) := x_atp_rec.ship_date(j) + x_atp_rec.delivery_lead_time(j);
1789:
1790: x_atp_rec.ship_date(j) := TRUNC(x_atp_rec.requested_ship_date(j));--4460369 + MSC_ATP_PVT.G_END_OF_DAY;
1791:
1792: x_atp_rec.arrival_date(j) := TRUNC(MSC_SATP_FUNC.SRC_THREE_STEP_CAL_OFFSET_DATE(
1793: x_atp_rec.ship_date(j), null, 0,
1794: x_atp_rec.intransit_cal_code(j), x_atp_rec.delivery_lead_time(j), 1,

Line 1796: ));--4460369 + MSC_ATP_PVT.G_END_OF_DAY;

1792: x_atp_rec.arrival_date(j) := TRUNC(MSC_SATP_FUNC.SRC_THREE_STEP_CAL_OFFSET_DATE(
1793: x_atp_rec.ship_date(j), null, 0,
1794: x_atp_rec.intransit_cal_code(j), x_atp_rec.delivery_lead_time(j), 1,
1795: x_atp_rec.receiving_cal_code(j), 1
1796: ));--4460369 + MSC_ATP_PVT.G_END_OF_DAY;
1797: ELSE
1798:
1799: -- ship_rec_cal project changes. Honor atleast VIC and OSC to compute right ship date
1800: x_atp_rec.arrival_date(j) := TRUNC(x_atp_rec.requested_arrival_date(j));--4460369 + MSC_ATP_PVT.G_END_OF_DAY;

Line 1800: x_atp_rec.arrival_date(j) := TRUNC(x_atp_rec.requested_arrival_date(j));--4460369 + MSC_ATP_PVT.G_END_OF_DAY;

1796: ));--4460369 + MSC_ATP_PVT.G_END_OF_DAY;
1797: ELSE
1798:
1799: -- ship_rec_cal project changes. Honor atleast VIC and OSC to compute right ship date
1800: x_atp_rec.arrival_date(j) := TRUNC(x_atp_rec.requested_arrival_date(j));--4460369 + MSC_ATP_PVT.G_END_OF_DAY;
1801:
1802: x_atp_rec.ship_date(j) := TRUNC(MSC_SATP_FUNC.SRC_THREE_STEP_CAL_OFFSET_DATE(
1803: x_atp_rec.arrival_date(j), null, 0,
1804: x_atp_rec.intransit_cal_code(j), -1 * x_atp_rec.delivery_lead_time(j), -1,

Line 1806: ));--4460369 + MSC_ATP_PVT.G_END_OF_DAY;

1802: x_atp_rec.ship_date(j) := TRUNC(MSC_SATP_FUNC.SRC_THREE_STEP_CAL_OFFSET_DATE(
1803: x_atp_rec.arrival_date(j), null, 0,
1804: x_atp_rec.intransit_cal_code(j), -1 * x_atp_rec.delivery_lead_time(j), -1,
1805: x_atp_rec.shipping_cal_code(j), -1
1806: ));--4460369 + MSC_ATP_PVT.G_END_OF_DAY;
1807:
1808: END IF;
1809: ELSE
1810: -- ship_rec_cal project changes begin

Line 1853: x_atp_rec.error_code(j) := MSC_ATP_PVT.NO_MATCHING_CAL_DATE;

1849: /*IF l_sysdate IS NULL OR l_sysdate_osc IS NULL or l_sysdate_orc IS NULL THEN
1850: IF PG_DEBUG in ('Y', 'C') THEN
1851: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Next date not found in Calendar');
1852: END IF;
1853: x_atp_rec.error_code(j) := MSC_ATP_PVT.NO_MATCHING_CAL_DATE;
1854: RAISE NO_DATA_FOUND;
1855: END IF;*/
1856:
1857: -- First compute the ship date without adding end of day.

Line 1943: if nvl(x_atp_rec.atp_lead_time(j), 0) > 0 and MSC_ATP_PVT.G_INV_CTP = 5

1939: msc_sch_wb.atp_debug('atp lead time := ' || x_atp_rec.atp_lead_time(j));
1940: END IF;
1941:
1942: -- 2833417 dsting add atp_lead_time if any
1943: if nvl(x_atp_rec.atp_lead_time(j), 0) > 0 and MSC_ATP_PVT.G_INV_CTP = 5
1944: and l_enforce_model_lt = 'Y' then
1945: -- we offset the lead time only in case of ODS ATP
1946: l_ato_ship_date := MSC_SATP_FUNC.src_date_offset(
1947: x_atp_rec.source_organization_id(j),

Line 1953: x_atp_rec.error_code(j) := MSC_ATP_PVT.NO_MATCHING_CAL_DATE;

1949: x_atp_rec.atp_lead_time(j));
1950: --bug3583705 not required.
1951: /*IF l_ato_ship_date IS NULL THEN
1952: msc_sch_wb.atp_debug('prev date for ship date not found in Calendar');
1953: x_atp_rec.error_code(j) := MSC_ATP_PVT.NO_MATCHING_CAL_DATE;
1954: RAISE NO_DATA_FOUND;
1955: END IF;*/
1956: else
1957: -- 2894867

Line 1967: x_atp_rec.ship_date(j) := TRUNC(GREATEST(x_atp_rec.ship_date(j), l_sysdate_osc, l_ato_ship_date));--4460369 + MSC_ATP_PVT.G_END_OF_DAY;

1963: -- 2833417
1964: -- As part of ship_rec_cal remove the redundant if clause and compute the arrival date here.
1965: -- Recompute the ship date and subsequently arrive date.
1966:
1967: x_atp_rec.ship_date(j) := TRUNC(GREATEST(x_atp_rec.ship_date(j), l_sysdate_osc, l_ato_ship_date));--4460369 + MSC_ATP_PVT.G_END_OF_DAY;
1968:
1969: x_atp_rec.arrival_date(j) := TRUNC(MSC_SATP_FUNC.SRC_THREE_STEP_CAL_OFFSET_DATE(
1970: x_atp_rec.ship_date(j), null, 0,
1971: x_atp_rec.intransit_cal_code(j), x_atp_rec.delivery_lead_time(j), 1,

Line 1973: ));--4460369 + MSC_ATP_PVT.G_END_OF_DAY;

1969: x_atp_rec.arrival_date(j) := TRUNC(MSC_SATP_FUNC.SRC_THREE_STEP_CAL_OFFSET_DATE(
1970: x_atp_rec.ship_date(j), null, 0,
1971: x_atp_rec.intransit_cal_code(j), x_atp_rec.delivery_lead_time(j), 1,
1972: x_atp_rec.receiving_cal_code(j), 1
1973: ));--4460369 + MSC_ATP_PVT.G_END_OF_DAY;
1974: --bug3439591 start
1975: IF((x_atp_rec.requested_ship_date(j) IS NOT NULL) AND
1976: (trunc(x_atp_rec.ship_date(j))
1977: > trunc(x_atp_rec.latest_acceptable_date(j)))

Line 1983: x_atp_rec.error_code(j) := MSC_ATP_PVT.ATP_ACCEPT_FAIL;

1979: ((x_atp_rec.requested_arrival_date(j)IS NOT NULL) AND
1980: (trunc(x_atp_rec.arrival_date(j))
1981: > trunc(x_atp_rec.latest_acceptable_date(j))))) THEN
1982:
1983: x_atp_rec.error_code(j) := MSC_ATP_PVT.ATP_ACCEPT_FAIL;
1984: x_atp_rec.requested_date_quantity(j) := 0;
1985: ELSE
1986: x_atp_rec.requested_date_quantity(j) := x_atp_rec.quantity_ordered(j);
1987: END IF;

Line 2026: x_atp_rec.error_code(j) :=MSC_ATP_PVT.ATP_NOT_APPL;

2022: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Within Ship Set '||x_atp_rec.ship_set_name(j));
2023: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'OR Arrival Set '||x_atp_rec.arrival_set_name(j));
2024: END IF;
2025:
2026: x_atp_rec.error_code(j) :=MSC_ATP_PVT.ATP_NOT_APPL;
2027: --bug 3365376: Pass earliest acceptable date as this date is used to calculate LAD for the line
2028: x_atp_rec.earliest_acceptable_date(j) := l_sysdate_osc; --bug3439591
2029: MSC_ATP_PROC.Process_Set_Line(x_atp_rec, j, l_line_status);
2030: MSC_ATP_PVT.process_time_stamp_errors(x_atp_rec, j);--4460369/4500382

Line 2030: MSC_ATP_PVT.process_time_stamp_errors(x_atp_rec, j);--4460369/4500382

2026: x_atp_rec.error_code(j) :=MSC_ATP_PVT.ATP_NOT_APPL;
2027: --bug 3365376: Pass earliest acceptable date as this date is used to calculate LAD for the line
2028: x_atp_rec.earliest_acceptable_date(j) := l_sysdate_osc; --bug3439591
2029: MSC_ATP_PROC.Process_Set_Line(x_atp_rec, j, l_line_status);
2030: MSC_ATP_PVT.process_time_stamp_errors(x_atp_rec, j);--4460369/4500382
2031: ELSE -- If in shipset or arrival set
2032: IF PG_DEBUG in ('Y', 'C') THEN
2033: msc_sch_wb.atp_debug('Call_ATP_No_Commit: Not a Set');
2034: msc_sch_wb.atp_debug('x_atp_rec.ship_date: ' || x_atp_rec.ship_date(j));

Line 2038: MSC_ATP_PVT.process_time_stamp_errors(x_atp_rec, j); --4967040:

2034: msc_sch_wb.atp_debug('x_atp_rec.ship_date: ' || x_atp_rec.ship_date(j));
2035: msc_sch_wb.atp_debug('x_atp_rec.arrival_date: ' || x_atp_rec.arrival_date(j));
2036: END IF;
2037:
2038: MSC_ATP_PVT.process_time_stamp_errors(x_atp_rec, j); --4967040:
2039: END IF;
2040:
2041: -- Bug 2413888, 2281628
2042: -- 3000016 set l_end when we reach the end of a set, not the beginning of the next set

Line 2091: WHEN MSC_ATP_PVT.NO_MATCHING_DATE_IN_CAL THEN

2087:
2088: END IF; -- IF NVL(g_atp_check, '@') = 'N' THEN
2089: j := l_atp_rec.inventory_item_id.NEXT(j);
2090: EXCEPTION --bug3583705 start
2091: WHEN MSC_ATP_PVT.NO_MATCHING_DATE_IN_CAL THEN
2092: IF PG_DEBUG in ('Y', 'C') THEN
2093: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || ' NO_MATCHING_DATE_IN_CAL');
2094: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_start: '||l_start);
2095: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'j: '||j);

Line 2108: x_atp_rec.error_code(l_end) := MSC_ATP_PVT.NO_MATCHING_CAL_DATE;

2104: mrp_atp_pvt.assign_atp_input_rec(l_atp_rec,l_end,x_atp_rec,x_return_status);
2105: END IF;
2106:
2107: IF (x_atp_rec.error_code(l_end) IS NULL) or (x_atp_rec.error_code(l_end) IN (0,61,150)) THEN
2108: x_atp_rec.error_code(l_end) := MSC_ATP_PVT.NO_MATCHING_CAL_DATE;
2109: END IF;
2110:
2111: l_end := l_atp_rec.inventory_item_id.next(l_end);
2112: IF PG_DEBUG in ('Y', 'C') THEN

Line 2155: x_atp_rec.error_code(l_end) := MSC_ATP_PVT.NO_MATCHING_CAL_DATE;

2151: END IF;
2152:
2153: IF (x_atp_rec.error_code(l_end) IS NULL) or (x_atp_rec.error_code(l_end) IN (0,61,150)) THEN
2154: IF l_msg_app='MRP' AND l_msg_name='GEN-DATE OUT OF BOUNDS' THEN
2155: x_atp_rec.error_code(l_end) := MSC_ATP_PVT.NO_MATCHING_CAL_DATE;
2156: IF PG_DEBUG in ('Y', 'C') THEN
2157: msc_sch_wb.atp_debug('Call_ATP_No_Commit: NO_MATCHING_CAL_DATE');
2158: END IF;
2159: ELSE

Line 2160: x_atp_rec.error_code(l_end) := MSC_ATP_PVT.ATP_PROCESSING_ERROR; -- ATP Processing Error

2156: IF PG_DEBUG in ('Y', 'C') THEN
2157: msc_sch_wb.atp_debug('Call_ATP_No_Commit: NO_MATCHING_CAL_DATE');
2158: END IF;
2159: ELSE
2160: x_atp_rec.error_code(l_end) := MSC_ATP_PVT.ATP_PROCESSING_ERROR; -- ATP Processing Error
2161: IF PG_DEBUG in ('Y', 'C') THEN
2162: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ATP_PROCESSING_ERROR');
2163: END IF;
2164: END IF;

Line 2270: MSC_ATP_PVT.G_REFRESH_NUMBER := l_refresh_number;

2266: INTO l_refresh_number
2267: FROM dual;
2268:
2269: --s_cto_rearch: 24x7
2270: MSC_ATP_PVT.G_REFRESH_NUMBER := l_refresh_number;
2271: --e_cto_rearch: 24x7
2272: */
2273:
2274: /* bug 3623018: Check if instance id is found or not. If not then raise an error */

Line 2289: -- MSC_ATP_PVT.Call_Schedule as part of changes to split ATP source and destination patches.

2285:
2286:
2287:
2288: -- ngoel 10/15/2001, modified to call MSC_NATP_PVT.Call_Schedule_New instead of
2289: -- MSC_ATP_PVT.Call_Schedule as part of changes to split ATP source and destination patches.
2290:
2291: MSC_NATP_PVT.Call_Schedule_New(
2292: p_session_id,
2293: l_atp_rec,

Line 2413: plsql_block := 'BEGIN MSC_ATP_PVT.CALL_SCHEDULE_REMOTE'

2409: /* added inv_ctp, default assignment set in procedure call for bug 2368426 starts */
2410: --bug3049003 changed from G_DB_PROFILE to l_a2m_dblink
2411: --Bug3593394 - Pass ship rec profile from source
2412: --bug3940999 removed profile parameters which are passed thru table
2413: plsql_block := 'BEGIN MSC_ATP_PVT.CALL_SCHEDULE_REMOTE'
2414: ||'@'||l_a2m_dblink||'(
2415: :session_id,
2416: :instance_id,
2417: :assign_set_id,

Line 2696: x_atp_rec.Error_Code(i) := MSC_ATP_PVT.ATP_INVALID_OBJECTS;

2692: END IF;
2693: END IF;
2694: FOR i IN 1..x_atp_rec.Action.COUNT LOOP
2695: IF NVL (x_atp_rec.error_code(i),-1) in (-1,0,61,150) THEN
2696: x_atp_rec.Error_Code(i) := MSC_ATP_PVT.ATP_INVALID_OBJECTS;
2697: END IF;
2698: END LOOP;
2699:
2700: --bug3520746 Delete temp records before exiting

Line 2797: x_atp_rec.Error_Code(i) := MSC_ATP_PVT.ATP_PROCESSING_ERROR;

2793: END IF;
2794: END IF;
2795: FOR i IN 1..x_atp_rec.Action.COUNT LOOP
2796: IF NVL (x_atp_rec.error_code(i),-1) in (-1,0,61,150) THEN
2797: x_atp_rec.Error_Code(i) := MSC_ATP_PVT.ATP_PROCESSING_ERROR;
2798: END IF;
2799: END LOOP;
2800: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
2801: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME , 'Call_ATP_No_Commit');