DBA Data[Home] [Help]

APPS.AHL_UMP_PROCESSUNIT_PVT dependencies on AHL_DEBUG_PUB

Line 5: G_DEBUG VARCHAR2(1) := AHL_DEBUG_PUB.is_log_enabled;

1: PACKAGE BODY AHL_UMP_PROCESSUNIT_PVT AS
2: /* $Header: AHLVUMUB.pls 120.35.12020000.3 2013/04/01 02:58:59 sracha ship $ */
3:
4: G_PKG_NAME CONSTANT VARCHAR2(30) := 'AHL_UMP_ProcessUnit_PVT';
5: G_DEBUG VARCHAR2(1) := AHL_DEBUG_PUB.is_log_enabled;
6: G_IS_PM_INSTALLED CONSTANT VARCHAR2(1) := AHL_UTIL_PKG.IS_PM_INSTALLED;
7:
8: G_CONCURRENT_FLAG VARCHAR2(1);
9:

Line 697: AHL_DEBUG_PUB.enable_debug;

693: x_return_status := FND_API.G_RET_STS_SUCCESS;
694:
695: -- Enable Debug.
696: IF G_DEBUG = 'Y' THEN
697: AHL_DEBUG_PUB.enable_debug;
698: END IF;
699:
700: -- Add debug mesg.
701: IF G_DEBUG = 'Y' THEN

Line 702: AHL_DEBUG_PUB.debug('Begin private API:' || G_PKG_NAME || '.' || 'ProcessUnit');

698: END IF;
699:
700: -- Add debug mesg.
701: IF G_DEBUG = 'Y' THEN
702: AHL_DEBUG_PUB.debug('Begin private API:' || G_PKG_NAME || '.' || 'ProcessUnit');
703:
704: -- Dump input parameters.
705: AHL_DEBUG_PUB.debug(' Csi Item instance ID:' || p_csi_item_instance_id);
706: AHL_DEBUG_PUB.debug(' p_concurrent_flag:' || p_concurrent_flag );

Line 705: AHL_DEBUG_PUB.debug(' Csi Item instance ID:' || p_csi_item_instance_id);

701: IF G_DEBUG = 'Y' THEN
702: AHL_DEBUG_PUB.debug('Begin private API:' || G_PKG_NAME || '.' || 'ProcessUnit');
703:
704: -- Dump input parameters.
705: AHL_DEBUG_PUB.debug(' Csi Item instance ID:' || p_csi_item_instance_id);
706: AHL_DEBUG_PUB.debug(' p_concurrent_flag:' || p_concurrent_flag );
707: AHL_DEBUG_PUB.debug(' p_commit:' || p_commit);
708: AHL_DEBUG_PUB.debug(' p_simulation_plan_id :' || p_simulation_plan_id);
709: END IF;

Line 706: AHL_DEBUG_PUB.debug(' p_concurrent_flag:' || p_concurrent_flag );

702: AHL_DEBUG_PUB.debug('Begin private API:' || G_PKG_NAME || '.' || 'ProcessUnit');
703:
704: -- Dump input parameters.
705: AHL_DEBUG_PUB.debug(' Csi Item instance ID:' || p_csi_item_instance_id);
706: AHL_DEBUG_PUB.debug(' p_concurrent_flag:' || p_concurrent_flag );
707: AHL_DEBUG_PUB.debug(' p_commit:' || p_commit);
708: AHL_DEBUG_PUB.debug(' p_simulation_plan_id :' || p_simulation_plan_id);
709: END IF;
710:

Line 707: AHL_DEBUG_PUB.debug(' p_commit:' || p_commit);

703:
704: -- Dump input parameters.
705: AHL_DEBUG_PUB.debug(' Csi Item instance ID:' || p_csi_item_instance_id);
706: AHL_DEBUG_PUB.debug(' p_concurrent_flag:' || p_concurrent_flag );
707: AHL_DEBUG_PUB.debug(' p_commit:' || p_commit);
708: AHL_DEBUG_PUB.debug(' p_simulation_plan_id :' || p_simulation_plan_id);
709: END IF;
710:
711: G_concurrent_flag := p_concurrent_flag;

Line 708: AHL_DEBUG_PUB.debug(' p_simulation_plan_id :' || p_simulation_plan_id);

704: -- Dump input parameters.
705: AHL_DEBUG_PUB.debug(' Csi Item instance ID:' || p_csi_item_instance_id);
706: AHL_DEBUG_PUB.debug(' p_concurrent_flag:' || p_concurrent_flag );
707: AHL_DEBUG_PUB.debug(' p_commit:' || p_commit);
708: AHL_DEBUG_PUB.debug(' p_simulation_plan_id :' || p_simulation_plan_id);
709: END IF;
710:
711: G_concurrent_flag := p_concurrent_flag;
712:

Line 809: AHL_DEBUG_PUB.debug(' Count on Config Node Tbl:' || G_config_node_tbl.COUNT);

805: END IF; -- pm_install check
806:
807: -- Add debug mesg.
808: IF G_DEBUG = 'Y' THEN
809: AHL_DEBUG_PUB.debug(' Count on Config Node Tbl:' || G_config_node_tbl.COUNT);
810: AHL_DEBUG_PUB.debug(' Root Node:' || l_csi_item_instance_id );
811: AHL_DEBUG_PUB.debug(' Unit Config ID:' || l_uc_header_id);
812: AHL_DEBUG_PUB.debug(' Master Config ID:' || G_master_config_id);
813: AHL_DEBUG_PUB.debug(' l_expired_flag:' || l_expired_flag);

Line 810: AHL_DEBUG_PUB.debug(' Root Node:' || l_csi_item_instance_id );

806:
807: -- Add debug mesg.
808: IF G_DEBUG = 'Y' THEN
809: AHL_DEBUG_PUB.debug(' Count on Config Node Tbl:' || G_config_node_tbl.COUNT);
810: AHL_DEBUG_PUB.debug(' Root Node:' || l_csi_item_instance_id );
811: AHL_DEBUG_PUB.debug(' Unit Config ID:' || l_uc_header_id);
812: AHL_DEBUG_PUB.debug(' Master Config ID:' || G_master_config_id);
813: AHL_DEBUG_PUB.debug(' l_expired_flag:' || l_expired_flag);
814: END IF;

Line 811: AHL_DEBUG_PUB.debug(' Unit Config ID:' || l_uc_header_id);

807: -- Add debug mesg.
808: IF G_DEBUG = 'Y' THEN
809: AHL_DEBUG_PUB.debug(' Count on Config Node Tbl:' || G_config_node_tbl.COUNT);
810: AHL_DEBUG_PUB.debug(' Root Node:' || l_csi_item_instance_id );
811: AHL_DEBUG_PUB.debug(' Unit Config ID:' || l_uc_header_id);
812: AHL_DEBUG_PUB.debug(' Master Config ID:' || G_master_config_id);
813: AHL_DEBUG_PUB.debug(' l_expired_flag:' || l_expired_flag);
814: END IF;
815:

Line 812: AHL_DEBUG_PUB.debug(' Master Config ID:' || G_master_config_id);

808: IF G_DEBUG = 'Y' THEN
809: AHL_DEBUG_PUB.debug(' Count on Config Node Tbl:' || G_config_node_tbl.COUNT);
810: AHL_DEBUG_PUB.debug(' Root Node:' || l_csi_item_instance_id );
811: AHL_DEBUG_PUB.debug(' Unit Config ID:' || l_uc_header_id);
812: AHL_DEBUG_PUB.debug(' Master Config ID:' || G_master_config_id);
813: AHL_DEBUG_PUB.debug(' l_expired_flag:' || l_expired_flag);
814: END IF;
815:
816: -- Get rolling window end date.

Line 813: AHL_DEBUG_PUB.debug(' l_expired_flag:' || l_expired_flag);

809: AHL_DEBUG_PUB.debug(' Count on Config Node Tbl:' || G_config_node_tbl.COUNT);
810: AHL_DEBUG_PUB.debug(' Root Node:' || l_csi_item_instance_id );
811: AHL_DEBUG_PUB.debug(' Unit Config ID:' || l_uc_header_id);
812: AHL_DEBUG_PUB.debug(' Master Config ID:' || G_master_config_id);
813: AHL_DEBUG_PUB.debug(' l_expired_flag:' || l_expired_flag);
814: END IF;
815:
816: -- Get rolling window end date.
817: G_last_day_of_window := Get_Rolling_Window_Date;

Line 828: AHL_DEBUG_PUB.debug('AHL Installation processing');

824: IF (G_IS_PM_INSTALLED = 'N') THEN
825: -- Only for AHL installation.
826:
827: IF G_DEBUG = 'Y' THEN
828: AHL_DEBUG_PUB.debug('AHL Installation processing');
829: END IF;
830:
831: -- Call FMP api to build applicable MRs for the unit.
832: AHL_UMP_UTIL_PKG.Populate_Appl_MRs ( p_csi_ii_id => l_csi_item_instance_id,

Line 850: AHL_DEBUG_PUB.debug('PM Installation processing');

846: AHL_UMP_UTIL_PKG.Process_Group_MRs;
847:
848: ELSE -- for PM installation.
849: IF G_DEBUG = 'Y' THEN
850: AHL_DEBUG_PUB.debug('PM Installation processing');
851: END IF;
852:
853: -- Call FMP-PM api to build applicable MRs for an instance.
854: PopulatePM_Appl_MRs (p_csi_ii_id => l_csi_item_instance_id,

Line 869: AHL_DEBUG_PUB.debug('After calling FMP API and process group MRs');

865:
866: END IF; -- pm_install check.
867:
868: IF G_DEBUG = 'Y' THEN
869: AHL_DEBUG_PUB.debug('After calling FMP API and process group MRs');
870: END IF;
871:
872: -- Read applicable utilization forecast for the configuration.
873: Get_Utilization_Forecast (l_csi_item_instance_id,

Line 985: AHL_DEBUG_PUB.disable_debug;

981: log_error_messages;
982: END IF;
983:
984: -- Disable debug
985: AHL_DEBUG_PUB.disable_debug;
986:
987: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
988: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
989: Rollback to Process_Unit_PVT;

Line 1000: AHL_DEBUG_PUB.disable_debug;

996: log_error_messages;
997: END IF;
998:
999: -- Disable debug
1000: AHL_DEBUG_PUB.disable_debug;
1001:
1002: WHEN OTHERS THEN
1003:
1004: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

Line 1022: AHL_DEBUG_PUB.disable_debug;

1018: log_error_messages;
1019: END IF;
1020:
1021: -- Disable debug
1022: AHL_DEBUG_PUB.disable_debug;
1023:
1024: END Process_Unit;
1025:
1026: -------------------------------------------------------------------------------

Line 1078: AHL_DEBUG_PUB.enable_debug;

1074: x_return_status := FND_API.G_RET_STS_SUCCESS;
1075:
1076: -- Enable Debug.
1077: IF G_DEBUG = 'Y' THEN
1078: AHL_DEBUG_PUB.enable_debug;
1079: END IF;
1080:
1081: -- Add debug mesg.
1082: IF G_DEBUG = 'Y' THEN

Line 1083: AHL_DEBUG_PUB.debug('Begin private API:' || G_PKG_NAME || '.' || 'Process_MRAffected_Units');

1079: END IF;
1080:
1081: -- Add debug mesg.
1082: IF G_DEBUG = 'Y' THEN
1083: AHL_DEBUG_PUB.debug('Begin private API:' || G_PKG_NAME || '.' || 'Process_MRAffected_Units');
1084: AHL_DEBUG_PUB.debug('Application Usage Profile:' || fnd_profile.value('AHL_APPLN_USAGE'));
1085: END IF;
1086:
1087: IF (p_concurrent_flag = 'Y') THEN

Line 1084: AHL_DEBUG_PUB.debug('Application Usage Profile:' || fnd_profile.value('AHL_APPLN_USAGE'));

1080:
1081: -- Add debug mesg.
1082: IF G_DEBUG = 'Y' THEN
1083: AHL_DEBUG_PUB.debug('Begin private API:' || G_PKG_NAME || '.' || 'Process_MRAffected_Units');
1084: AHL_DEBUG_PUB.debug('Application Usage Profile:' || fnd_profile.value('AHL_APPLN_USAGE'));
1085: END IF;
1086:
1087: IF (p_concurrent_flag = 'Y') THEN
1088: l_commit := FND_API.G_TRUE;

Line 1151: AHL_DEBUG_PUB.debug('Tried to submit concurrent request but failed');

1147: FOR i IN 1..l_num_of_workers LOOP
1148: l_req_id := fnd_request.submit_request('AHL','AHLWUEFF',NULL,NULL,FALSE, l_conc_request_id);
1149: IF (l_req_id = 0 OR l_req_id IS NULL) THEN
1150: IF G_debug = 'Y' THEN
1151: AHL_DEBUG_PUB.debug('Tried to submit concurrent request but failed');
1152: END IF;
1153: fnd_file.put_line(FND_FILE.LOG, 'Failed submit concurrent request');
1154: fnd_file.new_line(FND_FILE.LOG,1);
1155: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

Line 1161: AHL_DEBUG_PUB.debug('Concurrent request ID:' || l_req_id );

1157:
1158: ELSE
1159: fnd_file.put_line(FND_FILE.LOG, 'Concurrent request ID:' || l_req_id);
1160: IF G_debug = 'Y' THEN
1161: AHL_DEBUG_PUB.debug('Concurrent request ID:' || l_req_id );
1162: END IF;
1163: END IF; -- l_req_id = 0 OR ..
1164:
1165: END LOOP;

Line 1197: AHL_DEBUG_PUB.debug('Now processing..:' || l_instance_id);

1193:
1194: EXIT WHEN (l_instance_id IS NULL);
1195:
1196: IF G_DEBUG = 'Y' THEN
1197: AHL_DEBUG_PUB.debug('Now processing..:' || l_instance_id);
1198: END IF;
1199:
1200: -- Call Process Unit for the item instance.
1201: Process_Unit (

Line 1224: AHL_DEBUG_PUB.debug('Warning: Error from Cleanup_BUE_Worker:' || l_err_mesg);

1220: x_errbuf => l_err_mesg);
1221: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
1222: -- ignore error returned from this procedure
1223: IF G_DEBUG = 'Y' THEN
1224: AHL_DEBUG_PUB.debug('Warning: Error from Cleanup_BUE_Worker:' || l_err_mesg);
1225: END IF;
1226: END IF;
1227:
1228: END IF; -- p_concurrent_flag

Line 1305: AHL_DEBUG_PUB.enable_debug;

1301: x_return_status := FND_API.G_RET_STS_SUCCESS;
1302:
1303: -- Enable Debug.
1304: IF G_DEBUG = 'Y' THEN
1305: AHL_DEBUG_PUB.enable_debug;
1306: END IF;
1307:
1308: -- Add debug mesg.
1309: IF G_DEBUG = 'Y' THEN

Line 1310: AHL_DEBUG_PUB.debug('Begin private API:' || G_PKG_NAME || '.' || 'Process_PM_Contracts');

1306: END IF;
1307:
1308: -- Add debug mesg.
1309: IF G_DEBUG = 'Y' THEN
1310: AHL_DEBUG_PUB.debug('Begin private API:' || G_PKG_NAME || '.' || 'Process_PM_Contracts');
1311: -- Dump input parameters.
1312: AHL_DEBUG_PUB.debug('Contract Number:' || p_contract_number );
1313: AHL_DEBUG_PUB.debug('Contract Modifier:' || p_contract_modifier );
1314: AHL_DEBUG_PUB.debug('p_concurrent_flag:' || p_concurrent_flag );

Line 1312: AHL_DEBUG_PUB.debug('Contract Number:' || p_contract_number );

1308: -- Add debug mesg.
1309: IF G_DEBUG = 'Y' THEN
1310: AHL_DEBUG_PUB.debug('Begin private API:' || G_PKG_NAME || '.' || 'Process_PM_Contracts');
1311: -- Dump input parameters.
1312: AHL_DEBUG_PUB.debug('Contract Number:' || p_contract_number );
1313: AHL_DEBUG_PUB.debug('Contract Modifier:' || p_contract_modifier );
1314: AHL_DEBUG_PUB.debug('p_concurrent_flag:' || p_concurrent_flag );
1315: AHL_DEBUG_PUB.debug('p_commit:' || p_commit );
1316: END IF;

Line 1313: AHL_DEBUG_PUB.debug('Contract Modifier:' || p_contract_modifier );

1309: IF G_DEBUG = 'Y' THEN
1310: AHL_DEBUG_PUB.debug('Begin private API:' || G_PKG_NAME || '.' || 'Process_PM_Contracts');
1311: -- Dump input parameters.
1312: AHL_DEBUG_PUB.debug('Contract Number:' || p_contract_number );
1313: AHL_DEBUG_PUB.debug('Contract Modifier:' || p_contract_modifier );
1314: AHL_DEBUG_PUB.debug('p_concurrent_flag:' || p_concurrent_flag );
1315: AHL_DEBUG_PUB.debug('p_commit:' || p_commit );
1316: END IF;
1317:

Line 1314: AHL_DEBUG_PUB.debug('p_concurrent_flag:' || p_concurrent_flag );

1310: AHL_DEBUG_PUB.debug('Begin private API:' || G_PKG_NAME || '.' || 'Process_PM_Contracts');
1311: -- Dump input parameters.
1312: AHL_DEBUG_PUB.debug('Contract Number:' || p_contract_number );
1313: AHL_DEBUG_PUB.debug('Contract Modifier:' || p_contract_modifier );
1314: AHL_DEBUG_PUB.debug('p_concurrent_flag:' || p_concurrent_flag );
1315: AHL_DEBUG_PUB.debug('p_commit:' || p_commit );
1316: END IF;
1317:
1318: IF (p_concurrent_flag = 'Y') THEN

Line 1315: AHL_DEBUG_PUB.debug('p_commit:' || p_commit );

1311: -- Dump input parameters.
1312: AHL_DEBUG_PUB.debug('Contract Number:' || p_contract_number );
1313: AHL_DEBUG_PUB.debug('Contract Modifier:' || p_contract_modifier );
1314: AHL_DEBUG_PUB.debug('p_concurrent_flag:' || p_concurrent_flag );
1315: AHL_DEBUG_PUB.debug('p_commit:' || p_commit );
1316: END IF;
1317:
1318: IF (p_concurrent_flag = 'Y') THEN
1319: fnd_file.put_line(fnd_file.log, 'Starting processing for contract Number '|| p_contract_number || ' and contract modifier' || p_contract_modifier);

Line 1431: AHL_DEBUG_PUB.disable_debug;

1427: IF (p_concurrent_flag = 'Y') THEN
1428: fnd_file.put_line(fnd_file.log, 'Process_PM_Contracts failed for: contract Number '|| p_contract_number || ' and contract modifier' || p_contract_modifier);
1429: log_error_messages;
1430: END IF;
1431: AHL_DEBUG_PUB.disable_debug;
1432:
1433: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1434: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1435: Rollback to Process_PM_Contracts_PVT;

Line 1446: AHL_DEBUG_PUB.disable_debug;

1442: IF (p_concurrent_flag = 'Y') THEN
1443: fnd_file.put_line(fnd_file.log, 'Process_PM_Contracts failed for: contract Number '|| p_contract_number || ' and contract modifier' || p_contract_modifier);
1444: log_error_messages;
1445: END IF;
1446: AHL_DEBUG_PUB.disable_debug;
1447:
1448: WHEN OTHERS THEN
1449: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1450: Rollback to Process_PM_Contracts_PVT;

Line 1469: AHL_DEBUG_PUB.disable_debug;

1465: IF (p_concurrent_flag = 'Y') THEN
1466: fnd_file.put_line(fnd_file.log, 'Process_PM_Contracts failed for: contract Number '|| p_contract_number || ' and contract modifier' || p_contract_modifier);
1467: log_error_messages;
1468: END IF;
1469: AHL_DEBUG_PUB.disable_debug;
1470: END Process_PM_Contracts;
1471: -- Tamal: Bug #4207212, #4114368: End
1472:
1473: ------------------------------------------------------------------------------

Line 1526: AHL_DEBUG_PUB.enable_debug;

1522:
1523: -- Enable Debug.
1524: -- Add api start debug mesg.
1525: IF G_DEBUG = 'Y' THEN
1526: AHL_DEBUG_PUB.enable_debug;
1527: AHL_DEBUG_PUB.debug('Begin private API:' || G_PKG_NAME || '.' || 'Process_All_Units');
1528: END IF;
1529:
1530: -- For concurrent program.

Line 1527: AHL_DEBUG_PUB.debug('Begin private API:' || G_PKG_NAME || '.' || 'Process_All_Units');

1523: -- Enable Debug.
1524: -- Add api start debug mesg.
1525: IF G_DEBUG = 'Y' THEN
1526: AHL_DEBUG_PUB.enable_debug;
1527: AHL_DEBUG_PUB.debug('Begin private API:' || G_PKG_NAME || '.' || 'Process_All_Units');
1528: END IF;
1529:
1530: -- For concurrent program.
1531: IF (p_concurrent_flag = 'Y') THEN

Line 1610: AHL_DEBUG_PUB.debug('Start Validate Item Instance');

1606:
1607: BEGIN
1608:
1609: IF G_DEBUG = 'Y' THEN
1610: AHL_DEBUG_PUB.debug('Start Validate Item Instance');
1611: END IF;
1612:
1613: -- added to fix bug# 8567880.
1614: l_expired_flag := 'N';

Line 1647: AHL_DEBUG_PUB.debug('End Validate Item Instance');

1643: x_inv_master_organization_id := l_inv_master_organization_id;
1644: x_expired_flag := l_expired_flag;
1645:
1646: IF G_DEBUG = 'Y' THEN
1647: AHL_DEBUG_PUB.debug('End Validate Item Instance');
1648: END IF;
1649:
1650: END Validate_Item_Instance;
1651:

Line 1680: AHL_DEBUG_PUB.debug('Start Get_Unit_Master_ConfigIDs');

1676:
1677: BEGIN
1678:
1679: IF G_DEBUG = 'Y' THEN
1680: AHL_DEBUG_PUB.debug('Start Get_Unit_Master_ConfigIDs');
1681: END IF;
1682:
1683: x_uc_header_id := null;
1684: x_master_config_id := null;

Line 1713: AHL_DEBUG_PUB.debug('Unit Config ID:' || x_uc_header_id);

1709: fnd_file.put_line (FND_FILE.LOG, 'Unit Config Name:' || l_name);
1710: END IF;
1711:
1712: IF G_DEBUG = 'Y' THEN
1713: AHL_DEBUG_PUB.debug('Unit Config ID:' || x_uc_header_id);
1714: AHL_DEBUG_PUB.debug('Master Config ID:' || x_master_config_id);
1715: AHL_DEBUG_PUB.debug('End Get_Unit_Master_ConfigIDs');
1716: END IF;
1717:

Line 1714: AHL_DEBUG_PUB.debug('Master Config ID:' || x_master_config_id);

1710: END IF;
1711:
1712: IF G_DEBUG = 'Y' THEN
1713: AHL_DEBUG_PUB.debug('Unit Config ID:' || x_uc_header_id);
1714: AHL_DEBUG_PUB.debug('Master Config ID:' || x_master_config_id);
1715: AHL_DEBUG_PUB.debug('End Get_Unit_Master_ConfigIDs');
1716: END IF;
1717:
1718: END Get_Unit_Master_ConfigIDs;

Line 1715: AHL_DEBUG_PUB.debug('End Get_Unit_Master_ConfigIDs');

1711:
1712: IF G_DEBUG = 'Y' THEN
1713: AHL_DEBUG_PUB.debug('Unit Config ID:' || x_uc_header_id);
1714: AHL_DEBUG_PUB.debug('Master Config ID:' || x_master_config_id);
1715: AHL_DEBUG_PUB.debug('End Get_Unit_Master_ConfigIDs');
1716: END IF;
1717:
1718: END Get_Unit_Master_ConfigIDs;
1719:

Line 1797: AHL_DEBUG_PUB.debug('Start Build_Config_Tree');

1793:
1794: BEGIN
1795:
1796: IF G_DEBUG = 'Y' THEN
1797: AHL_DEBUG_PUB.debug('Start Build_Config_Tree');
1798: END IF;
1799:
1800: -- For top node.
1801: l_config_node_tbl(1).csi_item_instance_id := p_csi_root_instance_id;

Line 1846: AHL_DEBUG_PUB.debug('End Build_Config_Tree');

1842:
1843: X_CONFIG_NODE_TBL := l_config_node_tbl;
1844:
1845: IF G_DEBUG = 'Y' THEN
1846: AHL_DEBUG_PUB.debug('End Build_Config_Tree');
1847: AHL_DEBUG_PUB.debug('Count on config' || x_config_node_tbl.COUNT);
1848: END IF;
1849:
1850: END Build_Config_Tree;

Line 1847: AHL_DEBUG_PUB.debug('Count on config' || x_config_node_tbl.COUNT);

1843: X_CONFIG_NODE_TBL := l_config_node_tbl;
1844:
1845: IF G_DEBUG = 'Y' THEN
1846: AHL_DEBUG_PUB.debug('End Build_Config_Tree');
1847: AHL_DEBUG_PUB.debug('Count on config' || x_config_node_tbl.COUNT);
1848: END IF;
1849:
1850: END Build_Config_Tree;
1851:

Line 1884: AHL_DEBUG_PUB.debug('last day of window' || l_last_day_of_window);

1880: END IF;
1881:
1882: -- Add debug mesg.
1883: IF G_DEBUG = 'Y' THEN
1884: AHL_DEBUG_PUB.debug('last day of window' || l_last_day_of_window);
1885: AHL_DEBUG_PUB.debug('profile uom:' || l_date_uom);
1886: AHL_DEBUG_PUB.debug('profile value:' || l_value);
1887: END IF;
1888:

Line 1885: AHL_DEBUG_PUB.debug('profile uom:' || l_date_uom);

1881:
1882: -- Add debug mesg.
1883: IF G_DEBUG = 'Y' THEN
1884: AHL_DEBUG_PUB.debug('last day of window' || l_last_day_of_window);
1885: AHL_DEBUG_PUB.debug('profile uom:' || l_date_uom);
1886: AHL_DEBUG_PUB.debug('profile value:' || l_value);
1887: END IF;
1888:
1889: EXCEPTION

Line 1886: AHL_DEBUG_PUB.debug('profile value:' || l_value);

1882: -- Add debug mesg.
1883: IF G_DEBUG = 'Y' THEN
1884: AHL_DEBUG_PUB.debug('last day of window' || l_last_day_of_window);
1885: AHL_DEBUG_PUB.debug('profile uom:' || l_date_uom);
1886: AHL_DEBUG_PUB.debug('profile value:' || l_value);
1887: END IF;
1888:
1889: EXCEPTION
1890: WHEN VALUE_ERROR THEN

Line 1994: AHL_DEBUG_PUB.debug('Start Get_Utilization_Forecast');

1990:
1991: BEGIN
1992:
1993: IF G_DEBUG = 'Y' THEN
1994: AHL_DEBUG_PUB.debug('Start Get_Utilization_Forecast');
1995: AHL_DEBUG_PUB.debug ('Input csi'|| p_csi_item_instance_id);
1996: AHL_DEBUG_PUB.debug ('Input uc'|| p_uc_header_id);
1997: AHL_DEBUG_PUB.debug ('Input invID' || p_inventory_item_id);
1998: AHL_DEBUG_PUB.debug ('Input invORGID' || p_inventory_org_id);

Line 1995: AHL_DEBUG_PUB.debug ('Input csi'|| p_csi_item_instance_id);

1991: BEGIN
1992:
1993: IF G_DEBUG = 'Y' THEN
1994: AHL_DEBUG_PUB.debug('Start Get_Utilization_Forecast');
1995: AHL_DEBUG_PUB.debug ('Input csi'|| p_csi_item_instance_id);
1996: AHL_DEBUG_PUB.debug ('Input uc'|| p_uc_header_id);
1997: AHL_DEBUG_PUB.debug ('Input invID' || p_inventory_item_id);
1998: AHL_DEBUG_PUB.debug ('Input invORGID' || p_inventory_org_id);
1999: END IF;

Line 1996: AHL_DEBUG_PUB.debug ('Input uc'|| p_uc_header_id);

1992:
1993: IF G_DEBUG = 'Y' THEN
1994: AHL_DEBUG_PUB.debug('Start Get_Utilization_Forecast');
1995: AHL_DEBUG_PUB.debug ('Input csi'|| p_csi_item_instance_id);
1996: AHL_DEBUG_PUB.debug ('Input uc'|| p_uc_header_id);
1997: AHL_DEBUG_PUB.debug ('Input invID' || p_inventory_item_id);
1998: AHL_DEBUG_PUB.debug ('Input invORGID' || p_inventory_org_id);
1999: END IF;
2000:

Line 1997: AHL_DEBUG_PUB.debug ('Input invID' || p_inventory_item_id);

1993: IF G_DEBUG = 'Y' THEN
1994: AHL_DEBUG_PUB.debug('Start Get_Utilization_Forecast');
1995: AHL_DEBUG_PUB.debug ('Input csi'|| p_csi_item_instance_id);
1996: AHL_DEBUG_PUB.debug ('Input uc'|| p_uc_header_id);
1997: AHL_DEBUG_PUB.debug ('Input invID' || p_inventory_item_id);
1998: AHL_DEBUG_PUB.debug ('Input invORGID' || p_inventory_org_id);
1999: END IF;
2000:
2001: -- Check installation to get appropriate forecast.

Line 1998: AHL_DEBUG_PUB.debug ('Input invORGID' || p_inventory_org_id);

1994: AHL_DEBUG_PUB.debug('Start Get_Utilization_Forecast');
1995: AHL_DEBUG_PUB.debug ('Input csi'|| p_csi_item_instance_id);
1996: AHL_DEBUG_PUB.debug ('Input uc'|| p_uc_header_id);
1997: AHL_DEBUG_PUB.debug ('Input invID' || p_inventory_item_id);
1998: AHL_DEBUG_PUB.debug ('Input invORGID' || p_inventory_org_id);
1999: END IF;
2000:
2001: -- Check installation to get appropriate forecast.
2002: IF (G_IS_PM_INSTALLED = 'Y') THEN

Line 2006: AHL_DEBUG_PUB.debug('PM forecast');

2002: IF (G_IS_PM_INSTALLED = 'Y') THEN
2003: -- pm is installed.
2004:
2005: IF G_DEBUG = 'Y' THEN
2006: AHL_DEBUG_PUB.debug('PM forecast');
2007: END IF;
2008:
2009: -- Check if forecast available at instance level.
2010: OPEN ahl_pm_uf_headers_csr(p_csi_item_instance_id);

Line 2047: AHL_DEBUG_PUB.debug('AHL Installation forecast');

2043: CLOSE ahl_pm_uf_headers_csr;
2044: ELSE -- is_pm_installed.
2045: -- forecast for AHL installation.
2046: IF G_DEBUG = 'Y' THEN
2047: AHL_DEBUG_PUB.debug('AHL Installation forecast');
2048: END IF;
2049:
2050: -- If Utlization forecast defined at unit level
2051: IF (p_uc_header_id IS NOT NULL) THEN

Line 2111: AHL_DEBUG_PUB.debug('AHL PC forecast for UNIT');

2107: END LOOP;
2108: ELSE /* forecast not defined at UC */
2109: --dbms_output.put_line ('use_unit_flag not Y');
2110: IF G_DEBUG = 'Y' THEN
2111: AHL_DEBUG_PUB.debug('AHL PC forecast for UNIT');
2112: END IF;
2113:
2114: -- added parameter p_add_unit_item_forecast to fix bug# 6749351.
2115: AHL_UMP_UF_PVT.Get_UF_FROM_PC (p_unit_config_header_id => p_uc_header_id,

Line 2149: AHL_DEBUG_PUB.debug('AHL PC forecast for ITEM');

2145: END IF; -- %found.
2146: CLOSE ahl_uf_headers_csr;
2147: ELSE
2148: IF G_DEBUG = 'Y' THEN
2149: AHL_DEBUG_PUB.debug('AHL PC forecast for ITEM');
2150: END IF;
2151: --dbms_output.put_line ('inv case');
2152:
2153: /* following taken care by get_uf_from_pc as part fix for bug# 6749351.

Line 2204: AHL_DEBUG_PUB.debug('l_forecast_details_flt_tbl.COUNT '|| l_forecast_details_flt_tbl.COUNT);

2200: END IF; -- p_uc_header_id is not null.
2201:
2202: -- JKJain, NR Analysis and Forecasting : Merging Fllet and PC forecasts.
2203: IF (G_DEBUG = 'Y') THEN
2204: AHL_DEBUG_PUB.debug('l_forecast_details_flt_tbl.COUNT '|| l_forecast_details_flt_tbl.COUNT);
2205: AHL_DEBUG_PUB.debug('l_forecast_details_pc_tbl.COUNT ' || l_forecast_details_pc_tbl.COUNT);
2206: END IF;
2207:
2208: IF (l_forecast_details_flt_tbl.COUNT > 0) THEN

Line 2205: AHL_DEBUG_PUB.debug('l_forecast_details_pc_tbl.COUNT ' || l_forecast_details_pc_tbl.COUNT);

2201:
2202: -- JKJain, NR Analysis and Forecasting : Merging Fllet and PC forecasts.
2203: IF (G_DEBUG = 'Y') THEN
2204: AHL_DEBUG_PUB.debug('l_forecast_details_flt_tbl.COUNT '|| l_forecast_details_flt_tbl.COUNT);
2205: AHL_DEBUG_PUB.debug('l_forecast_details_pc_tbl.COUNT ' || l_forecast_details_pc_tbl.COUNT);
2206: END IF;
2207:
2208: IF (l_forecast_details_flt_tbl.COUNT > 0) THEN
2209: l_index := 1;

Line 2229: AHL_DEBUG_PUB.debug('l_flt_uom_code = '|| l_flt_uom_code || ' and l_pc_uom_code = ' || l_pc_uom_code);

2225: l_pc_uom_code := 'zzz';
2226: END IF;
2227:
2228: IF (G_DEBUG = 'Y') THEN
2229: AHL_DEBUG_PUB.debug('l_flt_uom_code = '|| l_flt_uom_code || ' and l_pc_uom_code = ' || l_pc_uom_code);
2230: END IF;
2231:
2232: EXIT WHEN (l_pc_uom_code = 'zzz' AND l_flt_uom_code = 'zzz');
2233: -- Add pc_uom if it is less than flt_uom

Line 2348: AHL_DEBUG_PUB.debug('l_previous_end_date = '|| l_previous_end_date|| ' and l_pc_uom_code = '||l_pc_uom_code);

2344: --IF pc forecast exists after fleet forecast for the same UOM
2345: IF(l_previous_end_date IS NOT NULL) THEN
2346: LOOP
2347: IF (x_forecast_details_tbl.COUNT > 0) THEN
2348: AHL_DEBUG_PUB.debug('l_previous_end_date = '|| l_previous_end_date|| ' and l_pc_uom_code = '||l_pc_uom_code);
2349: END IF;
2350: IF ( l_forecast_details_pc_tbl.EXISTS(l_pc_index)) THEN
2351: EXIT WHEN (l_pc_uom_code <> l_forecast_details_pc_tbl(l_pc_index).uom_code );
2352: ELSE

Line 2437: AHL_DEBUG_PUB.debug ('Count on forecast_details' || x_forecast_details_tbl.COUNT);

2433: -- Set output variable for forecast.
2434: -- x_forecast_details_tbl := l_forecast_details_tbl;
2435:
2436: IF G_DEBUG = 'Y' THEN
2437: AHL_DEBUG_PUB.debug ('Count on forecast_details' || x_forecast_details_tbl.COUNT);
2438: AHL_DEBUG_PUB.debug ('Count on l_forecast_details' || l_forecast_details_tbl.COUNT);
2439:
2440: IF (x_forecast_details_tbl.COUNT > 0) THEN
2441: FOR i IN x_forecast_details_tbl.FIRST..x_forecast_details_tbl.LAST LOOP

Line 2438: AHL_DEBUG_PUB.debug ('Count on l_forecast_details' || l_forecast_details_tbl.COUNT);

2434: -- x_forecast_details_tbl := l_forecast_details_tbl;
2435:
2436: IF G_DEBUG = 'Y' THEN
2437: AHL_DEBUG_PUB.debug ('Count on forecast_details' || x_forecast_details_tbl.COUNT);
2438: AHL_DEBUG_PUB.debug ('Count on l_forecast_details' || l_forecast_details_tbl.COUNT);
2439:
2440: IF (x_forecast_details_tbl.COUNT > 0) THEN
2441: FOR i IN x_forecast_details_tbl.FIRST..x_forecast_details_tbl.LAST LOOP
2442: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') Uom_Code' || x_forecast_details_tbl(i).uom_code);

Line 2442: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') Uom_Code' || x_forecast_details_tbl(i).uom_code);

2438: AHL_DEBUG_PUB.debug ('Count on l_forecast_details' || l_forecast_details_tbl.COUNT);
2439:
2440: IF (x_forecast_details_tbl.COUNT > 0) THEN
2441: FOR i IN x_forecast_details_tbl.FIRST..x_forecast_details_tbl.LAST LOOP
2442: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') Uom_Code' || x_forecast_details_tbl(i).uom_code);
2443: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') Start Date' || x_forecast_details_tbl(i).start_date);
2444: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') End Date' || x_forecast_details_tbl(i).end_date);
2445: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') Usage' || x_forecast_details_tbl(i).usage_per_day);
2446: -- JKJain, NR Analysis and Forecasting

Line 2443: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') Start Date' || x_forecast_details_tbl(i).start_date);

2439:
2440: IF (x_forecast_details_tbl.COUNT > 0) THEN
2441: FOR i IN x_forecast_details_tbl.FIRST..x_forecast_details_tbl.LAST LOOP
2442: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') Uom_Code' || x_forecast_details_tbl(i).uom_code);
2443: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') Start Date' || x_forecast_details_tbl(i).start_date);
2444: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') End Date' || x_forecast_details_tbl(i).end_date);
2445: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') Usage' || x_forecast_details_tbl(i).usage_per_day);
2446: -- JKJain, NR Analysis and Forecasting
2447: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') utilization_type ' || x_forecast_details_tbl(i).utilization_type);

Line 2444: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') End Date' || x_forecast_details_tbl(i).end_date);

2440: IF (x_forecast_details_tbl.COUNT > 0) THEN
2441: FOR i IN x_forecast_details_tbl.FIRST..x_forecast_details_tbl.LAST LOOP
2442: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') Uom_Code' || x_forecast_details_tbl(i).uom_code);
2443: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') Start Date' || x_forecast_details_tbl(i).start_date);
2444: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') End Date' || x_forecast_details_tbl(i).end_date);
2445: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') Usage' || x_forecast_details_tbl(i).usage_per_day);
2446: -- JKJain, NR Analysis and Forecasting
2447: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') utilization_type ' || x_forecast_details_tbl(i).utilization_type);
2448: END LOOP;

Line 2445: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') Usage' || x_forecast_details_tbl(i).usage_per_day);

2441: FOR i IN x_forecast_details_tbl.FIRST..x_forecast_details_tbl.LAST LOOP
2442: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') Uom_Code' || x_forecast_details_tbl(i).uom_code);
2443: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') Start Date' || x_forecast_details_tbl(i).start_date);
2444: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') End Date' || x_forecast_details_tbl(i).end_date);
2445: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') Usage' || x_forecast_details_tbl(i).usage_per_day);
2446: -- JKJain, NR Analysis and Forecasting
2447: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') utilization_type ' || x_forecast_details_tbl(i).utilization_type);
2448: END LOOP;
2449: END IF;

Line 2447: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') utilization_type ' || x_forecast_details_tbl(i).utilization_type);

2443: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') Start Date' || x_forecast_details_tbl(i).start_date);
2444: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') End Date' || x_forecast_details_tbl(i).end_date);
2445: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') Usage' || x_forecast_details_tbl(i).usage_per_day);
2446: -- JKJain, NR Analysis and Forecasting
2447: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') utilization_type ' || x_forecast_details_tbl(i).utilization_type);
2448: END LOOP;
2449: END IF;
2450:
2451: AHL_DEBUG_PUB.debug ('End Get_Utilization_Forecast');

Line 2451: AHL_DEBUG_PUB.debug ('End Get_Utilization_Forecast');

2447: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') utilization_type ' || x_forecast_details_tbl(i).utilization_type);
2448: END LOOP;
2449: END IF;
2450:
2451: AHL_DEBUG_PUB.debug ('End Get_Utilization_Forecast');
2452:
2453: END IF;
2454:
2455: END Get_Utilization_Forecast;

Line 2537: AHL_DEBUG_PUB.debug ('Start Lock Effectivity records');

2533:
2534: BEGIN
2535:
2536: IF G_DEBUG = 'Y' THEN
2537: AHL_DEBUG_PUB.debug ('Start Lock Effectivity records');
2538: END IF;
2539:
2540: x_ret_code := '0';
2541:

Line 2573: AHL_DEBUG_PUB.debug ('Rows processed for instance: ' || G_config_node_tbl(i).csi_item_instance_id

2569: OPEN ahl_unit_effectivities_csr(G_config_node_tbl(i).csi_item_instance_id);
2570: LOOP
2571: FETCH ahl_unit_effectivities_csr BULK COLLECT INTO l_ue_id_tbl LIMIT 5000;
2572: IF G_DEBUG = 'Y' THEN
2573: AHL_DEBUG_PUB.debug ('Rows processed for instance: ' || G_config_node_tbl(i).csi_item_instance_id
2574: || 'is: ' || ahl_unit_effectivities_csr%ROWCOUNT);
2575: END IF;
2576: --EXIT WHEN ahl_unit_effectivities_csr%NOTFOUND;
2577: EXIT WHEN (l_ue_id_tbl.count = 0);

Line 2601: AHL_DEBUG_PUB.debug ('Rows processed are: ' || ahl_unit_effectivities_csr%ROWCOUNT);

2597: OPEN ahl_unit_effectivities_csr(G_config_node_tbl(1).csi_item_instance_id, G_application_usg_code);
2598: LOOP
2599: FETCH ahl_unit_effectivities_csr BULK COLLECT INTO l_ue_id_tbl LIMIT 5000;
2600: IF G_DEBUG = 'Y' THEN
2601: AHL_DEBUG_PUB.debug ('Rows processed are: ' || ahl_unit_effectivities_csr%ROWCOUNT);
2602: END IF;
2603: --EXIT WHEN ahl_unit_effectivities_csr%NOTFOUND;
2604: EXIT WHEN (l_ue_id_tbl.count = 0);
2605:

Line 2616: AHL_DEBUG_PUB.debug ('Rows processed are: ' || ahl_sim_ues_csr%ROWCOUNT);

2612: OPEN ahl_sim_ues_csr(G_config_node_tbl(1).csi_item_instance_id);
2613: LOOP
2614: FETCH ahl_sim_ues_csr BULK COLLECT INTO l_ue_id_tbl LIMIT 5000;
2615: IF G_DEBUG = 'Y' THEN
2616: AHL_DEBUG_PUB.debug ('Rows processed are: ' || ahl_sim_ues_csr%ROWCOUNT);
2617: END IF;
2618: EXIT WHEN (l_ue_id_tbl.count = 0);
2619:
2620: -- delete tbl

Line 2629: AHL_DEBUG_PUB.debug ('End Lock Effectivity records');

2625:
2626:
2627:
2628: IF G_DEBUG = 'Y' THEN
2629: AHL_DEBUG_PUB.debug ('End Lock Effectivity records');
2630: END IF;
2631:
2632: EXCEPTION
2633:

Line 2720: AHL_DEBUG_PUB.debug('Processing for..:' || G_config_node_tbl(i).csi_item_instance_id );

2716: -- Process Unit beginning with top node.
2717: IF G_config_node_tbl.COUNT > 0 THEN
2718: FOR i IN G_config_node_tbl.FIRST..G_config_node_tbl.LAST LOOP
2719: IF G_DEBUG = 'Y' THEN
2720: AHL_DEBUG_PUB.debug('Processing for..:' || G_config_node_tbl(i).csi_item_instance_id );
2721: END IF;
2722:
2723: -- Build counter rules ratio if node is not root node.
2724: IF (G_master_config_id IS NOT NULL AND G_config_node_tbl(i).object_id IS NOT NULL) THEN

Line 2760: AHL_DEBUG_PUB.debug('Found applicable MR-ID[Title]:' || l_appl_rec.mr_header_id || '[' || l_appl_rec.title || ']');

2756: -- Read ahl_applicable_mrs for all MRs applicable to the item instance.
2757: FOR l_appl_rec IN ahl_applicable_MRs(G_config_node_tbl(i).csi_item_instance_id) LOOP
2758:
2759: IF G_DEBUG = 'Y' THEN
2760: AHL_DEBUG_PUB.debug('Found applicable MR-ID[Title]:' || l_appl_rec.mr_header_id || '[' || l_appl_rec.title || ']');
2761: END IF;
2762:
2763: /*
2764: IF (G_concurrent_flag = 'Y') THEN

Line 2803: AHL_DEBUG_PUB.debug('Process Unit:LOOP to next MR-ID');

2799: p_current_usage_tbl => l_current_usage_tbl,
2800: p_counter_rules_tbl => l_counter_rules_tbl );
2801:
2802: IF G_DEBUG = 'Y' THEN
2803: AHL_DEBUG_PUB.debug('Process Unit:LOOP to next MR-ID');
2804: END IF;
2805:
2806: END LOOP; /* loop through next mr */
2807:

Line 2809: AHL_DEBUG_PUB.debug('Process Unit:LOOP to next NODE');

2805:
2806: END LOOP; /* loop through next mr */
2807:
2808: IF G_DEBUG = 'Y' THEN
2809: AHL_DEBUG_PUB.debug('Process Unit:LOOP to next NODE');
2810: END IF;
2811:
2812: END LOOP; /* loop to process next node. */
2813: END IF; /* for count > 0 */

Line 2883: AHL_DEBUG_PUB.debug ('Start Build Counter Ratio');

2879:
2880: BEGIN
2881:
2882: IF G_DEBUG = 'Y' THEN
2883: AHL_DEBUG_PUB.debug ('Start Build Counter Ratio');
2884: END IF;
2885:
2886: -- If there is no master configuration
2887: IF (p_master_config_id IS NOT NULL) THEN

Line 2932: AHL_DEBUG_PUB.debug ('End Build Counter Ratio');

2928: CLOSE ahl_posn_master_config_csr;
2929: END IF; /* master config not null */
2930:
2931: IF G_DEBUG = 'Y' THEN
2932: AHL_DEBUG_PUB.debug ('End Build Counter Ratio');
2933: AHL_DEBUG_PUB.debug ('Counter Rules tbl count' || x_counter_rules_tbl.COUNT);
2934: END IF;
2935:
2936: EXCEPTION

Line 2933: AHL_DEBUG_PUB.debug ('Counter Rules tbl count' || x_counter_rules_tbl.COUNT);

2929: END IF; /* master config not null */
2930:
2931: IF G_DEBUG = 'Y' THEN
2932: AHL_DEBUG_PUB.debug ('End Build Counter Ratio');
2933: AHL_DEBUG_PUB.debug ('Counter Rules tbl count' || x_counter_rules_tbl.COUNT);
2934: END IF;
2935:
2936: EXCEPTION
2937:

Line 3025: AHL_DEBUG_PUB.debug ('Start Get Current Usage');

3021:
3022: BEGIN
3023:
3024: IF G_DEBUG = 'Y' THEN
3025: AHL_DEBUG_PUB.debug ('Start Get Current Usage');
3026: END IF;
3027:
3028: -- Build current usage counters.
3029: OPEN csi_cp_counters_csr(p_csi_item_instance_id);

Line 3087: AHL_DEBUG_PUB.debug ('Counter Usage tbl count' || x_current_usage_tbl.COUNT);

3083: -- Set return value.
3084: x_current_usage_tbl := l_current_usage_tbl;
3085:
3086: IF G_DEBUG = 'Y' THEN
3087: AHL_DEBUG_PUB.debug ('Counter Usage tbl count' || x_current_usage_tbl.COUNT);
3088: AHL_DEBUG_PUB.debug ('End Get Current Usage');
3089: END IF;
3090:
3091: END get_Current_Usage;

Line 3088: AHL_DEBUG_PUB.debug ('End Get Current Usage');

3084: x_current_usage_tbl := l_current_usage_tbl;
3085:
3086: IF G_DEBUG = 'Y' THEN
3087: AHL_DEBUG_PUB.debug ('Counter Usage tbl count' || x_current_usage_tbl.COUNT);
3088: AHL_DEBUG_PUB.debug ('End Get Current Usage');
3089: END IF;
3090:
3091: END get_Current_Usage;
3092:

Line 3228: AHL_DEBUG_PUB.debug ('Start Get Accomplishment Details');

3224:
3225: BEGIN
3226:
3227: IF G_DEBUG = 'Y' THEN
3228: AHL_DEBUG_PUB.debug ('Start Get Accomplishment Details');
3229: END IF;
3230:
3231: -- Check if any deferrals exist.
3232: OPEN ahl_def_csr (p_applicable_mrs_rec.csi_item_instance_id,

Line 3327: AHL_DEBUG_PUB.Debug('l_deferral_due_date: ' || l_last_accomplishment_date);

3323: x_due_at_counter_val_tbl => l_last_acc_counter_val_tbl,
3324: x_return_value => l_return_val);
3325:
3326: IF G_DEBUG = 'Y' THEN
3327: AHL_DEBUG_PUB.Debug('l_deferral_due_date: ' || l_last_accomplishment_date);
3328: IF (l_last_acc_counter_val_tbl.COUNT) > 0 THEN
3329: for i in l_last_acc_counter_val_tbl.FIRST..l_last_acc_counter_val_tbl.LAST LOOP
3330: AHL_DEBUG_PUB.Debug('i:'|| i|| ' value:' || l_last_acc_counter_val_tbl(i).counter_value || 'ID: ' || l_last_acc_counter_val_tbl(i).counter_id);
3331: end loop;

Line 3330: AHL_DEBUG_PUB.Debug('i:'|| i|| ' value:' || l_last_acc_counter_val_tbl(i).counter_value || 'ID: ' || l_last_acc_counter_val_tbl(i).counter_id);

3326: IF G_DEBUG = 'Y' THEN
3327: AHL_DEBUG_PUB.Debug('l_deferral_due_date: ' || l_last_accomplishment_date);
3328: IF (l_last_acc_counter_val_tbl.COUNT) > 0 THEN
3329: for i in l_last_acc_counter_val_tbl.FIRST..l_last_acc_counter_val_tbl.LAST LOOP
3330: AHL_DEBUG_PUB.Debug('i:'|| i|| ' value:' || l_last_acc_counter_val_tbl(i).counter_value || 'ID: ' || l_last_acc_counter_val_tbl(i).counter_id);
3331: end loop;
3332: END IF;
3333: END IF;
3334:

Line 3371: AHL_DEBUG_PUB.debug ('Last Accomplished Date:' || x_accomplishment_date);

3367: x_no_forecast_flag := l_no_forecast_flag;
3368: x_mr_accomplish_exists := l_mr_accomplish_exists;
3369:
3370: IF G_DEBUG = 'Y' THEN
3371: AHL_DEBUG_PUB.debug ('Last Accomplished Date:' || x_accomplishment_date);
3372: AHL_DEBUG_PUB.debug ('Last Accomplished UE ID:' || x_accomplished_ue_id);
3373: AHL_DEBUG_PUB.debug ('Count of ctr values:' || x_last_acc_counter_val_tbl.COUNT);
3374: AHL_DEBUG_PUB.debug ('End Get Accomplishment Details');
3375: END IF;

Line 3372: AHL_DEBUG_PUB.debug ('Last Accomplished UE ID:' || x_accomplished_ue_id);

3368: x_mr_accomplish_exists := l_mr_accomplish_exists;
3369:
3370: IF G_DEBUG = 'Y' THEN
3371: AHL_DEBUG_PUB.debug ('Last Accomplished Date:' || x_accomplishment_date);
3372: AHL_DEBUG_PUB.debug ('Last Accomplished UE ID:' || x_accomplished_ue_id);
3373: AHL_DEBUG_PUB.debug ('Count of ctr values:' || x_last_acc_counter_val_tbl.COUNT);
3374: AHL_DEBUG_PUB.debug ('End Get Accomplishment Details');
3375: END IF;
3376:

Line 3373: AHL_DEBUG_PUB.debug ('Count of ctr values:' || x_last_acc_counter_val_tbl.COUNT);

3369:
3370: IF G_DEBUG = 'Y' THEN
3371: AHL_DEBUG_PUB.debug ('Last Accomplished Date:' || x_accomplishment_date);
3372: AHL_DEBUG_PUB.debug ('Last Accomplished UE ID:' || x_accomplished_ue_id);
3373: AHL_DEBUG_PUB.debug ('Count of ctr values:' || x_last_acc_counter_val_tbl.COUNT);
3374: AHL_DEBUG_PUB.debug ('End Get Accomplishment Details');
3375: END IF;
3376:
3377: END get_accomplishment_details;

Line 3374: AHL_DEBUG_PUB.debug ('End Get Accomplishment Details');

3370: IF G_DEBUG = 'Y' THEN
3371: AHL_DEBUG_PUB.debug ('Last Accomplished Date:' || x_accomplishment_date);
3372: AHL_DEBUG_PUB.debug ('Last Accomplished UE ID:' || x_accomplished_ue_id);
3373: AHL_DEBUG_PUB.debug ('Count of ctr values:' || x_last_acc_counter_val_tbl.COUNT);
3374: AHL_DEBUG_PUB.debug ('End Get Accomplishment Details');
3375: END IF;
3376:
3377: END get_accomplishment_details;
3378:

Line 3699: AHL_DEBUG_PUB.debug ('Start Build Effectivity for mr:csi' || p_applicable_mrs_rec.mr_header_id || ':' || p_applicable_mrs_rec.csi_item_instance_id );

3695: BEGIN
3696:
3697:
3698: IF G_DEBUG = 'Y' THEN
3699: AHL_DEBUG_PUB.debug ('Start Build Effectivity for mr:csi' || p_applicable_mrs_rec.mr_header_id || ':' || p_applicable_mrs_rec.csi_item_instance_id );
3700: END IF;
3701:
3702: -- verify processing flag as it may have been updated during processing.
3703: BEGIN

Line 3713: AHL_DEBUG_PUB.debug ('Already Processed ...Skipping Build Effectivity for mr:csi' || p_applicable_mrs_rec.mr_header_id || ':' || p_applicable_mrs_rec.csi_item_instance_id );

3709: AND rownum < 2;
3710:
3711: IF l_process_status_flag = 'Y' THEN
3712: IF G_DEBUG = 'Y' THEN
3713: AHL_DEBUG_PUB.debug ('Already Processed ...Skipping Build Effectivity for mr:csi' || p_applicable_mrs_rec.mr_header_id || ':' || p_applicable_mrs_rec.csi_item_instance_id );
3714: END IF;
3715: RETURN;
3716: END IF;
3717:

Line 3763: AHL_DEBUG_PUB.debug ('count x_loop_chain_MR_tbl:next_due_flag:' || l_lc_mr_tbl.count || ':' || l_skip_next_due_flag);

3759: x_loop_chain_MR_tbl => l_lc_mr_tbl);
3760:
3761: l_skip_next_due_flag := 'N';
3762: IF G_DEBUG = 'Y' THEN
3763: AHL_DEBUG_PUB.debug ('count x_loop_chain_MR_tbl:next_due_flag:' || l_lc_mr_tbl.count || ':' || l_skip_next_due_flag);
3764: END IF;
3765: END IF;
3766:
3767:

Line 3778: AHL_DEBUG_PUB.debug ('count x_loop_chain_MR_tbl:next_due_flag:' || l_lc_mr_tbl.count || ':' || l_skip_next_due_flag);

3774: x_loop_last_counter_val_tbl => l_loop_last_counter_val_tbl,
3775: x_next_due_skip_flag => l_skip_next_due_flag);
3776:
3777: IF G_DEBUG = 'Y' THEN
3778: AHL_DEBUG_PUB.debug ('count x_loop_chain_MR_tbl:next_due_flag:' || l_lc_mr_tbl.count || ':' || l_skip_next_due_flag);
3779: END IF;
3780:
3781: -- for loop case, l_skip_next_due_flag returned from Process_Loop_Init indicates if
3782: -- next due calculation needs to be skipped, in which case, we start calculating based on repetivity flag = Y

Line 3835: AHL_DEBUG_PUB.Debug('Found due_date for preceding MR: '|| l_preceding_next_due_date);

3831: --dbms_output.put_line ('not found preceding');
3832: l_calc_due_date_flag := FALSE;
3833: ELSE
3834: IF G_DEBUG = 'Y' THEN
3835: AHL_DEBUG_PUB.Debug('Found due_date for preceding MR: '|| l_preceding_next_due_date);
3836: END IF;
3837: l_last_accomplishment_date := l_preceding_next_due_date;
3838: --dbms_output.put_line ('found preceding due_date' ||l_preceding_next_due_date );
3839: -- get all counter values as on l_preceding_next_due_date.

Line 3848: AHL_DEBUG_PUB.Debug('l_preceding_due_date: '|| l_preceding_next_due_date);

3844: x_due_at_counter_val_tbl => l_last_acc_counter_val_tbl,
3845: x_return_value => l_return_value);
3846:
3847: IF G_DEBUG = 'Y' THEN
3848: AHL_DEBUG_PUB.Debug('l_preceding_due_date: '|| l_preceding_next_due_date);
3849: IF (l_last_acc_counter_val_tbl.COUNT) > 0 THEN
3850: for i in l_last_acc_counter_val_tbl.FIRST..l_last_acc_counter_val_tbl.LAST LOOP
3851: AHL_DEBUG_PUB.Debug('i:'|| i|| ' value:' || l_last_acc_counter_val_tbl(i).counter_value || 'ID: ' || l_last_acc_counter_val_tbl(i).counter_id);
3852: --dbms_output.put_line('i:'|| i|| ' value:' || l_last_acc_counter_val_tbl(i).counter_value || 'ID: ' || l_last_acc_counter_val_tbl(i).counter_id);

Line 3851: AHL_DEBUG_PUB.Debug('i:'|| i|| ' value:' || l_last_acc_counter_val_tbl(i).counter_value || 'ID: ' || l_last_acc_counter_val_tbl(i).counter_id);

3847: IF G_DEBUG = 'Y' THEN
3848: AHL_DEBUG_PUB.Debug('l_preceding_due_date: '|| l_preceding_next_due_date);
3849: IF (l_last_acc_counter_val_tbl.COUNT) > 0 THEN
3850: for i in l_last_acc_counter_val_tbl.FIRST..l_last_acc_counter_val_tbl.LAST LOOP
3851: AHL_DEBUG_PUB.Debug('i:'|| i|| ' value:' || l_last_acc_counter_val_tbl(i).counter_value || 'ID: ' || l_last_acc_counter_val_tbl(i).counter_id);
3852: --dbms_output.put_line('i:'|| i|| ' value:' || l_last_acc_counter_val_tbl(i).counter_value || 'ID: ' || l_last_acc_counter_val_tbl(i).counter_id);
3853: end loop;
3854: END IF;
3855: END IF;

Line 3887: AHL_DEBUG_PUB.Debug('Aft calculate_due_date nextdue');

3883: x_next_due_date_rec => l_next_due_date_rec);
3884: END IF;
3885:
3886: IF G_DEBUG = 'Y' THEN
3887: AHL_DEBUG_PUB.Debug('Aft calculate_due_date nextdue');
3888: AHL_DEBUG_PUB.Debug('due date is ' || l_next_due_date_rec.DUE_DATE);
3889: AHL_DEBUG_PUB.Debug('earliest due date is ' || l_next_due_date_rec.EARLIEST_DUE_DATE);
3890: AHL_DEBUG_PUB.Debug('latest due date is ' || l_next_due_date_rec.latest_due_date);
3891: AHL_DEBUG_PUB.Debug('p_repetivity_flag => N, FLEET_ASSO_REJECTED ' || l_next_due_date_rec.FLEET_ASSO_REJECTED);

