1: PACKAGE BODY AHL_LTP_SIMUL_PLAN_PVT AS
2: /* $Header: AHLVSPNB.pls 120.5 2008/02/14 19:25:29 jaramana ship $ */
3: --
4: G_PKG_NAME VARCHAR2(30) := 'AHL_LTP_SIMUL_PLAN_PVT';
5: G_DEBUG VARCHAR2(1) := AHL_DEBUG_PUB.is_log_enabled;
6: --
7: -----------------------------------------------------------
8: -- PACKAGE
9: -- AHL_LTP_SIMUL_PLAN_PVT
169: RAISE Fnd_Api.G_EXC_ERROR;
170: END IF;
171:
172: IF G_DEBUG='Y' THEN
173: AHL_DEBUG_PUB.debug( 'inside complete name 1:'||l_simulation_rec.simulation_plan_name);
174: END IF;
175:
176: -- SIMULATION_PLAN_NAME
177: IF p_simulation_rec.simulation_plan_name <> FND_API.g_miss_char THEN
570: -- Standard Start of API savepoint
571: SAVEPOINT create_simulation_plan;
572: -- Check if API is called in debug mode. If yes, enable debug.
573: IF G_DEBUG='Y' THEN
574: AHL_DEBUG_PUB.enable_debug;
575: END IF;
576: -- Debug info.
577: IF G_DEBUG='Y' THEN
578: AHL_DEBUG_PUB.debug( 'enter ahl_ltp_simul_plan_pvt.Create Simulation plan','+SIMPL+');
574: AHL_DEBUG_PUB.enable_debug;
575: END IF;
576: -- Debug info.
577: IF G_DEBUG='Y' THEN
578: AHL_DEBUG_PUB.debug( 'enter ahl_ltp_simul_plan_pvt.Create Simulation plan','+SIMPL+');
579: END IF;
580: -- Standard call to check for call compatibility.
581: IF FND_API.to_boolean(p_init_msg_list)
582: THEN
789: COMMIT;
790: END IF;
791: -- Debug info
792: IF G_DEBUG='Y' THEN
793: Ahl_Debug_Pub.debug( 'End of private api Create Simulation plan','+SMPLN+');
794: END IF;
795: -- Check if API is called in debug mode. If yes, disable debug.
796: IF G_DEBUG='Y' THEN
797: Ahl_Debug_Pub.disable_debug;
793: Ahl_Debug_Pub.debug( 'End of private api Create Simulation plan','+SMPLN+');
794: END IF;
795: -- Check if API is called in debug mode. If yes, disable debug.
796: IF G_DEBUG='Y' THEN
797: Ahl_Debug_Pub.disable_debug;
798: END IF;
799: EXCEPTION
800: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
801: ROLLBACK TO create_simulation_plan;
804: p_count => x_msg_count,
805: p_data => x_msg_data);
806: IF G_DEBUG='Y' THEN
807:
808: AHL_DEBUG_PUB.log_app_messages (
809: x_msg_count, x_msg_data, 'ERROR' );
810: AHL_DEBUG_PUB.debug( 'ahl_ltp_simul_plan_pvt.Create Simulation plan','+SMPLN+');
811: -- Check if API is called in debug mode. If yes, disable debug.
812: AHL_DEBUG_PUB.disable_debug;
806: IF G_DEBUG='Y' THEN
807:
808: AHL_DEBUG_PUB.log_app_messages (
809: x_msg_count, x_msg_data, 'ERROR' );
810: AHL_DEBUG_PUB.debug( 'ahl_ltp_simul_plan_pvt.Create Simulation plan','+SMPLN+');
811: -- Check if API is called in debug mode. If yes, disable debug.
812: AHL_DEBUG_PUB.disable_debug;
813: END IF;
814: WHEN FND_API.G_EXC_ERROR THEN
808: AHL_DEBUG_PUB.log_app_messages (
809: x_msg_count, x_msg_data, 'ERROR' );
810: AHL_DEBUG_PUB.debug( 'ahl_ltp_simul_plan_pvt.Create Simulation plan','+SMPLN+');
811: -- Check if API is called in debug mode. If yes, disable debug.
812: AHL_DEBUG_PUB.disable_debug;
813: END IF;
814: WHEN FND_API.G_EXC_ERROR THEN
815: ROLLBACK TO create_simulation_plan;
816: X_return_status := FND_API.G_RET_STS_ERROR;
818: p_count => x_msg_count,
819: p_data => X_msg_data);
820: IF G_DEBUG='Y' THEN
821: -- Debug info.
822: AHL_DEBUG_PUB.log_app_messages (
823: x_msg_count, x_msg_data, 'UNEXPECTED ERROR' );
824: AHL_DEBUG_PUB.debug( 'ahl_ltp_simul_plan_pvt.Create Simulation plan','+SMPLN+');
825: -- Check if API is called in debug mode. If yes, disable debug.
826: AHL_DEBUG_PUB.disable_debug;
820: IF G_DEBUG='Y' THEN
821: -- Debug info.
822: AHL_DEBUG_PUB.log_app_messages (
823: x_msg_count, x_msg_data, 'UNEXPECTED ERROR' );
824: AHL_DEBUG_PUB.debug( 'ahl_ltp_simul_plan_pvt.Create Simulation plan','+SMPLN+');
825: -- Check if API is called in debug mode. If yes, disable debug.
826: AHL_DEBUG_PUB.disable_debug;
827: END IF;
828: WHEN OTHERS THEN
822: AHL_DEBUG_PUB.log_app_messages (
823: x_msg_count, x_msg_data, 'UNEXPECTED ERROR' );
824: AHL_DEBUG_PUB.debug( 'ahl_ltp_simul_plan_pvt.Create Simulation plan','+SMPLN+');
825: -- Check if API is called in debug mode. If yes, disable debug.
826: AHL_DEBUG_PUB.disable_debug;
827: END IF;
828: WHEN OTHERS THEN
829: ROLLBACK TO create_simulation_plan;
830: X_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
839: p_data => X_msg_data);
840: IF G_DEBUG='Y' THEN
841:
842: -- Debug info.
843: AHL_DEBUG_PUB.log_app_messages (
844: x_msg_count, x_msg_data, 'SQL ERROR' );
845: AHL_DEBUG_PUB.debug( 'ahl_ltp_space_unavl_pvt.Create Simulation plan','+SMPLN+');
846: -- Check if API is called in debug mode. If yes, disable debug.
847: AHL_DEBUG_PUB.disable_debug;
841:
842: -- Debug info.
843: AHL_DEBUG_PUB.log_app_messages (
844: x_msg_count, x_msg_data, 'SQL ERROR' );
845: AHL_DEBUG_PUB.debug( 'ahl_ltp_space_unavl_pvt.Create Simulation plan','+SMPLN+');
846: -- Check if API is called in debug mode. If yes, disable debug.
847: AHL_DEBUG_PUB.disable_debug;
848: END IF;
849: END Create_Simulation_plan;
843: AHL_DEBUG_PUB.log_app_messages (
844: x_msg_count, x_msg_data, 'SQL ERROR' );
845: AHL_DEBUG_PUB.debug( 'ahl_ltp_space_unavl_pvt.Create Simulation plan','+SMPLN+');
846: -- Check if API is called in debug mode. If yes, disable debug.
847: AHL_DEBUG_PUB.disable_debug;
848: END IF;
849: END Create_Simulation_plan;
850:
851:
901: -- Standard Start of API savepoint
902: SAVEPOINT update_simulation_plan;
903: -- Check if API is called in debug mode. If yes, enable debug.
904: IF G_DEBUG='Y' THEN
905: AHL_DEBUG_PUB.enable_debug;
906: END IF;
907: -- Debug info.
908: IF G_DEBUG='Y' THEN
909: AHL_DEBUG_PUB.debug( 'enter ahl_ltp_simul_plan_pvt.Update Simulation plan','+SMPNL+');
905: AHL_DEBUG_PUB.enable_debug;
906: END IF;
907: -- Debug info.
908: IF G_DEBUG='Y' THEN
909: AHL_DEBUG_PUB.debug( 'enter ahl_ltp_simul_plan_pvt.Update Simulation plan','+SMPNL+');
910: END IF;
911: -- Standard call to check for call compatibility.
912: IF FND_API.to_boolean(p_init_msg_list)
913: THEN
1032: COMMIT;
1033: END IF;
1034: -- Debug info
1035: IF G_DEBUG='Y' THEN
1036: Ahl_Debug_Pub.debug( 'End of private api Update Simulation plan','+SMPLN+');
1037: -- Check if API is called in debug mode. If yes, disable debug.
1038: Ahl_Debug_Pub.disable_debug;
1039: END IF;
1040: EXCEPTION
1034: -- Debug info
1035: IF G_DEBUG='Y' THEN
1036: Ahl_Debug_Pub.debug( 'End of private api Update Simulation plan','+SMPLN+');
1037: -- Check if API is called in debug mode. If yes, disable debug.
1038: Ahl_Debug_Pub.disable_debug;
1039: END IF;
1040: EXCEPTION
1041: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1042: ROLLBACK TO update_simulation_plan;
1045: p_count => x_msg_count,
1046: p_data => x_msg_data);
1047: IF G_DEBUG='Y' THEN
1048:
1049: AHL_DEBUG_PUB.log_app_messages (
1050: x_msg_count, x_msg_data, 'ERROR' );
1051: AHL_DEBUG_PUB.debug( 'ahl_ltp_simul_plan_pvt.Update Simulation plan','+SMPLN+');
1052: -- Check if API is called in debug mode. If yes, disable debug.
1053: AHL_DEBUG_PUB.disable_debug;
1047: IF G_DEBUG='Y' THEN
1048:
1049: AHL_DEBUG_PUB.log_app_messages (
1050: x_msg_count, x_msg_data, 'ERROR' );
1051: AHL_DEBUG_PUB.debug( 'ahl_ltp_simul_plan_pvt.Update Simulation plan','+SMPLN+');
1052: -- Check if API is called in debug mode. If yes, disable debug.
1053: AHL_DEBUG_PUB.disable_debug;
1054: END IF;
1055: WHEN FND_API.G_EXC_ERROR THEN
1049: AHL_DEBUG_PUB.log_app_messages (
1050: x_msg_count, x_msg_data, 'ERROR' );
1051: AHL_DEBUG_PUB.debug( 'ahl_ltp_simul_plan_pvt.Update Simulation plan','+SMPLN+');
1052: -- Check if API is called in debug mode. If yes, disable debug.
1053: AHL_DEBUG_PUB.disable_debug;
1054: END IF;
1055: WHEN FND_API.G_EXC_ERROR THEN
1056: ROLLBACK TO update_simulation_plan;
1057: X_return_status := FND_API.G_RET_STS_ERROR;
1060: p_data => X_msg_data);
1061: IF G_DEBUG='Y' THEN
1062:
1063: -- Debug info.
1064: AHL_DEBUG_PUB.log_app_messages (
1065: x_msg_count, x_msg_data, 'UNEXPECTED ERROR' );
1066: AHL_DEBUG_PUB.debug( 'ahl_ltp_simul_plan_pvt.Update Simulation plan','+SMPLN+');
1067: -- Check if API is called in debug mode. If yes, disable debug.
1068: AHL_DEBUG_PUB.disable_debug;
1062:
1063: -- Debug info.
1064: AHL_DEBUG_PUB.log_app_messages (
1065: x_msg_count, x_msg_data, 'UNEXPECTED ERROR' );
1066: AHL_DEBUG_PUB.debug( 'ahl_ltp_simul_plan_pvt.Update Simulation plan','+SMPLN+');
1067: -- Check if API is called in debug mode. If yes, disable debug.
1068: AHL_DEBUG_PUB.disable_debug;
1069: END IF;
1070: WHEN OTHERS THEN
1064: AHL_DEBUG_PUB.log_app_messages (
1065: x_msg_count, x_msg_data, 'UNEXPECTED ERROR' );
1066: AHL_DEBUG_PUB.debug( 'ahl_ltp_simul_plan_pvt.Update Simulation plan','+SMPLN+');
1067: -- Check if API is called in debug mode. If yes, disable debug.
1068: AHL_DEBUG_PUB.disable_debug;
1069: END IF;
1070: WHEN OTHERS THEN
1071: ROLLBACK TO update_simulation_plan;
1072: X_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1081: p_data => X_msg_data);
1082: IF G_DEBUG='Y' THEN
1083:
1084: -- Debug info.
1085: AHL_DEBUG_PUB.log_app_messages (
1086: x_msg_count, x_msg_data, 'SQL ERROR' );
1087: AHL_DEBUG_PUB.debug( 'ahl_ltp_simul_plan_pvt.Update Simulation plan','+SMPLN+');
1088: -- Check if API is called in debug mode. If yes, disable debug.
1089: AHL_DEBUG_PUB.disable_debug;
1083:
1084: -- Debug info.
1085: AHL_DEBUG_PUB.log_app_messages (
1086: x_msg_count, x_msg_data, 'SQL ERROR' );
1087: AHL_DEBUG_PUB.debug( 'ahl_ltp_simul_plan_pvt.Update Simulation plan','+SMPLN+');
1088: -- Check if API is called in debug mode. If yes, disable debug.
1089: AHL_DEBUG_PUB.disable_debug;
1090: END IF;
1091: END Update_Simulation_plan;
1085: AHL_DEBUG_PUB.log_app_messages (
1086: x_msg_count, x_msg_data, 'SQL ERROR' );
1087: AHL_DEBUG_PUB.debug( 'ahl_ltp_simul_plan_pvt.Update Simulation plan','+SMPLN+');
1088: -- Check if API is called in debug mode. If yes, disable debug.
1089: AHL_DEBUG_PUB.disable_debug;
1090: END IF;
1091: END Update_Simulation_plan;
1092:
1093:
1167: -- Standard Start of API savepoint
1168: SAVEPOINT delete_simulation_plan;
1169: -- Check if API is called in debug mode. If yes, enable debug.
1170: IF G_DEBUG='Y' THEN
1171: AHL_DEBUG_PUB.enable_debug;
1172: END IF;
1173: -- Debug info.
1174: IF G_DEBUG='Y' THEN
1175: AHL_DEBUG_PUB.debug( 'enter ahl_ltp_simul_plan_pvt.Delete Simulation plan','+SMPLN+');
1171: AHL_DEBUG_PUB.enable_debug;
1172: END IF;
1173: -- Debug info.
1174: IF G_DEBUG='Y' THEN
1175: AHL_DEBUG_PUB.debug( 'enter ahl_ltp_simul_plan_pvt.Delete Simulation plan','+SMPLN+');
1176: END IF;
1177: -- Standard call to check for call compatibility.
1178: IF FND_API.to_boolean(p_init_msg_list)
1179: THEN
1270: COMMIT;
1271: END IF;
1272: -- Debug info
1273: IF G_DEBUG='Y' THEN
1274: Ahl_Debug_Pub.debug( 'End of private api Delete Simulation plan','+SMPLN+');
1275: END IF;
1276: -- Check if API is called in debug mode. If yes, disable debug.
1277: IF G_DEBUG='Y' THEN
1278: Ahl_Debug_Pub.disable_debug;
1274: Ahl_Debug_Pub.debug( 'End of private api Delete Simulation plan','+SMPLN+');
1275: END IF;
1276: -- Check if API is called in debug mode. If yes, disable debug.
1277: IF G_DEBUG='Y' THEN
1278: Ahl_Debug_Pub.disable_debug;
1279: END IF;
1280: EXCEPTION
1281: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1282: ROLLBACK TO delete_simulation_plan;
1285: p_count => x_msg_count,
1286: p_data => x_msg_data);
1287: IF G_DEBUG='Y' THEN
1288:
1289: AHL_DEBUG_PUB.log_app_messages (
1290: x_msg_count, x_msg_data, 'ERROR' );
1291: AHL_DEBUG_PUB.debug( 'ahl_ltp_simul_plan_pvt.Delete Simulation plan','+SMPLN+');
1292: -- Check if API is called in debug mode. If yes, disable debug.
1293: AHL_DEBUG_PUB.disable_debug;
1287: IF G_DEBUG='Y' THEN
1288:
1289: AHL_DEBUG_PUB.log_app_messages (
1290: x_msg_count, x_msg_data, 'ERROR' );
1291: AHL_DEBUG_PUB.debug( 'ahl_ltp_simul_plan_pvt.Delete Simulation plan','+SMPLN+');
1292: -- Check if API is called in debug mode. If yes, disable debug.
1293: AHL_DEBUG_PUB.disable_debug;
1294: END IF;
1295: WHEN FND_API.G_EXC_ERROR THEN
1289: AHL_DEBUG_PUB.log_app_messages (
1290: x_msg_count, x_msg_data, 'ERROR' );
1291: AHL_DEBUG_PUB.debug( 'ahl_ltp_simul_plan_pvt.Delete Simulation plan','+SMPLN+');
1292: -- Check if API is called in debug mode. If yes, disable debug.
1293: AHL_DEBUG_PUB.disable_debug;
1294: END IF;
1295: WHEN FND_API.G_EXC_ERROR THEN
1296: ROLLBACK TO delete_simulation_plan;
1297: X_return_status := FND_API.G_RET_STS_ERROR;
1299: p_count => x_msg_count,
1300: p_data => X_msg_data);
1301: IF G_DEBUG='Y' THEN
1302: -- Debug info.
1303: AHL_DEBUG_PUB.log_app_messages (
1304: x_msg_count, x_msg_data, 'UNEXPECTED ERROR' );
1305: AHL_DEBUG_PUB.debug( 'ahl_ltp_simul_plan_pvt.Delete Simulation plan','+SMPLN+');
1306: -- Check if API is called in debug mode. If yes, disable debug.
1307: AHL_DEBUG_PUB.disable_debug;
1301: IF G_DEBUG='Y' THEN
1302: -- Debug info.
1303: AHL_DEBUG_PUB.log_app_messages (
1304: x_msg_count, x_msg_data, 'UNEXPECTED ERROR' );
1305: AHL_DEBUG_PUB.debug( 'ahl_ltp_simul_plan_pvt.Delete Simulation plan','+SMPLN+');
1306: -- Check if API is called in debug mode. If yes, disable debug.
1307: AHL_DEBUG_PUB.disable_debug;
1308: END IF;
1309: WHEN OTHERS THEN
1303: AHL_DEBUG_PUB.log_app_messages (
1304: x_msg_count, x_msg_data, 'UNEXPECTED ERROR' );
1305: AHL_DEBUG_PUB.debug( 'ahl_ltp_simul_plan_pvt.Delete Simulation plan','+SMPLN+');
1306: -- Check if API is called in debug mode. If yes, disable debug.
1307: AHL_DEBUG_PUB.disable_debug;
1308: END IF;
1309: WHEN OTHERS THEN
1310: ROLLBACK TO delete_simulation_plan;
1311: X_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1320: p_data => X_msg_data);
1321: IF G_DEBUG='Y' THEN
1322:
1323: -- Debug info.
1324: AHL_DEBUG_PUB.log_app_messages (
1325: x_msg_count, x_msg_data, 'SQL ERROR' );
1326: AHL_DEBUG_PUB.debug( 'ahl_ltp_simul_plan_pvt.Delete Simulation plan','+SMPLN+');
1327: -- Check if API is called in debug mode. If yes, disable debug.
1328: AHL_DEBUG_PUB.disable_debug;
1322:
1323: -- Debug info.
1324: AHL_DEBUG_PUB.log_app_messages (
1325: x_msg_count, x_msg_data, 'SQL ERROR' );
1326: AHL_DEBUG_PUB.debug( 'ahl_ltp_simul_plan_pvt.Delete Simulation plan','+SMPLN+');
1327: -- Check if API is called in debug mode. If yes, disable debug.
1328: AHL_DEBUG_PUB.disable_debug;
1329: END IF;
1330: END Delete_Simulation_plan;
1324: AHL_DEBUG_PUB.log_app_messages (
1325: x_msg_count, x_msg_data, 'SQL ERROR' );
1326: AHL_DEBUG_PUB.debug( 'ahl_ltp_simul_plan_pvt.Delete Simulation plan','+SMPLN+');
1327: -- Check if API is called in debug mode. If yes, disable debug.
1328: AHL_DEBUG_PUB.disable_debug;
1329: END IF;
1330: END Delete_Simulation_plan;
1331:
1332:
1708: -- Standard Start of API savepoint
1709: SAVEPOINT copy_visits_to_plan;
1710: -- Check if API is called in debug mode. If yes, enable debug.
1711: IF G_DEBUG='Y' THEN
1712: AHL_DEBUG_PUB.enable_debug;
1713: -- Debug info.
1714: AHL_DEBUG_PUB.debug( 'enter ahl_ltp_simul_plan_pvt.Copy Visits to Plan','+SMPNL+');
1715: END IF;
1716: -- Standard call to check for call compatibility.
1710: -- Check if API is called in debug mode. If yes, enable debug.
1711: IF G_DEBUG='Y' THEN
1712: AHL_DEBUG_PUB.enable_debug;
1713: -- Debug info.
1714: AHL_DEBUG_PUB.debug( 'enter ahl_ltp_simul_plan_pvt.Copy Visits to Plan','+SMPNL+');
1715: END IF;
1716: -- Standard call to check for call compatibility.
1717: IF FND_API.to_boolean(p_init_msg_list)
1718: THEN
1727: THEN
1728: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1729: END IF;
1730: IF G_DEBUG='Y' THEN
1731: AHL_DEBUG_PUB.debug( 'visit_id'||p_visit_id);
1732: AHL_DEBUG_PUB.debug( 'visit_number'||p_visit_number);
1733: END IF;
1734: ---------------------start API Body------------------------------------
1735: --
1728: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1729: END IF;
1730: IF G_DEBUG='Y' THEN
1731: AHL_DEBUG_PUB.debug( 'visit_id'||p_visit_id);
1732: AHL_DEBUG_PUB.debug( 'visit_number'||p_visit_number);
1733: END IF;
1734: ---------------------start API Body------------------------------------
1735: --
1736: IF (p_visit_number IS NOT NULL AND
1748: CLOSE get_visit_id_cur;
1749: END IF;
1750: IF G_DEBUG='Y' THEN
1751: --
1752: AHL_DEBUG_PUB.debug( 'visit_id'||l_pvisit_id);
1753: AHL_DEBUG_PUB.debug( 'visit_number'||l_primary_visit_id);
1754: END IF;
1755: --
1756: IF (p_visit_id IS NOT NULL AND
1749: END IF;
1750: IF G_DEBUG='Y' THEN
1751: --
1752: AHL_DEBUG_PUB.debug( 'visit_id'||l_pvisit_id);
1753: AHL_DEBUG_PUB.debug( 'visit_number'||l_primary_visit_id);
1754: END IF;
1755: --
1756: IF (p_visit_id IS NOT NULL AND
1757: p_visit_id <> FND_API.G_MISS_NUM) THEN
1829: Fnd_Msg_Pub.ADD;
1830: RAISE Fnd_Api.G_EXC_ERROR;
1831: END IF;
1832: IF G_DEBUG='Y' THEN
1833: AHL_DEBUG_PUB.debug( 'plan_id'||p_plan_id);
1834: AHL_DEBUG_PUB.debug( 'visit_id'||l_pvisit_id);
1835: AHL_DEBUG_PUB.debug( 'asso visit id'||l_primary_visit_id);
1836: END IF;
1837:
1830: RAISE Fnd_Api.G_EXC_ERROR;
1831: END IF;
1832: IF G_DEBUG='Y' THEN
1833: AHL_DEBUG_PUB.debug( 'plan_id'||p_plan_id);
1834: AHL_DEBUG_PUB.debug( 'visit_id'||l_pvisit_id);
1835: AHL_DEBUG_PUB.debug( 'asso visit id'||l_primary_visit_id);
1836: END IF;
1837:
1838: --Change by mpothuku End
1831: END IF;
1832: IF G_DEBUG='Y' THEN
1833: AHL_DEBUG_PUB.debug( 'plan_id'||p_plan_id);
1834: AHL_DEBUG_PUB.debug( 'visit_id'||l_pvisit_id);
1835: AHL_DEBUG_PUB.debug( 'asso visit id'||l_primary_visit_id);
1836: END IF;
1837:
1838: --Change by mpothuku End
1839:
1837:
1838: --Change by mpothuku End
1839:
1840: IF G_DEBUG='Y' THEN
1841: AHL_DEBUG_PUB.debug( 'visit_type_code'||l_visit_detail_rec.visit_type_code);
1842: AHL_DEBUG_PUB.debug( 'inventory_id'||l_visit_detail_rec.inventory_item_id);
1843: END IF;
1844: --Get visit id
1845: SELECT Ahl_Visits_B_S.NEXTVAL INTO l_visit_id
1838: --Change by mpothuku End
1839:
1840: IF G_DEBUG='Y' THEN
1841: AHL_DEBUG_PUB.debug( 'visit_type_code'||l_visit_detail_rec.visit_type_code);
1842: AHL_DEBUG_PUB.debug( 'inventory_id'||l_visit_detail_rec.inventory_item_id);
1843: END IF;
1844: --Get visit id
1845: SELECT Ahl_Visits_B_S.NEXTVAL INTO l_visit_id
1846: FROM dual;
1914: LOOP
1915: FETCH Get_stages_cur INTO l_stage_rec;
1916: EXIT WHEN Get_stages_cur%NOTFOUND;
1917: IF G_DEBUG='Y' THEN
1918: AHL_DEBUG_PUB.debug( 'inside loop stage num:'||l_stage_rec.stage_num);
1919: END IF;
1920: -- Get visit task id
1921: /* Have to Confirm with the Stages API */
1922: SELECT Ahl_vwp_stages_B_S.NEXTVAL into l_stage_id
1922: SELECT Ahl_vwp_stages_B_S.NEXTVAL into l_stage_id
1923: FROM dual;
1924: --
1925: IF G_DEBUG='Y' THEN
1926: AHL_DEBUG_PUB.debug( 'visit call insert stage:'||l_stage_id);
1927: END IF;
1928: /* Copy the details in the Simulation Visit */
1929: -- Invoke the table handler to create a record
1930: Ahl_VWP_Stages_Pkg.Insert_Row (
1957: X_LAST_UPDATED_BY => Fnd_Global.USER_ID,
1958: X_LAST_UPDATE_LOGIN => Fnd_Global.LOGIN_ID);
1959:
1960: IF G_DEBUG='Y' THEN
1961: AHL_DEBUG_PUB.Debug( l_full_name ||': Visit ID =' || l_visit_id);
1962: AHL_DEBUG_PUB.Debug( l_full_name ||': Stage Number =' ||l_stage_rec.Stage_Num);
1963: END IF;
1964: END LOOP;
1965: CLOSE Get_stages_cur;
1958: X_LAST_UPDATE_LOGIN => Fnd_Global.LOGIN_ID);
1959:
1960: IF G_DEBUG='Y' THEN
1961: AHL_DEBUG_PUB.Debug( l_full_name ||': Visit ID =' || l_visit_id);
1962: AHL_DEBUG_PUB.Debug( l_full_name ||': Stage Number =' ||l_stage_rec.Stage_Num);
1963: END IF;
1964: END LOOP;
1965: CLOSE Get_stages_cur;
1966: --mpothuku End
1971: FETCH check_primary_visit into l_primary_visit_check;
1972: CLOSE check_primary_visit;
1973:
1974: IF G_DEBUG='Y' THEN
1975: AHL_DEBUG_PUB.debug( 'visit id before tasks:'||l_pvisit_id);
1976: END IF;
1977: --Copy the corresponding tasks
1978: OPEN get_visit_task_cur(l_pvisit_id);
1979: LOOP
1977: --Copy the corresponding tasks
1978: OPEN get_visit_task_cur(l_pvisit_id);
1979: LOOP
1980: IF G_DEBUG='Y' THEN
1981: AHL_DEBUG_PUB.debug( 'inside loop task num:'||l_visit_task_rec.visit_task_number);
1982: END IF;
1983: FETCH get_visit_task_cur INTO l_visit_task_rec;
1984: EXIT WHEN get_visit_task_cur%NOTFOUND;
1985: -- Get visit task id
1986: SELECT Ahl_Visit_Tasks_B_S.NEXTVAL INTO
1987: l_visit_task_id FROM dual;
1988: --
1989: IF G_DEBUG='Y' THEN
1990: AHL_DEBUG_PUB.debug( 'visit call insert task:'||l_visit_task_id);
1991: END IF;
1992:
1993: /* Added by mpothuku on 01/20/05 to Check if the UE is associated with any of the visits in the plan */
1994: IF(l_visit_task_rec.task_type_code = 'PLANNED' and l_visit_task_rec.unit_effectivity_id IS NOT NULL) THEN
2345: COMMIT;
2346: END IF;
2347: -- Debug info
2348: IF G_DEBUG='Y' THEN
2349: Ahl_Debug_Pub.debug( 'End of private api Copy visits to plan','+SMPLN+');
2350: -- Check if API is called in debug mode. If yes, disable debug.
2351: Ahl_Debug_Pub.disable_debug;
2352: END IF;
2353:
2347: -- Debug info
2348: IF G_DEBUG='Y' THEN
2349: Ahl_Debug_Pub.debug( 'End of private api Copy visits to plan','+SMPLN+');
2350: -- Check if API is called in debug mode. If yes, disable debug.
2351: Ahl_Debug_Pub.disable_debug;
2352: END IF;
2353:
2354: EXCEPTION
2355: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2359: p_count => x_msg_count,
2360: p_data => x_msg_data);
2361: IF G_DEBUG='Y' THEN
2362:
2363: AHL_DEBUG_PUB.log_app_messages (
2364: x_msg_count, x_msg_data, 'ERROR' );
2365: AHL_DEBUG_PUB.debug( 'ahl_ltp_simul_plan_pvt.Copy Visits to plan','+SMPLN+');
2366: -- Check if API is called in debug mode. If yes, disable debug.
2367: AHL_DEBUG_PUB.disable_debug;
2361: IF G_DEBUG='Y' THEN
2362:
2363: AHL_DEBUG_PUB.log_app_messages (
2364: x_msg_count, x_msg_data, 'ERROR' );
2365: AHL_DEBUG_PUB.debug( 'ahl_ltp_simul_plan_pvt.Copy Visits to plan','+SMPLN+');
2366: -- Check if API is called in debug mode. If yes, disable debug.
2367: AHL_DEBUG_PUB.disable_debug;
2368: END IF;
2369:
2363: AHL_DEBUG_PUB.log_app_messages (
2364: x_msg_count, x_msg_data, 'ERROR' );
2365: AHL_DEBUG_PUB.debug( 'ahl_ltp_simul_plan_pvt.Copy Visits to plan','+SMPLN+');
2366: -- Check if API is called in debug mode. If yes, disable debug.
2367: AHL_DEBUG_PUB.disable_debug;
2368: END IF;
2369:
2370: WHEN FND_API.G_EXC_ERROR THEN
2371: ROLLBACK TO copy_visits_to_plan;
2375: p_data => X_msg_data);
2376: IF G_DEBUG='Y' THEN
2377:
2378: -- Debug info.
2379: AHL_DEBUG_PUB.log_app_messages (
2380: x_msg_count, x_msg_data, 'UNEXPECTED ERROR' );
2381: AHL_DEBUG_PUB.debug( 'ahl_ltp_simul_plan_pvt.Copy Visits to plan','+SMPLN+');
2382: -- Check if API is called in debug mode. If yes, disable debug.
2383: AHL_DEBUG_PUB.disable_debug;
2377:
2378: -- Debug info.
2379: AHL_DEBUG_PUB.log_app_messages (
2380: x_msg_count, x_msg_data, 'UNEXPECTED ERROR' );
2381: AHL_DEBUG_PUB.debug( 'ahl_ltp_simul_plan_pvt.Copy Visits to plan','+SMPLN+');
2382: -- Check if API is called in debug mode. If yes, disable debug.
2383: AHL_DEBUG_PUB.disable_debug;
2384: END IF;
2385:
2379: AHL_DEBUG_PUB.log_app_messages (
2380: x_msg_count, x_msg_data, 'UNEXPECTED ERROR' );
2381: AHL_DEBUG_PUB.debug( 'ahl_ltp_simul_plan_pvt.Copy Visits to plan','+SMPLN+');
2382: -- Check if API is called in debug mode. If yes, disable debug.
2383: AHL_DEBUG_PUB.disable_debug;
2384: END IF;
2385:
2386: WHEN OTHERS THEN
2387: ROLLBACK TO copy_visits_to_plan;
2397: p_data => X_msg_data);
2398: IF G_DEBUG='Y' THEN
2399:
2400: -- Debug info.
2401: AHL_DEBUG_PUB.log_app_messages (
2402: x_msg_count, x_msg_data, 'SQL ERROR' );
2403: AHL_DEBUG_PUB.debug( 'ahl_ltp_simul_plan_pvt.Copy Visits to plan','+SMPLN+');
2404: -- Check if API is called in debug mode. If yes, disable debug.
2405: AHL_DEBUG_PUB.disable_debug;
2399:
2400: -- Debug info.
2401: AHL_DEBUG_PUB.log_app_messages (
2402: x_msg_count, x_msg_data, 'SQL ERROR' );
2403: AHL_DEBUG_PUB.debug( 'ahl_ltp_simul_plan_pvt.Copy Visits to plan','+SMPLN+');
2404: -- Check if API is called in debug mode. If yes, disable debug.
2405: AHL_DEBUG_PUB.disable_debug;
2406: END IF;
2407:
2401: AHL_DEBUG_PUB.log_app_messages (
2402: x_msg_count, x_msg_data, 'SQL ERROR' );
2403: AHL_DEBUG_PUB.debug( 'ahl_ltp_simul_plan_pvt.Copy Visits to plan','+SMPLN+');
2404: -- Check if API is called in debug mode. If yes, disable debug.
2405: AHL_DEBUG_PUB.disable_debug;
2406: END IF;
2407:
2408: END Copy_Visits_To_Plan;
2409:
2487: -- Standard Start of API savepoint
2488: SAVEPOINT remove_visits_fr_plan;
2489: -- Check if API is called in debug mode. If yes, enable debug.
2490: IF G_DEBUG='Y' THEN
2491: AHL_DEBUG_PUB.enable_debug;
2492: END IF;
2493: -- Debug info.
2494: IF G_DEBUG='Y' THEN
2495: AHL_DEBUG_PUB.debug( 'enter ahl_ltp_simul_plan_pvt.Remove Visits from Plan','+SMPNL+');
2491: AHL_DEBUG_PUB.enable_debug;
2492: END IF;
2493: -- Debug info.
2494: IF G_DEBUG='Y' THEN
2495: AHL_DEBUG_PUB.debug( 'enter ahl_ltp_simul_plan_pvt.Remove Visits from Plan','+SMPNL+');
2496: END IF;
2497: -- Standard call to check for call compatibility.
2498: IF FND_API.to_boolean(p_init_msg_list)
2499: THEN
2684: COMMIT;
2685: END IF;
2686: IF G_DEBUG='Y' THEN
2687: -- Debug info
2688: Ahl_Debug_Pub.debug( 'End of private api Remove visits from plan','+SMPLN+');
2689: -- Check if API is called in debug mode. If yes, disable debug.
2690: Ahl_Debug_Pub.disable_debug;
2691: END IF;
2692:
2686: IF G_DEBUG='Y' THEN
2687: -- Debug info
2688: Ahl_Debug_Pub.debug( 'End of private api Remove visits from plan','+SMPLN+');
2689: -- Check if API is called in debug mode. If yes, disable debug.
2690: Ahl_Debug_Pub.disable_debug;
2691: END IF;
2692:
2693: EXCEPTION
2694: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2698: p_count => x_msg_count,
2699: p_data => x_msg_data);
2700: IF G_DEBUG='Y' THEN
2701:
2702: AHL_DEBUG_PUB.log_app_messages (
2703: x_msg_count, x_msg_data, 'ERROR' );
2704: AHL_DEBUG_PUB.debug( 'ahl_ltp_simul_plan_pvt.Remove Visits from plan','+SMPLN+');
2705: -- Check if API is called in debug mode. If yes, disable debug.
2706: AHL_DEBUG_PUB.disable_debug;
2700: IF G_DEBUG='Y' THEN
2701:
2702: AHL_DEBUG_PUB.log_app_messages (
2703: x_msg_count, x_msg_data, 'ERROR' );
2704: AHL_DEBUG_PUB.debug( 'ahl_ltp_simul_plan_pvt.Remove Visits from plan','+SMPLN+');
2705: -- Check if API is called in debug mode. If yes, disable debug.
2706: AHL_DEBUG_PUB.disable_debug;
2707: END IF;
2708:
2702: AHL_DEBUG_PUB.log_app_messages (
2703: x_msg_count, x_msg_data, 'ERROR' );
2704: AHL_DEBUG_PUB.debug( 'ahl_ltp_simul_plan_pvt.Remove Visits from plan','+SMPLN+');
2705: -- Check if API is called in debug mode. If yes, disable debug.
2706: AHL_DEBUG_PUB.disable_debug;
2707: END IF;
2708:
2709: WHEN FND_API.G_EXC_ERROR THEN
2710: ROLLBACK TO remove_visits_fr_plan;
2714: p_data => X_msg_data);
2715: IF G_DEBUG='Y' THEN
2716:
2717: -- Debug info.
2718: AHL_DEBUG_PUB.log_app_messages (
2719: x_msg_count, x_msg_data, 'UNEXPECTED ERROR' );
2720: AHL_DEBUG_PUB.debug( 'ahl_ltp_simul_plan_pvt.Remove Visits from plan','+SMPLN+');
2721: -- Check if API is called in debug mode. If yes, disable debug.
2722: AHL_DEBUG_PUB.disable_debug;
2716:
2717: -- Debug info.
2718: AHL_DEBUG_PUB.log_app_messages (
2719: x_msg_count, x_msg_data, 'UNEXPECTED ERROR' );
2720: AHL_DEBUG_PUB.debug( 'ahl_ltp_simul_plan_pvt.Remove Visits from plan','+SMPLN+');
2721: -- Check if API is called in debug mode. If yes, disable debug.
2722: AHL_DEBUG_PUB.disable_debug;
2723: END IF;
2724:
2718: AHL_DEBUG_PUB.log_app_messages (
2719: x_msg_count, x_msg_data, 'UNEXPECTED ERROR' );
2720: AHL_DEBUG_PUB.debug( 'ahl_ltp_simul_plan_pvt.Remove Visits from plan','+SMPLN+');
2721: -- Check if API is called in debug mode. If yes, disable debug.
2722: AHL_DEBUG_PUB.disable_debug;
2723: END IF;
2724:
2725: WHEN OTHERS THEN
2726: ROLLBACK TO remove_visits_fr_plan;
2736: p_data => X_msg_data);
2737: IF G_DEBUG='Y' THEN
2738:
2739: -- Debug info.
2740: AHL_DEBUG_PUB.log_app_messages (
2741: x_msg_count, x_msg_data, 'SQL ERROR' );
2742: AHL_DEBUG_PUB.debug( 'ahl_ltp_simul_plan_pvt.Remove Visits from plan','+SMPLN+');
2743: -- Check if API is called in debug mode. If yes, disable debug.
2744: AHL_DEBUG_PUB.disable_debug;
2738:
2739: -- Debug info.
2740: AHL_DEBUG_PUB.log_app_messages (
2741: x_msg_count, x_msg_data, 'SQL ERROR' );
2742: AHL_DEBUG_PUB.debug( 'ahl_ltp_simul_plan_pvt.Remove Visits from plan','+SMPLN+');
2743: -- Check if API is called in debug mode. If yes, disable debug.
2744: AHL_DEBUG_PUB.disable_debug;
2745: END IF;
2746:
2740: AHL_DEBUG_PUB.log_app_messages (
2741: x_msg_count, x_msg_data, 'SQL ERROR' );
2742: AHL_DEBUG_PUB.debug( 'ahl_ltp_simul_plan_pvt.Remove Visits from plan','+SMPLN+');
2743: -- Check if API is called in debug mode. If yes, disable debug.
2744: AHL_DEBUG_PUB.disable_debug;
2745: END IF;
2746:
2747: END Remove_Visits_FR_Plan;
2748:
2794: -- Standard Start of API savepoint
2795: SAVEPOINT toggle_simulation_delete;
2796: -- Check if API is called in debug mode. If yes, enable debug.
2797: IF G_DEBUG='Y' THEN
2798: AHL_DEBUG_PUB.enable_debug;
2799: -- Debug info.
2800: AHL_DEBUG_PUB.debug( 'enter ahl_ltp_simul_plan_pvt.toggle simulation delete','+SMPNL+');
2801: END IF;
2802: -- Standard call to check for call compatibility.
2796: -- Check if API is called in debug mode. If yes, enable debug.
2797: IF G_DEBUG='Y' THEN
2798: AHL_DEBUG_PUB.enable_debug;
2799: -- Debug info.
2800: AHL_DEBUG_PUB.debug( 'enter ahl_ltp_simul_plan_pvt.toggle simulation delete','+SMPNL+');
2801: END IF;
2802: -- Standard call to check for call compatibility.
2803: IF FND_API.to_boolean(p_init_msg_list)
2804: THEN
2863: COMMIT;
2864: END IF;
2865: IF G_DEBUG='Y' THEN
2866: -- Debug info
2867: Ahl_Debug_Pub.debug( 'End of private api Toggle Simulation Delete','+SMPLN+');
2868: -- Check if API is called in debug mode. If yes, disable debug.
2869: Ahl_Debug_Pub.disable_debug;
2870: END IF;
2871:
2865: IF G_DEBUG='Y' THEN
2866: -- Debug info
2867: Ahl_Debug_Pub.debug( 'End of private api Toggle Simulation Delete','+SMPLN+');
2868: -- Check if API is called in debug mode. If yes, disable debug.
2869: Ahl_Debug_Pub.disable_debug;
2870: END IF;
2871:
2872: EXCEPTION
2873: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2877: p_count => x_msg_count,
2878: p_data => x_msg_data);
2879: IF G_DEBUG='Y' THEN
2880:
2881: IF AHL_DEBUG_PUB.G_FILE_DEBUG THEN
2882: AHL_DEBUG_PUB.log_app_messages (
2883: x_msg_count, x_msg_data, 'ERROR' );
2884: AHL_DEBUG_PUB.debug( 'ahl_ltp_simul_plan_pvt.Toggle Simulation Delete','+SMPLN+');
2885: END IF;
2878: p_data => x_msg_data);
2879: IF G_DEBUG='Y' THEN
2880:
2881: IF AHL_DEBUG_PUB.G_FILE_DEBUG THEN
2882: AHL_DEBUG_PUB.log_app_messages (
2883: x_msg_count, x_msg_data, 'ERROR' );
2884: AHL_DEBUG_PUB.debug( 'ahl_ltp_simul_plan_pvt.Toggle Simulation Delete','+SMPLN+');
2885: END IF;
2886: -- Check if API is called in debug mode. If yes, disable debug.
2880:
2881: IF AHL_DEBUG_PUB.G_FILE_DEBUG THEN
2882: AHL_DEBUG_PUB.log_app_messages (
2883: x_msg_count, x_msg_data, 'ERROR' );
2884: AHL_DEBUG_PUB.debug( 'ahl_ltp_simul_plan_pvt.Toggle Simulation Delete','+SMPLN+');
2885: END IF;
2886: -- Check if API is called in debug mode. If yes, disable debug.
2887: AHL_DEBUG_PUB.disable_debug;
2888: END IF;
2883: x_msg_count, x_msg_data, 'ERROR' );
2884: AHL_DEBUG_PUB.debug( 'ahl_ltp_simul_plan_pvt.Toggle Simulation Delete','+SMPLN+');
2885: END IF;
2886: -- Check if API is called in debug mode. If yes, disable debug.
2887: AHL_DEBUG_PUB.disable_debug;
2888: END IF;
2889:
2890: WHEN FND_API.G_EXC_ERROR THEN
2891: ROLLBACK TO toggle_simulation_delete;
2895: p_data => X_msg_data);
2896: IF G_DEBUG='Y' THEN
2897:
2898: -- Debug info.
2899: IF AHL_DEBUG_PUB.G_FILE_DEBUG THEN
2900: AHL_DEBUG_PUB.log_app_messages (
2901: x_msg_count, x_msg_data, 'UNEXPECTED ERROR' );
2902: AHL_DEBUG_PUB.debug( 'ahl_ltp_simul_plan_pvt.Toggle Simulation Delete','+SMPLN+');
2903: END IF;
2896: IF G_DEBUG='Y' THEN
2897:
2898: -- Debug info.
2899: IF AHL_DEBUG_PUB.G_FILE_DEBUG THEN
2900: AHL_DEBUG_PUB.log_app_messages (
2901: x_msg_count, x_msg_data, 'UNEXPECTED ERROR' );
2902: AHL_DEBUG_PUB.debug( 'ahl_ltp_simul_plan_pvt.Toggle Simulation Delete','+SMPLN+');
2903: END IF;
2904: -- Check if API is called in debug mode. If yes, disable debug.
2898: -- Debug info.
2899: IF AHL_DEBUG_PUB.G_FILE_DEBUG THEN
2900: AHL_DEBUG_PUB.log_app_messages (
2901: x_msg_count, x_msg_data, 'UNEXPECTED ERROR' );
2902: AHL_DEBUG_PUB.debug( 'ahl_ltp_simul_plan_pvt.Toggle Simulation Delete','+SMPLN+');
2903: END IF;
2904: -- Check if API is called in debug mode. If yes, disable debug.
2905: AHL_DEBUG_PUB.disable_debug;
2906: END IF;
2901: x_msg_count, x_msg_data, 'UNEXPECTED ERROR' );
2902: AHL_DEBUG_PUB.debug( 'ahl_ltp_simul_plan_pvt.Toggle Simulation Delete','+SMPLN+');
2903: END IF;
2904: -- Check if API is called in debug mode. If yes, disable debug.
2905: AHL_DEBUG_PUB.disable_debug;
2906: END IF;
2907:
2908: WHEN OTHERS THEN
2909: ROLLBACK TO toggle_simulation_delete;
2919: p_data => X_msg_data);
2920: IF G_DEBUG='Y' THEN
2921:
2922: -- Debug info.
2923: IF AHL_DEBUG_PUB.G_FILE_DEBUG THEN
2924: AHL_DEBUG_PUB.log_app_messages (
2925: x_msg_count, x_msg_data, 'SQL ERROR' );
2926: AHL_DEBUG_PUB.debug( 'ahl_ltp_simul_plan_pvt.Toggle Simulation Delete','+SMPLN+');
2927: END IF;
2920: IF G_DEBUG='Y' THEN
2921:
2922: -- Debug info.
2923: IF AHL_DEBUG_PUB.G_FILE_DEBUG THEN
2924: AHL_DEBUG_PUB.log_app_messages (
2925: x_msg_count, x_msg_data, 'SQL ERROR' );
2926: AHL_DEBUG_PUB.debug( 'ahl_ltp_simul_plan_pvt.Toggle Simulation Delete','+SMPLN+');
2927: END IF;
2928: -- Check if API is called in debug mode. If yes, disable debug.
2922: -- Debug info.
2923: IF AHL_DEBUG_PUB.G_FILE_DEBUG THEN
2924: AHL_DEBUG_PUB.log_app_messages (
2925: x_msg_count, x_msg_data, 'SQL ERROR' );
2926: AHL_DEBUG_PUB.debug( 'ahl_ltp_simul_plan_pvt.Toggle Simulation Delete','+SMPLN+');
2927: END IF;
2928: -- Check if API is called in debug mode. If yes, disable debug.
2929: AHL_DEBUG_PUB.disable_debug;
2930: END IF;
2925: x_msg_count, x_msg_data, 'SQL ERROR' );
2926: AHL_DEBUG_PUB.debug( 'ahl_ltp_simul_plan_pvt.Toggle Simulation Delete','+SMPLN+');
2927: END IF;
2928: -- Check if API is called in debug mode. If yes, disable debug.
2929: AHL_DEBUG_PUB.disable_debug;
2930: END IF;
2931:
2932: END Toggle_Simulation_Delete;
2933:
2992: -- Standard Start of API savepoint
2993: SAVEPOINT set_plan_as_primary;
2994: -- Check if API is called in debug mode. If yes, enable debug.
2995: IF G_DEBUG='Y' THEN
2996: AHL_DEBUG_PUB.enable_debug;
2997: END IF;
2998: -- Debug info.
2999: IF G_DEBUG='Y' THEN
3000: AHL_DEBUG_PUB.debug( 'enter ahl_ltp_simul_plan_pvt.set plan as primary','+SMPNL+');
2996: AHL_DEBUG_PUB.enable_debug;
2997: END IF;
2998: -- Debug info.
2999: IF G_DEBUG='Y' THEN
3000: AHL_DEBUG_PUB.debug( 'enter ahl_ltp_simul_plan_pvt.set plan as primary','+SMPNL+');
3001: END IF;
3002: -- Standard call to check for call compatibility.
3003: IF FND_API.to_boolean(p_init_msg_list)
3004: THEN
3089: COMMIT;
3090: END IF;
3091: -- Debug info
3092: IF G_DEBUG='Y' THEN
3093: Ahl_Debug_Pub.debug( 'End of private api Set Plan as Primary','+SMPLN+');
3094: -- Check if API is called in debug mode. If yes, disable debug.
3095: Ahl_Debug_Pub.disable_debug;
3096: END IF;
3097:
3091: -- Debug info
3092: IF G_DEBUG='Y' THEN
3093: Ahl_Debug_Pub.debug( 'End of private api Set Plan as Primary','+SMPLN+');
3094: -- Check if API is called in debug mode. If yes, disable debug.
3095: Ahl_Debug_Pub.disable_debug;
3096: END IF;
3097:
3098: EXCEPTION
3099: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
3103: p_count => x_msg_count,
3104: p_data => x_msg_data);
3105: IF G_DEBUG='Y' THEN
3106:
3107: AHL_DEBUG_PUB.log_app_messages (
3108: x_msg_count, x_msg_data, 'ERROR' );
3109: AHL_DEBUG_PUB.debug( 'ahl_ltp_simul_plan_pvt.Set Plan As Primary','+SMPLN+');
3110: -- Check if API is called in debug mode. If yes, disable debug.
3111: AHL_DEBUG_PUB.disable_debug;
3105: IF G_DEBUG='Y' THEN
3106:
3107: AHL_DEBUG_PUB.log_app_messages (
3108: x_msg_count, x_msg_data, 'ERROR' );
3109: AHL_DEBUG_PUB.debug( 'ahl_ltp_simul_plan_pvt.Set Plan As Primary','+SMPLN+');
3110: -- Check if API is called in debug mode. If yes, disable debug.
3111: AHL_DEBUG_PUB.disable_debug;
3112: END IF;
3113:
3107: AHL_DEBUG_PUB.log_app_messages (
3108: x_msg_count, x_msg_data, 'ERROR' );
3109: AHL_DEBUG_PUB.debug( 'ahl_ltp_simul_plan_pvt.Set Plan As Primary','+SMPLN+');
3110: -- Check if API is called in debug mode. If yes, disable debug.
3111: AHL_DEBUG_PUB.disable_debug;
3112: END IF;
3113:
3114: WHEN FND_API.G_EXC_ERROR THEN
3115: ROLLBACK TO set_plan_as_primary;
3119: p_data => X_msg_data);
3120: IF G_DEBUG='Y' THEN
3121:
3122: -- Debug info.
3123: AHL_DEBUG_PUB.log_app_messages (
3124: x_msg_count, x_msg_data, 'UNEXPECTED ERROR' );
3125: AHL_DEBUG_PUB.debug( 'ahl_ltp_simul_plan_pvt. Set Plan as Primary','+SMPLN+');
3126: -- Check if API is called in debug mode. If yes, disable debug.
3127: AHL_DEBUG_PUB.disable_debug;
3121:
3122: -- Debug info.
3123: AHL_DEBUG_PUB.log_app_messages (
3124: x_msg_count, x_msg_data, 'UNEXPECTED ERROR' );
3125: AHL_DEBUG_PUB.debug( 'ahl_ltp_simul_plan_pvt. Set Plan as Primary','+SMPLN+');
3126: -- Check if API is called in debug mode. If yes, disable debug.
3127: AHL_DEBUG_PUB.disable_debug;
3128: END IF;
3129: WHEN OTHERS THEN
3123: AHL_DEBUG_PUB.log_app_messages (
3124: x_msg_count, x_msg_data, 'UNEXPECTED ERROR' );
3125: AHL_DEBUG_PUB.debug( 'ahl_ltp_simul_plan_pvt. Set Plan as Primary','+SMPLN+');
3126: -- Check if API is called in debug mode. If yes, disable debug.
3127: AHL_DEBUG_PUB.disable_debug;
3128: END IF;
3129: WHEN OTHERS THEN
3130: ROLLBACK TO set_plan_as_primary;
3131: X_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
3140: p_data => X_msg_data);
3141:
3142: -- Debug info.
3143: IF G_DEBUG='Y' THEN
3144: AHL_DEBUG_PUB.log_app_messages (
3145: x_msg_count, x_msg_data, 'SQL ERROR' );
3146: AHL_DEBUG_PUB.debug( 'ahl_ltp_simul_plan_pvt.Set Plan as Primary','+SMPLN+');
3147: END IF;
3148: -- Check if API is called in debug mode. If yes, disable debug.
3142: -- Debug info.
3143: IF G_DEBUG='Y' THEN
3144: AHL_DEBUG_PUB.log_app_messages (
3145: x_msg_count, x_msg_data, 'SQL ERROR' );
3146: AHL_DEBUG_PUB.debug( 'ahl_ltp_simul_plan_pvt.Set Plan as Primary','+SMPLN+');
3147: END IF;
3148: -- Check if API is called in debug mode. If yes, disable debug.
3149: AHL_DEBUG_PUB.disable_debug;
3150: END Set_Plan_As_Primary;
3145: x_msg_count, x_msg_data, 'SQL ERROR' );
3146: AHL_DEBUG_PUB.debug( 'ahl_ltp_simul_plan_pvt.Set Plan as Primary','+SMPLN+');
3147: END IF;
3148: -- Check if API is called in debug mode. If yes, disable debug.
3149: AHL_DEBUG_PUB.disable_debug;
3150: END Set_Plan_As_Primary;
3151:
3152: --------------------------------------------------------------------
3153: -- PROCEDURE
3589: -- Standard Start of API savepoint
3590: SAVEPOINT set_visit_as_primary;
3591: -- Check if API is called in debug mode. If yes, enable debug.
3592: IF G_DEBUG='Y' THEN
3593: AHL_DEBUG_PUB.enable_debug;
3594: END IF;
3595: -- Debug info.
3596: IF G_DEBUG='Y' THEN
3597: AHL_DEBUG_PUB.debug( 'enter ahl_ltp_simul_plan_pvt.set visit as primary','+SMPNL+');
3593: AHL_DEBUG_PUB.enable_debug;
3594: END IF;
3595: -- Debug info.
3596: IF G_DEBUG='Y' THEN
3597: AHL_DEBUG_PUB.debug( 'enter ahl_ltp_simul_plan_pvt.set visit as primary','+SMPNL+');
3598: END IF;
3599: -- Standard call to check for call compatibility.
3600: IF FND_API.to_boolean(p_init_msg_list)
3601: THEN
3665: and a.simulation_plan_id = b.simulation_plan_id
3666: and b.primary_plan_flag = 'Y';
3667: IF G_DEBUG='Y' THEN
3668:
3669: AHL_DEBUG_PUB.debug( 'before update id :'||l_primary_visit_id);
3670: AHL_DEBUG_PUB.debug( 'before update number:'||l_primary_visit_number);
3671: END IF;
3672:
3673: --Check for simulation delete flag
3666: and b.primary_plan_flag = 'Y';
3667: IF G_DEBUG='Y' THEN
3668:
3669: AHL_DEBUG_PUB.debug( 'before update id :'||l_primary_visit_id);
3670: AHL_DEBUG_PUB.debug( 'before update number:'||l_primary_visit_number);
3671: END IF;
3672:
3673: --Check for simulation delete flag
3674: IF l_simul_visit_rec.simulation_delete_flag = 'Y' THEN --Remove the Primary Visit
3722:
3723: ELSE --Modify the visit and its related atributes
3724:
3725: IF G_DEBUG='Y' THEN
3726: AHL_DEBUG_PUB.debug( 'after else update id :'||l_primary_visit_id);
3727: AHL_DEBUG_PUB.debug( 'after else update number:'||l_primary_visit_number);
3728: --AHL_DEBUG_PUB.debug( 'after else update date:'||l_simul_visit_rec.START_DATE_TIME);
3729: END IF;
3730: --Replace primary visit attributes with simulation visit attributes
3723: ELSE --Modify the visit and its related atributes
3724:
3725: IF G_DEBUG='Y' THEN
3726: AHL_DEBUG_PUB.debug( 'after else update id :'||l_primary_visit_id);
3727: AHL_DEBUG_PUB.debug( 'after else update number:'||l_primary_visit_number);
3728: --AHL_DEBUG_PUB.debug( 'after else update date:'||l_simul_visit_rec.START_DATE_TIME);
3729: END IF;
3730: --Replace primary visit attributes with simulation visit attributes
3731: OPEN c_Visit(l_primary_visit_id);
3724:
3725: IF G_DEBUG='Y' THEN
3726: AHL_DEBUG_PUB.debug( 'after else update id :'||l_primary_visit_id);
3727: AHL_DEBUG_PUB.debug( 'after else update number:'||l_primary_visit_number);
3728: --AHL_DEBUG_PUB.debug( 'after else update date:'||l_simul_visit_rec.START_DATE_TIME);
3729: END IF;
3730: --Replace primary visit attributes with simulation visit attributes
3731: OPEN c_Visit(l_primary_visit_id);
3732: FETCH c_Visit INTO c_visit_rec;
3919: LOOP
3920: FETCH simul_visit_task_cur INTO l_simul_visit_task_rec;
3921:
3922: IF G_DEBUG='Y' THEN
3923: AHL_DEBUG_PUB.debug( 'after fetch'||l_simul_visit_task_rec.primary_visit_task_id);
3924: END IF;
3925:
3926: EXIT WHEN simul_visit_task_cur%NOTFOUND;
3927: --
3933: FETCH check_visit_task_cur INTO l_primary_visit_task_id;
3934: CLOSE check_visit_task_cur;
3935:
3936: IF G_DEBUG='Y' THEN
3937: AHL_DEBUG_PUB.debug( 'Primary visit task:'||l_primary_visit_task_id);
3938: END IF;
3939: END IF;
3940:
3941: /* Added by mpothuku on 01/20/05 to Check if the UE is associated with any of the visits in the plan */
4082: SELECT Ahl_Visit_Tasks_B_S.NEXTVAL INTO
4083: l_visit_task_id FROM dual;
4084:
4085: IF G_DEBUG='Y' THEN
4086: AHL_DEBUG_PUB.debug( 'visit call insert new task created in simulation:'||l_simul_visit_task_rec.visit_task_number);
4087: END IF;
4088:
4089: l_visit_task_number := Get_Visit_Task_Number(l_primary_visit_id,l_simul_visit_task_rec.visit_task_number);
4090: Ahl_Visit_Tasks_Pkg.INSERT_ROW
4151:
4152: END IF;
4153: /* mpothuku End */
4154: IF G_DEBUG='Y' THEN
4155: AHL_DEBUG_PUB.debug( 'After insertion of simulation visit task:'||l_simul_visit_task_rec.visit_task_id);
4156: END IF;
4157: END LOOP;
4158: CLOSE simul_visit_task_cur;
4159:
4162: LOOP
4163: FETCH simul_visit_task_cur INTO l_simul_visit_task_rec;
4164:
4165: IF G_DEBUG='Y' THEN
4166: AHL_DEBUG_PUB.debug( 'after fetch'||l_simul_visit_task_rec.primary_visit_task_id);
4167: END IF;
4168:
4169: EXIT WHEN simul_visit_task_cur%NOTFOUND;
4170: --Check if the task has an originating_task_id /cost_parent_id
4378: LOOP
4379: FETCH Get_stages_cur INTO l_stage_rec;
4380: EXIT WHEN Get_stages_cur%NOTFOUND;
4381: IF G_DEBUG='Y' THEN
4382: AHL_DEBUG_PUB.debug( 'inside loop stage num:'||l_stage_rec.stage_num);
4383: END IF;
4384:
4385: -- Get Stage id of the primary Visit that has to be updated
4386: OPEN c_new_stage(l_stage_rec.stage_id,l_primary_visit_id);
4388: CLOSE c_new_stage;
4389:
4390: --
4391: IF G_DEBUG='Y' THEN
4392: AHL_DEBUG_PUB.debug( 'visit call update stage:'||l_stage_rec.stage_id);
4393: END IF;
4394: /* Copy the details in the Simulation Visit */
4395: -- Invoke the table handler to update a record
4396: Ahl_VWP_Stages_Pkg.Update_Row (
4420: X_LAST_UPDATED_BY => Fnd_Global.USER_ID,
4421: X_LAST_UPDATE_LOGIN => Fnd_Global.LOGIN_ID );
4422:
4423: IF G_DEBUG='Y' THEN
4424: AHL_DEBUG_PUB.Debug( l_full_name ||': Visit ID =' || l_primary_visit_id);
4425: AHL_DEBUG_PUB.Debug( l_full_name ||': Stage Number =' || l_stage_rec.Stage_Num);
4426: END IF;
4427: END LOOP;
4428: CLOSE Get_stages_cur;
4421: X_LAST_UPDATE_LOGIN => Fnd_Global.LOGIN_ID );
4422:
4423: IF G_DEBUG='Y' THEN
4424: AHL_DEBUG_PUB.Debug( l_full_name ||': Visit ID =' || l_primary_visit_id);
4425: AHL_DEBUG_PUB.Debug( l_full_name ||': Stage Number =' || l_stage_rec.Stage_Num);
4426: END IF;
4427: END LOOP;
4428: CLOSE Get_stages_cur;
4429:
4427: END LOOP;
4428: CLOSE Get_stages_cur;
4429:
4430: IF G_DEBUG='Y' THEN
4431: AHL_DEBUG_PUB.debug( 'before delete simulation visit:'||p_visit_id);
4432: END IF;
4433:
4434: --To adjust the task times for the inserted/updated tasks
4435: AHL_VWP_TIMES_PVT.Calculate_Task_Times
4572: COMMIT;
4573: END IF;
4574: -- Debug info
4575: IF G_DEBUG='Y' THEN
4576: Ahl_Debug_Pub.debug( 'End of private api Set visit Primary','+SMPLN+');
4577: -- Check if API is called in debug mode. If yes, disable debug.
4578: Ahl_Debug_Pub.disable_debug;
4579: END IF;
4580: --
4574: -- Debug info
4575: IF G_DEBUG='Y' THEN
4576: Ahl_Debug_Pub.debug( 'End of private api Set visit Primary','+SMPLN+');
4577: -- Check if API is called in debug mode. If yes, disable debug.
4578: Ahl_Debug_Pub.disable_debug;
4579: END IF;
4580: --
4581: EXCEPTION
4582: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
4586: p_count => x_msg_count,
4587: p_data => x_msg_data);
4588:
4589: IF G_DEBUG='Y' THEN
4590: AHL_DEBUG_PUB.log_app_messages (
4591: x_msg_count, x_msg_data, 'ERROR' );
4592: AHL_DEBUG_PUB.debug( 'ahl_ltp_simul_plan_pvt. set visit as primary','+SMPLN+');
4593: END IF;
4594: -- Check if API is called in debug mode. If yes, disable debug.
4588:
4589: IF G_DEBUG='Y' THEN
4590: AHL_DEBUG_PUB.log_app_messages (
4591: x_msg_count, x_msg_data, 'ERROR' );
4592: AHL_DEBUG_PUB.debug( 'ahl_ltp_simul_plan_pvt. set visit as primary','+SMPLN+');
4593: END IF;
4594: -- Check if API is called in debug mode. If yes, disable debug.
4595: AHL_DEBUG_PUB.disable_debug;
4596:
4591: x_msg_count, x_msg_data, 'ERROR' );
4592: AHL_DEBUG_PUB.debug( 'ahl_ltp_simul_plan_pvt. set visit as primary','+SMPLN+');
4593: END IF;
4594: -- Check if API is called in debug mode. If yes, disable debug.
4595: AHL_DEBUG_PUB.disable_debug;
4596:
4597: WHEN FND_API.G_EXC_ERROR THEN
4598: ROLLBACK TO set_visit_as_primary;
4599: X_return_status := FND_API.G_RET_STS_ERROR;
4601: p_count => x_msg_count,
4602: p_data => X_msg_data);
4603: -- Debug info.
4604: IF G_DEBUG='Y' THEN
4605: AHL_DEBUG_PUB.log_app_messages (
4606: x_msg_count, x_msg_data, 'UNEXPECTED ERROR' );
4607: AHL_DEBUG_PUB.debug( 'ahl_ltp_simul_plan_pvt.set visit as primary','+SMPLN+');
4608: END IF;
4609: -- Check if API is called in debug mode. If yes, disable debug.
4603: -- Debug info.
4604: IF G_DEBUG='Y' THEN
4605: AHL_DEBUG_PUB.log_app_messages (
4606: x_msg_count, x_msg_data, 'UNEXPECTED ERROR' );
4607: AHL_DEBUG_PUB.debug( 'ahl_ltp_simul_plan_pvt.set visit as primary','+SMPLN+');
4608: END IF;
4609: -- Check if API is called in debug mode. If yes, disable debug.
4610: AHL_DEBUG_PUB.disable_debug;
4611:
4606: x_msg_count, x_msg_data, 'UNEXPECTED ERROR' );
4607: AHL_DEBUG_PUB.debug( 'ahl_ltp_simul_plan_pvt.set visit as primary','+SMPLN+');
4608: END IF;
4609: -- Check if API is called in debug mode. If yes, disable debug.
4610: AHL_DEBUG_PUB.disable_debug;
4611:
4612: WHEN OTHERS THEN
4613: ROLLBACK TO set_visit_as_primary;
4614: X_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
4623: p_data => X_msg_data);
4624:
4625: -- Debug info.
4626: IF G_DEBUG='Y' THEN
4627: AHL_DEBUG_PUB.log_app_messages (
4628: x_msg_count, x_msg_data, 'SQL ERROR' );
4629: AHL_DEBUG_PUB.debug( 'ahl_ltp_simul_plan_pvt. set visit as primary','+SMPLN+');
4630: END IF;
4631: -- Check if API is called in debug mode. If yes, disable debug.
4625: -- Debug info.
4626: IF G_DEBUG='Y' THEN
4627: AHL_DEBUG_PUB.log_app_messages (
4628: x_msg_count, x_msg_data, 'SQL ERROR' );
4629: AHL_DEBUG_PUB.debug( 'ahl_ltp_simul_plan_pvt. set visit as primary','+SMPLN+');
4630: END IF;
4631: -- Check if API is called in debug mode. If yes, disable debug.
4632: AHL_DEBUG_PUB.disable_debug;
4633: END Set_Visit_As_Primary;
4628: x_msg_count, x_msg_data, 'SQL ERROR' );
4629: AHL_DEBUG_PUB.debug( 'ahl_ltp_simul_plan_pvt. set visit as primary','+SMPLN+');
4630: END IF;
4631: -- Check if API is called in debug mode. If yes, disable debug.
4632: AHL_DEBUG_PUB.disable_debug;
4633: END Set_Visit_As_Primary;
4634: --
4635: --------------------------------------------------------------------
4636: -- PROCEDURE
4692: -- Standard Start of API savepoint
4693: SAVEPOINT Delete_Simul_Visits;
4694: -- Check if API is called in debug mode. If yes, enable debug.
4695: IF G_DEBUG='Y' THEN
4696: AHL_DEBUG_PUB.enable_debug;
4697: END IF;
4698: -- Debug info.
4699: IF G_DEBUG='Y' THEN
4700: AHL_DEBUG_PUB.debug( 'enter ahl_ltp_simul_plan_pvt.Delete Simul Visits','+SMPNL+');
4696: AHL_DEBUG_PUB.enable_debug;
4697: END IF;
4698: -- Debug info.
4699: IF G_DEBUG='Y' THEN
4700: AHL_DEBUG_PUB.debug( 'enter ahl_ltp_simul_plan_pvt.Delete Simul Visits','+SMPNL+');
4701: END IF;
4702: -- Standard call to check for call compatibility.
4703: IF FND_API.to_boolean(p_init_msg_list)
4704: THEN
4764: COMMIT;
4765: END IF;
4766: -- Debug info
4767: IF G_DEBUG='Y' THEN
4768: Ahl_Debug_Pub.debug( 'End of private api Delete_Simul_Visits','+SMPLN+');
4769: -- Check if API is called in debug mode. If yes, disable debug.
4770: Ahl_Debug_Pub.disable_debug;
4771: END IF;
4772: --
4766: -- Debug info
4767: IF G_DEBUG='Y' THEN
4768: Ahl_Debug_Pub.debug( 'End of private api Delete_Simul_Visits','+SMPLN+');
4769: -- Check if API is called in debug mode. If yes, disable debug.
4770: Ahl_Debug_Pub.disable_debug;
4771: END IF;
4772: --
4773: EXCEPTION
4774: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
4778: p_count => x_msg_count,
4779: p_data => x_msg_data);
4780:
4781: IF G_DEBUG='Y' THEN
4782: AHL_DEBUG_PUB.log_app_messages (
4783: x_msg_count, x_msg_data, 'ERROR' );
4784: AHL_DEBUG_PUB.debug( 'ahl_ltp_simul_plan_pvt. Delete Simul Visits','+SMPLN+');
4785: END IF;
4786: -- Check if API is called in debug mode. If yes, disable debug.
4780:
4781: IF G_DEBUG='Y' THEN
4782: AHL_DEBUG_PUB.log_app_messages (
4783: x_msg_count, x_msg_data, 'ERROR' );
4784: AHL_DEBUG_PUB.debug( 'ahl_ltp_simul_plan_pvt. Delete Simul Visits','+SMPLN+');
4785: END IF;
4786: -- Check if API is called in debug mode. If yes, disable debug.
4787: AHL_DEBUG_PUB.disable_debug;
4788:
4783: x_msg_count, x_msg_data, 'ERROR' );
4784: AHL_DEBUG_PUB.debug( 'ahl_ltp_simul_plan_pvt. Delete Simul Visits','+SMPLN+');
4785: END IF;
4786: -- Check if API is called in debug mode. If yes, disable debug.
4787: AHL_DEBUG_PUB.disable_debug;
4788:
4789: WHEN FND_API.G_EXC_ERROR THEN
4790: ROLLBACK TO Delete_Simul_Visits;
4791: X_return_status := FND_API.G_RET_STS_ERROR;
4793: p_count => x_msg_count,
4794: p_data => X_msg_data);
4795: -- Debug info.
4796: IF G_DEBUG='Y' THEN
4797: AHL_DEBUG_PUB.log_app_messages (
4798: x_msg_count, x_msg_data, 'UNEXPECTED ERROR' );
4799: AHL_DEBUG_PUB.debug( 'ahl_ltp_simul_plan_pvt.Delete Simul Visits','+SMPLN+');
4800: END IF;
4801: -- Check if API is called in debug mode. If yes, disable debug.
4795: -- Debug info.
4796: IF G_DEBUG='Y' THEN
4797: AHL_DEBUG_PUB.log_app_messages (
4798: x_msg_count, x_msg_data, 'UNEXPECTED ERROR' );
4799: AHL_DEBUG_PUB.debug( 'ahl_ltp_simul_plan_pvt.Delete Simul Visits','+SMPLN+');
4800: END IF;
4801: -- Check if API is called in debug mode. If yes, disable debug.
4802: AHL_DEBUG_PUB.disable_debug;
4803:
4798: x_msg_count, x_msg_data, 'UNEXPECTED ERROR' );
4799: AHL_DEBUG_PUB.debug( 'ahl_ltp_simul_plan_pvt.Delete Simul Visits','+SMPLN+');
4800: END IF;
4801: -- Check if API is called in debug mode. If yes, disable debug.
4802: AHL_DEBUG_PUB.disable_debug;
4803:
4804: WHEN OTHERS THEN
4805: ROLLBACK TO Delete_Simul_Visits;
4806: X_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
4814: p_count => x_msg_count,
4815: p_data => X_msg_data);
4816: -- Debug info.
4817: IF G_DEBUG='Y' THEN
4818: AHL_DEBUG_PUB.log_app_messages (
4819: x_msg_count, x_msg_data, 'SQL ERROR' );
4820: AHL_DEBUG_PUB.debug( 'ahl_ltp_simul_plan_pvt. Delete Simul Visits','+SMPLN+');
4821: END IF;
4822: -- Check if API is called in debug mode. If yes, disable debug.
4816: -- Debug info.
4817: IF G_DEBUG='Y' THEN
4818: AHL_DEBUG_PUB.log_app_messages (
4819: x_msg_count, x_msg_data, 'SQL ERROR' );
4820: AHL_DEBUG_PUB.debug( 'ahl_ltp_simul_plan_pvt. Delete Simul Visits','+SMPLN+');
4821: END IF;
4822: -- Check if API is called in debug mode. If yes, disable debug.
4823: AHL_DEBUG_PUB.disable_debug;
4824:
4819: x_msg_count, x_msg_data, 'SQL ERROR' );
4820: AHL_DEBUG_PUB.debug( 'ahl_ltp_simul_plan_pvt. Delete Simul Visits','+SMPLN+');
4821: END IF;
4822: -- Check if API is called in debug mode. If yes, disable debug.
4823: AHL_DEBUG_PUB.disable_debug;
4824:
4825: END Delete_Simul_Visits;
4826:
4827: