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.26.12010000.2 2008/12/27 01:48:48 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 581: AHL_DEBUG_PUB.enable_debug;

577: x_return_status := FND_API.G_RET_STS_SUCCESS;
578:
579: -- Enable Debug.
580: IF G_DEBUG = 'Y' THEN
581: AHL_DEBUG_PUB.enable_debug;
582: END IF;
583:
584: -- Add debug mesg.
585: IF G_DEBUG = 'Y' THEN

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

582: END IF;
583:
584: -- Add debug mesg.
585: IF G_DEBUG = 'Y' THEN
586: AHL_DEBUG_PUB.debug('Begin private API:' || G_PKG_NAME || '.' || 'ProcessUnit');
587:
588: -- Dump input parameters.
589: AHL_DEBUG_PUB.debug(' Csi Item instance ID:' || p_csi_item_instance_id);
590: AHL_DEBUG_PUB.debug(' p_concurrent_flag:' || p_concurrent_flag );

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

585: IF G_DEBUG = 'Y' THEN
586: AHL_DEBUG_PUB.debug('Begin private API:' || G_PKG_NAME || '.' || 'ProcessUnit');
587:
588: -- Dump input parameters.
589: AHL_DEBUG_PUB.debug(' Csi Item instance ID:' || p_csi_item_instance_id);
590: AHL_DEBUG_PUB.debug(' p_concurrent_flag:' || p_concurrent_flag );
591: AHL_DEBUG_PUB.debug(' p_commit:' || p_commit);
592:
593: END IF;

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

586: AHL_DEBUG_PUB.debug('Begin private API:' || G_PKG_NAME || '.' || 'ProcessUnit');
587:
588: -- Dump input parameters.
589: AHL_DEBUG_PUB.debug(' Csi Item instance ID:' || p_csi_item_instance_id);
590: AHL_DEBUG_PUB.debug(' p_concurrent_flag:' || p_concurrent_flag );
591: AHL_DEBUG_PUB.debug(' p_commit:' || p_commit);
592:
593: END IF;
594:

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

587:
588: -- Dump input parameters.
589: AHL_DEBUG_PUB.debug(' Csi Item instance ID:' || p_csi_item_instance_id);
590: AHL_DEBUG_PUB.debug(' p_concurrent_flag:' || p_concurrent_flag );
591: AHL_DEBUG_PUB.debug(' p_commit:' || p_commit);
592:
593: END IF;
594:
595: G_concurrent_flag := p_concurrent_flag;

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

649: END IF; -- pm_install check
650:
651: -- Add debug mesg.
652: IF G_DEBUG = 'Y' THEN
653: AHL_DEBUG_PUB.debug(' Count on Config Node Tbl:' || G_config_node_tbl.COUNT);
654: AHL_DEBUG_PUB.debug(' Root Node:' || l_csi_item_instance_id );
655: AHL_DEBUG_PUB.debug(' Unit Config ID:' || l_uc_header_id);
656: AHL_DEBUG_PUB.debug(' Master Config ID:' || G_master_config_id);
657: END IF;

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

650:
651: -- Add debug mesg.
652: IF G_DEBUG = 'Y' THEN
653: AHL_DEBUG_PUB.debug(' Count on Config Node Tbl:' || G_config_node_tbl.COUNT);
654: AHL_DEBUG_PUB.debug(' Root Node:' || l_csi_item_instance_id );
655: AHL_DEBUG_PUB.debug(' Unit Config ID:' || l_uc_header_id);
656: AHL_DEBUG_PUB.debug(' Master Config ID:' || G_master_config_id);
657: END IF;
658:

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

651: -- Add debug mesg.
652: IF G_DEBUG = 'Y' THEN
653: AHL_DEBUG_PUB.debug(' Count on Config Node Tbl:' || G_config_node_tbl.COUNT);
654: AHL_DEBUG_PUB.debug(' Root Node:' || l_csi_item_instance_id );
655: AHL_DEBUG_PUB.debug(' Unit Config ID:' || l_uc_header_id);
656: AHL_DEBUG_PUB.debug(' Master Config ID:' || G_master_config_id);
657: END IF;
658:
659: -- Get rolling window end date.

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

652: IF G_DEBUG = 'Y' THEN
653: AHL_DEBUG_PUB.debug(' Count on Config Node Tbl:' || G_config_node_tbl.COUNT);
654: AHL_DEBUG_PUB.debug(' Root Node:' || l_csi_item_instance_id );
655: AHL_DEBUG_PUB.debug(' Unit Config ID:' || l_uc_header_id);
656: AHL_DEBUG_PUB.debug(' Master Config ID:' || G_master_config_id);
657: END IF;
658:
659: -- Get rolling window end date.
660: G_last_day_of_window := Get_Rolling_Window_Date;

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

663: IF (G_IS_PM_INSTALLED = 'N') THEN
664: -- Only for AHL installation.
665:
666: IF G_DEBUG = 'Y' THEN
667: AHL_DEBUG_PUB.debug('AHL Installation processing');
668: END IF;
669:
670: -- Call FMP api to build applicable MRs for the unit.
671: AHL_UMP_UTIL_PKG.Populate_Appl_MRs ( p_csi_ii_id => l_csi_item_instance_id,

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

685: AHL_UMP_UTIL_PKG.Process_Group_MRs;
686:
687: ELSE -- for PM installation.
688: IF G_DEBUG = 'Y' THEN
689: AHL_DEBUG_PUB.debug('PM Installation processing');
690: END IF;
691:
692: -- Call FMP-PM api to build applicable MRs for an instance.
693: PopulatePM_Appl_MRs (p_csi_ii_id => l_csi_item_instance_id,

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

704:
705: END IF; -- pm_install check.
706:
707: IF G_DEBUG = 'Y' THEN
708: AHL_DEBUG_PUB.debug('After calling FMP API and process group MRs');
709: END IF;
710:
711: -- Read applicable utilization forecast for the configuration.
712: Get_Utilization_Forecast (l_csi_item_instance_id,

Line 817: AHL_DEBUG_PUB.disable_debug;

813: log_error_messages;
814: END IF;
815:
816: -- Disable debug
817: AHL_DEBUG_PUB.disable_debug;
818:
819: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
820: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
821: Rollback to Process_Unit_PVT;

Line 832: AHL_DEBUG_PUB.disable_debug;

828: log_error_messages;
829: END IF;
830:
831: -- Disable debug
832: AHL_DEBUG_PUB.disable_debug;
833:
834: WHEN OTHERS THEN
835:
836: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

Line 854: AHL_DEBUG_PUB.disable_debug;

850: log_error_messages;
851: END IF;
852:
853: -- Disable debug
854: AHL_DEBUG_PUB.disable_debug;
855:
856: END Process_Unit;
857:
858: -------------------------------------------------------------------------------

Line 906: AHL_DEBUG_PUB.enable_debug;

902: x_return_status := FND_API.G_RET_STS_SUCCESS;
903:
904: -- Enable Debug.
905: IF G_DEBUG = 'Y' THEN
906: AHL_DEBUG_PUB.enable_debug;
907: END IF;
908:
909: -- Add debug mesg.
910: IF G_DEBUG = 'Y' THEN

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

907: END IF;
908:
909: -- Add debug mesg.
910: IF G_DEBUG = 'Y' THEN
911: AHL_DEBUG_PUB.debug('Begin private API:' || G_PKG_NAME || '.' || 'Process_MRAffected_Units');
912: AHL_DEBUG_PUB.debug('Application Usage Profile:' || fnd_profile.value('AHL_APPLN_USAGE'));
913: END IF;
914:
915: IF (p_concurrent_flag = 'Y') THEN

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

908:
909: -- Add debug mesg.
910: IF G_DEBUG = 'Y' THEN
911: AHL_DEBUG_PUB.debug('Begin private API:' || G_PKG_NAME || '.' || 'Process_MRAffected_Units');
912: AHL_DEBUG_PUB.debug('Application Usage Profile:' || fnd_profile.value('AHL_APPLN_USAGE'));
913: END IF;
914:
915: IF (p_concurrent_flag = 'Y') THEN
916: l_commit := FND_API.G_TRUE;

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

975: FOR i IN 1..l_num_of_workers LOOP
976: l_req_id := fnd_request.submit_request('AHL','AHLWUEFF',NULL,NULL,FALSE, l_conc_request_id);
977: IF (l_req_id = 0 OR l_req_id IS NULL) THEN
978: IF G_debug = 'Y' THEN
979: AHL_DEBUG_PUB.debug('Tried to submit concurrent request but failed');
980: END IF;
981: fnd_file.put_line(FND_FILE.LOG, 'Failed submit concurrent request');
982: fnd_file.new_line(FND_FILE.LOG,1);
983: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

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

985:
986: ELSE
987: fnd_file.put_line(FND_FILE.LOG, 'Concurrent request ID:' || l_req_id);
988: IF G_debug = 'Y' THEN
989: AHL_DEBUG_PUB.debug('Concurrent request ID:' || l_req_id );
990: END IF;
991: END IF; -- l_req_id = 0 OR ..
992:
993: END LOOP;

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

1014:
1015: EXIT WHEN (l_instance_id IS NULL);
1016:
1017: IF G_DEBUG = 'Y' THEN
1018: AHL_DEBUG_PUB.debug('Now processing..:' || l_instance_id);
1019: END IF;
1020:
1021: -- Call Process Unit for the item instance.
1022: Process_Unit (

Line 1118: AHL_DEBUG_PUB.enable_debug;

1114: x_return_status := FND_API.G_RET_STS_SUCCESS;
1115:
1116: -- Enable Debug.
1117: IF G_DEBUG = 'Y' THEN
1118: AHL_DEBUG_PUB.enable_debug;
1119: END IF;
1120:
1121: -- Add debug mesg.
1122: IF G_DEBUG = 'Y' THEN

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

1119: END IF;
1120:
1121: -- Add debug mesg.
1122: IF G_DEBUG = 'Y' THEN
1123: AHL_DEBUG_PUB.debug('Begin private API:' || G_PKG_NAME || '.' || 'Process_PM_Contracts');
1124: -- Dump input parameters.
1125: AHL_DEBUG_PUB.debug('Contract Number:' || p_contract_number );
1126: AHL_DEBUG_PUB.debug('Contract Modifier:' || p_contract_modifier );
1127: AHL_DEBUG_PUB.debug('p_concurrent_flag:' || p_concurrent_flag );

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

1121: -- Add debug mesg.
1122: IF G_DEBUG = 'Y' THEN
1123: AHL_DEBUG_PUB.debug('Begin private API:' || G_PKG_NAME || '.' || 'Process_PM_Contracts');
1124: -- Dump input parameters.
1125: AHL_DEBUG_PUB.debug('Contract Number:' || p_contract_number );
1126: AHL_DEBUG_PUB.debug('Contract Modifier:' || p_contract_modifier );
1127: AHL_DEBUG_PUB.debug('p_concurrent_flag:' || p_concurrent_flag );
1128: AHL_DEBUG_PUB.debug('p_commit:' || p_commit );
1129: END IF;

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

1122: IF G_DEBUG = 'Y' THEN
1123: AHL_DEBUG_PUB.debug('Begin private API:' || G_PKG_NAME || '.' || 'Process_PM_Contracts');
1124: -- Dump input parameters.
1125: AHL_DEBUG_PUB.debug('Contract Number:' || p_contract_number );
1126: AHL_DEBUG_PUB.debug('Contract Modifier:' || p_contract_modifier );
1127: AHL_DEBUG_PUB.debug('p_concurrent_flag:' || p_concurrent_flag );
1128: AHL_DEBUG_PUB.debug('p_commit:' || p_commit );
1129: END IF;
1130:

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

1123: AHL_DEBUG_PUB.debug('Begin private API:' || G_PKG_NAME || '.' || 'Process_PM_Contracts');
1124: -- Dump input parameters.
1125: AHL_DEBUG_PUB.debug('Contract Number:' || p_contract_number );
1126: AHL_DEBUG_PUB.debug('Contract Modifier:' || p_contract_modifier );
1127: AHL_DEBUG_PUB.debug('p_concurrent_flag:' || p_concurrent_flag );
1128: AHL_DEBUG_PUB.debug('p_commit:' || p_commit );
1129: END IF;
1130:
1131: IF (p_concurrent_flag = 'Y') THEN

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

1124: -- Dump input parameters.
1125: AHL_DEBUG_PUB.debug('Contract Number:' || p_contract_number );
1126: AHL_DEBUG_PUB.debug('Contract Modifier:' || p_contract_modifier );
1127: AHL_DEBUG_PUB.debug('p_concurrent_flag:' || p_concurrent_flag );
1128: AHL_DEBUG_PUB.debug('p_commit:' || p_commit );
1129: END IF;
1130:
1131: IF (p_concurrent_flag = 'Y') THEN
1132: fnd_file.put_line(fnd_file.log, 'Starting processing for contract Number '|| p_contract_number || ' and contract modifier' || p_contract_modifier);

Line 1244: AHL_DEBUG_PUB.disable_debug;

1240: IF (p_concurrent_flag = 'Y') THEN
1241: fnd_file.put_line(fnd_file.log, 'Process_PM_Contracts failed for: contract Number '|| p_contract_number || ' and contract modifier' || p_contract_modifier);
1242: log_error_messages;
1243: END IF;
1244: AHL_DEBUG_PUB.disable_debug;
1245:
1246: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1247: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1248: Rollback to Process_PM_Contracts_PVT;

Line 1259: AHL_DEBUG_PUB.disable_debug;

1255: IF (p_concurrent_flag = 'Y') THEN
1256: fnd_file.put_line(fnd_file.log, 'Process_PM_Contracts failed for: contract Number '|| p_contract_number || ' and contract modifier' || p_contract_modifier);
1257: log_error_messages;
1258: END IF;
1259: AHL_DEBUG_PUB.disable_debug;
1260:
1261: WHEN OTHERS THEN
1262: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1263: Rollback to Process_PM_Contracts_PVT;

Line 1282: AHL_DEBUG_PUB.disable_debug;

1278: IF (p_concurrent_flag = 'Y') THEN
1279: fnd_file.put_line(fnd_file.log, 'Process_PM_Contracts failed for: contract Number '|| p_contract_number || ' and contract modifier' || p_contract_modifier);
1280: log_error_messages;
1281: END IF;
1282: AHL_DEBUG_PUB.disable_debug;
1283: END Process_PM_Contracts;
1284: -- Tamal: Bug #4207212, #4114368: End
1285:
1286: ------------------------------------------------------------------------------

Line 1337: AHL_DEBUG_PUB.enable_debug;

1333:
1334: -- Enable Debug.
1335: -- Add api start debug mesg.
1336: IF G_DEBUG = 'Y' THEN
1337: AHL_DEBUG_PUB.enable_debug;
1338: AHL_DEBUG_PUB.debug('Begin private API:' || G_PKG_NAME || '.' || 'Process_All_Units');
1339: END IF;
1340:
1341: -- For concurrent program.

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

1334: -- Enable Debug.
1335: -- Add api start debug mesg.
1336: IF G_DEBUG = 'Y' THEN
1337: AHL_DEBUG_PUB.enable_debug;
1338: AHL_DEBUG_PUB.debug('Begin private API:' || G_PKG_NAME || '.' || 'Process_All_Units');
1339: END IF;
1340:
1341: -- For concurrent program.
1342: IF (p_concurrent_flag = 'Y') THEN

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

1393:
1394: BEGIN
1395:
1396: IF G_DEBUG = 'Y' THEN
1397: AHL_DEBUG_PUB.debug('Start Validate Item Instance');
1398: END IF;
1399:
1400: -- Validate csi_item_instance_id.
1401: IF (p_csi_item_instance_id IS NOT NULL) THEN

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

1422: x_inventory_item_id := l_inventory_item_id;
1423: x_inv_master_organization_id := l_inv_master_organization_id;
1424:
1425: IF G_DEBUG = 'Y' THEN
1426: AHL_DEBUG_PUB.debug('End Validate Item Instance');
1427: END IF;
1428:
1429: END Validate_Item_Instance;
1430:

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

1455:
1456: BEGIN
1457:
1458: IF G_DEBUG = 'Y' THEN
1459: AHL_DEBUG_PUB.debug('Start Get_Unit_Master_ConfigIDs');
1460: END IF;
1461:
1462: x_uc_header_id := null;
1463: x_master_config_id := null;

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

1488: fnd_file.put_line (FND_FILE.LOG, 'Unit Config Name:' || l_name);
1489: END IF;
1490:
1491: IF G_DEBUG = 'Y' THEN
1492: AHL_DEBUG_PUB.debug('Unit Config ID:' || x_uc_header_id);
1493: AHL_DEBUG_PUB.debug('Master Config ID:' || x_master_config_id);
1494: AHL_DEBUG_PUB.debug('End Get_Unit_Master_ConfigIDs');
1495: END IF;
1496:

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

1489: END IF;
1490:
1491: IF G_DEBUG = 'Y' THEN
1492: AHL_DEBUG_PUB.debug('Unit Config ID:' || x_uc_header_id);
1493: AHL_DEBUG_PUB.debug('Master Config ID:' || x_master_config_id);
1494: AHL_DEBUG_PUB.debug('End Get_Unit_Master_ConfigIDs');
1495: END IF;
1496:
1497: END Get_Unit_Master_ConfigIDs;

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

1490:
1491: IF G_DEBUG = 'Y' THEN
1492: AHL_DEBUG_PUB.debug('Unit Config ID:' || x_uc_header_id);
1493: AHL_DEBUG_PUB.debug('Master Config ID:' || x_master_config_id);
1494: AHL_DEBUG_PUB.debug('End Get_Unit_Master_ConfigIDs');
1495: END IF;
1496:
1497: END Get_Unit_Master_ConfigIDs;
1498:

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

1572:
1573: BEGIN
1574:
1575: IF G_DEBUG = 'Y' THEN
1576: AHL_DEBUG_PUB.debug('Start Build_Config_Tree');
1577: END IF;
1578:
1579: -- For top node.
1580: l_config_node_tbl(1).csi_item_instance_id := p_csi_root_instance_id;

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

1621:
1622: X_CONFIG_NODE_TBL := l_config_node_tbl;
1623:
1624: IF G_DEBUG = 'Y' THEN
1625: AHL_DEBUG_PUB.debug('End Build_Config_Tree');
1626: AHL_DEBUG_PUB.debug('Count on config' || x_config_node_tbl.COUNT);
1627: END IF;
1628:
1629: END Build_Config_Tree;

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

1622: X_CONFIG_NODE_TBL := l_config_node_tbl;
1623:
1624: IF G_DEBUG = 'Y' THEN
1625: AHL_DEBUG_PUB.debug('End Build_Config_Tree');
1626: AHL_DEBUG_PUB.debug('Count on config' || x_config_node_tbl.COUNT);
1627: END IF;
1628:
1629: END Build_Config_Tree;
1630:

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

1659: END IF;
1660:
1661: -- Add debug mesg.
1662: IF G_DEBUG = 'Y' THEN
1663: AHL_DEBUG_PUB.debug('last day of window' || l_last_day_of_window);
1664: AHL_DEBUG_PUB.debug('profile uom:' || l_date_uom);
1665: AHL_DEBUG_PUB.debug('profile value:' || l_value);
1666: END IF;
1667:

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

1660:
1661: -- Add debug mesg.
1662: IF G_DEBUG = 'Y' THEN
1663: AHL_DEBUG_PUB.debug('last day of window' || l_last_day_of_window);
1664: AHL_DEBUG_PUB.debug('profile uom:' || l_date_uom);
1665: AHL_DEBUG_PUB.debug('profile value:' || l_value);
1666: END IF;
1667:
1668: EXCEPTION

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

1661: -- Add debug mesg.
1662: IF G_DEBUG = 'Y' THEN
1663: AHL_DEBUG_PUB.debug('last day of window' || l_last_day_of_window);
1664: AHL_DEBUG_PUB.debug('profile uom:' || l_date_uom);
1665: AHL_DEBUG_PUB.debug('profile value:' || l_value);
1666: END IF;
1667:
1668: EXCEPTION
1669: WHEN VALUE_ERROR THEN

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

1729:
1730: BEGIN
1731:
1732: IF G_DEBUG = 'Y' THEN
1733: AHL_DEBUG_PUB.debug('Start Get_Utilization_Forecast');
1734: AHL_DEBUG_PUB.debug ('Input csi'|| p_csi_item_instance_id);
1735: AHL_DEBUG_PUB.debug ('Input uc'|| p_uc_header_id);
1736: AHL_DEBUG_PUB.debug ('Input invID' || p_inventory_item_id);
1737: AHL_DEBUG_PUB.debug ('Input invORGID' || p_inventory_org_id);

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

1730: BEGIN
1731:
1732: IF G_DEBUG = 'Y' THEN
1733: AHL_DEBUG_PUB.debug('Start Get_Utilization_Forecast');
1734: AHL_DEBUG_PUB.debug ('Input csi'|| p_csi_item_instance_id);
1735: AHL_DEBUG_PUB.debug ('Input uc'|| p_uc_header_id);
1736: AHL_DEBUG_PUB.debug ('Input invID' || p_inventory_item_id);
1737: AHL_DEBUG_PUB.debug ('Input invORGID' || p_inventory_org_id);
1738: END IF;

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

1731:
1732: IF G_DEBUG = 'Y' THEN
1733: AHL_DEBUG_PUB.debug('Start Get_Utilization_Forecast');
1734: AHL_DEBUG_PUB.debug ('Input csi'|| p_csi_item_instance_id);
1735: AHL_DEBUG_PUB.debug ('Input uc'|| p_uc_header_id);
1736: AHL_DEBUG_PUB.debug ('Input invID' || p_inventory_item_id);
1737: AHL_DEBUG_PUB.debug ('Input invORGID' || p_inventory_org_id);
1738: END IF;
1739:

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

1732: IF G_DEBUG = 'Y' THEN
1733: AHL_DEBUG_PUB.debug('Start Get_Utilization_Forecast');
1734: AHL_DEBUG_PUB.debug ('Input csi'|| p_csi_item_instance_id);
1735: AHL_DEBUG_PUB.debug ('Input uc'|| p_uc_header_id);
1736: AHL_DEBUG_PUB.debug ('Input invID' || p_inventory_item_id);
1737: AHL_DEBUG_PUB.debug ('Input invORGID' || p_inventory_org_id);
1738: END IF;
1739:
1740: -- Check installation to get appropriate forecast.

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

1733: AHL_DEBUG_PUB.debug('Start Get_Utilization_Forecast');
1734: AHL_DEBUG_PUB.debug ('Input csi'|| p_csi_item_instance_id);
1735: AHL_DEBUG_PUB.debug ('Input uc'|| p_uc_header_id);
1736: AHL_DEBUG_PUB.debug ('Input invID' || p_inventory_item_id);
1737: AHL_DEBUG_PUB.debug ('Input invORGID' || p_inventory_org_id);
1738: END IF;
1739:
1740: -- Check installation to get appropriate forecast.
1741: IF (G_IS_PM_INSTALLED = 'Y') THEN

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

1741: IF (G_IS_PM_INSTALLED = 'Y') THEN
1742: -- pm is installed.
1743:
1744: IF G_DEBUG = 'Y' THEN
1745: AHL_DEBUG_PUB.debug('PM forecast');
1746: END IF;
1747:
1748: -- Check if forecast available at instance level.
1749: OPEN ahl_pm_uf_headers_csr(p_csi_item_instance_id);

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

1780: CLOSE ahl_pm_uf_headers_csr;
1781: ELSE -- is_pm_installed.
1782: -- forecast for AHL installation.
1783: IF G_DEBUG = 'Y' THEN
1784: AHL_DEBUG_PUB.debug('AHL Installation forecast');
1785: END IF;
1786:
1787: -- If Utlization forecast defined at unit level
1788: IF (p_uc_header_id IS NOT NULL) THEN

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

1802: END LOOP;
1803: ELSE /* forecast not defined at UC */
1804: --dbms_output.put_line ('use_unit_flag not Y');
1805: IF G_DEBUG = 'Y' THEN
1806: AHL_DEBUG_PUB.debug('AHL PC forecast for UNIT');
1807: END IF;
1808:
1809: -- added parameter p_add_unit_item_forecast to fix bug# 6749351.
1810: AHL_UMP_UF_PVT.Get_UF_FROM_PC (p_unit_config_header_id => p_uc_header_id,

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

1838: END IF; -- %found.
1839: CLOSE ahl_uf_headers_csr;
1840: ELSE
1841: IF G_DEBUG = 'Y' THEN
1842: AHL_DEBUG_PUB.debug('AHL PC forecast for ITEM');
1843: END IF;
1844: --dbms_output.put_line ('inv case');
1845:
1846: /* following taken care by get_uf_from_pc as part fix for bug# 6749351.

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

1894: -- Set output variable for forecast.
1895: x_forecast_details_tbl := l_forecast_details_tbl;
1896:
1897: IF G_DEBUG = 'Y' THEN
1898: AHL_DEBUG_PUB.debug ('Count on forecast_details' || x_forecast_details_tbl.COUNT);
1899:
1900: IF (x_forecast_details_tbl.COUNT > 0) THEN
1901: FOR i IN x_forecast_details_tbl.FIRST..x_forecast_details_tbl.LAST LOOP
1902: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') Uom_Code' || x_forecast_details_tbl(i).uom_code);

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

1898: AHL_DEBUG_PUB.debug ('Count on forecast_details' || x_forecast_details_tbl.COUNT);
1899:
1900: IF (x_forecast_details_tbl.COUNT > 0) THEN
1901: FOR i IN x_forecast_details_tbl.FIRST..x_forecast_details_tbl.LAST LOOP
1902: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') Uom_Code' || x_forecast_details_tbl(i).uom_code);
1903: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') Start Date' || x_forecast_details_tbl(i).start_date);
1904: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') End Date' || x_forecast_details_tbl(i).end_date);
1905: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') Usage' || x_forecast_details_tbl(i).usage_per_day);
1906: END LOOP;

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

1899:
1900: IF (x_forecast_details_tbl.COUNT > 0) THEN
1901: FOR i IN x_forecast_details_tbl.FIRST..x_forecast_details_tbl.LAST LOOP
1902: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') Uom_Code' || x_forecast_details_tbl(i).uom_code);
1903: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') Start Date' || x_forecast_details_tbl(i).start_date);
1904: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') End Date' || x_forecast_details_tbl(i).end_date);
1905: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') Usage' || x_forecast_details_tbl(i).usage_per_day);
1906: END LOOP;
1907: END IF;

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

1900: IF (x_forecast_details_tbl.COUNT > 0) THEN
1901: FOR i IN x_forecast_details_tbl.FIRST..x_forecast_details_tbl.LAST LOOP
1902: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') Uom_Code' || x_forecast_details_tbl(i).uom_code);
1903: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') Start Date' || x_forecast_details_tbl(i).start_date);
1904: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') End Date' || x_forecast_details_tbl(i).end_date);
1905: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') Usage' || x_forecast_details_tbl(i).usage_per_day);
1906: END LOOP;
1907: END IF;
1908:

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

1901: FOR i IN x_forecast_details_tbl.FIRST..x_forecast_details_tbl.LAST LOOP
1902: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') Uom_Code' || x_forecast_details_tbl(i).uom_code);
1903: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') Start Date' || x_forecast_details_tbl(i).start_date);
1904: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') End Date' || x_forecast_details_tbl(i).end_date);
1905: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') Usage' || x_forecast_details_tbl(i).usage_per_day);
1906: END LOOP;
1907: END IF;
1908:
1909: AHL_DEBUG_PUB.debug ('End Get_Utilization_Forecast');

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

1905: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') Usage' || x_forecast_details_tbl(i).usage_per_day);
1906: END LOOP;
1907: END IF;
1908:
1909: AHL_DEBUG_PUB.debug ('End Get_Utilization_Forecast');
1910:
1911: END IF;
1912:
1913: END Get_Utilization_Forecast;

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

1966:
1967: BEGIN
1968:
1969: IF G_DEBUG = 'Y' THEN
1970: AHL_DEBUG_PUB.debug ('Start Lock Effectivity records');
1971: END IF;
1972:
1973: x_ret_code := '0';
1974:

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

2002: OPEN ahl_unit_effectivities_csr(G_config_node_tbl(i).csi_item_instance_id);
2003: LOOP
2004: FETCH ahl_unit_effectivities_csr BULK COLLECT INTO l_ue_id_tbl LIMIT 5000;
2005: IF G_DEBUG = 'Y' THEN
2006: AHL_DEBUG_PUB.debug ('Rows processed for instance: ' || G_config_node_tbl(i).csi_item_instance_id
2007: || 'is: ' || ahl_unit_effectivities_csr%ROWCOUNT);
2008: END IF;
2009: --EXIT WHEN ahl_unit_effectivities_csr%NOTFOUND;
2010: EXIT WHEN (l_ue_id_tbl.count = 0);

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

2028: OPEN ahl_unit_effectivities_csr(G_config_node_tbl(1).csi_item_instance_id);
2029: LOOP
2030: FETCH ahl_unit_effectivities_csr BULK COLLECT INTO l_ue_id_tbl LIMIT 5000;
2031: IF G_DEBUG = 'Y' THEN
2032: AHL_DEBUG_PUB.debug ('Rows processed are: ' || ahl_unit_effectivities_csr%ROWCOUNT);
2033: END IF;
2034: --EXIT WHEN ahl_unit_effectivities_csr%NOTFOUND;
2035: EXIT WHEN (l_ue_id_tbl.count = 0);
2036:

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

2041: CLOSE ahl_unit_effectivities_csr;
2042:
2043:
2044: IF G_DEBUG = 'Y' THEN
2045: AHL_DEBUG_PUB.debug ('End Lock Effectivity records');
2046: END IF;
2047:
2048: EXCEPTION
2049:

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

2105: -- Process Unit beginning with top node.
2106: IF G_config_node_tbl.COUNT > 0 THEN
2107: FOR i IN G_config_node_tbl.FIRST..G_config_node_tbl.LAST LOOP
2108: IF G_DEBUG = 'Y' THEN
2109: AHL_DEBUG_PUB.debug('Processing for..:' || G_config_node_tbl(i).csi_item_instance_id );
2110: END IF;
2111:
2112: -- Build counter rules ratio if node is not root node.
2113: IF (G_master_config_id IS NOT NULL AND G_config_node_tbl(i).object_id IS NOT NULL) THEN

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

2140: -- Read ahl_applicable_mrs for all MRs applicable to the item instance.
2141: FOR l_appl_rec IN ahl_applicable_MRs(G_config_node_tbl(i).csi_item_instance_id) LOOP
2142:
2143: IF G_DEBUG = 'Y' THEN
2144: AHL_DEBUG_PUB.debug('Found applicable MR-ID:Title' || l_appl_rec.mr_header_id || '[' || l_appl_rec.title || ']');
2145: END IF;
2146:
2147: /*
2148: IF (G_concurrent_flag = 'Y') THEN

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

2170: p_current_usage_tbl => l_current_usage_tbl,
2171: p_counter_rules_tbl => l_counter_rules_tbl );
2172:
2173: IF G_DEBUG = 'Y' THEN
2174: AHL_DEBUG_PUB.debug('Process Unit:LOOP to next MR-ID');
2175: END IF;
2176:
2177: END LOOP; /* loop through next mr */
2178:

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

2176:
2177: END LOOP; /* loop through next mr */
2178:
2179: IF G_DEBUG = 'Y' THEN
2180: AHL_DEBUG_PUB.debug('Process Unit:LOOP to next NODE');
2181: END IF;
2182:
2183: END LOOP; /* loop to process next node. */
2184: END IF; /* for count > 0 */

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

2250:
2251: BEGIN
2252:
2253: IF G_DEBUG = 'Y' THEN
2254: AHL_DEBUG_PUB.debug ('Start Build Counter Ratio');
2255: END IF;
2256:
2257: -- If there is no master configuration
2258: IF (p_master_config_id IS NOT NULL) THEN

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

2299: CLOSE ahl_posn_master_config_csr;
2300: END IF; /* master config not null */
2301:
2302: IF G_DEBUG = 'Y' THEN
2303: AHL_DEBUG_PUB.debug ('End Build Counter Ratio');
2304: AHL_DEBUG_PUB.debug ('Counter Rules tbl count' || x_counter_rules_tbl.COUNT);
2305: END IF;
2306:
2307: EXCEPTION

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

2300: END IF; /* master config not null */
2301:
2302: IF G_DEBUG = 'Y' THEN
2303: AHL_DEBUG_PUB.debug ('End Build Counter Ratio');
2304: AHL_DEBUG_PUB.debug ('Counter Rules tbl count' || x_counter_rules_tbl.COUNT);
2305: END IF;
2306:
2307: EXCEPTION
2308:

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

2392:
2393: BEGIN
2394:
2395: IF G_DEBUG = 'Y' THEN
2396: AHL_DEBUG_PUB.debug ('Start Get Current Usage');
2397: END IF;
2398:
2399: -- Build current usage counters.
2400: OPEN csi_cp_counters_csr(p_csi_item_instance_id);

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

2454: -- Set return value.
2455: x_current_usage_tbl := l_current_usage_tbl;
2456:
2457: IF G_DEBUG = 'Y' THEN
2458: AHL_DEBUG_PUB.debug ('Counter Usage tbl count' || x_current_usage_tbl.COUNT);
2459: AHL_DEBUG_PUB.debug ('End Get Current Usage');
2460: END IF;
2461:
2462: END get_Current_Usage;

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

2455: x_current_usage_tbl := l_current_usage_tbl;
2456:
2457: IF G_DEBUG = 'Y' THEN
2458: AHL_DEBUG_PUB.debug ('Counter Usage tbl count' || x_current_usage_tbl.COUNT);
2459: AHL_DEBUG_PUB.debug ('End Get Current Usage');
2460: END IF;
2461:
2462: END get_Current_Usage;
2463:

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

2573:
2574: BEGIN
2575:
2576: IF G_DEBUG = 'Y' THEN
2577: AHL_DEBUG_PUB.debug ('Start Get Accomplishment Details');
2578: END IF;
2579:
2580: -- Check if any deferrals exist.
2581: OPEN ahl_def_csr (p_applicable_mrs_rec.csi_item_instance_id,

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

2659: x_due_at_counter_val_tbl => l_last_acc_counter_val_tbl,
2660: x_return_value => l_return_val);
2661:
2662: IF G_DEBUG = 'Y' THEN
2663: AHL_DEBUG_PUB.Debug('l_deferral_due_date: ' || l_last_accomplishment_date);
2664: IF (l_last_acc_counter_val_tbl.COUNT) > 0 THEN
2665: for i in l_last_acc_counter_val_tbl.FIRST..l_last_acc_counter_val_tbl.LAST LOOP
2666: 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);
2667: end loop;

Line 2666: 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);

2662: IF G_DEBUG = 'Y' THEN
2663: AHL_DEBUG_PUB.Debug('l_deferral_due_date: ' || l_last_accomplishment_date);
2664: IF (l_last_acc_counter_val_tbl.COUNT) > 0 THEN
2665: for i in l_last_acc_counter_val_tbl.FIRST..l_last_acc_counter_val_tbl.LAST LOOP
2666: 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);
2667: end loop;
2668: END IF;
2669: END IF;
2670:

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

2703: x_no_forecast_flag := l_no_forecast_flag;
2704: x_mr_accomplish_exists := l_mr_accomplish_exists;
2705:
2706: IF G_DEBUG = 'Y' THEN
2707: AHL_DEBUG_PUB.debug ('Last Accomplished Date:' || x_accomplishment_date);
2708: AHL_DEBUG_PUB.debug ('Count of ctr values:' || x_last_acc_counter_val_tbl.COUNT);
2709: AHL_DEBUG_PUB.debug ('End Get Accomplishment Details');
2710: END IF;
2711:

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

2704: x_mr_accomplish_exists := l_mr_accomplish_exists;
2705:
2706: IF G_DEBUG = 'Y' THEN
2707: AHL_DEBUG_PUB.debug ('Last Accomplished Date:' || x_accomplishment_date);
2708: AHL_DEBUG_PUB.debug ('Count of ctr values:' || x_last_acc_counter_val_tbl.COUNT);
2709: AHL_DEBUG_PUB.debug ('End Get Accomplishment Details');
2710: END IF;
2711:
2712: END get_accomplishment_details;

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

2705:
2706: IF G_DEBUG = 'Y' THEN
2707: AHL_DEBUG_PUB.debug ('Last Accomplished Date:' || x_accomplishment_date);
2708: AHL_DEBUG_PUB.debug ('Count of ctr values:' || x_last_acc_counter_val_tbl.COUNT);
2709: AHL_DEBUG_PUB.debug ('End Get Accomplishment Details');
2710: END IF;
2711:
2712: END get_accomplishment_details;
2713:

Line 2947: 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 );

2943: BEGIN
2944:
2945:
2946: IF G_DEBUG = 'Y' THEN
2947: 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 );
2948: END IF;
2949:
2950: -- Set last accomplishment details.
2951: Get_accomplishment_details(p_applicable_mrs_rec => p_applicable_mrs_rec,

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

2987: x_due_at_counter_val_tbl => l_last_acc_counter_val_tbl,
2988: x_return_value => l_return_value);
2989:
2990: IF G_DEBUG = 'Y' THEN
2991: AHL_DEBUG_PUB.Debug('l_preceding_due_date: '|| l_preceding_next_due_date);
2992: IF (l_last_acc_counter_val_tbl.COUNT) > 0 THEN
2993: for i in l_last_acc_counter_val_tbl.FIRST..l_last_acc_counter_val_tbl.LAST LOOP
2994: 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);
2995: end loop;