Line 3888: AHL_DEBUG_PUB.Debug('due date is ' || l_next_due_date_rec.DUE_DATE);

3884: END IF;
3885:
3886: IF G_DEBUG = 'Y' THEN
3887: AHL_DEBUG_PUB.Debug('Aft calculate_due_date nextdue');
3888: AHL_DEBUG_PUB.Debug('due date is ' || l_next_due_date_rec.DUE_DATE);
3889: AHL_DEBUG_PUB.Debug('earliest due date is ' || l_next_due_date_rec.EARLIEST_DUE_DATE);
3890: AHL_DEBUG_PUB.Debug('latest due date is ' || l_next_due_date_rec.latest_due_date);
3891: AHL_DEBUG_PUB.Debug('p_repetivity_flag => N, FLEET_ASSO_REJECTED ' || l_next_due_date_rec.FLEET_ASSO_REJECTED);
3892: END IF;

Line 3889: AHL_DEBUG_PUB.Debug('earliest due date is ' || l_next_due_date_rec.EARLIEST_DUE_DATE);

3885:
3886: IF G_DEBUG = 'Y' THEN
3887: AHL_DEBUG_PUB.Debug('Aft calculate_due_date nextdue');
3888: AHL_DEBUG_PUB.Debug('due date is ' || l_next_due_date_rec.DUE_DATE);
3889: AHL_DEBUG_PUB.Debug('earliest due date is ' || l_next_due_date_rec.EARLIEST_DUE_DATE);
3890: AHL_DEBUG_PUB.Debug('latest due date is ' || l_next_due_date_rec.latest_due_date);
3891: AHL_DEBUG_PUB.Debug('p_repetivity_flag => N, FLEET_ASSO_REJECTED ' || l_next_due_date_rec.FLEET_ASSO_REJECTED);
3892: END IF;
3893:

Line 3890: AHL_DEBUG_PUB.Debug('latest due date is ' || l_next_due_date_rec.latest_due_date);

3886: IF G_DEBUG = 'Y' THEN
3887: AHL_DEBUG_PUB.Debug('Aft calculate_due_date nextdue');
3888: AHL_DEBUG_PUB.Debug('due date is ' || l_next_due_date_rec.DUE_DATE);
3889: AHL_DEBUG_PUB.Debug('earliest due date is ' || l_next_due_date_rec.EARLIEST_DUE_DATE);
3890: AHL_DEBUG_PUB.Debug('latest due date is ' || l_next_due_date_rec.latest_due_date);
3891: AHL_DEBUG_PUB.Debug('p_repetivity_flag => N, FLEET_ASSO_REJECTED ' || l_next_due_date_rec.FLEET_ASSO_REJECTED);
3892: END IF;
3893:
3894: -- JKJain, NR Analysis and Forecasting

Line 3891: AHL_DEBUG_PUB.Debug('p_repetivity_flag => N, FLEET_ASSO_REJECTED ' || l_next_due_date_rec.FLEET_ASSO_REJECTED);

3887: AHL_DEBUG_PUB.Debug('Aft calculate_due_date nextdue');
3888: AHL_DEBUG_PUB.Debug('due date is ' || l_next_due_date_rec.DUE_DATE);
3889: AHL_DEBUG_PUB.Debug('earliest due date is ' || l_next_due_date_rec.EARLIEST_DUE_DATE);
3890: AHL_DEBUG_PUB.Debug('latest due date is ' || l_next_due_date_rec.latest_due_date);
3891: AHL_DEBUG_PUB.Debug('p_repetivity_flag => N, FLEET_ASSO_REJECTED ' || l_next_due_date_rec.FLEET_ASSO_REJECTED);
3892: END IF;
3893:
3894: -- JKJain, NR Analysis and Forecasting
3895: IF(l_next_due_date_rec.FLEET_ASSO_REJECTED = 'Y' AND l_next_due_date_rec.DUE_DATE IS NOT NULL) THEN

Line 3905: AHL_DEBUG_PUB.Debug(p_applicable_mrs_rec.title || 'is terminated');

3901: -- if due date > l_mr_termination_date then MR is terminated and no calc is required.
3902: IF (l_mr_termination_date IS NOT NULL) THEN
3903: IF (l_next_due_date_rec.due_date is NOT NULL AND l_next_due_date_rec.due_date >= l_mr_termination_date) THEN
3904: IF G_DEBUG = 'Y' THEN
3905: AHL_DEBUG_PUB.Debug(p_applicable_mrs_rec.title || 'is terminated');
3906: END IF;
3907: RETURN;
3908: ELSIF l_mr_termination_date <= trunc(sysdate) THEN
3909: IF G_DEBUG = 'Y' THEN

Line 3910: AHL_DEBUG_PUB.Debug(p_applicable_mrs_rec.title || 'is terminated');

3906: END IF;
3907: RETURN;
3908: ELSIF l_mr_termination_date <= trunc(sysdate) THEN
3909: IF G_DEBUG = 'Y' THEN
3910: AHL_DEBUG_PUB.Debug(p_applicable_mrs_rec.title || 'is terminated');
3911: END IF;
3912: RETURN;
3913: END IF;
3914: END IF;

Line 3957: AHL_DEBUG_PUB.debug ('Rows fetched for instance-mr is: ' || ahl_unit_effectivity_csr%ROWCOUNT);

3953: l_orig_ue_tbl, l_prior_mr_header_tbl LIMIT l_buffer_limit;
3954: EXIT WHEN (l_ue_id_tbl.count = 0);
3955:
3956: IF G_DEBUG = 'Y' THEN
3957: AHL_DEBUG_PUB.debug ('Rows fetched for instance-mr is: ' || ahl_unit_effectivity_csr%ROWCOUNT);
3958: END IF;
3959:
3960: --dbms_output.put_line ('unit eff load i:' || l_unit_effectivity_tbl(i).unit_effectivity_id);
3961:

Line 3993: AHL_DEBUG_PUB.Debug('Visit assigned:End Date:' || l_visit_end_date);

3989: l_visit_assign_code);
3990:
3991: IF (l_visit_end_date IS NOT NULL AND trunc(l_visit_end_date) >= trunc(sysdate)) THEN
3992: IF G_DEBUG = 'Y' THEN
3993: AHL_DEBUG_PUB.Debug('Visit assigned:End Date:' || l_visit_end_date);
3994: END IF;
3995:
3996: l_unit_effectivity_tbl(i).visit_assign_flag := 'Y';
3997: l_unit_effectivity_tbl(i).visit_end_date := l_visit_end_date;

Line 4177: AHL_DEBUG_PUB.Debug('Check Multiple UMPs for due date:' || l_next_due_date_rec.due_date);

4173: IF (l_next_due_date_rec.due_date IS NOT NULL AND l_last_due_date = l_next_due_date_rec.due_date
4174: AND l_next_due_date_rec.counter_remain IS NOT NULL AND l_next_due_date_rec.counter_remain > 0)
4175: THEN
4176: IF G_DEBUG = 'Y' THEN
4177: AHL_DEBUG_PUB.Debug('Check Multiple UMPs for due date:' || l_next_due_date_rec.due_date);
4178: AHL_DEBUG_PUB.Debug('Counter Remain:' || l_next_due_date_rec.counter_remain );
4179: END IF;
4180:
4181: -- get usage for due date.

Line 4178: AHL_DEBUG_PUB.Debug('Counter Remain:' || l_next_due_date_rec.counter_remain );

4174: AND l_next_due_date_rec.counter_remain IS NOT NULL AND l_next_due_date_rec.counter_remain > 0)
4175: THEN
4176: IF G_DEBUG = 'Y' THEN
4177: AHL_DEBUG_PUB.Debug('Check Multiple UMPs for due date:' || l_next_due_date_rec.due_date);
4178: AHL_DEBUG_PUB.Debug('Counter Remain:' || l_next_due_date_rec.counter_remain );
4179: END IF;
4180:
4181: -- get usage for due date.
4182: get_usage_for_date(l_next_due_date_rec.due_date,

Line 4193: AHL_DEBUG_PUB.Debug('get_usage_for_date:' || l_usage_per_day);

4189: l_duplicate_MRs := 1;
4190: END IF;
4191:
4192: IF G_DEBUG = 'Y' THEN
4193: AHL_DEBUG_PUB.Debug('get_usage_for_date:' || l_usage_per_day);
4194: AHL_DEBUG_PUB.Debug('l_duplicate_MRs:' || l_duplicate_MRs);
4195: END IF;
4196:
4197: END IF; -- l_next_due_date_rec.due_date IS NOT NULL

Line 4194: AHL_DEBUG_PUB.Debug('l_duplicate_MRs:' || l_duplicate_MRs);

4190: END IF;
4191:
4192: IF G_DEBUG = 'Y' THEN
4193: AHL_DEBUG_PUB.Debug('get_usage_for_date:' || l_usage_per_day);
4194: AHL_DEBUG_PUB.Debug('l_duplicate_MRs:' || l_duplicate_MRs);
4195: END IF;
4196:
4197: END IF; -- l_next_due_date_rec.due_date IS NOT NULL
4198:

Line 4288: AHL_DEBUG_PUB.Debug('New Unit eff:' || l_new_unit_effectivity_rec.unit_effectivity_id);

4284: l_forecast_sequence := l_forecast_sequence + 1;
4285: l_new_unit_effectivity_rec.forecast_sequence := l_forecast_sequence;
4286:
4287: IF G_DEBUG = 'Y' THEN
4288: AHL_DEBUG_PUB.Debug('New Unit eff:' || l_new_unit_effectivity_rec.unit_effectivity_id);
4289: AHL_DEBUG_PUB.Debug('Old forecast seq:'|| l_old_UE_forecast_sequence);
4290: END IF;
4291:
4292: -- set repetivity based on next_due_flag.

Line 4289: AHL_DEBUG_PUB.Debug('Old forecast seq:'|| l_old_UE_forecast_sequence);

4285: l_new_unit_effectivity_rec.forecast_sequence := l_forecast_sequence;
4286:
4287: IF G_DEBUG = 'Y' THEN
4288: AHL_DEBUG_PUB.Debug('New Unit eff:' || l_new_unit_effectivity_rec.unit_effectivity_id);
4289: AHL_DEBUG_PUB.Debug('Old forecast seq:'|| l_old_UE_forecast_sequence);
4290: END IF;
4291:
4292: -- set repetivity based on next_due_flag.
4293: IF (l_next_due_flag) THEN

Line 4314: AHL_DEBUG_PUB.Debug('SB Changes:Forecast Seq:Seq Num:Trigger:startMR:' || l_forecast_sequence || ':' || l_new_unit_effectivity_rec.loop_chain_seq_num ||

4310: l_new_unit_effectivity_rec.accomplish_trigger_type := p_applicable_mrs_rec.accomplish_trigger_type;
4311: l_new_unit_effectivity_rec.start_mr_header_id := p_applicable_mrs_rec.mr_header_id;
4312: l_new_unit_effectivity_rec.start_lc_ue_id := l_new_unit_effectivity_rec.unit_effectivity_id;
4313: IF G_DEBUG = 'Y' THEN
4314: AHL_DEBUG_PUB.Debug('SB Changes:Forecast Seq:Seq Num:Trigger:startMR:' || l_forecast_sequence || ':' || l_new_unit_effectivity_rec.loop_chain_seq_num ||
4315: ':' || l_new_unit_effectivity_rec.accomplish_trigger_type || ':' || l_new_unit_effectivity_rec.start_mr_header_id);
4316: END IF;
4317: END IF;
4318:

Line 4325: AHL_DEBUG_PUB.Debug('Prior MR Header_id:' || l_unit_effectivity_tbl(l_old_UE_forecast_sequence).prior_mr_header_id);

4321: (l_old_UE_forecast_found = TRUE AND p_applicable_mrs_rec.expired_mr_flag = 'Y')
4322: THEN
4323:
4324: IF G_DEBUG = 'Y' THEN
4325: AHL_DEBUG_PUB.Debug('Prior MR Header_id:' || l_unit_effectivity_tbl(l_old_UE_forecast_sequence).prior_mr_header_id);
4326: END IF;
4327:
4328: -- Process prior grpup MR or independent.
4329: Process_Prior_MR_Version (p_applicable_mrs_rec,

Line 4340: AHL_DEBUG_PUB.Debug('After create_temp_unit_effectivity');

4336: -- create record in temporary table.
4337: Create_Temp_Unit_Effectivity (l_new_unit_effectivity_rec);
4338:
4339: IF G_DEBUG = 'Y' THEN
4340: AHL_DEBUG_PUB.Debug('After create_temp_unit_effectivity');
4341: END IF;
4342:
4343: ELSE
4344: -- Process group MR.

Line 4356: AHL_DEBUG_PUB.Debug('Before call to Process_Loop_Chain_MRs for last due date:' || l_last_due_date);

4352: -- Process loop or chain child MRs for the start MR's due date.
4353: IF (NOT(group_check_flag) AND (p_applicable_mrs_rec.accomplish_trigger_type IN ('LOOP','CHAIN'))) THEN
4354:
4355: IF G_DEBUG = 'Y' THEN
4356: AHL_DEBUG_PUB.Debug('Before call to Process_Loop_Chain_MRs for last due date:' || l_last_due_date);
4357: END IF;
4358: Process_Loop_Chain_MRs (p_item_instance_id => p_applicable_mrs_rec.csi_item_instance_id,
4359: p_repetivity_flag => 'Y',
4360: p_new_unit_effectivity_rec => l_new_unit_effectivity_rec,

Line 4373: AHL_DEBUG_PUB.Debug('After call to Process_Loop_Chain_MRs:loop_due_date:' || l_loop_due_date); -- || l_return_status);

4369: --x_return_status => l_return_status
4370: );
4371:
4372: IF G_DEBUG = 'Y' THEN
4373: AHL_DEBUG_PUB.Debug('After call to Process_Loop_Chain_MRs:loop_due_date:' || l_loop_due_date); -- || l_return_status);
4374: END IF;
4375: END IF;
4376:
4377: -- Set next due flag to FALSE after writing record into temporary unit_effectivity.

Line 4415: AHL_DEBUG_PUB.Debug('Calc Loop dates:l_due_date:l_last_due_date:' || l_due_date || ':' || l_last_due_date);

4411: l_last_due_date := l_loop_last_due_date;
4412: l_last_due_counter_val_tbl := l_loop_last_counter_val_tbl;
4413:
4414: IF G_DEBUG = 'Y' THEN
4415: AHL_DEBUG_PUB.Debug('Calc Loop dates:l_due_date:l_last_due_date:' || l_due_date || ':' || l_last_due_date);
4416: END IF;
4417:
4418: -- JKJain, NR Analysis and Forecasting
4419: ELSIF(l_next_due_date_rec.FLEET_ASSO_REJECTED = 'Y') THEN

Line 4426: AHL_DEBUG_PUB.Debug('l_fleet_asso_rej_date = ' || l_fleet_asso_rej_date);

4422: FETCH get_next_fleet_asso_date into l_next_fleet_asso_date;
4423: CLOSE get_next_fleet_asso_date;
4424:
4425: IF G_DEBUG = 'Y' THEN
4426: AHL_DEBUG_PUB.Debug('l_fleet_asso_rej_date = ' || l_fleet_asso_rej_date);
4427: AHL_DEBUG_PUB.Debug('l_next_fleet_asso_date = ' || l_next_fleet_asso_date);
4428: END IF;
4429:
4430: IF(l_next_fleet_asso_date IS NULL) THEN

Line 4427: AHL_DEBUG_PUB.Debug('l_next_fleet_asso_date = ' || l_next_fleet_asso_date);

4423: CLOSE get_next_fleet_asso_date;
4424:
4425: IF G_DEBUG = 'Y' THEN
4426: AHL_DEBUG_PUB.Debug('l_fleet_asso_rej_date = ' || l_fleet_asso_rej_date);
4427: AHL_DEBUG_PUB.Debug('l_next_fleet_asso_date = ' || l_next_fleet_asso_date);
4428: END IF;
4429:
4430: IF(l_next_fleet_asso_date IS NULL) THEN
4431: l_next_due_date_rec.FLEET_ASSO_REJECTED := 'N';

Line 4454: AHL_DEBUG_PUB.Debug('group due date found');

4450: -- Fix for bug# 6858788. Reset l_last_due_mr_interval_id if duedate based on group MR.
4451: l_last_due_mr_interval_id := NULL;
4452:
4453: IF (G_DEBUG = 'Y') THEN
4454: AHL_DEBUG_PUB.Debug('group due date found');
4455: AHL_DEBUG_PUB.Debug('due date is ' || l_DUE_DATE);
4456: END IF;
4457: ELSE
4458:

Line 4455: AHL_DEBUG_PUB.Debug('due date is ' || l_DUE_DATE);

4451: l_last_due_mr_interval_id := NULL;
4452:
4453: IF (G_DEBUG = 'Y') THEN
4454: AHL_DEBUG_PUB.Debug('group due date found');
4455: AHL_DEBUG_PUB.Debug('due date is ' || l_DUE_DATE);
4456: END IF;
4457: ELSE
4458:
4459: -- Set values for next repetivity calculation.

Line 4475: AHL_DEBUG_PUB.Debug('Processing for repetivity');

4471: l_due_date := sysdate;
4472: END IF;
4473:
4474: IF G_DEBUG = 'Y' THEN
4475: AHL_DEBUG_PUB.Debug('Processing for repetivity');
4476: AHL_DEBUG_PUB.Debug('Before get_due_at_counter_values');
4477: AHL_DEBUG_PUB.Debug('l_last_due_date: '|| l_last_due_date);
4478: AHL_DEBUG_PUB.Debug('l_due_date: '|| l_due_date);
4479: IF (l_last_due_counter_val_tbl.COUNT > 0) THEN

Line 4476: AHL_DEBUG_PUB.Debug('Before get_due_at_counter_values');

4472: END IF;
4473:
4474: IF G_DEBUG = 'Y' THEN
4475: AHL_DEBUG_PUB.Debug('Processing for repetivity');
4476: AHL_DEBUG_PUB.Debug('Before get_due_at_counter_values');
4477: AHL_DEBUG_PUB.Debug('l_last_due_date: '|| l_last_due_date);
4478: AHL_DEBUG_PUB.Debug('l_due_date: '|| l_due_date);
4479: IF (l_last_due_counter_val_tbl.COUNT > 0) THEN
4480: FOR i in l_last_due_counter_val_tbl.FIRST..l_last_due_counter_val_tbl.LAST LOOP

Line 4477: AHL_DEBUG_PUB.Debug('l_last_due_date: '|| l_last_due_date);

4473:
4474: IF G_DEBUG = 'Y' THEN
4475: AHL_DEBUG_PUB.Debug('Processing for repetivity');
4476: AHL_DEBUG_PUB.Debug('Before get_due_at_counter_values');
4477: AHL_DEBUG_PUB.Debug('l_last_due_date: '|| l_last_due_date);
4478: AHL_DEBUG_PUB.Debug('l_due_date: '|| l_due_date);
4479: IF (l_last_due_counter_val_tbl.COUNT > 0) THEN
4480: FOR i in l_last_due_counter_val_tbl.FIRST..l_last_due_counter_val_tbl.LAST LOOP
4481: AHL_DEBUG_PUB.Debug('i:'|| i|| ' value:' || l_last_due_counter_val_tbl(i).counter_value || 'ID: ' || l_last_due_counter_val_tbl(i).counter_id);

Line 4478: AHL_DEBUG_PUB.Debug('l_due_date: '|| l_due_date);

4474: IF G_DEBUG = 'Y' THEN
4475: AHL_DEBUG_PUB.Debug('Processing for repetivity');
4476: AHL_DEBUG_PUB.Debug('Before get_due_at_counter_values');
4477: AHL_DEBUG_PUB.Debug('l_last_due_date: '|| l_last_due_date);
4478: AHL_DEBUG_PUB.Debug('l_due_date: '|| l_due_date);
4479: IF (l_last_due_counter_val_tbl.COUNT > 0) THEN
4480: FOR i in l_last_due_counter_val_tbl.FIRST..l_last_due_counter_val_tbl.LAST LOOP
4481: AHL_DEBUG_PUB.Debug('i:'|| i|| ' value:' || l_last_due_counter_val_tbl(i).counter_value || 'ID: ' || l_last_due_counter_val_tbl(i).counter_id);
4482: END LOOP;

Line 4481: AHL_DEBUG_PUB.Debug('i:'|| i|| ' value:' || l_last_due_counter_val_tbl(i).counter_value || 'ID: ' || l_last_due_counter_val_tbl(i).counter_id);

4477: AHL_DEBUG_PUB.Debug('l_last_due_date: '|| l_last_due_date);
4478: AHL_DEBUG_PUB.Debug('l_due_date: '|| l_due_date);
4479: IF (l_last_due_counter_val_tbl.COUNT > 0) THEN
4480: FOR i in l_last_due_counter_val_tbl.FIRST..l_last_due_counter_val_tbl.LAST LOOP
4481: AHL_DEBUG_PUB.Debug('i:'|| i|| ' value:' || l_last_due_counter_val_tbl(i).counter_value || 'ID: ' || l_last_due_counter_val_tbl(i).counter_id);
4482: END LOOP;
4483: END IF;
4484: END IF;
4485:

Line 4497: AHL_DEBUG_PUB.Debug('AFter get_due_at_counter_values');

4493: l_last_due_date := l_due_date;
4494: l_last_due_counter_val_tbl := l_due_at_counter_val_tbl;
4495:
4496: IF G_DEBUG = 'Y' THEN
4497: AHL_DEBUG_PUB.Debug('AFter get_due_at_counter_values');
4498: AHL_DEBUG_PUB.Debug('l_last_due_date: '|| l_last_due_date);
4499: AHL_DEBUG_PUB.Debug('l_due_date: '|| l_due_date);
4500: IF (l_due_at_counter_val_tbl.COUNT) > 0 THEN
4501: for i in l_due_at_counter_val_tbl.FIRST..l_due_at_counter_val_tbl.LAST LOOP

Line 4498: AHL_DEBUG_PUB.Debug('l_last_due_date: '|| l_last_due_date);

4494: l_last_due_counter_val_tbl := l_due_at_counter_val_tbl;
4495:
4496: IF G_DEBUG = 'Y' THEN
4497: AHL_DEBUG_PUB.Debug('AFter get_due_at_counter_values');
4498: AHL_DEBUG_PUB.Debug('l_last_due_date: '|| l_last_due_date);
4499: AHL_DEBUG_PUB.Debug('l_due_date: '|| l_due_date);
4500: IF (l_due_at_counter_val_tbl.COUNT) > 0 THEN
4501: for i in l_due_at_counter_val_tbl.FIRST..l_due_at_counter_val_tbl.LAST LOOP
4502: AHL_DEBUG_PUB.Debug('i:'|| i|| ' value:' || l_due_at_counter_val_tbl(i).counter_value || 'ID: ' || l_due_at_counter_val_tbl(i).counter_id);

Line 4499: AHL_DEBUG_PUB.Debug('l_due_date: '|| l_due_date);

4495:
4496: IF G_DEBUG = 'Y' THEN
4497: AHL_DEBUG_PUB.Debug('AFter get_due_at_counter_values');
4498: AHL_DEBUG_PUB.Debug('l_last_due_date: '|| l_last_due_date);
4499: AHL_DEBUG_PUB.Debug('l_due_date: '|| l_due_date);
4500: IF (l_due_at_counter_val_tbl.COUNT) > 0 THEN
4501: for i in l_due_at_counter_val_tbl.FIRST..l_due_at_counter_val_tbl.LAST LOOP
4502: AHL_DEBUG_PUB.Debug('i:'|| i|| ' value:' || l_due_at_counter_val_tbl(i).counter_value || 'ID: ' || l_due_at_counter_val_tbl(i).counter_id);
4503: end loop;

Line 4502: AHL_DEBUG_PUB.Debug('i:'|| i|| ' value:' || l_due_at_counter_val_tbl(i).counter_value || 'ID: ' || l_due_at_counter_val_tbl(i).counter_id);

4498: AHL_DEBUG_PUB.Debug('l_last_due_date: '|| l_last_due_date);
4499: AHL_DEBUG_PUB.Debug('l_due_date: '|| l_due_date);
4500: IF (l_due_at_counter_val_tbl.COUNT) > 0 THEN
4501: for i in l_due_at_counter_val_tbl.FIRST..l_due_at_counter_val_tbl.LAST LOOP
4502: AHL_DEBUG_PUB.Debug('i:'|| i|| ' value:' || l_due_at_counter_val_tbl(i).counter_value || 'ID: ' || l_due_at_counter_val_tbl(i).counter_id);
4503: end loop;
4504: END IF;
4505: END IF;
4506:

Line 4526: AHL_DEBUG_PUB.Debug('aft calculate_due_date - repetivity');

4522: p_last_due_mr_interval_id => l_last_due_mr_interval_id,
4523: x_next_due_date_rec => l_next_due_date_rec);
4524:
4525: IF G_DEBUG = 'Y' THEN
4526: AHL_DEBUG_PUB.Debug('aft calculate_due_date - repetivity');
4527: AHL_DEBUG_PUB.Debug('due date is ' || l_next_due_date_rec.DUE_DATE);
4528: AHL_DEBUG_PUB.Debug('earliest due date is ' || l_next_due_date_rec.EARLIEST_DUE_DATE);
4529: AHL_DEBUG_PUB.Debug('latest due date is ' || l_next_due_date_rec.latest_due_date);
4530: AHL_DEBUG_PUB.Debug('FLEET_ASSO_REJECTED = ' || l_next_due_date_rec.FLEET_ASSO_REJECTED);

