DBA Data[Home] [Help]

APPS.MSC_ATP_PUB dependencies on MSC_ATP_PVT

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

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

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

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

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

592: values
593: (
594: msc.msc_oe_data_temp_s.NEXTVAL,
595: l_atp_rec.identifier(i),
596: decode(l_atp_rec.oe_flag(i),'Y',(Select decode(MSC_ATP_PVT.G_INV_CTP, 5, l_atp_rec.OE_FLAG(i),
597: decode( prha.interface_source_code, 'MRP', 'Y', 'MSC', 'Y','CTO', 'Y', 'CTO-LOWER LEVEL', 'Y', 'N')) --4889943
598: from po_requisition_headers_all prha
599: where prha.requisition_header_id = l_atp_rec.attribute_01(i))), --5008194/FP 5054154
600:

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

777: END IF;
778: -- Step 2: Assign Error codes
779: FOR i IN 1..x_atp_rec.Calling_Module.LAST LOOP
780: IF ((NVL(x_atp_rec.Error_Code(i), -1)) in (-1,0,61,150)) THEN
781: x_atp_rec.Error_Code(i) := MSC_ATP_PVT.ATP_INVALID_OBJECTS;
782: END IF;
783: END LOOP;
784: -- Step 3 : Add error to UI display stack
785: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN

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

817: END IF;
818: END IF;
819: FOR i IN 1..x_atp_rec.Calling_Module.LAST LOOP
820: IF ((NVL(x_atp_rec.Error_Code(i), -1)) in (-1,0,61,150)) THEN
821: x_atp_rec.Error_Code(i) := MSC_ATP_PVT.ATP_PROCESSING_ERROR;
822: END IF;
823: END LOOP;
824: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
825: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME , 'Call_ATP');

Line 1053: MSC_ATP_PVT.G_INSTANCE_ID := l_instance_id;

1049: --Web Service, lets always set l_instance_id. For non-aps instances it will be NULL and hence
1050: --below ELSE condition will be taken care of.
1051: IF (p_atp_rec.attribute_02(1) = 3) THEN
1052: l_instance_id := p_atp_rec.instance_id(i);
1053: MSC_ATP_PVT.G_INSTANCE_ID := l_instance_id;
1054: END IF;
1055:
1056: IF NVL(p_atp_rec.Calling_Module(i), -99) = 724 THEN
1057:

Line 1202: MSC_ATP_PVT.G_INSTANCE_ID := l_instance_id;

1198:
1199: END IF; ---bug3049003 end
1200: */
1201:
1202: MSC_ATP_PVT.G_INSTANCE_ID := l_instance_id;
1203:
1204: --- if MRP:ATP Database link profile option and mrp_ap_apps_instances table not in sync then
1205: --- raise an error
1206: /*IF (NVL(UPPER(l_a2m_dblink), -1) <> NVL(UPPER(G_DB_PROFILE), -1)) THEN

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

1218: END IF;*/ --bug3049003 changed from G_DB_PROFILE to l_a2m_dblink
1219:
1220: END IF;
1221:
1222: MSC_ATP_PVT.G_CALLING_MODULE := NVL(l_atp_rec.Calling_Module(1), -99);
1223: SELECT mrp_ap_refresh_s.nextval
1224: INTO l_refresh_number
1225: FROM dual;
1226:

Line 1228: MSC_ATP_PVT.G_REFRESH_NUMBER := l_refresh_number;