Line 2994: 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);

2990: IF G_DEBUG = 'Y' THEN
2991: AHL_DEBUG_PUB.Debug('l_preceding_due_date: '|| l_preceding_next_due_date);
2992: IF (l_last_acc_counter_val_tbl.COUNT) > 0 THEN
2993: for i in l_last_acc_counter_val_tbl.FIRST..l_last_acc_counter_val_tbl.LAST LOOP
2994: 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);
2995: end loop;
2996: END IF;
2997: END IF;
2998:

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

3024: --EXIT WHEN ahl_unit_effectivity_csr%NOTFOUND;
3025: EXIT WHEN (l_ue_id_tbl.count = 0);
3026:
3027: IF G_DEBUG = 'Y' THEN
3028: AHL_DEBUG_PUB.debug ('Rows fetched for instance-mr is: ' || ahl_unit_effectivity_csr%ROWCOUNT);
3029: END IF;
3030:
3031: --dbms_output.put_line ('unit eff load i:' || l_unit_effectivity_tbl(i).unit_effectivity_id);
3032:

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

3045: l_visit_assign_code);
3046:
3047: IF (l_visit_end_date IS NOT NULL AND trunc(l_visit_end_date) >= trunc(sysdate)) THEN
3048: IF G_DEBUG = 'Y' THEN
3049: AHL_DEBUG_PUB.Debug('Visit assigned:End Date:' || l_visit_end_date);
3050: END IF;
3051:
3052: l_unit_effectivity_tbl(i).visit_assign_flag := 'Y';
3053: l_unit_effectivity_tbl(i).visit_end_date := l_visit_end_date;

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

3128: x_next_due_date_rec => l_next_due_date_rec);
3129: END IF;
3130:
3131: IF G_DEBUG = 'Y' THEN
3132: AHL_DEBUG_PUB.Debug('Aft calculate_due_date nextdue');
3133: AHL_DEBUG_PUB.Debug('due date is ' || l_next_due_date_rec.DUE_DATE);
3134: AHL_DEBUG_PUB.Debug('earliest due date is ' || l_next_due_date_rec.EARLIEST_DUE_DATE);
3135: AHL_DEBUG_PUB.Debug('latest due date is ' || l_next_due_date_rec.latest_due_date);
3136: END IF;

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

3129: END IF;
3130:
3131: IF G_DEBUG = 'Y' THEN
3132: AHL_DEBUG_PUB.Debug('Aft calculate_due_date nextdue');
3133: AHL_DEBUG_PUB.Debug('due date is ' || l_next_due_date_rec.DUE_DATE);
3134: AHL_DEBUG_PUB.Debug('earliest due date is ' || l_next_due_date_rec.EARLIEST_DUE_DATE);
3135: AHL_DEBUG_PUB.Debug('latest due date is ' || l_next_due_date_rec.latest_due_date);
3136: END IF;
3137:

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

3130:
3131: IF G_DEBUG = 'Y' THEN
3132: AHL_DEBUG_PUB.Debug('Aft calculate_due_date nextdue');
3133: AHL_DEBUG_PUB.Debug('due date is ' || l_next_due_date_rec.DUE_DATE);
3134: AHL_DEBUG_PUB.Debug('earliest due date is ' || l_next_due_date_rec.EARLIEST_DUE_DATE);
3135: AHL_DEBUG_PUB.Debug('latest due date is ' || l_next_due_date_rec.latest_due_date);
3136: END IF;
3137:
3138: l_next_due_flag := TRUE;

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

3131: IF G_DEBUG = 'Y' THEN
3132: AHL_DEBUG_PUB.Debug('Aft calculate_due_date nextdue');
3133: AHL_DEBUG_PUB.Debug('due date is ' || l_next_due_date_rec.DUE_DATE);
3134: AHL_DEBUG_PUB.Debug('earliest due date is ' || l_next_due_date_rec.EARLIEST_DUE_DATE);
3135: AHL_DEBUG_PUB.Debug('latest due date is ' || l_next_due_date_rec.latest_due_date);
3136: END IF;
3137:
3138: l_next_due_flag := TRUE;
3139: /* next due mr calculation. */

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

3268: IF (l_next_due_date_rec.due_date IS NOT NULL AND l_last_due_date = l_next_due_date_rec.due_date
3269: AND l_next_due_date_rec.counter_remain IS NOT NULL AND l_next_due_date_rec.counter_remain > 0)
3270: THEN
3271: IF G_DEBUG = 'Y' THEN
3272: AHL_DEBUG_PUB.Debug('Check Multiple UMPs for due date:' || l_next_due_date_rec.due_date);
3273: AHL_DEBUG_PUB.Debug('Counter Remain:' || l_next_due_date_rec.counter_remain );
3274: END IF;
3275:
3276: -- get usage for due date.

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

3269: AND l_next_due_date_rec.counter_remain IS NOT NULL AND l_next_due_date_rec.counter_remain > 0)
3270: THEN
3271: IF G_DEBUG = 'Y' THEN
3272: AHL_DEBUG_PUB.Debug('Check Multiple UMPs for due date:' || l_next_due_date_rec.due_date);
3273: AHL_DEBUG_PUB.Debug('Counter Remain:' || l_next_due_date_rec.counter_remain );
3274: END IF;
3275:
3276: -- get usage for due date.
3277: get_usage_for_date(l_next_due_date_rec.due_date,

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

3284: l_duplicate_MRs := 1;
3285: END IF;
3286:
3287: IF G_DEBUG = 'Y' THEN
3288: AHL_DEBUG_PUB.Debug('get_usage_for_date:' || l_usage_per_day);
3289: AHL_DEBUG_PUB.Debug('l_duplicate_MRs:' || l_duplicate_MRs);
3290: END IF;
3291:
3292: END IF; -- l_next_due_date_rec.due_date IS NOT NULL

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

3285: END IF;
3286:
3287: IF G_DEBUG = 'Y' THEN
3288: AHL_DEBUG_PUB.Debug('get_usage_for_date:' || l_usage_per_day);
3289: AHL_DEBUG_PUB.Debug('l_duplicate_MRs:' || l_duplicate_MRs);
3290: END IF;
3291:
3292: END IF; -- l_next_due_date_rec.due_date IS NOT NULL
3293:

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

3386: l_forecast_sequence := l_forecast_sequence + 1;
3387: l_new_unit_effectivity_rec.forecast_sequence := l_forecast_sequence;
3388:
3389: IF G_DEBUG = 'Y' THEN
3390: AHL_DEBUG_PUB.Debug('New Unit eff:' || l_new_unit_effectivity_rec.unit_effectivity_id);
3391: AHL_DEBUG_PUB.Debug('Old forecast seq:'|| l_old_UE_forecast_sequence);
3392: END IF;
3393:
3394: -- set repetivity based on next_due_flag.

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

3387: l_new_unit_effectivity_rec.forecast_sequence := l_forecast_sequence;
3388:
3389: IF G_DEBUG = 'Y' THEN
3390: AHL_DEBUG_PUB.Debug('New Unit eff:' || l_new_unit_effectivity_rec.unit_effectivity_id);
3391: AHL_DEBUG_PUB.Debug('Old forecast seq:'|| l_old_UE_forecast_sequence);
3392: END IF;
3393:
3394: -- set repetivity based on next_due_flag.
3395: IF (l_next_due_flag) THEN

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

3413: -- create record in temporary table.
3414: Create_Temp_Unit_Effectivity (l_new_unit_effectivity_rec);
3415:
3416: IF G_DEBUG = 'Y' THEN
3417: AHL_DEBUG_PUB.Debug('After create_temp_unit_effectivity');
3418: END IF;
3419:
3420: ELSE
3421: -- Process group MR.

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

3476: l_due_date := sysdate;
3477: END IF;
3478:
3479: IF G_DEBUG = 'Y' THEN
3480: AHL_DEBUG_PUB.Debug('Processing for repetivity');
3481: AHL_DEBUG_PUB.Debug('Before get_due_at_counter_values');
3482: AHL_DEBUG_PUB.Debug('l_last_due_date: '|| l_last_due_date);
3483: AHL_DEBUG_PUB.Debug('l_due_date: '|| l_due_date);
3484: IF (l_last_due_counter_val_tbl.COUNT > 0) THEN

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

3477: END IF;
3478:
3479: IF G_DEBUG = 'Y' THEN
3480: AHL_DEBUG_PUB.Debug('Processing for repetivity');
3481: AHL_DEBUG_PUB.Debug('Before get_due_at_counter_values');
3482: AHL_DEBUG_PUB.Debug('l_last_due_date: '|| l_last_due_date);
3483: AHL_DEBUG_PUB.Debug('l_due_date: '|| l_due_date);
3484: IF (l_last_due_counter_val_tbl.COUNT > 0) THEN
3485: FOR i in l_last_due_counter_val_tbl.FIRST..l_last_due_counter_val_tbl.LAST LOOP

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

3478:
3479: IF G_DEBUG = 'Y' THEN
3480: AHL_DEBUG_PUB.Debug('Processing for repetivity');
3481: AHL_DEBUG_PUB.Debug('Before get_due_at_counter_values');
3482: AHL_DEBUG_PUB.Debug('l_last_due_date: '|| l_last_due_date);
3483: AHL_DEBUG_PUB.Debug('l_due_date: '|| l_due_date);
3484: IF (l_last_due_counter_val_tbl.COUNT > 0) THEN
3485: FOR i in l_last_due_counter_val_tbl.FIRST..l_last_due_counter_val_tbl.LAST LOOP
3486: 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 3483: AHL_DEBUG_PUB.Debug('l_due_date: '|| l_due_date);

3479: IF G_DEBUG = 'Y' THEN
3480: AHL_DEBUG_PUB.Debug('Processing for repetivity');
3481: AHL_DEBUG_PUB.Debug('Before get_due_at_counter_values');
3482: AHL_DEBUG_PUB.Debug('l_last_due_date: '|| l_last_due_date);
3483: AHL_DEBUG_PUB.Debug('l_due_date: '|| l_due_date);
3484: IF (l_last_due_counter_val_tbl.COUNT > 0) THEN
3485: FOR i in l_last_due_counter_val_tbl.FIRST..l_last_due_counter_val_tbl.LAST LOOP
3486: 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);
3487: END LOOP;

Line 3486: 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);

3482: AHL_DEBUG_PUB.Debug('l_last_due_date: '|| l_last_due_date);
3483: AHL_DEBUG_PUB.Debug('l_due_date: '|| l_due_date);
3484: IF (l_last_due_counter_val_tbl.COUNT > 0) THEN
3485: FOR i in l_last_due_counter_val_tbl.FIRST..l_last_due_counter_val_tbl.LAST LOOP
3486: 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);
3487: END LOOP;
3488: END IF;
3489: END IF;
3490:

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