Line 4527: AHL_DEBUG_PUB.Debug('due date is ' || l_next_due_date_rec.DUE_DATE);

4523: x_next_due_date_rec => l_next_due_date_rec);
4524:
4525: IF G_DEBUG = 'Y' THEN
4526: AHL_DEBUG_PUB.Debug('aft calculate_due_date - repetivity');
4527: AHL_DEBUG_PUB.Debug('due date is ' || l_next_due_date_rec.DUE_DATE);
4528: AHL_DEBUG_PUB.Debug('earliest due date is ' || l_next_due_date_rec.EARLIEST_DUE_DATE);
4529: AHL_DEBUG_PUB.Debug('latest due date is ' || l_next_due_date_rec.latest_due_date);
4530: AHL_DEBUG_PUB.Debug('FLEET_ASSO_REJECTED = ' || l_next_due_date_rec.FLEET_ASSO_REJECTED);
4531: END IF;

Line 4528: AHL_DEBUG_PUB.Debug('earliest due date is ' || l_next_due_date_rec.EARLIEST_DUE_DATE);

4524:
4525: IF G_DEBUG = 'Y' THEN
4526: AHL_DEBUG_PUB.Debug('aft calculate_due_date - repetivity');
4527: AHL_DEBUG_PUB.Debug('due date is ' || l_next_due_date_rec.DUE_DATE);
4528: AHL_DEBUG_PUB.Debug('earliest due date is ' || l_next_due_date_rec.EARLIEST_DUE_DATE);
4529: AHL_DEBUG_PUB.Debug('latest due date is ' || l_next_due_date_rec.latest_due_date);
4530: AHL_DEBUG_PUB.Debug('FLEET_ASSO_REJECTED = ' || l_next_due_date_rec.FLEET_ASSO_REJECTED);
4531: END IF;
4532:

Line 4529: AHL_DEBUG_PUB.Debug('latest due date is ' || l_next_due_date_rec.latest_due_date);

4525: IF G_DEBUG = 'Y' THEN
4526: AHL_DEBUG_PUB.Debug('aft calculate_due_date - repetivity');
4527: AHL_DEBUG_PUB.Debug('due date is ' || l_next_due_date_rec.DUE_DATE);
4528: AHL_DEBUG_PUB.Debug('earliest due date is ' || l_next_due_date_rec.EARLIEST_DUE_DATE);
4529: AHL_DEBUG_PUB.Debug('latest due date is ' || l_next_due_date_rec.latest_due_date);
4530: AHL_DEBUG_PUB.Debug('FLEET_ASSO_REJECTED = ' || l_next_due_date_rec.FLEET_ASSO_REJECTED);
4531: END IF;
4532:
4533: -- JKJain, NR Analysis and Forecasting

Line 4530: AHL_DEBUG_PUB.Debug('FLEET_ASSO_REJECTED = ' || l_next_due_date_rec.FLEET_ASSO_REJECTED);

4526: AHL_DEBUG_PUB.Debug('aft calculate_due_date - repetivity');
4527: AHL_DEBUG_PUB.Debug('due date is ' || l_next_due_date_rec.DUE_DATE);
4528: AHL_DEBUG_PUB.Debug('earliest due date is ' || l_next_due_date_rec.EARLIEST_DUE_DATE);
4529: AHL_DEBUG_PUB.Debug('latest due date is ' || l_next_due_date_rec.latest_due_date);
4530: AHL_DEBUG_PUB.Debug('FLEET_ASSO_REJECTED = ' || l_next_due_date_rec.FLEET_ASSO_REJECTED);
4531: END IF;
4532:
4533: -- JKJain, NR Analysis and Forecasting
4534: IF(l_next_due_date_rec.FLEET_ASSO_REJECTED = 'Y' AND l_next_due_date_rec.DUE_DATE IS NOT NULL) THEN

Line 4547: AHL_DEBUG_PUB.Debug('Adding one day to l_next_due_date_rec.due_date:' || l_next_due_date_rec.due_date);

4543: l_next_due_date_rec.EARLIEST_DUE_DATE := NULL;
4544: l_next_due_date_rec.latest_due_date := NULL;
4545:
4546: IF G_DEBUG = 'Y' THEN
4547: AHL_DEBUG_PUB.Debug('Adding one day to l_next_due_date_rec.due_date:' || l_next_due_date_rec.due_date);
4548: END IF;
4549:
4550: --IF G_DEBUG = 'Y' THEN
4551: -- AHL_DEBUG_PUB.Debug('Exiting build effectivity as last due = due date');

Line 4551: -- AHL_DEBUG_PUB.Debug('Exiting build effectivity as last due = due date');

4547: AHL_DEBUG_PUB.Debug('Adding one day to l_next_due_date_rec.due_date:' || l_next_due_date_rec.due_date);
4548: END IF;
4549:
4550: --IF G_DEBUG = 'Y' THEN
4551: -- AHL_DEBUG_PUB.Debug('Exiting build effectivity as last due = due date');
4552: --END IF;
4553: --EXIT;
4554: END IF;
4555: END IF;

Line 4739: AHL_DEBUG_PUB.Debug('In calculate due date');

4735:
4736: BEGIN
4737:
4738: IF G_DEBUG = 'Y' THEN
4739: AHL_DEBUG_PUB.Debug('In calculate due date');
4740: END IF;
4741:
4742: -- Initialize due date.
4743: l_calc_due_date := null;

Line 4772: AHL_DEBUG_PUB.Debug('INIT-Due processing: Set due_date:UE_ID:' || l_set_due_date || ':' || l_unit_effectivity_id);

4768: FETCH ahl_init_due_csr INTO l_set_due_date, l_unit_effectivity_id, l_unit_deferral_id;
4769: IF (ahl_init_due_csr%FOUND) THEN
4770:
4771: IF G_DEBUG = 'Y' THEN
4772: AHL_DEBUG_PUB.Debug('INIT-Due processing: Set due_date:UE_ID:' || l_set_due_date || ':' || l_unit_effectivity_id);
4773: END IF;
4774: --dbms_output.put_line ('in INIT-due part: due_date' || l_set_due_date);
4775:
4776: FOR threshold_rec IN ahl_unit_thresholds_csr (l_unit_deferral_id)

Line 5000: AHL_DEBUG_PUB.Debug('eff ID' || effectivity_rec.mr_effectivity_id );

4996: p_applicable_mrs_rec.mr_header_id)
4997: LOOP
4998:
4999: IF G_DEBUG = 'Y' THEN
5000: AHL_DEBUG_PUB.Debug('eff ID' || effectivity_rec.mr_effectivity_id );
5001: END IF;
5002:
5003: l_threshold_date := effectivity_rec.threshold_date;
5004: l_mr_interval_found := FALSE;

Line 5102: AHL_DEBUG_PUB.Debug('In interval table loop');

5098: --l_mr_interval_found := TRUE; /* found a interval. */
5099: l_mr_interval_rec := mr_interval_rec;
5100:
5101: IF G_DEBUG = 'Y' THEN
5102: AHL_DEBUG_PUB.Debug('In interval table loop');
5103: AHL_DEBUG_PUB.Debug('mr interval:' || l_mr_interval_rec.mr_interval_id );
5104: AHL_DEBUG_PUB.Debug('start value:' ||l_mr_interval_rec.start_value);
5105: AHL_DEBUG_PUB.Debug('stop value:' ||l_mr_interval_rec.stop_value);
5106: AHL_DEBUG_PUB.Debug('start date:' ||l_mr_interval_rec.start_date);

Line 5103: AHL_DEBUG_PUB.Debug('mr interval:' || l_mr_interval_rec.mr_interval_id );

5099: l_mr_interval_rec := mr_interval_rec;
5100:
5101: IF G_DEBUG = 'Y' THEN
5102: AHL_DEBUG_PUB.Debug('In interval table loop');
5103: AHL_DEBUG_PUB.Debug('mr interval:' || l_mr_interval_rec.mr_interval_id );
5104: AHL_DEBUG_PUB.Debug('start value:' ||l_mr_interval_rec.start_value);
5105: AHL_DEBUG_PUB.Debug('stop value:' ||l_mr_interval_rec.stop_value);
5106: AHL_DEBUG_PUB.Debug('start date:' ||l_mr_interval_rec.start_date);
5107: AHL_DEBUG_PUB.Debug('stop date:' ||l_mr_interval_rec.stop_date);

Line 5104: AHL_DEBUG_PUB.Debug('start value:' ||l_mr_interval_rec.start_value);

5100:
5101: IF G_DEBUG = 'Y' THEN
5102: AHL_DEBUG_PUB.Debug('In interval table loop');
5103: AHL_DEBUG_PUB.Debug('mr interval:' || l_mr_interval_rec.mr_interval_id );
5104: AHL_DEBUG_PUB.Debug('start value:' ||l_mr_interval_rec.start_value);
5105: AHL_DEBUG_PUB.Debug('stop value:' ||l_mr_interval_rec.stop_value);
5106: AHL_DEBUG_PUB.Debug('start date:' ||l_mr_interval_rec.start_date);
5107: AHL_DEBUG_PUB.Debug('stop date:' ||l_mr_interval_rec.stop_date);
5108: AHL_DEBUG_PUB.Debug('Interval Value:' ||l_mr_interval_rec.interval_value);

Line 5105: AHL_DEBUG_PUB.Debug('stop value:' ||l_mr_interval_rec.stop_value);

5101: IF G_DEBUG = 'Y' THEN
5102: AHL_DEBUG_PUB.Debug('In interval table loop');
5103: AHL_DEBUG_PUB.Debug('mr interval:' || l_mr_interval_rec.mr_interval_id );
5104: AHL_DEBUG_PUB.Debug('start value:' ||l_mr_interval_rec.start_value);
5105: AHL_DEBUG_PUB.Debug('stop value:' ||l_mr_interval_rec.stop_value);
5106: AHL_DEBUG_PUB.Debug('start date:' ||l_mr_interval_rec.start_date);
5107: AHL_DEBUG_PUB.Debug('stop date:' ||l_mr_interval_rec.stop_date);
5108: AHL_DEBUG_PUB.Debug('Interval Value:' ||l_mr_interval_rec.interval_value);
5109: AHL_DEBUG_PUB.Debug('tolerance bef:' ||l_mr_interval_rec.tolerance_before);

Line 5106: AHL_DEBUG_PUB.Debug('start date:' ||l_mr_interval_rec.start_date);

5102: AHL_DEBUG_PUB.Debug('In interval table loop');
5103: AHL_DEBUG_PUB.Debug('mr interval:' || l_mr_interval_rec.mr_interval_id );
5104: AHL_DEBUG_PUB.Debug('start value:' ||l_mr_interval_rec.start_value);
5105: AHL_DEBUG_PUB.Debug('stop value:' ||l_mr_interval_rec.stop_value);
5106: AHL_DEBUG_PUB.Debug('start date:' ||l_mr_interval_rec.start_date);
5107: AHL_DEBUG_PUB.Debug('stop date:' ||l_mr_interval_rec.stop_date);
5108: AHL_DEBUG_PUB.Debug('Interval Value:' ||l_mr_interval_rec.interval_value);
5109: AHL_DEBUG_PUB.Debug('tolerance bef:' ||l_mr_interval_rec.tolerance_before);
5110: AHL_DEBUG_PUB.Debug('tolerance aft:' ||l_mr_interval_rec.tolerance_after);

Line 5107: AHL_DEBUG_PUB.Debug('stop date:' ||l_mr_interval_rec.stop_date);

5103: AHL_DEBUG_PUB.Debug('mr interval:' || l_mr_interval_rec.mr_interval_id );
5104: AHL_DEBUG_PUB.Debug('start value:' ||l_mr_interval_rec.start_value);
5105: AHL_DEBUG_PUB.Debug('stop value:' ||l_mr_interval_rec.stop_value);
5106: AHL_DEBUG_PUB.Debug('start date:' ||l_mr_interval_rec.start_date);
5107: AHL_DEBUG_PUB.Debug('stop date:' ||l_mr_interval_rec.stop_date);
5108: AHL_DEBUG_PUB.Debug('Interval Value:' ||l_mr_interval_rec.interval_value);
5109: AHL_DEBUG_PUB.Debug('tolerance bef:' ||l_mr_interval_rec.tolerance_before);
5110: AHL_DEBUG_PUB.Debug('tolerance aft:' ||l_mr_interval_rec.tolerance_after);
5111: AHL_DEBUG_PUB.Debug('earliest_due_value:' ||l_mr_interval_rec.earliest_due_value);

Line 5108: AHL_DEBUG_PUB.Debug('Interval Value:' ||l_mr_interval_rec.interval_value);

5104: AHL_DEBUG_PUB.Debug('start value:' ||l_mr_interval_rec.start_value);
5105: AHL_DEBUG_PUB.Debug('stop value:' ||l_mr_interval_rec.stop_value);
5106: AHL_DEBUG_PUB.Debug('start date:' ||l_mr_interval_rec.start_date);
5107: AHL_DEBUG_PUB.Debug('stop date:' ||l_mr_interval_rec.stop_date);
5108: AHL_DEBUG_PUB.Debug('Interval Value:' ||l_mr_interval_rec.interval_value);
5109: AHL_DEBUG_PUB.Debug('tolerance bef:' ||l_mr_interval_rec.tolerance_before);
5110: AHL_DEBUG_PUB.Debug('tolerance aft:' ||l_mr_interval_rec.tolerance_after);
5111: AHL_DEBUG_PUB.Debug('earliest_due_value:' ||l_mr_interval_rec.earliest_due_value);
5112: AHL_DEBUG_PUB.Debug('CounterID:' || l_temp_counter_tbl(i).counter_id);

Line 5109: AHL_DEBUG_PUB.Debug('tolerance bef:' ||l_mr_interval_rec.tolerance_before);

5105: AHL_DEBUG_PUB.Debug('stop value:' ||l_mr_interval_rec.stop_value);
5106: AHL_DEBUG_PUB.Debug('start date:' ||l_mr_interval_rec.start_date);
5107: AHL_DEBUG_PUB.Debug('stop date:' ||l_mr_interval_rec.stop_date);
5108: AHL_DEBUG_PUB.Debug('Interval Value:' ||l_mr_interval_rec.interval_value);
5109: AHL_DEBUG_PUB.Debug('tolerance bef:' ||l_mr_interval_rec.tolerance_before);
5110: AHL_DEBUG_PUB.Debug('tolerance aft:' ||l_mr_interval_rec.tolerance_after);
5111: AHL_DEBUG_PUB.Debug('earliest_due_value:' ||l_mr_interval_rec.earliest_due_value);
5112: AHL_DEBUG_PUB.Debug('CounterID:' || l_temp_counter_tbl(i).counter_id);
5113: AHL_DEBUG_PUB.Debug('CounterName:' || l_temp_counter_tbl(i).counter_name);

Line 5110: AHL_DEBUG_PUB.Debug('tolerance aft:' ||l_mr_interval_rec.tolerance_after);

5106: AHL_DEBUG_PUB.Debug('start date:' ||l_mr_interval_rec.start_date);
5107: AHL_DEBUG_PUB.Debug('stop date:' ||l_mr_interval_rec.stop_date);
5108: AHL_DEBUG_PUB.Debug('Interval Value:' ||l_mr_interval_rec.interval_value);
5109: AHL_DEBUG_PUB.Debug('tolerance bef:' ||l_mr_interval_rec.tolerance_before);
5110: AHL_DEBUG_PUB.Debug('tolerance aft:' ||l_mr_interval_rec.tolerance_after);
5111: AHL_DEBUG_PUB.Debug('earliest_due_value:' ||l_mr_interval_rec.earliest_due_value);
5112: AHL_DEBUG_PUB.Debug('CounterID:' || l_temp_counter_tbl(i).counter_id);
5113: AHL_DEBUG_PUB.Debug('CounterName:' || l_temp_counter_tbl(i).counter_name);
5114: AHL_DEBUG_PUB.Debug('counter_value:' || l_counter_value);

Line 5111: AHL_DEBUG_PUB.Debug('earliest_due_value:' ||l_mr_interval_rec.earliest_due_value);

5107: AHL_DEBUG_PUB.Debug('stop date:' ||l_mr_interval_rec.stop_date);
5108: AHL_DEBUG_PUB.Debug('Interval Value:' ||l_mr_interval_rec.interval_value);
5109: AHL_DEBUG_PUB.Debug('tolerance bef:' ||l_mr_interval_rec.tolerance_before);
5110: AHL_DEBUG_PUB.Debug('tolerance aft:' ||l_mr_interval_rec.tolerance_after);
5111: AHL_DEBUG_PUB.Debug('earliest_due_value:' ||l_mr_interval_rec.earliest_due_value);
5112: AHL_DEBUG_PUB.Debug('CounterID:' || l_temp_counter_tbl(i).counter_id);
5113: AHL_DEBUG_PUB.Debug('CounterName:' || l_temp_counter_tbl(i).counter_name);
5114: AHL_DEBUG_PUB.Debug('counter_value:' || l_counter_value);
5115: AHL_DEBUG_PUB.Debug('current ctr:' ||l_current_ctr_value);

Line 5112: AHL_DEBUG_PUB.Debug('CounterID:' || l_temp_counter_tbl(i).counter_id);

5108: AHL_DEBUG_PUB.Debug('Interval Value:' ||l_mr_interval_rec.interval_value);
5109: AHL_DEBUG_PUB.Debug('tolerance bef:' ||l_mr_interval_rec.tolerance_before);
5110: AHL_DEBUG_PUB.Debug('tolerance aft:' ||l_mr_interval_rec.tolerance_after);
5111: AHL_DEBUG_PUB.Debug('earliest_due_value:' ||l_mr_interval_rec.earliest_due_value);
5112: AHL_DEBUG_PUB.Debug('CounterID:' || l_temp_counter_tbl(i).counter_id);
5113: AHL_DEBUG_PUB.Debug('CounterName:' || l_temp_counter_tbl(i).counter_name);
5114: AHL_DEBUG_PUB.Debug('counter_value:' || l_counter_value);
5115: AHL_DEBUG_PUB.Debug('current ctr:' ||l_current_ctr_value);
5116: END IF;

Line 5113: AHL_DEBUG_PUB.Debug('CounterName:' || l_temp_counter_tbl(i).counter_name);

5109: AHL_DEBUG_PUB.Debug('tolerance bef:' ||l_mr_interval_rec.tolerance_before);
5110: AHL_DEBUG_PUB.Debug('tolerance aft:' ||l_mr_interval_rec.tolerance_after);
5111: AHL_DEBUG_PUB.Debug('earliest_due_value:' ||l_mr_interval_rec.earliest_due_value);
5112: AHL_DEBUG_PUB.Debug('CounterID:' || l_temp_counter_tbl(i).counter_id);
5113: AHL_DEBUG_PUB.Debug('CounterName:' || l_temp_counter_tbl(i).counter_name);
5114: AHL_DEBUG_PUB.Debug('counter_value:' || l_counter_value);
5115: AHL_DEBUG_PUB.Debug('current ctr:' ||l_current_ctr_value);
5116: END IF;
5117:

Line 5114: AHL_DEBUG_PUB.Debug('counter_value:' || l_counter_value);

5110: AHL_DEBUG_PUB.Debug('tolerance aft:' ||l_mr_interval_rec.tolerance_after);
5111: AHL_DEBUG_PUB.Debug('earliest_due_value:' ||l_mr_interval_rec.earliest_due_value);
5112: AHL_DEBUG_PUB.Debug('CounterID:' || l_temp_counter_tbl(i).counter_id);
5113: AHL_DEBUG_PUB.Debug('CounterName:' || l_temp_counter_tbl(i).counter_name);
5114: AHL_DEBUG_PUB.Debug('counter_value:' || l_counter_value);
5115: AHL_DEBUG_PUB.Debug('current ctr:' ||l_current_ctr_value);
5116: END IF;
5117:
5118: l_counter_remain := 0; /* initialize */

Line 5115: AHL_DEBUG_PUB.Debug('current ctr:' ||l_current_ctr_value);

5111: AHL_DEBUG_PUB.Debug('earliest_due_value:' ||l_mr_interval_rec.earliest_due_value);
5112: AHL_DEBUG_PUB.Debug('CounterID:' || l_temp_counter_tbl(i).counter_id);
5113: AHL_DEBUG_PUB.Debug('CounterName:' || l_temp_counter_tbl(i).counter_name);
5114: AHL_DEBUG_PUB.Debug('counter_value:' || l_counter_value);
5115: AHL_DEBUG_PUB.Debug('current ctr:' ||l_current_ctr_value);
5116: END IF;
5117:
5118: l_counter_remain := 0; /* initialize */
5119:

Line 5266: AHL_DEBUG_PUB.Debug('due at counter_value:' || l_due_at_counter_value);

5262:
5263: --dbms_output.put_line ('counter remain' || l_counter_remain );
5264:
5265: IF G_DEBUG = 'Y' THEN
5266: AHL_DEBUG_PUB.Debug('due at counter_value:' || l_due_at_counter_value);
5267: AHL_DEBUG_PUB.Debug('counter remain:' || l_counter_remain);
5268: END IF;
5269:
5270: -- if due date already set based on start date then skip date calculation.

Line 5267: AHL_DEBUG_PUB.Debug('counter remain:' || l_counter_remain);

5263: --dbms_output.put_line ('counter remain' || l_counter_remain );
5264:
5265: IF G_DEBUG = 'Y' THEN
5266: AHL_DEBUG_PUB.Debug('due at counter_value:' || l_due_at_counter_value);
5267: AHL_DEBUG_PUB.Debug('counter remain:' || l_counter_remain);
5268: END IF;
5269:
5270: -- if due date already set based on start date then skip date calculation.
5271: IF NOT(l_reset_start_date_flag) THEN

Line 5346: AHL_DEBUG_PUB.Debug('JKJ- G_UC_HEADER_ID :' || G_UC_HEADER_ID || ' and l_due_date = '|| l_due_date);

5342: END IF;
5343:
5344: -- JKJain, NR Analysis and Forecasting
5345: IF G_DEBUG = 'Y' THEN
5346: AHL_DEBUG_PUB.Debug('JKJ- G_UC_HEADER_ID :' || G_UC_HEADER_ID || ' and l_due_date = '|| l_due_date);
5347: AHL_DEBUG_PUB.Debug('JKJ- effectivity_rec.fleet_header_id = ' || l_fleet_header_id);
5348: END IF;
5349:
5350: --Verify if due date is in fleet-unit asscociation

Line 5347: AHL_DEBUG_PUB.Debug('JKJ- effectivity_rec.fleet_header_id = ' || l_fleet_header_id);

5343:
5344: -- JKJain, NR Analysis and Forecasting
5345: IF G_DEBUG = 'Y' THEN
5346: AHL_DEBUG_PUB.Debug('JKJ- G_UC_HEADER_ID :' || G_UC_HEADER_ID || ' and l_due_date = '|| l_due_date);
5347: AHL_DEBUG_PUB.Debug('JKJ- effectivity_rec.fleet_header_id = ' || l_fleet_header_id);
5348: END IF;
5349:
5350: --Verify if due date is in fleet-unit asscociation
5351: IF(l_fleet_header_id is NOT NULL) THEN

Line 5552: AHL_DEBUG_PUB.Debug('Before Next interval table loop');

5548: --dbms_output.put_line ('Next mr interval');
5549: END IF; -- due date is null.
5550:
5551: IF G_DEBUG = 'Y' THEN
5552: AHL_DEBUG_PUB.Debug('Before Next interval table loop');
5553: AHL_DEBUG_PUB.Debug('l_due_date:' || l_due_date );
5554: AHL_DEBUG_PUB.Debug('l_calc_due_date:' || l_calc_due_date);
5555: AHL_DEBUG_PUB.Debug('l_calc_due_date_ctr_id:' || l_calc_due_date_ctr_id);
5556: END IF;

Line 5553: AHL_DEBUG_PUB.Debug('l_due_date:' || l_due_date );

5549: END IF; -- due date is null.
5550:
5551: IF G_DEBUG = 'Y' THEN
5552: AHL_DEBUG_PUB.Debug('Before Next interval table loop');
5553: AHL_DEBUG_PUB.Debug('l_due_date:' || l_due_date );
5554: AHL_DEBUG_PUB.Debug('l_calc_due_date:' || l_calc_due_date);
5555: AHL_DEBUG_PUB.Debug('l_calc_due_date_ctr_id:' || l_calc_due_date_ctr_id);
5556: END IF;
5557:

Line 5554: AHL_DEBUG_PUB.Debug('l_calc_due_date:' || l_calc_due_date);

5550:
5551: IF G_DEBUG = 'Y' THEN
5552: AHL_DEBUG_PUB.Debug('Before Next interval table loop');
5553: AHL_DEBUG_PUB.Debug('l_due_date:' || l_due_date );
5554: AHL_DEBUG_PUB.Debug('l_calc_due_date:' || l_calc_due_date);
5555: AHL_DEBUG_PUB.Debug('l_calc_due_date_ctr_id:' || l_calc_due_date_ctr_id);
5556: END IF;
5557:
5558: -- Fix for bug# 3461118.

Line 5555: AHL_DEBUG_PUB.Debug('l_calc_due_date_ctr_id:' || l_calc_due_date_ctr_id);

5551: IF G_DEBUG = 'Y' THEN
5552: AHL_DEBUG_PUB.Debug('Before Next interval table loop');
5553: AHL_DEBUG_PUB.Debug('l_due_date:' || l_due_date );
5554: AHL_DEBUG_PUB.Debug('l_calc_due_date:' || l_calc_due_date);
5555: AHL_DEBUG_PUB.Debug('l_calc_due_date_ctr_id:' || l_calc_due_date_ctr_id);
5556: END IF;
5557:
5558: -- Fix for bug# 3461118.
5559: <>

Line 6108: AHL_DEBUG_PUB.Debug('Calculating latest due...uom_remain' || l_counter_remain);

6104: x_next_due_date_rec.last_ctr_value;
6105: END IF;
6106:
6107: IF G_DEBUG = 'Y' THEN
6108: AHL_DEBUG_PUB.Debug('Calculating latest due...uom_remain' || l_counter_remain);
6109: END IF;
6110:
6111: IF (l_counter_remain < 0) THEN
6112: -- Due date = counter reading date.

Line 6164: AHL_DEBUG_PUB.Debug('End calculate due date : x_next_due_date_rec.due_date = ' || x_next_due_date_rec.due_date);

6160: -- JKJain, NR Analysis and Forecasting
6161: x_next_due_date_rec.FLEET_ASSO_REJECTED := 'N';
6162:
6163: IF G_DEBUG = 'Y' THEN
6164: AHL_DEBUG_PUB.Debug('End calculate due date : x_next_due_date_rec.due_date = ' || x_next_due_date_rec.due_date);
6165: END IF;
6166:
6167:
6168: EXCEPTION

Line 6182: AHL_DEBUG_PUB.Debug('Inside DUE_DATE_NULL l_fleet_reject_due_date = '|| l_fleet_reject_due_date);

6178: -- JKJain, NR Analysis and Forecasting
6179: IF (x_next_due_date_rec.due_date IS NULL AND x_next_due_date_rec.FLEET_ASSO_REJECTED = 'Y') THEN
6180: x_next_due_date_rec.due_date := l_fleet_reject_due_date;
6181: IF G_DEBUG = 'Y' THEN
6182: AHL_DEBUG_PUB.Debug('Inside DUE_DATE_NULL l_fleet_reject_due_date = '|| l_fleet_reject_due_date);
6183: END IF;
6184: END IF;
6185:
6186: WHEN NO_VALID_INTERVAL THEN

Line 6199: AHL_DEBUG_PUB.Debug('Inside NO_VALID_INTERVAL l_fleet_reject_due_date = '|| l_fleet_reject_due_date);

6195: -- JKJain, NR Analysis and Forecasting
6196: IF (x_next_due_date_rec.due_date IS NULL AND x_next_due_date_rec.FLEET_ASSO_REJECTED = 'Y') THEN
6197: x_next_due_date_rec.due_date := l_fleet_reject_due_date;
6198: IF G_DEBUG = 'Y' THEN
6199: AHL_DEBUG_PUB.Debug('Inside NO_VALID_INTERVAL l_fleet_reject_due_date = '|| l_fleet_reject_due_date);
6200: END IF;
6201: END IF;
6202:
6203: END Calculate_Due_Date;

Line 6231: AHL_DEBUG_PUB.Debug('Start get_due_at_counter_values');

6227: BEGIN
6228:
6229:
6230: IF G_DEBUG = 'Y' THEN
6231: AHL_DEBUG_PUB.Debug('Start get_due_at_counter_values');
6232: END IF;
6233:
6234: -- Initialize return value.
6235: x_return_value := TRUE;

Line 6355: AHL_DEBUG_PUB.Debug('End get_due_at_counter_values');

6351: END LOOP; /* for loop */
6352: END IF; /* count */
6353:
6354: IF G_DEBUG = 'Y' THEN
6355: AHL_DEBUG_PUB.Debug('End get_due_at_counter_values');
6356: END IF;
6357:
6358: END Get_Due_At_Counter_Values;
6359:

Line 6383: AHL_DEBUG_PUB.Debug('Start get_date from UF');

6379:
6380: BEGIN
6381:
6382: IF G_DEBUG = 'Y' THEN
6383: AHL_DEBUG_PUB.Debug('Start get_date from UF');
6384: AHL_DEBUG_PUB.Debug('counter remain input to forecast' || p_counter_remain );
6385: AHL_DEBUG_PUB.Debug('counter uom' || p_counter_uom_code);
6386: AHL_DEBUG_PUB.Debug('Start date' || p_start_date);
6387: END IF;

Line 6384: AHL_DEBUG_PUB.Debug('counter remain input to forecast' || p_counter_remain );

6380: BEGIN
6381:
6382: IF G_DEBUG = 'Y' THEN
6383: AHL_DEBUG_PUB.Debug('Start get_date from UF');
6384: AHL_DEBUG_PUB.Debug('counter remain input to forecast' || p_counter_remain );
6385: AHL_DEBUG_PUB.Debug('counter uom' || p_counter_uom_code);
6386: AHL_DEBUG_PUB.Debug('Start date' || p_start_date);
6387: END IF;
6388:

Line 6385: AHL_DEBUG_PUB.Debug('counter uom' || p_counter_uom_code);

