460: -- If it returns FALSE, then, you have not setup your parameters correctly.
461: --
462:
463: if l_return_status = FND_API.G_FALSE then
464: fnd_file.put_line(fnd_file.log, 'Action: 1. Set the BOM parameters for the organization.');
465: fnd_file.put_line(fnd_file.log, ' 2. Set the Inactive Status code in the BOM parameters.');
466: errbuf := 'completed with warning';
467: retcode := 1; --exits with warning
468: return;
461: --
462:
463: if l_return_status = FND_API.G_FALSE then
464: fnd_file.put_line(fnd_file.log, 'Action: 1. Set the BOM parameters for the organization.');
465: fnd_file.put_line(fnd_file.log, ' 2. Set the Inactive Status code in the BOM parameters.');
466: errbuf := 'completed with warning';
467: retcode := 1; --exits with warning
468: return;
469: end if;
489: -- the attribute control for item status is set to Master Level.
490: --
491:
492: IF x_return_status = FND_API.G_FALSE THEN
493: fnd_file.put_line(fnd_file.log, 'Attribute control for Item Status is set to Master Level.');
494: fnd_file.put_line(fnd_file.log, 'Please run this concurrent program from the master organization.');
495: retcode := 1; -- exits with warning
496: return;
497: END IF;
490: --
491:
492: IF x_return_status = FND_API.G_FALSE THEN
493: fnd_file.put_line(fnd_file.log, 'Attribute control for Item Status is set to Master Level.');
494: fnd_file.put_line(fnd_file.log, 'Please run this concurrent program from the master organization.');
495: retcode := 1; -- exits with warning
496: return;
497: END IF;
498:
592:
593:
594: elsif p_Config_Id is NOT NULL and p_Model_Id is NOT NULL then
595:
596: fnd_file.put_line(fnd_file.log, 'Invalid Combination . Config item and base model cannot be entered together');
597: errbuf := 'completed with warning';
598: retcode := 1; --exits with warning
599: return;
600:
599: return;
600:
601: elsif p_Config_Id is NOT NULL and p_Model_Id is NOT NULL and p_OptionItem_Id is NOT NULL then
602:
603: fnd_file.put_line(fnd_file.log, 'Invalid Combination . Config item, base model and option item cannot be entered all at the same time');
604: errbuf := 'completed with warning';
605: retcode := 1; --exits with warning
606: return;
607: end if;
682: -- display error message and disallow deactivation
683:
684: if l_chk_cfg = 1 then
685:
686: fnd_file.put_line(fnd_file.log, ' This configuration '|| l_config_id || ' exists in match table ' || ' and can be used for future match . ' || ' Deactivation is not allowed for this item ');
687: errbuf := 'completed with warning';
688: retcode := 1; --exits with warning
689: return;
690:
726: and organization_id = l_org_id;
727:
728: if l_config_match = 'Y' or l_config_match = 'C' then
729:
730: fnd_file.put_line(fnd_file.log, ' This Model (' || l_model_desc || ') is used for matching and cannot be deactivated in child orgn. Please run it from the master orgn.');
731: errbuf := 'completed with warning';
732: retcode := 1; --exits with warning
733: return;
734:
818: end if;
819:
820: elsif p_Config_Id is NOT NULL and p_Model_Id is NOT NULL then
821:
822: fnd_file.put_line(fnd_file.log, 'Invalid Combination . Config item and base model cannot be entered together');
823: errbuf := 'completed with warning';
824: retcode := 1; --exits with warning
825: return;
826:
825: return;
826:
827: elsif p_Config_Id is NOT NULL and p_Model_Id is NOT NULL and p_OptionItem_Id is NOT NULL then
828:
829: fnd_file.put_line(fnd_file.log, 'Invalid Combination . Config item, base model and option item cannot be entered all at the same time');
830: errbuf := 'completed with warning';
831: retcode := 1; --exits with warning
832: return;
833:
1518: WriteToLog( '======================================================================',3);
1519:
1520: IF chconfig_cv%ISOPEN THEN
1521: IF chconfig_cv%ROWCOUNT = 0 THEN
1522: fnd_file.put_line(fnd_file.log, 'No configurations present in the org' || p_org_id);
1523: l_stat_num :=145;
1524: CLOSE chconfig_cv;
1525: fnd_file.put_line(fnd_file.log, 'Concurrent program exiting with success');
1526: RETURN;
1521: IF chconfig_cv%ROWCOUNT = 0 THEN
1522: fnd_file.put_line(fnd_file.log, 'No configurations present in the org' || p_org_id);
1523: l_stat_num :=145;
1524: CLOSE chconfig_cv;
1525: fnd_file.put_line(fnd_file.log, 'Concurrent program exiting with success');
1526: RETURN;
1527:
1528: ELSE
1529: -- bugfix 2308063
1540:
1541:
1542: ELSIF mpconfig_cv%ISOPEN THEN
1543: IF mpconfig_cv%ROWCOUNT = 0 THEN
1544: fnd_file.put_line(fnd_file.log, 'No configurations present in the org ' || p_org_id || ' and in its child orgs.');
1545: l_stat_num :=146;
1546: CLOSE mpconfig_cv;
1547: fnd_file.put_line(fnd_file.log, 'Concurrent program exiting with success');
1548: RETURN;
1543: IF mpconfig_cv%ROWCOUNT = 0 THEN
1544: fnd_file.put_line(fnd_file.log, 'No configurations present in the org ' || p_org_id || ' and in its child orgs.');
1545: l_stat_num :=146;
1546: CLOSE mpconfig_cv;
1547: fnd_file.put_line(fnd_file.log, 'Concurrent program exiting with success');
1548: RETURN;
1549:
1550: ELSE
1551: -- bugfix 2308063
1580:
1581: -- rkaza. bug 4108700. 01/04/2005. Changing oe_debug to fnd_log.
1582: -- We show the process summary irrespective of dbg profile setting.
1583:
1584: fnd_file.put_line(fnd_file.log, '-----------------------------------------------------------------');
1585: fnd_file.put_line(fnd_file.log, 'Deactivated items..');
1586: fnd_file.put_line(fnd_file.log, 'Total number of deactivated items => '|| l_deactivated_items.count);--bugfix2308063
1587:
1588: IF (l_deactivated_items.count > 0) THEN --checks for uninitialized collection --bugfix2308063
1581: -- rkaza. bug 4108700. 01/04/2005. Changing oe_debug to fnd_log.
1582: -- We show the process summary irrespective of dbg profile setting.
1583:
1584: fnd_file.put_line(fnd_file.log, '-----------------------------------------------------------------');
1585: fnd_file.put_line(fnd_file.log, 'Deactivated items..');
1586: fnd_file.put_line(fnd_file.log, 'Total number of deactivated items => '|| l_deactivated_items.count);--bugfix2308063
1587:
1588: IF (l_deactivated_items.count > 0) THEN --checks for uninitialized collection --bugfix2308063
1589:
1582: -- We show the process summary irrespective of dbg profile setting.
1583:
1584: fnd_file.put_line(fnd_file.log, '-----------------------------------------------------------------');
1585: fnd_file.put_line(fnd_file.log, 'Deactivated items..');
1586: fnd_file.put_line(fnd_file.log, 'Total number of deactivated items => '|| l_deactivated_items.count);--bugfix2308063
1587:
1588: IF (l_deactivated_items.count > 0) THEN --checks for uninitialized collection --bugfix2308063
1589:
1590: l_index := l_deactivated_items.FIRST;
1588: IF (l_deactivated_items.count > 0) THEN --checks for uninitialized collection --bugfix2308063
1589:
1590: l_index := l_deactivated_items.FIRST;
1591: LOOP
1592: fnd_file.put_line(fnd_file.log, l_deactivated_items(l_index).cfg_item_id || '(' || l_deactivated_items(l_index).cfg_item_name || '): ' ||
1593: 'Organization: ' || l_deactivated_items(l_index).cfg_orgn_id || '(' || l_deactivated_items(l_index).cfg_orgn_code || '): ' ); --5291392
1594:
1595: EXIT WHEN l_index = l_deactivated_items.LAST;
1596: l_index := l_deactivated_items.NEXT(l_index);
1597: END LOOP;
1598: END IF;
1599:
1600: l_stat_num := 160;
1601: fnd_file.put_line(fnd_file.log, '-----------------------------------------------------------------');
1602: fnd_file.put_line(fnd_file.log, 'Un-Decativated items..');
1603: fnd_file.put_line(fnd_file.log, 'Total number of Un-Deactivated items => ' || l_un_deactivated_items.count );--bugfix2308063
1604:
1605: IF (l_un_deactivated_items.count > 0) THEN --checks for uninitialized collection --bugfix2308063
1598: END IF;
1599:
1600: l_stat_num := 160;
1601: fnd_file.put_line(fnd_file.log, '-----------------------------------------------------------------');
1602: fnd_file.put_line(fnd_file.log, 'Un-Decativated items..');
1603: fnd_file.put_line(fnd_file.log, 'Total number of Un-Deactivated items => ' || l_un_deactivated_items.count );--bugfix2308063
1604:
1605: IF (l_un_deactivated_items.count > 0) THEN --checks for uninitialized collection --bugfix2308063
1606:
1599:
1600: l_stat_num := 160;
1601: fnd_file.put_line(fnd_file.log, '-----------------------------------------------------------------');
1602: fnd_file.put_line(fnd_file.log, 'Un-Decativated items..');
1603: fnd_file.put_line(fnd_file.log, 'Total number of Un-Deactivated items => ' || l_un_deactivated_items.count );--bugfix2308063
1604:
1605: IF (l_un_deactivated_items.count > 0) THEN --checks for uninitialized collection --bugfix2308063
1606:
1607: l_index := l_un_deactivated_items.FIRST;
1606:
1607: l_index := l_un_deactivated_items.FIRST;
1608: LOOP
1609: --bugfix2308063
1610: fnd_file.put_line(fnd_file.log, l_un_deactivated_items(l_index).cfg_item_id || '(' || l_un_deactivated_items(l_index).cfg_item_name ||'):'||
1611: 'Organization: '|| l_un_deactivated_items(l_index).cfg_orgn_id || '(' || l_un_deactivated_items(l_index).cfg_orgn_code ||'):'|| --5291392
1612: '::' || l_un_deactivated_items(l_index).msg);
1613:
1614: EXIT WHEN l_index = l_un_deactivated_items.LAST;
1614: EXIT WHEN l_index = l_un_deactivated_items.LAST;
1615: l_index := l_un_deactivated_items.NEXT(l_index);
1616: END LOOP;
1617: END IF;
1618: fnd_file.put_line(fnd_file.log, '-----------------------------------------------------------------');
1619:
1620: --Bugfix 6241681: Removing the reference of deactivated configs from bom_cto_order_lines
1621:
1622: IF (l_deactivated_items.count > 0) THEN
1620: --Bugfix 6241681: Removing the reference of deactivated configs from bom_cto_order_lines
1621:
1622: IF (l_deactivated_items.count > 0) THEN
1623:
1624: fnd_file.put_line(fnd_file.log, 'Removing the reference of deactivated configs from bom_cto_order_lines..');
1625: l_index := l_deactivated_items.FIRST;
1626: LOOP
1627: fnd_file.put_line(fnd_file.log, 'Removing reference of '||l_deactivated_items(l_index).cfg_item_id||'('||
1628: l_deactivated_items(l_index).cfg_item_name||'): ');
1623:
1624: fnd_file.put_line(fnd_file.log, 'Removing the reference of deactivated configs from bom_cto_order_lines..');
1625: l_index := l_deactivated_items.FIRST;
1626: LOOP
1627: fnd_file.put_line(fnd_file.log, 'Removing reference of '||l_deactivated_items(l_index).cfg_item_id||'('||
1628: l_deactivated_items(l_index).cfg_item_name||'): ');
1629: UPDATE bom_cto_order_lines
1630: SET config_item_id = null
1631: WHERE config_item_id = l_deactivated_items(l_index).cfg_item_id;