DBA Data[Home] [Help]

APPS.MSC_ATP_PUB dependencies on MSC_SATP_FUNC

Line 363: MSC_SATP_FUNC.get_dblink_profile(l_a2m_dblink,l_instance_id,l_return_status); --bug3049003 start

359: IF PG_DEBUG in ('Y', 'C') THEN
360: msc_sch_wb.atp_debug('Call_ATP_Commit: ' || 'Return Status : '||x_return_status);
361: END IF;
362:
363: MSC_SATP_FUNC.get_dblink_profile(l_a2m_dblink,l_instance_id,l_return_status); --bug3049003 start
364: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
365: IF PG_DEBUG in ('Y', 'C') THEN
366: msc_sch_wb.atp_debug('Call_ATP_Commit: ' || 'error in mrp_ap_apps_instances');
367: END IF;

Line 665: MSC_SATP_FUNC.get_dblink_profile(l_a2m_dblink,l_instance_id,l_return_status);

661: --5195929 Starts if it is OM scheduling and flag is set indicating donot commit.
662: IF nvl(p_atp_rec.Action(i),100) <> 100 and NVL(p_atp_rec.Calling_Module(i), -99) <> 724 and
663: nvl(l_atp_rec.attribute_14(1),2) = 1 THEN
664:
665: MSC_SATP_FUNC.get_dblink_profile(l_a2m_dblink,l_instance_id,l_return_status);
666:
667: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
668: IF PG_DEBUG in ('Y', 'C') THEN
669: msc_sch_wb.atp_debug('Call_ATP_Commit: ' || 'error in mrp_ap_apps_instances');

Line 1172: MSC_SATP_FUNC.get_dblink_profile(l_a2m_dblink,l_instance_id,l_return_status); --bug3049003 start

1168: RAISE FND_API.G_EXC_ERROR ;
1169: END;*/ --code commented for bug3049003
1170:
1171: -- Uncommenting get_dblink_profile for bug 3632914
1172: MSC_SATP_FUNC.get_dblink_profile(l_a2m_dblink,l_instance_id,l_return_status); --bug3049003 start
1173:
1174: IF PG_DEBUG in ('Y', 'C') THEN
1175: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_instance_id := ' || NVL(l_instance_id, -1));
1176: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_a2m_dblink := ' || l_a2m_dblink);