1224: INTO l_refresh_number
1225: FROM dual;
1226:
1227: --s_cto_rearch: 24x7
1228: MSC_ATP_PVT.G_REFRESH_NUMBER := l_refresh_number;
1229: --e_cto_rearch: 24x7
1230:
1231:
1232: MSC_ATP_CTO.Check_Lines_For_CTO_ATP (l_atp_rec,

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

1288: l_start := l_atp_rec.ACTION.FIRST;
1289: MSC_ATP_PROC.Initialize_Set_Processing(l_atp_rec, l_start);
1290:
1291: -- bug 2748730. Initialize the group_ship_date and group_arrival_date to the end of day
1292: l_group_ship_date := TRUNC(sysdate);--4460369 + MSC_ATP_PVT.G_END_OF_DAY;
1293: l_group_arrival_date := TRUNC(sysdate);--4460369 + MSC_ATP_PVT.G_END_OF_DAY;
1294: -- Bug 2413888, 2281628
1295:
1296: j := l_atp_rec.inventory_item_id.FIRST;

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

1289: MSC_ATP_PROC.Initialize_Set_Processing(l_atp_rec, l_start);
1290:
1291: -- bug 2748730. Initialize the group_ship_date and group_arrival_date to the end of day
1292: l_group_ship_date := TRUNC(sysdate);--4460369 + MSC_ATP_PVT.G_END_OF_DAY;
1293: l_group_arrival_date := TRUNC(sysdate);--4460369 + MSC_ATP_PVT.G_END_OF_DAY;
1294: -- Bug 2413888, 2281628
1295:
1296: j := l_atp_rec.inventory_item_id.FIRST;
1297:

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

1319:
1320: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || ' Invalid Item Org Combo');
1321: END IF;
1322:
1323: l_atp_rec.error_code(j) := MSC_ATP_PVT.INVALID_ITEM_ORG_COMBINATION;
1324:
1325: l_end := j;
1326: IF PG_DEBUG in ('Y', 'C') THEN
1327: msc_sch_wb.atp_debug('identifier := ' || l_atp_rec.identifier(l_end));

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

1353: END IF;
1354:
1355:
1356: MSC_ATP_PROC.Process_Set_Line(x_atp_rec, j, l_line_status);
1357: MSC_ATP_PVT.process_time_stamp_errors(x_atp_rec, j);--4460369
1358: IF (x_atp_rec.ship_set_name(l_start) is not null or
1359: x_atp_rec.arrival_set_name(l_start) is not null) and
1360: (l_end - l_start > 0)
1361: THEN

Line 1668: ) + MSC_ATP_PVT.G_END_OF_DAY;

1664: Moved the code from here for ship_rec_cal inside else of override.
1665: x_atp_rec.ship_date(j) := TRUNC(NVL(x_atp_rec.requested_ship_date(j),
1666: (x_atp_rec.requested_arrival_date(j) -
1667: NVL(x_atp_rec.delivery_lead_time(j),0)))
1668: ) + MSC_ATP_PVT.G_END_OF_DAY;
1669:
1670: -- Bugs 2020607, 2104018, 2031894, 1869748
1671: -- Begin Changes
1672:

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

1676: IF l_sysdate IS NULL THEN
1677: IF PG_DEBUG in ('Y', 'C') THEN
1678: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Next date not found in Calendar');
1679: END IF;
1680: x_atp_rec.error_code(j) := MSC_ATP_PVT.NO_MATCHING_CAL_DATE;
1681: RAISE NO_DATA_FOUND;
1682: END IF;
1683:
1684: IF x_atp_rec.ship_date(j) < l_sysdate THEN

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

1692: IF l_prev_work_ship_date IS NULL THEN
1693: IF PG_DEBUG in ('Y', 'C') THEN
1694: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'prev date for ship date not found in Calendar');
1695: END IF;
1696: x_atp_rec.error_code(j) := MSC_ATP_PVT.NO_MATCHING_CAL_DATE;
1697: RAISE NO_DATA_FOUND;
1698: END IF;
1699:
1700: -- Bug 2194850, time stamp not updating for schedule ship date for non-atpable items

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

1714: /* Bug 3335268 - We dont require calendar/date calculation in unschedule cases */
1715: IF (x_atp_rec.quantity_ordered(j) = 0) THEN
1716:
1717: IF (x_atp_rec.requested_ship_date(j) is not null) THEN
1718: x_atp_rec.ship_date(j) := TRUNC(x_atp_rec.requested_ship_date(j));--4460369 + MSC_ATP_PVT.G_END_OF_DAY;
1719: x_atp_rec.arrival_date(j) := TRUNC(x_atp_rec.requested_ship_date(j));--4460369 + MSC_ATP_PVT.G_END_OF_DAY;
1720: x_atp_rec.latest_acceptable_date(j) := GREATEST(NVL(x_atp_rec.latest_acceptable_date(j),
1721: x_atp_rec.requested_ship_date(j)),x_atp_rec.requested_ship_date(j)); --5224773
1722: ELSE

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