3498: l_last_due_date := l_due_date;
3499: l_last_due_counter_val_tbl := l_due_at_counter_val_tbl;
3500:
3501: IF G_DEBUG = 'Y' THEN
3502: AHL_DEBUG_PUB.Debug('AFter get_due_at_counter_values');
3503: AHL_DEBUG_PUB.Debug('l_last_due_date: '|| l_last_due_date);
3504: AHL_DEBUG_PUB.Debug('l_due_date: '|| l_due_date);
3505: IF (l_due_at_counter_val_tbl.COUNT) > 0 THEN
3506: for i in l_due_at_counter_val_tbl.FIRST..l_due_at_counter_val_tbl.LAST LOOP

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

3499: l_last_due_counter_val_tbl := l_due_at_counter_val_tbl;
3500:
3501: IF G_DEBUG = 'Y' THEN
3502: AHL_DEBUG_PUB.Debug('AFter get_due_at_counter_values');
3503: AHL_DEBUG_PUB.Debug('l_last_due_date: '|| l_last_due_date);
3504: AHL_DEBUG_PUB.Debug('l_due_date: '|| l_due_date);
3505: IF (l_due_at_counter_val_tbl.COUNT) > 0 THEN
3506: for i in l_due_at_counter_val_tbl.FIRST..l_due_at_counter_val_tbl.LAST LOOP
3507: 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 3504: AHL_DEBUG_PUB.Debug('l_due_date: '|| l_due_date);

3500:
3501: IF G_DEBUG = 'Y' THEN
3502: AHL_DEBUG_PUB.Debug('AFter get_due_at_counter_values');
3503: AHL_DEBUG_PUB.Debug('l_last_due_date: '|| l_last_due_date);
3504: AHL_DEBUG_PUB.Debug('l_due_date: '|| l_due_date);
3505: IF (l_due_at_counter_val_tbl.COUNT) > 0 THEN
3506: for i in l_due_at_counter_val_tbl.FIRST..l_due_at_counter_val_tbl.LAST LOOP
3507: 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);
3508: end loop;

Line 3507: 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);

3503: AHL_DEBUG_PUB.Debug('l_last_due_date: '|| l_last_due_date);
3504: AHL_DEBUG_PUB.Debug('l_due_date: '|| l_due_date);
3505: IF (l_due_at_counter_val_tbl.COUNT) > 0 THEN
3506: for i in l_due_at_counter_val_tbl.FIRST..l_due_at_counter_val_tbl.LAST LOOP
3507: 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);
3508: end loop;
3509: END IF;
3510: END IF;
3511:

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

3524: p_last_due_mr_interval_id => l_last_due_mr_interval_id,
3525: x_next_due_date_rec => l_next_due_date_rec);
3526:
3527: IF G_DEBUG = 'Y' THEN
3528: AHL_DEBUG_PUB.Debug('aft calculate_due_date - repetivity');
3529: AHL_DEBUG_PUB.Debug('due date is ' || l_next_due_date_rec.DUE_DATE);
3530: AHL_DEBUG_PUB.Debug('earliest due date is ' || l_next_due_date_rec.EARLIEST_DUE_DATE);
3531: AHL_DEBUG_PUB.Debug('latest due date is ' || l_next_due_date_rec.latest_due_date);
3532: END IF;

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

3525: x_next_due_date_rec => l_next_due_date_rec);
3526:
3527: IF G_DEBUG = 'Y' THEN
3528: AHL_DEBUG_PUB.Debug('aft calculate_due_date - repetivity');
3529: AHL_DEBUG_PUB.Debug('due date is ' || l_next_due_date_rec.DUE_DATE);
3530: AHL_DEBUG_PUB.Debug('earliest due date is ' || l_next_due_date_rec.EARLIEST_DUE_DATE);
3531: AHL_DEBUG_PUB.Debug('latest due date is ' || l_next_due_date_rec.latest_due_date);
3532: END IF;
3533:

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

3526:
3527: IF G_DEBUG = 'Y' THEN
3528: AHL_DEBUG_PUB.Debug('aft calculate_due_date - repetivity');
3529: AHL_DEBUG_PUB.Debug('due date is ' || l_next_due_date_rec.DUE_DATE);
3530: AHL_DEBUG_PUB.Debug('earliest due date is ' || l_next_due_date_rec.EARLIEST_DUE_DATE);
3531: AHL_DEBUG_PUB.Debug('latest due date is ' || l_next_due_date_rec.latest_due_date);
3532: END IF;
3533:
3534: -- Check if calculated date is same as last due date. If they are the same then, add one day.

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

3527: IF G_DEBUG = 'Y' THEN
3528: AHL_DEBUG_PUB.Debug('aft calculate_due_date - repetivity');
3529: AHL_DEBUG_PUB.Debug('due date is ' || l_next_due_date_rec.DUE_DATE);
3530: AHL_DEBUG_PUB.Debug('earliest due date is ' || l_next_due_date_rec.EARLIEST_DUE_DATE);
3531: AHL_DEBUG_PUB.Debug('latest due date is ' || l_next_due_date_rec.latest_due_date);
3532: END IF;
3533:
3534: -- Check if calculated date is same as last due date. If they are the same then, add one day.
3535: IF (l_next_due_date_rec.due_date IS NOT NULL) THEN

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

3538: l_next_due_date_rec.EARLIEST_DUE_DATE := NULL;
3539: l_next_due_date_rec.latest_due_date := NULL;
3540:
3541: IF G_DEBUG = 'Y' THEN
3542: AHL_DEBUG_PUB.Debug('Adding one day to l_next_due_date_rec.due_date:' || l_next_due_date_rec.due_date);
3543: END IF;
3544:
3545: --IF G_DEBUG = 'Y' THEN
3546: -- AHL_DEBUG_PUB.Debug('Exiting build effectivity as last due = due date');

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

3542: AHL_DEBUG_PUB.Debug('Adding one day to l_next_due_date_rec.due_date:' || l_next_due_date_rec.due_date);
3543: END IF;
3544:
3545: --IF G_DEBUG = 'Y' THEN
3546: -- AHL_DEBUG_PUB.Debug('Exiting build effectivity as last due = due date');
3547: --END IF;
3548: --EXIT;
3549: END IF;
3550: END IF;

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

3711:
3712: BEGIN
3713:
3714: IF G_DEBUG = 'Y' THEN
3715: AHL_DEBUG_PUB.Debug('In calculate due date');
3716: END IF;
3717:
3718: -- Initialize due date.
3719: l_calc_due_date := null;

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

3740: FETCH ahl_init_due_csr INTO l_set_due_date, l_unit_effectivity_id, l_unit_deferral_id;
3741: IF (ahl_init_due_csr%FOUND) THEN
3742:
3743: IF G_DEBUG = 'Y' THEN
3744: AHL_DEBUG_PUB.Debug('INIT-Due processing: Set due_date:' || l_set_due_date);
3745: END IF;
3746: --dbms_output.put_line ('in INIT-due part: due_date' || l_set_due_date);
3747:
3748: FOR threshold_rec IN ahl_unit_thresholds_csr (l_unit_deferral_id)

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

3968: p_applicable_mrs_rec.mr_header_id)
3969: LOOP
3970:
3971: IF G_DEBUG = 'Y' THEN
3972: AHL_DEBUG_PUB.Debug('eff ID' || effectivity_rec.mr_effectivity_id );
3973: END IF;
3974:
3975: l_threshold_date := effectivity_rec.threshold_date;
3976: l_mr_interval_found := FALSE;

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

4066: --l_mr_interval_found := TRUE; /* found a interval. */
4067: l_mr_interval_rec := mr_interval_rec;
4068:
4069: IF G_DEBUG = 'Y' THEN
4070: AHL_DEBUG_PUB.Debug('In interval table loop');
4071: AHL_DEBUG_PUB.Debug('mr interval:' || l_mr_interval_rec.mr_interval_id );
4072: AHL_DEBUG_PUB.Debug('start value:' ||l_mr_interval_rec.start_value);
4073: AHL_DEBUG_PUB.Debug('stop value:' ||l_mr_interval_rec.start_value);
4074: AHL_DEBUG_PUB.Debug('start date:' ||l_mr_interval_rec.start_date);

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

4067: l_mr_interval_rec := mr_interval_rec;
4068:
4069: IF G_DEBUG = 'Y' THEN
4070: AHL_DEBUG_PUB.Debug('In interval table loop');
4071: AHL_DEBUG_PUB.Debug('mr interval:' || l_mr_interval_rec.mr_interval_id );
4072: AHL_DEBUG_PUB.Debug('start value:' ||l_mr_interval_rec.start_value);
4073: AHL_DEBUG_PUB.Debug('stop value:' ||l_mr_interval_rec.start_value);
4074: AHL_DEBUG_PUB.Debug('start date:' ||l_mr_interval_rec.start_date);
4075: AHL_DEBUG_PUB.Debug('stop date:' ||l_mr_interval_rec.start_date);

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

4068:
4069: IF G_DEBUG = 'Y' THEN
4070: AHL_DEBUG_PUB.Debug('In interval table loop');
4071: AHL_DEBUG_PUB.Debug('mr interval:' || l_mr_interval_rec.mr_interval_id );
4072: AHL_DEBUG_PUB.Debug('start value:' ||l_mr_interval_rec.start_value);
4073: AHL_DEBUG_PUB.Debug('stop value:' ||l_mr_interval_rec.start_value);
4074: AHL_DEBUG_PUB.Debug('start date:' ||l_mr_interval_rec.start_date);
4075: AHL_DEBUG_PUB.Debug('stop date:' ||l_mr_interval_rec.start_date);
4076: AHL_DEBUG_PUB.Debug('Interval Value:' ||l_mr_interval_rec.tolerance_before);

Line 4073: AHL_DEBUG_PUB.Debug('stop value:' ||l_mr_interval_rec.start_value);

4069: IF G_DEBUG = 'Y' THEN
4070: AHL_DEBUG_PUB.Debug('In interval table loop');
4071: AHL_DEBUG_PUB.Debug('mr interval:' || l_mr_interval_rec.mr_interval_id );
4072: AHL_DEBUG_PUB.Debug('start value:' ||l_mr_interval_rec.start_value);
4073: AHL_DEBUG_PUB.Debug('stop value:' ||l_mr_interval_rec.start_value);
4074: AHL_DEBUG_PUB.Debug('start date:' ||l_mr_interval_rec.start_date);
4075: AHL_DEBUG_PUB.Debug('stop date:' ||l_mr_interval_rec.start_date);
4076: AHL_DEBUG_PUB.Debug('Interval Value:' ||l_mr_interval_rec.tolerance_before);
4077: AHL_DEBUG_PUB.Debug('tolerance bef:' ||l_mr_interval_rec.tolerance_before);

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

4070: AHL_DEBUG_PUB.Debug('In interval table loop');
4071: AHL_DEBUG_PUB.Debug('mr interval:' || l_mr_interval_rec.mr_interval_id );
4072: AHL_DEBUG_PUB.Debug('start value:' ||l_mr_interval_rec.start_value);
4073: AHL_DEBUG_PUB.Debug('stop value:' ||l_mr_interval_rec.start_value);
4074: AHL_DEBUG_PUB.Debug('start date:' ||l_mr_interval_rec.start_date);
4075: AHL_DEBUG_PUB.Debug('stop date:' ||l_mr_interval_rec.start_date);
4076: AHL_DEBUG_PUB.Debug('Interval Value:' ||l_mr_interval_rec.tolerance_before);
4077: AHL_DEBUG_PUB.Debug('tolerance bef:' ||l_mr_interval_rec.tolerance_before);
4078: AHL_DEBUG_PUB.Debug('tolerance aft:' ||l_mr_interval_rec.tolerance_after);

Line 4075: AHL_DEBUG_PUB.Debug('stop date:' ||l_mr_interval_rec.start_date);

4071: AHL_DEBUG_PUB.Debug('mr interval:' || l_mr_interval_rec.mr_interval_id );
4072: AHL_DEBUG_PUB.Debug('start value:' ||l_mr_interval_rec.start_value);
4073: AHL_DEBUG_PUB.Debug('stop value:' ||l_mr_interval_rec.start_value);
4074: AHL_DEBUG_PUB.Debug('start date:' ||l_mr_interval_rec.start_date);
4075: AHL_DEBUG_PUB.Debug('stop date:' ||l_mr_interval_rec.start_date);
4076: AHL_DEBUG_PUB.Debug('Interval Value:' ||l_mr_interval_rec.tolerance_before);
4077: AHL_DEBUG_PUB.Debug('tolerance bef:' ||l_mr_interval_rec.tolerance_before);
4078: AHL_DEBUG_PUB.Debug('tolerance aft:' ||l_mr_interval_rec.tolerance_after);
4079: AHL_DEBUG_PUB.Debug('earliest_due_value:' ||l_mr_interval_rec.earliest_due_value);

Line 4076: AHL_DEBUG_PUB.Debug('Interval Value:' ||l_mr_interval_rec.tolerance_before);

4072: AHL_DEBUG_PUB.Debug('start value:' ||l_mr_interval_rec.start_value);
4073: AHL_DEBUG_PUB.Debug('stop value:' ||l_mr_interval_rec.start_value);
4074: AHL_DEBUG_PUB.Debug('start date:' ||l_mr_interval_rec.start_date);
4075: AHL_DEBUG_PUB.Debug('stop date:' ||l_mr_interval_rec.start_date);
4076: AHL_DEBUG_PUB.Debug('Interval Value:' ||l_mr_interval_rec.tolerance_before);
4077: AHL_DEBUG_PUB.Debug('tolerance bef:' ||l_mr_interval_rec.tolerance_before);
4078: AHL_DEBUG_PUB.Debug('tolerance aft:' ||l_mr_interval_rec.tolerance_after);
4079: AHL_DEBUG_PUB.Debug('earliest_due_value:' ||l_mr_interval_rec.earliest_due_value);
4080: AHL_DEBUG_PUB.Debug('CounterID:' || l_temp_counter_tbl(i).counter_id);

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

4073: AHL_DEBUG_PUB.Debug('stop value:' ||l_mr_interval_rec.start_value);
4074: AHL_DEBUG_PUB.Debug('start date:' ||l_mr_interval_rec.start_date);
4075: AHL_DEBUG_PUB.Debug('stop date:' ||l_mr_interval_rec.start_date);
4076: AHL_DEBUG_PUB.Debug('Interval Value:' ||l_mr_interval_rec.tolerance_before);
4077: AHL_DEBUG_PUB.Debug('tolerance bef:' ||l_mr_interval_rec.tolerance_before);
4078: AHL_DEBUG_PUB.Debug('tolerance aft:' ||l_mr_interval_rec.tolerance_after);
4079: AHL_DEBUG_PUB.Debug('earliest_due_value:' ||l_mr_interval_rec.earliest_due_value);
4080: AHL_DEBUG_PUB.Debug('CounterID:' || l_temp_counter_tbl(i).counter_id);
4081: AHL_DEBUG_PUB.Debug('CounterName:' || l_temp_counter_tbl(i).counter_name);

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

4074: AHL_DEBUG_PUB.Debug('start date:' ||l_mr_interval_rec.start_date);
4075: AHL_DEBUG_PUB.Debug('stop date:' ||l_mr_interval_rec.start_date);
4076: AHL_DEBUG_PUB.Debug('Interval Value:' ||l_mr_interval_rec.tolerance_before);
4077: AHL_DEBUG_PUB.Debug('tolerance bef:' ||l_mr_interval_rec.tolerance_before);
4078: AHL_DEBUG_PUB.Debug('tolerance aft:' ||l_mr_interval_rec.tolerance_after);
4079: AHL_DEBUG_PUB.Debug('earliest_due_value:' ||l_mr_interval_rec.earliest_due_value);
4080: AHL_DEBUG_PUB.Debug('CounterID:' || l_temp_counter_tbl(i).counter_id);
4081: AHL_DEBUG_PUB.Debug('CounterName:' || l_temp_counter_tbl(i).counter_name);
4082: AHL_DEBUG_PUB.Debug('counter_value:' || l_counter_value);

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

4075: AHL_DEBUG_PUB.Debug('stop date:' ||l_mr_interval_rec.start_date);
4076: AHL_DEBUG_PUB.Debug('Interval Value:' ||l_mr_interval_rec.tolerance_before);
4077: AHL_DEBUG_PUB.Debug('tolerance bef:' ||l_mr_interval_rec.tolerance_before);
4078: AHL_DEBUG_PUB.Debug('tolerance aft:' ||l_mr_interval_rec.tolerance_after);
4079: AHL_DEBUG_PUB.Debug('earliest_due_value:' ||l_mr_interval_rec.earliest_due_value);
4080: AHL_DEBUG_PUB.Debug('CounterID:' || l_temp_counter_tbl(i).counter_id);
4081: AHL_DEBUG_PUB.Debug('CounterName:' || l_temp_counter_tbl(i).counter_name);
4082: AHL_DEBUG_PUB.Debug('counter_value:' || l_counter_value);
4083: AHL_DEBUG_PUB.Debug('current ctr:' ||l_current_ctr_value);

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

4076: AHL_DEBUG_PUB.Debug('Interval Value:' ||l_mr_interval_rec.tolerance_before);
4077: AHL_DEBUG_PUB.Debug('tolerance bef:' ||l_mr_interval_rec.tolerance_before);
4078: AHL_DEBUG_PUB.Debug('tolerance aft:' ||l_mr_interval_rec.tolerance_after);
4079: AHL_DEBUG_PUB.Debug('earliest_due_value:' ||l_mr_interval_rec.earliest_due_value);
4080: AHL_DEBUG_PUB.Debug('CounterID:' || l_temp_counter_tbl(i).counter_id);
4081: AHL_DEBUG_PUB.Debug('CounterName:' || l_temp_counter_tbl(i).counter_name);
4082: AHL_DEBUG_PUB.Debug('counter_value:' || l_counter_value);
4083: AHL_DEBUG_PUB.Debug('current ctr:' ||l_current_ctr_value);
4084: END IF;

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

4077: AHL_DEBUG_PUB.Debug('tolerance bef:' ||l_mr_interval_rec.tolerance_before);
4078: AHL_DEBUG_PUB.Debug('tolerance aft:' ||l_mr_interval_rec.tolerance_after);
4079: AHL_DEBUG_PUB.Debug('earliest_due_value:' ||l_mr_interval_rec.earliest_due_value);
4080: AHL_DEBUG_PUB.Debug('CounterID:' || l_temp_counter_tbl(i).counter_id);
4081: AHL_DEBUG_PUB.Debug('CounterName:' || l_temp_counter_tbl(i).counter_name);
4082: AHL_DEBUG_PUB.Debug('counter_value:' || l_counter_value);
4083: AHL_DEBUG_PUB.Debug('current ctr:' ||l_current_ctr_value);
4084: END IF;
4085:

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

4078: AHL_DEBUG_PUB.Debug('tolerance aft:' ||l_mr_interval_rec.tolerance_after);
4079: AHL_DEBUG_PUB.Debug('earliest_due_value:' ||l_mr_interval_rec.earliest_due_value);
4080: AHL_DEBUG_PUB.Debug('CounterID:' || l_temp_counter_tbl(i).counter_id);
4081: AHL_DEBUG_PUB.Debug('CounterName:' || l_temp_counter_tbl(i).counter_name);
4082: AHL_DEBUG_PUB.Debug('counter_value:' || l_counter_value);
4083: AHL_DEBUG_PUB.Debug('current ctr:' ||l_current_ctr_value);
4084: END IF;
4085:
4086: l_counter_remain := 0; /* initialize */

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

4079: AHL_DEBUG_PUB.Debug('earliest_due_value:' ||l_mr_interval_rec.earliest_due_value);
4080: AHL_DEBUG_PUB.Debug('CounterID:' || l_temp_counter_tbl(i).counter_id);
4081: AHL_DEBUG_PUB.Debug('CounterName:' || l_temp_counter_tbl(i).counter_name);
4082: AHL_DEBUG_PUB.Debug('counter_value:' || l_counter_value);
4083: AHL_DEBUG_PUB.Debug('current ctr:' ||l_current_ctr_value);
4084: END IF;
4085:
4086: l_counter_remain := 0; /* initialize */
4087:

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

4203:
4204: --dbms_output.put_line ('counter remain' || l_counter_remain );
4205:
4206: IF G_DEBUG = 'Y' THEN
4207: AHL_DEBUG_PUB.Debug('due at counter_value:' || l_due_at_counter_value);
4208: AHL_DEBUG_PUB.Debug('counter remain:' || l_counter_remain);
4209: END IF;
4210:
4211: -- if due date already set based on start date then skip date calculation.

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

4204: --dbms_output.put_line ('counter remain' || l_counter_remain );
4205:
4206: IF G_DEBUG = 'Y' THEN
4207: AHL_DEBUG_PUB.Debug('due at counter_value:' || l_due_at_counter_value);
4208: AHL_DEBUG_PUB.Debug('counter remain:' || l_counter_remain);
4209: END IF;
4210:
4211: -- if due date already set based on start date then skip date calculation.
4212: IF NOT(l_reset_start_date_flag) THEN

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

4408: --dbms_output.put_line ('Next mr interval');
4409: END IF; -- due date is null.
4410:
4411: IF G_DEBUG = 'Y' THEN
4412: AHL_DEBUG_PUB.Debug('Before Next interval table loop');
4413: AHL_DEBUG_PUB.Debug('l_due_date:' || l_due_date );
4414: AHL_DEBUG_PUB.Debug('l_calc_due_date:' || l_calc_due_date);
4415: AHL_DEBUG_PUB.Debug('l_calc_due_date_ctr_id:' || l_calc_due_date_ctr_id);
4416: END IF;

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

4409: END IF; -- due date is null.
4410:
4411: IF G_DEBUG = 'Y' THEN
4412: AHL_DEBUG_PUB.Debug('Before Next interval table loop');
4413: AHL_DEBUG_PUB.Debug('l_due_date:' || l_due_date );
4414: AHL_DEBUG_PUB.Debug('l_calc_due_date:' || l_calc_due_date);
4415: AHL_DEBUG_PUB.Debug('l_calc_due_date_ctr_id:' || l_calc_due_date_ctr_id);
4416: END IF;
4417:

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

4410:
4411: IF G_DEBUG = 'Y' THEN
4412: AHL_DEBUG_PUB.Debug('Before Next interval table loop');
4413: AHL_DEBUG_PUB.Debug('l_due_date:' || l_due_date );
4414: AHL_DEBUG_PUB.Debug('l_calc_due_date:' || l_calc_due_date);
4415: AHL_DEBUG_PUB.Debug('l_calc_due_date_ctr_id:' || l_calc_due_date_ctr_id);
4416: END IF;
4417:
4418: -- Fix for bug# 3461118.

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

4411: IF G_DEBUG = 'Y' THEN
4412: AHL_DEBUG_PUB.Debug('Before Next interval table loop');
4413: AHL_DEBUG_PUB.Debug('l_due_date:' || l_due_date );
4414: AHL_DEBUG_PUB.Debug('l_calc_due_date:' || l_calc_due_date);
4415: AHL_DEBUG_PUB.Debug('l_calc_due_date_ctr_id:' || l_calc_due_date_ctr_id);
4416: END IF;
4417:
4418: -- Fix for bug# 3461118.
4419: <>

Line 4922: AHL_DEBUG_PUB.Debug('End calculate due date');

4918: -- End of ER modifications.
4919: END IF;
4920:
4921: IF G_DEBUG = 'Y' THEN
4922: AHL_DEBUG_PUB.Debug('End calculate due date');
4923: END IF;
4924:
4925:
4926: EXCEPTION

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

4971: BEGIN
4972:
4973:
4974: IF G_DEBUG = 'Y' THEN
4975: AHL_DEBUG_PUB.Debug('Start get_due_at_counter_values');
4976: END IF;
4977:
4978: -- Initialize return value.
4979: x_return_value := TRUE;

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

5095: END LOOP; /* for loop */
5096: END IF; /* count */
5097:
5098: IF G_DEBUG = 'Y' THEN
5099: AHL_DEBUG_PUB.Debug('End get_due_at_counter_values');
5100: END IF;
5101:
5102: END Get_Due_At_Counter_Values;
5103:

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

5123:
5124: BEGIN
5125:
5126: IF G_DEBUG = 'Y' THEN
5127: AHL_DEBUG_PUB.Debug('Start get_date from UF');
5128: AHL_DEBUG_PUB.Debug('counter remain input to forecast' || p_counter_remain );
5129: AHL_DEBUG_PUB.Debug('counter uom' || p_counter_uom_code);
5130: AHL_DEBUG_PUB.Debug('Start date' || p_start_date);
5131: END IF;

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