6381:
6382: IF G_DEBUG = 'Y' THEN
6383: AHL_DEBUG_PUB.Debug('Start get_date from UF');
6384: AHL_DEBUG_PUB.Debug('counter remain input to forecast' || p_counter_remain );
6385: AHL_DEBUG_PUB.Debug('counter uom' || p_counter_uom_code);
6386: AHL_DEBUG_PUB.Debug('Start date' || p_start_date);
6387: END IF;
6388:
6389: l_counter_remain := trunc(apply_counter_ratio (l_counter_remain,

Line 6386: AHL_DEBUG_PUB.Debug('Start date' || p_start_date);

6382: IF G_DEBUG = 'Y' THEN
6383: AHL_DEBUG_PUB.Debug('Start get_date from UF');
6384: AHL_DEBUG_PUB.Debug('counter remain input to forecast' || p_counter_remain );
6385: AHL_DEBUG_PUB.Debug('counter uom' || p_counter_uom_code);
6386: AHL_DEBUG_PUB.Debug('Start date' || p_start_date);
6387: END IF;
6388:
6389: l_counter_remain := trunc(apply_counter_ratio (l_counter_remain,
6390: p_counter_uom_code,

Line 6393: AHL_DEBUG_PUB.DEBUG('counter remain after ctr_ratio' || l_counter_remain );

6389: l_counter_remain := trunc(apply_counter_ratio (l_counter_remain,
6390: p_counter_uom_code,
6391: p_counter_rules_tbl));
6392: IF G_DEBUG = 'Y' THEN
6393: AHL_DEBUG_PUB.DEBUG('counter remain after ctr_ratio' || l_counter_remain );
6394: END IF;
6395:
6396: -- Start date to begin calculation.
6397: IF (p_start_date IS NULL) THEN

Line 6520: AHL_DEBUG_PUB.Debug('Date calculated by forecast:' || x_due_date);

6516: END IF;
6517: END IF;
6518:
6519: IF G_DEBUG = 'Y' THEN
6520: AHL_DEBUG_PUB.Debug('Date calculated by forecast:' || x_due_date);
6521: AHL_DEBUG_PUB.Debug('End Get_Date_from_UF');
6522: END IF;
6523:
6524:

Line 6521: AHL_DEBUG_PUB.Debug('End Get_Date_from_UF');

6517: END IF;
6518:
6519: IF G_DEBUG = 'Y' THEN
6520: AHL_DEBUG_PUB.Debug('Date calculated by forecast:' || x_due_date);
6521: AHL_DEBUG_PUB.Debug('End Get_Date_from_UF');
6522: END IF;
6523:
6524:
6525: END Get_Date_from_UF;

Line 6595: AHL_DEBUG_PUB.Debug('Start Adjust Interval Value');

6591:
6592: BEGIN
6593:
6594: IF G_DEBUG = 'Y' THEN
6595: AHL_DEBUG_PUB.Debug('Start Adjust Interval Value');
6596: END IF;
6597:
6598: IF (p_stop_value IS NULL) THEN
6599: x_adjusted_int_value := p_interval_value;

Line 6632: AHL_DEBUG_PUB.Debug('End Adjust Interval Value');

6628: --x_adjusted_int_value := trunc(x_adjusted_int_value);
6629: x_adjusted_int_value := x_adjusted_int_value;
6630:
6631: IF G_DEBUG = 'Y' THEN
6632: AHL_DEBUG_PUB.Debug('End Adjust Interval Value');
6633: END IF;
6634:
6635:
6636: END Adjust_Interval_Value;

Line 6711: AHL_DEBUG_PUB.Debug('Start Adjust Due Date');

6707:
6708: BEGIN
6709:
6710: IF G_DEBUG = 'Y' THEN
6711: AHL_DEBUG_PUB.Debug('Start Adjust Due Date');
6712: END IF;
6713:
6714: IF (trunc(p_due_date) <= trunc(p_stop_date)) THEN
6715: x_adjusted_due_date := p_due_date;

Line 6770: AHL_DEBUG_PUB.Debug('End Adjust Interval Value');

6766: END IF;
6767: END IF;
6768:
6769: IF G_DEBUG = 'Y' THEN
6770: AHL_DEBUG_PUB.Debug('End Adjust Interval Value');
6771: END IF;
6772:
6773:
6774: END Adjust_Due_Date;

Line 6934: AHL_DEBUG_PUB.Debug('Start Get_DueDate_from_NxtInterval');

6930:
6931: BEGIN
6932:
6933: IF G_DEBUG = 'Y' THEN
6934: AHL_DEBUG_PUB.Debug('Start Get_DueDate_from_NxtInterval');
6935: AHL_DEBUG_PUB.Debug('Input Counter ID:' || p_current_ctr_rec.counter_id);
6936: AHL_DEBUG_PUB.Debug('Input Counter Name:' || p_current_ctr_rec.counter_name);
6937: AHL_DEBUG_PUB.Debug('Input Counter start value:' || p_start_int_match_at_ctr);
6938: END IF;

Line 6935: AHL_DEBUG_PUB.Debug('Input Counter ID:' || p_current_ctr_rec.counter_id);

6931: BEGIN
6932:
6933: IF G_DEBUG = 'Y' THEN
6934: AHL_DEBUG_PUB.Debug('Start Get_DueDate_from_NxtInterval');
6935: AHL_DEBUG_PUB.Debug('Input Counter ID:' || p_current_ctr_rec.counter_id);
6936: AHL_DEBUG_PUB.Debug('Input Counter Name:' || p_current_ctr_rec.counter_name);
6937: AHL_DEBUG_PUB.Debug('Input Counter start value:' || p_start_int_match_at_ctr);
6938: END IF;
6939:

Line 6936: AHL_DEBUG_PUB.Debug('Input Counter Name:' || p_current_ctr_rec.counter_name);

6932:
6933: IF G_DEBUG = 'Y' THEN
6934: AHL_DEBUG_PUB.Debug('Start Get_DueDate_from_NxtInterval');
6935: AHL_DEBUG_PUB.Debug('Input Counter ID:' || p_current_ctr_rec.counter_id);
6936: AHL_DEBUG_PUB.Debug('Input Counter Name:' || p_current_ctr_rec.counter_name);
6937: AHL_DEBUG_PUB.Debug('Input Counter start value:' || p_start_int_match_at_ctr);
6938: END IF;
6939:
6940: -- Initialize.

Line 6937: AHL_DEBUG_PUB.Debug('Input Counter start value:' || p_start_int_match_at_ctr);

6933: IF G_DEBUG = 'Y' THEN
6934: AHL_DEBUG_PUB.Debug('Start Get_DueDate_from_NxtInterval');
6935: AHL_DEBUG_PUB.Debug('Input Counter ID:' || p_current_ctr_rec.counter_id);
6936: AHL_DEBUG_PUB.Debug('Input Counter Name:' || p_current_ctr_rec.counter_name);
6937: AHL_DEBUG_PUB.Debug('Input Counter start value:' || p_start_int_match_at_ctr);
6938: END IF;
6939:
6940: -- Initialize.
6941: x_return_val := TRUE;

Line 7015: AHL_DEBUG_PUB.Debug('Found future interval with start value:' || l_next_interval_ctr_rec.start_value);

7011:
7012: END IF;
7013:
7014: IF G_DEBUG = 'Y' THEN
7015: AHL_DEBUG_PUB.Debug('Found future interval with start value:' || l_next_interval_ctr_rec.start_value);
7016: AHL_DEBUG_PUB.Debug('Last due interval ID:' || p_last_due_mr_interval_id);
7017: AHL_DEBUG_PUB.Debug('Current interval ID:' || l_next_interval_ctr_rec.mr_interval_id);
7018: AHL_DEBUG_PUB.Debug('p_last_accomplish_ctr_val:' || p_last_accomplish_ctr_val);
7019: AHL_DEBUG_PUB.Debug('p_current_ctr_rec.counter_value:' || p_current_ctr_rec.counter_value);

Line 7016: AHL_DEBUG_PUB.Debug('Last due interval ID:' || p_last_due_mr_interval_id);

7012: END IF;
7013:
7014: IF G_DEBUG = 'Y' THEN
7015: AHL_DEBUG_PUB.Debug('Found future interval with start value:' || l_next_interval_ctr_rec.start_value);
7016: AHL_DEBUG_PUB.Debug('Last due interval ID:' || p_last_due_mr_interval_id);
7017: AHL_DEBUG_PUB.Debug('Current interval ID:' || l_next_interval_ctr_rec.mr_interval_id);
7018: AHL_DEBUG_PUB.Debug('p_last_accomplish_ctr_val:' || p_last_accomplish_ctr_val);
7019: AHL_DEBUG_PUB.Debug('p_current_ctr_rec.counter_value:' || p_current_ctr_rec.counter_value);
7020: AHL_DEBUG_PUB.Debug('l_next_interval_date_rec.interval_value:' || l_next_interval_ctr_rec.interval_value);

Line 7017: AHL_DEBUG_PUB.Debug('Current interval ID:' || l_next_interval_ctr_rec.mr_interval_id);

7013:
7014: IF G_DEBUG = 'Y' THEN
7015: AHL_DEBUG_PUB.Debug('Found future interval with start value:' || l_next_interval_ctr_rec.start_value);
7016: AHL_DEBUG_PUB.Debug('Last due interval ID:' || p_last_due_mr_interval_id);
7017: AHL_DEBUG_PUB.Debug('Current interval ID:' || l_next_interval_ctr_rec.mr_interval_id);
7018: AHL_DEBUG_PUB.Debug('p_last_accomplish_ctr_val:' || p_last_accomplish_ctr_val);
7019: AHL_DEBUG_PUB.Debug('p_current_ctr_rec.counter_value:' || p_current_ctr_rec.counter_value);
7020: AHL_DEBUG_PUB.Debug('l_next_interval_date_rec.interval_value:' || l_next_interval_ctr_rec.interval_value);
7021: AHL_DEBUG_PUB.Debug('counter remain:' || l_counter_remain);

Line 7018: AHL_DEBUG_PUB.Debug('p_last_accomplish_ctr_val:' || p_last_accomplish_ctr_val);

7014: IF G_DEBUG = 'Y' THEN
7015: AHL_DEBUG_PUB.Debug('Found future interval with start value:' || l_next_interval_ctr_rec.start_value);
7016: AHL_DEBUG_PUB.Debug('Last due interval ID:' || p_last_due_mr_interval_id);
7017: AHL_DEBUG_PUB.Debug('Current interval ID:' || l_next_interval_ctr_rec.mr_interval_id);
7018: AHL_DEBUG_PUB.Debug('p_last_accomplish_ctr_val:' || p_last_accomplish_ctr_val);
7019: AHL_DEBUG_PUB.Debug('p_current_ctr_rec.counter_value:' || p_current_ctr_rec.counter_value);
7020: AHL_DEBUG_PUB.Debug('l_next_interval_date_rec.interval_value:' || l_next_interval_ctr_rec.interval_value);
7021: AHL_DEBUG_PUB.Debug('counter remain:' || l_counter_remain);
7022: END IF;

Line 7019: AHL_DEBUG_PUB.Debug('p_current_ctr_rec.counter_value:' || p_current_ctr_rec.counter_value);

7015: AHL_DEBUG_PUB.Debug('Found future interval with start value:' || l_next_interval_ctr_rec.start_value);
7016: AHL_DEBUG_PUB.Debug('Last due interval ID:' || p_last_due_mr_interval_id);
7017: AHL_DEBUG_PUB.Debug('Current interval ID:' || l_next_interval_ctr_rec.mr_interval_id);
7018: AHL_DEBUG_PUB.Debug('p_last_accomplish_ctr_val:' || p_last_accomplish_ctr_val);
7019: AHL_DEBUG_PUB.Debug('p_current_ctr_rec.counter_value:' || p_current_ctr_rec.counter_value);
7020: AHL_DEBUG_PUB.Debug('l_next_interval_date_rec.interval_value:' || l_next_interval_ctr_rec.interval_value);
7021: AHL_DEBUG_PUB.Debug('counter remain:' || l_counter_remain);
7022: END IF;
7023:

Line 7020: AHL_DEBUG_PUB.Debug('l_next_interval_date_rec.interval_value:' || l_next_interval_ctr_rec.interval_value);

7016: AHL_DEBUG_PUB.Debug('Last due interval ID:' || p_last_due_mr_interval_id);
7017: AHL_DEBUG_PUB.Debug('Current interval ID:' || l_next_interval_ctr_rec.mr_interval_id);
7018: AHL_DEBUG_PUB.Debug('p_last_accomplish_ctr_val:' || p_last_accomplish_ctr_val);
7019: AHL_DEBUG_PUB.Debug('p_current_ctr_rec.counter_value:' || p_current_ctr_rec.counter_value);
7020: AHL_DEBUG_PUB.Debug('l_next_interval_date_rec.interval_value:' || l_next_interval_ctr_rec.interval_value);
7021: AHL_DEBUG_PUB.Debug('counter remain:' || l_counter_remain);
7022: END IF;
7023:
7024: -- l_counter_remain can be negative. Fix bug# 6739599.

Line 7021: AHL_DEBUG_PUB.Debug('counter remain:' || l_counter_remain);

7017: AHL_DEBUG_PUB.Debug('Current interval ID:' || l_next_interval_ctr_rec.mr_interval_id);
7018: AHL_DEBUG_PUB.Debug('p_last_accomplish_ctr_val:' || p_last_accomplish_ctr_val);
7019: AHL_DEBUG_PUB.Debug('p_current_ctr_rec.counter_value:' || p_current_ctr_rec.counter_value);
7020: AHL_DEBUG_PUB.Debug('l_next_interval_date_rec.interval_value:' || l_next_interval_ctr_rec.interval_value);
7021: AHL_DEBUG_PUB.Debug('counter remain:' || l_counter_remain);
7022: END IF;
7023:
7024: -- l_counter_remain can be negative. Fix bug# 6739599.
7025: IF (l_counter_remain > 0) THEN

Line 7159: AHL_DEBUG_PUB.Debug('Found future interval with start date:' || to_char(l_next_interval_date_rec.start_date,'DD-MON-YYYY'));

7155:
7156: END IF;
7157:
7158: IF G_DEBUG = 'Y' THEN
7159: AHL_DEBUG_PUB.Debug('Found future interval with start date:' || to_char(l_next_interval_date_rec.start_date,'DD-MON-YYYY'));
7160: AHL_DEBUG_PUB.Debug('counter remain:' || l_counter_remain);
7161: AHL_DEBUG_PUB.Debug('l_ctr_due_at_counter_value:' || l_ctr_due_at_counter_value);
7162: AHL_DEBUG_PUB.Debug('p_last_accomplish_ctr_val:' || p_last_accomplish_ctr_val);
7163: AHL_DEBUG_PUB.Debug('earliest_due_value:' || l_next_interval_date_rec.earliest_due_value);

Line 7160: AHL_DEBUG_PUB.Debug('counter remain:' || l_counter_remain);

7156: END IF;
7157:
7158: IF G_DEBUG = 'Y' THEN
7159: AHL_DEBUG_PUB.Debug('Found future interval with start date:' || to_char(l_next_interval_date_rec.start_date,'DD-MON-YYYY'));
7160: AHL_DEBUG_PUB.Debug('counter remain:' || l_counter_remain);
7161: AHL_DEBUG_PUB.Debug('l_ctr_due_at_counter_value:' || l_ctr_due_at_counter_value);
7162: AHL_DEBUG_PUB.Debug('p_last_accomplish_ctr_val:' || p_last_accomplish_ctr_val);
7163: AHL_DEBUG_PUB.Debug('earliest_due_value:' || l_next_interval_date_rec.earliest_due_value);
7164: END IF;

Line 7161: AHL_DEBUG_PUB.Debug('l_ctr_due_at_counter_value:' || l_ctr_due_at_counter_value);

7157:
7158: IF G_DEBUG = 'Y' THEN
7159: AHL_DEBUG_PUB.Debug('Found future interval with start date:' || to_char(l_next_interval_date_rec.start_date,'DD-MON-YYYY'));
7160: AHL_DEBUG_PUB.Debug('counter remain:' || l_counter_remain);
7161: AHL_DEBUG_PUB.Debug('l_ctr_due_at_counter_value:' || l_ctr_due_at_counter_value);
7162: AHL_DEBUG_PUB.Debug('p_last_accomplish_ctr_val:' || p_last_accomplish_ctr_val);
7163: AHL_DEBUG_PUB.Debug('earliest_due_value:' || l_next_interval_date_rec.earliest_due_value);
7164: END IF;
7165:

Line 7162: AHL_DEBUG_PUB.Debug('p_last_accomplish_ctr_val:' || p_last_accomplish_ctr_val);

7158: IF G_DEBUG = 'Y' THEN
7159: AHL_DEBUG_PUB.Debug('Found future interval with start date:' || to_char(l_next_interval_date_rec.start_date,'DD-MON-YYYY'));
7160: AHL_DEBUG_PUB.Debug('counter remain:' || l_counter_remain);
7161: AHL_DEBUG_PUB.Debug('l_ctr_due_at_counter_value:' || l_ctr_due_at_counter_value);
7162: AHL_DEBUG_PUB.Debug('p_last_accomplish_ctr_val:' || p_last_accomplish_ctr_val);
7163: AHL_DEBUG_PUB.Debug('earliest_due_value:' || l_next_interval_date_rec.earliest_due_value);
7164: END IF;
7165:
7166: -- calculate due date based on forecast.

Line 7163: AHL_DEBUG_PUB.Debug('earliest_due_value:' || l_next_interval_date_rec.earliest_due_value);

7159: AHL_DEBUG_PUB.Debug('Found future interval with start date:' || to_char(l_next_interval_date_rec.start_date,'DD-MON-YYYY'));
7160: AHL_DEBUG_PUB.Debug('counter remain:' || l_counter_remain);
7161: AHL_DEBUG_PUB.Debug('l_ctr_due_at_counter_value:' || l_ctr_due_at_counter_value);
7162: AHL_DEBUG_PUB.Debug('p_last_accomplish_ctr_val:' || p_last_accomplish_ctr_val);
7163: AHL_DEBUG_PUB.Debug('earliest_due_value:' || l_next_interval_date_rec.earliest_due_value);
7164: END IF;
7165:
7166: -- calculate due date based on forecast.
7167: get_date_from_uf(l_counter_remain,

Line 7284: AHL_DEBUG_PUB.Debug('End Get_DueDate_from_NxtInterval');

7280:
7281: x_mr_interval_found := l_mr_interval_found;
7282:
7283: IF G_DEBUG = 'Y' THEN
7284: AHL_DEBUG_PUB.Debug('End Get_DueDate_from_NxtInterval');
7285: END IF;
7286:
7287: END Get_DueDate_from_NxtInterval;
7288:

Line 7304: AHL_DEBUG_PUB.Debug('Start Apply Counter Ratio');

7300:
7301: BEGIN
7302:
7303: IF G_DEBUG = 'Y' THEN
7304: AHL_DEBUG_PUB.Debug('Start Apply Counter Ratio');
7305: END IF;
7306:
7307: -- Loop through p_counter_rules_tbl.
7308: IF (p_counter_rules_tbl.COUNT > 0) THEN

Line 7317: AHL_DEBUG_PUB.Debug('End Apply Counter Ratio');

7313: END LOOP;
7314: END IF;
7315:
7316: IF G_DEBUG = 'Y' THEN
7317: AHL_DEBUG_PUB.Debug('End Apply Counter Ratio');
7318: END IF;
7319:
7320: RETURN l_counter_remain;
7321:

Line 7339: AHL_DEBUG_PUB.Debug('Start Apply Reverse Counter Ratio');

7335:
7336: BEGIN
7337:
7338: IF G_DEBUG = 'Y' THEN
7339: AHL_DEBUG_PUB.Debug('Start Apply Reverse Counter Ratio');
7340: END IF;
7341:
7342:
7343: -- Loop through p_counter_rules_tbl.

Line 7353: AHL_DEBUG_PUB.Debug('End Apply Reverse Counter Ratio');

7349: END LOOP;
7350: END IF;
7351:
7352: IF G_DEBUG = 'Y' THEN
7353: AHL_DEBUG_PUB.Debug('End Apply Reverse Counter Ratio');
7354: END IF;
7355:
7356: RETURN l_counter_remain;
7357:

Line 7481: AHL_DEBUG_PUB.Debug('Start Process Group MR');

7477:
7478: BEGIN
7479:
7480: IF G_DEBUG = 'Y' THEN
7481: AHL_DEBUG_PUB.Debug('Start Process Group MR');
7482: END IF;
7483:
7484: l_grp_match := FALSE; /* set default to be "no group" available to match against in ahl_unit_effectitivities. */
7485:

Line 7706: AHL_DEBUG_PUB.Debug('End Process GroupMR');

7702:
7703: END LOOP;
7704:
7705: IF G_DEBUG = 'Y' THEN
7706: AHL_DEBUG_PUB.Debug('End Process GroupMR');
7707: END IF;
7708:
7709: END Process_GroupMR;
7710:

Line 7858: AHL_DEBUG_PUB.Debug('Start Process PrecedingMR');

7854:
7855: BEGIN
7856:
7857: IF G_DEBUG = 'Y' THEN
7858: AHL_DEBUG_PUB.Debug('Start Process PrecedingMR');
7859: END IF;
7860:
7861: -- Process mrs which are dependent on current mr and are applicable to the same item instance.
7862: --FOR l_appl_rec IN ahl_preceding_mr_csr(p_applicable_mrs_rec.mr_header_id,

Line 7872: AHL_DEBUG_PUB.Debug('Found applicable dependent MR:CSI:' || l_appl_rec.MR_header_id || ':' || l_appl_rec.csi_item_instance_id);

7868: FOR l_appl_rec IN ahl_dependent_mr_csr(p_applicable_mrs_rec.mr_header_id,
7869: p_applicable_mrs_rec.csi_item_instance_id) LOOP
7870:
7871: IF G_DEBUG = 'Y' THEN
7872: AHL_DEBUG_PUB.Debug('Found applicable dependent MR:CSI:' || l_appl_rec.MR_header_id || ':' || l_appl_rec.csi_item_instance_id);
7873: AHL_DEBUG_PUB.Debug('For applicable preceding MR:CSI:' || p_applicable_mrs_rec.MR_header_id || ':' || p_applicable_mrs_rec.csi_item_instance_id);
7874: END IF;
7875:
7876: -- Added for SB Enh.

Line 7873: AHL_DEBUG_PUB.Debug('For applicable preceding MR:CSI:' || p_applicable_mrs_rec.MR_header_id || ':' || p_applicable_mrs_rec.csi_item_instance_id);

7869: p_applicable_mrs_rec.csi_item_instance_id) LOOP
7870:
7871: IF G_DEBUG = 'Y' THEN
7872: AHL_DEBUG_PUB.Debug('Found applicable dependent MR:CSI:' || l_appl_rec.MR_header_id || ':' || l_appl_rec.csi_item_instance_id);
7873: AHL_DEBUG_PUB.Debug('For applicable preceding MR:CSI:' || p_applicable_mrs_rec.MR_header_id || ':' || p_applicable_mrs_rec.csi_item_instance_id);
7874: END IF;
7875:
7876: -- Added for SB Enh.
7877: -- Find the preceding MR Id based on max due/accomplished date across all preceding MRs.

Line 7927: AHL_DEBUG_PUB.Debug('Calculated l_preceding_mr_hdr_id:' || l_preceding_mr_hdr_id);

7923: -- process only if l_preceding_mr_hdr_id has been set.
7924: IF (l_preceding_mr_hdr_id IS NOT NULL) THEN
7925:
7926: IF G_DEBUG = 'Y' THEN
7927: AHL_DEBUG_PUB.Debug('Calculated l_preceding_mr_hdr_id:' || l_preceding_mr_hdr_id);
7928: END IF;
7929: -- update ahl_applicable_mrs with preceding mr ID for further processing.
7930: UPDATE AHL_APPLICABLE_MRS
7931: SET PRECEDING_MR_HEADER_ID = l_preceding_mr_hdr_id

Line 7962: AHL_DEBUG_PUB.Debug('Process_PrecedingMR: Build Effectivity for MR:CSI:' || l_appl_rec.MR_header_id ||':' || l_appl_rec.csi_item_instance_id);

7958: -- added for SB Enh
7959: l_dependent_mr_rec.terminate_trigger_check := l_appl_rec.terminate_trigger_check;
7960:
7961: IF G_DEBUG = 'Y' THEN
7962: AHL_DEBUG_PUB.Debug('Process_PrecedingMR: Build Effectivity for MR:CSI:' || l_appl_rec.MR_header_id ||':' || l_appl_rec.csi_item_instance_id);
7963: END IF;
7964:
7965: Build_Effectivity (p_applicable_mrs_rec => l_dependent_mr_rec,
7966: p_current_usage_tbl => p_current_usage_tbl,

Line 7973: AHL_DEBUG_PUB.Debug('End Process PrecedingMR');

7969:
7970: END LOOP;
7971:
7972: IF G_DEBUG = 'Y' THEN
7973: AHL_DEBUG_PUB.Debug('End Process PrecedingMR');
7974: END IF;
7975:
7976:
7977: END Process_PrecedingMR;

Line 7992: AHL_DEBUG_PUB.Debug('Start Update Check Flag');

7988:
7989: BEGIN
7990:
7991: IF G_DEBUG = 'Y' THEN
7992: AHL_DEBUG_PUB.Debug('Start Update Check Flag');
7993: END IF;
7994:
7995: IF (p_dependent_mr_flag) THEN
7996: /* i.e accomplishment is based on preceding MR */

Line 8024: AHL_DEBUG_PUB.Debug('End Update Check Flag');

8020:
8021: END IF;
8022:
8023: IF G_DEBUG = 'Y' THEN
8024: AHL_DEBUG_PUB.Debug('End Update Check Flag');
8025: END IF;
8026:
8027: END Update_check_flag;
8028:

Line 8039: AHL_DEBUG_PUB.Debug('Start Create Temporary Unit Effect');

8035: IS
8036:
8037: BEGIN
8038: IF G_DEBUG = 'Y' THEN
8039: AHL_DEBUG_PUB.Debug('Start Create Temporary Unit Effect');
8040: END IF;
8041:
8042: -- insert into temporary table.
8043: insert into ahl_temp_unit_effectivities (

Line 8115: AHL_DEBUG_PUB.Debug('End Create Temp Unit Effect.');

8111: X_unit_effectivity_rec.fleet_header_id
8112: );
8113:
8114: IF G_DEBUG = 'Y' THEN
8115: AHL_DEBUG_PUB.Debug('End Create Temp Unit Effect.');
8116: END IF;
8117:
8118: END Create_temp_unit_effectivity;
8119:

Line 8133: AHL_DEBUG_PUB.Debug('Start log error messages');

8129:
8130: BEGIN
8131:
8132: IF G_DEBUG = 'Y' THEN
8133: AHL_DEBUG_PUB.Debug('Start log error messages');
8134: END IF;
8135:
8136: -- Standard call to get message count.
8137: l_msg_count := FND_MSG_PUB.Count_Msg;

Line 8148: AHL_DEBUG_PUB.Debug('Err message-'||l_msg_index_out||':' || substr(l_msg_data,1,240));

8144: p_msg_index_out => l_msg_index_out );
8145:
8146: fnd_file.put_line(FND_FILE.LOG, 'Err message-'||l_msg_index_out||':' || l_msg_data);
8147: IF G_DEBUG = 'Y' THEN
8148: AHL_DEBUG_PUB.Debug('Err message-'||l_msg_index_out||':' || substr(l_msg_data,1,240));
8149: END IF;
8150:
8151: END LOOP;
8152:

Line 8154: AHL_DEBUG_PUB.Debug('End log error messages');

8150:
8151: END LOOP;
8152:
8153: IF G_DEBUG = 'Y' THEN
8154: AHL_DEBUG_PUB.Debug('End log error messages');
8155: END IF;
8156:
8157:
8158: END log_error_messages;

Line 8194: AHL_DEBUG_PUB.debug('Start of PopulatePM_Appl_MRs');

8190:
8191: BEGIN
8192:
8193: IF G_DEBUG = 'Y' THEN
8194: AHL_DEBUG_PUB.debug('Start of PopulatePM_Appl_MRs');
8195: END IF;
8196:
8197: -- call api to fetch all applicable mrs for PM installation.
8198: AHL_FMP_PVT.get_pm_applicable_mrs(

Line 8270: AHL_DEBUG_PUB.debug('Successfully inserted for Act ID:' || l_appl_activities_tbl(j).MR_HEADER_ID);

8266: END IF;
8267: END IF;
8268:
8269: IF G_DEBUG = 'Y' THEN
8270: AHL_DEBUG_PUB.debug('Successfully inserted for Act ID:' || l_appl_activities_tbl(j).MR_HEADER_ID);
8271: END IF;
8272:
8273: END LOOP; -- next activities record.
8274: END IF; -- activity COUNT.

Line 8298: AHL_DEBUG_PUB.debug('Successfully added Program to l_UnSch_programs_tbl:index:value:' || i || ':' ||

8294: l_pgm_index := l_pgm_index + 1;
8295: l_UnSch_programs_tbl(l_pgm_index).program_mr_header_id := l_appl_programs_tbl(i).PM_program_id;
8296: l_UnSch_programs_tbl(l_pgm_index).mr_effectivity_id := l_appl_programs_tbl(i).mr_effectivity_id;
8297: IF G_DEBUG = 'Y' THEN
8298: AHL_DEBUG_PUB.debug('Successfully added Program to l_UnSch_programs_tbl:index:value:' || i || ':' ||
8299: l_UnSch_programs_tbl(l_pgm_index).program_mr_header_id);
8300: END IF;
8301:
8302: END IF;

Line 8312: AHL_DEBUG_PUB.debug('End of PopulatePM_Appl_MRs');

8308: -- set output parameter.
8309: x_unsch_programs_tbl := l_UnSch_programs_tbl;
8310:
8311: IF G_DEBUG = 'Y' THEN
8312: AHL_DEBUG_PUB.debug('End of PopulatePM_Appl_MRs');
8313: END IF;
8314:
8315: END PopulatePM_Appl_MRs;
8316:

Line 8328: AHL_DEBUG_PUB.Debug('Start of Process_PM_Unit procedure');

8324:
8325: BEGIN
8326:
8327: IF G_DEBUG = 'Y' THEN
8328: AHL_DEBUG_PUB.Debug('Start of Process_PM_Unit procedure');
8329: END IF;
8330:
8331: -- Get current usage of all the counters defined for the item instance.
8332: get_Current_Usage (p_csi_item_instance_id,

Line 8350: AHL_DEBUG_PUB.Debug('End of Process_PM_Unit procedure');

8346: -- to the newly created ones in the temporary table.
8347: Assign_Unit_effectivity_IDs;
8348:
8349: IF G_DEBUG = 'Y' THEN
8350: AHL_DEBUG_PUB.Debug('End of Process_PM_Unit procedure');
8351: END IF;
8352:
8353: END Process_PM_Unit;
8354:

Line 8408: AHL_DEBUG_PUB.Debug('Start of CALC_PROGRAM_END_DATES procedure');

8404:
8405: BEGIN
8406:
8407: IF G_DEBUG = 'Y' THEN
8408: AHL_DEBUG_PUB.Debug('Start of CALC_PROGRAM_END_DATES procedure');
8409: END IF;
8410:
8411: FOR program_rec IN ahl_cont_not_scheduled_csr LOOP
8412: -- Initialize variables.

Line 8420: AHL_DEBUG_PUB.Debug('Calculating program end date for:' || program_rec.program_mr_header_id);

8416: l_UnSch_program_tbl.DELETE;
8417: l_tbl_index := 0;
8418:
8419: IF G_DEBUG = 'Y' THEN
8420: AHL_DEBUG_PUB.Debug('Calculating program end date for:' || program_rec.program_mr_header_id);
8421: END IF;
8422:
8423: -- build temporary table containing the effectivities associated to the program.
8424: IF (p_UnSch_programs_tbl.COUNT > 0) THEN

Line 8439: AHL_DEBUG_PUB.Debug('Processing for program effectivity-id:' || l_UnSch_program_tbl(l_tbl_index).mr_effectivity_id);

8435: IF (l_UnSch_program_tbl.COUNT > 0) THEN
8436: FOR i IN l_UnSch_program_tbl.FIRST..l_UnSch_program_tbl.LAST LOOP
8437:
8438: IF G_DEBUG = 'Y' THEN
8439: AHL_DEBUG_PUB.Debug('Processing for program effectivity-id:' || l_UnSch_program_tbl(l_tbl_index).mr_effectivity_id);
8440: END IF;
8441:
8442: OPEN ahl_program_eff_csr (l_UnSch_program_tbl(i).mr_effectivity_id);
8443: FETCH ahl_program_eff_csr INTO l_effectivity_rec;

Line 8449: AHL_DEBUG_PUB.Debug('Processing for interval:' || interval_rec.mr_interval_id);

8445: -- read intervals for the effectivity.
8446: FOR interval_rec IN ahl_mr_interval_csr(l_effectivity_rec.mr_effectivity_id) LOOP
8447:
8448: IF G_DEBUG = 'Y' THEN
8449: AHL_DEBUG_PUB.Debug('Processing for interval:' || interval_rec.mr_interval_id);
8450: END IF;
8451:
8452: -- Set current usage counter value.
8453: l_current_ctr_value := 0;

Line 8567: AHL_DEBUG_PUB.Debug('Program end date:' || l_program_due_date );

8563: END LOOP; /* program table */
8564: END IF; /* count */
8565:
8566: IF G_DEBUG = 'Y' THEN
8567: AHL_DEBUG_PUB.Debug('Program end date:' || l_program_due_date );
8568: AHL_DEBUG_PUB.Debug('Program calender days:' || l_program_calender_days );
8569: END IF;
8570:
8571: -- Update record in ahl_applicable_mrs with the calculated program end date.

Line 8568: AHL_DEBUG_PUB.Debug('Program calender days:' || l_program_calender_days );

8564: END IF; /* count */
8565:
8566: IF G_DEBUG = 'Y' THEN
8567: AHL_DEBUG_PUB.Debug('Program end date:' || l_program_due_date );
8568: AHL_DEBUG_PUB.Debug('Program calender days:' || l_program_calender_days );
8569: END IF;
8570:
8571: -- Update record in ahl_applicable_mrs with the calculated program end date.
8572: IF (l_program_expired_flag) THEN

Line 8580: AHL_DEBUG_PUB.Debug('Expire SQL string:' || l_upd_SQLstmt_str);

8576: ' WHERE program_mr_header_id = :2'||
8577: ' AND PM_schedule_exists = :3';
8578:
8579: IF G_DEBUG = 'Y' THEN
8580: AHL_DEBUG_PUB.Debug('Expire SQL string:' || l_upd_SQLstmt_str);
8581: END IF;
8582:
8583: EXECUTE IMMEDIATE l_upd_SQLstmt_str USING SYSDATE - 1,
8584: program_rec.program_mr_header_id,

Line 8620: AHL_DEBUG_PUB.Debug('SQL string:' || l_upd_SQLstmt_str);

8616: END IF;
8617:
8618:
8619: IF G_DEBUG = 'Y' THEN
8620: AHL_DEBUG_PUB.Debug('SQL string:' || l_upd_SQLstmt_str);
8621: END IF;
8622:
8623: EXECUTE IMMEDIATE l_upd_SQLstmt_str USING l_program_due_date,
8624: l_program_calender_days,

Line 8633: AHL_DEBUG_PUB.Debug('End of CALC_PROGRAM_END_DATES procedure');

8629:
8630: END LOOP; /* next program rec */
8631:
8632: IF G_DEBUG = 'Y' THEN
8633: AHL_DEBUG_PUB.Debug('End of CALC_PROGRAM_END_DATES procedure');
8634: END IF;
8635:
8636: END Calc_Program_End_Dates;
8637:

Line 8739: AHL_DEBUG_PUB.Debug('Start of PROCESS_PMSCH_ACTIVITIES procedure');

8735:
8736: BEGIN
8737:
8738: IF G_DEBUG = 'Y' THEN
8739: AHL_DEBUG_PUB.Debug('Start of PROCESS_PMSCH_ACTIVITIES procedure');
8740: END IF;
8741:
8742: FOR sch_activity_rec IN ahl_sch_activity_csr LOOP
8743:

Line 8745: AHL_DEBUG_PUB.Debug('Processing for:' || sch_activity_rec.mr_header_id);

8741:
8742: FOR sch_activity_rec IN ahl_sch_activity_csr LOOP
8743:
8744: IF G_DEBUG = 'Y' THEN
8745: AHL_DEBUG_PUB.Debug('Processing for:' || sch_activity_rec.mr_header_id);
8746: AHL_DEBUG_PUB.Debug('Processing for Item Instance:' || sch_activity_rec.csi_item_instance_id);
8747: AHL_DEBUG_PUB.Debug('Processing for Repetitive flag:' || sch_activity_rec.repetitive_flag);
8748: AHL_DEBUG_PUB.Debug('Processing for SHow Repetitive code:' || sch_activity_rec.show_repetitive_code);
8749: END IF;

Line 8746: AHL_DEBUG_PUB.Debug('Processing for Item Instance:' || sch_activity_rec.csi_item_instance_id);

8742: FOR sch_activity_rec IN ahl_sch_activity_csr LOOP
8743:
8744: IF G_DEBUG = 'Y' THEN
8745: AHL_DEBUG_PUB.Debug('Processing for:' || sch_activity_rec.mr_header_id);
8746: AHL_DEBUG_PUB.Debug('Processing for Item Instance:' || sch_activity_rec.csi_item_instance_id);
8747: AHL_DEBUG_PUB.Debug('Processing for Repetitive flag:' || sch_activity_rec.repetitive_flag);
8748: AHL_DEBUG_PUB.Debug('Processing for SHow Repetitive code:' || sch_activity_rec.show_repetitive_code);
8749: END IF;
8750:

Line 8747: AHL_DEBUG_PUB.Debug('Processing for Repetitive flag:' || sch_activity_rec.repetitive_flag);

8743:
8744: IF G_DEBUG = 'Y' THEN
8745: AHL_DEBUG_PUB.Debug('Processing for:' || sch_activity_rec.mr_header_id);
8746: AHL_DEBUG_PUB.Debug('Processing for Item Instance:' || sch_activity_rec.csi_item_instance_id);
8747: AHL_DEBUG_PUB.Debug('Processing for Repetitive flag:' || sch_activity_rec.repetitive_flag);
8748: AHL_DEBUG_PUB.Debug('Processing for SHow Repetitive code:' || sch_activity_rec.show_repetitive_code);
8749: END IF;
8750:
8751: -- initialize forecast sequence for the activity.

Line 8748: AHL_DEBUG_PUB.Debug('Processing for SHow Repetitive code:' || sch_activity_rec.show_repetitive_code);

8744: IF G_DEBUG = 'Y' THEN
8745: AHL_DEBUG_PUB.Debug('Processing for:' || sch_activity_rec.mr_header_id);
8746: AHL_DEBUG_PUB.Debug('Processing for Item Instance:' || sch_activity_rec.csi_item_instance_id);
8747: AHL_DEBUG_PUB.Debug('Processing for Repetitive flag:' || sch_activity_rec.repetitive_flag);
8748: AHL_DEBUG_PUB.Debug('Processing for SHow Repetitive code:' || sch_activity_rec.show_repetitive_code);
8749: END IF;
8750:
8751: -- initialize forecast sequence for the activity.
8752: l_forecast_sequence := 0;

Line 8801: AHL_DEBUG_PUB.debug('l_last_accomplishment_date:' || l_last_accomplishment_date);

8797: FETCH ahl_due_date_csr INTO l_last_due_date, l_last_accomplishment_date;
8798: IF (ahl_due_date_csr%FOUND) THEN
8799: IF (l_last_accomplishment_date IS NOT NULL) THEN
8800: IF G_DEBUG = 'Y' THEN
8801: AHL_DEBUG_PUB.debug('l_last_accomplishment_date:' || l_last_accomplishment_date);
8802: END IF;
8803:
8804: /* Fix for FP bug# 6327241
8805: -- get due date associated to the accomplishment date.

Line 8815: AHL_DEBUG_PUB.Debug('l_last_due_date is not null:' || l_last_due_date);

8811: CLOSE ahl_due_date_csr;
8812: */
8813: IF (l_last_due_date IS NOT NULL) THEN
8814: IF G_DEBUG = 'Y' THEN
8815: AHL_DEBUG_PUB.Debug('l_last_due_date is not null:' || l_last_due_date);
8816: END IF;
8817:
8818: l_last_accomplishment_date := l_last_due_date + 1;
8819: END IF;

Line 8851: AHL_DEBUG_PUB.debug('Service Line ID: ' || l_inp_sch_rec.service_line_id);

8847: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
8848: END IF;
8849:
8850: IF G_DEBUG = 'Y' THEN
8851: AHL_DEBUG_PUB.debug('Service Line ID: ' || l_inp_sch_rec.service_line_id);
8852: AHL_DEBUG_PUB.debug('Program ID: ' || l_inp_sch_rec.program_id);
8853: AHL_DEBUG_PUB.debug('Activity ID: ' || l_inp_sch_rec.activity_id);
8854: AHL_DEBUG_PUB.debug('Start Date: ' || to_char(l_inp_sch_rec.schedule_start_date, 'DD-MON-YYYY HH24:MI:SS'));
8855: AHL_DEBUG_PUB.debug('End Date: ' || to_char(l_inp_sch_rec.schedule_end_date, 'DD-MON-YYYY HH24:MI:SS'));

Line 8852: AHL_DEBUG_PUB.debug('Program ID: ' || l_inp_sch_rec.program_id);

8848: END IF;
8849:
8850: IF G_DEBUG = 'Y' THEN
8851: AHL_DEBUG_PUB.debug('Service Line ID: ' || l_inp_sch_rec.service_line_id);
8852: AHL_DEBUG_PUB.debug('Program ID: ' || l_inp_sch_rec.program_id);
8853: AHL_DEBUG_PUB.debug('Activity ID: ' || l_inp_sch_rec.activity_id);
8854: AHL_DEBUG_PUB.debug('Start Date: ' || to_char(l_inp_sch_rec.schedule_start_date, 'DD-MON-YYYY HH24:MI:SS'));
8855: AHL_DEBUG_PUB.debug('End Date: ' || to_char(l_inp_sch_rec.schedule_end_date, 'DD-MON-YYYY HH24:MI:SS'));
8856: AHL_DEBUG_PUB.debug('Count of l_pm_schedule_tbl is: ' || l_pm_schedule_tbl.count);

Line 8853: AHL_DEBUG_PUB.debug('Activity ID: ' || l_inp_sch_rec.activity_id);

8849:
8850: IF G_DEBUG = 'Y' THEN
8851: AHL_DEBUG_PUB.debug('Service Line ID: ' || l_inp_sch_rec.service_line_id);
8852: AHL_DEBUG_PUB.debug('Program ID: ' || l_inp_sch_rec.program_id);
8853: AHL_DEBUG_PUB.debug('Activity ID: ' || l_inp_sch_rec.activity_id);
8854: AHL_DEBUG_PUB.debug('Start Date: ' || to_char(l_inp_sch_rec.schedule_start_date, 'DD-MON-YYYY HH24:MI:SS'));
8855: AHL_DEBUG_PUB.debug('End Date: ' || to_char(l_inp_sch_rec.schedule_end_date, 'DD-MON-YYYY HH24:MI:SS'));
8856: AHL_DEBUG_PUB.debug('Count of l_pm_schedule_tbl is: ' || l_pm_schedule_tbl.count);
8857:

Line 8854: AHL_DEBUG_PUB.debug('Start Date: ' || to_char(l_inp_sch_rec.schedule_start_date, 'DD-MON-YYYY HH24:MI:SS'));

8850: IF G_DEBUG = 'Y' THEN
8851: AHL_DEBUG_PUB.debug('Service Line ID: ' || l_inp_sch_rec.service_line_id);
8852: AHL_DEBUG_PUB.debug('Program ID: ' || l_inp_sch_rec.program_id);
8853: AHL_DEBUG_PUB.debug('Activity ID: ' || l_inp_sch_rec.activity_id);
8854: AHL_DEBUG_PUB.debug('Start Date: ' || to_char(l_inp_sch_rec.schedule_start_date, 'DD-MON-YYYY HH24:MI:SS'));
8855: AHL_DEBUG_PUB.debug('End Date: ' || to_char(l_inp_sch_rec.schedule_end_date, 'DD-MON-YYYY HH24:MI:SS'));
8856: AHL_DEBUG_PUB.debug('Count of l_pm_schedule_tbl is: ' || l_pm_schedule_tbl.count);
8857:
8858: IF (l_pm_schedule_tbl.count > 0 ) THEN

Line 8855: AHL_DEBUG_PUB.debug('End Date: ' || to_char(l_inp_sch_rec.schedule_end_date, 'DD-MON-YYYY HH24:MI:SS'));

8851: AHL_DEBUG_PUB.debug('Service Line ID: ' || l_inp_sch_rec.service_line_id);
8852: AHL_DEBUG_PUB.debug('Program ID: ' || l_inp_sch_rec.program_id);
8853: AHL_DEBUG_PUB.debug('Activity ID: ' || l_inp_sch_rec.activity_id);
8854: AHL_DEBUG_PUB.debug('Start Date: ' || to_char(l_inp_sch_rec.schedule_start_date, 'DD-MON-YYYY HH24:MI:SS'));
8855: AHL_DEBUG_PUB.debug('End Date: ' || to_char(l_inp_sch_rec.schedule_end_date, 'DD-MON-YYYY HH24:MI:SS'));
8856: AHL_DEBUG_PUB.debug('Count of l_pm_schedule_tbl is: ' || l_pm_schedule_tbl.count);
8857:
8858: IF (l_pm_schedule_tbl.count > 0 ) THEN
8859: for i in l_pm_schedule_tbl.first..l_pm_schedule_tbl.last loop

Line 8856: AHL_DEBUG_PUB.debug('Count of l_pm_schedule_tbl is: ' || l_pm_schedule_tbl.count);

8852: AHL_DEBUG_PUB.debug('Program ID: ' || l_inp_sch_rec.program_id);
8853: AHL_DEBUG_PUB.debug('Activity ID: ' || l_inp_sch_rec.activity_id);
8854: AHL_DEBUG_PUB.debug('Start Date: ' || to_char(l_inp_sch_rec.schedule_start_date, 'DD-MON-YYYY HH24:MI:SS'));
8855: AHL_DEBUG_PUB.debug('End Date: ' || to_char(l_inp_sch_rec.schedule_end_date, 'DD-MON-YYYY HH24:MI:SS'));
8856: AHL_DEBUG_PUB.debug('Count of l_pm_schedule_tbl is: ' || l_pm_schedule_tbl.count);
8857:
8858: IF (l_pm_schedule_tbl.count > 0 ) THEN
8859: for i in l_pm_schedule_tbl.first..l_pm_schedule_tbl.last loop
8860: AHL_DEBUG_PUB.debug('Serv Line for ' || i ||':' || l_pm_schedule_tbl(i).service_line_id);

Line 8860: AHL_DEBUG_PUB.debug('Serv Line for ' || i ||':' || l_pm_schedule_tbl(i).service_line_id);

8856: AHL_DEBUG_PUB.debug('Count of l_pm_schedule_tbl is: ' || l_pm_schedule_tbl.count);
8857:
8858: IF (l_pm_schedule_tbl.count > 0 ) THEN
8859: for i in l_pm_schedule_tbl.first..l_pm_schedule_tbl.last loop
8860: AHL_DEBUG_PUB.debug('Serv Line for ' || i ||':' || l_pm_schedule_tbl(i).service_line_id);
8861: AHL_DEBUG_PUB.debug('Sch ON for ' || i ||':' || l_pm_schedule_tbl(i).schedule_on);
8862: AHL_DEBUG_PUB.debug('Sch Start for ' || i ||':' || l_pm_schedule_tbl(i).schedule_from);
8863: AHL_DEBUG_PUB.debug('Sch End for ' || i ||':' || l_pm_schedule_tbl(i).schedule_to);
8864: end loop;

Line 8861: AHL_DEBUG_PUB.debug('Sch ON for ' || i ||':' || l_pm_schedule_tbl(i).schedule_on);

8857:
8858: IF (l_pm_schedule_tbl.count > 0 ) THEN
8859: for i in l_pm_schedule_tbl.first..l_pm_schedule_tbl.last loop
8860: AHL_DEBUG_PUB.debug('Serv Line for ' || i ||':' || l_pm_schedule_tbl(i).service_line_id);
8861: AHL_DEBUG_PUB.debug('Sch ON for ' || i ||':' || l_pm_schedule_tbl(i).schedule_on);
8862: AHL_DEBUG_PUB.debug('Sch Start for ' || i ||':' || l_pm_schedule_tbl(i).schedule_from);
8863: AHL_DEBUG_PUB.debug('Sch End for ' || i ||':' || l_pm_schedule_tbl(i).schedule_to);
8864: end loop;
8865: END IF;

Line 8862: AHL_DEBUG_PUB.debug('Sch Start for ' || i ||':' || l_pm_schedule_tbl(i).schedule_from);

8858: IF (l_pm_schedule_tbl.count > 0 ) THEN
8859: for i in l_pm_schedule_tbl.first..l_pm_schedule_tbl.last loop
8860: AHL_DEBUG_PUB.debug('Serv Line for ' || i ||':' || l_pm_schedule_tbl(i).service_line_id);
8861: AHL_DEBUG_PUB.debug('Sch ON for ' || i ||':' || l_pm_schedule_tbl(i).schedule_on);
8862: AHL_DEBUG_PUB.debug('Sch Start for ' || i ||':' || l_pm_schedule_tbl(i).schedule_from);
8863: AHL_DEBUG_PUB.debug('Sch End for ' || i ||':' || l_pm_schedule_tbl(i).schedule_to);
8864: end loop;
8865: END IF;
8866: END IF;

Line 8863: AHL_DEBUG_PUB.debug('Sch End for ' || i ||':' || l_pm_schedule_tbl(i).schedule_to);

8859: for i in l_pm_schedule_tbl.first..l_pm_schedule_tbl.last loop
8860: AHL_DEBUG_PUB.debug('Serv Line for ' || i ||':' || l_pm_schedule_tbl(i).service_line_id);
8861: AHL_DEBUG_PUB.debug('Sch ON for ' || i ||':' || l_pm_schedule_tbl(i).schedule_on);
8862: AHL_DEBUG_PUB.debug('Sch Start for ' || i ||':' || l_pm_schedule_tbl(i).schedule_from);
8863: AHL_DEBUG_PUB.debug('Sch End for ' || i ||':' || l_pm_schedule_tbl(i).schedule_to);
8864: end loop;
8865: END IF;
8866: END IF;
8867:

Line 8939: AHL_DEBUG_PUB.Debug('SQL string:' || l_del_SQLstmt_str);

8935: ' WHERE mr_header_id = :1 AND pm_schedule_exists = ''N'' '||
8936: ' AND service_line_id <> :2';
8937:
8938: IF G_DEBUG = 'Y' THEN
8939: AHL_DEBUG_PUB.Debug('SQL string:' || l_del_SQLstmt_str);
8940: END IF;
8941:
8942: EXECUTE IMMEDIATE l_del_SQLstmt_str USING sch_activity_rec.mr_header_id,
8943: sch_activity_rec.service_line_id;

Line 8949: AHL_DEBUG_PUB.debug('End of PROCESS_PMSCH_ACTIVITIES procedure');

8945: --CLOSE ahl_cont_scheduled_csr;
8946: END LOOP; /* for ahl_sch_program_csr */
8947:
8948: IF G_DEBUG = 'Y' THEN
8949: AHL_DEBUG_PUB.debug('End of PROCESS_PMSCH_ACTIVITIES procedure');
8950: END IF;
8951:
8952: END Process_PMSch_Activities;
8953: ----------------------------------------------------------

Line 9017: AHL_DEBUG_PUB.Debug('Start of process_pmunsch_activities procedure');

9013:
9014: BEGIN
9015:
9016: IF G_DEBUG = 'Y' THEN
9017: AHL_DEBUG_PUB.Debug('Start of process_pmunsch_activities procedure');
9018: END IF;
9019:
9020: FOR appl_mrs_rec IN ahl_UnSch_activity_csr LOOP
9021:

Line 9035: AHL_DEBUG_PUB.Debug('Processing for:' || appl_mrs_rec.mr_header_id);

9031: l_applicable_mrs_rec.effective_to := appl_mrs_rec.effective_to;
9032: l_applicable_mrs_rec.effective_from := appl_mrs_rec.effective_from;
9033:
9034: IF G_DEBUG = 'Y' THEN
9035: AHL_DEBUG_PUB.Debug('Processing for:' || appl_mrs_rec.mr_header_id);
9036: END IF;
9037:
9038: -- Set last accomplishment details.
9039: Get_accomplishment_details(p_applicable_mrs_rec => l_applicable_mrs_rec,

Line 9052: AHL_DEBUG_PUB.Debug('Start of process_pmunsch_activities procedure');

9048: x_no_forecast_flag => l_no_forecast_flag,
9049: x_accomplished_ue_id => l_accomplished_ue_id);
9050:
9051: IF G_DEBUG = 'Y' THEN
9052: AHL_DEBUG_PUB.Debug('Start of process_pmunsch_activities procedure');
9053: END IF;
9054:
9055: -- No need to check l_no_forecast_flag as this does not apply to PM flow.
9056: -- Check for one time MR case and process otherwise only.

Line 9073: AHL_DEBUG_PUB.Debug('Aft calculate_due_date nextdue');

9069: p_dependent_mr_flag => l_dependent_mr_flag,
9070: p_mr_accomplish_exists => l_mr_accomplish_exists,
9071: x_next_due_date_rec => l_next_due_date_rec);
9072: IF G_DEBUG = 'Y' THEN
9073: AHL_DEBUG_PUB.Debug('Aft calculate_due_date nextdue');
9074: AHL_DEBUG_PUB.Debug('due date is ' || l_next_due_date_rec.DUE_DATE);
9075: END IF;
9076:
9077: l_next_due_flag := TRUE;

Line 9074: AHL_DEBUG_PUB.Debug('due date is ' || l_next_due_date_rec.DUE_DATE);

9070: p_mr_accomplish_exists => l_mr_accomplish_exists,
9071: x_next_due_date_rec => l_next_due_date_rec);
9072: IF G_DEBUG = 'Y' THEN
9073: AHL_DEBUG_PUB.Debug('Aft calculate_due_date nextdue');
9074: AHL_DEBUG_PUB.Debug('due date is ' || l_next_due_date_rec.DUE_DATE);
9075: END IF;
9076:
9077: l_next_due_flag := TRUE;
9078: /* next due mr calculation. */

Line 9123: AHL_DEBUG_PUB.debug('contract found for due date:' ||l_due_date);

9119: -- write into temporary table if contract found.
9120: IF (l_contract_found_flag) THEN
9121:
9122: IF G_DEBUG = 'Y' THEN
9123: AHL_DEBUG_PUB.debug('contract found for due date:' ||l_due_date);
9124: AHL_DEBUG_PUB.debug('contract found with override date:' || l_contract_override_due_date);
9125: AHL_DEBUG_PUB.debug('contract found with override earliest:' || l_cont_override_earliest_due);
9126: AHL_DEBUG_PUB.debug('contract found with override latest:' || l_cont_override_latest_due);
9127: END IF;

Line 9124: AHL_DEBUG_PUB.debug('contract found with override date:' || l_contract_override_due_date);

9120: IF (l_contract_found_flag) THEN
9121:
9122: IF G_DEBUG = 'Y' THEN
9123: AHL_DEBUG_PUB.debug('contract found for due date:' ||l_due_date);
9124: AHL_DEBUG_PUB.debug('contract found with override date:' || l_contract_override_due_date);
9125: AHL_DEBUG_PUB.debug('contract found with override earliest:' || l_cont_override_earliest_due);
9126: AHL_DEBUG_PUB.debug('contract found with override latest:' || l_cont_override_latest_due);
9127: END IF;
9128:

Line 9125: AHL_DEBUG_PUB.debug('contract found with override earliest:' || l_cont_override_earliest_due);

9121:
9122: IF G_DEBUG = 'Y' THEN
9123: AHL_DEBUG_PUB.debug('contract found for due date:' ||l_due_date);
9124: AHL_DEBUG_PUB.debug('contract found with override date:' || l_contract_override_due_date);
9125: AHL_DEBUG_PUB.debug('contract found with override earliest:' || l_cont_override_earliest_due);
9126: AHL_DEBUG_PUB.debug('contract found with override latest:' || l_cont_override_latest_due);
9127: END IF;
9128:
9129: IF (l_contract_override_due_date IS NOT NULL) THEN

Line 9126: AHL_DEBUG_PUB.debug('contract found with override latest:' || l_cont_override_latest_due);

9122: IF G_DEBUG = 'Y' THEN
9123: AHL_DEBUG_PUB.debug('contract found for due date:' ||l_due_date);
9124: AHL_DEBUG_PUB.debug('contract found with override date:' || l_contract_override_due_date);
9125: AHL_DEBUG_PUB.debug('contract found with override earliest:' || l_cont_override_earliest_due);
9126: AHL_DEBUG_PUB.debug('contract found with override latest:' || l_cont_override_latest_due);
9127: END IF;
9128:
9129: IF (l_contract_override_due_date IS NOT NULL) THEN
9130:

Line 9217: AHL_DEBUG_PUB.Debug('Processing for repetivity');

9213: l_due_date := sysdate;
9214: END IF;
9215:
9216: IF G_DEBUG = 'Y' THEN
9217: AHL_DEBUG_PUB.Debug('Processing for repetivity');
9218: AHL_DEBUG_PUB.Debug('l_last_due_date: '|| l_last_due_date);
9219: AHL_DEBUG_PUB.Debug('l_due_date: '|| l_due_date);
9220: IF (l_last_due_counter_val_tbl.COUNT > 0) THEN
9221: FOR i in l_last_due_counter_val_tbl.FIRST..l_last_due_counter_val_tbl.LAST LOOP

Line 9218: AHL_DEBUG_PUB.Debug('l_last_due_date: '|| l_last_due_date);

9214: END IF;
9215:
9216: IF G_DEBUG = 'Y' THEN
9217: AHL_DEBUG_PUB.Debug('Processing for repetivity');
9218: AHL_DEBUG_PUB.Debug('l_last_due_date: '|| l_last_due_date);
9219: AHL_DEBUG_PUB.Debug('l_due_date: '|| l_due_date);
9220: IF (l_last_due_counter_val_tbl.COUNT > 0) THEN
9221: FOR i in l_last_due_counter_val_tbl.FIRST..l_last_due_counter_val_tbl.LAST LOOP
9222: AHL_DEBUG_PUB.Debug('i:'|| i|| ' value:' || l_last_due_counter_val_tbl(i).counter_value || 'ID: ' || l_last_due_counter_val_tbl(i).counter_id);

Line 9219: AHL_DEBUG_PUB.Debug('l_due_date: '|| l_due_date);

9215:
9216: IF G_DEBUG = 'Y' THEN
9217: AHL_DEBUG_PUB.Debug('Processing for repetivity');
9218: AHL_DEBUG_PUB.Debug('l_last_due_date: '|| l_last_due_date);
9219: AHL_DEBUG_PUB.Debug('l_due_date: '|| l_due_date);
9220: IF (l_last_due_counter_val_tbl.COUNT > 0) THEN
9221: FOR i in l_last_due_counter_val_tbl.FIRST..l_last_due_counter_val_tbl.LAST LOOP
9222: AHL_DEBUG_PUB.Debug('i:'|| i|| ' value:' || l_last_due_counter_val_tbl(i).counter_value || 'ID: ' || l_last_due_counter_val_tbl(i).counter_id);
9223: END LOOP;

Line 9222: AHL_DEBUG_PUB.Debug('i:'|| i|| ' value:' || l_last_due_counter_val_tbl(i).counter_value || 'ID: ' || l_last_due_counter_val_tbl(i).counter_id);

9218: AHL_DEBUG_PUB.Debug('l_last_due_date: '|| l_last_due_date);
9219: AHL_DEBUG_PUB.Debug('l_due_date: '|| l_due_date);
9220: IF (l_last_due_counter_val_tbl.COUNT > 0) THEN
9221: FOR i in l_last_due_counter_val_tbl.FIRST..l_last_due_counter_val_tbl.LAST LOOP
9222: AHL_DEBUG_PUB.Debug('i:'|| i|| ' value:' || l_last_due_counter_val_tbl(i).counter_value || 'ID: ' || l_last_due_counter_val_tbl(i).counter_id);
9223: END LOOP;
9224: END IF;
9225: END IF;
9226:

Line 9246: AHL_DEBUG_PUB.Debug('AFter get_due_at_counter_values');

9242: l_last_due_date := l_due_date;
9243: l_last_due_counter_val_tbl := l_due_at_counter_val_tbl;
9244:
9245: IF G_DEBUG = 'Y' THEN
9246: AHL_DEBUG_PUB.Debug('AFter get_due_at_counter_values');
9247: AHL_DEBUG_PUB.Debug('l_last_due_date: '|| l_last_due_date);
9248: AHL_DEBUG_PUB.Debug('l_due_date: '|| l_due_date);
9249: IF (l_due_at_counter_val_tbl.COUNT) > 0 THEN
9250: FOR i in l_due_at_counter_val_tbl.FIRST..l_due_at_counter_val_tbl.LAST LOOP

Line 9247: AHL_DEBUG_PUB.Debug('l_last_due_date: '|| l_last_due_date);

9243: l_last_due_counter_val_tbl := l_due_at_counter_val_tbl;
9244:
9245: IF G_DEBUG = 'Y' THEN
9246: AHL_DEBUG_PUB.Debug('AFter get_due_at_counter_values');
9247: AHL_DEBUG_PUB.Debug('l_last_due_date: '|| l_last_due_date);
9248: AHL_DEBUG_PUB.Debug('l_due_date: '|| l_due_date);
9249: IF (l_due_at_counter_val_tbl.COUNT) > 0 THEN
9250: FOR i in l_due_at_counter_val_tbl.FIRST..l_due_at_counter_val_tbl.LAST LOOP
9251: AHL_DEBUG_PUB.Debug('i:'|| i|| ' value:' || l_due_at_counter_val_tbl(i).counter_value || 'ID: ' || l_due_at_counter_val_tbl(i).counter_id);

Line 9248: AHL_DEBUG_PUB.Debug('l_due_date: '|| l_due_date);

9244:
9245: IF G_DEBUG = 'Y' THEN
9246: AHL_DEBUG_PUB.Debug('AFter get_due_at_counter_values');
9247: AHL_DEBUG_PUB.Debug('l_last_due_date: '|| l_last_due_date);
9248: AHL_DEBUG_PUB.Debug('l_due_date: '|| l_due_date);
9249: IF (l_due_at_counter_val_tbl.COUNT) > 0 THEN
9250: FOR i in l_due_at_counter_val_tbl.FIRST..l_due_at_counter_val_tbl.LAST LOOP
9251: AHL_DEBUG_PUB.Debug('i:'|| i|| ' value:' || l_due_at_counter_val_tbl(i).counter_value || 'ID: ' || l_due_at_counter_val_tbl(i).counter_id);
9252: end loop;

Line 9251: AHL_DEBUG_PUB.Debug('i:'|| i|| ' value:' || l_due_at_counter_val_tbl(i).counter_value || 'ID: ' || l_due_at_counter_val_tbl(i).counter_id);

9247: AHL_DEBUG_PUB.Debug('l_last_due_date: '|| l_last_due_date);
9248: AHL_DEBUG_PUB.Debug('l_due_date: '|| l_due_date);
9249: IF (l_due_at_counter_val_tbl.COUNT) > 0 THEN
9250: FOR i in l_due_at_counter_val_tbl.FIRST..l_due_at_counter_val_tbl.LAST LOOP
9251: AHL_DEBUG_PUB.Debug('i:'|| i|| ' value:' || l_due_at_counter_val_tbl(i).counter_value || 'ID: ' || l_due_at_counter_val_tbl(i).counter_id);
9252: end loop;
9253: END IF;
9254: END IF;
9255:

Line 9268: AHL_DEBUG_PUB.Debug('aft calculate_due_date - repetivity');

9264: p_last_due_mr_interval_id => l_last_due_mr_interval_id,
9265: x_next_due_date_rec => l_next_due_date_rec);
9266:
9267: IF G_DEBUG = 'Y' THEN
9268: AHL_DEBUG_PUB.Debug('aft calculate_due_date - repetivity');
9269: AHL_DEBUG_PUB.Debug('due date is ' || l_next_due_date_rec.DUE_DATE);
9270: END IF;
9271:
9272: -- Check if calculated date is same as last due date. If they are the same then, add one day.

Line 9269: AHL_DEBUG_PUB.Debug('due date is ' || l_next_due_date_rec.DUE_DATE);

9265: x_next_due_date_rec => l_next_due_date_rec);
9266:
9267: IF G_DEBUG = 'Y' THEN
9268: AHL_DEBUG_PUB.Debug('aft calculate_due_date - repetivity');
9269: AHL_DEBUG_PUB.Debug('due date is ' || l_next_due_date_rec.DUE_DATE);
9270: END IF;
9271:
9272: -- Check if calculated date is same as last due date. If they are the same then, add one day.
9273: IF (l_next_due_date_rec.due_date IS NOT NULL) THEN

Line 9280: AHL_DEBUG_PUB.Debug('Adding one day to l_next_due_date_rec.due_date:' || l_next_due_date_rec.due_date);

9276: l_next_due_date_rec.EARLIEST_DUE_DATE := NULL;
9277: l_next_due_date_rec.latest_due_date := NULL;
9278:
9279: IF G_DEBUG = 'Y' THEN
9280: AHL_DEBUG_PUB.Debug('Adding one day to l_next_due_date_rec.due_date:' || l_next_due_date_rec.due_date);
9281: END IF;
9282:
9283: --IF G_DEBUG = 'Y' THEN
9284: -- AHL_DEBUG_PUB.Debug('Exiting build effectivity as last due = due date');

Line 9284: -- AHL_DEBUG_PUB.Debug('Exiting build effectivity as last due = due date');

9280: AHL_DEBUG_PUB.Debug('Adding one day to l_next_due_date_rec.due_date:' || l_next_due_date_rec.due_date);
9281: END IF;
9282:
9283: --IF G_DEBUG = 'Y' THEN
9284: -- AHL_DEBUG_PUB.Debug('Exiting build effectivity as last due = due date');
9285: --END IF;
9286: --EXIT;
9287: END IF;
9288: END IF;

Line 9297: AHL_DEBUG_PUB.debug('End of process_pmunsch_activities procedure');

9293:
9294: END LOOP; /* ahl_UnSch_contracts_csr */
9295:
9296: IF G_DEBUG = 'Y' THEN
9297: AHL_DEBUG_PUB.debug('End of process_pmunsch_activities procedure');
9298: END IF;
9299:
9300: END Process_PMUnSch_Activities;
9301:

Line 9370: AHL_DEBUG_PUB.debug('Start of Get_PMprogram procedure for MR:Due Date is: ' ||

9366:
9367: BEGIN
9368:
9369: IF G_DEBUG = 'Y' THEN
9370: AHL_DEBUG_PUB.debug('Start of Get_PMprogram procedure for MR:Due Date is: ' ||
9371: p_mr_header_id || ':' || p_due_date);
9372: END IF;
9373:
9374: -- Initialize.

Line 9451: AHL_DEBUG_PUB.debug('Contract Not Found');

9447: CLOSE ahl_contract_exists_csr;
9448:
9449: IF G_DEBUG = 'Y' THEN
9450: IF NOT(x_contract_found_flag) THEN
9451: AHL_DEBUG_PUB.debug('Contract Not Found');
9452: END IF;
9453: AHL_DEBUG_PUB.debug('End of Get_PMprogram procedure');
9454: END IF;
9455:

Line 9453: AHL_DEBUG_PUB.debug('End of Get_PMprogram procedure');

9449: IF G_DEBUG = 'Y' THEN
9450: IF NOT(x_contract_found_flag) THEN
9451: AHL_DEBUG_PUB.debug('Contract Not Found');
9452: END IF;
9453: AHL_DEBUG_PUB.debug('End of Get_PMprogram procedure');
9454: END IF;
9455:
9456: END Get_PMprogram;
9457:

Line 9504: AHL_DEBUG_PUB.debug('Start of assign_unit_effectivity_ids procedure');

9500:
9501: BEGIN
9502:
9503: IF G_DEBUG = 'Y' THEN
9504: AHL_DEBUG_PUB.debug('Start of assign_unit_effectivity_ids procedure');
9505: END IF;
9506:
9507: -- Application usage code.
9508: l_appl_usg_code := FND_PROFILE.VALUE('AHL_APPLN_USAGE');

Line 9573: AHL_DEBUG_PUB.debug('End of assign_unit_effectivity_ids procedure');

9569:
9570: END LOOP; -- ahl_mr_header_csr.
9571:
9572: IF G_DEBUG = 'Y' THEN
9573: AHL_DEBUG_PUB.debug('End of assign_unit_effectivity_ids procedure');
9574: END IF;
9575:
9576: END Assign_Unit_Effectivity_IDs;
9577:

Line 9661: AHL_DEBUG_PUB.enable_debug;

9657: x_return_status := FND_API.G_RET_STS_SUCCESS;
9658:
9659: -- Enable Debug.
9660: IF G_DEBUG = 'Y' THEN
9661: AHL_DEBUG_PUB.enable_debug;
9662: END IF;
9663:
9664: -- Add debug mesg.
9665: IF G_DEBUG = 'Y' THEN

Line 9666: AHL_DEBUG_PUB.debug('Begin private API:' || G_PKG_NAME || '.' || 'Get_Deferred_Due_Date');

9662: END IF;
9663:
9664: -- Add debug mesg.
9665: IF G_DEBUG = 'Y' THEN
9666: AHL_DEBUG_PUB.debug('Begin private API:' || G_PKG_NAME || '.' || 'Get_Deferred_Due_Date');
9667: AHL_DEBUG_PUB.debug('Dump of input parameters:');
9668: AHL_DEBUG_PUB.debug('Unit Effectivity ID:' || p_unit_effectivity_id);
9669: AHL_DEBUG_PUB.debug('Count on p_deferral_threshold_tbl:' || p_deferral_threshold_tbl.COUNT);
9670: END IF;

Line 9667: AHL_DEBUG_PUB.debug('Dump of input parameters:');

9663:
9664: -- Add debug mesg.
9665: IF G_DEBUG = 'Y' THEN
9666: AHL_DEBUG_PUB.debug('Begin private API:' || G_PKG_NAME || '.' || 'Get_Deferred_Due_Date');
9667: AHL_DEBUG_PUB.debug('Dump of input parameters:');
9668: AHL_DEBUG_PUB.debug('Unit Effectivity ID:' || p_unit_effectivity_id);
9669: AHL_DEBUG_PUB.debug('Count on p_deferral_threshold_tbl:' || p_deferral_threshold_tbl.COUNT);
9670: END IF;
9671:

Line 9668: AHL_DEBUG_PUB.debug('Unit Effectivity ID:' || p_unit_effectivity_id);

9664: -- Add debug mesg.
9665: IF G_DEBUG = 'Y' THEN
9666: AHL_DEBUG_PUB.debug('Begin private API:' || G_PKG_NAME || '.' || 'Get_Deferred_Due_Date');
9667: AHL_DEBUG_PUB.debug('Dump of input parameters:');
9668: AHL_DEBUG_PUB.debug('Unit Effectivity ID:' || p_unit_effectivity_id);
9669: AHL_DEBUG_PUB.debug('Count on p_deferral_threshold_tbl:' || p_deferral_threshold_tbl.COUNT);
9670: END IF;
9671:
9672: -- Validate input parameters.

Line 9669: AHL_DEBUG_PUB.debug('Count on p_deferral_threshold_tbl:' || p_deferral_threshold_tbl.COUNT);

9665: IF G_DEBUG = 'Y' THEN
9666: AHL_DEBUG_PUB.debug('Begin private API:' || G_PKG_NAME || '.' || 'Get_Deferred_Due_Date');
9667: AHL_DEBUG_PUB.debug('Dump of input parameters:');
9668: AHL_DEBUG_PUB.debug('Unit Effectivity ID:' || p_unit_effectivity_id);
9669: AHL_DEBUG_PUB.debug('Count on p_deferral_threshold_tbl:' || p_deferral_threshold_tbl.COUNT);
9670: END IF;
9671:
9672: -- Validate input parameters.
9673: IF (p_unit_effectivity_id IS NULL OR p_unit_effectivity_id = FND_API.G_MISS_NUM) THEN

Line 9706: AHL_DEBUG_PUB.debug('Step 1');

9702: l_whichever_first_code := 'FIRST';
9703: END IF;
9704:
9705: IF G_DEBUG = 'Y' THEN
9706: AHL_DEBUG_PUB.debug('Step 1');
9707: AHL_DEBUG_PUB.debug('MR Header ID:' || l_mr_header_id);
9708: AHL_DEBUG_PUB.debug('CSI Item Instance ID:' || l_csi_item_instance_id);
9709: AHL_DEBUG_PUB.debug('Inventory Item ID:' || l_inventory_item_id);
9710: AHL_DEBUG_PUB.debug('INV master Org ID:' || l_inv_master_organization_id);

Line 9707: AHL_DEBUG_PUB.debug('MR Header ID:' || l_mr_header_id);

9703: END IF;
9704:
9705: IF G_DEBUG = 'Y' THEN
9706: AHL_DEBUG_PUB.debug('Step 1');
9707: AHL_DEBUG_PUB.debug('MR Header ID:' || l_mr_header_id);
9708: AHL_DEBUG_PUB.debug('CSI Item Instance ID:' || l_csi_item_instance_id);
9709: AHL_DEBUG_PUB.debug('Inventory Item ID:' || l_inventory_item_id);
9710: AHL_DEBUG_PUB.debug('INV master Org ID:' || l_inv_master_organization_id);
9711: END IF;

Line 9708: AHL_DEBUG_PUB.debug('CSI Item Instance ID:' || l_csi_item_instance_id);

9704:
9705: IF G_DEBUG = 'Y' THEN
9706: AHL_DEBUG_PUB.debug('Step 1');
9707: AHL_DEBUG_PUB.debug('MR Header ID:' || l_mr_header_id);
9708: AHL_DEBUG_PUB.debug('CSI Item Instance ID:' || l_csi_item_instance_id);
9709: AHL_DEBUG_PUB.debug('Inventory Item ID:' || l_inventory_item_id);
9710: AHL_DEBUG_PUB.debug('INV master Org ID:' || l_inv_master_organization_id);
9711: END IF;
9712:

Line 9709: AHL_DEBUG_PUB.debug('Inventory Item ID:' || l_inventory_item_id);

9705: IF G_DEBUG = 'Y' THEN
9706: AHL_DEBUG_PUB.debug('Step 1');
9707: AHL_DEBUG_PUB.debug('MR Header ID:' || l_mr_header_id);
9708: AHL_DEBUG_PUB.debug('CSI Item Instance ID:' || l_csi_item_instance_id);
9709: AHL_DEBUG_PUB.debug('Inventory Item ID:' || l_inventory_item_id);
9710: AHL_DEBUG_PUB.debug('INV master Org ID:' || l_inv_master_organization_id);
9711: END IF;
9712:
9713: -- Get Unit and Master Config IDs if available.

Line 9710: AHL_DEBUG_PUB.debug('INV master Org ID:' || l_inv_master_organization_id);

9706: AHL_DEBUG_PUB.debug('Step 1');
9707: AHL_DEBUG_PUB.debug('MR Header ID:' || l_mr_header_id);
9708: AHL_DEBUG_PUB.debug('CSI Item Instance ID:' || l_csi_item_instance_id);
9709: AHL_DEBUG_PUB.debug('Inventory Item ID:' || l_inventory_item_id);
9710: AHL_DEBUG_PUB.debug('INV master Org ID:' || l_inv_master_organization_id);
9711: END IF;
9712:
9713: -- Get Unit and Master Config IDs if available.
9714: -- Find the root item instance.

Line 9722: AHL_DEBUG_PUB.debug('Step 2');

9718: Get_Unit_Master_ConfigIDs (l_root_csi_instance_id,
9719: l_uc_header_id, G_master_config_id);
9720:
9721: IF G_DEBUG = 'Y' THEN
9722: AHL_DEBUG_PUB.debug('Step 2');
9723: END IF;
9724:
9725: -- Check for errors.
9726: IF FND_MSG_PUB.Count_msg > 0 THEN

Line 9731: AHL_DEBUG_PUB.debug('Step 3');

9727: RAISE FND_API.G_EXC_ERROR;
9728: END IF;
9729:
9730: IF G_DEBUG = 'Y' THEN
9731: AHL_DEBUG_PUB.debug('Step 3');
9732: END IF;
9733:
9734: -- Get utilization forecast for the unit/part.
9735: Get_Utilization_Forecast (l_root_csi_instance_id,

Line 9742: AHL_DEBUG_PUB.debug('Step 4');

9738: l_inv_master_organization_id,
9739: G_forecast_details_tbl);
9740:
9741: IF G_DEBUG = 'Y' THEN
9742: AHL_DEBUG_PUB.debug('Step 4');
9743: AHL_DEBUG_PUB.debug('Count on util forecast tbl:' || G_forecast_details_tbl.count);
9744: END IF;
9745:
9746: -- Get the position installed in.

Line 9743: AHL_DEBUG_PUB.debug('Count on util forecast tbl:' || G_forecast_details_tbl.count);

9739: G_forecast_details_tbl);
9740:
9741: IF G_DEBUG = 'Y' THEN
9742: AHL_DEBUG_PUB.debug('Step 4');
9743: AHL_DEBUG_PUB.debug('Count on util forecast tbl:' || G_forecast_details_tbl.count);
9744: END IF;
9745:
9746: -- Get the position installed in.
9747: OPEN csi_reln_csr(l_csi_item_instance_id);

Line 9755: AHL_DEBUG_PUB.debug('Step 5');

9751: END IF;
9752: CLOSE csi_reln_csr;
9753:
9754: IF G_DEBUG = 'Y' THEN
9755: AHL_DEBUG_PUB.debug('Step 5');
9756: END IF;
9757:
9758: -- Build counter rules ratio if node is not root node.
9759: IF (G_master_config_id IS NOT NULL AND l_position_reference IS NOT NULL) THEN

Line 9767: AHL_DEBUG_PUB.debug('Step 6');

9763: l_counter_rules_tbl);
9764: END IF;
9765:
9766: IF G_DEBUG = 'Y' THEN
9767: AHL_DEBUG_PUB.debug('Step 6');
9768: END IF;
9769:
9770: -- Calculate counter_remain and call get_date_from_uf.
9771: IF (p_deferral_threshold_tbl.COUNT > 0) THEN

Line 9779: AHL_DEBUG_PUB.debug('Step 7');

9775: OPEN cs_ctr_counter_csr(p_deferral_threshold_tbl(i).counter_id);
9776: FETCH cs_ctr_counter_csr INTO l_counter_value;
9777: IF (cs_ctr_counter_csr%NOTFOUND) THEN
9778: IF G_DEBUG = 'Y' THEN
9779: AHL_DEBUG_PUB.debug('Step 7');
9780: END IF;
9781: l_counter_value := 0;
9782: END IF;
9783:

Line 9787: AHL_DEBUG_PUB.debug('l_counter_value:' || l_counter_value);

9783:
9784: CLOSE cs_ctr_counter_csr;
9785:
9786: IF G_DEBUG = 'Y' THEN
9787: AHL_DEBUG_PUB.debug('l_counter_value:' || l_counter_value);
9788: END IF;
9789:
9790: -- Get due date for counter remain.
9791: l_counter_remain := p_deferral_threshold_tbl(i).counter_value - l_counter_value;

Line 9794: AHL_DEBUG_PUB.debug('l_counter_remain:' || l_counter_remain);

9790: -- Get due date for counter remain.
9791: l_counter_remain := p_deferral_threshold_tbl(i).counter_value - l_counter_value;
9792:
9793: IF G_DEBUG = 'Y' THEN
9794: AHL_DEBUG_PUB.debug('l_counter_remain:' || l_counter_remain);
9795: END IF;
9796:
9797: -- get date from forecast.
9798: get_date_from_uf(l_counter_remain,

Line 9839: AHL_DEBUG_PUB.disable_debug;

9835: p_data => x_msg_data,
9836: p_encoded => fnd_api.g_false);
9837:
9838: -- Disable debug
9839: AHL_DEBUG_PUB.disable_debug;
9840:
9841: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
9842: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
9843: FND_MSG_PUB.count_and_get( p_count => x_msg_count,

Line 9848: AHL_DEBUG_PUB.disable_debug;

9844: p_data => x_msg_data,
9845: p_encoded => fnd_api.g_false);
9846:
9847: -- Disable debug
9848: AHL_DEBUG_PUB.disable_debug;
9849:
9850: WHEN OTHERS THEN
9851:
9852: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

Line 9864: AHL_DEBUG_PUB.disable_debug;

9860: p_encoded => fnd_api.g_false);
9861:
9862:
9863: -- Disable debug
9864: AHL_DEBUG_PUB.disable_debug;
9865:
9866: END Get_Deferred_Due_Date;
9867: ------------------------------------------------------------------
9868:

Line 9934: AHL_DEBUG_PUB.debug('Start of get_ctr_reading_for_date');

9930:
9931: BEGIN
9932:
9933: IF G_DEBUG = 'Y' THEN
9934: AHL_DEBUG_PUB.debug('Start of get_ctr_reading_for_date');
9935: END IF;
9936:
9937: OPEN cs_ctr_reading_csr(p_csi_item_instance_id,
9938: p_counter_id,

Line 9949: AHL_DEBUG_PUB.debug('End of get_ctr_reading_for_date');

9945:
9946: x_net_reading := l_net_reading;
9947:
9948: IF G_DEBUG = 'Y' THEN
9949: AHL_DEBUG_PUB.debug('End of get_ctr_reading_for_date');
9950: END IF;
9951:
9952: END get_ctr_reading_for_date;
9953: -----------------------------------------------------------------------

Line 10022: AHL_DEBUG_PUB.debug('Start of get_ctr_date_for_reading');

10018: BEGIN
10019:
10020:
10021: IF G_DEBUG = 'Y' THEN
10022: AHL_DEBUG_PUB.debug('Start of get_ctr_date_for_reading');
10023: END IF;
10024:
10025: OPEN cs_ctr_reading_csr (p_csi_item_instance_id,
10026: p_counter_id,

Line 10039: AHL_DEBUG_PUB.debug('End of get_ctr_date_for_reading');

10035: x_ctr_record_date := l_ctr_record_date;
10036: x_return_val := l_return_val;
10037:
10038: IF G_DEBUG = 'Y' THEN
10039: AHL_DEBUG_PUB.debug('End of get_ctr_date_for_reading');
10040: END IF;
10041:
10042: END get_ctr_date_for_reading;
10043:

Line 10178: AHL_DEBUG_PUB.debug('Start of process_Deferred_ue');

10174:
10175: BEGIN
10176:
10177: IF G_DEBUG = 'Y' THEN
10178: AHL_DEBUG_PUB.debug('Start of process_Deferred_ue');
10179: END IF;
10180:
10181: -- get all open deferred unit effectivities.
10182: FOR unit_effectivity_rec IN ahl_deferred_ue_csr(p_csi_item_instance_id, G_application_usg_code) LOOP

Line 10185: AHL_DEBUG_PUB.debug('Processing ..ID:' || unit_effectivity_rec.unit_effectivity_id);

10181: -- get all open deferred unit effectivities.
10182: FOR unit_effectivity_rec IN ahl_deferred_ue_csr(p_csi_item_instance_id, G_application_usg_code) LOOP
10183:
10184: IF G_DEBUG = 'Y' THEN
10185: AHL_DEBUG_PUB.debug('Processing ..ID:' || unit_effectivity_rec.unit_effectivity_id);
10186: AHL_DEBUG_PUB.debug('Processing ..unit_deferral_type:' || unit_effectivity_rec.unit_deferral_type);
10187: END IF;
10188:
10189: -- Initialize.

Line 10186: AHL_DEBUG_PUB.debug('Processing ..unit_deferral_type:' || unit_effectivity_rec.unit_deferral_type);

10182: FOR unit_effectivity_rec IN ahl_deferred_ue_csr(p_csi_item_instance_id, G_application_usg_code) LOOP
10183:
10184: IF G_DEBUG = 'Y' THEN
10185: AHL_DEBUG_PUB.debug('Processing ..ID:' || unit_effectivity_rec.unit_effectivity_id);
10186: AHL_DEBUG_PUB.debug('Processing ..unit_deferral_type:' || unit_effectivity_rec.unit_deferral_type);
10187: END IF;
10188:
10189: -- Initialize.
10190: l_calc_due_date := null;

Line 10244: AHL_DEBUG_PUB.debug('In threshold rec with current usg > 0: ctr val:eff on:ctr type:' || l_current_ctr_value ||':' || l_deferral_effective_on || ':' || threshold_rec.ctr_value_type_code);

10240: END IF;
10241: END LOOP;
10242:
10243: IF G_DEBUG = 'Y' THEN
10244: AHL_DEBUG_PUB.debug('In threshold rec with current usg > 0: ctr val:eff on:ctr type:' || l_current_ctr_value ||':' || l_deferral_effective_on || ':' || threshold_rec.ctr_value_type_code);
10245:
10246: END IF;
10247:
10248: -- Calculate counter remain.

Line 10329: AHL_DEBUG_PUB.debug('l_calc_due_date:' || l_calc_due_date);

10325: END IF; -- current_usage_tbl.
10326: END LOOP; -- threshold rec.
10327:
10328: IF G_DEBUG = 'Y' THEN
10329: AHL_DEBUG_PUB.debug('l_calc_due_date:' || l_calc_due_date);
10330: AHL_DEBUG_PUB.debug('set_due_date:' || l_set_due_date);
10331: AHL_DEBUG_PUB.debug('due_ctr_val:' || l_calc_due_counter_value);
10332: AHL_DEBUG_PUB.debug('counterID:' || l_calc_counter_id);
10333: END IF;

Line 10330: AHL_DEBUG_PUB.debug('set_due_date:' || l_set_due_date);

10326: END LOOP; -- threshold rec.
10327:
10328: IF G_DEBUG = 'Y' THEN
10329: AHL_DEBUG_PUB.debug('l_calc_due_date:' || l_calc_due_date);
10330: AHL_DEBUG_PUB.debug('set_due_date:' || l_set_due_date);
10331: AHL_DEBUG_PUB.debug('due_ctr_val:' || l_calc_due_counter_value);
10332: AHL_DEBUG_PUB.debug('counterID:' || l_calc_counter_id);
10333: END IF;
10334:

Line 10331: AHL_DEBUG_PUB.debug('due_ctr_val:' || l_calc_due_counter_value);

10327:
10328: IF G_DEBUG = 'Y' THEN
10329: AHL_DEBUG_PUB.debug('l_calc_due_date:' || l_calc_due_date);
10330: AHL_DEBUG_PUB.debug('set_due_date:' || l_set_due_date);
10331: AHL_DEBUG_PUB.debug('due_ctr_val:' || l_calc_due_counter_value);
10332: AHL_DEBUG_PUB.debug('counterID:' || l_calc_counter_id);
10333: END IF;
10334:
10335: -- Check calculated due date against set_due_date.

Line 10332: AHL_DEBUG_PUB.debug('counterID:' || l_calc_counter_id);

10328: IF G_DEBUG = 'Y' THEN
10329: AHL_DEBUG_PUB.debug('l_calc_due_date:' || l_calc_due_date);
10330: AHL_DEBUG_PUB.debug('set_due_date:' || l_set_due_date);
10331: AHL_DEBUG_PUB.debug('due_ctr_val:' || l_calc_due_counter_value);
10332: AHL_DEBUG_PUB.debug('counterID:' || l_calc_counter_id);
10333: END IF;
10334:
10335: -- Check calculated due date against set_due_date.
10336: IF (l_calc_due_date IS NOT NULL AND l_set_due_date IS NOT NULL) THEN

Line 10367: AHL_DEBUG_PUB.debug('Calculating due date for MEL/CDL');

10363: -- fix bug# 5217126. This variable is inserted into the temp table.
10364: l_deferral_effective_on := unit_effectivity_rec.deferral_effective_on;
10365:
10366: IF G_DEBUG = 'Y' THEN
10367: AHL_DEBUG_PUB.debug('Calculating due date for MEL/CDL');
10368: AHL_DEBUG_PUB.debug('Deferral Eff on:' || unit_effectivity_rec.DEFERRAL_EFFECTIVE_ON);
10369: AHL_DEBUG_PUB.debug('Processing ..object type:' || unit_effectivity_rec.object_type);
10370: END IF;
10371:

Line 10368: AHL_DEBUG_PUB.debug('Deferral Eff on:' || unit_effectivity_rec.DEFERRAL_EFFECTIVE_ON);

10364: l_deferral_effective_on := unit_effectivity_rec.deferral_effective_on;
10365:
10366: IF G_DEBUG = 'Y' THEN
10367: AHL_DEBUG_PUB.debug('Calculating due date for MEL/CDL');
10368: AHL_DEBUG_PUB.debug('Deferral Eff on:' || unit_effectivity_rec.DEFERRAL_EFFECTIVE_ON);
10369: AHL_DEBUG_PUB.debug('Processing ..object type:' || unit_effectivity_rec.object_type);
10370: END IF;
10371:
10372: -- validate repair category.

Line 10369: AHL_DEBUG_PUB.debug('Processing ..object type:' || unit_effectivity_rec.object_type);

10365:
10366: IF G_DEBUG = 'Y' THEN
10367: AHL_DEBUG_PUB.debug('Calculating due date for MEL/CDL');
10368: AHL_DEBUG_PUB.debug('Deferral Eff on:' || unit_effectivity_rec.DEFERRAL_EFFECTIVE_ON);
10369: AHL_DEBUG_PUB.debug('Processing ..object type:' || unit_effectivity_rec.object_type);
10370: END IF;
10371:
10372: -- validate repair category.
10373: -- Added expected_resolution_date to fix bug# 5217126.

Line 10398: AHL_DEBUG_PUB.debug('MEL/CDL:Calculated due date is:' || l_calc_due_date);

10394: END IF; -- get_repair_category_csr%NOTFOUND
10395: CLOSE get_repair_category_csr;
10396:
10397: IF G_DEBUG = 'Y' THEN
10398: AHL_DEBUG_PUB.debug('MEL/CDL:Calculated due date is:' || l_calc_due_date);
10399: AHL_DEBUG_PUB.debug('MEL/CDL:DEFERRAL_EFFECTIVE_ON:' || l_deferral_effective_on);
10400: END IF;
10401:
10402: END IF; -- unit_effectivity_rec.unit_deferral_type = 'MEL'

Line 10399: AHL_DEBUG_PUB.debug('MEL/CDL:DEFERRAL_EFFECTIVE_ON:' || l_deferral_effective_on);

10395: CLOSE get_repair_category_csr;
10396:
10397: IF G_DEBUG = 'Y' THEN
10398: AHL_DEBUG_PUB.debug('MEL/CDL:Calculated due date is:' || l_calc_due_date);
10399: AHL_DEBUG_PUB.debug('MEL/CDL:DEFERRAL_EFFECTIVE_ON:' || l_deferral_effective_on);
10400: END IF;
10401:
10402: END IF; -- unit_effectivity_rec.unit_deferral_type = 'MEL'
10403:

Line 10413: AHL_DEBUG_PUB.Debug('Visit assigned:End Date:' || l_visit_end_date);

10409:
10410: /*
10411: IF (l_visit_end_date IS NOT NULL AND l_calc_due_date IS NOT NULL) THEN
10412: IF G_DEBUG = 'Y' THEN
10413: AHL_DEBUG_PUB.Debug('Visit assigned:End Date:' || l_visit_end_date);
10414: END IF;
10415:
10416: IF (trunc(l_visit_end_date) < trunc(l_calc_due_date)) THEN
10417: l_calc_tolerance_flag := 'Y';

Line 10425: AHL_DEBUG_PUB.Debug('Visit assigned: Start Date:' || l_visit_start_date);

10421: */
10422:
10423: IF (l_visit_start_date IS NOT NULL AND l_calc_due_date IS NOT NULL) THEN
10424: IF G_DEBUG = 'Y' THEN
10425: AHL_DEBUG_PUB.Debug('Visit assigned: Start Date:' || l_visit_start_date);
10426: END IF;
10427: IF (trunc(l_visit_start_date) > trunc(l_calc_due_date)) THEN
10428: l_calc_tolerance_flag := 'Y';
10429: l_calc_message_code := 'TOLERANCE-EXCEEDED';

Line 10486: AHL_DEBUG_PUB.Debug('Group Match flag:l_visit_status:' || l_grp_match || ':' || l_visit_status);

10482: END IF; -- l_visit_status
10483:
10484:
10485: IF G_DEBUG = 'Y' THEN
10486: AHL_DEBUG_PUB.Debug('Group Match flag:l_visit_status:' || l_grp_match || ':' || l_visit_status);
10487: END IF;
10488:
10489: -- insert into deferral temp table.
10490: insert into ahl_temp_unit_SR_deferrals (

Line 10580: AHL_DEBUG_PUB.debug('End of process_Deferred_ue');

10576:
10577: END LOOP; -- unit effectivity rec.
10578:
10579: IF G_DEBUG = 'Y' THEN
10580: AHL_DEBUG_PUB.debug('End of process_Deferred_ue');
10581: END IF;
10582:
10583: END Process_Deferred_UE;
10584: -----------------------------------------------

Line 10659: AHL_DEBUG_PUB.debug('Start of Process_SR_UE');

10655:
10656: BEGIN
10657:
10658: IF G_DEBUG = 'Y' THEN
10659: AHL_DEBUG_PUB.debug('Start of Process_SR_UE');
10660: END IF;
10661:
10662: -- Get all UE's with object-type = SR.
10663: FOR ahl_ue_sr_rec IN ahl_ue_sr_csr(p_csi_item_instance_id, G_application_usg_code) LOOP

Line 10685: AHL_DEBUG_PUB.Debug('Visit assigned:End Date:' || l_visit_end_date);

10681: l_visit_assign_code);
10682:
10683: IF (l_visit_end_date IS NOT NULL AND ahl_ue_sr_rec.due_date IS NOT NULL) THEN
10684: IF G_DEBUG = 'Y' THEN
10685: AHL_DEBUG_PUB.Debug('Visit assigned:End Date:' || l_visit_end_date);
10686: END IF;
10687:
10688: IF (trunc(l_visit_end_date) < trunc(ahl_ue_sr_rec.due_date )) THEN
10689: l_calc_tolerance_flag := 'Y';

Line 10696: AHL_DEBUG_PUB.Debug('Visit assigned:Start Date:' || l_visit_start_date);

10692: END IF;
10693:
10694: IF (l_visit_start_date IS NOT NULL AND ahl_ue_sr_rec.due_date IS NOT NULL) THEN
10695: IF G_DEBUG = 'Y' THEN
10696: AHL_DEBUG_PUB.Debug('Visit assigned:Start Date:' || l_visit_start_date);
10697: END IF;
10698:
10699: IF (trunc(l_visit_start_date) > trunc(ahl_ue_sr_rec.due_date )) THEN
10700: l_calc_tolerance_flag := 'Y';

Line 10826: AHL_DEBUG_PUB.debug('End of Process_SR_UE');

10822:
10823: END LOOP;
10824:
10825: IF G_DEBUG = 'Y' THEN
10826: AHL_DEBUG_PUB.debug('End of Process_SR_UE');
10827: END IF;
10828:
10829: END Process_SR_UE;
10830:

Line 10901: AHL_DEBUG_PUB.debug('Start of Match_Group_MR');

10897:
10898: BEGIN
10899:
10900: IF G_DEBUG = 'Y' THEN
10901: AHL_DEBUG_PUB.debug('Start of Match_Group_MR');
10902: END IF;
10903:
10904: -- Match the ue relations tree with the group applicablilty tree.
10905: i := 1;

Line 10994: AHL_DEBUG_PUB.debug('End of Match_Group_MR');

10990:
10991: END IF;
10992:
10993: IF G_DEBUG = 'Y' THEN
10994: AHL_DEBUG_PUB.debug('End of Match_Group_MR');
10995: END IF;
10996:
10997: END Match_Group_MR;
10998:

Line 11149: AHL_DEBUG_PUB.debug('Start of Process_Unplanned_UE');

11145: l_lc_mr_tbl loop_chain_MR_tbl_type;
11146: BEGIN
11147:
11148: IF G_DEBUG = 'Y' THEN
11149: AHL_DEBUG_PUB.debug('Start of Process_Unplanned_UE');
11150: END IF;
11151:
11152: -- Loop through all Unplanned MRs.
11153: FOR ahl_unplanned_ue_rec IN ahl_unplanned_ue_csr(p_csi_item_instance_id,G_application_usg_code) LOOP

Line 11184: AHL_DEBUG_PUB.debug('Group Match Flag for UE:' || ahl_unplanned_ue_rec.unit_effectivity_id || 'is:' ||

11180: END IF; -- ahl_applicable_mr_csr found chk.
11181: CLOSE ahl_applicable_mr_csr;
11182:
11183: IF G_DEBUG = 'Y' THEN
11184: AHL_DEBUG_PUB.debug('Group Match Flag for UE:' || ahl_unplanned_ue_rec.unit_effectivity_id || 'is:' ||
11185: l_grp_match_flag);
11186: END IF;
11187:
11188: -- If exception, then update the UE status to exception.

Line 11206: AHL_DEBUG_PUB.Debug('Updating Unplanned UE..' || l_ue_rec.unit_effectivity_id || ' to an exception');

11202: ELSE
11203: -- set UE attributes.
11204: IF (ahl_unplanned_ue_rec.status_code IS NULL) AND (l_exception_flag = TRUE) THEN
11205: IF G_DEBUG = 'Y' THEN
11206: AHL_DEBUG_PUB.Debug('Updating Unplanned UE..' || l_ue_rec.unit_effectivity_id || ' to an exception');
11207: END IF;
11208: -- update unit effectivity.
11209: l_message_code := 'VISIT-ASSIGN';
11210: l_status_code := 'EXCEPTION';

Line 11213: AHL_DEBUG_PUB.Debug('Updating Unplanned UE..' || l_ue_rec.unit_effectivity_id || ' from an exception');

11209: l_message_code := 'VISIT-ASSIGN';
11210: l_status_code := 'EXCEPTION';
11211: ELSE
11212: IF G_DEBUG = 'Y' THEN
11213: AHL_DEBUG_PUB.Debug('Updating Unplanned UE..' || l_ue_rec.unit_effectivity_id || ' from an exception');
11214: END IF;
11215: -- update unit effectivity.
11216: l_message_code := NULL;
11217: l_status_code := NULL;

Line 11397: AHL_DEBUG_PUB.debug('End of Process_Unplanned_UE');

11393: x_loop_chain_MR_tbl => l_lc_mr_tbl);
11394: END LOOP;
11395:
11396: IF (G_DEBUG = 'Y') THEN
11397: AHL_DEBUG_PUB.debug('End of Process_Unplanned_UE');
11398: END IF;
11399:
11400: END Process_Unplanned_UE;
11401:

Line 11437: AHL_DEBUG_PUB.Debug('Start API Get_Forecasted_Counter_Values');

11433:
11434: BEGIN
11435:
11436: IF G_DEBUG = 'Y' THEN
11437: AHL_DEBUG_PUB.Debug('Start API Get_Forecasted_Counter_Values');
11438: END IF;
11439:
11440: -- Initialize message list if p_init_msg_list is set to TRUE
11441: IF FND_API.To_Boolean(p_init_msg_list) THEN

Line 11450: AHL_DEBUG_PUB.enable_debug;

11446: x_return_status := FND_API.G_RET_STS_SUCCESS;
11447:
11448: -- Enable Debug.
11449: IF G_DEBUG = 'Y' THEN
11450: AHL_DEBUG_PUB.enable_debug;
11451: END IF;
11452:
11453: -- Add debug mesg.
11454: IF G_DEBUG = 'Y' THEN

Line 11455: AHL_DEBUG_PUB.debug('Begin private API:' || G_PKG_NAME || '.' || 'Get_Forcasted_Counter_Values');

11451: END IF;
11452:
11453: -- Add debug mesg.
11454: IF G_DEBUG = 'Y' THEN
11455: AHL_DEBUG_PUB.debug('Begin private API:' || G_PKG_NAME || '.' || 'Get_Forcasted_Counter_Values');
11456:
11457: -- Dump input parameters.
11458: AHL_DEBUG_PUB.debug(' Csi Item instance ID:' || p_csi_item_instance_id);
11459: AHL_DEBUG_PUB.debug(' Forecasted Date:' || p_forecasted_date);

Line 11458: AHL_DEBUG_PUB.debug(' Csi Item instance ID:' || p_csi_item_instance_id);

11454: IF G_DEBUG = 'Y' THEN
11455: AHL_DEBUG_PUB.debug('Begin private API:' || G_PKG_NAME || '.' || 'Get_Forcasted_Counter_Values');
11456:
11457: -- Dump input parameters.
11458: AHL_DEBUG_PUB.debug(' Csi Item instance ID:' || p_csi_item_instance_id);
11459: AHL_DEBUG_PUB.debug(' Forecasted Date:' || p_forecasted_date);
11460:
11461: END IF;
11462:

Line 11459: AHL_DEBUG_PUB.debug(' Forecasted Date:' || p_forecasted_date);

11455: AHL_DEBUG_PUB.debug('Begin private API:' || G_PKG_NAME || '.' || 'Get_Forcasted_Counter_Values');
11456:
11457: -- Dump input parameters.
11458: AHL_DEBUG_PUB.debug(' Csi Item instance ID:' || p_csi_item_instance_id);
11459: AHL_DEBUG_PUB.debug(' Forecasted Date:' || p_forecasted_date);
11460:
11461: END IF;
11462:
11463: -- validate item instance.

Line 11501: AHL_DEBUG_PUB.debug(' Count on Config Node Tbl:' || G_config_node_tbl.COUNT);

11497: Build_Config_Tree(l_csi_item_instance_id, G_master_config_id, G_CONFIG_NODE_TBL);
11498:
11499: -- Add debug mesg.
11500: IF G_DEBUG = 'Y' THEN
11501: AHL_DEBUG_PUB.debug(' Count on Config Node Tbl:' || G_config_node_tbl.COUNT);
11502: AHL_DEBUG_PUB.debug(' Root Node:' || l_csi_item_instance_id );
11503: AHL_DEBUG_PUB.debug(' Unit Config ID:' || l_uc_header_id);
11504: AHL_DEBUG_PUB.debug(' Master Config ID:' || G_master_config_id);
11505: END IF;

Line 11502: AHL_DEBUG_PUB.debug(' Root Node:' || l_csi_item_instance_id );

11498:
11499: -- Add debug mesg.
11500: IF G_DEBUG = 'Y' THEN
11501: AHL_DEBUG_PUB.debug(' Count on Config Node Tbl:' || G_config_node_tbl.COUNT);
11502: AHL_DEBUG_PUB.debug(' Root Node:' || l_csi_item_instance_id );
11503: AHL_DEBUG_PUB.debug(' Unit Config ID:' || l_uc_header_id);
11504: AHL_DEBUG_PUB.debug(' Master Config ID:' || G_master_config_id);
11505: END IF;
11506:

Line 11503: AHL_DEBUG_PUB.debug(' Unit Config ID:' || l_uc_header_id);

11499: -- Add debug mesg.
11500: IF G_DEBUG = 'Y' THEN
11501: AHL_DEBUG_PUB.debug(' Count on Config Node Tbl:' || G_config_node_tbl.COUNT);
11502: AHL_DEBUG_PUB.debug(' Root Node:' || l_csi_item_instance_id );
11503: AHL_DEBUG_PUB.debug(' Unit Config ID:' || l_uc_header_id);
11504: AHL_DEBUG_PUB.debug(' Master Config ID:' || G_master_config_id);
11505: END IF;
11506:
11507: -- Read applicable utilization forecast for the configuration.

Line 11504: AHL_DEBUG_PUB.debug(' Master Config ID:' || G_master_config_id);

11500: IF G_DEBUG = 'Y' THEN
11501: AHL_DEBUG_PUB.debug(' Count on Config Node Tbl:' || G_config_node_tbl.COUNT);
11502: AHL_DEBUG_PUB.debug(' Root Node:' || l_csi_item_instance_id );
11503: AHL_DEBUG_PUB.debug(' Unit Config ID:' || l_uc_header_id);
11504: AHL_DEBUG_PUB.debug(' Master Config ID:' || G_master_config_id);
11505: END IF;
11506:
11507: -- Read applicable utilization forecast for the configuration.
11508: Get_Utilization_Forecast (l_csi_item_instance_id,

Line 11543: AHL_DEBUG_PUB.Debug('AFter get_due_at_counter_values');

11539: x_due_at_counter_val_tbl => l_due_at_counter_val_tbl,
11540: x_return_value => l_return_value);
11541:
11542: IF G_DEBUG = 'Y' THEN
11543: AHL_DEBUG_PUB.Debug('AFter get_due_at_counter_values');
11544: AHL_DEBUG_PUB.Debug('l_last_due_date: '|| sysdate);
11545: AHL_DEBUG_PUB.Debug('l_due_date: '|| p_forecasted_date);
11546: IF (l_due_at_counter_val_tbl.COUNT) > 0 THEN
11547: for i in l_due_at_counter_val_tbl.FIRST..l_due_at_counter_val_tbl.LAST LOOP

Line 11544: AHL_DEBUG_PUB.Debug('l_last_due_date: '|| sysdate);

11540: x_return_value => l_return_value);
11541:
11542: IF G_DEBUG = 'Y' THEN
11543: AHL_DEBUG_PUB.Debug('AFter get_due_at_counter_values');
11544: AHL_DEBUG_PUB.Debug('l_last_due_date: '|| sysdate);
11545: AHL_DEBUG_PUB.Debug('l_due_date: '|| p_forecasted_date);
11546: IF (l_due_at_counter_val_tbl.COUNT) > 0 THEN
11547: for i in l_due_at_counter_val_tbl.FIRST..l_due_at_counter_val_tbl.LAST LOOP
11548: AHL_DEBUG_PUB.Debug('i:'|| i|| ' value:' || l_due_at_counter_val_tbl(i).counter_value || 'ID: ' || l_due_at_counter_val_tbl(i).counter_id);

Line 11545: AHL_DEBUG_PUB.Debug('l_due_date: '|| p_forecasted_date);

11541:
11542: IF G_DEBUG = 'Y' THEN
11543: AHL_DEBUG_PUB.Debug('AFter get_due_at_counter_values');
11544: AHL_DEBUG_PUB.Debug('l_last_due_date: '|| sysdate);
11545: AHL_DEBUG_PUB.Debug('l_due_date: '|| p_forecasted_date);
11546: IF (l_due_at_counter_val_tbl.COUNT) > 0 THEN
11547: for i in l_due_at_counter_val_tbl.FIRST..l_due_at_counter_val_tbl.LAST LOOP
11548: AHL_DEBUG_PUB.Debug('i:'|| i|| ' value:' || l_due_at_counter_val_tbl(i).counter_value || 'ID: ' || l_due_at_counter_val_tbl(i).counter_id);
11549: end loop;

Line 11548: AHL_DEBUG_PUB.Debug('i:'|| i|| ' value:' || l_due_at_counter_val_tbl(i).counter_value || 'ID: ' || l_due_at_counter_val_tbl(i).counter_id);

11544: AHL_DEBUG_PUB.Debug('l_last_due_date: '|| sysdate);
11545: AHL_DEBUG_PUB.Debug('l_due_date: '|| p_forecasted_date);
11546: IF (l_due_at_counter_val_tbl.COUNT) > 0 THEN
11547: for i in l_due_at_counter_val_tbl.FIRST..l_due_at_counter_val_tbl.LAST LOOP
11548: AHL_DEBUG_PUB.Debug('i:'|| i|| ' value:' || l_due_at_counter_val_tbl(i).counter_value || 'ID: ' || l_due_at_counter_val_tbl(i).counter_id);
11549: end loop;
11550: END IF; -- count.
11551: END IF; -- Debug = Y
11552:

Line 11567: AHL_DEBUG_PUB.Debug('End API Get_Forecasted_Counter_Values');

11563: p_encoded => fnd_api.g_false
11564: );
11565:
11566: IF G_DEBUG = 'Y' THEN
11567: AHL_DEBUG_PUB.Debug('End API Get_Forecasted_Counter_Values');
11568: END IF;
11569:
11570: --
11571: EXCEPTION

Line 11579: AHL_DEBUG_PUB.disable_debug;

11575: p_data => x_msg_data,
11576: p_encoded => fnd_api.g_false);
11577:
11578: -- Disable debug
11579: AHL_DEBUG_PUB.disable_debug;
11580:
11581: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
11582: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
11583: FND_MSG_PUB.count_and_get( p_count => x_msg_count,

Line 11588: AHL_DEBUG_PUB.disable_debug;

11584: p_data => x_msg_data,
11585: p_encoded => fnd_api.g_false);
11586:
11587: -- Disable debug
11588: AHL_DEBUG_PUB.disable_debug;
11589:
11590: WHEN OTHERS THEN
11591: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
11592: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN

Line 11602: AHL_DEBUG_PUB.disable_debug;

11598: p_data => x_msg_data,
11599: p_encoded => fnd_api.g_false);
11600:
11601: -- Disable debug
11602: AHL_DEBUG_PUB.disable_debug;
11603:
11604: END Get_Forecasted_Counter_Values;
11605: ----------------------------------------------
11606: -- Added in R12 to fix bug# 4224867.