1715: IF (x_atp_rec.quantity_ordered(j) = 0) THEN
1716:
1717: IF (x_atp_rec.requested_ship_date(j) is not null) THEN
1718: x_atp_rec.ship_date(j) := TRUNC(x_atp_rec.requested_ship_date(j));--4460369 + MSC_ATP_PVT.G_END_OF_DAY;
1719: x_atp_rec.arrival_date(j) := TRUNC(x_atp_rec.requested_ship_date(j));--4460369 + MSC_ATP_PVT.G_END_OF_DAY;
1720: x_atp_rec.latest_acceptable_date(j) := GREATEST(NVL(x_atp_rec.latest_acceptable_date(j),
1721: x_atp_rec.requested_ship_date(j)),x_atp_rec.requested_ship_date(j)); --5224773
1722: ELSE
1723: x_atp_rec.ship_date(j) := TRUNC(x_atp_rec.requested_arrival_date(j));--4460369 + MSC_ATP_PVT.G_END_OF_DAY;

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

1719: x_atp_rec.arrival_date(j) := TRUNC(x_atp_rec.requested_ship_date(j));--4460369 + MSC_ATP_PVT.G_END_OF_DAY;
1720: x_atp_rec.latest_acceptable_date(j) := GREATEST(NVL(x_atp_rec.latest_acceptable_date(j),
1721: x_atp_rec.requested_ship_date(j)),x_atp_rec.requested_ship_date(j)); --5224773
1722: ELSE
1723: x_atp_rec.ship_date(j) := TRUNC(x_atp_rec.requested_arrival_date(j));--4460369 + MSC_ATP_PVT.G_END_OF_DAY;
1724: x_atp_rec.arrival_date(j) := TRUNC(x_atp_rec.requested_arrival_date(j));--4460369 + MSC_ATP_PVT.G_END_OF_DAY;
1725: x_atp_rec.latest_acceptable_date(j) := GREATEST(NVL(x_atp_rec.latest_acceptable_date(j),
1726: x_atp_rec.requested_arrival_date(j)),x_atp_rec.requested_arrival_date(j)); --5224773
1727: END IF;

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

1720: x_atp_rec.latest_acceptable_date(j) := GREATEST(NVL(x_atp_rec.latest_acceptable_date(j),
1721: x_atp_rec.requested_ship_date(j)),x_atp_rec.requested_ship_date(j)); --5224773
1722: ELSE
1723: x_atp_rec.ship_date(j) := TRUNC(x_atp_rec.requested_arrival_date(j));--4460369 + MSC_ATP_PVT.G_END_OF_DAY;
1724: x_atp_rec.arrival_date(j) := TRUNC(x_atp_rec.requested_arrival_date(j));--4460369 + MSC_ATP_PVT.G_END_OF_DAY;
1725: x_atp_rec.latest_acceptable_date(j) := GREATEST(NVL(x_atp_rec.latest_acceptable_date(j),
1726: x_atp_rec.requested_arrival_date(j)),x_atp_rec.requested_arrival_date(j)); --5224773
1727: END IF;
1728:

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

1727: END IF;
1728:
1729: ELSE
1730: -- Bug 4000425 Checking for Null ship method.
1731: IF MSC_ATP_PVT.G_USE_SHIP_REC_CAL='Y' and x_atp_rec.ship_method(j) is not null THEN
1732: -- Bug3593394 - Calculate only if parameters have changed
1733: IF (j=1)
1734: --bug 3979115: If previous line is for unscheduling then recalculate again
1735: --as we do not calculate these values for line marked for unscheduling

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

1773: x_atp_rec.receiving_cal_code(j) := MSC_SATP_FUNC.src_get_calendar_code(null, null,
1774: Nvl(x_atp_rec.internal_org_id(j),l_to_organization_id),
1775: x_atp_rec.ship_method(j), MSC_CALENDAR.ORC);
1776: -- Bug 3449812 - handle case where both org and customer are null
1777: ELSIF l_customer_site_id IS NOT NULL AND MSC_ATP_PVT.G_USE_SHIP_REC_CAL='Y' THEN
1778: -- Bug 3647208 - Call CRC only if using ship/rec cal
1779: x_atp_rec.receiving_cal_code(j) := MSC_SATP_FUNC.src_get_calendar_code(l_customer_id, l_customer_site_id, null,
1780: x_atp_rec.ship_method(j), MSC_CALENDAR.CRC);
1781: ELSE

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