5124: BEGIN
5125:
5126: IF G_DEBUG = 'Y' THEN
5127: AHL_DEBUG_PUB.Debug('Start get_date from UF');
5128: AHL_DEBUG_PUB.Debug('counter remain input to forecast' || p_counter_remain );
5129: AHL_DEBUG_PUB.Debug('counter uom' || p_counter_uom_code);
5130: AHL_DEBUG_PUB.Debug('Start date' || p_start_date);
5131: END IF;
5132:

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

5125:
5126: IF G_DEBUG = 'Y' THEN
5127: AHL_DEBUG_PUB.Debug('Start get_date from UF');
5128: AHL_DEBUG_PUB.Debug('counter remain input to forecast' || p_counter_remain );
5129: AHL_DEBUG_PUB.Debug('counter uom' || p_counter_uom_code);
5130: AHL_DEBUG_PUB.Debug('Start date' || p_start_date);
5131: END IF;
5132:
5133: l_counter_remain := trunc(apply_counter_ratio (l_counter_remain,

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

5126: IF G_DEBUG = 'Y' THEN
5127: AHL_DEBUG_PUB.Debug('Start get_date from UF');
5128: AHL_DEBUG_PUB.Debug('counter remain input to forecast' || p_counter_remain );
5129: AHL_DEBUG_PUB.Debug('counter uom' || p_counter_uom_code);
5130: AHL_DEBUG_PUB.Debug('Start date' || p_start_date);
5131: END IF;
5132:
5133: l_counter_remain := trunc(apply_counter_ratio (l_counter_remain,
5134: p_counter_uom_code,

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

5133: l_counter_remain := trunc(apply_counter_ratio (l_counter_remain,
5134: p_counter_uom_code,
5135: p_counter_rules_tbl));
5136: IF G_DEBUG = 'Y' THEN
5137: AHL_DEBUG_PUB.DEBUG('counter remain after ctr_ratio' || l_counter_remain );
5138: END IF;
5139:
5140: -- Start date to begin calculation.
5141: IF (p_start_date IS NULL) THEN

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

5250: END IF;
5251: END IF;
5252:
5253: IF G_DEBUG = 'Y' THEN
5254: AHL_DEBUG_PUB.Debug('Date calculated by forecast:' || x_due_date);
5255: AHL_DEBUG_PUB.Debug('End Get_Date_from_UF');
5256: END IF;
5257:
5258:

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

5251: END IF;
5252:
5253: IF G_DEBUG = 'Y' THEN
5254: AHL_DEBUG_PUB.Debug('Date calculated by forecast:' || x_due_date);
5255: AHL_DEBUG_PUB.Debug('End Get_Date_from_UF');
5256: END IF;
5257:
5258:
5259: END Get_Date_from_UF;

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

5325:
5326: BEGIN
5327:
5328: IF G_DEBUG = 'Y' THEN
5329: AHL_DEBUG_PUB.Debug('Start Adjust Interval Value');
5330: END IF;
5331:
5332: IF (p_stop_value IS NULL) THEN
5333: x_adjusted_int_value := p_interval_value;

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

5362: --x_adjusted_int_value := trunc(x_adjusted_int_value);
5363: x_adjusted_int_value := x_adjusted_int_value;
5364:
5365: IF G_DEBUG = 'Y' THEN
5366: AHL_DEBUG_PUB.Debug('End Adjust Interval Value');
5367: END IF;
5368:
5369:
5370: END Adjust_Interval_Value;

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

5441:
5442: BEGIN
5443:
5444: IF G_DEBUG = 'Y' THEN
5445: AHL_DEBUG_PUB.Debug('Start Adjust Due Date');
5446: END IF;
5447:
5448: IF (trunc(p_due_date) <= trunc(p_stop_date)) THEN
5449: x_adjusted_due_date := p_due_date;

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

5500: END IF;
5501: END IF;
5502:
5503: IF G_DEBUG = 'Y' THEN
5504: AHL_DEBUG_PUB.Debug('End Adjust Interval Value');
5505: END IF;
5506:
5507:
5508: END Adjust_Due_Date;

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

5662:
5663: BEGIN
5664:
5665: IF G_DEBUG = 'Y' THEN
5666: AHL_DEBUG_PUB.Debug('Start Get_DueDate_from_NxtInterval');
5667: AHL_DEBUG_PUB.Debug('Input Counter ID:' || p_current_ctr_rec.counter_id);
5668: AHL_DEBUG_PUB.Debug('Input Counter Name:' || p_current_ctr_rec.counter_name);
5669: AHL_DEBUG_PUB.Debug('Input Counter start value:' || p_start_int_match_at_ctr);
5670: END IF;

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

5663: BEGIN
5664:
5665: IF G_DEBUG = 'Y' THEN
5666: AHL_DEBUG_PUB.Debug('Start Get_DueDate_from_NxtInterval');
5667: AHL_DEBUG_PUB.Debug('Input Counter ID:' || p_current_ctr_rec.counter_id);
5668: AHL_DEBUG_PUB.Debug('Input Counter Name:' || p_current_ctr_rec.counter_name);
5669: AHL_DEBUG_PUB.Debug('Input Counter start value:' || p_start_int_match_at_ctr);
5670: END IF;
5671:

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

5664:
5665: IF G_DEBUG = 'Y' THEN
5666: AHL_DEBUG_PUB.Debug('Start Get_DueDate_from_NxtInterval');
5667: AHL_DEBUG_PUB.Debug('Input Counter ID:' || p_current_ctr_rec.counter_id);
5668: AHL_DEBUG_PUB.Debug('Input Counter Name:' || p_current_ctr_rec.counter_name);
5669: AHL_DEBUG_PUB.Debug('Input Counter start value:' || p_start_int_match_at_ctr);
5670: END IF;
5671:
5672: -- Initialize.

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

5665: IF G_DEBUG = 'Y' THEN
5666: AHL_DEBUG_PUB.Debug('Start Get_DueDate_from_NxtInterval');
5667: AHL_DEBUG_PUB.Debug('Input Counter ID:' || p_current_ctr_rec.counter_id);
5668: AHL_DEBUG_PUB.Debug('Input Counter Name:' || p_current_ctr_rec.counter_name);
5669: AHL_DEBUG_PUB.Debug('Input Counter start value:' || p_start_int_match_at_ctr);
5670: END IF;
5671:
5672: -- Initialize.
5673: x_return_val := TRUE;

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

5734:
5735: END IF;
5736:
5737: IF G_DEBUG = 'Y' THEN
5738: AHL_DEBUG_PUB.Debug('Found future interval with start value:' || l_next_interval_ctr_rec.start_value);
5739: AHL_DEBUG_PUB.Debug('Last due interval ID:' || p_last_due_mr_interval_id);
5740: AHL_DEBUG_PUB.Debug('Current interval ID:' || l_next_interval_ctr_rec.mr_interval_id);
5741: AHL_DEBUG_PUB.Debug('p_last_accomplish_ctr_val:' || p_last_accomplish_ctr_val);
5742: AHL_DEBUG_PUB.Debug('p_current_ctr_rec.counter_value:' || p_current_ctr_rec.counter_value);

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

5735: END IF;
5736:
5737: IF G_DEBUG = 'Y' THEN
5738: AHL_DEBUG_PUB.Debug('Found future interval with start value:' || l_next_interval_ctr_rec.start_value);
5739: AHL_DEBUG_PUB.Debug('Last due interval ID:' || p_last_due_mr_interval_id);
5740: AHL_DEBUG_PUB.Debug('Current interval ID:' || l_next_interval_ctr_rec.mr_interval_id);
5741: AHL_DEBUG_PUB.Debug('p_last_accomplish_ctr_val:' || p_last_accomplish_ctr_val);
5742: AHL_DEBUG_PUB.Debug('p_current_ctr_rec.counter_value:' || p_current_ctr_rec.counter_value);
5743: AHL_DEBUG_PUB.Debug('l_next_interval_date_rec.interval_value:' || l_next_interval_ctr_rec.interval_value);

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

5736:
5737: IF G_DEBUG = 'Y' THEN
5738: AHL_DEBUG_PUB.Debug('Found future interval with start value:' || l_next_interval_ctr_rec.start_value);
5739: AHL_DEBUG_PUB.Debug('Last due interval ID:' || p_last_due_mr_interval_id);
5740: AHL_DEBUG_PUB.Debug('Current interval ID:' || l_next_interval_ctr_rec.mr_interval_id);
5741: AHL_DEBUG_PUB.Debug('p_last_accomplish_ctr_val:' || p_last_accomplish_ctr_val);
5742: AHL_DEBUG_PUB.Debug('p_current_ctr_rec.counter_value:' || p_current_ctr_rec.counter_value);
5743: AHL_DEBUG_PUB.Debug('l_next_interval_date_rec.interval_value:' || l_next_interval_ctr_rec.interval_value);
5744: AHL_DEBUG_PUB.Debug('counter remain:' || l_counter_remain);

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

5737: IF G_DEBUG = 'Y' THEN
5738: AHL_DEBUG_PUB.Debug('Found future interval with start value:' || l_next_interval_ctr_rec.start_value);
5739: AHL_DEBUG_PUB.Debug('Last due interval ID:' || p_last_due_mr_interval_id);
5740: AHL_DEBUG_PUB.Debug('Current interval ID:' || l_next_interval_ctr_rec.mr_interval_id);
5741: AHL_DEBUG_PUB.Debug('p_last_accomplish_ctr_val:' || p_last_accomplish_ctr_val);
5742: AHL_DEBUG_PUB.Debug('p_current_ctr_rec.counter_value:' || p_current_ctr_rec.counter_value);
5743: AHL_DEBUG_PUB.Debug('l_next_interval_date_rec.interval_value:' || l_next_interval_ctr_rec.interval_value);
5744: AHL_DEBUG_PUB.Debug('counter remain:' || l_counter_remain);
5745: END IF;

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

5738: AHL_DEBUG_PUB.Debug('Found future interval with start value:' || l_next_interval_ctr_rec.start_value);
5739: AHL_DEBUG_PUB.Debug('Last due interval ID:' || p_last_due_mr_interval_id);
5740: AHL_DEBUG_PUB.Debug('Current interval ID:' || l_next_interval_ctr_rec.mr_interval_id);
5741: AHL_DEBUG_PUB.Debug('p_last_accomplish_ctr_val:' || p_last_accomplish_ctr_val);
5742: AHL_DEBUG_PUB.Debug('p_current_ctr_rec.counter_value:' || p_current_ctr_rec.counter_value);
5743: AHL_DEBUG_PUB.Debug('l_next_interval_date_rec.interval_value:' || l_next_interval_ctr_rec.interval_value);
5744: AHL_DEBUG_PUB.Debug('counter remain:' || l_counter_remain);
5745: END IF;
5746:

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

5739: AHL_DEBUG_PUB.Debug('Last due interval ID:' || p_last_due_mr_interval_id);
5740: AHL_DEBUG_PUB.Debug('Current interval ID:' || l_next_interval_ctr_rec.mr_interval_id);
5741: AHL_DEBUG_PUB.Debug('p_last_accomplish_ctr_val:' || p_last_accomplish_ctr_val);
5742: AHL_DEBUG_PUB.Debug('p_current_ctr_rec.counter_value:' || p_current_ctr_rec.counter_value);
5743: AHL_DEBUG_PUB.Debug('l_next_interval_date_rec.interval_value:' || l_next_interval_ctr_rec.interval_value);
5744: AHL_DEBUG_PUB.Debug('counter remain:' || l_counter_remain);
5745: END IF;
5746:
5747: -- l_counter_remain can be negative. Fix bug# 6739599.

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

5740: AHL_DEBUG_PUB.Debug('Current interval ID:' || l_next_interval_ctr_rec.mr_interval_id);
5741: AHL_DEBUG_PUB.Debug('p_last_accomplish_ctr_val:' || p_last_accomplish_ctr_val);
5742: AHL_DEBUG_PUB.Debug('p_current_ctr_rec.counter_value:' || p_current_ctr_rec.counter_value);
5743: AHL_DEBUG_PUB.Debug('l_next_interval_date_rec.interval_value:' || l_next_interval_ctr_rec.interval_value);
5744: AHL_DEBUG_PUB.Debug('counter remain:' || l_counter_remain);
5745: END IF;
5746:
5747: -- l_counter_remain can be negative. Fix bug# 6739599.
5748: IF (l_counter_remain > 0) THEN

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

5869:
5870: END IF;
5871:
5872: IF G_DEBUG = 'Y' THEN
5873: AHL_DEBUG_PUB.Debug('Found future interval with start date:' || to_char(l_next_interval_date_rec.start_date,'DD-MON-YYYY'));
5874: AHL_DEBUG_PUB.Debug('counter remain:' || l_counter_remain);
5875: AHL_DEBUG_PUB.Debug('l_ctr_due_at_counter_value:' || l_ctr_due_at_counter_value);
5876: AHL_DEBUG_PUB.Debug('p_last_accomplish_ctr_val:' || p_last_accomplish_ctr_val);
5877: AHL_DEBUG_PUB.Debug('earliest_due_value:' || l_next_interval_date_rec.earliest_due_value);

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

5870: END IF;
5871:
5872: IF G_DEBUG = 'Y' THEN
5873: AHL_DEBUG_PUB.Debug('Found future interval with start date:' || to_char(l_next_interval_date_rec.start_date,'DD-MON-YYYY'));
5874: AHL_DEBUG_PUB.Debug('counter remain:' || l_counter_remain);
5875: AHL_DEBUG_PUB.Debug('l_ctr_due_at_counter_value:' || l_ctr_due_at_counter_value);
5876: AHL_DEBUG_PUB.Debug('p_last_accomplish_ctr_val:' || p_last_accomplish_ctr_val);
5877: AHL_DEBUG_PUB.Debug('earliest_due_value:' || l_next_interval_date_rec.earliest_due_value);
5878: END IF;

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

5871:
5872: IF G_DEBUG = 'Y' THEN
5873: AHL_DEBUG_PUB.Debug('Found future interval with start date:' || to_char(l_next_interval_date_rec.start_date,'DD-MON-YYYY'));
5874: AHL_DEBUG_PUB.Debug('counter remain:' || l_counter_remain);
5875: AHL_DEBUG_PUB.Debug('l_ctr_due_at_counter_value:' || l_ctr_due_at_counter_value);
5876: AHL_DEBUG_PUB.Debug('p_last_accomplish_ctr_val:' || p_last_accomplish_ctr_val);
5877: AHL_DEBUG_PUB.Debug('earliest_due_value:' || l_next_interval_date_rec.earliest_due_value);
5878: END IF;
5879:

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

5872: IF G_DEBUG = 'Y' THEN
5873: AHL_DEBUG_PUB.Debug('Found future interval with start date:' || to_char(l_next_interval_date_rec.start_date,'DD-MON-YYYY'));
5874: AHL_DEBUG_PUB.Debug('counter remain:' || l_counter_remain);
5875: AHL_DEBUG_PUB.Debug('l_ctr_due_at_counter_value:' || l_ctr_due_at_counter_value);
5876: AHL_DEBUG_PUB.Debug('p_last_accomplish_ctr_val:' || p_last_accomplish_ctr_val);
5877: AHL_DEBUG_PUB.Debug('earliest_due_value:' || l_next_interval_date_rec.earliest_due_value);
5878: END IF;
5879:
5880: -- calculate due date based on forecast.

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

5873: AHL_DEBUG_PUB.Debug('Found future interval with start date:' || to_char(l_next_interval_date_rec.start_date,'DD-MON-YYYY'));
5874: AHL_DEBUG_PUB.Debug('counter remain:' || l_counter_remain);
5875: AHL_DEBUG_PUB.Debug('l_ctr_due_at_counter_value:' || l_ctr_due_at_counter_value);
5876: AHL_DEBUG_PUB.Debug('p_last_accomplish_ctr_val:' || p_last_accomplish_ctr_val);
5877: AHL_DEBUG_PUB.Debug('earliest_due_value:' || l_next_interval_date_rec.earliest_due_value);
5878: END IF;
5879:
5880: -- calculate due date based on forecast.
5881: get_date_from_uf(l_counter_remain,

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

5994:
5995: x_mr_interval_found := l_mr_interval_found;
5996:
5997: IF G_DEBUG = 'Y' THEN
5998: AHL_DEBUG_PUB.Debug('End Get_DueDate_from_NxtInterval');
5999: END IF;
6000:
6001: END Get_DueDate_from_NxtInterval;
6002:

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

6014:
6015: BEGIN
6016:
6017: IF G_DEBUG = 'Y' THEN
6018: AHL_DEBUG_PUB.Debug('Start Apply Counter Ratio');
6019: END IF;
6020:
6021: -- Loop through p_counter_rules_tbl.
6022: IF (p_counter_rules_tbl.COUNT > 0) THEN

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

6027: END LOOP;
6028: END IF;
6029:
6030: IF G_DEBUG = 'Y' THEN
6031: AHL_DEBUG_PUB.Debug('End Apply Counter Ratio');
6032: END IF;
6033:
6034: RETURN l_counter_remain;
6035:

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

6049:
6050: BEGIN
6051:
6052: IF G_DEBUG = 'Y' THEN
6053: AHL_DEBUG_PUB.Debug('Start Apply Reverse Counter Ratio');
6054: END IF;
6055:
6056:
6057: -- Loop through p_counter_rules_tbl.

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

6063: END LOOP;
6064: END IF;
6065:
6066: IF G_DEBUG = 'Y' THEN
6067: AHL_DEBUG_PUB.Debug('End Apply Reverse Counter Ratio');
6068: END IF;
6069:
6070: RETURN l_counter_remain;
6071:

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

6191:
6192: BEGIN
6193:
6194: IF G_DEBUG = 'Y' THEN
6195: AHL_DEBUG_PUB.Debug('Start Process Group MR');
6196: END IF;
6197:
6198: l_grp_match := FALSE; /* set default to be "no group" available to match against in ahl_unit_effectitivities. */
6199:

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

6416:
6417: END LOOP;
6418:
6419: IF G_DEBUG = 'Y' THEN
6420: AHL_DEBUG_PUB.Debug('End Process GroupMR');
6421: END IF;
6422:
6423: END Process_GroupMR;
6424:

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

6487:
6488: BEGIN
6489:
6490: IF G_DEBUG = 'Y' THEN
6491: AHL_DEBUG_PUB.Debug('Start Process PrecedingMR');
6492: END IF;
6493:
6494: -- Process mrs which are dependent on current mr and are applicable to the same item instance.
6495: --FOR l_appl_rec IN ahl_preceding_mr_csr(p_applicable_mrs_rec.mr_header_id,

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

6519:
6520: END LOOP;
6521:
6522: IF G_DEBUG = 'Y' THEN
6523: AHL_DEBUG_PUB.Debug('End Process PrecedingMR');
6524: END IF;
6525:
6526:
6527: END Process_PrecedingMR;

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

6538:
6539: BEGIN
6540:
6541: IF G_DEBUG = 'Y' THEN
6542: AHL_DEBUG_PUB.Debug('Start Update Check Flag');
6543: END IF;
6544:
6545: IF (p_dependent_mr_flag) THEN
6546: /* i.e accomplishment is based on preceding MR */

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

6562:
6563: END IF;
6564:
6565: IF G_DEBUG = 'Y' THEN
6566: AHL_DEBUG_PUB.Debug('End Update Check Flag');
6567: END IF;
6568:
6569: END Update_check_flag;
6570:

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

6577: IS
6578:
6579: BEGIN
6580: IF G_DEBUG = 'Y' THEN
6581: AHL_DEBUG_PUB.Debug('Start Create Temporary Unit Effect');
6582: END IF;
6583:
6584: -- insert into temporary table.
6585: insert into ahl_temp_unit_effectivities (

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

6641:
6642: );
6643:
6644: IF G_DEBUG = 'Y' THEN
6645: AHL_DEBUG_PUB.Debug('End Create Temp Unit Effect.');
6646: END IF;
6647:
6648: END Create_temp_unit_effectivity;
6649:

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

6659:
6660: BEGIN
6661:
6662: IF G_DEBUG = 'Y' THEN
6663: AHL_DEBUG_PUB.Debug('Start log error messages');
6664: END IF;
6665:
6666: -- Standard call to get message count.
6667: l_msg_count := FND_MSG_PUB.Count_Msg;

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

6674: p_msg_index_out => l_msg_index_out );
6675:
6676: fnd_file.put_line(FND_FILE.LOG, 'Err message-'||l_msg_index_out||':' || l_msg_data);
6677: IF G_DEBUG = 'Y' THEN
6678: AHL_DEBUG_PUB.Debug('Err message-'||l_msg_index_out||':' || substr(l_msg_data,1,240));
6679: END IF;
6680:
6681: END LOOP;
6682:

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

6680:
6681: END LOOP;
6682:
6683: IF G_DEBUG = 'Y' THEN
6684: AHL_DEBUG_PUB.Debug('End log error messages');
6685: END IF;
6686:
6687:
6688: END log_error_messages;

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

6720:
6721: BEGIN
6722:
6723: IF G_DEBUG = 'Y' THEN
6724: AHL_DEBUG_PUB.debug('Start of PopulatePM_Appl_MRs');
6725: END IF;
6726:
6727: -- call api to fetch all applicable mrs for PM installation.
6728: AHL_FMP_PVT.get_pm_applicable_mrs(

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

6796: END IF;
6797: END IF;
6798:
6799: IF G_DEBUG = 'Y' THEN
6800: AHL_DEBUG_PUB.debug('Successfully inserted for Act ID:' || l_appl_activities_tbl(j).MR_HEADER_ID);
6801: END IF;
6802:
6803: END LOOP; -- next activities record.
6804: END IF; -- activity COUNT.

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

6824: l_pgm_index := l_pgm_index + 1;
6825: l_UnSch_programs_tbl(l_pgm_index).program_mr_header_id := l_appl_programs_tbl(i).PM_program_id;
6826: l_UnSch_programs_tbl(l_pgm_index).mr_effectivity_id := l_appl_programs_tbl(i).mr_effectivity_id;
6827: IF G_DEBUG = 'Y' THEN
6828: AHL_DEBUG_PUB.debug('Successfully added Program to l_UnSch_programs_tbl:index:value:' || i || ':' ||
6829: l_UnSch_programs_tbl(l_pgm_index).program_mr_header_id);
6830: END IF;
6831:
6832: END IF;

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

6838: -- set output parameter.
6839: x_unsch_programs_tbl := l_UnSch_programs_tbl;
6840:
6841: IF G_DEBUG = 'Y' THEN
6842: AHL_DEBUG_PUB.debug('End of PopulatePM_Appl_MRs');
6843: END IF;
6844:
6845: END PopulatePM_Appl_MRs;
6846:

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

6854:
6855: BEGIN
6856:
6857: IF G_DEBUG = 'Y' THEN
6858: AHL_DEBUG_PUB.Debug('Start of Process_PM_Unit procedure');
6859: END IF;
6860:
6861: -- Get current usage of all the counters defined for the item instance.
6862: get_Current_Usage (p_csi_item_instance_id,

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

6876: -- to the newly created ones in the temporary table.
6877: Assign_Unit_effectivity_IDs;
6878:
6879: IF G_DEBUG = 'Y' THEN
6880: AHL_DEBUG_PUB.Debug('End of Process_PM_Unit procedure');
6881: END IF;
6882:
6883: END Process_PM_Unit;
6884:

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

6934:
6935: BEGIN
6936:
6937: IF G_DEBUG = 'Y' THEN
6938: AHL_DEBUG_PUB.Debug('Start of CALC_PROGRAM_END_DATES procedure');
6939: END IF;
6940:
6941: FOR program_rec IN ahl_cont_not_scheduled_csr LOOP
6942: -- Initialize variables.

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

6946: l_UnSch_program_tbl.DELETE;
6947: l_tbl_index := 0;
6948:
6949: IF G_DEBUG = 'Y' THEN
6950: AHL_DEBUG_PUB.Debug('Calculating program end date for:' || program_rec.program_mr_header_id);
6951: END IF;
6952:
6953: -- build temporary table containing the effectivities associated to the program.
6954: IF (p_UnSch_programs_tbl.COUNT > 0) THEN

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

6965: IF (l_UnSch_program_tbl.COUNT > 0) THEN
6966: FOR i IN l_UnSch_program_tbl.FIRST..l_UnSch_program_tbl.LAST LOOP
6967:
6968: IF G_DEBUG = 'Y' THEN
6969: AHL_DEBUG_PUB.Debug('Processing for program effectivity-id:' || l_UnSch_program_tbl(l_tbl_index).mr_effectivity_id);
6970: END IF;
6971:
6972: OPEN ahl_program_eff_csr (l_UnSch_program_tbl(i).mr_effectivity_id);
6973: FETCH ahl_program_eff_csr INTO l_effectivity_rec;

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

6975: -- read intervals for the effectivity.
6976: FOR interval_rec IN ahl_mr_interval_csr(l_effectivity_rec.mr_effectivity_id) LOOP
6977:
6978: IF G_DEBUG = 'Y' THEN
6979: AHL_DEBUG_PUB.Debug('Processing for interval:' || interval_rec.mr_interval_id);
6980: END IF;
6981:
6982: -- Set current usage counter value.
6983: l_current_ctr_value := 0;

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

7093: END LOOP; /* program table */
7094: END IF; /* count */
7095:
7096: IF G_DEBUG = 'Y' THEN
7097: AHL_DEBUG_PUB.Debug('Program end date:' || l_program_due_date );
7098: AHL_DEBUG_PUB.Debug('Program calender days:' || l_program_calender_days );
7099: END IF;
7100:
7101: -- Update record in ahl_applicable_mrs with the calculated program end date.

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

7094: END IF; /* count */
7095:
7096: IF G_DEBUG = 'Y' THEN
7097: AHL_DEBUG_PUB.Debug('Program end date:' || l_program_due_date );
7098: AHL_DEBUG_PUB.Debug('Program calender days:' || l_program_calender_days );
7099: END IF;
7100:
7101: -- Update record in ahl_applicable_mrs with the calculated program end date.
7102: IF (l_program_expired_flag) THEN

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

7106: ' WHERE program_mr_header_id = :2'||
7107: ' AND PM_schedule_exists = :3';
7108:
7109: IF G_DEBUG = 'Y' THEN
7110: AHL_DEBUG_PUB.Debug('Expire SQL string:' || l_upd_SQLstmt_str);
7111: END IF;
7112:
7113: EXECUTE IMMEDIATE l_upd_SQLstmt_str USING SYSDATE - 1,
7114: program_rec.program_mr_header_id,

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

7146: END IF;
7147:
7148:
7149: IF G_DEBUG = 'Y' THEN
7150: AHL_DEBUG_PUB.Debug('SQL string:' || l_upd_SQLstmt_str);
7151: END IF;
7152:
7153: EXECUTE IMMEDIATE l_upd_SQLstmt_str USING l_program_due_date,
7154: l_program_calender_days,

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

7159:
7160: END LOOP; /* next program rec */
7161:
7162: IF G_DEBUG = 'Y' THEN
7163: AHL_DEBUG_PUB.Debug('End of CALC_PROGRAM_END_DATES procedure');
7164: END IF;
7165:
7166: END Calc_Program_End_Dates;
7167:

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

7262:
7263: BEGIN
7264:
7265: IF G_DEBUG = 'Y' THEN
7266: AHL_DEBUG_PUB.Debug('Start of PROCESS_PMSCH_ACTIVITIES procedure');
7267: END IF;
7268:
7269: FOR sch_activity_rec IN ahl_sch_activity_csr LOOP
7270:

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

7268:
7269: FOR sch_activity_rec IN ahl_sch_activity_csr LOOP
7270:
7271: IF G_DEBUG = 'Y' THEN
7272: AHL_DEBUG_PUB.Debug('Processing for:' || sch_activity_rec.mr_header_id);
7273: AHL_DEBUG_PUB.Debug('Processing for Item Instance:' || sch_activity_rec.csi_item_instance_id);
7274: AHL_DEBUG_PUB.Debug('Processing for Repetitive flag:' || sch_activity_rec.repetitive_flag);
7275: AHL_DEBUG_PUB.Debug('Processing for SHow Repetitive code:' || sch_activity_rec.show_repetitive_code);
7276: END IF;

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

7269: FOR sch_activity_rec IN ahl_sch_activity_csr LOOP
7270:
7271: IF G_DEBUG = 'Y' THEN
7272: AHL_DEBUG_PUB.Debug('Processing for:' || sch_activity_rec.mr_header_id);
7273: AHL_DEBUG_PUB.Debug('Processing for Item Instance:' || sch_activity_rec.csi_item_instance_id);
7274: AHL_DEBUG_PUB.Debug('Processing for Repetitive flag:' || sch_activity_rec.repetitive_flag);
7275: AHL_DEBUG_PUB.Debug('Processing for SHow Repetitive code:' || sch_activity_rec.show_repetitive_code);
7276: END IF;
7277:

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

7270:
7271: IF G_DEBUG = 'Y' THEN
7272: AHL_DEBUG_PUB.Debug('Processing for:' || sch_activity_rec.mr_header_id);
7273: AHL_DEBUG_PUB.Debug('Processing for Item Instance:' || sch_activity_rec.csi_item_instance_id);
7274: AHL_DEBUG_PUB.Debug('Processing for Repetitive flag:' || sch_activity_rec.repetitive_flag);
7275: AHL_DEBUG_PUB.Debug('Processing for SHow Repetitive code:' || sch_activity_rec.show_repetitive_code);
7276: END IF;
7277:
7278: -- initialize forecast sequence for the activity.

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

7271: IF G_DEBUG = 'Y' THEN
7272: AHL_DEBUG_PUB.Debug('Processing for:' || sch_activity_rec.mr_header_id);
7273: AHL_DEBUG_PUB.Debug('Processing for Item Instance:' || sch_activity_rec.csi_item_instance_id);
7274: AHL_DEBUG_PUB.Debug('Processing for Repetitive flag:' || sch_activity_rec.repetitive_flag);
7275: AHL_DEBUG_PUB.Debug('Processing for SHow Repetitive code:' || sch_activity_rec.show_repetitive_code);
7276: END IF;
7277:
7278: -- initialize forecast sequence for the activity.
7279: l_forecast_sequence := 0;

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

7324: FETCH ahl_due_date_csr INTO l_last_due_date, l_last_accomplishment_date;
7325: IF (ahl_due_date_csr%FOUND) THEN
7326: IF (l_last_accomplishment_date IS NOT NULL) THEN
7327: IF G_DEBUG = 'Y' THEN
7328: AHL_DEBUG_PUB.debug('l_last_accomplishment_date:' || l_last_accomplishment_date);
7329: END IF;
7330:
7331: /* Fix for FP bug# 6327241
7332: -- get due date associated to the accomplishment date.

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

7339: */
7340:
7341: IF (l_last_due_date IS NOT NULL) THEN
7342: IF G_DEBUG = 'Y' THEN
7343: AHL_DEBUG_PUB.Debug('l_last_due_date is not null:' || l_last_due_date);
7344: END IF;
7345:
7346: l_last_accomplishment_date := l_last_due_date + 1;
7347: END IF;

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

7375: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
7376: END IF;
7377:
7378: IF G_DEBUG = 'Y' THEN
7379: AHL_DEBUG_PUB.debug('Service Line ID: ' || l_inp_sch_rec.service_line_id);
7380: AHL_DEBUG_PUB.debug('Program ID: ' || l_inp_sch_rec.program_id);
7381: AHL_DEBUG_PUB.debug('Activity ID: ' || l_inp_sch_rec.activity_id);
7382: AHL_DEBUG_PUB.debug('Start Date: ' || to_char(l_inp_sch_rec.schedule_start_date, 'DD-MON-YYYY HH24:MI:SS'));
7383: AHL_DEBUG_PUB.debug('End Date: ' || to_char(l_inp_sch_rec.schedule_end_date, 'DD-MON-YYYY HH24:MI:SS'));

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

7376: END IF;
7377:
7378: IF G_DEBUG = 'Y' THEN
7379: AHL_DEBUG_PUB.debug('Service Line ID: ' || l_inp_sch_rec.service_line_id);
7380: AHL_DEBUG_PUB.debug('Program ID: ' || l_inp_sch_rec.program_id);
7381: AHL_DEBUG_PUB.debug('Activity ID: ' || l_inp_sch_rec.activity_id);
7382: AHL_DEBUG_PUB.debug('Start Date: ' || to_char(l_inp_sch_rec.schedule_start_date, 'DD-MON-YYYY HH24:MI:SS'));
7383: AHL_DEBUG_PUB.debug('End Date: ' || to_char(l_inp_sch_rec.schedule_end_date, 'DD-MON-YYYY HH24:MI:SS'));
7384: AHL_DEBUG_PUB.debug('Count of l_pm_schedule_tbl is: ' || l_pm_schedule_tbl.count);

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

7377:
7378: IF G_DEBUG = 'Y' THEN
7379: AHL_DEBUG_PUB.debug('Service Line ID: ' || l_inp_sch_rec.service_line_id);
7380: AHL_DEBUG_PUB.debug('Program ID: ' || l_inp_sch_rec.program_id);
7381: AHL_DEBUG_PUB.debug('Activity ID: ' || l_inp_sch_rec.activity_id);
7382: AHL_DEBUG_PUB.debug('Start Date: ' || to_char(l_inp_sch_rec.schedule_start_date, 'DD-MON-YYYY HH24:MI:SS'));
7383: AHL_DEBUG_PUB.debug('End Date: ' || to_char(l_inp_sch_rec.schedule_end_date, 'DD-MON-YYYY HH24:MI:SS'));
7384: AHL_DEBUG_PUB.debug('Count of l_pm_schedule_tbl is: ' || l_pm_schedule_tbl.count);
7385:

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

7378: IF G_DEBUG = 'Y' THEN
7379: AHL_DEBUG_PUB.debug('Service Line ID: ' || l_inp_sch_rec.service_line_id);
7380: AHL_DEBUG_PUB.debug('Program ID: ' || l_inp_sch_rec.program_id);
7381: AHL_DEBUG_PUB.debug('Activity ID: ' || l_inp_sch_rec.activity_id);
7382: AHL_DEBUG_PUB.debug('Start Date: ' || to_char(l_inp_sch_rec.schedule_start_date, 'DD-MON-YYYY HH24:MI:SS'));
7383: AHL_DEBUG_PUB.debug('End Date: ' || to_char(l_inp_sch_rec.schedule_end_date, 'DD-MON-YYYY HH24:MI:SS'));
7384: AHL_DEBUG_PUB.debug('Count of l_pm_schedule_tbl is: ' || l_pm_schedule_tbl.count);
7385:
7386: IF (l_pm_schedule_tbl.count > 0 ) THEN

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

7379: AHL_DEBUG_PUB.debug('Service Line ID: ' || l_inp_sch_rec.service_line_id);
7380: AHL_DEBUG_PUB.debug('Program ID: ' || l_inp_sch_rec.program_id);
7381: AHL_DEBUG_PUB.debug('Activity ID: ' || l_inp_sch_rec.activity_id);
7382: AHL_DEBUG_PUB.debug('Start Date: ' || to_char(l_inp_sch_rec.schedule_start_date, 'DD-MON-YYYY HH24:MI:SS'));
7383: AHL_DEBUG_PUB.debug('End Date: ' || to_char(l_inp_sch_rec.schedule_end_date, 'DD-MON-YYYY HH24:MI:SS'));
7384: AHL_DEBUG_PUB.debug('Count of l_pm_schedule_tbl is: ' || l_pm_schedule_tbl.count);
7385:
7386: IF (l_pm_schedule_tbl.count > 0 ) THEN
7387: for i in l_pm_schedule_tbl.first..l_pm_schedule_tbl.last loop

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

7380: AHL_DEBUG_PUB.debug('Program ID: ' || l_inp_sch_rec.program_id);
7381: AHL_DEBUG_PUB.debug('Activity ID: ' || l_inp_sch_rec.activity_id);
7382: AHL_DEBUG_PUB.debug('Start Date: ' || to_char(l_inp_sch_rec.schedule_start_date, 'DD-MON-YYYY HH24:MI:SS'));
7383: AHL_DEBUG_PUB.debug('End Date: ' || to_char(l_inp_sch_rec.schedule_end_date, 'DD-MON-YYYY HH24:MI:SS'));
7384: AHL_DEBUG_PUB.debug('Count of l_pm_schedule_tbl is: ' || l_pm_schedule_tbl.count);
7385:
7386: IF (l_pm_schedule_tbl.count > 0 ) THEN
7387: for i in l_pm_schedule_tbl.first..l_pm_schedule_tbl.last loop
7388: AHL_DEBUG_PUB.debug('Serv Line for ' || i ||':' || l_pm_schedule_tbl(i).service_line_id);

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

7384: AHL_DEBUG_PUB.debug('Count of l_pm_schedule_tbl is: ' || l_pm_schedule_tbl.count);
7385:
7386: IF (l_pm_schedule_tbl.count > 0 ) THEN
7387: for i in l_pm_schedule_tbl.first..l_pm_schedule_tbl.last loop
7388: AHL_DEBUG_PUB.debug('Serv Line for ' || i ||':' || l_pm_schedule_tbl(i).service_line_id);
7389: AHL_DEBUG_PUB.debug('Sch ON for ' || i ||':' || l_pm_schedule_tbl(i).schedule_on);
7390: AHL_DEBUG_PUB.debug('Sch Start for ' || i ||':' || l_pm_schedule_tbl(i).schedule_from);
7391: AHL_DEBUG_PUB.debug('Sch End for ' || i ||':' || l_pm_schedule_tbl(i).schedule_to);
7392: end loop;

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

7385:
7386: IF (l_pm_schedule_tbl.count > 0 ) THEN
7387: for i in l_pm_schedule_tbl.first..l_pm_schedule_tbl.last loop
7388: AHL_DEBUG_PUB.debug('Serv Line for ' || i ||':' || l_pm_schedule_tbl(i).service_line_id);
7389: AHL_DEBUG_PUB.debug('Sch ON for ' || i ||':' || l_pm_schedule_tbl(i).schedule_on);
7390: AHL_DEBUG_PUB.debug('Sch Start for ' || i ||':' || l_pm_schedule_tbl(i).schedule_from);
7391: AHL_DEBUG_PUB.debug('Sch End for ' || i ||':' || l_pm_schedule_tbl(i).schedule_to);
7392: end loop;
7393: END IF;

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

7386: IF (l_pm_schedule_tbl.count > 0 ) THEN
7387: for i in l_pm_schedule_tbl.first..l_pm_schedule_tbl.last loop
7388: AHL_DEBUG_PUB.debug('Serv Line for ' || i ||':' || l_pm_schedule_tbl(i).service_line_id);
7389: AHL_DEBUG_PUB.debug('Sch ON for ' || i ||':' || l_pm_schedule_tbl(i).schedule_on);
7390: AHL_DEBUG_PUB.debug('Sch Start for ' || i ||':' || l_pm_schedule_tbl(i).schedule_from);
7391: AHL_DEBUG_PUB.debug('Sch End for ' || i ||':' || l_pm_schedule_tbl(i).schedule_to);
7392: end loop;
7393: END IF;
7394: END IF;

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

7387: for i in l_pm_schedule_tbl.first..l_pm_schedule_tbl.last loop
7388: AHL_DEBUG_PUB.debug('Serv Line for ' || i ||':' || l_pm_schedule_tbl(i).service_line_id);
7389: AHL_DEBUG_PUB.debug('Sch ON for ' || i ||':' || l_pm_schedule_tbl(i).schedule_on);
7390: AHL_DEBUG_PUB.debug('Sch Start for ' || i ||':' || l_pm_schedule_tbl(i).schedule_from);
7391: AHL_DEBUG_PUB.debug('Sch End for ' || i ||':' || l_pm_schedule_tbl(i).schedule_to);
7392: end loop;
7393: END IF;
7394: END IF;
7395:

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

7463: ' WHERE mr_header_id = :1 AND pm_schedule_exists = ''N'' '||
7464: ' AND service_line_id <> :2';
7465:
7466: IF G_DEBUG = 'Y' THEN
7467: AHL_DEBUG_PUB.Debug('SQL string:' || l_del_SQLstmt_str);
7468: END IF;
7469:
7470: EXECUTE IMMEDIATE l_del_SQLstmt_str USING sch_activity_rec.mr_header_id,
7471: sch_activity_rec.service_line_id;

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

7473: --CLOSE ahl_cont_scheduled_csr;
7474: END LOOP; /* for ahl_sch_program_csr */
7475:
7476: IF G_DEBUG = 'Y' THEN
7477: AHL_DEBUG_PUB.debug('End of PROCESS_PMSCH_ACTIVITIES procedure');
7478: END IF;
7479:
7480: END Process_PMSch_Activities;
7481: ----------------------------------------------------------

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

7538:
7539: BEGIN
7540:
7541: IF G_DEBUG = 'Y' THEN
7542: AHL_DEBUG_PUB.Debug('Start of process_pmunsch_activities procedure');
7543: END IF;
7544:
7545: FOR appl_mrs_rec IN ahl_UnSch_activity_csr LOOP
7546:

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

7556: l_applicable_mrs_rec.effective_to := appl_mrs_rec.effective_to;
7557: l_applicable_mrs_rec.effective_from := appl_mrs_rec.effective_from;
7558:
7559: IF G_DEBUG = 'Y' THEN
7560: AHL_DEBUG_PUB.Debug('Processing for:' || appl_mrs_rec.mr_header_id);
7561: END IF;
7562:
7563: -- Set last accomplishment details.
7564: Get_accomplishment_details(p_applicable_mrs_rec => l_applicable_mrs_rec,

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

7572: x_mr_accomplish_exists => l_mr_accomplish_exists,
7573: x_no_forecast_flag => l_no_forecast_flag );
7574:
7575: IF G_DEBUG = 'Y' THEN
7576: AHL_DEBUG_PUB.Debug('Start of process_pmunsch_activities procedure');
7577: END IF;
7578:
7579: -- No need to check l_no_forecast_flag as this does not apply to PM flow.
7580: -- Check for one time MR case and process otherwise only.

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

7593: p_dependent_mr_flag => l_dependent_mr_flag,
7594: p_mr_accomplish_exists => l_mr_accomplish_exists,
7595: x_next_due_date_rec => l_next_due_date_rec);
7596: IF G_DEBUG = 'Y' THEN
7597: AHL_DEBUG_PUB.Debug('Aft calculate_due_date nextdue');
7598: AHL_DEBUG_PUB.Debug('due date is ' || l_next_due_date_rec.DUE_DATE);
7599: END IF;
7600:
7601: l_next_due_flag := TRUE;

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

7594: p_mr_accomplish_exists => l_mr_accomplish_exists,
7595: x_next_due_date_rec => l_next_due_date_rec);
7596: IF G_DEBUG = 'Y' THEN
7597: AHL_DEBUG_PUB.Debug('Aft calculate_due_date nextdue');
7598: AHL_DEBUG_PUB.Debug('due date is ' || l_next_due_date_rec.DUE_DATE);
7599: END IF;
7600:
7601: l_next_due_flag := TRUE;
7602: /* next due mr calculation. */

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

7643: -- write into temporary table if contract found.
7644: IF (l_contract_found_flag) THEN
7645:
7646: IF G_DEBUG = 'Y' THEN
7647: AHL_DEBUG_PUB.debug('contract found for due date:' ||l_due_date);
7648: AHL_DEBUG_PUB.debug('contract found with override date:' || l_contract_override_due_date);
7649: AHL_DEBUG_PUB.debug('contract found with override earliest:' || l_cont_override_earliest_due);
7650: AHL_DEBUG_PUB.debug('contract found with override latest:' || l_cont_override_latest_due);
7651: END IF;

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

7644: IF (l_contract_found_flag) THEN
7645:
7646: IF G_DEBUG = 'Y' THEN
7647: AHL_DEBUG_PUB.debug('contract found for due date:' ||l_due_date);
7648: AHL_DEBUG_PUB.debug('contract found with override date:' || l_contract_override_due_date);
7649: AHL_DEBUG_PUB.debug('contract found with override earliest:' || l_cont_override_earliest_due);
7650: AHL_DEBUG_PUB.debug('contract found with override latest:' || l_cont_override_latest_due);
7651: END IF;
7652:

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

7645:
7646: IF G_DEBUG = 'Y' THEN
7647: AHL_DEBUG_PUB.debug('contract found for due date:' ||l_due_date);
7648: AHL_DEBUG_PUB.debug('contract found with override date:' || l_contract_override_due_date);
7649: AHL_DEBUG_PUB.debug('contract found with override earliest:' || l_cont_override_earliest_due);
7650: AHL_DEBUG_PUB.debug('contract found with override latest:' || l_cont_override_latest_due);
7651: END IF;
7652:
7653: IF (l_contract_override_due_date IS NOT NULL) THEN

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

7646: IF G_DEBUG = 'Y' THEN
7647: AHL_DEBUG_PUB.debug('contract found for due date:' ||l_due_date);
7648: AHL_DEBUG_PUB.debug('contract found with override date:' || l_contract_override_due_date);
7649: AHL_DEBUG_PUB.debug('contract found with override earliest:' || l_cont_override_earliest_due);
7650: AHL_DEBUG_PUB.debug('contract found with override latest:' || l_cont_override_latest_due);
7651: END IF;
7652:
7653: IF (l_contract_override_due_date IS NOT NULL) THEN
7654:

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

7737: l_due_date := sysdate;
7738: END IF;
7739:
7740: IF G_DEBUG = 'Y' THEN
7741: AHL_DEBUG_PUB.Debug('Processing for repetivity');
7742: AHL_DEBUG_PUB.Debug('l_last_due_date: '|| l_last_due_date);
7743: AHL_DEBUG_PUB.Debug('l_due_date: '|| l_due_date);
7744: IF (l_last_due_counter_val_tbl.COUNT > 0) THEN
7745: FOR i in l_last_due_counter_val_tbl.FIRST..l_last_due_counter_val_tbl.LAST LOOP

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

7738: END IF;
7739:
7740: IF G_DEBUG = 'Y' THEN
7741: AHL_DEBUG_PUB.Debug('Processing for repetivity');
7742: AHL_DEBUG_PUB.Debug('l_last_due_date: '|| l_last_due_date);
7743: AHL_DEBUG_PUB.Debug('l_due_date: '|| l_due_date);
7744: IF (l_last_due_counter_val_tbl.COUNT > 0) THEN
7745: FOR i in l_last_due_counter_val_tbl.FIRST..l_last_due_counter_val_tbl.LAST LOOP
7746: 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 7743: AHL_DEBUG_PUB.Debug('l_due_date: '|| l_due_date);

7739:
7740: IF G_DEBUG = 'Y' THEN
7741: AHL_DEBUG_PUB.Debug('Processing for repetivity');
7742: AHL_DEBUG_PUB.Debug('l_last_due_date: '|| l_last_due_date);
7743: AHL_DEBUG_PUB.Debug('l_due_date: '|| l_due_date);
7744: IF (l_last_due_counter_val_tbl.COUNT > 0) THEN
7745: FOR i in l_last_due_counter_val_tbl.FIRST..l_last_due_counter_val_tbl.LAST LOOP
7746: 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);
7747: END LOOP;

Line 7746: 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);

7742: AHL_DEBUG_PUB.Debug('l_last_due_date: '|| l_last_due_date);
7743: AHL_DEBUG_PUB.Debug('l_due_date: '|| l_due_date);
7744: IF (l_last_due_counter_val_tbl.COUNT > 0) THEN
7745: FOR i in l_last_due_counter_val_tbl.FIRST..l_last_due_counter_val_tbl.LAST LOOP
7746: 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);
7747: END LOOP;
7748: END IF;
7749: END IF;
7750:

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

7766: l_last_due_date := l_due_date;
7767: l_last_due_counter_val_tbl := l_due_at_counter_val_tbl;
7768:
7769: IF G_DEBUG = 'Y' THEN
7770: AHL_DEBUG_PUB.Debug('AFter get_due_at_counter_values');
7771: AHL_DEBUG_PUB.Debug('l_last_due_date: '|| l_last_due_date);
7772: AHL_DEBUG_PUB.Debug('l_due_date: '|| l_due_date);
7773: IF (l_due_at_counter_val_tbl.COUNT) > 0 THEN
7774: FOR i in l_due_at_counter_val_tbl.FIRST..l_due_at_counter_val_tbl.LAST LOOP

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

7767: l_last_due_counter_val_tbl := l_due_at_counter_val_tbl;
7768:
7769: IF G_DEBUG = 'Y' THEN
7770: AHL_DEBUG_PUB.Debug('AFter get_due_at_counter_values');
7771: AHL_DEBUG_PUB.Debug('l_last_due_date: '|| l_last_due_date);
7772: AHL_DEBUG_PUB.Debug('l_due_date: '|| l_due_date);
7773: IF (l_due_at_counter_val_tbl.COUNT) > 0 THEN
7774: FOR i in l_due_at_counter_val_tbl.FIRST..l_due_at_counter_val_tbl.LAST LOOP
7775: 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 7772: AHL_DEBUG_PUB.Debug('l_due_date: '|| l_due_date);

7768:
7769: IF G_DEBUG = 'Y' THEN
7770: AHL_DEBUG_PUB.Debug('AFter get_due_at_counter_values');
7771: AHL_DEBUG_PUB.Debug('l_last_due_date: '|| l_last_due_date);
7772: AHL_DEBUG_PUB.Debug('l_due_date: '|| l_due_date);
7773: IF (l_due_at_counter_val_tbl.COUNT) > 0 THEN
7774: FOR i in l_due_at_counter_val_tbl.FIRST..l_due_at_counter_val_tbl.LAST LOOP
7775: 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);
7776: end loop;

Line 7775: 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);