Line 11672: AHL_DEBUG_PUB.debug('Start of get_ctr_reading_for_datetime');

11668:
11669: BEGIN
11670:
11671: IF G_DEBUG = 'Y' THEN
11672: AHL_DEBUG_PUB.debug('Start of get_ctr_reading_for_datetime');
11673: END IF;
11674:
11675: OPEN cs_ctr_reading_csr(p_csi_item_instance_id,
11676: p_counter_id,

Line 11687: AHL_DEBUG_PUB.debug('End of get_ctr_reading_for_datetime');

11683:
11684: x_net_reading := l_net_reading;
11685:
11686: IF G_DEBUG = 'Y' THEN
11687: AHL_DEBUG_PUB.debug('End of get_ctr_reading_for_datetime');
11688: END IF;
11689:
11690: END get_ctr_reading_for_datetime;
11691:

Line 11706: AHL_DEBUG_PUB.debug('Start of validate_for_duedate_reset');

11702: l_return_status VARCHAR2(1);
11703:
11704: BEGIN
11705: IF G_DEBUG = 'Y' THEN
11706: AHL_DEBUG_PUB.debug('Start of validate_for_duedate_reset');
11707: END IF;
11708:
11709: l_return_status := 'N';
11710: IF (p_due_date IS NULL) THEN

Line 11748: AHL_DEBUG_PUB.debug('End of validate_for_duedate_reset');

11744: END IF; -- p_prev_due_date
11745: END IF; -- p_due_date
11746:
11747: IF G_DEBUG = 'Y' THEN
11748: AHL_DEBUG_PUB.debug('End of validate_for_duedate_reset');
11749: END IF;
11750:
11751: RETURN l_return_status;
11752:

Line 11775: l_debug VARCHAR2(1) := AHL_DEBUG_PUB.is_log_enabled;

11771: l_msg_count NUMBER;
11772: l_return_status VARCHAR2(1);
11773: l_msg_data VARCHAR2(30);
11774: i NUMBER;
11775: l_debug VARCHAR2(1) := AHL_DEBUG_PUB.is_log_enabled;
11776: l_master_org_id NUMBER;
11777: l_mr_header_id NUMBER;
11778:
11779: l_csi_min_id NUMBER;

Line 11847: AHL_DEBUG_PUB.enable_debug;

11843:
11844: BEGIN
11845:
11846: IF l_debug = 'Y' THEN
11847: AHL_DEBUG_PUB.enable_debug;
11848: AHL_DEBUG_PUB.debug('Begin private API: AHL_UMP_PROCESSUNIT_PVT.PROCESS_PM_MR_AFFECTED_ITEMS');
11849: END IF;
11850:
11851: -- Check whether the mr_header_id exists --

Line 11848: AHL_DEBUG_PUB.debug('Begin private API: AHL_UMP_PROCESSUNIT_PVT.PROCESS_PM_MR_AFFECTED_ITEMS');

11844: BEGIN
11845:
11846: IF l_debug = 'Y' THEN
11847: AHL_DEBUG_PUB.enable_debug;
11848: AHL_DEBUG_PUB.debug('Begin private API: AHL_UMP_PROCESSUNIT_PVT.PROCESS_PM_MR_AFFECTED_ITEMS');
11849: END IF;
11850:
11851: -- Check whether the mr_header_id exists --
11852: OPEN check_mr_exists(p_mr_header_id);

Line 11863: AHL_DEBUG_PUB.debug(' Phase 1');

11859: END IF;
11860: CLOSE check_mr_exists;
11861:
11862: IF l_debug = 'Y' THEN
11863: AHL_DEBUG_PUB.debug(' Phase 1');
11864: END IF;
11865:
11866: -- validate # of workers.
11867: l_num_workers := p_num_of_workers;

Line 11874: AHL_DEBUG_PUB.debug(' Phase 2:l_num_workers:' || l_num_workers);

11870: l_num_workers := 30;
11871: END IF;
11872:
11873: IF l_debug = 'Y' THEN
11874: AHL_DEBUG_PUB.debug(' Phase 2:l_num_workers:' || l_num_workers);
11875: END IF;
11876:
11877: FOR l_mr_effect IN get_mr_effect(p_mr_header_id)
11878: LOOP

Line 11882: AHL_DEBUG_PUB.debug(' Phase 3:Inv Item ID:' || l_mr_effect.inventory_item_id);

11878: LOOP
11879: IF (l_mr_effect.inventory_item_id IS NOT NULL) THEN
11880:
11881: IF l_debug = 'Y' THEN
11882: AHL_DEBUG_PUB.debug(' Phase 3:Inv Item ID:' || l_mr_effect.inventory_item_id);
11883: END IF;
11884:
11885: --DBMS_OUTPUT.put_line('API1: Come here in case 1B and l_index is: '||l_index);
11886:

Line 11894: AHL_DEBUG_PUB.debug('Phase 4: Inv Item ID is Valid');

11890: p_x_inventory_item_id => l_mr_effect.inventory_item_id);
11891: IF (l_return_status = 'S') THEN
11892:
11893: IF l_debug = 'Y' THEN
11894: AHL_DEBUG_PUB.debug('Phase 4: Inv Item ID is Valid');
11895: END IF;
11896: -- get master organization id.
11897: OPEN get_master_org_id_csr(l_mr_effect.inventory_item_id);
11898: FETCH get_master_org_id_csr INTO l_master_org_id;

