[Home] [Help]
1434: end if;
1435: if(wjsi_row.first_unit_start_date is not null) then
1436: select 1
1437: into g_dummy
1438: from bom_calendar_dates bcd, mtl_parameters mp
1439: where mp.organization_id = wjsi_row.organization_id
1440: and mp.calendar_code = bcd.calendar_code
1441: and mp.calendar_exception_set_id = bcd.exception_set_id
1442: and bcd.calendar_date = trunc(wjsi_row.first_unit_start_date);
1443: end if;
1444: if(wjsi_row.last_unit_completion_date is not null) then
1445: select 1
1446: into g_dummy
1447: from bom_calendar_dates bcd, mtl_parameters mp
1448: where mp.organization_id = wjsi_row.organization_id
1449: and mp.calendar_code = bcd.calendar_code
1450: and mp.calendar_exception_set_id = bcd.exception_set_id
1451: and bcd.calendar_date = trunc(wjsi_row.last_unit_completion_date);
1537: -- sugupta 26th-May-2006
1538: /*
1539: select calendar_date
1540: into wjsi_row.first_unit_start_date
1541: from bom_calendar_dates bcd, mtl_parameters mp
1542: where mp.organization_id = wjsi_row.organization_id
1543: and bcd.exception_set_id = mp.calendar_exception_set_id
1544: and bcd.calendar_code = mp.calendar_code
1545: and seq_num = (select prior_seq_num - ceil(wjsi_row.processing_work_days)+1
1542: where mp.organization_id = wjsi_row.organization_id
1543: and bcd.exception_set_id = mp.calendar_exception_set_id
1544: and bcd.calendar_code = mp.calendar_code
1545: and seq_num = (select prior_seq_num - ceil(wjsi_row.processing_work_days)+1
1546: from bom_calendar_dates b2
1547: where b2.calendar_date = trunc(wjsi_row.last_unit_start_date)
1548: and b2.calendar_code = bcd.calendar_code
1549: and b2.exception_set_id = bcd.exception_set_id);
1550: */
1549: and b2.exception_set_id = bcd.exception_set_id);
1550: */
1551: SELECT bcd.calendar_date
1552: INTO wjsi_row.first_unit_start_date
1553: FROM bom_calendar_dates bcd,
1554: mtl_parameters mp,
1555: bom_calendar_dates b2
1556: WHERE mp.organization_id = wjsi_row.organization_id
1557: and bcd.exception_set_id = mp.calendar_exception_set_id
1551: SELECT bcd.calendar_date
1552: INTO wjsi_row.first_unit_start_date
1553: FROM bom_calendar_dates bcd,
1554: mtl_parameters mp,
1555: bom_calendar_dates b2
1556: WHERE mp.organization_id = wjsi_row.organization_id
1557: and bcd.exception_set_id = mp.calendar_exception_set_id
1558: and bcd.calendar_code = mp.calendar_code
1559: and bcd.seq_num = b2.prior_seq_num - ceil(wjsi_row.processing_work_days)+1
1565: -- sugupta 26th-May-2006
1566: /*
1567: select calendar_date
1568: into wjsi_row.last_unit_start_date
1569: from bom_calendar_dates bcd, mtl_parameters mp
1570: where mp.organization_id = wjsi_row.organization_id
1571: and bcd.exception_set_id = mp.calendar_exception_set_id
1572: and bcd.calendar_code = mp.calendar_code
1573: and seq_num = (select next_seq_num + ceil(wjsi_row.processing_work_days)-1
1570: where mp.organization_id = wjsi_row.organization_id
1571: and bcd.exception_set_id = mp.calendar_exception_set_id
1572: and bcd.calendar_code = mp.calendar_code
1573: and seq_num = (select next_seq_num + ceil(wjsi_row.processing_work_days)-1
1574: from bom_calendar_dates b2
1575: where b2.calendar_date = trunc(wjsi_row.first_unit_start_date)
1576: and b2.calendar_code = bcd.calendar_code
1577: and b2.exception_set_id = bcd.exception_set_id);
1578: */
1577: and b2.exception_set_id = bcd.exception_set_id);
1578: */
1579: SELECT bcd.calendar_date
1580: INTO wjsi_row.last_unit_start_date
1581: FROM bom_calendar_dates bcd,
1582: mtl_parameters mp,
1583: bom_calendar_dates b2
1584: WHERE mp.organization_id = wjsi_row.organization_id
1585: and bcd.exception_set_id = mp.calendar_exception_set_id
1579: SELECT bcd.calendar_date
1580: INTO wjsi_row.last_unit_start_date
1581: FROM bom_calendar_dates bcd,
1582: mtl_parameters mp,
1583: bom_calendar_dates b2
1584: WHERE mp.organization_id = wjsi_row.organization_id
1585: and bcd.exception_set_id = mp.calendar_exception_set_id
1586: and bcd.calendar_code = mp.calendar_code
1587: and bcd.seq_num = b2.prior_seq_num + ceil(wjsi_row.processing_work_days)-1
1593: -- sugupta 26th-May-2006
1594: /*
1595: select calendar_date
1596: into wjsi_row.first_unit_completion_date
1597: from bom_calendar_dates bcd, mtl_parameters mp
1598: where mp.organization_id = wjsi_row.organization_id
1599: and bcd.exception_set_id = mp.calendar_exception_set_id
1600: and bcd.calendar_code = mp.calendar_code
1601: and seq_num = (select prior_seq_num - ceil(wjsi_row.processing_work_days)+1
1598: where mp.organization_id = wjsi_row.organization_id
1599: and bcd.exception_set_id = mp.calendar_exception_set_id
1600: and bcd.calendar_code = mp.calendar_code
1601: and seq_num = (select prior_seq_num - ceil(wjsi_row.processing_work_days)+1
1602: from bom_calendar_dates b2
1603: where b2.calendar_date = trunc(wjsi_row.last_unit_completion_date)
1604: and b2.calendar_code = bcd.calendar_code
1605: and b2.exception_set_id = bcd.exception_set_id);
1606: */
1605: and b2.exception_set_id = bcd.exception_set_id);
1606: */
1607: SELECT bcd.calendar_date
1608: INTO wjsi_row.first_unit_completion_date
1609: FROM bom_calendar_dates bcd,
1610: mtl_parameters mp,
1611: bom_calendar_dates b2
1612: WHERE mp.organization_id = wjsi_row.organization_id
1613: and bcd.exception_set_id = mp.calendar_exception_set_id
1607: SELECT bcd.calendar_date
1608: INTO wjsi_row.first_unit_completion_date
1609: FROM bom_calendar_dates bcd,
1610: mtl_parameters mp,
1611: bom_calendar_dates b2
1612: WHERE mp.organization_id = wjsi_row.organization_id
1613: and bcd.exception_set_id = mp.calendar_exception_set_id
1614: and bcd.calendar_code = mp.calendar_code
1615: and bcd.seq_num = b2.prior_seq_num - ceil(wjsi_row.processing_work_days)+1
1621: -- sugupta 26th-May-2006
1622: /*
1623: select calendar_date
1624: into wjsi_row.last_unit_completion_date
1625: from bom_calendar_dates bcd, mtl_parameters mp
1626: where mp.organization_id = wjsi_row.organization_id
1627: and bcd.exception_set_id = mp.calendar_exception_set_id
1628: and bcd.calendar_code = mp.calendar_code
1629: and seq_num = (select next_seq_num + ceil(wjsi_row.processing_work_days)-1
1626: where mp.organization_id = wjsi_row.organization_id
1627: and bcd.exception_set_id = mp.calendar_exception_set_id
1628: and bcd.calendar_code = mp.calendar_code
1629: and seq_num = (select next_seq_num + ceil(wjsi_row.processing_work_days)-1
1630: from bom_calendar_dates b2
1631: where b2.calendar_date = trunc(wjsi_row.first_unit_completion_date)
1632: and b2.calendar_code = bcd.calendar_code
1633: and b2.exception_set_id = bcd.exception_set_id) ;
1634: */
1633: and b2.exception_set_id = bcd.exception_set_id) ;
1634: */
1635: SELECT bcd.calendar_date
1636: INTO wjsi_row.last_unit_completion_date
1637: FROM bom_calendar_dates bcd,
1638: mtl_parameters mp,
1639: bom_calendar_dates b2
1640: WHERE mp.organization_id = wjsi_row.organization_id
1641: and bcd.exception_set_id = mp.calendar_exception_set_id
1635: SELECT bcd.calendar_date
1636: INTO wjsi_row.last_unit_completion_date
1637: FROM bom_calendar_dates bcd,
1638: mtl_parameters mp,
1639: bom_calendar_dates b2
1640: WHERE mp.organization_id = wjsi_row.organization_id
1641: and bcd.exception_set_id = mp.calendar_exception_set_id
1642: and bcd.calendar_code = mp.calendar_code
1643: and bcd.seq_num = b2.prior_seq_num + ceil(wjsi_row.processing_work_days)-1