7771: AHL_DEBUG_PUB.Debug('l_last_due_date: '|| l_last_due_date);
7772: AHL_DEBUG_PUB.Debug('l_due_date: '|| l_due_date);
7773: IF (l_due_at_counter_val_tbl.COUNT) > 0 THEN
7774: FOR i in l_due_at_counter_val_tbl.FIRST..l_due_at_counter_val_tbl.LAST LOOP
7775: 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);
7776: end loop;
7777: END IF;
7778: END IF;
7779:

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

7788: p_last_due_mr_interval_id => l_last_due_mr_interval_id,
7789: x_next_due_date_rec => l_next_due_date_rec);
7790:
7791: IF G_DEBUG = 'Y' THEN
7792: AHL_DEBUG_PUB.Debug('aft calculate_due_date - repetivity');
7793: AHL_DEBUG_PUB.Debug('due date is ' || l_next_due_date_rec.DUE_DATE);
7794: END IF;
7795:
7796: -- Check if calculated date is same as last due date. If they are the same then, add one day.

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

7789: x_next_due_date_rec => l_next_due_date_rec);
7790:
7791: IF G_DEBUG = 'Y' THEN
7792: AHL_DEBUG_PUB.Debug('aft calculate_due_date - repetivity');
7793: AHL_DEBUG_PUB.Debug('due date is ' || l_next_due_date_rec.DUE_DATE);
7794: END IF;
7795:
7796: -- Check if calculated date is same as last due date. If they are the same then, add one day.
7797: IF (l_next_due_date_rec.due_date IS NOT NULL) THEN

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

