DBA Data[Home] [Help]

APPS.WIP_VALIDATEMLHEADER_PVT dependencies on WIP_DISCRETE_JOBS

Line 748: from wip_discrete_jobs wdj

744: -- Bug 15903332
745: /* update wip_job_schedule_interface wjsi
746: set wjsi.schedule_group_id =
747: (select wdj.schedule_group_id
748: from wip_discrete_jobs wdj
749: where wdj.wip_entity_id = wjsi.wip_entity_id
750: and wdj.organization_id = wjsi.organization_id),
751: wjsi.last_update_date = sysdate
752: where wjsi.group_id = p_groupID

Line 1062: from wip_discrete_jobs wdj

1058: wjsi.firm_planned_flag = WIP_CONSTANTS.YES)
1059: or (wjsi.firm_planned_flag = WIP_CONSTANTS.YES and
1060: wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB and
1061: WIP_CONSTANTS.NONSTANDARD = (select wdj.job_type
1062: from wip_discrete_jobs wdj
1063: where wdj.wip_entity_id = wjsi.wip_entity_id
1064: and wdj.organization_id = wjsi.organization_id))
1065: or (wjsi.firm_planned_flag not in (WIP_CONSTANTS.YES, WIP_CONSTANTS.NO)))
1066: returning wjsi.interface_id bulk collect into l_interfaceTbl;

Line 1140: from wip_discrete_jobs wdj

1136: end if;
1137:
1138: update wip_job_schedule_interface wjsi
1139: set primary_item_id = (select wdj.primary_item_id
1140: from wip_discrete_jobs wdj
1141: where wdj.organization_id = wjsi.organization_id
1142: and wdj.wip_entity_id = wjsi.wip_entity_id)
1143: where wjsi.group_id = p_groupID
1144: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION

Line 1325: from wip_discrete_jobs wdj

1321: and wjsi.status_type is null;
1322:
1323: update wip_job_schedule_interface wjsi
1324: set wjsi.status_type = (select wdj.status_type
1325: from wip_discrete_jobs wdj
1326: where wdj.wip_entity_id = wjsi.wip_entity_id
1327: and wdj.organization_id = wjsi.organization_id),
1328: wjsi.last_update_date = sysdate
1329: where wjsi.group_id = p_groupID

Line 1383: from wip_discrete_jobs wdj

1379: or (wjsi.load_type = wip_constants.create_ns_job and
1380: wjsi.routing_reference_id is not null) )
1381: and wjsi.routing_reference_segments is not null
1382: and WIP_CONSTANTS.NONSTANDARD <> (select wdj.job_type
1383: from wip_discrete_jobs wdj
1384: where wdj.wip_entity_id = wjsi.wip_entity_id
1385: and wdj.organization_id = wjsi.organization_id)
1386: returning wjsi.interface_id bulk collect into l_interfaceTbl;
1387:

Line 1405: from wip_discrete_jobs wdj

1401: wip_constants.create_sched,
1402: wip_constants.resched_job)
1403: and wjsi.routing_reference_id is not null
1404: and WIP_CONSTANTS.NONSTANDARD <> (select wdj.job_type
1405: from wip_discrete_jobs wdj
1406: where wdj.wip_entity_id = wjsi.wip_entity_id
1407: and wdj.organization_id = wjsi.organization_id)
1408: returning wjsi.interface_id bulk collect into l_interfaceTbl;
1409:

Line 1427: from wip_discrete_jobs wdj

1423: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1424: and (wjsi.load_type = WIP_CONSTANTS.CREATE_NS_JOB
1425: OR (wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB
1426: and WIP_CONSTANTS.NONSTANDARD = (select wdj.job_type
1427: from wip_discrete_jobs wdj
1428: where wdj.wip_entity_id = wjsi.wip_entity_id
1429: and wdj.organization_id = wjsi.organization_id)))
1430: and wjsi.routing_reference_segments is not null
1431: and wjsi.routing_reference_id is null

Line 1447: from wip_discrete_jobs wdj

1443: end if; /*p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)*/
1444: /* Modified for bug 5479283. When Null is passed for routing reference, old value is maintained. */
1445: update wip_job_schedule_interface wjsi
1446: set routing_reference_id = decode(wjsi.routing_reference_segments,null,(select wdj.routing_reference_id
1447: from wip_discrete_jobs wdj
1448: where wdj.wip_entity_id = wjsi.wip_entity_id
1449: and wdj.organization_id = wjsi.organization_id),
1450: (select inventory_item_id
1451: from mtl_system_items_kfv msik

Line 1461: from wip_discrete_jobs wdj

1457: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1458: and (wjsi.load_type = WIP_CONSTANTS.CREATE_NS_JOB
1459: OR (wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB and
1460: WIP_CONSTANTS.NONSTANDARD = (select wdj.job_type
1461: from wip_discrete_jobs wdj
1462: where wdj.wip_entity_id = wjsi.wip_entity_id
1463: and wdj.organization_id = wjsi.organization_id)))
1464: --and wjsi.routing_reference_segments is not null
1465: and wjsi.routing_reference_id is null ;

Line 1478: from wip_discrete_jobs wdj

1474: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1475: and (wjsi.load_type = WIP_CONSTANTS.CREATE_NS_JOB
1476: OR (wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB and
1477: WIP_CONSTANTS.NONSTANDARD = (select wdj.job_type
1478: from wip_discrete_jobs wdj
1479: where wdj.wip_entity_id = wjsi.wip_entity_id
1480: and wdj.organization_id = wjsi.organization_id)))
1481: and wjsi.routing_reference_id is not null
1482: and not exists (select 1

Line 1503: from wip_discrete_jobs wdj

1499: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1500: and (wjsi.load_type = WIP_CONSTANTS.CREATE_NS_JOB
1501: OR (wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB and
1502: WIP_CONSTANTS.NONSTANDARD = (select wdj.job_type
1503: from wip_discrete_jobs wdj
1504: where wdj.wip_entity_id = wjsi.wip_entity_id
1505: and wdj.organization_id = wjsi.organization_id)))
1506: and wjsi.routing_reference_id is not null
1507: and ('Y' <> (select msi.build_in_wip_flag

Line 1552: from wip_discrete_jobs wdj

1548: and bor.organization_id = wjsi.organization_id
1549: and bor.assembly_item_id = decode(wjsi.load_type,
1550: wip_constants.create_ns_job, wjsi.routing_reference_id,
1551: wip_constants.resched_job, decode((select wdj.job_type
1552: from wip_discrete_jobs wdj
1553: where wdj.organization_id = wjsi.organization_id
1554: and wdj.wip_entity_id = wjsi.wip_entity_id),
1555: 1, wjsi.primary_item_id, wjsi.routing_reference_id),
1556: wjsi.primary_item_id)

Line 1575: from wip_discrete_jobs wdj

1571: /*Modified for bug 5479283. When Null is passed for alt routing designator, old value is maintained.
1572: When g_miss_char is passed for alt routing designator, updated to primary routing/bom.*/
1573: update wip_job_schedule_interface wjsi
1574: set wjsi.alternate_routing_designator = decode(wjsi.alternate_routing_designator,fnd_api.g_miss_char,null,null,(select wdj.alternate_routing_designator
1575: from wip_discrete_jobs wdj
1576: where wdj.organization_id = wjsi.organization_id
1577: and wdj.wip_entity_id = wjsi.wip_entity_id),wjsi.alternate_routing_designator),
1578: wjsi.last_update_date = sysdate
1579: where wjsi.group_id = p_groupID

Line 1599: from wip_discrete_jobs wdj

1595: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1596: and wjsi.load_type = wip_constants.resched_job
1597: and nvl(wjsi.alternate_routing_designator, '@@-@@@') <>
1598: nvl( (select wdj.alternate_routing_designator
1599: from wip_discrete_jobs wdj
1600: where wdj.organization_id = wjsi.organization_id
1601: and wdj.wip_entity_id = wjsi.wip_entity_id), '@@-@@@')
1602: and (select status_type
1603: from wip_discrete_jobs wdj

Line 1603: from wip_discrete_jobs wdj

1599: from wip_discrete_jobs wdj
1600: where wdj.organization_id = wjsi.organization_id
1601: and wdj.wip_entity_id = wjsi.wip_entity_id), '@@-@@@')
1602: and (select status_type
1603: from wip_discrete_jobs wdj
1604: where wdj.organization_id = wjsi.organization_id
1605: and wdj.wip_entity_id = wjsi.wip_entity_id) <> 1
1606: returning wjsi.interface_id bulk collect into l_interfaceTbl;
1607:

Line 1637: from wip_discrete_jobs wdj

1633:
1634: /* Fix for bug 5020741. Do not default routing revision/revision date while updating jobs.
1635: update wip_job_schedule_interface wjsi
1636: set wjsi.routing_revision = (select wdj.routing_revision
1637: from wip_discrete_jobs wdj
1638: where wdj.organization_id = wjsi.organization_id
1639: and wdj.wip_entity_id = wjsi.wip_entity_id),
1640: wjsi.last_update_date = sysdate
1641: where wjsi.group_id = p_groupID

Line 1657: from wip_discrete_jobs wdj

1653: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1654: and wjsi.load_type = wip_constants.resched_job
1655: and nvl(wjsi.routing_revision, '@@-@@@') <>
1656: nvl( (select wdj.routing_revision
1657: from wip_discrete_jobs wdj
1658: where wdj.organization_id = wjsi.organization_id
1659: and wdj.wip_entity_id = wjsi.wip_entity_id), '@@-@@@')
1660: and (select status_type
1661: from wip_discrete_jobs wdj

Line 1661: from wip_discrete_jobs wdj

1657: from wip_discrete_jobs wdj
1658: where wdj.organization_id = wjsi.organization_id
1659: and wdj.wip_entity_id = wjsi.wip_entity_id), '@@-@@@')
1660: and (select status_type
1661: from wip_discrete_jobs wdj
1662: where wdj.organization_id = wjsi.organization_id
1663: and wdj.wip_entity_id = wjsi.wip_entity_id) <> 1
1664: returning wjsi.interface_id bulk collect into l_interfaceTbl;
1665:

Line 1673: from wip_discrete_jobs wdj

1669: end if;
1670:
1671: update wip_job_schedule_interface wjsi
1672: set wjsi.routing_revision_date = (select wdj.routing_revision_date
1673: from wip_discrete_jobs wdj
1674: where wdj.organization_id = wjsi.organization_id
1675: and wdj.wip_entity_id = wjsi.wip_entity_id),
1676: wjsi.last_update_date = sysdate
1677: where wjsi.group_id = p_groupID

Line 1693: from wip_discrete_jobs wdj

1689: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1690: and wjsi.load_type = wip_constants.resched_job
1691: and nvl(wjsi.routing_revision_date, fnd_api.g_miss_date) <>
1692: nvl((select wdj.routing_revision_date
1693: from wip_discrete_jobs wdj
1694: where wdj.organization_id = wjsi.organization_id
1695: and wdj.wip_entity_id = wjsi.wip_entity_id), fnd_api.g_miss_date)
1696: and (select wdj.status_type
1697: from wip_discrete_jobs wdj

Line 1697: from wip_discrete_jobs wdj

1693: from wip_discrete_jobs wdj
1694: where wdj.organization_id = wjsi.organization_id
1695: and wdj.wip_entity_id = wjsi.wip_entity_id), fnd_api.g_miss_date)
1696: and (select wdj.status_type
1697: from wip_discrete_jobs wdj
1698: where wdj.organization_id = wjsi.organization_id
1699: and wdj.wip_entity_id = wjsi.wip_entity_id) <> 1
1700: returning wjsi.interface_id bulk collect into l_interfaceTbl;
1701:

Line 1724: from wip_discrete_jobs wdj

1720: or (wjsi.load_type = wip_constants.create_ns_job and
1721: wjsi.bom_reference_id is not null) )
1722: and wjsi.bom_reference_segments is not null
1723: and WIP_CONSTANTS.NONSTANDARD <> (select wdj.job_type
1724: from wip_discrete_jobs wdj
1725: where wdj.wip_entity_id = wjsi.wip_entity_id
1726: and wdj.organization_id = wjsi.organization_id)
1727: returning wjsi.interface_id bulk collect into l_interfaceTbl;
1728:

Line 1746: from wip_discrete_jobs wdj

1742: wip_constants.create_sched,
1743: wip_constants.resched_job)
1744: and wjsi.bom_reference_id is not null
1745: and WIP_CONSTANTS.NONSTANDARD <> (select wdj.job_type
1746: from wip_discrete_jobs wdj
1747: where wdj.wip_entity_id = wjsi.wip_entity_id
1748: and wdj.organization_id = wjsi.organization_id)
1749: returning wjsi.interface_id bulk collect into l_interfaceTbl;
1750:

Line 1769: from wip_discrete_jobs wdj

1765: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1766: and (wjsi.load_type = WIP_CONSTANTS.CREATE_NS_JOB
1767: OR (wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB and
1768: WIP_CONSTANTS.NONSTANDARD = (select wdj.job_type
1769: from wip_discrete_jobs wdj
1770: where wdj.wip_entity_id = wjsi.wip_entity_id
1771: and wdj.organization_id = wjsi.organization_id)))
1772: and wjsi.bom_reference_segments is not null
1773: and wjsi.bom_reference_id is null

Line 1789: from wip_discrete_jobs wdj

1785: end if; /*p_validationLevel NOT IN (wip_constants.mrp, wip_constants.ato)*/
1786: /*Modified for bug 5479283. When Null is passed for bom reference, old value is maintained. */
1787: update wip_job_schedule_interface wjsi
1788: set bom_reference_id = decode(wjsi.bom_reference_segments,null,(select wdj.bom_reference_id
1789: from wip_discrete_jobs wdj
1790: where wdj.wip_entity_id = wjsi.wip_entity_id
1791: and wdj.organization_id = wjsi.organization_id),
1792: (select inventory_item_id
1793: from mtl_system_items_kfv msik

Line 1803: from wip_discrete_jobs wdj

1799: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1800: and (wjsi.load_type = WIP_CONSTANTS.CREATE_NS_JOB
1801: OR (wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB and
1802: WIP_CONSTANTS.NONSTANDARD = (select wdj.job_type
1803: from wip_discrete_jobs wdj
1804: where wdj.wip_entity_id = wjsi.wip_entity_id
1805: and wdj.organization_id = wjsi.organization_id)))
1806: --and wjsi.bom_reference_segments is not null
1807: and (wjsi.bom_reference_id is null or wjsi.bom_reference_id=fnd_api.g_miss_num);

Line 1820: from wip_discrete_jobs wdj

1816: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1817: and (wjsi.load_type = WIP_CONSTANTS.CREATE_NS_JOB
1818: OR (wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB and
1819: WIP_CONSTANTS.NONSTANDARD = (select wdj.job_type
1820: from wip_discrete_jobs wdj
1821: where wdj.wip_entity_id = wjsi.wip_entity_id
1822: and wdj.organization_id = wjsi.organization_id)))
1823: and wjsi.bom_reference_id is not null
1824: and not exists (select 1

Line 1845: from wip_discrete_jobs wdj

1841: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1842: and (wjsi.load_type = WIP_CONSTANTS.CREATE_NS_JOB
1843: OR (wjsi.load_type = WIP_CONSTANTS.RESCHED_JOB and
1844: WIP_CONSTANTS.NONSTANDARD = (select wdj.job_type
1845: from wip_discrete_jobs wdj
1846: where wdj.wip_entity_id = wjsi.wip_entity_id
1847: and wdj.organization_id = wjsi.organization_id)))
1848: and wjsi.bom_reference_id is not null
1849: and ('Y' <> (select msi.build_in_wip_flag

Line 1892: from wip_discrete_jobs wdj

1888: and bba.organization_id = wjsi.organization_id
1889: and bba.assembly_item_id = decode(wjsi.load_type,
1890: wip_constants.create_ns_job, wjsi.bom_reference_id,
1891: wip_constants.resched_job, decode((select wdj.job_type
1892: from wip_discrete_jobs wdj
1893: where wdj.organization_id = wjsi.organization_id
1894: and wdj.wip_entity_id = wjsi.wip_entity_id),
1895: 1, wjsi.primary_item_id, wjsi.bom_reference_id),
1896: wjsi.primary_item_id)

Line 1917: from wip_discrete_jobs wdj

1913:
1914: update wip_job_schedule_interface wjsi
1915: set wjsi.alternate_bom_designator = decode(wjsi.alternate_bom_designator,fnd_api.g_miss_char,null,null,
1916: (select wdj.alternate_bom_designator
1917: from wip_discrete_jobs wdj
1918: where wdj.organization_id = wjsi.organization_id
1919: and wdj.wip_entity_id = wjsi.wip_entity_id),wjsi.alternate_bom_designator),
1920: wjsi.last_update_date = sysdate
1921: where wjsi.group_id = p_groupID

Line 1939: from wip_discrete_jobs wdj

1935: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1936: and wjsi.load_type = wip_constants.resched_job
1937: and nvl(wjsi.alternate_bom_designator, '@@-@@@') <>
1938: nvl( (select wdj.alternate_bom_designator
1939: from wip_discrete_jobs wdj
1940: where wdj.organization_id = wjsi.organization_id
1941: and wdj.wip_entity_id = wjsi.wip_entity_id), '@@-@@@')
1942: and (select status_type
1943: from wip_discrete_jobs wdj

Line 1943: from wip_discrete_jobs wdj

1939: from wip_discrete_jobs wdj
1940: where wdj.organization_id = wjsi.organization_id
1941: and wdj.wip_entity_id = wjsi.wip_entity_id), '@@-@@@')
1942: and (select status_type
1943: from wip_discrete_jobs wdj
1944: where wdj.organization_id = wjsi.organization_id
1945: and wdj.wip_entity_id = wjsi.wip_entity_id) <> 1
1946: returning wjsi.interface_id bulk collect into l_interfaceTbl;
1947:

Line 1977: from wip_discrete_jobs wdj

1973:
1974: /* Fix for bug 5020741. Do not default bom revision/revision date while updating jobs.
1975: update wip_job_schedule_interface wjsi
1976: set wjsi.bom_revision = (select wdj.bom_revision
1977: from wip_discrete_jobs wdj
1978: where wdj.organization_id = wjsi.organization_id
1979: and wdj.wip_entity_id = wjsi.wip_entity_id),
1980: wjsi.last_update_date = sysdate
1981: where wjsi.group_id = p_groupID

Line 1997: from wip_discrete_jobs wdj

1993: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
1994: and wjsi.load_type = wip_constants.resched_job
1995: and nvl(wjsi.bom_revision, '@@-@@@') <>
1996: nvl( (select wdj.bom_revision
1997: from wip_discrete_jobs wdj
1998: where wdj.organization_id = wjsi.organization_id
1999: and wdj.wip_entity_id = wjsi.wip_entity_id), '@@-@@@')
2000: and (select status_type
2001: from wip_discrete_jobs wdj

Line 2001: from wip_discrete_jobs wdj

1997: from wip_discrete_jobs wdj
1998: where wdj.organization_id = wjsi.organization_id
1999: and wdj.wip_entity_id = wjsi.wip_entity_id), '@@-@@@')
2000: and (select status_type
2001: from wip_discrete_jobs wdj
2002: where wdj.organization_id = wjsi.organization_id
2003: and wdj.wip_entity_id = wjsi.wip_entity_id) <> 1
2004: returning wjsi.interface_id bulk collect into l_interfaceTbl;
2005:

Line 2013: from wip_discrete_jobs wdj

2009: end if;
2010:
2011: update wip_job_schedule_interface wjsi
2012: set wjsi.bom_revision_date = (select wdj.bom_revision_date
2013: from wip_discrete_jobs wdj
2014: where wdj.organization_id = wjsi.organization_id
2015: and wdj.wip_entity_id = wjsi.wip_entity_id),
2016: wjsi.last_update_date = sysdate
2017: where wjsi.group_id = p_groupID

Line 2033: from wip_discrete_jobs wdj

2029: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2030: and wjsi.load_type = wip_constants.resched_job
2031: and nvl(wjsi.bom_revision_date, fnd_api.g_miss_date) <>
2032: nvl( (select wdj.bom_revision_date
2033: from wip_discrete_jobs wdj
2034: where wdj.organization_id = wjsi.organization_id
2035: and wdj.wip_entity_id = wjsi.wip_entity_id), fnd_api.g_miss_date)
2036: and (select status_type
2037: from wip_discrete_jobs wdj

Line 2037: from wip_discrete_jobs wdj

2033: from wip_discrete_jobs wdj
2034: where wdj.organization_id = wjsi.organization_id
2035: and wdj.wip_entity_id = wjsi.wip_entity_id), fnd_api.g_miss_date)
2036: and (select status_type
2037: from wip_discrete_jobs wdj
2038: where wdj.organization_id = wjsi.organization_id
2039: and wdj.wip_entity_id = wjsi.wip_entity_id) <> 1
2040: returning wjsi.interface_id bulk collect into l_interfaceTbl;
2041:

Line 2130: from wip_discrete_jobs wdj

2126: and wjsi.start_quantity is not null
2127: and ( wjsi.load_type = wip_constants.create_sched
2128: or (wjsi.load_type = wip_constants.resched_job and
2129: (select wdj.status_type
2130: from wip_discrete_jobs wdj
2131: where wdj.organization_id = wjsi.organization_id
2132: and wdj.wip_entity_id = wjsi.wip_entity_id) not in
2133: (wip_constants.unreleased,
2134: wip_constants.released,

Line 2160: from wip_discrete_jobs wdj

2156: wjsi.start_quantity = 0)
2157: or (wjsi.load_type = wip_constants.resched_job and
2158: wjsi.start_quantity = 0 and
2159: wip_constants.standard = (select wdj.job_type
2160: from wip_discrete_jobs wdj
2161: where wdj.organization_id = wjsi.organization_id
2162: and wdj.wip_entity_id = wjsi.wip_entity_id)))
2163: returning wjsi.interface_id bulk collect into l_interfaceTbl;
2164:

Line 2179: from wip_discrete_jobs wdj

2175: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2176: and wjsi.load_type = wip_constants.resched_job
2177: and wjsi.start_quantity is not null
2178: and ( wjsi.start_quantity < (select wdj.quantity_completed
2179: from wip_discrete_jobs wdj
2180: where wdj.organization_id = wjsi.organization_id
2181: and wdj.wip_entity_id = wjsi.wip_entity_id)
2182: or (0 < (select count(*)
2183: from wip_reservations_v wr

Line 2230: from wip_discrete_jobs wdj

2226: update wip_job_schedule_interface wjsi
2227: set wjsi.net_quantity = (select decode(wdj.net_quantity,
2228: wdj.start_quantity, wjsi.start_quantity,
2229: least(wdj.net_quantity, nvl(wjsi.start_quantity, wdj.net_quantity)))
2230: from wip_discrete_jobs wdj
2231: where wdj.wip_entity_id = wjsi.wip_entity_id
2232: and wdj.organization_id = wjsi.organization_id),
2233: wjsi.last_update_date = sysdate
2234: where wjsi.group_id = p_groupID

Line 2261: from wip_discrete_jobs wdj

2257: and wjsi.load_type in (wip_constants.create_job,
2258: wip_constants.create_ns_job,
2259: wip_constants.resched_job)
2260: and ( wjsi.net_quantity not between 0 and (select nvl(wjsi.start_quantity,wdj.start_quantity)
2261: from wip_discrete_jobs wdj
2262: where wdj.organization_id = wjsi.organization_id
2263: and wdj.wip_entity_id = wjsi.wip_entity_id) /*Fix for Bug 6522139*/
2264: or ( wjsi.net_quantity <> 0
2265: and ((wjsi.load_type = wip_constants.create_ns_job and wjsi.primary_item_id is null) or

Line 2268: from wip_discrete_jobs wdj

2264: or ( wjsi.net_quantity <> 0
2265: and ((wjsi.load_type = wip_constants.create_ns_job and wjsi.primary_item_id is null) or
2266: (wjsi.load_type = wip_constants.resched_job and
2267: wip_constants.nonstandard = (select wdj.job_type
2268: from wip_discrete_jobs wdj
2269: where wdj.organization_id = wjsi.organization_id
2270: and wdj.wip_entity_id = wjsi.wip_entity_id) and
2271: (select wdj.primary_item_id
2272: from wip_discrete_jobs wdj

Line 2272: from wip_discrete_jobs wdj

2268: from wip_discrete_jobs wdj
2269: where wdj.organization_id = wjsi.organization_id
2270: and wdj.wip_entity_id = wjsi.wip_entity_id) and
2271: (select wdj.primary_item_id
2272: from wip_discrete_jobs wdj
2273: where wdj.organization_id = wjsi.organization_id
2274: and wdj.wip_entity_id = wjsi.wip_entity_id) is null))))
2275: returning wjsi.interface_id bulk collect into l_interfaceTbl;
2276:

Line 2402: from wip_discrete_jobs

2398: and wjsi.process_phase = WIP_CONSTANTS.ML_VALIDATION
2399: and wjsi.process_status in (WIP_CONSTANTS.RUNNING, WIP_CONSTANTS.WARNING)
2400: and wjsi.status_type = wip_constants.released
2401: and exists (select 1
2402: from wip_discrete_jobs
2403: where wip_entity_id = wjsi.wip_entity_id
2404: and organization_Id = wjsi.organization_id
2405: and (status_type IS NULL OR
2406: status_type NOT IN (wip_constants.released,wip_constants.comp_chrg,

Line 2848: from wip_discrete_jobs wdj

2844: and ((wjsi.load_type = wip_constants.create_ns_job and
2845: wjsi.routing_reference_id is null) or
2846: (wjsi.load_type = wip_constants.resched_job and
2847: (select wdj.job_type
2848: from wip_discrete_jobs wdj
2849: where wdj.organization_id = wjsi.organization_id
2850: and wdj.wip_entity_id = wjsi.wip_entity_id) = wip_constants.nonstandard and
2851: (select wdj.routing_reference_id
2852: from wip_discrete_jobs wdj

Line 2852: from wip_discrete_jobs wdj

2848: from wip_discrete_jobs wdj
2849: where wdj.organization_id = wjsi.organization_id
2850: and wdj.wip_entity_id = wjsi.wip_entity_id) = wip_constants.nonstandard and
2851: (select wdj.routing_reference_id
2852: from wip_discrete_jobs wdj
2853: where wdj.organization_id = wjsi.organization_id
2854: and wdj.wip_entity_id = wjsi.wip_entity_id) is null)))
2855: or (wjsi.scheduling_method = wip_constants.ml_manual
2856: and (wjsi.first_unit_start_date is null or

Line 2960: from wip_discrete_jobs wdj

2956: (wjsi.first_unit_start_date is null or wjsi.last_unit_completion_date is null))
2957: or (wjsi.load_type = wip_constants.resched_job and
2958: --when rescheduling a ns job and providing one date, it must have a routing
2959: wip_constants.nonstandard = (select wdj.job_type
2960: from wip_discrete_jobs wdj
2961: where wdj.organization_id = wjsi.organization_id
2962: and wdj.wip_entity_id = wjsi.wip_entity_id) and
2963: /* (select wdj.routing_reference_id
2964: from wip_discrete_jobs wdj

Line 2964: from wip_discrete_jobs wdj

2960: from wip_discrete_jobs wdj
2961: where wdj.organization_id = wjsi.organization_id
2962: and wdj.wip_entity_id = wjsi.wip_entity_id) and
2963: /* (select wdj.routing_reference_id
2964: from wip_discrete_jobs wdj
2965: where wdj.organization_id = wjsi.organization_id
2966: and wdj.wip_entity_id = wjsi.wip_entity_id) */ wjsi.routing_reference_id is null and
2967: (select count(*)
2968: from wip_operations

Line 3310: from wip_discrete_jobs wdj,

3306: wdj_row.completion_subinventory,
3307: wdj_row.completion_locator_id,
3308: wdj_row.build_sequence,
3309: wdj_row.class_code
3310: from wip_discrete_jobs wdj,
3311: wip_entities we
3312: where wdj.wip_entity_id = wjsi_row.wip_entity_id
3313: and we.wip_entity_id = wdj.wip_entity_id;
3314:

Line 3478: from wip_discrete_jobs wdj

3474: wjsi_row.scheduling_method = wip_constants.leadtime) then
3475: if wjsi_row.load_type = wip_constants.resched_job then
3476:
3477: select wdj.scheduled_start_date into wjsi_row.first_unit_start_date
3478: from wip_discrete_jobs wdj
3479: where wdj.wip_entity_id = wjsi_row.wip_entity_id;
3480:
3481: /* Estimate Completion Date */
3482: wip_calendar.estimate_leadtime(x_org_id => wjsi_row.organization_id,

Line 3586: wip_discrete_jobs wdj

3582: if ( wjsi_row.load_type = wip_constants.resched_job ) then
3583: select pa.task_id
3584: into wjsi_row.task_id
3585: from pa_tasks_expend_v pa,
3586: wip_discrete_jobs wdj
3587: where wdj.wip_entity_id = wjsi_row.wip_entity_id
3588: and pa.project_id = nvl(wjsi_row.project_id, wdj.project_id)
3589: and pa.task_number = wjsi_row.task_number;
3590: else

Line 3705: from wip_discrete_jobs wdj

3701: end if ;
3702: elsif ( wjsi_row.load_type = wip_constants.resched_job ) then
3703: select wdj.class_code
3704: into wjsi_row.class_code
3705: from wip_discrete_jobs wdj
3706: where wdj.wip_entity_id = wjsi_row.wip_entity_id
3707: and wdj.organization_id = wjsi_row.organization_id;
3708: end if;
3709: end if;

Line 3793: from wip_discrete_jobs

3789: wjsi_row.bom_revision_date IS NULL THEN
3790: BEGIN
3791: select bom_revision_date
3792: into wjsi_row.bom_revision_date
3793: from wip_discrete_jobs
3794: where wip_entity_id = wjsi_row.wip_entity_id;
3795: EXCEPTION
3796: WHEN OTHERS THEN
3797: wjsi_row.bom_revision_date := NULL;

Line 3856: from wip_discrete_jobs

3852: wjsi_row.routing_revision_date IS NULL THEN
3853: BEGIN
3854: select routing_revision_date
3855: into wjsi_row.routing_revision_date
3856: from wip_discrete_jobs
3857: where wip_entity_id = wjsi_row.wip_entity_id;
3858: EXCEPTION
3859: WHEN OTHERS THEN
3860: wjsi_row.routing_revision_date := NULL;

Line 3969: from wip_discrete_jobs

3965: */
3966: begin
3967: select status_type
3968: into l_old_status
3969: from wip_discrete_jobs
3970: where wip_entity_id = wjsi_row.wip_entity_id ;
3971: end ;
3972: /* Bug 13075675 -> Give warning when job linked to SO is being completed,
3973: * and give error when job linked to SO is being cancelled or

Line 4186: from wip_discrete_jobs wdj

4182: if ( wjsi_row.end_item_unit_number is null) then
4183: begin
4184: select wdj.end_item_unit_number
4185: into wjsi_row.end_item_unit_number
4186: from wip_discrete_jobs wdj
4187: where wdj.wip_entity_id = wjsi_row.wip_entity_id;
4188: exception
4189: when others then
4190: fnd_message.set_name('PJM', 'UEFF-UNIT NUMBER INVALID');

Line 4202: from wip_discrete_jobs

4198: wjsi_row.end_item_unit_number is not null ) then
4199: -- bug#2719927, bom revision code/reexplosion is based on bom_reference_id
4200: select primary_item_id
4201: into wjsi_row.bom_reference_id
4202: from wip_discrete_jobs
4203: where wip_entity_id = wjsi_row.wip_entity_id;
4204: end if;
4205:
4206: if ( wjsi_row.status_type <> wip_constants.unreleased and

Line 4212: -- Added code to get the end unit item number from wip_discrete_jobs and populate

4208: fnd_message.set_name('WIP', 'END_ITEM_UNIT_NUMBER');
4209: setInterfaceError(p_rowid, wjsi_row.interface_id, x_errorMsg, validationWarning);
4210: -- Added by Renga Kannan
4211: -- Fixed for bug 5332672
4212: -- Added code to get the end unit item number from wip_discrete_jobs and populate
4213: -- to interface table
4214:
4215: begin
4216: select end_item_unit_number into wjsi_row.end_item_unit_number

Line 4217: from wip_discrete_jobs

4213: -- to interface table
4214:
4215: begin
4216: select end_item_unit_number into wjsi_row.end_item_unit_number
4217: from wip_discrete_jobs
4218: where wip_entity_id =
4219: (select wip_entity_id
4220: from wip_job_schedule_interface
4221: where rowid = p_rowid

Line 4521: update wip_discrete_jobs

4517: end if;
4518:
4519: if ( l_loadType in (wip_constants.create_job, wip_constants.create_ns_job) ) then
4520: if ( p_rtgVal is not null ) then
4521: update wip_discrete_jobs
4522: set serialization_start_op = p_rtgVal
4523: where wip_entity_id = l_wipID
4524: and exists (select 1
4525: from mtl_system_items

Line 4531: update wip_discrete_jobs

4527: and organization_id = l_orgID
4528: and serial_number_control_code = wip_constants.full_sn);
4529:
4530: elsif ( l_default = wip_constants.yes ) then
4531: update wip_discrete_jobs
4532: set serialization_start_op = (select nvl(min(operation_seq_num), 1)
4533: from wip_operations
4534: where wip_entity_id = l_wipID)
4535: where wip_entity_id = l_wipID

Line 4580: update wip_discrete_jobs wdj

4576:
4577: if ( l_serialOp is null ) then
4578: if ( wjsi_row.load_type = wip_constants.resched_job ) then
4579: --in this case, we may need to clear the serialization op if the routing was re-exploded
4580: update wip_discrete_jobs wdj
4581: set serialization_start_op = null
4582: where wip_entity_id = l_wipEntityID
4583: and serialization_start_op <> 1
4584: and not exists(select 1

Line 4596: from wip_discrete_jobs wdj,

4592:
4593: --job must have an assembly, and the assembly must be serial controlled (predefined).
4594: select 1
4595: into l_dummy
4596: from wip_discrete_jobs wdj,
4597: mtl_system_items msi
4598: where wdj.primary_item_id = msi.inventory_item_id
4599: and wdj.organization_id = msi.organization_id
4600: and wdj.wip_entity_id = l_wipEntityID

Line 4630: from wip_discrete_jobs

4626: -- reschedule request. This is to guarantee no txns have taken place.
4627: if ( l_loadType = wip_constants.resched_job ) then
4628: select 1
4629: into l_dummy
4630: from wip_discrete_jobs
4631: where wip_entity_id = l_wipEntityID
4632: and status_type = wip_constants.unreleased;
4633: end if;
4634: exception

Line 4789: from wip_discrete_jobs wdj

4785:
4786: begin
4787: select wdj.scheduled_start_date
4788: into wjsi_row.first_unit_start_date
4789: from wip_discrete_jobs wdj
4790: where wdj.wip_entity_id = wjsi_row.wip_entity_id
4791: and wdj.organization_id = wjsi_row.organization_id
4792: and exists ( select operation_seq_num
4793: from wip_operations wo