1815: IF (x_atp_rec.requested_ship_date(j) is not null) THEN
1816: -- ship_rec_cal project changes. Honor atleast VIC and CRC to compute right arrival date
1817: -- x_atp_rec.arrival_date(j) := x_atp_rec.ship_date(j) + x_atp_rec.delivery_lead_time(j);
1818:
1819: x_atp_rec.ship_date(j) := TRUNC(x_atp_rec.requested_ship_date(j));--4460369 + MSC_ATP_PVT.G_END_OF_DAY;
1820:
1821: x_atp_rec.arrival_date(j) := TRUNC(MSC_SATP_FUNC.SRC_THREE_STEP_CAL_OFFSET_DATE(
1822: x_atp_rec.ship_date(j), null, 0,
1823: x_atp_rec.intransit_cal_code(j), x_atp_rec.delivery_lead_time(j), 1,

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

1821: x_atp_rec.arrival_date(j) := TRUNC(MSC_SATP_FUNC.SRC_THREE_STEP_CAL_OFFSET_DATE(
1822: x_atp_rec.ship_date(j), null, 0,
1823: x_atp_rec.intransit_cal_code(j), x_atp_rec.delivery_lead_time(j), 1,
1824: x_atp_rec.receiving_cal_code(j), 1
1825: ));--4460369 + MSC_ATP_PVT.G_END_OF_DAY;
1826: ELSE
1827:
1828: -- ship_rec_cal project changes. Honor atleast VIC and OSC to compute right ship date
1829: x_atp_rec.arrival_date(j) := TRUNC(x_atp_rec.requested_arrival_date(j));--4460369 + MSC_ATP_PVT.G_END_OF_DAY;

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

1825: ));--4460369 + MSC_ATP_PVT.G_END_OF_DAY;
1826: ELSE
1827:
1828: -- ship_rec_cal project changes. Honor atleast VIC and OSC to compute right ship date
1829: x_atp_rec.arrival_date(j) := TRUNC(x_atp_rec.requested_arrival_date(j));--4460369 + MSC_ATP_PVT.G_END_OF_DAY;
1830:
1831: x_atp_rec.ship_date(j) := TRUNC(MSC_SATP_FUNC.SRC_THREE_STEP_CAL_OFFSET_DATE(
1832: x_atp_rec.arrival_date(j), null, 0,
1833: x_atp_rec.intransit_cal_code(j), -1 * x_atp_rec.delivery_lead_time(j), -1,

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

1831: x_atp_rec.ship_date(j) := TRUNC(MSC_SATP_FUNC.SRC_THREE_STEP_CAL_OFFSET_DATE(
1832: x_atp_rec.arrival_date(j), null, 0,
1833: x_atp_rec.intransit_cal_code(j), -1 * x_atp_rec.delivery_lead_time(j), -1,
1834: x_atp_rec.shipping_cal_code(j), -1
1835: ));--4460369 + MSC_ATP_PVT.G_END_OF_DAY;
1836:
1837: END IF;
1838: ELSE
1839: -- ship_rec_cal project changes begin

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

1878: /*IF l_sysdate IS NULL OR l_sysdate_osc IS NULL or l_sysdate_orc IS NULL THEN
1879: IF PG_DEBUG in ('Y', 'C') THEN
1880: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Next date not found in Calendar');
1881: END IF;
1882: x_atp_rec.error_code(j) := MSC_ATP_PVT.NO_MATCHING_CAL_DATE;
1883: RAISE NO_DATA_FOUND;
1884: END IF;*/
1885:
1886: -- First compute the ship date without adding end of day.

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

1968: msc_sch_wb.atp_debug('atp lead time := ' || x_atp_rec.atp_lead_time(j));
1969: END IF;
1970:
1971: -- 2833417 dsting add atp_lead_time if any
1972: if nvl(x_atp_rec.atp_lead_time(j), 0) > 0 and MSC_ATP_PVT.G_INV_CTP = 5
1973: and l_enforce_model_lt = 'Y' then
1974: -- we offset the lead time only in case of ODS ATP
1975: l_ato_ship_date := MSC_SATP_FUNC.src_date_offset(
1976: x_atp_rec.source_organization_id(j),

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

1978: x_atp_rec.atp_lead_time(j));
1979: --bug3583705 not required.
1980: /*IF l_ato_ship_date IS NULL THEN
1981: msc_sch_wb.atp_debug('prev date for ship date not found in Calendar');
1982: x_atp_rec.error_code(j) := MSC_ATP_PVT.NO_MATCHING_CAL_DATE;
1983: RAISE NO_DATA_FOUND;
1984: END IF;*/
1985: else
1986: -- 2894867

Line 1996: 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;

1992: -- 2833417
1993: -- As part of ship_rec_cal remove the redundant if clause and compute the arrival date here.
1994: -- Recompute the ship date and subsequently arrive date.
1995:
1996: 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;
1997:
1998: x_atp_rec.arrival_date(j) := TRUNC(MSC_SATP_FUNC.SRC_THREE_STEP_CAL_OFFSET_DATE(
1999: x_atp_rec.ship_date(j), null, 0,
2000: x_atp_rec.intransit_cal_code(j), x_atp_rec.delivery_lead_time(j), 1,

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

1998: x_atp_rec.arrival_date(j) := TRUNC(MSC_SATP_FUNC.SRC_THREE_STEP_CAL_OFFSET_DATE(
1999: x_atp_rec.ship_date(j), null, 0,
2000: x_atp_rec.intransit_cal_code(j), x_atp_rec.delivery_lead_time(j), 1,
2001: x_atp_rec.receiving_cal_code(j), 1
2002: ));--4460369 + MSC_ATP_PVT.G_END_OF_DAY;
2003: --bug3439591 start
2004: IF((x_atp_rec.requested_ship_date(j) IS NOT NULL) AND
2005: (trunc(x_atp_rec.ship_date(j))
2006: > trunc(x_atp_rec.latest_acceptable_date(j)))

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

2008: ((x_atp_rec.requested_arrival_date(j)IS NOT NULL) AND
2009: (trunc(x_atp_rec.arrival_date(j))
2010: > trunc(x_atp_rec.latest_acceptable_date(j))))) THEN
2011:
2012: x_atp_rec.error_code(j) := MSC_ATP_PVT.ATP_ACCEPT_FAIL;
2013: x_atp_rec.requested_date_quantity(j) := 0;
2014: ELSE
2015: x_atp_rec.requested_date_quantity(j) := x_atp_rec.quantity_ordered(j);
2016: END IF;

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

2051: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Within Ship Set '||x_atp_rec.ship_set_name(j));
2052: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'OR Arrival Set '||x_atp_rec.arrival_set_name(j));
2053: END IF;
2054:
2055: x_atp_rec.error_code(j) :=MSC_ATP_PVT.ATP_NOT_APPL;
2056: --bug 3365376: Pass earliest acceptable date as this date is used to calculate LAD for the line
2057: x_atp_rec.earliest_acceptable_date(j) := l_sysdate_osc; --bug3439591
2058: MSC_ATP_PROC.Process_Set_Line(x_atp_rec, j, l_line_status);
2059: MSC_ATP_PVT.process_time_stamp_errors(x_atp_rec, j);--4460369/4500382

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

2055: x_atp_rec.error_code(j) :=MSC_ATP_PVT.ATP_NOT_APPL;
2056: --bug 3365376: Pass earliest acceptable date as this date is used to calculate LAD for the line
2057: x_atp_rec.earliest_acceptable_date(j) := l_sysdate_osc; --bug3439591
2058: MSC_ATP_PROC.Process_Set_Line(x_atp_rec, j, l_line_status);
2059: MSC_ATP_PVT.process_time_stamp_errors(x_atp_rec, j);--4460369/4500382
2060: ELSE -- If in shipset or arrival set
2061: IF PG_DEBUG in ('Y', 'C') THEN
2062: msc_sch_wb.atp_debug('Call_ATP_No_Commit: Not a Set');
2063: msc_sch_wb.atp_debug('x_atp_rec.ship_date: ' || x_atp_rec.ship_date(j));

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

2063: msc_sch_wb.atp_debug('x_atp_rec.ship_date: ' || x_atp_rec.ship_date(j));
2064: msc_sch_wb.atp_debug('x_atp_rec.arrival_date: ' || x_atp_rec.arrival_date(j));
2065: END IF;
2066:
2067: MSC_ATP_PVT.process_time_stamp_errors(x_atp_rec, j); --4967040:
2068: END IF;
2069:
2070: -- Bug 2413888, 2281628
2071: -- 3000016 set l_end when we reach the end of a set, not the beginning of the next set

Line 2120: WHEN MSC_ATP_PVT.NO_MATCHING_DATE_IN_CAL THEN

2116:
2117: END IF; -- IF NVL(g_atp_check, '@') = 'N' THEN
2118: j := l_atp_rec.inventory_item_id.NEXT(j);
2119: EXCEPTION --bug3583705 start
2120: WHEN MSC_ATP_PVT.NO_MATCHING_DATE_IN_CAL THEN
2121: IF PG_DEBUG in ('Y', 'C') THEN
2122: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || ' NO_MATCHING_DATE_IN_CAL');
2123: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_start: '||l_start);
2124: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'j: '||j);

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

2133: mrp_atp_pvt.assign_atp_input_rec(l_atp_rec,l_end,x_atp_rec,x_return_status);
2134: END IF;
2135:
2136: IF (x_atp_rec.error_code(l_end) IS NULL) or (x_atp_rec.error_code(l_end) IN (0,61,150)) THEN
2137: x_atp_rec.error_code(l_end) := MSC_ATP_PVT.NO_MATCHING_CAL_DATE;
2138: END IF;
2139:
2140: l_end := l_atp_rec.inventory_item_id.next(l_end);
2141: IF PG_DEBUG in ('Y', 'C') THEN

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

2180: END IF;
2181:
2182: IF (x_atp_rec.error_code(l_end) IS NULL) or (x_atp_rec.error_code(l_end) IN (0,61,150)) THEN
2183: IF l_msg_app='MRP' AND l_msg_name='GEN-DATE OUT OF BOUNDS' THEN
2184: x_atp_rec.error_code(l_end) := MSC_ATP_PVT.NO_MATCHING_CAL_DATE;
2185: IF PG_DEBUG in ('Y', 'C') THEN
2186: msc_sch_wb.atp_debug('Call_ATP_No_Commit: NO_MATCHING_CAL_DATE');
2187: END IF;
2188: ELSE

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

2185: IF PG_DEBUG in ('Y', 'C') THEN
2186: msc_sch_wb.atp_debug('Call_ATP_No_Commit: NO_MATCHING_CAL_DATE');
2187: END IF;
2188: ELSE
2189: x_atp_rec.error_code(l_end) := MSC_ATP_PVT.ATP_PROCESSING_ERROR; -- ATP Processing Error
2190: IF PG_DEBUG in ('Y', 'C') THEN
2191: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ATP_PROCESSING_ERROR');
2192: END IF;
2193: END IF;

Line 2299: MSC_ATP_PVT.G_REFRESH_NUMBER := l_refresh_number;

2295: INTO l_refresh_number
2296: FROM dual;
2297:
2298: --s_cto_rearch: 24x7
2299: MSC_ATP_PVT.G_REFRESH_NUMBER := l_refresh_number;
2300: --e_cto_rearch: 24x7
2301: */
2302:
2303: /* bug 3623018: Check if instance id is found or not. If not then raise an error */

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

2314:
2315:
2316:
2317: -- ngoel 10/15/2001, modified to call MSC_NATP_PVT.Call_Schedule_New instead of
2318: -- MSC_ATP_PVT.Call_Schedule as part of changes to split ATP source and destination patches.
2319:
2320: MSC_NATP_PVT.Call_Schedule_New(
2321: p_session_id,
2322: l_atp_rec,

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

2438: /* added inv_ctp, default assignment set in procedure call for bug 2368426 starts */
2439: --bug3049003 changed from G_DB_PROFILE to l_a2m_dblink
2440: --Bug3593394 - Pass ship rec profile from source
2441: --bug3940999 removed profile parameters which are passed thru table
2442: plsql_block := 'BEGIN MSC_ATP_PVT.CALL_SCHEDULE_REMOTE'
2443: ||'@'||l_a2m_dblink||'(
2444: :session_id,
2445: :instance_id,
2446: :assign_set_id,

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

2726: END IF;
2727: END IF;
2728: FOR i IN 1..x_atp_rec.Action.COUNT LOOP
2729: IF NVL (x_atp_rec.error_code(i),-1) in (-1,0,61,150) THEN
2730: x_atp_rec.Error_Code(i) := MSC_ATP_PVT.ATP_INVALID_OBJECTS;
2731: END IF;
2732: END LOOP;
2733:
2734: --bug3520746 Delete temp records before exiting

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

2827: END IF;
2828: END IF;
2829: FOR i IN 1..x_atp_rec.Action.COUNT LOOP
2830: IF NVL (x_atp_rec.error_code(i),-1) in (-1,0,61,150) THEN
2831: x_atp_rec.Error_Code(i) := MSC_ATP_PVT.ATP_PROCESSING_ERROR;
2832: END IF;
2833: END LOOP;
2834: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
2835: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME , 'Call_ATP_No_Commit');