7800: l_next_due_date_rec.EARLIEST_DUE_DATE := NULL;
7801: l_next_due_date_rec.latest_due_date := NULL;
7802:
7803: IF G_DEBUG = 'Y' THEN
7804: AHL_DEBUG_PUB.Debug('Adding one day to l_next_due_date_rec.due_date:' || l_next_due_date_rec.due_date);
7805: END IF;
7806:
7807: --IF G_DEBUG = 'Y' THEN
7808: -- AHL_DEBUG_PUB.Debug('Exiting build effectivity as last due = due date');

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

7804: AHL_DEBUG_PUB.Debug('Adding one day to l_next_due_date_rec.due_date:' || l_next_due_date_rec.due_date);
7805: END IF;
7806:
7807: --IF G_DEBUG = 'Y' THEN
7808: -- AHL_DEBUG_PUB.Debug('Exiting build effectivity as last due = due date');
7809: --END IF;
7810: --EXIT;
7811: END IF;
7812: END IF;

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

7817:
7818: END LOOP; /* ahl_UnSch_contracts_csr */
7819:
7820: IF G_DEBUG = 'Y' THEN
7821: AHL_DEBUG_PUB.debug('End of process_pmunsch_activities procedure');
7822: END IF;
7823:
7824: END Process_PMUnSch_Activities;
7825:

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

7890:
7891: BEGIN
7892:
7893: IF G_DEBUG = 'Y' THEN
7894: AHL_DEBUG_PUB.debug('Start of Get_PMprogram procedure for MR:Due Date is: ' ||
7895: p_mr_header_id || ':' || p_due_date);
7896: END IF;
7897:
7898: -- Initialize.

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

7971: CLOSE ahl_contract_exists_csr;
7972:
7973: IF G_DEBUG = 'Y' THEN
7974: IF NOT(x_contract_found_flag) THEN
7975: AHL_DEBUG_PUB.debug('Contract Not Found');
7976: END IF;
7977: AHL_DEBUG_PUB.debug('End of Get_PMprogram procedure');
7978: END IF;
7979:

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

7973: IF G_DEBUG = 'Y' THEN
7974: IF NOT(x_contract_found_flag) THEN
7975: AHL_DEBUG_PUB.debug('Contract Not Found');
7976: END IF;
7977: AHL_DEBUG_PUB.debug('End of Get_PMprogram procedure');
7978: END IF;
7979:
7980: END Get_PMprogram;
7981:

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

8024:
8025: BEGIN
8026:
8027: IF G_DEBUG = 'Y' THEN
8028: AHL_DEBUG_PUB.debug('Start of assign_unit_effectivity_ids procedure');
8029: END IF;
8030:
8031: -- Application usage code.
8032: l_appl_usg_code := FND_PROFILE.VALUE('AHL_APPLN_USAGE');

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

8093:
8094: END LOOP; -- ahl_mr_header_csr.
8095:
8096: IF G_DEBUG = 'Y' THEN
8097: AHL_DEBUG_PUB.debug('End of assign_unit_effectivity_ids procedure');
8098: END IF;
8099:
8100: END Assign_Unit_Effectivity_IDs;
8101:

Line 8179: AHL_DEBUG_PUB.enable_debug;

8175: x_return_status := FND_API.G_RET_STS_SUCCESS;
8176:
8177: -- Enable Debug.
8178: IF G_DEBUG = 'Y' THEN
8179: AHL_DEBUG_PUB.enable_debug;
8180: END IF;
8181:
8182: -- Add debug mesg.
8183: IF G_DEBUG = 'Y' THEN

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

8180: END IF;
8181:
8182: -- Add debug mesg.
8183: IF G_DEBUG = 'Y' THEN
8184: AHL_DEBUG_PUB.debug('Begin private API:' || G_PKG_NAME || '.' || 'Get_Deferred_Due_Date');
8185: AHL_DEBUG_PUB.debug('Dump of input parameters:');
8186: AHL_DEBUG_PUB.debug('Unit Effectivity ID:' || p_unit_effectivity_id);
8187: AHL_DEBUG_PUB.debug('Count on p_deferral_threshold_tbl:' || p_deferral_threshold_tbl.COUNT);
8188: END IF;

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

8181:
8182: -- Add debug mesg.
8183: IF G_DEBUG = 'Y' THEN
8184: AHL_DEBUG_PUB.debug('Begin private API:' || G_PKG_NAME || '.' || 'Get_Deferred_Due_Date');
8185: AHL_DEBUG_PUB.debug('Dump of input parameters:');
8186: AHL_DEBUG_PUB.debug('Unit Effectivity ID:' || p_unit_effectivity_id);
8187: AHL_DEBUG_PUB.debug('Count on p_deferral_threshold_tbl:' || p_deferral_threshold_tbl.COUNT);
8188: END IF;
8189:

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

8182: -- Add debug mesg.
8183: IF G_DEBUG = 'Y' THEN
8184: AHL_DEBUG_PUB.debug('Begin private API:' || G_PKG_NAME || '.' || 'Get_Deferred_Due_Date');
8185: AHL_DEBUG_PUB.debug('Dump of input parameters:');
8186: AHL_DEBUG_PUB.debug('Unit Effectivity ID:' || p_unit_effectivity_id);
8187: AHL_DEBUG_PUB.debug('Count on p_deferral_threshold_tbl:' || p_deferral_threshold_tbl.COUNT);
8188: END IF;
8189:
8190: -- Validate input parameters.

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

8183: IF G_DEBUG = 'Y' THEN
8184: AHL_DEBUG_PUB.debug('Begin private API:' || G_PKG_NAME || '.' || 'Get_Deferred_Due_Date');
8185: AHL_DEBUG_PUB.debug('Dump of input parameters:');
8186: AHL_DEBUG_PUB.debug('Unit Effectivity ID:' || p_unit_effectivity_id);
8187: AHL_DEBUG_PUB.debug('Count on p_deferral_threshold_tbl:' || p_deferral_threshold_tbl.COUNT);
8188: END IF;
8189:
8190: -- Validate input parameters.
8191: IF (p_unit_effectivity_id IS NULL OR p_unit_effectivity_id = FND_API.G_MISS_NUM) THEN

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

8219: l_whichever_first_code := 'FIRST';
8220: END IF;
8221:
8222: IF G_DEBUG = 'Y' THEN
8223: AHL_DEBUG_PUB.debug('Step 1');
8224: AHL_DEBUG_PUB.debug('MR Header ID:' || l_mr_header_id);
8225: AHL_DEBUG_PUB.debug('CSI Item Instance ID:' || l_csi_item_instance_id);
8226: END IF;
8227:

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

8220: END IF;
8221:
8222: IF G_DEBUG = 'Y' THEN
8223: AHL_DEBUG_PUB.debug('Step 1');
8224: AHL_DEBUG_PUB.debug('MR Header ID:' || l_mr_header_id);
8225: AHL_DEBUG_PUB.debug('CSI Item Instance ID:' || l_csi_item_instance_id);
8226: END IF;
8227:
8228: -- Get Unit and Master Config IDs if available.

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

8221:
8222: IF G_DEBUG = 'Y' THEN
8223: AHL_DEBUG_PUB.debug('Step 1');
8224: AHL_DEBUG_PUB.debug('MR Header ID:' || l_mr_header_id);
8225: AHL_DEBUG_PUB.debug('CSI Item Instance ID:' || l_csi_item_instance_id);
8226: END IF;
8227:
8228: -- Get Unit and Master Config IDs if available.
8229: -- Find the root item instance.

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

8233: Get_Unit_Master_ConfigIDs (l_root_csi_instance_id,
8234: l_uc_header_id, G_master_config_id);
8235:
8236: IF G_DEBUG = 'Y' THEN
8237: AHL_DEBUG_PUB.debug('Step 2');
8238: END IF;
8239:
8240: -- Check for errors.
8241: IF FND_MSG_PUB.Count_msg > 0 THEN

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

8242: RAISE FND_API.G_EXC_ERROR;
8243: END IF;
8244:
8245: IF G_DEBUG = 'Y' THEN
8246: AHL_DEBUG_PUB.debug('Step 3');
8247: END IF;
8248:
8249: -- Get utilization forecast for the unit/part.
8250: Get_Utilization_Forecast (l_root_csi_instance_id,

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

8253: l_inv_master_organization_id,
8254: G_forecast_details_tbl);
8255:
8256: IF G_DEBUG = 'Y' THEN
8257: AHL_DEBUG_PUB.debug('Step 4');
8258: AHL_DEBUG_PUB.debug('Count on util forecast tbl:' || G_forecast_details_tbl.count);
8259: END IF;
8260:
8261: -- Get the position installed in.

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

8254: G_forecast_details_tbl);
8255:
8256: IF G_DEBUG = 'Y' THEN
8257: AHL_DEBUG_PUB.debug('Step 4');
8258: AHL_DEBUG_PUB.debug('Count on util forecast tbl:' || G_forecast_details_tbl.count);
8259: END IF;
8260:
8261: -- Get the position installed in.
8262: OPEN csi_reln_csr(l_csi_item_instance_id);

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

8266: END IF;
8267: CLOSE csi_reln_csr;
8268:
8269: IF G_DEBUG = 'Y' THEN
8270: AHL_DEBUG_PUB.debug('Step 5');
8271: END IF;
8272:
8273: -- Build counter rules ratio if node is not root node.
8274: IF (G_master_config_id IS NOT NULL AND l_position_reference IS NOT NULL) THEN

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

8278: l_counter_rules_tbl);
8279: END IF;
8280:
8281: IF G_DEBUG = 'Y' THEN
8282: AHL_DEBUG_PUB.debug('Step 6');
8283: END IF;
8284:
8285: -- Calculate counter_remain and call get_date_from_uf.
8286: IF (p_deferral_threshold_tbl.COUNT > 0) THEN

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

8289: OPEN cs_ctr_counter_csr(l_csi_item_instance_id, p_deferral_threshold_tbl(i).counter_id);
8290: FETCH cs_ctr_counter_csr INTO l_counter_value;
8291: IF (cs_ctr_counter_csr%NOTFOUND) THEN
8292: IF G_DEBUG = 'Y' THEN
8293: AHL_DEBUG_PUB.debug('Step 7');
8294: END IF;
8295: l_counter_value := 0;
8296: END IF;
8297:

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

8297:
8298: CLOSE cs_ctr_counter_csr;
8299:
8300: IF G_DEBUG = 'Y' THEN
8301: AHL_DEBUG_PUB.debug('l_counter_value:' || l_counter_value);
8302: END IF;
8303:
8304: -- Get due date for counter remain.
8305: l_counter_remain := p_deferral_threshold_tbl(i).counter_value - l_counter_value;

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

8304: -- Get due date for counter remain.
8305: l_counter_remain := p_deferral_threshold_tbl(i).counter_value - l_counter_value;
8306:
8307: IF G_DEBUG = 'Y' THEN
8308: AHL_DEBUG_PUB.debug('l_counter_remain:' || l_counter_remain);
8309: END IF;
8310:
8311: -- get date from forecast.
8312: get_date_from_uf(l_counter_remain,

Line 8353: AHL_DEBUG_PUB.disable_debug;

8349: p_data => x_msg_data,
8350: p_encoded => fnd_api.g_false);
8351:
8352: -- Disable debug
8353: AHL_DEBUG_PUB.disable_debug;
8354:
8355: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
8356: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
8357: FND_MSG_PUB.count_and_get( p_count => x_msg_count,

Line 8362: AHL_DEBUG_PUB.disable_debug;

8358: p_data => x_msg_data,
8359: p_encoded => fnd_api.g_false);
8360:
8361: -- Disable debug
8362: AHL_DEBUG_PUB.disable_debug;
8363:
8364: WHEN OTHERS THEN
8365:
8366: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

Line 8378: AHL_DEBUG_PUB.disable_debug;

8374: p_encoded => fnd_api.g_false);
8375:
8376:
8377: -- Disable debug
8378: AHL_DEBUG_PUB.disable_debug;
8379:
8380: END Get_Deferred_Due_Date;
8381: ------------------------------------------------------------------
8382:

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

8444:
8445: BEGIN
8446:
8447: IF G_DEBUG = 'Y' THEN
8448: AHL_DEBUG_PUB.debug('Start of get_ctr_reading_for_date');
8449: END IF;
8450:
8451: OPEN cs_ctr_reading_csr(p_csi_item_instance_id,
8452: p_counter_id,

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

8459:
8460: x_net_reading := l_net_reading;
8461:
8462: IF G_DEBUG = 'Y' THEN
8463: AHL_DEBUG_PUB.debug('End of get_ctr_reading_for_date');
8464: END IF;
8465:
8466: END get_ctr_reading_for_date;
8467: -----------------------------------------------------------------------

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

8532: BEGIN
8533:
8534:
8535: IF G_DEBUG = 'Y' THEN
8536: AHL_DEBUG_PUB.debug('Start of get_ctr_date_for_reading');
8537: END IF;
8538:
8539: OPEN cs_ctr_reading_csr (p_csi_item_instance_id,
8540: p_counter_id,

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

8549: x_ctr_record_date := l_ctr_record_date;
8550: x_return_val := l_return_val;
8551:
8552: IF G_DEBUG = 'Y' THEN
8553: AHL_DEBUG_PUB.debug('End of get_ctr_date_for_reading');
8554: END IF;
8555:
8556: END get_ctr_date_for_reading;
8557:

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

8677:
8678: BEGIN
8679:
8680: IF G_DEBUG = 'Y' THEN
8681: AHL_DEBUG_PUB.debug('Start of process_Deferred_ue');
8682: END IF;
8683:
8684: -- get all open deferred unit effectivities.
8685: FOR unit_effectivity_rec IN ahl_deferred_ue_csr(p_csi_item_instance_id) LOOP

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

8684: -- get all open deferred unit effectivities.
8685: FOR unit_effectivity_rec IN ahl_deferred_ue_csr(p_csi_item_instance_id) LOOP
8686:
8687: IF G_DEBUG = 'Y' THEN
8688: AHL_DEBUG_PUB.debug('Processing ..ID:' || unit_effectivity_rec.unit_effectivity_id);
8689: AHL_DEBUG_PUB.debug('Processing ..unit_deferral_type:' || unit_effectivity_rec.unit_deferral_type);
8690: END IF;
8691:
8692: -- Initialize.

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

8685: FOR unit_effectivity_rec IN ahl_deferred_ue_csr(p_csi_item_instance_id) LOOP
8686:
8687: IF G_DEBUG = 'Y' THEN
8688: AHL_DEBUG_PUB.debug('Processing ..ID:' || unit_effectivity_rec.unit_effectivity_id);
8689: AHL_DEBUG_PUB.debug('Processing ..unit_deferral_type:' || unit_effectivity_rec.unit_deferral_type);
8690: END IF;
8691:
8692: -- Initialize.
8693: l_calc_due_date := null;

Line 8737: 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);

8733: END IF;
8734: END LOOP;
8735:
8736: IF G_DEBUG = 'Y' THEN
8737: 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);
8738:
8739: END IF;
8740:
8741: -- Calculate counter remain.

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

8818: END IF; -- current_usage_tbl.
8819: END LOOP; -- threshold rec.
8820:
8821: IF G_DEBUG = 'Y' THEN
8822: AHL_DEBUG_PUB.debug('l_calc_due_date:' || l_calc_due_date);
8823: AHL_DEBUG_PUB.debug('set_due_date:' || l_set_due_date);
8824: AHL_DEBUG_PUB.debug('due_ctr_val:' || l_calc_due_counter_value);
8825: AHL_DEBUG_PUB.debug('counterID:' || l_calc_counter_id);
8826: END IF;

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

8819: END LOOP; -- threshold rec.
8820:
8821: IF G_DEBUG = 'Y' THEN
8822: AHL_DEBUG_PUB.debug('l_calc_due_date:' || l_calc_due_date);
8823: AHL_DEBUG_PUB.debug('set_due_date:' || l_set_due_date);
8824: AHL_DEBUG_PUB.debug('due_ctr_val:' || l_calc_due_counter_value);
8825: AHL_DEBUG_PUB.debug('counterID:' || l_calc_counter_id);
8826: END IF;
8827:

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

8820:
8821: IF G_DEBUG = 'Y' THEN
8822: AHL_DEBUG_PUB.debug('l_calc_due_date:' || l_calc_due_date);
8823: AHL_DEBUG_PUB.debug('set_due_date:' || l_set_due_date);
8824: AHL_DEBUG_PUB.debug('due_ctr_val:' || l_calc_due_counter_value);
8825: AHL_DEBUG_PUB.debug('counterID:' || l_calc_counter_id);
8826: END IF;
8827:
8828: -- Check calculated due date against set_due_date.

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

8821: IF G_DEBUG = 'Y' THEN
8822: AHL_DEBUG_PUB.debug('l_calc_due_date:' || l_calc_due_date);
8823: AHL_DEBUG_PUB.debug('set_due_date:' || l_set_due_date);
8824: AHL_DEBUG_PUB.debug('due_ctr_val:' || l_calc_due_counter_value);
8825: AHL_DEBUG_PUB.debug('counterID:' || l_calc_counter_id);
8826: END IF;
8827:
8828: -- Check calculated due date against set_due_date.
8829: IF (l_calc_due_date IS NOT NULL AND l_set_due_date IS NOT NULL) THEN

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

8856: -- fix bug# 5217126. This variable is inserted into the temp table.
8857: l_deferral_effective_on := unit_effectivity_rec.deferral_effective_on;
8858:
8859: IF G_DEBUG = 'Y' THEN
8860: AHL_DEBUG_PUB.debug('Calculating due date for MEL/CDL');
8861: AHL_DEBUG_PUB.debug('Deferral Eff on:' || unit_effectivity_rec.DEFERRAL_EFFECTIVE_ON);
8862: AHL_DEBUG_PUB.debug('Processing ..object type:' || unit_effectivity_rec.object_type);
8863: END IF;
8864:

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

8857: l_deferral_effective_on := unit_effectivity_rec.deferral_effective_on;
8858:
8859: IF G_DEBUG = 'Y' THEN
8860: AHL_DEBUG_PUB.debug('Calculating due date for MEL/CDL');
8861: AHL_DEBUG_PUB.debug('Deferral Eff on:' || unit_effectivity_rec.DEFERRAL_EFFECTIVE_ON);
8862: AHL_DEBUG_PUB.debug('Processing ..object type:' || unit_effectivity_rec.object_type);
8863: END IF;
8864:
8865: -- validate repair category.

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

8858:
8859: IF G_DEBUG = 'Y' THEN
8860: AHL_DEBUG_PUB.debug('Calculating due date for MEL/CDL');
8861: AHL_DEBUG_PUB.debug('Deferral Eff on:' || unit_effectivity_rec.DEFERRAL_EFFECTIVE_ON);
8862: AHL_DEBUG_PUB.debug('Processing ..object type:' || unit_effectivity_rec.object_type);
8863: END IF;
8864:
8865: -- validate repair category.
8866: -- Added expected_resolution_date to fix bug# 5217126.

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

8887: END IF; -- get_repair_category_csr%NOTFOUND
8888: CLOSE get_repair_category_csr;
8889:
8890: IF G_DEBUG = 'Y' THEN
8891: AHL_DEBUG_PUB.debug('MEL/CDL:Calculated due date is:' || l_calc_due_date);
8892: AHL_DEBUG_PUB.debug('MEL/CDL:DEFERRAL_EFFECTIVE_ON:' || l_deferral_effective_on);
8893: END IF;
8894:
8895: END IF; -- unit_effectivity_rec.unit_deferral_type = 'MEL'

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

8888: CLOSE get_repair_category_csr;
8889:
8890: IF G_DEBUG = 'Y' THEN
8891: AHL_DEBUG_PUB.debug('MEL/CDL:Calculated due date is:' || l_calc_due_date);
8892: AHL_DEBUG_PUB.debug('MEL/CDL:DEFERRAL_EFFECTIVE_ON:' || l_deferral_effective_on);
8893: END IF;
8894:
8895: END IF; -- unit_effectivity_rec.unit_deferral_type = 'MEL'
8896:

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

8902:
8903: /*
8904: IF (l_visit_end_date IS NOT NULL AND l_calc_due_date IS NOT NULL) THEN
8905: IF G_DEBUG = 'Y' THEN
8906: AHL_DEBUG_PUB.Debug('Visit assigned:End Date:' || l_visit_end_date);
8907: END IF;
8908:
8909: IF (trunc(l_visit_end_date) < trunc(l_calc_due_date)) THEN
8910: l_calc_tolerance_flag := 'Y';

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

8914: */
8915:
8916: IF (l_visit_start_date IS NOT NULL AND l_calc_due_date IS NOT NULL) THEN
8917: IF G_DEBUG = 'Y' THEN
8918: AHL_DEBUG_PUB.Debug('Visit assigned: Start Date:' || l_visit_start_date);
8919: END IF;
8920: IF (trunc(l_visit_start_date) > trunc(l_calc_due_date)) THEN
8921: l_calc_tolerance_flag := 'Y';
8922: l_calc_message_code := 'TOLERANCE-EXCEEDED';

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