Line 1182: MSC_SATP_FUNC.put_src_to_dstn_profiles(p_session_id,

1178: END IF;
1179:
1180: --bug3940999 dumping the profiles on source
1181: IF l_a2m_dblink is not NULL THEN
1182: MSC_SATP_FUNC.put_src_to_dstn_profiles(p_session_id,
1183: l_return_status);
1184: END IF;
1185: IF PG_DEBUG in ('Y', 'C') THEN
1186: msc_sch_wb.atp_debug('Call_ATP_No_Commit : ' || 'l_return_status of put_src_to_dstn_profiles:= ' || l_return_status);

Line 1412: MSC_SATP_FUNC.Get_Regions (

1408: l_city := l_atp_rec.customer_city(j);
1409: l_postal_code := l_atp_rec.customer_postal_code(j);
1410: l_party_site_id := l_atp_rec.party_site_id(j);
1411:
1412: MSC_SATP_FUNC.Get_Regions (
1413: p_customer_site_id => l_atp_rec.customer_site_id(j),
1414: p_calling_module => NVL(l_atp_rec.calling_module(j), -99), -- Bug 2085071 Fix
1415: -- i.e. Source (ERP) or Destination (724)
1416: p_instance_id => l_instance_id,

Line 1553: l_from_location := MSC_SATP_FUNC.src_location_id(l_source_organization_id, null, null);

1549: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_customer_id : ' || l_customer_id);
1550: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_customer_site_id : ' || l_customer_site_id);
1551: END IF;
1552:
1553: l_from_location := MSC_SATP_FUNC.src_location_id(l_source_organization_id, null, null);
1554:
1555: IF PG_DEBUG in ('Y', 'C') THEN
1556: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_from_location : ' || l_from_location);
1557: END IF;

Line 1565: l_to_location := MSC_SATP_FUNC.src_location_id(NVL(x_atp_rec.internal_org_id(j),l_to_organization_id), null, null);

1561:
1562: -- Bug 3515520, don't use org in case customer/site is populated
1563: IF (x_atp_rec.internal_org_id(j) IS NOT NULL) OR
1564: (l_to_organization_id IS NOT NULL AND (l_customer_id IS NULL AND l_customer_site_id IS NULL)) THEN
1565: l_to_location := MSC_SATP_FUNC.src_location_id(NVL(x_atp_rec.internal_org_id(j),l_to_organization_id), null, null);
1566: ELSIF (l_customer_id IS NOT NULL AND l_customer_site_id IS NOT NULL) THEN --2814895
1567: l_to_location := MSC_SATP_FUNC.src_location_id(null, l_customer_id, l_customer_site_id);
1568: END IF;
1569:

Line 1567: l_to_location := MSC_SATP_FUNC.src_location_id(null, l_customer_id, l_customer_site_id);

1563: IF (x_atp_rec.internal_org_id(j) IS NOT NULL) OR
1564: (l_to_organization_id IS NOT NULL AND (l_customer_id IS NULL AND l_customer_site_id IS NULL)) THEN
1565: l_to_location := MSC_SATP_FUNC.src_location_id(NVL(x_atp_rec.internal_org_id(j),l_to_organization_id), null, null);
1566: ELSIF (l_customer_id IS NOT NULL AND l_customer_site_id IS NOT NULL) THEN --2814895
1567: l_to_location := MSC_SATP_FUNC.src_location_id(null, l_customer_id, l_customer_site_id);
1568: END IF;
1569:
1570: IF PG_DEBUG in ('Y', 'C') THEN
1571: msc_sch_wb.atp_debug('Call_ATP_NO_Commit: ' || 'l_to_location : ' || l_to_location);

Line 1586: MSC_SATP_FUNC.get_src_transit_time(

1582: OR l_country IS NULL )) THEN --2814895, added conditions for address parameter and party_site_id
1583: IF PG_DEBUG in ('Y', 'C') THEN
1584: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Inside Org code');
1585: END IF;
1586: MSC_SATP_FUNC.get_src_transit_time(
1587: l_source_organization_id,
1588: l_from_location,
1589: NVL(x_atp_rec.internal_org_id(j), l_to_organization_id), -- Bug 3515520
1590: -- x_atp_rec.internal_org_id(j) -- Bug 3515520

Line 1600: MSC_SATP_FUNC.get_src_transit_time(

1596: ELSIF ( l_customer_site_id is not NULL) THEN --2814895
1597: IF PG_DEBUG in ('Y', 'C') THEN
1598: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Inside customer code');
1599: END IF;
1600: MSC_SATP_FUNC.get_src_transit_time(
1601: l_source_organization_id,
1602: l_from_location,
1603: -- l_to_organization_id, -- Bug 3515520
1604: NULL, -- Bug 3515520

Line 1616: MSC_SATP_FUNC.get_src_transit_time(

1612: ELSIF ( l_party_site_id is not NULL) THEN --2814895
1613: IF PG_DEBUG in ('Y', 'C') THEN
1614: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Inside party_site code');
1615: END IF;
1616: MSC_SATP_FUNC.get_src_transit_time(
1617: l_source_organization_id,
1618: l_from_location,
1619: NULL,
1620: l_to_location,

Line 1631: MSC_SATP_FUNC.get_src_transit_time(

1627: ELSIF (l_country IS NOT NULL) THEN --2814895
1628: IF PG_DEBUG in ('Y', 'C') THEN
1629: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Inside address_parameter code');
1630: END IF;
1631: MSC_SATP_FUNC.get_src_transit_time(
1632: l_source_organization_id,
1633: l_from_location,
1634: NULL,
1635: l_to_location,

Line 1673: l_sysdate := MSC_SATP_FUNC.src_next_work_day(

1669:
1670: -- Bugs 2020607, 2104018, 2031894, 1869748
1671: -- Begin Changes
1672:
1673: l_sysdate := MSC_SATP_FUNC.src_next_work_day(
1674: x_atp_rec.source_organization_id(j),
1675: sysdate);
1676: IF l_sysdate IS NULL THEN
1677: IF PG_DEBUG in ('Y', 'C') THEN

Line 1689: l_prev_work_ship_date := MSC_SATP_FUNC.src_prev_work_day(

1685: x_atp_rec.requested_date_quantity(j) := 0;
1686: ELSE
1687: x_atp_rec.requested_date_quantity(j) := x_atp_rec.quantity_ordered(j);
1688: END IF;
1689: l_prev_work_ship_date := MSC_SATP_FUNC.src_prev_work_day(
1690: x_atp_rec.source_organization_id(J),
1691: x_atp_rec.ship_date(j));
1692: IF l_prev_work_ship_date IS NULL THEN
1693: IF PG_DEBUG in ('Y', 'C') THEN

Line 1738: x_atp_rec.intransit_cal_code(j) := MSC_SATP_FUNC.src_get_calendar_code(null, null, null,

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
1736: OR (x_atp_rec.quantity_ordered(j-1) = 0)
1737: OR (x_atp_rec.ship_method(j)<>x_atp_rec.ship_method(j-1)) THEN
1738: x_atp_rec.intransit_cal_code(j) := MSC_SATP_FUNC.src_get_calendar_code(null, null, null,
1739: x_atp_rec.ship_method(j), MSC_CALENDAR.VIC);
1740: ELSE
1741: x_atp_rec.intransit_cal_code(j) := x_atp_rec.intransit_cal_code(j-1);
1742: IF PG_DEBUG in ('Y', 'C') THEN

Line 1773: x_atp_rec.receiving_cal_code(j) := MSC_SATP_FUNC.src_get_calendar_code(null, null,

1769: msc_sch_wb.atp_debug('Call_ATP_NO_Commit: ' || 'Parameters have not changed for ORC/CRC');
1770: END IF;
1771: ELSIF (x_atp_rec.internal_org_id(j) IS NOT NULL) OR
1772: (l_to_organization_id IS NOT NULL AND l_customer_id IS NULL AND l_customer_site_id IS NULL) 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

Line 1779: x_atp_rec.receiving_cal_code(j) := MSC_SATP_FUNC.src_get_calendar_code(l_customer_id, l_customer_site_id, null,

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
1782: x_atp_rec.receiving_cal_code(j) := MSC_CALENDAR.FOC;
1783: END IF;

Line 1793: x_atp_rec.shipping_cal_code(j) := MSC_SATP_FUNC.src_get_calendar_code(null, null, l_source_organization_id,

1789: --as we do not calculate these values for line marked for unscheduling
1790: OR (x_atp_rec.quantity_ordered(j-1) = 0)
1791: OR NVL(x_atp_rec.ship_method(j),'@@@')<>NVL(x_atp_rec.ship_method(j-1),'@@@')
1792: OR x_atp_rec.source_organization_id(j) <> x_atp_rec.source_organization_id(j-1) THEN
1793: x_atp_rec.shipping_cal_code(j) := MSC_SATP_FUNC.src_get_calendar_code(null, null, l_source_organization_id,
1794: x_atp_rec.ship_method(j), MSC_CALENDAR.OSC);
1795: ELSE
1796: x_atp_rec.shipping_cal_code(j) := x_atp_rec.shipping_cal_code(j-1);
1797: IF PG_DEBUG in ('Y', 'C') THEN

Line 1821: x_atp_rec.arrival_date(j) := TRUNC(MSC_SATP_FUNC.SRC_THREE_STEP_CAL_OFFSET_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,
1824: x_atp_rec.receiving_cal_code(j), 1
1825: ));--4460369 + MSC_ATP_PVT.G_END_OF_DAY;

Line 1831: x_atp_rec.ship_date(j) := TRUNC(MSC_SATP_FUNC.SRC_THREE_STEP_CAL_OFFSET_DATE(

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,
1834: x_atp_rec.shipping_cal_code(j), -1
1835: ));--4460369 + MSC_ATP_PVT.G_END_OF_DAY;

Line 1846: l_sysdate := MSC_SATP_FUNC.src_next_work_day(

1842: --bug 3979115: If previous line is for unscheduling then recalculate again
1843: --as we do not calculate these values for line marked for unscheduling
1844: OR (x_atp_rec.quantity_ordered(j-1) = 0)
1845: OR x_atp_rec.source_organization_id(j)<>x_atp_rec.source_organization_id(j-1) THEN
1846: l_sysdate := MSC_SATP_FUNC.src_next_work_day(
1847: x_atp_rec.source_organization_id(j),
1848: l_trunc_sysdate);
1849: END IF;
1850:

Line 1859: l_sysdate_osc := MSC_SATP_FUNC.src_next_work_day(

1855: --bug 3979115: If previous line is for unscheduling then recalculate again
1856: --as we do not calculate these values for line marked for unscheduling
1857: OR (x_atp_rec.quantity_ordered(j-1) = 0)
1858: OR x_atp_rec.shipping_cal_code(j)<>x_atp_rec.shipping_cal_code(j-1) or l_sysdate_osc is null THEN
1859: l_sysdate_osc := MSC_SATP_FUNC.src_next_work_day(
1860: x_atp_rec.shipping_cal_code(j),
1861: l_trunc_sysdate);
1862: END IF;
1863:

Line 1872: l_sysdate_orc := MSC_SATP_FUNC.src_next_work_day(

1868: --bug 3979115: If previous line is for unscheduling then recalculate again
1869: --as we do not calculate these values for line marked for unscheduling
1870: OR (x_atp_rec.quantity_ordered(j-1) = 0)
1871: OR x_atp_rec.receiving_cal_code(j)<>x_atp_rec.receiving_cal_code(j-1) or l_sysdate_orc is null THEN
1872: l_sysdate_orc := MSC_SATP_FUNC.src_next_work_day(
1873: x_atp_rec.receiving_cal_code(j),
1874: l_trunc_sysdate); --bug3439591
1875: END IF;
1876:

Line 1888: x_atp_rec.ship_date(j) := MSC_SATP_FUNC.SRC_PREV_WORK_DAY(

1884: END IF;*/
1885:
1886: -- First compute the ship date without adding end of day.
1887: IF x_atp_rec.requested_ship_date(j) IS NOT NULL THEN
1888: x_atp_rec.ship_date(j) := MSC_SATP_FUNC.SRC_PREV_WORK_DAY(
1889: x_atp_rec.shipping_cal_code(j),
1890: x_atp_rec.requested_ship_date(j));
1891: ELSE
1892: x_atp_rec.ship_date(j) := MSC_SATP_FUNC.SRC_THREE_STEP_CAL_OFFSET_DATE(

Line 1892: x_atp_rec.ship_date(j) := MSC_SATP_FUNC.SRC_THREE_STEP_CAL_OFFSET_DATE(

1888: x_atp_rec.ship_date(j) := MSC_SATP_FUNC.SRC_PREV_WORK_DAY(
1889: x_atp_rec.shipping_cal_code(j),
1890: x_atp_rec.requested_ship_date(j));
1891: ELSE
1892: x_atp_rec.ship_date(j) := MSC_SATP_FUNC.SRC_THREE_STEP_CAL_OFFSET_DATE(
1893: x_atp_rec.requested_arrival_date(j), x_atp_rec.receiving_cal_code(j), -1,
1894: x_atp_rec.intransit_cal_code(j), -1 * x_atp_rec.delivery_lead_time(j), -1,
1895: x_atp_rec.shipping_cal_code(j), -1
1896: );

Line 1934: l_sysdate_orc_new := MSC_SATP_FUNC.SRC_THREE_STEP_CAL_OFFSET_DATE(

1930: x_atp_rec.requested_arrival_date(j)),x_atp_rec.requested_arrival_date(j),
1931: l_sysdate_orc);
1932: ELSE --bug4291375 If requested ship date is past due date then LAD needs to be offseted by the lead time.
1933: --calculate date after offset lead time
1934: l_sysdate_orc_new := MSC_SATP_FUNC.SRC_THREE_STEP_CAL_OFFSET_DATE(
1935: l_trunc_sysdate, x_atp_rec.shipping_cal_code(j), 1,
1936: x_atp_rec.intransit_cal_code(j), x_atp_rec.delivery_lead_time(j), 1,
1937: x_atp_rec.receiving_cal_code(j), 1
1938: );

Line 1975: l_ato_ship_date := MSC_SATP_FUNC.src_date_offset(

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),
1977: l_sysdate,
1978: x_atp_rec.atp_lead_time(j));
1979: --bug3583705 not required.

Line 1998: x_atp_rec.arrival_date(j) := TRUNC(MSC_SATP_FUNC.SRC_THREE_STEP_CAL_OFFSET_DATE(

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,
2001: x_atp_rec.receiving_cal_code(j), 1
2002: ));--4460369 + MSC_ATP_PVT.G_END_OF_DAY;