Line 11925: AHL_DEBUG_PUB.debug(' Phase 5:csi_min:csi_max:count:' || l_csi_min_id || ':' || l_csi_max_id || ':' ||

11921: END IF;
11922: CLOSE get_minmax_inst_csr;
11923:
11924: IF l_debug = 'Y' THEN
11925: AHL_DEBUG_PUB.debug(' Phase 5:csi_min:csi_max:count:' || l_csi_min_id || ':' || l_csi_max_id || ':' ||
11926: l_total_count);
11927: END IF;
11928:
11929: END IF; -- l_return_status = 'S'

Line 11993: l_debug VARCHAR2(1) := AHL_DEBUG_PUB.is_log_enabled;

11989: p_num_workers IN NUMBER,
11990: p_mr_header_id IN NUMBER)
11991: IS
11992:
11993: l_debug VARCHAR2(1) := AHL_DEBUG_PUB.is_log_enabled;
11994:
11995: l_csi_min_id NUMBER;
11996: l_csi_max_id NUMBER;
11997: l_csi_eff_min_id NUMBER;

Line 12024: AHL_DEBUG_PUB.debug('l_step:' || l_step || 'start csi: end csi' || l_start_csi_id || ':' || l_end_csi_id);

12020:
12021: l_start_csi_id := l_csi_min_id;
12022:
12023: IF l_debug = 'Y' THEN
12024: AHL_DEBUG_PUB.debug('l_step:' || l_step || 'start csi: end csi' || l_start_csi_id || ':' || l_end_csi_id);
12025: END IF;
12026:
12027: -- loop through
12028: WHILE (l_start_csi_id < l_csi_max_id) LOOP

Line 12035: AHL_DEBUG_PUB.debug('Loop start csi: end csi' || l_start_csi_id || ':' || l_end_csi_id);

12031: l_end_csi_id := l_csi_max_id;
12032: END IF;
12033:
12034: IF l_debug = 'Y' THEN
12035: AHL_DEBUG_PUB.debug('Loop start csi: end csi' || l_start_csi_id || ':' || l_end_csi_id);
12036: END IF;
12037:
12038: -- launch BUE worker request.
12039: l_req_id := fnd_request.submit_request('AHL','AHLWUEFF',NULL,NULL,FALSE, p_mr_header_id, l_start_csi_id, l_end_csi_id);

Line 12043: AHL_DEBUG_PUB.debug('Tried to submit concurrent request but failed');