8975: END IF; -- l_visit_status
8976:
8977:
8978: IF G_DEBUG = 'Y' THEN
8979: AHL_DEBUG_PUB.Debug('Group Match flag:l_visit_status:' || l_grp_match || ':' || l_visit_status);
8980: END IF;
8981:
8982: -- insert into deferral temp table.
8983: insert into ahl_temp_unit_SR_deferrals (

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

9069:
9070: END LOOP; -- unit effectivity rec.
9071:
9072: IF G_DEBUG = 'Y' THEN
9073: AHL_DEBUG_PUB.debug('End of process_Deferred_ue');
9074: END IF;
9075:
9076: END Process_Deferred_UE;
9077: -----------------------------------------------

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

9140:
9141: BEGIN
9142:
9143: IF G_DEBUG = 'Y' THEN
9144: AHL_DEBUG_PUB.debug('Start of Process_SR_UE');
9145: END IF;
9146:
9147: -- Get all UE's with object-type = SR.
9148: FOR ahl_ue_sr_rec IN ahl_ue_sr_csr(p_csi_item_instance_id) LOOP

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

9154: l_visit_assign_code);
9155:
9156: IF (l_visit_end_date IS NOT NULL AND ahl_ue_sr_rec.due_date IS NOT NULL) THEN
9157: IF G_DEBUG = 'Y' THEN
9158: AHL_DEBUG_PUB.Debug('Visit assigned:End Date:' || l_visit_end_date);
9159: END IF;
9160:
9161: IF (trunc(l_visit_end_date) < trunc(ahl_ue_sr_rec.due_date )) THEN
9162: l_calc_tolerance_flag := 'Y';

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

9165: END IF;
9166:
9167: IF (l_visit_start_date IS NOT NULL AND ahl_ue_sr_rec.due_date IS NOT NULL) THEN
9168: IF G_DEBUG = 'Y' THEN
9169: AHL_DEBUG_PUB.Debug('Visit assigned:Start Date:' || l_visit_start_date);
9170: END IF;
9171:
9172: IF (trunc(l_visit_start_date) > trunc(ahl_ue_sr_rec.due_date )) THEN
9173: l_calc_tolerance_flag := 'Y';

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

9291:
9292: END LOOP;
9293:
9294: IF G_DEBUG = 'Y' THEN
9295: AHL_DEBUG_PUB.debug('End of Process_SR_UE');
9296: END IF;
9297:
9298: END Process_SR_UE;
9299:

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

9366:
9367: BEGIN
9368:
9369: IF G_DEBUG = 'Y' THEN
9370: AHL_DEBUG_PUB.debug('Start of Match_Group_MR');
9371: END IF;
9372:
9373: -- Match the ue relations tree with the group applicablilty tree.
9374: i := 1;

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

9459:
9460: END IF;
9461:
9462: IF G_DEBUG = 'Y' THEN
9463: AHL_DEBUG_PUB.debug('End of Match_Group_MR');
9464: END IF;
9465:
9466: END Match_Group_MR;
9467:

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

9579:
9580: BEGIN
9581:
9582: IF G_DEBUG = 'Y' THEN
9583: AHL_DEBUG_PUB.debug('Start of Process_Unplanned_UE');
9584: END IF;
9585:
9586: -- Loop through all Unplanned MRs.
9587: FOR ahl_unplanned_ue_rec IN ahl_unplanned_ue_csr(p_csi_item_instance_id) LOOP

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

9614: END IF; -- ahl_applicable_mr_csr found chk.
9615: CLOSE ahl_applicable_mr_csr;
9616:
9617: IF G_DEBUG = 'Y' THEN
9618: AHL_DEBUG_PUB.debug('Group Match Flag for UE:' || ahl_unplanned_ue_rec.unit_effectivity_id || 'is:' ||
9619: l_grp_match_flag);
9620: END IF;
9621:
9622: -- If exception, then update the UE status to exception.

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

9636: ELSE
9637: -- set UE attributes.
9638: IF (ahl_unplanned_ue_rec.status_code IS NULL) AND (l_exception_flag = TRUE) THEN
9639: IF G_DEBUG = 'Y' THEN
9640: AHL_DEBUG_PUB.Debug('Updating Unplanned UE..' || l_ue_rec.unit_effectivity_id || ' to an exception');
9641: END IF;
9642: -- update unit effectivity.
9643: l_message_code := 'VISIT-ASSIGN';
9644: l_status_code := 'EXCEPTION';

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

9643: l_message_code := 'VISIT-ASSIGN';
9644: l_status_code := 'EXCEPTION';
9645: ELSE
9646: IF G_DEBUG = 'Y' THEN
9647: AHL_DEBUG_PUB.Debug('Updating Unplanned UE..' || l_ue_rec.unit_effectivity_id || ' from an exception');
9648: END IF;
9649: -- update unit effectivity.
9650: l_message_code := NULL;
9651: l_status_code := NULL;

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

9793:
9794: END LOOP; -- next unplanned MR.
9795:
9796: IF (G_DEBUG = 'Y') THEN
9797: AHL_DEBUG_PUB.debug('End of Process_Unplanned_UE');
9798: END IF;
9799:
9800: END Process_Unplanned_UE;
9801:

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

9832:
9833: BEGIN
9834:
9835: IF G_DEBUG = 'Y' THEN
9836: AHL_DEBUG_PUB.Debug('Start API Get_Forecasted_Counter_Values');
9837: END IF;
9838:
9839: -- Initialize message list if p_init_msg_list is set to TRUE
9840: IF FND_API.To_Boolean(p_init_msg_list) THEN

Line 9849: AHL_DEBUG_PUB.enable_debug;

9845: x_return_status := FND_API.G_RET_STS_SUCCESS;
9846:
9847: -- Enable Debug.
9848: IF G_DEBUG = 'Y' THEN
9849: AHL_DEBUG_PUB.enable_debug;
9850: END IF;
9851:
9852: -- Add debug mesg.
9853: IF G_DEBUG = 'Y' THEN

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

9850: END IF;
9851:
9852: -- Add debug mesg.
9853: IF G_DEBUG = 'Y' THEN
9854: AHL_DEBUG_PUB.debug('Begin private API:' || G_PKG_NAME || '.' || 'Get_Forcasted_Counter_Values');
9855:
9856: -- Dump input parameters.
9857: AHL_DEBUG_PUB.debug(' Csi Item instance ID:' || p_csi_item_instance_id);
9858: AHL_DEBUG_PUB.debug(' Forecasted Date:' || p_forecasted_date);

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

9853: IF G_DEBUG = 'Y' THEN
9854: AHL_DEBUG_PUB.debug('Begin private API:' || G_PKG_NAME || '.' || 'Get_Forcasted_Counter_Values');
9855:
9856: -- Dump input parameters.
9857: AHL_DEBUG_PUB.debug(' Csi Item instance ID:' || p_csi_item_instance_id);
9858: AHL_DEBUG_PUB.debug(' Forecasted Date:' || p_forecasted_date);
9859:
9860: END IF;
9861:

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

9854: AHL_DEBUG_PUB.debug('Begin private API:' || G_PKG_NAME || '.' || 'Get_Forcasted_Counter_Values');
9855:
9856: -- Dump input parameters.
9857: AHL_DEBUG_PUB.debug(' Csi Item instance ID:' || p_csi_item_instance_id);
9858: AHL_DEBUG_PUB.debug(' Forecasted Date:' || p_forecasted_date);
9859:
9860: END IF;
9861:
9862: -- validate item instance.

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

9888: Build_Config_Tree(l_csi_item_instance_id, G_master_config_id, G_CONFIG_NODE_TBL);
9889:
9890: -- Add debug mesg.
9891: IF G_DEBUG = 'Y' THEN
9892: AHL_DEBUG_PUB.debug(' Count on Config Node Tbl:' || G_config_node_tbl.COUNT);
9893: AHL_DEBUG_PUB.debug(' Root Node:' || l_csi_item_instance_id );
9894: AHL_DEBUG_PUB.debug(' Unit Config ID:' || l_uc_header_id);
9895: AHL_DEBUG_PUB.debug(' Master Config ID:' || G_master_config_id);
9896: END IF;

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

9889:
9890: -- Add debug mesg.
9891: IF G_DEBUG = 'Y' THEN
9892: AHL_DEBUG_PUB.debug(' Count on Config Node Tbl:' || G_config_node_tbl.COUNT);
9893: AHL_DEBUG_PUB.debug(' Root Node:' || l_csi_item_instance_id );
9894: AHL_DEBUG_PUB.debug(' Unit Config ID:' || l_uc_header_id);
9895: AHL_DEBUG_PUB.debug(' Master Config ID:' || G_master_config_id);
9896: END IF;
9897:

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

9890: -- Add debug mesg.
9891: IF G_DEBUG = 'Y' THEN
9892: AHL_DEBUG_PUB.debug(' Count on Config Node Tbl:' || G_config_node_tbl.COUNT);
9893: AHL_DEBUG_PUB.debug(' Root Node:' || l_csi_item_instance_id );
9894: AHL_DEBUG_PUB.debug(' Unit Config ID:' || l_uc_header_id);
9895: AHL_DEBUG_PUB.debug(' Master Config ID:' || G_master_config_id);
9896: END IF;
9897:
9898: -- Read applicable utilization forecast for the configuration.

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

9891: IF G_DEBUG = 'Y' THEN
9892: AHL_DEBUG_PUB.debug(' Count on Config Node Tbl:' || G_config_node_tbl.COUNT);
9893: AHL_DEBUG_PUB.debug(' Root Node:' || l_csi_item_instance_id );
9894: AHL_DEBUG_PUB.debug(' Unit Config ID:' || l_uc_header_id);
9895: AHL_DEBUG_PUB.debug(' Master Config ID:' || G_master_config_id);
9896: END IF;
9897:
9898: -- Read applicable utilization forecast for the configuration.
9899: Get_Utilization_Forecast (l_csi_item_instance_id,

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

9930: x_due_at_counter_val_tbl => l_due_at_counter_val_tbl,
9931: x_return_value => l_return_value);
9932:
9933: IF G_DEBUG = 'Y' THEN
9934: AHL_DEBUG_PUB.Debug('AFter get_due_at_counter_values');
9935: AHL_DEBUG_PUB.Debug('l_last_due_date: '|| sysdate);
9936: AHL_DEBUG_PUB.Debug('l_due_date: '|| p_forecasted_date);
9937: IF (l_due_at_counter_val_tbl.COUNT) > 0 THEN
9938: for i in l_due_at_counter_val_tbl.FIRST..l_due_at_counter_val_tbl.LAST LOOP

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

9931: x_return_value => l_return_value);
9932:
9933: IF G_DEBUG = 'Y' THEN
9934: AHL_DEBUG_PUB.Debug('AFter get_due_at_counter_values');
9935: AHL_DEBUG_PUB.Debug('l_last_due_date: '|| sysdate);
9936: AHL_DEBUG_PUB.Debug('l_due_date: '|| p_forecasted_date);
9937: IF (l_due_at_counter_val_tbl.COUNT) > 0 THEN
9938: for i in l_due_at_counter_val_tbl.FIRST..l_due_at_counter_val_tbl.LAST LOOP
9939: 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 9936: AHL_DEBUG_PUB.Debug('l_due_date: '|| p_forecasted_date);

9932:
9933: IF G_DEBUG = 'Y' THEN
9934: AHL_DEBUG_PUB.Debug('AFter get_due_at_counter_values');
9935: AHL_DEBUG_PUB.Debug('l_last_due_date: '|| sysdate);
9936: AHL_DEBUG_PUB.Debug('l_due_date: '|| p_forecasted_date);
9937: IF (l_due_at_counter_val_tbl.COUNT) > 0 THEN
9938: for i in l_due_at_counter_val_tbl.FIRST..l_due_at_counter_val_tbl.LAST LOOP
9939: 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);
9940: end loop;

Line 9939: 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);

9935: AHL_DEBUG_PUB.Debug('l_last_due_date: '|| sysdate);
9936: AHL_DEBUG_PUB.Debug('l_due_date: '|| p_forecasted_date);
9937: IF (l_due_at_counter_val_tbl.COUNT) > 0 THEN
9938: for i in l_due_at_counter_val_tbl.FIRST..l_due_at_counter_val_tbl.LAST LOOP
9939: 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);
9940: end loop;
9941: END IF; -- count.
9942: END IF; -- Debug = Y
9943:

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

9954: p_encoded => fnd_api.g_false
9955: );
9956:
9957: IF G_DEBUG = 'Y' THEN
9958: AHL_DEBUG_PUB.Debug('End API Get_Forecasted_Counter_Values');
9959: END IF;
9960:
9961: --
9962: EXCEPTION

Line 9970: AHL_DEBUG_PUB.disable_debug;

9966: p_data => x_msg_data,
9967: p_encoded => fnd_api.g_false);
9968:
9969: -- Disable debug
9970: AHL_DEBUG_PUB.disable_debug;
9971:
9972: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
9973: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
9974: FND_MSG_PUB.count_and_get( p_count => x_msg_count,

Line 9979: AHL_DEBUG_PUB.disable_debug;

9975: p_data => x_msg_data,
9976: p_encoded => fnd_api.g_false);
9977:
9978: -- Disable debug
9979: AHL_DEBUG_PUB.disable_debug;
9980:
9981: WHEN OTHERS THEN
9982: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
9983: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN

Line 9993: AHL_DEBUG_PUB.disable_debug;

9989: p_data => x_msg_data,
9990: p_encoded => fnd_api.g_false);
9991:
9992: -- Disable debug
9993: AHL_DEBUG_PUB.disable_debug;
9994:
9995: END Get_Forecasted_Counter_Values;
9996: ----------------------------------------------
9997: -- Added in R12 to fix bug# 4224867.

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

10059:
10060: BEGIN
10061:
10062: IF G_DEBUG = 'Y' THEN
10063: AHL_DEBUG_PUB.debug('Start of get_ctr_reading_for_datetime');
10064: END IF;
10065:
10066: OPEN cs_ctr_reading_csr(p_csi_item_instance_id,
10067: p_counter_id,

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

10074:
10075: x_net_reading := l_net_reading;
10076:
10077: IF G_DEBUG = 'Y' THEN
10078: AHL_DEBUG_PUB.debug('End of get_ctr_reading_for_datetime');
10079: END IF;
10080:
10081: END get_ctr_reading_for_datetime;
10082:

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

10093: l_return_status VARCHAR2(1);
10094:
10095: BEGIN
10096: IF G_DEBUG = 'Y' THEN
10097: AHL_DEBUG_PUB.debug('Start of validate_for_duedate_reset');
10098: END IF;
10099:
10100: l_return_status := 'N';
10101: IF (p_due_date IS NULL) THEN

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

10135: END IF; -- p_prev_due_date
10136: END IF; -- p_due_date
10137:
10138: IF G_DEBUG = 'Y' THEN
10139: AHL_DEBUG_PUB.debug('End of validate_for_duedate_reset');
10140: END IF;
10141:
10142: RETURN l_return_status;
10143:

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

10162: l_msg_count NUMBER;
10163: l_return_status VARCHAR2(1);
10164: l_msg_data VARCHAR2(30);
10165: i NUMBER;
10166: l_debug VARCHAR2(1) := AHL_DEBUG_PUB.is_log_enabled;
10167: l_master_org_id NUMBER;
10168: l_mr_header_id NUMBER;
10169:
10170: l_csi_min_id NUMBER;

Line 10238: AHL_DEBUG_PUB.enable_debug;

10234:
10235: BEGIN
10236:
10237: IF l_debug = 'Y' THEN
10238: AHL_DEBUG_PUB.enable_debug;
10239: AHL_DEBUG_PUB.debug('Begin private API: AHL_UMP_PROCESSUNIT_PVT.PROCESS_PM_MR_AFFECTED_ITEMS');
10240: END IF;
10241:
10242: -- Check whether the mr_header_id exists --

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

10235: BEGIN
10236:
10237: IF l_debug = 'Y' THEN
10238: AHL_DEBUG_PUB.enable_debug;
10239: AHL_DEBUG_PUB.debug('Begin private API: AHL_UMP_PROCESSUNIT_PVT.PROCESS_PM_MR_AFFECTED_ITEMS');
10240: END IF;
10241:
10242: -- Check whether the mr_header_id exists --
10243: OPEN check_mr_exists(p_mr_header_id);

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

10250: END IF;
10251: CLOSE check_mr_exists;
10252:
10253: IF l_debug = 'Y' THEN
10254: AHL_DEBUG_PUB.debug(' Phase 1');
10255: END IF;
10256:
10257: -- validate # of workers.
10258: l_num_workers := p_num_of_workers;

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

10261: l_num_workers := 30;
10262: END IF;
10263:
10264: IF l_debug = 'Y' THEN
10265: AHL_DEBUG_PUB.debug(' Phase 2:l_num_workers:' || l_num_workers);
10266: END IF;
10267:
10268: FOR l_mr_effect IN get_mr_effect(p_mr_header_id)
10269: LOOP

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

10269: LOOP
10270: IF (l_mr_effect.inventory_item_id IS NOT NULL) THEN
10271:
10272: IF l_debug = 'Y' THEN
10273: AHL_DEBUG_PUB.debug(' Phase 3:Inv Item ID:' || l_mr_effect.inventory_item_id);
10274: END IF;
10275:
10276: --DBMS_OUTPUT.put_line('API1: Come here in case 1B and l_index is: '||l_index);
10277:

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

10281: p_x_inventory_item_id => l_mr_effect.inventory_item_id);
10282: IF (l_return_status = 'S') THEN
10283:
10284: IF l_debug = 'Y' THEN
10285: AHL_DEBUG_PUB.debug('Phase 4: Inv Item ID is Valid');
10286: END IF;
10287: -- get master organization id.
10288: OPEN get_master_org_id_csr(l_mr_effect.inventory_item_id);
10289: FETCH get_master_org_id_csr INTO l_master_org_id;

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

10312: END IF;
10313: CLOSE get_minmax_inst_csr;
10314:
10315: IF l_debug = 'Y' THEN
10316: AHL_DEBUG_PUB.debug(' Phase 5:csi_min:csi_max:count:' || l_csi_min_id || ':' || l_csi_max_id || ':' ||
10317: l_total_count);
10318: END IF;
10319:
10320: END IF; -- l_return_status = 'S'

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

10380: p_num_workers IN NUMBER,
10381: p_mr_header_id IN NUMBER)
10382: IS
10383:
10384: l_debug VARCHAR2(1) := AHL_DEBUG_PUB.is_log_enabled;
10385:
10386: l_csi_min_id NUMBER;
10387: l_csi_max_id NUMBER;
10388: l_csi_eff_min_id NUMBER;

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

10411:
10412: l_start_csi_id := l_csi_min_id;
10413:
10414: IF l_debug = 'Y' THEN
10415: AHL_DEBUG_PUB.debug('l_step:' || l_step || 'start csi: end csi' || l_start_csi_id || ':' || l_end_csi_id);
10416: END IF;
10417:
10418: -- loop through
10419: WHILE (l_start_csi_id < l_csi_max_id) LOOP

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

10422: l_end_csi_id := l_csi_max_id;
10423: END IF;
10424:
10425: IF l_debug = 'Y' THEN
10426: AHL_DEBUG_PUB.debug('Loop start csi: end csi' || l_start_csi_id || ':' || l_end_csi_id);
10427: END IF;
10428:
10429: -- launch BUE worker request.
10430: 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 10434: AHL_DEBUG_PUB.debug('Tried to submit concurrent request but failed');

10430: l_req_id := fnd_request.submit_request('AHL','AHLWUEFF',NULL,NULL,FALSE, p_mr_header_id, l_start_csi_id, l_end_csi_id);
10431:
10432: IF (l_req_id = 0 OR l_req_id IS NULL) THEN
10433: IF l_debug = 'Y' THEN
10434: AHL_DEBUG_PUB.debug('Tried to submit concurrent request but failed');
10435: END IF;
10436: fnd_file.put_line(FND_FILE.LOG, 'Failed submit concurrent request');
10437: fnd_file.new_line(FND_FILE.LOG,1);
10438: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

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

10440: ELSE
10441: 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);
10442:
10443: IF l_debug = 'Y' THEN
10444: AHL_DEBUG_PUB.debug('Concurrent request ID:' || l_req_id || ' launched to process instances between:' || l_start_csi_id || ' and ' || l_end_csi_id);
10445: END IF;
10446: END IF;
10447:
10448: l_start_csi_id := l_end_csi_id + 1;

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

10460: p_mr_header_id IN NUMBER,
10461: p_total_inst_count IN NUMBER)
10462: IS
10463:
10464: l_debug VARCHAR2(1) := AHL_DEBUG_PUB.is_log_enabled;
10465: l_step number;
10466: l_start_csi_id number;
10467: l_launched_workers number;
10468: l_mid_point_inst_id number;

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

10488: trunc(nvl(active_end_date,sysdate+1));
10489:
10490: BEGIN
10491: IF l_debug = 'Y' THEN
10492: AHL_DEBUG_PUB.debug('Start of procedure: Instance_Split_BTree');
10493: AHL_DEBUG_PUB.debug('p_mr_header_id:' || p_mr_header_id);
10494: AHL_DEBUG_PUB.debug('p_num_workers:' || p_num_workers);
10495: AHL_DEBUG_PUB.debug('p_csi_max_id:' || p_csi_max_id);
10496: AHL_DEBUG_PUB.debug('p_csi_min_id:' || p_csi_min_id);

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

10489:
10490: BEGIN
10491: IF l_debug = 'Y' THEN
10492: AHL_DEBUG_PUB.debug('Start of procedure: Instance_Split_BTree');
10493: AHL_DEBUG_PUB.debug('p_mr_header_id:' || p_mr_header_id);
10494: AHL_DEBUG_PUB.debug('p_num_workers:' || p_num_workers);
10495: AHL_DEBUG_PUB.debug('p_csi_max_id:' || p_csi_max_id);
10496: AHL_DEBUG_PUB.debug('p_csi_min_id:' || p_csi_min_id);
10497: AHL_DEBUG_PUB.debug('p_total_inst_count:' || p_total_inst_count);

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

10490: BEGIN
10491: IF l_debug = 'Y' THEN
10492: AHL_DEBUG_PUB.debug('Start of procedure: Instance_Split_BTree');
10493: AHL_DEBUG_PUB.debug('p_mr_header_id:' || p_mr_header_id);
10494: AHL_DEBUG_PUB.debug('p_num_workers:' || p_num_workers);
10495: AHL_DEBUG_PUB.debug('p_csi_max_id:' || p_csi_max_id);
10496: AHL_DEBUG_PUB.debug('p_csi_min_id:' || p_csi_min_id);
10497: AHL_DEBUG_PUB.debug('p_total_inst_count:' || p_total_inst_count);
10498: END IF;

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

10491: IF l_debug = 'Y' THEN
10492: AHL_DEBUG_PUB.debug('Start of procedure: Instance_Split_BTree');
10493: AHL_DEBUG_PUB.debug('p_mr_header_id:' || p_mr_header_id);
10494: AHL_DEBUG_PUB.debug('p_num_workers:' || p_num_workers);
10495: AHL_DEBUG_PUB.debug('p_csi_max_id:' || p_csi_max_id);
10496: AHL_DEBUG_PUB.debug('p_csi_min_id:' || p_csi_min_id);
10497: AHL_DEBUG_PUB.debug('p_total_inst_count:' || p_total_inst_count);
10498: END IF;
10499:

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

10492: AHL_DEBUG_PUB.debug('Start of procedure: Instance_Split_BTree');
10493: AHL_DEBUG_PUB.debug('p_mr_header_id:' || p_mr_header_id);
10494: AHL_DEBUG_PUB.debug('p_num_workers:' || p_num_workers);
10495: AHL_DEBUG_PUB.debug('p_csi_max_id:' || p_csi_max_id);
10496: AHL_DEBUG_PUB.debug('p_csi_min_id:' || p_csi_min_id);
10497: AHL_DEBUG_PUB.debug('p_total_inst_count:' || p_total_inst_count);
10498: END IF;
10499:
10500: l_num_workers := p_num_workers;

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

10493: AHL_DEBUG_PUB.debug('p_mr_header_id:' || p_mr_header_id);
10494: AHL_DEBUG_PUB.debug('p_num_workers:' || p_num_workers);
10495: AHL_DEBUG_PUB.debug('p_csi_max_id:' || p_csi_max_id);
10496: AHL_DEBUG_PUB.debug('p_csi_min_id:' || p_csi_min_id);
10497: AHL_DEBUG_PUB.debug('p_total_inst_count:' || p_total_inst_count);
10498: END IF;
10499:
10500: l_num_workers := p_num_workers;
10501:

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