12039: l_req_id := fnd_request.submit_request('AHL','AHLWUEFF',NULL,NULL,FALSE, p_mr_header_id, l_start_csi_id, l_end_csi_id);
12040:
12041: IF (l_req_id = 0 OR l_req_id IS NULL) THEN
12042: IF l_debug = 'Y' THEN
12043: AHL_DEBUG_PUB.debug('Tried to submit concurrent request but failed');
12044: END IF;
12045: fnd_file.put_line(FND_FILE.LOG, 'Failed submit concurrent request');
12046: fnd_file.new_line(FND_FILE.LOG,1);
12047: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 12053: AHL_DEBUG_PUB.debug('Concurrent request ID:' || l_req_id || ' launched to process instances between:' || l_start_csi_id || ' and ' || l_end_csi_id);

12049: ELSE
12050: fnd_file.put_line(FND_FILE.LOG, 'Concurrent request ID:' || l_req_id || ' launched to process instances between:' || l_start_csi_id || ' and ' || l_end_csi_id);
12051:
12052: IF l_debug = 'Y' THEN
12053: AHL_DEBUG_PUB.debug('Concurrent request ID:' || l_req_id || ' launched to process instances between:' || l_start_csi_id || ' and ' || l_end_csi_id);
12054: END IF;
12055: END IF;
12056:
12057: l_start_csi_id := l_end_csi_id + 1;

Line 12073: l_debug VARCHAR2(1) := AHL_DEBUG_PUB.is_log_enabled;

12069: p_mr_header_id IN NUMBER,
12070: p_total_inst_count IN NUMBER)
12071: IS
12072:
12073: l_debug VARCHAR2(1) := AHL_DEBUG_PUB.is_log_enabled;
12074: l_step number;
12075: l_start_csi_id number;
12076: l_launched_workers number;
12077: l_mid_point_inst_id number;

Line 12101: AHL_DEBUG_PUB.debug('Start of procedure: Instance_Split_BTree');

12097: trunc(nvl(active_end_date,sysdate+1));
12098:
12099: BEGIN
12100: IF l_debug = 'Y' THEN
12101: AHL_DEBUG_PUB.debug('Start of procedure: Instance_Split_BTree');
12102: AHL_DEBUG_PUB.debug('p_mr_header_id:' || p_mr_header_id);
12103: AHL_DEBUG_PUB.debug('p_num_workers:' || p_num_workers);
12104: AHL_DEBUG_PUB.debug('p_csi_max_id:' || p_csi_max_id);
12105: AHL_DEBUG_PUB.debug('p_csi_min_id:' || p_csi_min_id);

Line 12102: AHL_DEBUG_PUB.debug('p_mr_header_id:' || p_mr_header_id);

12098:
12099: BEGIN
12100: IF l_debug = 'Y' THEN
12101: AHL_DEBUG_PUB.debug('Start of procedure: Instance_Split_BTree');
12102: AHL_DEBUG_PUB.debug('p_mr_header_id:' || p_mr_header_id);
12103: AHL_DEBUG_PUB.debug('p_num_workers:' || p_num_workers);
12104: AHL_DEBUG_PUB.debug('p_csi_max_id:' || p_csi_max_id);
12105: AHL_DEBUG_PUB.debug('p_csi_min_id:' || p_csi_min_id);
12106: AHL_DEBUG_PUB.debug('p_total_inst_count:' || p_total_inst_count);

Line 12103: AHL_DEBUG_PUB.debug('p_num_workers:' || p_num_workers);

12099: BEGIN
12100: IF l_debug = 'Y' THEN
12101: AHL_DEBUG_PUB.debug('Start of procedure: Instance_Split_BTree');
12102: AHL_DEBUG_PUB.debug('p_mr_header_id:' || p_mr_header_id);
12103: AHL_DEBUG_PUB.debug('p_num_workers:' || p_num_workers);
12104: AHL_DEBUG_PUB.debug('p_csi_max_id:' || p_csi_max_id);
12105: AHL_DEBUG_PUB.debug('p_csi_min_id:' || p_csi_min_id);
12106: AHL_DEBUG_PUB.debug('p_total_inst_count:' || p_total_inst_count);
12107: END IF;

Line 12104: AHL_DEBUG_PUB.debug('p_csi_max_id:' || p_csi_max_id);

12100: IF l_debug = 'Y' THEN
12101: AHL_DEBUG_PUB.debug('Start of procedure: Instance_Split_BTree');
12102: AHL_DEBUG_PUB.debug('p_mr_header_id:' || p_mr_header_id);
12103: AHL_DEBUG_PUB.debug('p_num_workers:' || p_num_workers);
12104: AHL_DEBUG_PUB.debug('p_csi_max_id:' || p_csi_max_id);
12105: AHL_DEBUG_PUB.debug('p_csi_min_id:' || p_csi_min_id);
12106: AHL_DEBUG_PUB.debug('p_total_inst_count:' || p_total_inst_count);
12107: END IF;
12108:

Line 12105: AHL_DEBUG_PUB.debug('p_csi_min_id:' || p_csi_min_id);

12101: AHL_DEBUG_PUB.debug('Start of procedure: Instance_Split_BTree');
12102: AHL_DEBUG_PUB.debug('p_mr_header_id:' || p_mr_header_id);
12103: AHL_DEBUG_PUB.debug('p_num_workers:' || p_num_workers);
12104: AHL_DEBUG_PUB.debug('p_csi_max_id:' || p_csi_max_id);
12105: AHL_DEBUG_PUB.debug('p_csi_min_id:' || p_csi_min_id);
12106: AHL_DEBUG_PUB.debug('p_total_inst_count:' || p_total_inst_count);
12107: END IF;
12108:
12109: l_num_workers := p_num_workers;

Line 12106: AHL_DEBUG_PUB.debug('p_total_inst_count:' || p_total_inst_count);

12102: AHL_DEBUG_PUB.debug('p_mr_header_id:' || p_mr_header_id);
12103: AHL_DEBUG_PUB.debug('p_num_workers:' || p_num_workers);
12104: AHL_DEBUG_PUB.debug('p_csi_max_id:' || p_csi_max_id);
12105: AHL_DEBUG_PUB.debug('p_csi_min_id:' || p_csi_min_id);
12106: AHL_DEBUG_PUB.debug('p_total_inst_count:' || p_total_inst_count);
12107: END IF;
12108:
12109: l_num_workers := p_num_workers;
12110:

Line 12119: AHL_DEBUG_PUB.debug('Tried to submit concurrent request but failed');

12115: p_csi_min_id, p_csi_max_id);
12116:
12117: IF (l_req_id = 0 OR l_req_id IS NULL) THEN
12118: IF l_debug = 'Y' THEN
12119: AHL_DEBUG_PUB.debug('Tried to submit concurrent request but failed');
12120: END IF;
12121: fnd_file.put_line(FND_FILE.LOG, 'Failed submit concurrent request');
12122: fnd_file.new_line(FND_FILE.LOG,1);
12123: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 12129: AHL_DEBUG_PUB.debug('Concurrent request ID:' || l_req_id || ' launched to process instances between:' || p_csi_min_id || ' and ' || p_csi_min_id);

12125: ELSE
12126: fnd_file.put_line(FND_FILE.LOG, 'Concurrent request ID:' || l_req_id || ' launched to process instances between:' || p_csi_min_id || ' and ' || p_csi_min_id);
12127:
12128: IF l_debug = 'Y' THEN
12129: AHL_DEBUG_PUB.debug('Concurrent request ID:' || l_req_id || ' launched to process instances between:' || p_csi_min_id || ' and ' || p_csi_min_id);
12130: END IF;
12131: END IF;
12132:
12133: ELSE

Line 12145: AHL_DEBUG_PUB.debug('l_step:' || l_step);

12141: l_tol_bef := l_step - trunc((0.1 * l_step));
12142: l_tol_after := l_step + trunc((0.1 * l_step));
12143:
12144: IF l_debug = 'Y' THEN
12145: AHL_DEBUG_PUB.debug('l_step:' || l_step);
12146: AHL_DEBUG_PUB.debug('l_tol_bef:' || l_tol_bef);
12147: AHL_DEBUG_PUB.debug('l_tol_after:' || l_tol_after);
12148: END IF;
12149:

Line 12146: AHL_DEBUG_PUB.debug('l_tol_bef:' || l_tol_bef);

12142: l_tol_after := l_step + trunc((0.1 * l_step));
12143:
12144: IF l_debug = 'Y' THEN
12145: AHL_DEBUG_PUB.debug('l_step:' || l_step);
12146: AHL_DEBUG_PUB.debug('l_tol_bef:' || l_tol_bef);
12147: AHL_DEBUG_PUB.debug('l_tol_after:' || l_tol_after);
12148: END IF;
12149:
12150: --dbms_output.put_line('l_Step:' || l_step);

Line 12147: AHL_DEBUG_PUB.debug('l_tol_after:' || l_tol_after);

12143:
12144: IF l_debug = 'Y' THEN
12145: AHL_DEBUG_PUB.debug('l_step:' || l_step);
12146: AHL_DEBUG_PUB.debug('l_tol_bef:' || l_tol_bef);
12147: AHL_DEBUG_PUB.debug('l_tol_after:' || l_tol_after);
12148: END IF;
12149:
12150: --dbms_output.put_line('l_Step:' || l_step);
12151: --dbms_output.put_line('l_tol_minus:' || l_tol_bef);

Line 12169: AHL_DEBUG_PUB.debug('Start loop:l_begin_count_csi_id:' || l_begin_count_csi_id);

12165:
12166: WHILE (true) LOOP
12167:
12168: IF l_debug = 'Y' THEN
12169: AHL_DEBUG_PUB.debug('Start loop:l_begin_count_csi_id:' || l_begin_count_csi_id);
12170: AHL_DEBUG_PUB.debug('l_start_csi_id:' || l_start_csi_id);
12171: AHL_DEBUG_PUB.debug('l_mid_point_inst_id:' || l_mid_point_inst_id);
12172: --dbms_output.put_line('l_start_csi_id:' || l_start_csi_id);
12173: --dbms_output.put_line('l_mid_point_inst_id:' || l_mid_point_inst_id);

Line 12170: AHL_DEBUG_PUB.debug('l_start_csi_id:' || l_start_csi_id);

12166: WHILE (true) LOOP
12167:
12168: IF l_debug = 'Y' THEN
12169: AHL_DEBUG_PUB.debug('Start loop:l_begin_count_csi_id:' || l_begin_count_csi_id);
12170: AHL_DEBUG_PUB.debug('l_start_csi_id:' || l_start_csi_id);
12171: AHL_DEBUG_PUB.debug('l_mid_point_inst_id:' || l_mid_point_inst_id);
12172: --dbms_output.put_line('l_start_csi_id:' || l_start_csi_id);
12173: --dbms_output.put_line('l_mid_point_inst_id:' || l_mid_point_inst_id);
12174: END IF;

Line 12171: AHL_DEBUG_PUB.debug('l_mid_point_inst_id:' || l_mid_point_inst_id);

12167:
12168: IF l_debug = 'Y' THEN
12169: AHL_DEBUG_PUB.debug('Start loop:l_begin_count_csi_id:' || l_begin_count_csi_id);
12170: AHL_DEBUG_PUB.debug('l_start_csi_id:' || l_start_csi_id);
12171: AHL_DEBUG_PUB.debug('l_mid_point_inst_id:' || l_mid_point_inst_id);
12172: --dbms_output.put_line('l_start_csi_id:' || l_start_csi_id);
12173: --dbms_output.put_line('l_mid_point_inst_id:' || l_mid_point_inst_id);
12174: END IF;
12175:

Line 12181: AHL_DEBUG_PUB.debug('l_count:' || l_count);

12177: FETCH csi_inst_count_csr INTO l_count;
12178: CLOSE csi_inst_count_csr;
12179:
12180: IF l_debug = 'Y' THEN
12181: AHL_DEBUG_PUB.debug('l_count:' || l_count);
12182: END IF;
12183: -- dbms_output.put_line('l_count:' || l_count);
12184:
12185: IF (l_count >= l_tol_bef AND l_count <= l_tol_after) THEN

Line 12199: AHL_DEBUG_PUB.debug('Tried to submit concurrent request but failed');

12195: --dbms_output.put_line('newB l_mid_point_inst_id:' || l_mid_point_inst_id);
12196:
12197: IF (l_req_id = 0 OR l_req_id IS NULL) THEN
12198: IF l_debug = 'Y' THEN
12199: AHL_DEBUG_PUB.debug('Tried to submit concurrent request but failed');
12200: END IF;
12201: fnd_file.put_line(FND_FILE.LOG, 'Failed submit concurrent request');
12202: fnd_file.new_line(FND_FILE.LOG,1);
12203: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 12211: AHL_DEBUG_PUB.debug('Concurrent request ID:' || l_req_id ||

12207: ' launched to process instances between:' || l_begin_count_csi_id || ' and ' ||
12208: l_mid_point_inst_id);
12209:
12210: IF l_debug = 'Y' THEN
12211: AHL_DEBUG_PUB.debug('Concurrent request ID:' || l_req_id ||
12212: ' launched to process instances between:' || l_begin_count_csi_id || ' and ' ||
12213: l_mid_point_inst_id);
12214: END IF;
12215: END IF;

Line 12225: AHL_DEBUG_PUB.debug('Tried to submit concurrent request but failed');

12221: l_req_id := fnd_request.submit_request('AHL','AHLWUEFF',NULL,NULL,FALSE, p_mr_header_id,
12222: l_begin_count_csi_id, l_mid_point_inst_id);
12223: IF (l_req_id = 0 OR l_req_id IS NULL) THEN
12224: IF l_debug = 'Y' THEN
12225: AHL_DEBUG_PUB.debug('Tried to submit concurrent request but failed');
12226: END IF;
12227: fnd_file.put_line(FND_FILE.LOG, 'Failed submit concurrent request');
12228: fnd_file.new_line(FND_FILE.LOG,1);
12229: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 12237: AHL_DEBUG_PUB.debug('Concurrent request ID:' || l_req_id ||

12233: ' launched to process instances between:' || l_begin_count_csi_id || ' and ' ||
12234: l_mid_point_inst_id);
12235:
12236: IF l_debug = 'Y' THEN
12237: AHL_DEBUG_PUB.debug('Concurrent request ID:' || l_req_id ||
12238: ' launched to process instances between:' || l_begin_count_csi_id || ' and ' ||
12239: l_mid_point_inst_id);
12240: END IF;
12241: END IF; -- l_req_id = 0 OR ..

Line 12266: AHL_DEBUG_PUB.debug('End of procedure: Instance_Split_BTree');

12262: END IF;
12263: END IF;
12264:
12265: IF l_debug = 'Y' THEN
12266: AHL_DEBUG_PUB.debug('End of procedure: Instance_Split_BTree');
12267: END IF;
12268:
12269: END Instance_Split_BTree;
12270:

Line 12432: AHL_DEBUG_PUB.debug('Start Split_Process_All_Instances:p_concurrent_flag:' || p_concurrent_flag);

12428:
12429: BEGIN
12430:
12431: IF G_debug = 'Y' THEN
12432: AHL_DEBUG_PUB.debug('Start Split_Process_All_Instances:p_concurrent_flag:' || p_concurrent_flag);
12433: AHL_DEBUG_PUB.debug('Input MR Header ID:' || p_mr_header_id);
12434: AHL_DEBUG_PUB.debug('Input p_num_of_workers:' || p_num_of_workers);
12435: END IF;
12436:

Line 12433: AHL_DEBUG_PUB.debug('Input MR Header ID:' || p_mr_header_id);

12429: BEGIN
12430:
12431: IF G_debug = 'Y' THEN
12432: AHL_DEBUG_PUB.debug('Start Split_Process_All_Instances:p_concurrent_flag:' || p_concurrent_flag);
12433: AHL_DEBUG_PUB.debug('Input MR Header ID:' || p_mr_header_id);
12434: AHL_DEBUG_PUB.debug('Input p_num_of_workers:' || p_num_of_workers);
12435: END IF;
12436:
12437: -- initialize return status.

Line 12434: AHL_DEBUG_PUB.debug('Input p_num_of_workers:' || p_num_of_workers);

12430:
12431: IF G_debug = 'Y' THEN
12432: AHL_DEBUG_PUB.debug('Start Split_Process_All_Instances:p_concurrent_flag:' || p_concurrent_flag);
12433: AHL_DEBUG_PUB.debug('Input MR Header ID:' || p_mr_header_id);
12434: AHL_DEBUG_PUB.debug('Input p_num_of_workers:' || p_num_of_workers);
12435: END IF;
12436:
12437: -- initialize return status.
12438: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 12473: AHL_DEBUG_PUB.debug('Tried to submit concurrent request but failed');

12469: FOR i IN 1..l_num_of_workers LOOP
12470: l_req_id := fnd_request.submit_request('AHL','AHLWUEFF',NULL,NULL,FALSE, l_conc_req_id);
12471: IF (l_req_id = 0 OR l_req_id IS NULL) THEN
12472: IF G_debug = 'Y' THEN
12473: AHL_DEBUG_PUB.debug('Tried to submit concurrent request but failed');
12474: END IF;
12475: fnd_file.put_line(FND_FILE.LOG, 'Failed submit concurrent request');
12476: fnd_file.new_line(FND_FILE.LOG,1);
12477: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 12482: AHL_DEBUG_PUB.debug('Concurrent request ID:' || l_req_id );

12478:
12479: ELSE
12480: fnd_file.put_line(FND_FILE.LOG, 'Concurrent request ID:' || l_req_id );
12481: IF G_debug = 'Y' THEN
12482: AHL_DEBUG_PUB.debug('Concurrent request ID:' || l_req_id );
12483: END IF;
12484: END IF; -- l_req_id = 0 OR ..
12485:
12486: END LOOP;

Line 12517: AHL_DEBUG_PUB.debug('Now processing..:' || l_instance_id);

12513:
12514: EXIT WHEN (l_instance_id IS NULL);
12515:
12516: IF G_DEBUG = 'Y' THEN
12517: AHL_DEBUG_PUB.debug('Now processing..:' || l_instance_id);
12518: END IF;
12519:
12520: -- Call Process Unit for the item instance.
12521: Process_Unit (

Line 12546: AHL_DEBUG_PUB.debug('Warning: Error from Cleanup_BUE_Worker:' || l_err_mesg);

12542: x_errbuf => l_err_mesg);
12543: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
12544: -- ignore error returned from this procedure
12545: IF G_DEBUG = 'Y' THEN
12546: AHL_DEBUG_PUB.debug('Warning: Error from Cleanup_BUE_Worker:' || l_err_mesg);
12547: END IF;
12548: END IF;
12549:
12550: END IF;

Line 12553: AHL_DEBUG_PUB.debug('End Split_Process_All_Instances:Return Status:' || x_return_status);

12549:
12550: END IF;
12551:
12552: IF G_debug = 'Y' THEN
12553: AHL_DEBUG_PUB.debug('End Split_Process_All_Instances:Return Status:' || x_return_status);
12554: END IF;
12555:
12556: END Split_Process_All_Instances;
12557:

Line 12603: AHL_DEBUG_PUB.debug('Start Process_Unit_Range for concurrent pgm ID:' || l_conc_child_req_id);

12599: FETCH get_sim_plan_id into l_simulation_plan_id;
12600: CLOSE get_sim_plan_id;
12601:
12602: IF G_debug = 'Y' THEN
12603: AHL_DEBUG_PUB.debug('Start Process_Unit_Range for concurrent pgm ID:' || l_conc_child_req_id);
12604: AHL_DEBUG_PUB.debug('Parent concurrent pgm ID:' || p_parent_conc_pgm_id);
12605: -- JKJain, NR Analysis and Forecasting
12606: AHL_DEBUG_PUB.debug('Process_Unit_Range => p_simulation_plan_id :' || l_simulation_plan_id);
12607:

Line 12604: AHL_DEBUG_PUB.debug('Parent concurrent pgm ID:' || p_parent_conc_pgm_id);

12600: CLOSE get_sim_plan_id;
12601:
12602: IF G_debug = 'Y' THEN
12603: AHL_DEBUG_PUB.debug('Start Process_Unit_Range for concurrent pgm ID:' || l_conc_child_req_id);
12604: AHL_DEBUG_PUB.debug('Parent concurrent pgm ID:' || p_parent_conc_pgm_id);
12605: -- JKJain, NR Analysis and Forecasting
12606: AHL_DEBUG_PUB.debug('Process_Unit_Range => p_simulation_plan_id :' || l_simulation_plan_id);
12607:
12608: END IF;

Line 12606: AHL_DEBUG_PUB.debug('Process_Unit_Range => p_simulation_plan_id :' || l_simulation_plan_id);

12602: IF G_debug = 'Y' THEN
12603: AHL_DEBUG_PUB.debug('Start Process_Unit_Range for concurrent pgm ID:' || l_conc_child_req_id);
12604: AHL_DEBUG_PUB.debug('Parent concurrent pgm ID:' || p_parent_conc_pgm_id);
12605: -- JKJain, NR Analysis and Forecasting
12606: AHL_DEBUG_PUB.debug('Process_Unit_Range => p_simulation_plan_id :' || l_simulation_plan_id);
12607:
12608: END IF;
12609:
12610: -- AHL processing.

Line 12677: AHL_DEBUG_PUB.debug('Concurrent pgm retcode:' || retcode);

12673: END IF;
12674:
12675:
12676: IF G_debug = 'Y' THEN
12677: AHL_DEBUG_PUB.debug('Concurrent pgm retcode:' || retcode);
12678: AHL_DEBUG_PUB.debug('Concurrent pgm l_return_status:' || l_return_status);
12679: AHL_DEBUG_PUB.debug('End Process_Unit_Range for concurrent pgm ID:' || l_conc_child_req_id);
12680: END IF;
12681:

Line 12678: AHL_DEBUG_PUB.debug('Concurrent pgm l_return_status:' || l_return_status);

12674:
12675:
12676: IF G_debug = 'Y' THEN
12677: AHL_DEBUG_PUB.debug('Concurrent pgm retcode:' || retcode);
12678: AHL_DEBUG_PUB.debug('Concurrent pgm l_return_status:' || l_return_status);
12679: AHL_DEBUG_PUB.debug('End Process_Unit_Range for concurrent pgm ID:' || l_conc_child_req_id);
12680: END IF;
12681:
12682: --

Line 12679: AHL_DEBUG_PUB.debug('End Process_Unit_Range for concurrent pgm ID:' || l_conc_child_req_id);

12675:
12676: IF G_debug = 'Y' THEN
12677: AHL_DEBUG_PUB.debug('Concurrent pgm retcode:' || retcode);
12678: AHL_DEBUG_PUB.debug('Concurrent pgm l_return_status:' || l_return_status);
12679: AHL_DEBUG_PUB.debug('End Process_Unit_Range for concurrent pgm ID:' || l_conc_child_req_id);
12680: END IF;
12681:
12682: --
12683: EXCEPTION

Line 12724: AHL_DEBUG_PUB.debug('Start Process_Unit_Range for MR: Old ID:New ID:' || p_old_mr_header_id || ':' || p_new_mr_header_id);

12720:
12721: fnd_file.put_line(FND_FILE.LOG,'Start time:' || to_char(sysdate, 'Month DD, YYYY HH24:MI:SS'));
12722:
12723: IF G_debug = 'Y' THEN
12724: AHL_DEBUG_PUB.debug('Start Process_Unit_Range for MR: Old ID:New ID:' || p_old_mr_header_id || ':' || p_new_mr_header_id);
12725: END IF;
12726:
12727: -- initialize return status.
12728: retcode := 0;

Line 12753: AHL_DEBUG_PUB.debug('End Process_Unit_Range for MR: retcode:' || retcode);

12749: log_error_messages;
12750: END IF;
12751:
12752: IF G_debug = 'Y' THEN
12753: AHL_DEBUG_PUB.debug('End Process_Unit_Range for MR: retcode:' || retcode);
12754: END IF;
12755:
12756: --
12757: EXCEPTION

Line 13049: AHL_DEBUG_PUB.debug('Start Populate_BUE_Worker for pgm ID:' || p_conc_request_id);

13045:
13046: BEGIN
13047:
13048: IF G_debug = 'Y' THEN
13049: AHL_DEBUG_PUB.debug('Start Populate_BUE_Worker for pgm ID:' || p_conc_request_id);
13050: AHL_DEBUG_PUB.debug('Concurrent flag:' || p_concurrent_flag);
13051: END IF;
13052:
13053: -- initialize return status.

Line 13050: AHL_DEBUG_PUB.debug('Concurrent flag:' || p_concurrent_flag);

13046: BEGIN
13047:
13048: IF G_debug = 'Y' THEN
13049: AHL_DEBUG_PUB.debug('Start Populate_BUE_Worker for pgm ID:' || p_conc_request_id);
13050: AHL_DEBUG_PUB.debug('Concurrent flag:' || p_concurrent_flag);
13051: END IF;
13052:
13053: -- initialize return status.
13054: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 13321: AHL_DEBUG_PUB.debug('Concurrent pgm x_return_status:' || x_return_status);

13317: -- save changes.
13318: COMMIT WORK;
13319:
13320: IF G_debug = 'Y' THEN
13321: AHL_DEBUG_PUB.debug('Concurrent pgm x_return_status:' || x_return_status);
13322: AHL_DEBUG_PUB.debug('End Populate_BUE_Worker for pgm ID:' || p_conc_request_id);
13323: END IF;
13324:
13325: END Populate_BUE_Worker;

Line 13322: AHL_DEBUG_PUB.debug('End Populate_BUE_Worker for pgm ID:' || p_conc_request_id);

13318: COMMIT WORK;
13319:
13320: IF G_debug = 'Y' THEN
13321: AHL_DEBUG_PUB.debug('Concurrent pgm x_return_status:' || x_return_status);
13322: AHL_DEBUG_PUB.debug('End Populate_BUE_Worker for pgm ID:' || p_conc_request_id);
13323: END IF;
13324:
13325: END Populate_BUE_Worker;
13326:

Line 13366: AHL_DEBUG_PUB.debug('Start Get_Next_BUE_Row: Parent Conc Request ID:' || p_parent_conc_pgm_id);

13362: l_object_version_number NUMBER;
13363:
13364: BEGIN
13365: IF G_debug = 'Y' THEN
13366: AHL_DEBUG_PUB.debug('Start Get_Next_BUE_Row: Parent Conc Request ID:' || p_parent_conc_pgm_id);
13367: AHL_DEBUG_PUB.debug('Child Conc Request ID:' || p_conc_child_req_id);
13368: END IF;
13369:
13370: --DBMS_LOCK.SLEEP(60);

Line 13367: AHL_DEBUG_PUB.debug('Child Conc Request ID:' || p_conc_child_req_id);

13363:
13364: BEGIN
13365: IF G_debug = 'Y' THEN
13366: AHL_DEBUG_PUB.debug('Start Get_Next_BUE_Row: Parent Conc Request ID:' || p_parent_conc_pgm_id);
13367: AHL_DEBUG_PUB.debug('Child Conc Request ID:' || p_conc_child_req_id);
13368: END IF;
13369:
13370: --DBMS_LOCK.SLEEP(60);
13371:

Line 13446: AHL_DEBUG_PUB.debug('End Get_Next_BUE_Row: x_item_instance_id:' || x_item_instance_id);

13442: CLOSE ahl_bue_worker_csr;
13443: x_item_instance_id := l_instance_id;
13444:
13445: IF G_debug = 'Y' THEN
13446: AHL_DEBUG_PUB.debug('End Get_Next_BUE_Row: x_item_instance_id:' || x_item_instance_id);
13447: END IF;
13448:
13449: EXCEPTION
13450: WHEN OTHERS THEN

Line 13512: AHL_DEBUG_PUB.debug('Start Cleanup_BUE_Worker: Parent Conc Request ID:' || p_parent_conc_request_id);

13508:
13509: BEGIN
13510:
13511: IF G_debug = 'Y' THEN
13512: AHL_DEBUG_PUB.debug('Start Cleanup_BUE_Worker: Parent Conc Request ID:' || p_parent_conc_request_id);
13513: AHL_DEBUG_PUB.debug('Child Conc Request ID:' || p_child_conc_request_id);
13514: END IF;
13515:
13516: IF (p_parent_conc_request_id IS NULL) THEN

Line 13513: AHL_DEBUG_PUB.debug('Child Conc Request ID:' || p_child_conc_request_id);

13509: BEGIN
13510:
13511: IF G_debug = 'Y' THEN
13512: AHL_DEBUG_PUB.debug('Start Cleanup_BUE_Worker: Parent Conc Request ID:' || p_parent_conc_request_id);
13513: AHL_DEBUG_PUB.debug('Child Conc Request ID:' || p_child_conc_request_id);
13514: END IF;
13515:
13516: IF (p_parent_conc_request_id IS NULL) THEN
13517: RETURN; -- do nothing

Line 13636: AHL_DEBUG_PUB.debug('End Cleanup_BUE_Worker');

13632: END LOOP; -- undeleted_parent IN
13633: END IF; -- p_child_conc_request_id IS NULL
13634:
13635: IF G_debug = 'Y' THEN
13636: AHL_DEBUG_PUB.debug('End Cleanup_BUE_Worker');
13637: END IF;
13638:
13639: EXCEPTION
13640: WHEN record_locked THEN

Line 13852: AHL_DEBUG_PUB.debug('Start Populate_BUE_Worker_for_MR: Input MR Header ID:' || p_mr_header_id);

13848:
13849: BEGIN
13850:
13851: IF G_debug = 'Y' THEN
13852: AHL_DEBUG_PUB.debug('Start Populate_BUE_Worker_for_MR: Input MR Header ID:' || p_mr_header_id);
13853: AHL_DEBUG_PUB.debug('Input Concurrent Flag:' || p_conc_request_id);
13854: AHL_DEBUG_PUB.debug('Input Conc Request ID:' || p_concurrent_flag);
13855: END IF;
13856:

Line 13853: AHL_DEBUG_PUB.debug('Input Concurrent Flag:' || p_conc_request_id);

13849: BEGIN
13850:
13851: IF G_debug = 'Y' THEN
13852: AHL_DEBUG_PUB.debug('Start Populate_BUE_Worker_for_MR: Input MR Header ID:' || p_mr_header_id);
13853: AHL_DEBUG_PUB.debug('Input Concurrent Flag:' || p_conc_request_id);
13854: AHL_DEBUG_PUB.debug('Input Conc Request ID:' || p_concurrent_flag);
13855: END IF;
13856:
13857: -- initialize return status.

Line 13854: AHL_DEBUG_PUB.debug('Input Conc Request ID:' || p_concurrent_flag);

13850:
13851: IF G_debug = 'Y' THEN
13852: AHL_DEBUG_PUB.debug('Start Populate_BUE_Worker_for_MR: Input MR Header ID:' || p_mr_header_id);
13853: AHL_DEBUG_PUB.debug('Input Concurrent Flag:' || p_conc_request_id);
13854: AHL_DEBUG_PUB.debug('Input Conc Request ID:' || p_concurrent_flag);
13855: END IF;
13856:
13857: -- initialize return status.
13858: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 14072: AHL_DEBUG_PUB.debug('End Populate_BUE_Worker_for_MR: x_return_status:' || x_return_status);

14068: -- save changes.
14069: COMMIT WORK;
14070:
14071: IF G_debug = 'Y' THEN
14072: AHL_DEBUG_PUB.debug('End Populate_BUE_Worker_for_MR: x_return_status:' || x_return_status);
14073: END IF;
14074:
14075: END Populate_BUE_Worker_for_MR;
14076:

Line 14118: AHL_DEBUG_PUB.debug ('Start validate_uf_for_ctr');

14114:
14115: BEGIN
14116:
14117: IF G_DEBUG = 'Y' THEN
14118: AHL_DEBUG_PUB.debug ('Start validate_uf_for_ctr');
14119: END IF;
14120:
14121: l_last_index := p_x_forecast_details_tbl.LAST + 1;
14122:

Line 14148: AHL_DEBUG_PUB.debug ('Count on forecast_details' || p_x_forecast_details_tbl.COUNT);

14144: END LOOP; -- j
14145: END IF; -- p_current_usage_tbl.COUNT
14146:
14147: IF G_DEBUG = 'Y' THEN
14148: AHL_DEBUG_PUB.debug ('Count on forecast_details' || p_x_forecast_details_tbl.COUNT);
14149:
14150: IF (p_x_forecast_details_tbl.COUNT > 0) THEN
14151: FOR i IN p_x_forecast_details_tbl.FIRST..p_x_forecast_details_tbl.LAST LOOP
14152: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') Uom_Code' || p_x_forecast_details_tbl(i).uom_code);

Line 14152: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') Uom_Code' || p_x_forecast_details_tbl(i).uom_code);

14148: AHL_DEBUG_PUB.debug ('Count on forecast_details' || p_x_forecast_details_tbl.COUNT);
14149:
14150: IF (p_x_forecast_details_tbl.COUNT > 0) THEN
14151: FOR i IN p_x_forecast_details_tbl.FIRST..p_x_forecast_details_tbl.LAST LOOP
14152: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') Uom_Code' || p_x_forecast_details_tbl(i).uom_code);
14153: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') Start Date' || p_x_forecast_details_tbl(i).start_date);
14154: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') End Date' || p_x_forecast_details_tbl(i).end_date);
14155: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') Usage' || p_x_forecast_details_tbl(i).usage_per_day);
14156: END LOOP;

Line 14153: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') Start Date' || p_x_forecast_details_tbl(i).start_date);

14149:
14150: IF (p_x_forecast_details_tbl.COUNT > 0) THEN
14151: FOR i IN p_x_forecast_details_tbl.FIRST..p_x_forecast_details_tbl.LAST LOOP
14152: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') Uom_Code' || p_x_forecast_details_tbl(i).uom_code);
14153: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') Start Date' || p_x_forecast_details_tbl(i).start_date);
14154: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') End Date' || p_x_forecast_details_tbl(i).end_date);
14155: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') Usage' || p_x_forecast_details_tbl(i).usage_per_day);
14156: END LOOP;
14157: END IF;

Line 14154: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') End Date' || p_x_forecast_details_tbl(i).end_date);

14150: IF (p_x_forecast_details_tbl.COUNT > 0) THEN
14151: FOR i IN p_x_forecast_details_tbl.FIRST..p_x_forecast_details_tbl.LAST LOOP
14152: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') Uom_Code' || p_x_forecast_details_tbl(i).uom_code);
14153: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') Start Date' || p_x_forecast_details_tbl(i).start_date);
14154: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') End Date' || p_x_forecast_details_tbl(i).end_date);
14155: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') Usage' || p_x_forecast_details_tbl(i).usage_per_day);
14156: END LOOP;
14157: END IF;
14158: AHL_DEBUG_PUB.debug ('End validate_uf_for_ctr');

Line 14155: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') Usage' || p_x_forecast_details_tbl(i).usage_per_day);

14151: FOR i IN p_x_forecast_details_tbl.FIRST..p_x_forecast_details_tbl.LAST LOOP
14152: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') Uom_Code' || p_x_forecast_details_tbl(i).uom_code);
14153: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') Start Date' || p_x_forecast_details_tbl(i).start_date);
14154: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') End Date' || p_x_forecast_details_tbl(i).end_date);
14155: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') Usage' || p_x_forecast_details_tbl(i).usage_per_day);
14156: END LOOP;
14157: END IF;
14158: AHL_DEBUG_PUB.debug ('End validate_uf_for_ctr');
14159: END IF;

Line 14158: AHL_DEBUG_PUB.debug ('End validate_uf_for_ctr');

14154: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') End Date' || p_x_forecast_details_tbl(i).end_date);
14155: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') Usage' || p_x_forecast_details_tbl(i).usage_per_day);
14156: END LOOP;
14157: END IF;
14158: AHL_DEBUG_PUB.debug ('End validate_uf_for_ctr');
14159: END IF;
14160:
14161: END validate_uf_for_ctr;
14162: --------------------------------------------------------------

Line 14240: AHL_DEBUG_PUB.Debug('Start Process Prior MR');

14236:
14237: BEGIN
14238:
14239: IF G_DEBUG = 'Y' THEN
14240: AHL_DEBUG_PUB.Debug('Start Process Prior MR');
14241: END IF;
14242:
14243: -- initialize - needed for preceding MR info.
14244: l_new_unit_effectivity_rec := p_new_unit_effectivity_rec;

Line 14378: AHL_DEBUG_PUB.Debug('End Process PriorMR');

14374: END IF;
14375:
14376:
14377: IF G_DEBUG = 'Y' THEN
14378: AHL_DEBUG_PUB.Debug('End Process PriorMR');
14379: END IF;
14380:
14381:
14382: END Process_Prior_MR_Version;

Line 14436: AHL_DEBUG_PUB.debug('Processing for..:' || G_config_node_tbl(i).csi_item_instance_id );

14432:
14433: IF G_config_node_tbl.COUNT > 0 THEN
14434: FOR i IN G_config_node_tbl.FIRST..G_config_node_tbl.LAST LOOP
14435: IF G_DEBUG = 'Y' THEN
14436: AHL_DEBUG_PUB.debug('Processing for..:' || G_config_node_tbl(i).csi_item_instance_id );
14437: END IF;
14438:
14439: OPEN get_mr_csr (G_config_node_tbl(i).csi_item_instance_id);
14440:

Line 14568: AHL_DEBUG_PUB.enable_debug;

14564: x_return_status := FND_API.G_RET_STS_SUCCESS;
14565:
14566: -- Enable Debug.
14567: IF G_DEBUG = 'Y' THEN
14568: AHL_DEBUG_PUB.enable_debug;
14569: END IF;
14570:
14571: -- Add debug mesg.
14572: IF G_DEBUG = 'Y' THEN

Line 14573: AHL_DEBUG_PUB.debug('Begin private API:' || G_PKG_NAME || '.' || 'Get_Cont_Ctr_Expiration_Date');

14569: END IF;
14570:
14571: -- Add debug mesg.
14572: IF G_DEBUG = 'Y' THEN
14573: AHL_DEBUG_PUB.debug('Begin private API:' || G_PKG_NAME || '.' || 'Get_Cont_Ctr_Expiration_Date');
14574: AHL_DEBUG_PUB.debug('Dump of input parameters:');
14575: AHL_DEBUG_PUB.debug('Item Instance ID:' || p_item_instance_id);
14576: AHL_DEBUG_PUB.debug('Count on p_x_warranty_counter_tbl:' || p_x_warranty_counter_tbl.COUNT);
14577: END IF;

Line 14574: AHL_DEBUG_PUB.debug('Dump of input parameters:');

14570:
14571: -- Add debug mesg.
14572: IF G_DEBUG = 'Y' THEN
14573: AHL_DEBUG_PUB.debug('Begin private API:' || G_PKG_NAME || '.' || 'Get_Cont_Ctr_Expiration_Date');
14574: AHL_DEBUG_PUB.debug('Dump of input parameters:');
14575: AHL_DEBUG_PUB.debug('Item Instance ID:' || p_item_instance_id);
14576: AHL_DEBUG_PUB.debug('Count on p_x_warranty_counter_tbl:' || p_x_warranty_counter_tbl.COUNT);
14577: END IF;
14578:

Line 14575: AHL_DEBUG_PUB.debug('Item Instance ID:' || p_item_instance_id);

14571: -- Add debug mesg.
14572: IF G_DEBUG = 'Y' THEN
14573: AHL_DEBUG_PUB.debug('Begin private API:' || G_PKG_NAME || '.' || 'Get_Cont_Ctr_Expiration_Date');
14574: AHL_DEBUG_PUB.debug('Dump of input parameters:');
14575: AHL_DEBUG_PUB.debug('Item Instance ID:' || p_item_instance_id);
14576: AHL_DEBUG_PUB.debug('Count on p_x_warranty_counter_tbl:' || p_x_warranty_counter_tbl.COUNT);
14577: END IF;
14578:
14579: -- Validate input parameters.

Line 14576: AHL_DEBUG_PUB.debug('Count on p_x_warranty_counter_tbl:' || p_x_warranty_counter_tbl.COUNT);

14572: IF G_DEBUG = 'Y' THEN
14573: AHL_DEBUG_PUB.debug('Begin private API:' || G_PKG_NAME || '.' || 'Get_Cont_Ctr_Expiration_Date');
14574: AHL_DEBUG_PUB.debug('Dump of input parameters:');
14575: AHL_DEBUG_PUB.debug('Item Instance ID:' || p_item_instance_id);
14576: AHL_DEBUG_PUB.debug('Count on p_x_warranty_counter_tbl:' || p_x_warranty_counter_tbl.COUNT);
14577: END IF;
14578:
14579: -- Validate input parameters.
14580: IF (p_item_instance_id IS NULL OR p_item_instance_id = FND_API.G_MISS_NUM) THEN

Line 14599: AHL_DEBUG_PUB.debug('Step 1');

14595: END IF;
14596:
14597:
14598: IF G_DEBUG = 'Y' THEN
14599: AHL_DEBUG_PUB.debug('Step 1');
14600: AHL_DEBUG_PUB.debug('Inventory Item ID:' || l_inventory_item_id);
14601: AHL_DEBUG_PUB.debug('INV master Org ID:' || l_inv_master_organization_id);
14602: END IF;
14603:

Line 14600: AHL_DEBUG_PUB.debug('Inventory Item ID:' || l_inventory_item_id);

14596:
14597:
14598: IF G_DEBUG = 'Y' THEN
14599: AHL_DEBUG_PUB.debug('Step 1');
14600: AHL_DEBUG_PUB.debug('Inventory Item ID:' || l_inventory_item_id);
14601: AHL_DEBUG_PUB.debug('INV master Org ID:' || l_inv_master_organization_id);
14602: END IF;
14603:
14604: -- Get Unit and Master Config IDs if available.

Line 14601: AHL_DEBUG_PUB.debug('INV master Org ID:' || l_inv_master_organization_id);

14597:
14598: IF G_DEBUG = 'Y' THEN
14599: AHL_DEBUG_PUB.debug('Step 1');
14600: AHL_DEBUG_PUB.debug('Inventory Item ID:' || l_inventory_item_id);
14601: AHL_DEBUG_PUB.debug('INV master Org ID:' || l_inv_master_organization_id);
14602: END IF;
14603:
14604: -- Get Unit and Master Config IDs if available.
14605: -- Find the root item instance.

Line 14626: AHL_DEBUG_PUB.debug('Count on util forecast tbl:' || G_forecast_details_tbl.count);

14622: l_inv_master_organization_id,
14623: G_forecast_details_tbl);
14624:
14625: IF G_DEBUG = 'Y' THEN
14626: AHL_DEBUG_PUB.debug('Count on util forecast tbl:' || G_forecast_details_tbl.count);
14627: END IF;
14628:
14629: -- Get the position installed in.
14630: OPEN csi_reln_csr(p_item_instance_id);

Line 14660: AHL_DEBUG_PUB.debug('Step 7');

14656: OPEN cs_ctr_counter_csr(p_x_warranty_counter_tbl(i).counter_id);
14657: FETCH cs_ctr_counter_csr INTO l_counter_value;
14658: IF (cs_ctr_counter_csr%NOTFOUND) THEN
14659: IF G_DEBUG = 'Y' THEN
14660: AHL_DEBUG_PUB.debug('Step 7');
14661: END IF;
14662: l_counter_value := 0;
14663: END IF;
14664:

Line 14668: AHL_DEBUG_PUB.debug('l_counter_value:' || l_counter_value);

14664:
14665: CLOSE cs_ctr_counter_csr;
14666:
14667: IF G_DEBUG = 'Y' THEN
14668: AHL_DEBUG_PUB.debug('l_counter_value:' || l_counter_value);
14669: END IF;
14670:
14671: -- Get due date for counter remain.
14672: l_counter_remain := p_x_warranty_counter_tbl(i).max_counter_value - l_counter_value;

Line 14675: AHL_DEBUG_PUB.debug('l_counter_remain:' || l_counter_remain);

14671: -- Get due date for counter remain.
14672: l_counter_remain := p_x_warranty_counter_tbl(i).max_counter_value - l_counter_value;
14673:
14674: IF G_DEBUG = 'Y' THEN
14675: AHL_DEBUG_PUB.debug('l_counter_remain:' || l_counter_remain);
14676: END IF;
14677:
14678: -- get date from forecast.
14679: get_date_from_uf(l_counter_remain,

Line 14694: AHL_DEBUG_PUB.debug('Table AHL_WARRANTY_CONT_CTR_B will be updated by Expiration Date ' || l_due_date || ' where WARRANTY_CNTRT_COUNTER_ID = '||p_x_warranty_counter_tbl(i).warranty_cntrt_counter_id);

14690: END IF;
14691: END IF;
14692:
14693: IF G_DEBUG = 'Y' THEN
14694: AHL_DEBUG_PUB.debug('Table AHL_WARRANTY_CONT_CTR_B will be updated by Expiration Date ' || l_due_date || ' where WARRANTY_CNTRT_COUNTER_ID = '||p_x_warranty_counter_tbl(i).warranty_cntrt_counter_id);
14695: END IF;
14696: p_x_warranty_counter_tbl(i).counter_expiration_date := l_due_date;
14697: END LOOP;
14698: END IF;

Line 14717: AHL_DEBUG_PUB.disable_debug;

14713: p_data => x_msg_data,
14714: p_encoded => fnd_api.g_false);
14715:
14716: -- Disable debug
14717: AHL_DEBUG_PUB.disable_debug;
14718:
14719: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
14720: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
14721: FND_MSG_PUB.count_and_get( p_count => x_msg_count,

Line 14726: AHL_DEBUG_PUB.disable_debug;

14722: p_data => x_msg_data,
14723: p_encoded => fnd_api.g_false);
14724:
14725: -- Disable debug
14726: AHL_DEBUG_PUB.disable_debug;
14727:
14728: WHEN OTHERS THEN
14729:
14730: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

Line 14742: AHL_DEBUG_PUB.disable_debug;

14738: p_encoded => fnd_api.g_false);
14739:
14740:
14741: -- Disable debug
14742: AHL_DEBUG_PUB.disable_debug;
14743:
14744: END Get_Cont_Ctr_Expiration_Date;
14745: -------------------------------------------------------
14746:

Line 14819: AHL_DEBUG_PUB.Debug('Start Process_Terminating_Parent_MRs');

14815: l_return_val BOOLEAN;
14816:
14817: BEGIN
14818: IF G_DEBUG = 'Y' THEN
14819: AHL_DEBUG_PUB.Debug('Start Process_Terminating_Parent_MRs');
14820: AHL_DEBUG_PUB.Debug('For applicable MR:CSI:' || p_applicable_mrs_rec.MR_header_id || ':' || p_applicable_mrs_rec.csi_item_instance_id);
14821: END IF;
14822: --dbms_output.put_line('Start Process_Terminating_Parent_MRs:' || p_applicable_mrs_rec.MR_header_id || ':' || p_applicable_mrs_rec.csi_item_instance_id);
14823:

Line 14820: AHL_DEBUG_PUB.Debug('For applicable MR:CSI:' || p_applicable_mrs_rec.MR_header_id || ':' || p_applicable_mrs_rec.csi_item_instance_id);

14816:
14817: BEGIN
14818: IF G_DEBUG = 'Y' THEN
14819: AHL_DEBUG_PUB.Debug('Start Process_Terminating_Parent_MRs');
14820: AHL_DEBUG_PUB.Debug('For applicable MR:CSI:' || p_applicable_mrs_rec.MR_header_id || ':' || p_applicable_mrs_rec.csi_item_instance_id);
14821: END IF;
14822: --dbms_output.put_line('Start Process_Terminating_Parent_MRs:' || p_applicable_mrs_rec.MR_header_id || ':' || p_applicable_mrs_rec.csi_item_instance_id);
14823:
14824: -- process parent MRs

Line 14830: AHL_DEBUG_PUB.Debug('Found applicable Terminating parent MR:CSI:' || l_appl_rec.MR_header_id || ':' || l_appl_rec.csi_item_instance_id);

14826: p_applicable_mrs_rec.csi_item_instance_id)
14827: LOOP
14828:
14829: IF G_DEBUG = 'Y' THEN
14830: AHL_DEBUG_PUB.Debug('Found applicable Terminating parent MR:CSI:' || l_appl_rec.MR_header_id || ':' || l_appl_rec.csi_item_instance_id);
14831: END IF;
14832: --dbms_output.put_line('Found applicable Terminating parent MR:CSI:' || l_appl_rec.MR_header_id || ':' || l_appl_rec.csi_item_instance_id || ':' || l_appl_rec.process_status_flag);
14833:
14834: l_due_date := null;

Line 14849: AHL_DEBUG_PUB.Debug('first accomplishment:due date:UEID:' || l_due_date || ':' || l_acc_unit_effectivity_id);

14845: l_acc_deferral_flag,
14846: l_acc_status_code,
14847: l_return_val);
14848: IF G_DEBUG = 'Y' THEN
14849: AHL_DEBUG_PUB.Debug('first accomplishment:due date:UEID:' || l_due_date || ':' || l_acc_unit_effectivity_id);
14850: --dbms_output.put_line('first accomplishment:due date:UEID:' || l_due_date || ':' || l_acc_unit_effectivity_id);
14851: END IF;
14852: END IF;
14853:

Line 14944: AHL_DEBUG_PUB.Debug('End Process_Terminating_Parent_MRs');

14940:
14941: -- dbms_output.put_line('term date:' || l_termination_date );
14942:
14943: IF G_DEBUG = 'Y' THEN
14944: AHL_DEBUG_PUB.Debug('End Process_Terminating_Parent_MRs');
14945: END IF;
14946:
14947: END Process_Terminating_Parent_MRs;
14948: --------------------------------------------------------------------

Line 15029: AHL_DEBUG_PUB.Debug('Start Process_Loop_Init:CSI:MR:' || p_applicable_mrs_rec.csi_item_instance_id || ':' || p_applicable_mrs_rec.mr_header_id);

15025: l_loop_last_counter_val_tbl counter_values_tbl_type;
15026:
15027: BEGIN
15028: IF G_DEBUG = 'Y' THEN
15029: AHL_DEBUG_PUB.Debug('Start Process_Loop_Init:CSI:MR:' || p_applicable_mrs_rec.csi_item_instance_id || ':' || p_applicable_mrs_rec.mr_header_id);
15030: END IF;
15031:
15032: -- get loop or chain MRs.
15033: OPEN get_lp_chain_mrs(p_applicable_mrs_rec.mr_header_id,

Line 15148: AHL_DEBUG_PUB.Debug('Start MR due date:' || x_loop_last_due_date);

15144: x_next_due_skip_flag := 'Y';
15145: x_loop_last_due_date := l_loop_last_due_date;
15146: x_loop_last_counter_val_tbl := l_loop_last_counter_val_tbl;
15147: IF G_DEBUG = 'Y' THEN
15148: AHL_DEBUG_PUB.Debug('Start MR due date:' || x_loop_last_due_date);
15149: IF (x_loop_last_counter_val_tbl.count > 0) THEN
15150: FOR i in x_loop_last_counter_val_tbl.FIRST..x_loop_last_counter_val_tbl.LAST LOOP
15151: AHL_DEBUG_PUB.Debug('i:'|| i|| ' value:' || x_loop_last_counter_val_tbl(i).counter_value || 'ID: ' || x_loop_last_counter_val_tbl(i).counter_id);
15152: END LOOP;

Line 15151: AHL_DEBUG_PUB.Debug('i:'|| i|| ' value:' || x_loop_last_counter_val_tbl(i).counter_value || 'ID: ' || x_loop_last_counter_val_tbl(i).counter_id);

15147: IF G_DEBUG = 'Y' THEN
15148: AHL_DEBUG_PUB.Debug('Start MR due date:' || x_loop_last_due_date);
15149: IF (x_loop_last_counter_val_tbl.count > 0) THEN
15150: FOR i in x_loop_last_counter_val_tbl.FIRST..x_loop_last_counter_val_tbl.LAST LOOP
15151: AHL_DEBUG_PUB.Debug('i:'|| i|| ' value:' || x_loop_last_counter_val_tbl(i).counter_value || 'ID: ' || x_loop_last_counter_val_tbl(i).counter_id);
15152: END LOOP;
15153: END IF;
15154: END IF;
15155: END IF;

Line 15159: AHL_DEBUG_PUB.Debug('End Process_Loop_Init');

15155: END IF;
15156:
15157:
15158: IF G_DEBUG = 'Y' THEN
15159: AHL_DEBUG_PUB.Debug('End Process_Loop_Init');
15160: END IF;
15161:
15162:
15163: END Process_Loop_Init;

Line 15374: AHL_DEBUG_PUB.Debug('Start Process_Chain_Init for MR:CSI:' || p_applicable_mrs_rec.mr_header_id || ':' || p_applicable_mrs_rec.csi_item_instance_id);

15370:
15371: BEGIN
15372:
15373: IF G_DEBUG = 'Y' THEN
15374: AHL_DEBUG_PUB.Debug('Start Process_Chain_Init for MR:CSI:' || p_applicable_mrs_rec.mr_header_id || ':' || p_applicable_mrs_rec.csi_item_instance_id);
15375: END IF;
15376:
15377: -- get loop or chain MRs.
15378: OPEN get_lp_chain_mrs(p_applicable_mrs_rec.mr_header_id,

Line 15419: AHL_DEBUG_PUB.Debug('In progress MRs:count:' || l_chain_start_lc_ue_tbl.count);

15415: FETCH get_inprogress_chain_MRs BULK COLLECT INTO l_chain_start_lc_ue_tbl, l_chain_seq_num_tbl;
15416: CLOSE get_inprogress_chain_MRs;
15417:
15418: IF G_DEBUG = 'Y' THEN
15419: AHL_DEBUG_PUB.Debug('In progress MRs:count:' || l_chain_start_lc_ue_tbl.count);
15420: END IF;
15421:
15422: IF (l_chain_start_lc_ue_tbl.count > 0) THEN
15423: FOR h IN l_chain_start_lc_ue_tbl.FIRST..l_chain_start_lc_ue_tbl.LAST LOOP

Line 15442: AHL_DEBUG_PUB.Debug('Chain UE:' || l_chain_ue_id || ':' || l_defer_from_ue_id || ':' || l_mr_header_id || ':' || l_mr_title);

15438: END IF;
15439: CLOSE get_chain_ue_csr;
15440:
15441: IF G_DEBUG = 'Y' THEN
15442: AHL_DEBUG_PUB.Debug('Chain UE:' || l_chain_ue_id || ':' || l_defer_from_ue_id || ':' || l_mr_header_id || ':' || l_mr_title);
15443: END IF;
15444:
15445: IF (l_loop_chain_MR_tbl.count <= l_chain_seq_num_tbl(h)) OR (l_loop_chain_MR_tbl(l_chain_seq_num_tbl(h)+1).mr_title <> l_mr_title) THEN
15446: IF (l_visit_status IN ('RELEASED','CLOSED')) THEN

Line 15587: AHL_DEBUG_PUB.Debug('Process_Chain_Init:UE:DueDate:End Date:' || l_start_ue_id_tbl(i) || ':' || l_start_due_date_tbl(i) || ':' || l_start_vst_end_tbl(i));

15583:
15584: END IF;
15585:
15586: IF G_DEBUG = 'Y' THEN
15587: AHL_DEBUG_PUB.Debug('Process_Chain_Init:UE:DueDate:End Date:' || l_start_ue_id_tbl(i) || ':' || l_start_due_date_tbl(i) || ':' || l_start_vst_end_tbl(i));
15588: END IF;
15589:
15590: -- calculate due date for following chain MRs.
15591: -- form input for Process_Loop_Chain_MRs

Line 15641: AHL_DEBUG_PUB.Debug('End Process_Chain_Init');

15637: END LOOP;
15638:
15639:
15640: IF G_DEBUG = 'Y' THEN
15641: AHL_DEBUG_PUB.Debug('End Process_Chain_Init');
15642: END IF;
15643:
15644: END Process_Chain_Init;
15645: -----------------------------------------------------------

Line 15723: AHL_DEBUG_PUB.Debug('Start Process_Loop_Chain_MRs');

15719:
15720: BEGIN
15721:
15722: IF G_DEBUG = 'Y' THEN
15723: AHL_DEBUG_PUB.Debug('Start Process_Loop_Chain_MRs');
15724: END IF;
15725:
15726: -- find the start point to process.
15727: l_loop_chain_seq_num := p_new_unit_effectivity_rec.loop_chain_seq_num;

Line 15767: AHL_DEBUG_PUB.Debug('Start MR due date:' || l_last_due_date);

15763: l_last_due_counter_val_tbl := l_due_at_counter_val_tbl;
15764: END IF;
15765:
15766: IF G_DEBUG = 'Y' THEN
15767: AHL_DEBUG_PUB.Debug('Start MR due date:' || l_last_due_date);
15768: IF (l_last_due_counter_val_tbl.COUNT) > 0 THEN
15769: FOR i in l_last_due_counter_val_tbl.FIRST..l_last_due_counter_val_tbl.LAST LOOP
15770: AHL_DEBUG_PUB.Debug('i:'|| i|| ' value:' || l_last_due_counter_val_tbl(i).counter_value || 'ID: ' || l_last_due_counter_val_tbl(i).counter_id);
15771: END LOOP;

Line 15770: AHL_DEBUG_PUB.Debug('i:'|| i|| ' value:' || l_last_due_counter_val_tbl(i).counter_value || 'ID: ' || l_last_due_counter_val_tbl(i).counter_id);

15766: IF G_DEBUG = 'Y' THEN
15767: AHL_DEBUG_PUB.Debug('Start MR due date:' || l_last_due_date);
15768: IF (l_last_due_counter_val_tbl.COUNT) > 0 THEN
15769: FOR i in l_last_due_counter_val_tbl.FIRST..l_last_due_counter_val_tbl.LAST LOOP
15770: AHL_DEBUG_PUB.Debug('i:'|| i|| ' value:' || l_last_due_counter_val_tbl(i).counter_value || 'ID: ' || l_last_due_counter_val_tbl(i).counter_id);
15771: END LOOP;
15772: END IF;
15773: END IF;
15774: --

Line 15850: AHL_DEBUG_PUB.Debug('Aft loop/chain calculate_due_date nextdue');

15846: p_mr_accomplish_exists => FALSE,
15847: x_next_due_date_rec => l_next_due_date_rec);
15848:
15849: IF G_DEBUG = 'Y' THEN
15850: AHL_DEBUG_PUB.Debug('Aft loop/chain calculate_due_date nextdue');
15851: AHL_DEBUG_PUB.Debug('loop/chain due date is ' || l_next_due_date_rec.DUE_DATE);
15852: AHL_DEBUG_PUB.Debug('loop/chain earliest due date is ' || l_next_due_date_rec.EARLIEST_DUE_DATE);
15853: AHL_DEBUG_PUB.Debug('loop/chain latest due date is ' || l_next_due_date_rec.latest_due_date);
15854: END IF;

Line 15851: AHL_DEBUG_PUB.Debug('loop/chain due date is ' || l_next_due_date_rec.DUE_DATE);

15847: x_next_due_date_rec => l_next_due_date_rec);
15848:
15849: IF G_DEBUG = 'Y' THEN
15850: AHL_DEBUG_PUB.Debug('Aft loop/chain calculate_due_date nextdue');
15851: AHL_DEBUG_PUB.Debug('loop/chain due date is ' || l_next_due_date_rec.DUE_DATE);
15852: AHL_DEBUG_PUB.Debug('loop/chain earliest due date is ' || l_next_due_date_rec.EARLIEST_DUE_DATE);
15853: AHL_DEBUG_PUB.Debug('loop/chain latest due date is ' || l_next_due_date_rec.latest_due_date);
15854: END IF;
15855:

Line 15852: AHL_DEBUG_PUB.Debug('loop/chain earliest due date is ' || l_next_due_date_rec.EARLIEST_DUE_DATE);

15848:
15849: IF G_DEBUG = 'Y' THEN
15850: AHL_DEBUG_PUB.Debug('Aft loop/chain calculate_due_date nextdue');
15851: AHL_DEBUG_PUB.Debug('loop/chain due date is ' || l_next_due_date_rec.DUE_DATE);
15852: AHL_DEBUG_PUB.Debug('loop/chain earliest due date is ' || l_next_due_date_rec.EARLIEST_DUE_DATE);
15853: AHL_DEBUG_PUB.Debug('loop/chain latest due date is ' || l_next_due_date_rec.latest_due_date);
15854: END IF;
15855:
15856: IF (l_next_due_date_rec.DUE_DATE IS NOT NULL) OR (p_new_unit_effectivity_rec.repetitive_mr_flag = 'N') THEN

Line 15853: AHL_DEBUG_PUB.Debug('loop/chain latest due date is ' || l_next_due_date_rec.latest_due_date);

15849: IF G_DEBUG = 'Y' THEN
15850: AHL_DEBUG_PUB.Debug('Aft loop/chain calculate_due_date nextdue');
15851: AHL_DEBUG_PUB.Debug('loop/chain due date is ' || l_next_due_date_rec.DUE_DATE);
15852: AHL_DEBUG_PUB.Debug('loop/chain earliest due date is ' || l_next_due_date_rec.EARLIEST_DUE_DATE);
15853: AHL_DEBUG_PUB.Debug('loop/chain latest due date is ' || l_next_due_date_rec.latest_due_date);
15854: END IF;
15855:
15856: IF (l_next_due_date_rec.DUE_DATE IS NOT NULL) OR (p_new_unit_effectivity_rec.repetitive_mr_flag = 'N') THEN
15857: -- Insert into temp table

Line 15912: AHL_DEBUG_PUB.Debug('AFter get_due_at_counter_values');

15908: l_last_due_date := l_due_date;
15909: l_last_due_counter_val_tbl := l_due_at_counter_val_tbl;
15910:
15911: IF G_DEBUG = 'Y' THEN
15912: AHL_DEBUG_PUB.Debug('AFter get_due_at_counter_values');
15913: AHL_DEBUG_PUB.Debug('l_last_due_date: '|| l_last_due_date);
15914: AHL_DEBUG_PUB.Debug('l_due_date: '|| l_due_date);
15915: IF (l_due_at_counter_val_tbl.COUNT) > 0 THEN
15916: for i in l_due_at_counter_val_tbl.FIRST..l_due_at_counter_val_tbl.LAST LOOP

Line 15913: AHL_DEBUG_PUB.Debug('l_last_due_date: '|| l_last_due_date);

15909: l_last_due_counter_val_tbl := l_due_at_counter_val_tbl;
15910:
15911: IF G_DEBUG = 'Y' THEN
15912: AHL_DEBUG_PUB.Debug('AFter get_due_at_counter_values');
15913: AHL_DEBUG_PUB.Debug('l_last_due_date: '|| l_last_due_date);
15914: AHL_DEBUG_PUB.Debug('l_due_date: '|| l_due_date);
15915: IF (l_due_at_counter_val_tbl.COUNT) > 0 THEN
15916: for i in l_due_at_counter_val_tbl.FIRST..l_due_at_counter_val_tbl.LAST LOOP
15917: AHL_DEBUG_PUB.Debug('i:'|| i|| ' value:' || l_due_at_counter_val_tbl(i).counter_value || 'ID: ' || l_due_at_counter_val_tbl(i).counter_id);

Line 15914: AHL_DEBUG_PUB.Debug('l_due_date: '|| l_due_date);

15910:
15911: IF G_DEBUG = 'Y' THEN
15912: AHL_DEBUG_PUB.Debug('AFter get_due_at_counter_values');
15913: AHL_DEBUG_PUB.Debug('l_last_due_date: '|| l_last_due_date);
15914: AHL_DEBUG_PUB.Debug('l_due_date: '|| l_due_date);
15915: IF (l_due_at_counter_val_tbl.COUNT) > 0 THEN
15916: for i in l_due_at_counter_val_tbl.FIRST..l_due_at_counter_val_tbl.LAST LOOP
15917: AHL_DEBUG_PUB.Debug('i:'|| i|| ' value:' || l_due_at_counter_val_tbl(i).counter_value || 'ID: ' || l_due_at_counter_val_tbl(i).counter_id);
15918: end loop;

Line 15917: AHL_DEBUG_PUB.Debug('i:'|| i|| ' value:' || l_due_at_counter_val_tbl(i).counter_value || 'ID: ' || l_due_at_counter_val_tbl(i).counter_id);

15913: AHL_DEBUG_PUB.Debug('l_last_due_date: '|| l_last_due_date);
15914: AHL_DEBUG_PUB.Debug('l_due_date: '|| l_due_date);
15915: IF (l_due_at_counter_val_tbl.COUNT) > 0 THEN
15916: for i in l_due_at_counter_val_tbl.FIRST..l_due_at_counter_val_tbl.LAST LOOP
15917: AHL_DEBUG_PUB.Debug('i:'|| i|| ' value:' || l_due_at_counter_val_tbl(i).counter_value || 'ID: ' || l_due_at_counter_val_tbl(i).counter_id);
15918: end loop;
15919: END IF;
15920: END IF;
15921:

Line 15941: AHL_DEBUG_PUB.Debug('End Process_Loop_Chain_MRs');

15937:
15938: END IF;
15939:
15940: IF G_DEBUG = 'Y' THEN
15941: AHL_DEBUG_PUB.Debug('End Process_Loop_Chain_MRs');
15942: END IF;
15943:
15944: END Process_Loop_Chain_MRs;
15945: --------------------------------------

Line 16027: AHL_DEBUG_PUB.Debug('l_deferral_due_date: ' || p_last_accomplishment_date);

16023: x_due_at_counter_val_tbl => l_last_acc_counter_val_tbl,
16024: x_return_value => l_return_val);
16025:
16026: IF G_DEBUG = 'Y' THEN
16027: AHL_DEBUG_PUB.Debug('l_deferral_due_date: ' || p_last_accomplishment_date);
16028: IF (l_last_acc_counter_val_tbl.COUNT) > 0 THEN
16029: for i in l_last_acc_counter_val_tbl.FIRST..l_last_acc_counter_val_tbl.LAST LOOP
16030: AHL_DEBUG_PUB.Debug('i:'|| i|| ' value:' || l_last_acc_counter_val_tbl(i).counter_value || 'ID: ' || l_last_acc_counter_val_tbl(i).counter_id);
16031: end loop;

Line 16030: AHL_DEBUG_PUB.Debug('i:'|| i|| ' value:' || l_last_acc_counter_val_tbl(i).counter_value || 'ID: ' || l_last_acc_counter_val_tbl(i).counter_id);

16026: IF G_DEBUG = 'Y' THEN
16027: AHL_DEBUG_PUB.Debug('l_deferral_due_date: ' || p_last_accomplishment_date);
16028: IF (l_last_acc_counter_val_tbl.COUNT) > 0 THEN
16029: for i in l_last_acc_counter_val_tbl.FIRST..l_last_acc_counter_val_tbl.LAST LOOP
16030: AHL_DEBUG_PUB.Debug('i:'|| i|| ' value:' || l_last_acc_counter_val_tbl(i).counter_value || 'ID: ' || l_last_acc_counter_val_tbl(i).counter_id);
16031: end loop;
16032: END IF;
16033: END IF;
16034:

Line 16137: AHL_DEBUG_PUB.enable_debug;

16133: x_return_status := FND_API.G_RET_STS_SUCCESS;
16134:
16135: -- Enable Debug.
16136: IF G_DEBUG = 'Y' THEN
16137: AHL_DEBUG_PUB.enable_debug;
16138: END IF;
16139:
16140: -- Add debug mesg.
16141: IF G_DEBUG = 'Y' THEN

Line 16142: AHL_DEBUG_PUB.debug('At start of procedure:' || G_PKG_NAME || '.' || 'Calculate_Init_DueDate');

16138: END IF;
16139:
16140: -- Add debug mesg.
16141: IF G_DEBUG = 'Y' THEN
16142: AHL_DEBUG_PUB.debug('At start of procedure:' || G_PKG_NAME || '.' || 'Calculate_Init_DueDate');
16143: AHL_DEBUG_PUB.debug('Dump of input parameters:');
16144: AHL_DEBUG_PUB.debug('Unit Effectivity ID:' || p_unit_effectivity_id);
16145: END IF;
16146:

Line 16143: AHL_DEBUG_PUB.debug('Dump of input parameters:');

16139:
16140: -- Add debug mesg.
16141: IF G_DEBUG = 'Y' THEN
16142: AHL_DEBUG_PUB.debug('At start of procedure:' || G_PKG_NAME || '.' || 'Calculate_Init_DueDate');
16143: AHL_DEBUG_PUB.debug('Dump of input parameters:');
16144: AHL_DEBUG_PUB.debug('Unit Effectivity ID:' || p_unit_effectivity_id);
16145: END IF;
16146:
16147: -- Validate input parameters.

Line 16144: AHL_DEBUG_PUB.debug('Unit Effectivity ID:' || p_unit_effectivity_id);

16140: -- Add debug mesg.
16141: IF G_DEBUG = 'Y' THEN
16142: AHL_DEBUG_PUB.debug('At start of procedure:' || G_PKG_NAME || '.' || 'Calculate_Init_DueDate');
16143: AHL_DEBUG_PUB.debug('Dump of input parameters:');
16144: AHL_DEBUG_PUB.debug('Unit Effectivity ID:' || p_unit_effectivity_id);
16145: END IF;
16146:
16147: -- Validate input parameters.
16148: IF (p_unit_effectivity_id IS NULL OR p_unit_effectivity_id = FND_API.G_MISS_NUM) THEN

Line 16155: AHL_DEBUG_PUB.debug('Before call to Calculate_NR_due_date');

16151: RAISE FND_API.G_EXC_ERROR;
16152: END IF;
16153:
16154: IF G_DEBUG = 'Y' THEN
16155: AHL_DEBUG_PUB.debug('Before call to Calculate_NR_due_date');
16156: END IF;
16157:
16158: Calculate_NR_due_date(p_unit_effectivity_id, l_due_date, l_due_counter_value, l_counter_id);
16159: x_due_date := l_due_date;

Line 16162: AHL_DEBUG_PUB.debug('After call to Calculate_NR_due_date');

16158: Calculate_NR_due_date(p_unit_effectivity_id, l_due_date, l_due_counter_value, l_counter_id);
16159: x_due_date := l_due_date;
16160:
16161: IF G_DEBUG = 'Y' THEN
16162: AHL_DEBUG_PUB.debug('After call to Calculate_NR_due_date');
16163: END IF;
16164:
16165:
16166: IF (l_due_counter_value IS NOT NULL OR l_due_date IS NOT NULL) THEN

Line 16169: AHL_DEBUG_PUB.debug('Before updating UE table:UE:DDT:DCV:CTR_ID:' || p_unit_effectivity_id || ':' || l_due_date || ':' || l_due_counter_value || ':' || l_counter_id);

16165:
16166: IF (l_due_counter_value IS NOT NULL OR l_due_date IS NOT NULL) THEN
16167:
16168: IF G_DEBUG = 'Y' THEN
16169: AHL_DEBUG_PUB.debug('Before updating UE table:UE:DDT:DCV:CTR_ID:' || p_unit_effectivity_id || ':' || l_due_date || ':' || l_due_counter_value || ':' || l_counter_id);
16170: END IF;
16171:
16172: -- Update table.
16173: UPDATE ahl_unit_effectivities_b

Line 16309: AHL_DEBUG_PUB.debug('Step 1');

16305: RAISE FND_API.G_EXC_ERROR;
16306: END IF;
16307:
16308: IF G_DEBUG = 'Y' THEN
16309: AHL_DEBUG_PUB.debug('Step 1');
16310: AHL_DEBUG_PUB.debug('CSI Item Instance ID:' || l_csi_item_instance_id);
16311: AHL_DEBUG_PUB.debug('Inventory Item ID:' || l_inventory_item_id);
16312: AHL_DEBUG_PUB.debug('INV master Org ID:' || l_inv_master_organization_id);
16313: END IF;

Line 16310: AHL_DEBUG_PUB.debug('CSI Item Instance ID:' || l_csi_item_instance_id);

16306: END IF;
16307:
16308: IF G_DEBUG = 'Y' THEN
16309: AHL_DEBUG_PUB.debug('Step 1');
16310: AHL_DEBUG_PUB.debug('CSI Item Instance ID:' || l_csi_item_instance_id);
16311: AHL_DEBUG_PUB.debug('Inventory Item ID:' || l_inventory_item_id);
16312: AHL_DEBUG_PUB.debug('INV master Org ID:' || l_inv_master_organization_id);
16313: END IF;
16314:

Line 16311: AHL_DEBUG_PUB.debug('Inventory Item ID:' || l_inventory_item_id);

16307:
16308: IF G_DEBUG = 'Y' THEN
16309: AHL_DEBUG_PUB.debug('Step 1');
16310: AHL_DEBUG_PUB.debug('CSI Item Instance ID:' || l_csi_item_instance_id);
16311: AHL_DEBUG_PUB.debug('Inventory Item ID:' || l_inventory_item_id);
16312: AHL_DEBUG_PUB.debug('INV master Org ID:' || l_inv_master_organization_id);
16313: END IF;
16314:
16315: -- Get Unit and Master Config IDs if available.

Line 16312: AHL_DEBUG_PUB.debug('INV master Org ID:' || l_inv_master_organization_id);

16308: IF G_DEBUG = 'Y' THEN
16309: AHL_DEBUG_PUB.debug('Step 1');
16310: AHL_DEBUG_PUB.debug('CSI Item Instance ID:' || l_csi_item_instance_id);
16311: AHL_DEBUG_PUB.debug('Inventory Item ID:' || l_inventory_item_id);
16312: AHL_DEBUG_PUB.debug('INV master Org ID:' || l_inv_master_organization_id);
16313: END IF;
16314:
16315: -- Get Unit and Master Config IDs if available.
16316: -- Find the root item instance.

Line 16324: AHL_DEBUG_PUB.debug('Step 2: ROOT CSI: UCH: MCH:' || l_root_csi_instance_id || ':' || l_uc_header_id || ':' || G_master_config_id);

16320: Get_Unit_Master_ConfigIDs (l_root_csi_instance_id,
16321: l_uc_header_id, G_master_config_id);
16322:
16323: IF G_DEBUG = 'Y' THEN
16324: AHL_DEBUG_PUB.debug('Step 2: ROOT CSI: UCH: MCH:' || l_root_csi_instance_id || ':' || l_uc_header_id || ':' || G_master_config_id);
16325: END IF;
16326:
16327: -- Check for errors.
16328: IF FND_MSG_PUB.Count_msg > 0 THEN

Line 16333: AHL_DEBUG_PUB.debug('Step 3');

16329: RAISE FND_API.G_EXC_ERROR;
16330: END IF;
16331:
16332: IF G_DEBUG = 'Y' THEN
16333: AHL_DEBUG_PUB.debug('Step 3');
16334: END IF;
16335:
16336: -- Get utilization forecast for the unit/part.
16337: Get_Utilization_Forecast (l_root_csi_instance_id,

Line 16344: AHL_DEBUG_PUB.debug('Step 4');

16340: l_inv_master_organization_id,
16341: G_forecast_details_tbl);
16342:
16343: IF G_DEBUG = 'Y' THEN
16344: AHL_DEBUG_PUB.debug('Step 4');
16345: AHL_DEBUG_PUB.debug('Count on util forecast tbl:' || G_forecast_details_tbl.count);
16346: END IF;
16347:
16348: -- Get the position installed in.

Line 16345: AHL_DEBUG_PUB.debug('Count on util forecast tbl:' || G_forecast_details_tbl.count);

16341: G_forecast_details_tbl);
16342:
16343: IF G_DEBUG = 'Y' THEN
16344: AHL_DEBUG_PUB.debug('Step 4');
16345: AHL_DEBUG_PUB.debug('Count on util forecast tbl:' || G_forecast_details_tbl.count);
16346: END IF;
16347:
16348: -- Get the position installed in.
16349: OPEN csi_reln_csr(l_csi_item_instance_id);

Line 16357: AHL_DEBUG_PUB.debug('Step 5');

16353: END IF;
16354: CLOSE csi_reln_csr;
16355:
16356: IF G_DEBUG = 'Y' THEN
16357: AHL_DEBUG_PUB.debug('Step 5');
16358: END IF;
16359:
16360: -- Build counter rules ratio if node is not root node.
16361: IF (G_master_config_id IS NOT NULL AND l_position_reference IS NOT NULL) THEN

Line 16369: AHL_DEBUG_PUB.debug('Step 6');

16365: l_counter_rules_tbl);
16366: END IF;
16367:
16368: IF G_DEBUG = 'Y' THEN
16369: AHL_DEBUG_PUB.debug('Step 6');
16370: END IF;
16371:
16372:
16373: -- read thresholds table.

Line 16385: AHL_DEBUG_PUB.debug('Step 7');

16381: OPEN cs_ctr_counter_csr(unit_threshold_rec.counter_id);
16382: FETCH cs_ctr_counter_csr INTO l_current_ctr_value;
16383: IF (cs_ctr_counter_csr%NOTFOUND) THEN
16384: IF G_DEBUG = 'Y' THEN
16385: AHL_DEBUG_PUB.debug('Step 7');
16386: END IF;
16387: l_current_ctr_value := 0;
16388: END IF;
16389:

Line 16393: AHL_DEBUG_PUB.debug('l_current_ctr_value:' || l_current_ctr_value);

16389:
16390: CLOSE cs_ctr_counter_csr;
16391:
16392: IF G_DEBUG = 'Y' THEN
16393: AHL_DEBUG_PUB.debug('l_current_ctr_value:' || l_current_ctr_value);
16394: END IF;
16395:
16396: l_due_at_counter_value := unit_threshold_rec.counter_value;
16397: l_counter_remain := l_due_at_counter_value - l_current_ctr_value;