10506: p_csi_min_id, p_csi_max_id);
10507:
10508: IF (l_req_id = 0 OR l_req_id IS NULL) THEN
10509: IF l_debug = 'Y' THEN
10510: AHL_DEBUG_PUB.debug('Tried to submit concurrent request but failed');
10511: END IF;
10512: fnd_file.put_line(FND_FILE.LOG, 'Failed submit concurrent request');
10513: fnd_file.new_line(FND_FILE.LOG,1);
10514: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

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

10516: ELSE
10517: 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);
10518:
10519: IF l_debug = 'Y' THEN
10520: AHL_DEBUG_PUB.debug('Concurrent request ID:' || l_req_id || ' launched to process instances between:' || p_csi_min_id || ' and ' || p_csi_min_id);
10521: END IF;
10522: END IF;
10523:
10524: ELSE

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

10532: l_tol_bef := l_step - trunc((0.1 * l_step));
10533: l_tol_after := l_step + trunc((0.1 * l_step));
10534:
10535: IF l_debug = 'Y' THEN
10536: AHL_DEBUG_PUB.debug('l_step:' || l_step);
10537: AHL_DEBUG_PUB.debug('l_tol_bef:' || l_tol_bef);
10538: AHL_DEBUG_PUB.debug('l_tol_after:' || l_tol_after);
10539: END IF;
10540:

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

10533: l_tol_after := l_step + trunc((0.1 * l_step));
10534:
10535: IF l_debug = 'Y' THEN
10536: AHL_DEBUG_PUB.debug('l_step:' || l_step);
10537: AHL_DEBUG_PUB.debug('l_tol_bef:' || l_tol_bef);
10538: AHL_DEBUG_PUB.debug('l_tol_after:' || l_tol_after);
10539: END IF;
10540:
10541: --dbms_output.put_line('l_Step:' || l_step);

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

10534:
10535: IF l_debug = 'Y' THEN
10536: AHL_DEBUG_PUB.debug('l_step:' || l_step);
10537: AHL_DEBUG_PUB.debug('l_tol_bef:' || l_tol_bef);
10538: AHL_DEBUG_PUB.debug('l_tol_after:' || l_tol_after);
10539: END IF;
10540:
10541: --dbms_output.put_line('l_Step:' || l_step);
10542: --dbms_output.put_line('l_tol_minus:' || l_tol_bef);

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

10556:
10557: WHILE (true) LOOP
10558:
10559: IF l_debug = 'Y' THEN
10560: AHL_DEBUG_PUB.debug('Start loop:l_begin_count_csi_id:' || l_begin_count_csi_id);
10561: AHL_DEBUG_PUB.debug('l_start_csi_id:' || l_start_csi_id);
10562: AHL_DEBUG_PUB.debug('l_mid_point_inst_id:' || l_mid_point_inst_id);
10563: --dbms_output.put_line('l_start_csi_id:' || l_start_csi_id);
10564: --dbms_output.put_line('l_mid_point_inst_id:' || l_mid_point_inst_id);

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

10557: WHILE (true) LOOP
10558:
10559: IF l_debug = 'Y' THEN
10560: AHL_DEBUG_PUB.debug('Start loop:l_begin_count_csi_id:' || l_begin_count_csi_id);
10561: AHL_DEBUG_PUB.debug('l_start_csi_id:' || l_start_csi_id);
10562: AHL_DEBUG_PUB.debug('l_mid_point_inst_id:' || l_mid_point_inst_id);
10563: --dbms_output.put_line('l_start_csi_id:' || l_start_csi_id);
10564: --dbms_output.put_line('l_mid_point_inst_id:' || l_mid_point_inst_id);
10565: END IF;

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

10558:
10559: IF l_debug = 'Y' THEN
10560: AHL_DEBUG_PUB.debug('Start loop:l_begin_count_csi_id:' || l_begin_count_csi_id);
10561: AHL_DEBUG_PUB.debug('l_start_csi_id:' || l_start_csi_id);
10562: AHL_DEBUG_PUB.debug('l_mid_point_inst_id:' || l_mid_point_inst_id);
10563: --dbms_output.put_line('l_start_csi_id:' || l_start_csi_id);
10564: --dbms_output.put_line('l_mid_point_inst_id:' || l_mid_point_inst_id);
10565: END IF;
10566:

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

10568: FETCH csi_inst_count_csr INTO l_count;
10569: CLOSE csi_inst_count_csr;
10570:
10571: IF l_debug = 'Y' THEN
10572: AHL_DEBUG_PUB.debug('l_count:' || l_count);
10573: END IF;
10574: -- dbms_output.put_line('l_count:' || l_count);
10575:
10576: IF (l_count >= l_tol_bef AND l_count <= l_tol_after) THEN

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

10586: --dbms_output.put_line('newB l_mid_point_inst_id:' || l_mid_point_inst_id);
10587:
10588: IF (l_req_id = 0 OR l_req_id IS NULL) THEN
10589: IF l_debug = 'Y' THEN
10590: AHL_DEBUG_PUB.debug('Tried to submit concurrent request but failed');
10591: END IF;
10592: fnd_file.put_line(FND_FILE.LOG, 'Failed submit concurrent request');
10593: fnd_file.new_line(FND_FILE.LOG,1);
10594: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

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

10598: ' launched to process instances between:' || l_begin_count_csi_id || ' and ' ||
10599: l_mid_point_inst_id);
10600:
10601: IF l_debug = 'Y' THEN
10602: AHL_DEBUG_PUB.debug('Concurrent request ID:' || l_req_id ||
10603: ' launched to process instances between:' || l_begin_count_csi_id || ' and ' ||
10604: l_mid_point_inst_id);
10605: END IF;
10606: END IF;

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

10612: l_req_id := fnd_request.submit_request('AHL','AHLWUEFF',NULL,NULL,FALSE, p_mr_header_id,
10613: l_begin_count_csi_id, l_mid_point_inst_id);
10614: IF (l_req_id = 0 OR l_req_id IS NULL) THEN
10615: IF l_debug = 'Y' THEN
10616: AHL_DEBUG_PUB.debug('Tried to submit concurrent request but failed');
10617: END IF;
10618: fnd_file.put_line(FND_FILE.LOG, 'Failed submit concurrent request');
10619: fnd_file.new_line(FND_FILE.LOG,1);
10620: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

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

10624: ' launched to process instances between:' || l_begin_count_csi_id || ' and ' ||
10625: l_mid_point_inst_id);
10626:
10627: IF l_debug = 'Y' THEN
10628: AHL_DEBUG_PUB.debug('Concurrent request ID:' || l_req_id ||
10629: ' launched to process instances between:' || l_begin_count_csi_id || ' and ' ||
10630: l_mid_point_inst_id);
10631: END IF;
10632: END IF; -- l_req_id = 0 OR ..

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

10653: END IF;
10654: END IF;
10655:
10656: IF l_debug = 'Y' THEN
10657: AHL_DEBUG_PUB.debug('End of procedure: Instance_Split_BTree');
10658: END IF;
10659:
10660: END Instance_Split_BTree;
10661:

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

10815:
10816: BEGIN
10817:
10818: IF G_debug = 'Y' THEN
10819: AHL_DEBUG_PUB.debug('Start Split_Process_All_Instances:p_concurrent_flag:' || p_concurrent_flag);
10820: AHL_DEBUG_PUB.debug('Input MR Header ID:' || p_mr_header_id);
10821: AHL_DEBUG_PUB.debug('Input p_num_of_workers:' || p_num_of_workers);
10822: END IF;
10823:

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

10816: BEGIN
10817:
10818: IF G_debug = 'Y' THEN
10819: AHL_DEBUG_PUB.debug('Start Split_Process_All_Instances:p_concurrent_flag:' || p_concurrent_flag);
10820: AHL_DEBUG_PUB.debug('Input MR Header ID:' || p_mr_header_id);
10821: AHL_DEBUG_PUB.debug('Input p_num_of_workers:' || p_num_of_workers);
10822: END IF;
10823:
10824: -- initialize return status.

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

10817:
10818: IF G_debug = 'Y' THEN
10819: AHL_DEBUG_PUB.debug('Start Split_Process_All_Instances:p_concurrent_flag:' || p_concurrent_flag);
10820: AHL_DEBUG_PUB.debug('Input MR Header ID:' || p_mr_header_id);
10821: AHL_DEBUG_PUB.debug('Input p_num_of_workers:' || p_num_of_workers);
10822: END IF;
10823:
10824: -- initialize return status.
10825: x_return_status := FND_API.G_RET_STS_SUCCESS;

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

10856: FOR i IN 1..l_num_of_workers LOOP
10857: l_req_id := fnd_request.submit_request('AHL','AHLWUEFF',NULL,NULL,FALSE, l_conc_req_id);
10858: IF (l_req_id = 0 OR l_req_id IS NULL) THEN
10859: IF G_debug = 'Y' THEN
10860: AHL_DEBUG_PUB.debug('Tried to submit concurrent request but failed');
10861: END IF;
10862: fnd_file.put_line(FND_FILE.LOG, 'Failed submit concurrent request');
10863: fnd_file.new_line(FND_FILE.LOG,1);
10864: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

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

10865:
10866: ELSE
10867: fnd_file.put_line(FND_FILE.LOG, 'Concurrent request ID:' || l_req_id );
10868: IF G_debug = 'Y' THEN
10869: AHL_DEBUG_PUB.debug('Concurrent request ID:' || l_req_id );
10870: END IF;
10871: END IF; -- l_req_id = 0 OR ..
10872:
10873: END LOOP;

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

10893:
10894: EXIT WHEN (l_instance_id IS NULL);
10895:
10896: IF G_DEBUG = 'Y' THEN
10897: AHL_DEBUG_PUB.debug('Now processing..:' || l_instance_id);
10898: END IF;
10899:
10900: -- Call Process Unit for the item instance.
10901: Process_Unit (

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

10919:
10920: END IF;
10921:
10922: IF G_debug = 'Y' THEN
10923: AHL_DEBUG_PUB.debug('End Split_Process_All_Instances:Return Status:' || x_return_status);
10924: END IF;
10925:
10926: END Split_Process_All_Instances;
10927:

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

10951:
10952: l_conc_child_req_id := fnd_global.conc_request_id;
10953:
10954: IF G_debug = 'Y' THEN
10955: AHL_DEBUG_PUB.debug('Start Process_Unit_Range for concurrent pgm ID:' || l_conc_child_req_id);
10956: AHL_DEBUG_PUB.debug('Parent concurrent pgm ID:' || p_parent_conc_pgm_id);
10957: END IF;
10958:
10959: -- AHL processing.

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

10952: l_conc_child_req_id := fnd_global.conc_request_id;
10953:
10954: IF G_debug = 'Y' THEN
10955: AHL_DEBUG_PUB.debug('Start Process_Unit_Range for concurrent pgm ID:' || l_conc_child_req_id);
10956: AHL_DEBUG_PUB.debug('Parent concurrent pgm ID:' || p_parent_conc_pgm_id);
10957: END IF;
10958:
10959: -- AHL processing.
10960: LOOP

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

11012: p_child_conc_request_id => l_conc_child_req_id);
11013:
11014:
11015: IF G_debug = 'Y' THEN
11016: AHL_DEBUG_PUB.debug('Concurrent pgm retcode:' || retcode);
11017: AHL_DEBUG_PUB.debug('Concurrent pgm l_return_status:' || l_return_status);
11018: AHL_DEBUG_PUB.debug('End Process_Unit_Range for concurrent pgm ID:' || l_conc_child_req_id);
11019: END IF;
11020:

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

11013:
11014:
11015: IF G_debug = 'Y' THEN
11016: AHL_DEBUG_PUB.debug('Concurrent pgm retcode:' || retcode);
11017: AHL_DEBUG_PUB.debug('Concurrent pgm l_return_status:' || l_return_status);
11018: AHL_DEBUG_PUB.debug('End Process_Unit_Range for concurrent pgm ID:' || l_conc_child_req_id);
11019: END IF;
11020:
11021: --

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

11014:
11015: IF G_debug = 'Y' THEN
11016: AHL_DEBUG_PUB.debug('Concurrent pgm retcode:' || retcode);
11017: AHL_DEBUG_PUB.debug('Concurrent pgm l_return_status:' || l_return_status);
11018: AHL_DEBUG_PUB.debug('End Process_Unit_Range for concurrent pgm ID:' || l_conc_child_req_id);
11019: END IF;
11020:
11021: --
11022: EXCEPTION

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

11059:
11060: fnd_file.put_line(FND_FILE.LOG,'Start time:' || to_char(sysdate, 'Month DD, YYYY HH24:MI:SS'));
11061:
11062: IF G_debug = 'Y' THEN
11063: AHL_DEBUG_PUB.debug('Start Process_Unit_Range for MR: Old ID:New ID:' || p_old_mr_header_id || ':' || p_new_mr_header_id);
11064: END IF;
11065:
11066: -- initialize return status.
11067: retcode := 0;

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

11088: log_error_messages;
11089: END IF;
11090:
11091: IF G_debug = 'Y' THEN
11092: AHL_DEBUG_PUB.debug('End Process_Unit_Range for MR: retcode:' || retcode);
11093: END IF;
11094:
11095: --
11096: EXCEPTION

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

11328:
11329: BEGIN
11330:
11331: IF G_debug = 'Y' THEN
11332: AHL_DEBUG_PUB.debug('Start Populate_BUE_Worker for pgm ID:' || p_conc_request_id);
11333: AHL_DEBUG_PUB.debug('Concurrent flag:' || p_concurrent_flag);
11334: END IF;
11335:
11336: -- initialize return status.

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

11329: BEGIN
11330:
11331: IF G_debug = 'Y' THEN
11332: AHL_DEBUG_PUB.debug('Start Populate_BUE_Worker for pgm ID:' || p_conc_request_id);
11333: AHL_DEBUG_PUB.debug('Concurrent flag:' || p_concurrent_flag);
11334: END IF;
11335:
11336: -- initialize return status.
11337: x_return_status := FND_API.G_RET_STS_SUCCESS;

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

11485: -- save changes.
11486: COMMIT WORK;
11487:
11488: IF G_debug = 'Y' THEN
11489: AHL_DEBUG_PUB.debug('Concurrent pgm x_return_status:' || x_return_status);
11490: AHL_DEBUG_PUB.debug('End Populate_BUE_Worker for pgm ID:' || p_conc_request_id);
11491: END IF;
11492:
11493: END Populate_BUE_Worker;

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

11486: COMMIT WORK;
11487:
11488: IF G_debug = 'Y' THEN
11489: AHL_DEBUG_PUB.debug('Concurrent pgm x_return_status:' || x_return_status);
11490: AHL_DEBUG_PUB.debug('End Populate_BUE_Worker for pgm ID:' || p_conc_request_id);
11491: END IF;
11492:
11493: END Populate_BUE_Worker;
11494:

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

11529: l_object_version_number NUMBER;
11530:
11531: BEGIN
11532: IF G_debug = 'Y' THEN
11533: AHL_DEBUG_PUB.debug('Start Get_Next_BUE_Row: Parent Conc Request ID:' || p_parent_conc_pgm_id);
11534: AHL_DEBUG_PUB.debug('Child Conc Request ID:' || p_conc_child_req_id);
11535: END IF;
11536:
11537: --DBMS_LOCK.SLEEP(60);

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

11530:
11531: BEGIN
11532: IF G_debug = 'Y' THEN
11533: AHL_DEBUG_PUB.debug('Start Get_Next_BUE_Row: Parent Conc Request ID:' || p_parent_conc_pgm_id);
11534: AHL_DEBUG_PUB.debug('Child Conc Request ID:' || p_conc_child_req_id);
11535: END IF;
11536:
11537: --DBMS_LOCK.SLEEP(60);
11538:

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

11609: CLOSE ahl_bue_worker_csr;
11610: x_item_instance_id := l_instance_id;
11611:
11612: IF G_debug = 'Y' THEN
11613: AHL_DEBUG_PUB.debug('End Get_Next_BUE_Row: x_item_instance_id:' || x_item_instance_id);
11614: END IF;
11615:
11616: EXCEPTION
11617: WHEN OTHERS THEN

Line 11676: AHL_DEBUG_PUB.debug('Start Cleanup_BUE_Worker: Parent Conc Request ID:' || p_parent_conc_request_id);

11672:
11673: BEGIN
11674:
11675: IF G_debug = 'Y' THEN
11676: AHL_DEBUG_PUB.debug('Start Cleanup_BUE_Worker: Parent Conc Request ID:' || p_parent_conc_request_id);
11677: AHL_DEBUG_PUB.debug('Child Conc Request ID:' || p_child_conc_request_id);
11678: END IF;
11679:
11680: IF (p_parent_conc_request_id IS NULL) THEN

Line 11677: AHL_DEBUG_PUB.debug('Child Conc Request ID:' || p_child_conc_request_id);

11673: BEGIN
11674:
11675: IF G_debug = 'Y' THEN
11676: AHL_DEBUG_PUB.debug('Start Cleanup_BUE_Worker: Parent Conc Request ID:' || p_parent_conc_request_id);
11677: AHL_DEBUG_PUB.debug('Child Conc Request ID:' || p_child_conc_request_id);
11678: END IF;
11679:
11680: IF (p_parent_conc_request_id IS NULL) THEN
11681: RETURN; -- do nothing

Line 11779: AHL_DEBUG_PUB.debug('End Cleanup_BUE_Worker');

11775: END LOOP; -- undeleted_parent IN
11776: END IF; -- p_child_conc_request_id IS NULL
11777:
11778: IF G_debug = 'Y' THEN
11779: AHL_DEBUG_PUB.debug('End Cleanup_BUE_Worker');
11780: END IF;
11781:
11782: EXCEPTION
11783: WHEN record_locked THEN

Line 11990: AHL_DEBUG_PUB.debug('Start Populate_BUE_Worker_for_MR: Input MR Header ID:' || p_mr_header_id);

11986:
11987: BEGIN
11988:
11989: IF G_debug = 'Y' THEN
11990: AHL_DEBUG_PUB.debug('Start Populate_BUE_Worker_for_MR: Input MR Header ID:' || p_mr_header_id);
11991: AHL_DEBUG_PUB.debug('Input Concurrent Flag:' || p_conc_request_id);
11992: AHL_DEBUG_PUB.debug('Input Conc Request ID:' || p_concurrent_flag);
11993: END IF;
11994:

Line 11991: AHL_DEBUG_PUB.debug('Input Concurrent Flag:' || p_conc_request_id);

11987: BEGIN
11988:
11989: IF G_debug = 'Y' THEN
11990: AHL_DEBUG_PUB.debug('Start Populate_BUE_Worker_for_MR: Input MR Header ID:' || p_mr_header_id);
11991: AHL_DEBUG_PUB.debug('Input Concurrent Flag:' || p_conc_request_id);
11992: AHL_DEBUG_PUB.debug('Input Conc Request ID:' || p_concurrent_flag);
11993: END IF;
11994:
11995: -- initialize return status.

Line 11992: AHL_DEBUG_PUB.debug('Input Conc Request ID:' || p_concurrent_flag);

11988:
11989: IF G_debug = 'Y' THEN
11990: AHL_DEBUG_PUB.debug('Start Populate_BUE_Worker_for_MR: Input MR Header ID:' || p_mr_header_id);
11991: AHL_DEBUG_PUB.debug('Input Concurrent Flag:' || p_conc_request_id);
11992: AHL_DEBUG_PUB.debug('Input Conc Request ID:' || p_concurrent_flag);
11993: END IF;
11994:
11995: -- initialize return status.
11996: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 12171: AHL_DEBUG_PUB.debug('End Populate_BUE_Worker_for_MR: x_return_status:' || x_return_status);

12167: -- save changes.
12168: COMMIT WORK;
12169:
12170: IF G_debug = 'Y' THEN
12171: AHL_DEBUG_PUB.debug('End Populate_BUE_Worker_for_MR: x_return_status:' || x_return_status);
12172: END IF;
12173:
12174: END Populate_BUE_Worker_for_MR;
12175:

Line 12217: AHL_DEBUG_PUB.debug ('Start validate_uf_for_ctr');

12213:
12214: BEGIN
12215:
12216: IF G_DEBUG = 'Y' THEN
12217: AHL_DEBUG_PUB.debug ('Start validate_uf_for_ctr');
12218: END IF;
12219:
12220: l_last_index := p_x_forecast_details_tbl.LAST + 1;
12221:

Line 12247: AHL_DEBUG_PUB.debug ('Count on forecast_details' || p_x_forecast_details_tbl.COUNT);

12243: END LOOP; -- j
12244: END IF; -- p_current_usage_tbl.COUNT
12245:
12246: IF G_DEBUG = 'Y' THEN
12247: AHL_DEBUG_PUB.debug ('Count on forecast_details' || p_x_forecast_details_tbl.COUNT);
12248:
12249: IF (p_x_forecast_details_tbl.COUNT > 0) THEN
12250: FOR i IN p_x_forecast_details_tbl.FIRST..p_x_forecast_details_tbl.LAST LOOP
12251: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') Uom_Code' || p_x_forecast_details_tbl(i).uom_code);

Line 12251: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') Uom_Code' || p_x_forecast_details_tbl(i).uom_code);

12247: AHL_DEBUG_PUB.debug ('Count on forecast_details' || p_x_forecast_details_tbl.COUNT);
12248:
12249: IF (p_x_forecast_details_tbl.COUNT > 0) THEN
12250: FOR i IN p_x_forecast_details_tbl.FIRST..p_x_forecast_details_tbl.LAST LOOP
12251: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') Uom_Code' || p_x_forecast_details_tbl(i).uom_code);
12252: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') Start Date' || p_x_forecast_details_tbl(i).start_date);
12253: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') End Date' || p_x_forecast_details_tbl(i).end_date);
12254: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') Usage' || p_x_forecast_details_tbl(i).usage_per_day);
12255: END LOOP;

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

12248:
12249: IF (p_x_forecast_details_tbl.COUNT > 0) THEN
12250: FOR i IN p_x_forecast_details_tbl.FIRST..p_x_forecast_details_tbl.LAST LOOP
12251: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') Uom_Code' || p_x_forecast_details_tbl(i).uom_code);
12252: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') Start Date' || p_x_forecast_details_tbl(i).start_date);
12253: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') End Date' || p_x_forecast_details_tbl(i).end_date);
12254: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') Usage' || p_x_forecast_details_tbl(i).usage_per_day);
12255: END LOOP;
12256: END IF;

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

12249: IF (p_x_forecast_details_tbl.COUNT > 0) THEN
12250: FOR i IN p_x_forecast_details_tbl.FIRST..p_x_forecast_details_tbl.LAST LOOP
12251: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') Uom_Code' || p_x_forecast_details_tbl(i).uom_code);
12252: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') Start Date' || p_x_forecast_details_tbl(i).start_date);
12253: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') End Date' || p_x_forecast_details_tbl(i).end_date);
12254: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') Usage' || p_x_forecast_details_tbl(i).usage_per_day);
12255: END LOOP;
12256: END IF;
12257: AHL_DEBUG_PUB.debug ('End validate_uf_for_ctr');

Line 12254: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') Usage' || p_x_forecast_details_tbl(i).usage_per_day);

12250: FOR i IN p_x_forecast_details_tbl.FIRST..p_x_forecast_details_tbl.LAST LOOP
12251: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') Uom_Code' || p_x_forecast_details_tbl(i).uom_code);
12252: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') Start Date' || p_x_forecast_details_tbl(i).start_date);
12253: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') End Date' || p_x_forecast_details_tbl(i).end_date);
12254: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') Usage' || p_x_forecast_details_tbl(i).usage_per_day);
12255: END LOOP;
12256: END IF;
12257: AHL_DEBUG_PUB.debug ('End validate_uf_for_ctr');
12258: END IF;

Line 12257: AHL_DEBUG_PUB.debug ('End validate_uf_for_ctr');

12253: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') End Date' || p_x_forecast_details_tbl(i).end_date);
12254: AHL_DEBUG_PUB.debug('Forecast Record ('|| i || ') Usage' || p_x_forecast_details_tbl(i).usage_per_day);
12255: END LOOP;
12256: END IF;
12257: AHL_DEBUG_PUB.debug ('End validate_uf_for_ctr');
12258: END IF;
12259:
12260: END validate_uf_for_ctr;
12261: