DBA Data[Home] [Help]

APPS.AHL_PRD_PARTS_CHANGE_PVT dependencies on FND_MSG_PUB

Line 164: FND_MSG_PUB.Initialize;

160: END IF;
161:
162: -- Initialize message list if p_init_msg_list is set to TRUE
163: IF FND_API.To_Boolean(p_init_msg_list) THEN
164: FND_MSG_PUB.Initialize;
165: END IF;
166:
167: -- Initialize API return status to success
168: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 243: l_msg_count := FND_MSG_PUB.count_msg;

239: Convert_value_to_id(p_x_parts_rec => p_x_parts_rec_tbl(i),
240: X_Return_Status => x_return_status);
241:
242: -- Check Error Message stack.
243: l_msg_count := FND_MSG_PUB.count_msg;
244: IF l_msg_count > 0 THEN
245: RAISE FND_API.G_EXC_ERROR;
246: END IF;
247:

Line 261: l_msg_count := FND_MSG_PUB.count_msg;

257: p_module_type => p_module_type,
258: X_Return_Status => X_Return_Status);
259:
260: -- Check Error Message stack.
261: l_msg_count := FND_MSG_PUB.count_msg;
262:
263: IF l_msg_count > 0 THEN
264: RAISE FND_API.G_EXC_ERROR;
265: END IF;

Line 480: FND_MSG_PUB.Count_And_Get

476: AHL_DEBUG_PUB.debug('Completed Processing. Checking for errors', '');
477: END IF;
478:
479: -- Standard call to get message count and if count is 1, get message
480: FND_MSG_PUB.Count_And_Get
481: ( p_count => x_msg_count,
482: p_data => x_msg_data,
483: p_encoded => fnd_api.g_false);
484:

Line 494: FND_MSG_PUB.count_and_get( p_count => x_msg_count,

490: EXCEPTION
491: WHEN FND_API.G_EXC_ERROR THEN
492: x_return_status := FND_API.G_RET_STS_ERROR;
493: Rollback to perform_part_changes_pvt;
494: FND_MSG_PUB.count_and_get( p_count => x_msg_count,
495: p_data => x_msg_data,
496: p_encoded => fnd_api.g_false);
497: -- Disable debug
498: IF G_DEBUG = 'Y' THEN

Line 506: FND_MSG_PUB.count_and_get( p_count => x_msg_count,

502:
503: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
504: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
505: Rollback to perform_part_changes_pvt;
506: FND_MSG_PUB.count_and_get( p_count => x_msg_count,
507: p_data => x_msg_data,
508: p_encoded => fnd_api.g_false);
509: -- Disable debug
510: IF G_DEBUG = 'Y' THEN

Line 516: --IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN

512: END IF;
513: WHEN OTHERS THEN
514: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
515: Rollback to perform_part_changes_pvt;
516: --IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
517: fnd_msg_pub.add_exc_msg(p_pkg_name => 'AHL_PRD_PARTS_CHANGE_PVT',
518: p_procedure_name => 'process_parts',
519: p_error_text => SQLERRM);
520: --END IF;

Line 517: fnd_msg_pub.add_exc_msg(p_pkg_name => 'AHL_PRD_PARTS_CHANGE_PVT',

513: WHEN OTHERS THEN
514: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
515: Rollback to perform_part_changes_pvt;
516: --IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
517: fnd_msg_pub.add_exc_msg(p_pkg_name => 'AHL_PRD_PARTS_CHANGE_PVT',
518: p_procedure_name => 'process_parts',
519: p_error_text => SQLERRM);
520: --END IF;
521: FND_MSG_PUB.count_and_get( p_count => x_msg_count,

Line 521: FND_MSG_PUB.count_and_get( p_count => x_msg_count,

517: fnd_msg_pub.add_exc_msg(p_pkg_name => 'AHL_PRD_PARTS_CHANGE_PVT',
518: p_procedure_name => 'process_parts',
519: p_error_text => SQLERRM);
520: --END IF;
521: FND_MSG_PUB.count_and_get( p_count => x_msg_count,
522: p_data => x_msg_data,
523: p_encoded => fnd_api.g_false);
524:
525: -- Disable debug

Line 653: FND_MSG_PUB.ADD;

649: --********Test that the workorder_id is not null -----
650: IF ( p_x_parts_rec.workorder_id is null or p_x_parts_rec.workorder_id =FND_API.G_MISS_NUM) then
651:
652: FND_MESSAGE.Set_Name('AHL','AHL_PRD_PC_WO_ID_MISSIN');
653: FND_MSG_PUB.ADD;
654: RAISE FND_API.G_EXC_ERROR;
655: END IF;
656:
657: --rroy

Line 665: FND_MSG_PUB.ADD;

661: p_visit_id => NULL,
662: p_item_instance_id => NULL);
663: IF l_return_status = FND_API.G_TRUE THEN
664: FND_MESSAGE.Set_Name('AHL', 'AHL_PRD_PRTCHG_UNTLCKD');
665: FND_MSG_PUB.ADD;
666: RAISE FND_API.G_EXC_ERROR;
667: END IF;
668:
669: --rroy

Line 675: FND_MSG_PUB.ADD;

671:
672: --******** Test that operation type is not null -----
673: IF ( p_x_parts_rec.operation_type is null ) then
674: FND_MESSAGE.Set_Name('AHL','AHL_PRD_PC_OP_TYPE_MISSIN');
675: FND_MSG_PUB.ADD;
676: RAISE FND_API.G_EXC_ERROR;
677: END IF;
678:
679: --*********** Operation Seq ********** -----

Line 684: FND_MSG_PUB.ADD;

680: IF (p_x_parts_rec.operation_sequence_num is null ) then
681: FND_MESSAGE.Set_Name('AHL','AHL_PRD_PC_INVALID_OPERATION');
682: FND_MESSAGE.Set_Token('OPSEQ', p_x_parts_rec.operation_sequence_num);
683: --FND_MESSAGE.Set_Token('WOID', p_x_parts_rec.workorder_id);
684: FND_MSG_PUB.ADD;
685: RAISE FND_API.G_EXC_ERROR;
686: END IF;
687:
688: --*********** Check that the operation sequence exists for the work order. ---

Line 697: FND_MSG_PUB.ADD;

693: FND_MESSAGE.Set_Name('AHL','AHL_PRD_PC_INVALID_OPERATION');
694: FND_MESSAGE.Set_Token('OPSEQ', p_x_parts_rec.operation_sequence_num);
695:
696: --FND_MESSAGE.Set_Token('WOID', p_x_parts_rec.workorder_id);
697: FND_MSG_PUB.ADD;
698: CLOSE ahl_wo_oper_csr;
699: RAISE FND_API.G_EXC_ERROR;
700: END IF;
701: CLOSE ahl_wo_oper_csr;

Line 710: FND_MSG_PUB.ADD;

706: IF ( ahl_job_csr%NOTFOUND) THEN
707: CLOSE ahl_job_csr;
708: FND_MESSAGE.set_name('AHL', 'AHL_PRD_WO_INVALID');
709: FND_MESSAGE.set_token('WOID', p_x_parts_rec.workorder_id);
710: FND_MSG_PUB.ADD;
711: RAISE FND_API.G_EXC_ERROR;
712: END IF;
713: CLOSE ahl_job_csr;
714:

Line 717: FND_MSG_PUB.ADD;

713: CLOSE ahl_job_csr;
714:
715: IF (l_junk <> '3' and l_junk <> '19') THEN
716: FND_MESSAGE.Set_Name('AHL','AHL_PRD_PC_JOB_CLOSED');
717: FND_MSG_PUB.ADD;
718: RAISE FND_API.G_EXC_ERROR;
719: END IF;
720:
721: -- To test pending transactions in WIP interface.

Line 735: FND_MSG_PUB.ADD;

731: IF ( ahl_uc_header_csr%NOTFOUND) THEN
732: CLOSE ahl_uc_header_csr;
733: FND_MESSAGE.set_name('AHL', 'AHL_PRD_UC_HEADER_INVALID');
734: FND_MESSAGE.set_token('UCID', p_x_parts_rec.unit_config_header_id);
735: FND_MSG_PUB.ADD;
736: RAISE FND_API.G_EXC_ERROR;
737: END IF;
738: END IF;
739:

Line 747: FND_MSG_PUB.ADD;

743: and p_x_parts_rec.Unit_Config_Header_Id is not null
744: and p_x_parts_rec.operation_type <> 'D')
745: THEN
746: FND_MESSAGE.Set_Name('AHL','AHL_PRD_PC_NULL_POSN');
747: FND_MSG_PUB.ADD;
748: END IF;
749:
750: --*********Instance number **************--
751: -- It is mandatory.This should not be expired.

Line 756: FND_MSG_PUB.ADD;

752: IF ( p_x_parts_rec.operation_type='D' and
753: p_x_parts_rec.removed_instance_id is null )
754: THEN
755: FND_MESSAGE.Set_Name('AHL','AHL_PRD_PC_RMV_ITEM_MISSING');
756: FND_MSG_PUB.ADD;
757: END IF;
758:
759: IF ( p_x_parts_rec.operation_type='M' and
760: p_x_parts_rec.removed_instance_id is null )

Line 763: FND_MSG_PUB.ADD;

759: IF ( p_x_parts_rec.operation_type='M' and
760: p_x_parts_rec.removed_instance_id is null )
761: THEN
762: FND_MESSAGE.Set_Name('AHL','AHL_PRD_PC_RMV_ITEM_MISSING');
763: FND_MSG_PUB.ADD;
764: END IF;
765:
766: IF ( ( p_x_parts_rec.operation_type='C' or p_x_parts_rec.operation_type='M') and
767: (p_x_parts_rec.installed_instance_id is null) )

Line 770: FND_MSG_PUB.ADD;

766: IF ( ( p_x_parts_rec.operation_type='C' or p_x_parts_rec.operation_type='M') and
767: (p_x_parts_rec.installed_instance_id is null) )
768: THEN
769: FND_MESSAGE.Set_Name('AHL','AHL_PRD_PC_INSTALL_ITEM_MISSIN');
770: FND_MSG_PUB.ADD;
771: END IF;
772:
773: IF ( (p_x_parts_rec.operation_type='C') and
774: (p_x_parts_rec.parent_installed_instance_id is null ))

Line 777: FND_MSG_PUB.ADD;

773: IF ( (p_x_parts_rec.operation_type='C') and
774: (p_x_parts_rec.parent_installed_instance_id is null ))
775: THEN
776: FND_MESSAGE.Set_Name('AHL','AHL_PRD_PC_PARENT_ITEM_MISSING');
777: FND_MSG_PUB.ADD;
778: END IF;
779:
780: --** validate item instance***--
781: -- Check whether teh part being installed is valid or not.

Line 790: FND_MSG_PUB.ADD;

786: FETCH ahl_location_type_csr into l_junk;
787: CLOSE ahl_location_type_csr;
788: IF l_junk is null then
789: FND_MESSAGE.Set_Name('AHL','AHL_PRD_INST_STATUS_INVALID');
790: FND_MSG_PUB.ADD;
791: --RAISE FND_API.G_EXC_ERROR;
792: END IF;
793: */
794: FETCH ahl_location_type_csr into l_inst_job_id, l_wip_job_name;

Line 797: FND_MSG_PUB.ADD;

793: */
794: FETCH ahl_location_type_csr into l_inst_job_id, l_wip_job_name;
795: IF (ahl_location_type_csr%NOTFOUND) THEN
796: FND_MESSAGE.Set_Name('AHL','AHL_PRD_ITEM_NOT_ISSUED');
797: FND_MSG_PUB.ADD;
798: ELSE
799: -- added to fix bug# 6993283
800: -- validate job ID.
801: IF (l_inst_job_id <> l_wip_entity_id) THEN

Line 804: FND_MSG_PUB.ADD;

800: -- validate job ID.
801: IF (l_inst_job_id <> l_wip_entity_id) THEN
802: FND_MESSAGE.Set_Name('AHL','AHL_PRD_INST_JOB_INVALID');
803: FND_MESSAGE.Set_Token('WO_NAME',l_wip_job_name);
804: FND_MSG_PUB.ADD;
805: END IF;
806: END IF;
807: CLOSE ahl_location_type_csr;
808: END IF;

Line 816: FND_MSG_PUB.ADD;

812: OPEN ahl_item_instance_csr(p_x_parts_rec.removed_instance_id);
813: FETCH ahl_item_instance_csr INTO l_rm_inventory_item_id, l_rm_inst_number;
814: IF ahl_item_instance_csr%NOTFOUND THEN
815: FND_MESSAGE.Set_Name('AHL','AHL_PRD_PC_RMV_ITEM_INVALID');
816: FND_MSG_PUB.ADD;
817: ELSE
818: -- Validate that the item exists in the job's org.
819: OPEN mtl_system_kfv_csr(l_rm_inventory_item_id, l_org_id);
820: FETCH mtl_system_kfv_csr INTO l_junk;

Line 824: FND_MSG_PUB.ADD;

820: FETCH mtl_system_kfv_csr INTO l_junk;
821: IF (mtl_system_kfv_csr%NOTFOUND) THEN
822: FND_MESSAGE.Set_Name('AHL','AHL_PRD_PC_RMV_ORG_INVALID');
823: FND_MESSAGE.Set_Token('INST_ID', l_rm_inst_number);
824: FND_MSG_PUB.ADD;
825: END IF;
826: CLOSE mtl_system_kfv_csr;
827:
828: END IF;

Line 842: FND_MSG_PUB.ADD;

838: and (p_x_parts_rec.operation_type='M' or p_x_parts_rec.operation_type='D')
839: )
840: THEN
841: FND_MESSAGE.Set_Name('AHL','AHL_PRD_PC_REASON_CODE_MISSING');
842: FND_MSG_PUB.ADD;
843: END IF;
844:
845: ---*****Validate reason****************
846: IF (p_x_parts_rec.removal_reason_id is not null ) THEN

Line 866: FND_MSG_PUB.ADD;

862: and ( p_x_parts_rec.operation_type='M' or p_x_parts_rec.operation_type='D')
863: )
864: THEN
865: FND_MESSAGE.Set_Name('AHL','AHL_PRD_PC_CONDN_MISSING');
866: FND_MSG_PUB.ADD;
867: END IF;
868:
869: --********* Validate Condition ***************__
870: IF (p_x_parts_rec.condition_id is not null ) THEN

Line 887: FND_MSG_PUB.ADD;

883: IF (p_x_parts_rec.operation_type='D'
884: OR p_x_parts_rec.operation_type='M') THEN
885: IF (p_x_parts_rec.removal_code is null) THEN
886: FND_MESSAGE.Set_Name('AHL','AHL_PRD_PC_REMOVAL_CODE_MISSIN');
887: FND_MSG_PUB.ADD;
888: ELSIF NOT(AHL_UTIL_MC_PKG.Validate_Lookup_Code('AHL_REMOVAL_CODE',p_x_parts_rec.removal_code)) THEN
889: FND_MESSAGE.Set_Name('AHL','AHL_PRD_REMOVAL_CODE_INVALID');
890: FND_MESSAGE.Set_Token('CODE', p_x_parts_rec.removal_code);
891: FND_MSG_PUB.ADD;

Line 891: FND_MSG_PUB.ADD;

887: FND_MSG_PUB.ADD;
888: ELSIF NOT(AHL_UTIL_MC_PKG.Validate_Lookup_Code('AHL_REMOVAL_CODE',p_x_parts_rec.removal_code)) THEN
889: FND_MESSAGE.Set_Name('AHL','AHL_PRD_REMOVAL_CODE_INVALID');
890: FND_MESSAGE.Set_Token('CODE', p_x_parts_rec.removal_code);
891: FND_MSG_PUB.ADD;
892: END IF;
893: END IF;
894:
895: /* SR is now created by Disposition API. ER#

Line 907: -- FND_MSG_PUB.ADD;

903: THEN
904: --******* Problem Code- This should not be null in case of part removal.
905: -- if p_x_parts_rec.problem_code is null then
906: -- FND_MESSAGE.Set_Name('AHL','AHL_PRD_PC_PROBLEM_CODE_MISSIN');
907: -- FND_MSG_PUB.ADD;
908: -- end if;
909:
910: --******* Target Visit ***********
911: -- Error out if target visit id is null for unserviceable/mrb type part removal.

Line 916: FND_MSG_PUB.ADD;

912:
913: IF p_x_parts_rec.target_visit_id is null THEN
914: -- dbms_output.put_line('Target visit is null for unserviceable mrb');
915: FND_MESSAGE.Set_Name('AHL','AHL_PRD_PC_VISIT_INVALID');
916: FND_MSG_PUB.ADD;
917: END IF;
918:
919: --If user sends a target visit, then check should be made that the visit is open.
920:

Line 927: FND_MSG_PUB.ADD;

923: FETCH ahl_visit_csr INTO l_junk;
924: CLOSE ahl_visit_csr;
925: IF l_junk = 'CLOSED' THEN
926: FND_MESSAGE.Set_Name('AHL','AHL_PRD_PC_VISIT_INVALID');
927: FND_MSG_PUB.ADD;
928: RAISE FND_API.G_EXC_ERROR;
929: END IF;
930: END IF;
931: -- dbms_output.put_line('target viist id is valid');

Line 978: FND_MSG_PUB.ADD;

974: and l_plan_id is not null
975: and p_x_parts_rec.collection_id is null)
976: THEN
977: FND_MESSAGE.Set_Name('AHL','AHL_PRD_PC_COLLECT_ID_MISSIN');
978: FND_MSG_PUB.ADD;
979: RAISE FND_API.G_EXC_ERROR;
980: END IF;
981:
982: END IF; -- operation type.

Line 997: FND_MSG_PUB.ADD;

993: --OPEN ahl_locator_csr(p_x_parts_rec.locator_code, l_org_id);
994: --FETCH ahl_locator_csr INTO p_x_parts_rec.locator_id;
995: --IF (ahl_locator_csr%NOTFOUND) then
996: FND_MESSAGE.Set_Name('AHL','AHL_PRD_PC_SUBINV_MANDATORY');
997: FND_MSG_PUB.ADD;
998: --END IF;
999: --CLOSE ahl_locator_csr;
1000: END IF;
1001:

Line 1024: FND_MSG_PUB.ADD;

1020: p_x_parts_rec.Removal_date := sysdate;
1021: ELSIF (trunc(p_x_parts_rec.Removal_date) > trunc(sysdate)) THEN
1022: FND_MESSAGE.Set_Name('AHL','AHL_PRD_REMOVAL_DATE_INVALID');
1023: FND_MESSAGE.Set_Token('DATE',p_x_parts_rec.Removal_date);
1024: FND_MSG_PUB.ADD;
1025: END IF;
1026:
1027:
1028:

Line 1042: FND_MSG_PUB.ADD;

1038: FETCH get_instance_attrib_csr INTO l_config_instance_rec;
1039: CLOSE get_instance_attrib_csr;
1040: IF(NVL(p_x_parts_rec.removed_quantity,1) <= 0 OR NVL(p_x_parts_rec.removed_quantity,1) > l_config_instance_rec.quantity)THEN
1041: FND_MESSAGE.Set_Name('AHL','AHL_PRD_PC_INRMV_QTY');
1042: FND_MSG_PUB.ADD;
1043: END IF;
1044: END IF;
1045:
1046: IF ( p_x_parts_rec.operation_type='C')THEN

Line 1054: FND_MSG_PUB.ADD;

1050: CLOSE get_instance_attrib_csr;
1051:
1052: IF(NVL(p_x_parts_rec.installed_quantity,1) <= 0 OR NVL(p_x_parts_rec.installed_quantity,1) > l_new_instance_rec.quantity)THEN
1053: FND_MESSAGE.Set_Name('AHL','AHL_PRD_PC_ININST_QTY');
1054: FND_MSG_PUB.ADD;
1055: END IF;
1056:
1057: IF p_x_parts_rec.removed_instance_id IS NOT NULL THEN
1058: OPEN get_instance_attrib_csr(p_x_parts_rec.removed_instance_id);

Line 1070: FND_MSG_PUB.ADD;

1066: OR NVL(l_config_instance_rec.inventory_revision,'x') <> NVL(l_new_instance_rec.inventory_revision,'x')
1067: OR l_config_instance_rec.serial_number IS NOT NULL
1068: OR l_new_instance_rec.serial_number IS NOT NULL)THEN
1069: FND_MESSAGE.Set_Name('AHL','AHL_PRD_PC_INV_MRG');
1070: FND_MSG_PUB.ADD;
1071:
1072: END IF;
1073: END IF;
1074:

Line 1152: FND_MSG_PUB.ADD;

1148: IF (ahl_header_id_csr%NOTFOUND) THEN
1149: CLOSE ahl_header_id_csr;
1150: FND_MESSAGE.Set_Name('AHL','AHL_UC_NAME_MISSING');
1151: FND_MESSAGE.Set_Token('NAME',p_x_parts_rec.unit_config_name);
1152: FND_MSG_PUB.ADD;
1153: ELSE
1154: CLOSE ahl_header_id_csr;
1155: END IF; END IF;
1156:

Line 1166: FND_MSG_PUB.ADD;

1162: IF (ahl_instance_id_csr%NOTFOUND) THEN
1163: CLOSE ahl_instance_id_csr;
1164: FND_MESSAGE.Set_Name('AHL','AHL_PRD_RMV_INST_INVALID');
1165: FND_MESSAGE.Set_Token('INST',p_x_parts_rec.removed_instance_num);
1166: FND_MSG_PUB.ADD;
1167: END IF;
1168: CLOSE ahl_instance_id_csr;
1169: END IF;
1170:

Line 1180: FND_MSG_PUB.ADD;

1176: IF (ahl_instance_id_csr%NOTFOUND) THEN
1177: CLOSE ahl_instance_id_csr;
1178: FND_MESSAGE.Set_Name('AHL','AHL_PRD_INSTAL_INST_INVALID');
1179: FND_MESSAGE.Set_Token('INST',p_x_parts_rec.installed_instance_num);
1180: FND_MSG_PUB.ADD;
1181: ELSE
1182: CLOSE ahl_instance_id_csr;
1183: END IF;
1184: END IF;

Line 1196: FND_MSG_PUB.ADD;

1192: IF (ahl_instance_id_csr%NOTFOUND) THEN
1193: CLOSE ahl_instance_id_csr;
1194: FND_MESSAGE.Set_Name('AHL','AHL_PRD_PC_PINSTAL_INVALID');
1195: FND_MESSAGE.Set_Token('INST',p_x_parts_rec.parent_installed_instance_num);
1196: FND_MSG_PUB.ADD;
1197: ELSE
1198: CLOSE ahl_instance_id_csr;
1199: END IF;
1200: END IF;

Line 1212: FND_MSG_PUB.ADD;

1208: FETCH ahl_condition_csr INTO p_x_parts_rec.condition_id;
1209: IF (ahl_condition_csr%NOTFOUND) THEN
1210: FND_MESSAGE.Set_Name('AHL','AHL_PRD_COND_INVALID');
1211: FND_MESSAGE.Set_Token('CODE',p_x_parts_rec.condition);
1212: FND_MSG_PUB.ADD;
1213: END IF;
1214: CLOSE ahl_condition_csr;
1215: END IF;
1216: */

Line 1226: FND_MSG_PUB.ADD;

1222: FETCH ahl_reason_csr INTO p_x_parts_rec.removal_reason_id;
1223: IF (ahl_reason_csr%NOTFOUND) THEN
1224: CLOSE ahl_reason_csr;
1225: FND_MESSAGE.Set_Name('AHL','AHL_PRD_REASON_INVALID');
1226: FND_MSG_PUB.ADD;
1227: ELSE
1228: CLOSE ahl_reason_csr;
1229: END IF;
1230: END IF;

Line 1241: FND_MSG_PUB.ADD;

1237: IF (ahl_removal_lookup_csr%NOTFOUND) THEN
1238: CLOSE ahl_removal_lookup_csr;
1239: FND_MESSAGE.Set_Name('AHL','AHL_PRD_REMOVAL_CODE_INVALID');
1240: FND_MESSAGE.Set_Token('CODE',p_x_parts_rec.removal_meaning);
1241: FND_MSG_PUB.ADD;
1242: ELSE
1243: CLOSE ahl_removal_lookup_csr;
1244: END IF;
1245: END IF;

Line 1258: FND_MSG_PUB.ADD;

1254: IF (ahl_target_visit_csr%NOTFOUND) THEN
1255: CLOSE ahl_target_visit_csr;
1256: FND_MESSAGE.Set_Name('AHL','AHL_TARGET_VISIT_INVALID');
1257: FND_MESSAGE.Set_Token('CODE',p_x_parts_rec.target_visit_num);
1258: FND_MSG_PUB.ADD;
1259: ELSE
1260: CLOSE ahl_target_visit_csr;
1261: END IF;
1262: END IF;

Line 1273: FND_MSG_PUB.ADD;

1269: IF (ahl_problem_lookup_csr%NOTFOUND) THEN
1270: CLOSE ahl_problem_lookup_csr;
1271: FND_MESSAGE.Set_Name('AHL','AHL_PROBLEM_CODE_INVALID');
1272: FND_MESSAGE.Set_Token('CODE',p_x_parts_rec.problem_meaning);
1273: FND_MSG_PUB.ADD;
1274: else
1275: CLOSE ahl_problem_lookup_csr;
1276: end if;
1277: end if;

Line 1344: FND_MSG_PUB.Initialize;

1340: --
1341: BEGIN
1342:
1343: -- Initialize API return status to success
1344: FND_MSG_PUB.Initialize;
1345: x_return_status := FND_API.G_RET_STS_SUCCESS;
1346:
1347: l_item_instance_id := p_item_instance_id;
1348:

Line 1369: FND_MSG_PUB.ADD;

1365: x_unit_config_id := NULL;
1366: ELSE
1367: IF (l_unit_config_status_code = 'DRAFT') THEN
1368: FND_MESSAGE.Set_Name('AHL', 'AHL_PRD_UC_DRAFT');
1369: FND_MSG_PUB.ADD;
1370: CLOSE ahl_uc_name_csr;
1371: RAISE FND_API.G_EXC_ERROR;
1372: ELSIF ((p_validation_mode = 'PARTS_CHG') AND (l_active_uc_status_code <> 'APPROVED')) THEN
1373: FND_MESSAGE.Set_Name('AHL', 'AHL_PRD_UC_UNAPPROVED');

Line 1374: FND_MSG_PUB.ADD;

1370: CLOSE ahl_uc_name_csr;
1371: RAISE FND_API.G_EXC_ERROR;
1372: ELSIF ((p_validation_mode = 'PARTS_CHG') AND (l_active_uc_status_code <> 'APPROVED')) THEN
1373: FND_MESSAGE.Set_Name('AHL', 'AHL_PRD_UC_UNAPPROVED');
1374: FND_MSG_PUB.ADD;
1375: CLOSE ahl_uc_name_csr;
1376: RAISE FND_API.G_EXC_ERROR;
1377: END IF;
1378: END IF;

Line 1388: FND_MSG_PUB.ADD;

1384: FETCH ahl_location_type_csr INTO l_location_type_code, l_location_meaning;
1385: IF (ahl_location_type_csr%NOTFOUND) THEN
1386: CLOSE ahl_location_type_csr;
1387: FND_MESSAGE.Set_Name('AHL', 'AHL_PRD_PC_INST_EXPIRED');
1388: FND_MSG_PUB.ADD;
1389: RAISE FND_API.G_EXC_ERROR;
1390: ELSE
1391: IF (l_location_type_code IN ('PO','IN-TRANSIT','PROJECT','INVENTORY')) THEN
1392: FND_MESSAGE.Set_Name('AHL','AHL_PRD_INST_STATUS_INVALID');

Line 1394: FND_MSG_PUB.ADD;

1390: ELSE
1391: IF (l_location_type_code IN ('PO','IN-TRANSIT','PROJECT','INVENTORY')) THEN
1392: FND_MESSAGE.Set_Name('AHL','AHL_PRD_INST_STATUS_INVALID');
1393: FND_MESSAGE.Set_Token('STATUS',l_location_meaning);
1394: FND_MSG_PUB.ADD;
1395: RAISE FND_API.G_EXC_ERROR;
1396: END IF;
1397: END IF;
1398:

Line 2348: FND_MSG_PUB.ADD;

2344:
2345:
2346: IF (l_unit_config_header_name is not null ) then
2347: FND_MESSAGE.Set_Name('AHL','AHL_PRD_PC_RMV_PRT_INVALID');
2348: FND_MSG_PUB.ADD;
2349: RAISE FND_API.G_EXC_ERROR;
2350: END IF;
2351:
2352: l_serialized := FND_API.G_FALSE;

Line 2563: FND_MSG_PUB.ADD;

2559: l_unit_config_header_name:= AHL_UMP_UTIL_PKG.get_UnitName(p_x_parts_rec.removed_instance_id);
2560:
2561: IF (l_unit_config_header_name is not null ) then
2562: FND_MESSAGE.Set_Name('AHL','AHL_PRD_PC_RMV_PRT_INVALID');
2563: FND_MSG_PUB.ADD;
2564: --RAISE FND_API.G_EXC_ERROR;
2565: end if;
2566: IF G_DEBUG = 'Y' THEN
2567: AHL_DEBUG_PUB.debug('IB Processing- Swap');

Line 2666: FND_MSG_PUB.ADD;

2662: IF (ahl_wip_entity_csr%NOTFOUND) THEN
2663: CLOSE ahl_wip_entity_csr;
2664: FND_MESSAGE.Set_Name('AHL','AHL_PRD_WIP_ENTITY_MISSING');
2665: FND_MESSAGE.Set_Token('WOID',p_x_parts_rec.workorder_id);
2666: FND_MSG_PUB.ADD;
2667: else
2668: CLOSE ahl_wip_entity_csr;
2669: END IF;
2670:

Line 2677: FND_MSG_PUB.ADD;

2673: FETCH ahl_obj_ver_csr INTO p_x_parts_rec.removed_instance_obj_ver_num;
2674: IF (ahl_obj_ver_csr%NOTFOUND) THEN
2675: FND_MESSAGE.Set_Name('AHL','AHL_PRD_REMOVED_INSTANCE_INVALID');
2676: FND_MESSAGE.Set_Token('INST',p_x_parts_rec.removed_instance_id);
2677: FND_MSG_PUB.ADD;
2678: CLOSE ahl_obj_ver_csr;
2679: else
2680: CLOSE ahl_obj_ver_csr;
2681:

Line 2760: FND_MSG_PUB.ADD;

2756: IF (ahl_mtl_txn_param_csr%NOTFOUND) THEN
2757: CLOSE ahl_mtl_txn_param_csr;
2758: FND_MESSAGE.Set_Name('AHL','AHL_PRD_INST_DATA_MISSING');
2759: FND_MESSAGE.Set_Token('WOID',p_x_parts_rec.workorder_id);
2760: FND_MSG_PUB.ADD;
2761: ELSE
2762: CLOSE ahl_mtl_txn_param_csr;
2763: END IF;
2764:

Line 2862: FND_MSG_PUB.ADD;

2858: THEN
2859: --Summary is mandatory for SR API
2860: IF (p_x_parts_rec_tbl(i).summary is null) then
2861: Fnd_Message.SET_NAME('AHL','AHL_PRD_NRJ_SUMMARY_REQ');
2862: FND_MSG_PUB.ADD;
2863: END IF;
2864:
2865: -- Populate sr_task_tbl
2866: l_sr_task_tbl(i).Request_date:= sysdate;

Line 3128: FND_MSG_PUB.Initialize;

3124: Savepoint ReturnTo_Workorder_Locator_pvt;
3125:
3126: -- Initialize message list if p_init_msg_list is set to TRUE
3127: IF FND_API.To_Boolean(p_init_msg_list) THEN
3128: FND_MSG_PUB.Initialize;
3129: END IF;
3130:
3131: -- Initialize API return status to success
3132: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 3143: l_msg_count := FND_MSG_PUB.Count_Msg;

3139: 'Input Parts_Change_id:' || p_part_change_id);
3140: END IF;
3141:
3142: -- get count of existing messages.
3143: l_msg_count := FND_MSG_PUB.Count_Msg;
3144:
3145: -- get disposition details.
3146: OPEN ahl_disp_csr(p_disposition_id, p_part_change_id);
3147: FETCH ahl_disp_csr INTO l_disposition_rec;

Line 3151: FND_MSG_PUB.ADD;

3147: FETCH ahl_disp_csr INTO l_disposition_rec;
3148: IF (ahl_disp_csr%NOTFOUND) THEN
3149: FND_MESSAGE.Set_Name('AHL','AHL_PRD_PC_DISP_INVALID');
3150: FND_MESSAGE.Set_Token('DISP_ID',p_disposition_id);
3151: FND_MSG_PUB.ADD;
3152: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3153: END IF;
3154: CLOSE ahl_disp_csr;
3155:

Line 3247: x_msg_count := FND_MSG_PUB.Count_Msg;

3243: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3244: END IF;
3245:
3246: -- get count of message after calling Material txn api.
3247: x_msg_count := FND_MSG_PUB.Count_Msg;
3248:
3249: -- if return status success.. remove info messages from WIP/INV.
3250: FOR i IN l_msg_count+1..x_msg_count LOOP
3251: FND_MSG_PUB.Delete_Msg(i);

Line 3251: FND_MSG_PUB.Delete_Msg(i);

3247: x_msg_count := FND_MSG_PUB.Count_Msg;
3248:
3249: -- if return status success.. remove info messages from WIP/INV.
3250: FOR i IN l_msg_count+1..x_msg_count LOOP
3251: FND_MSG_PUB.Delete_Msg(i);
3252: END LOOP;
3253:
3254: -- log debug message.
3255: IF (l_debug_proc >= l_debug_level) THEN

Line 3260: FND_MSG_PUB.count_and_get( p_count => x_msg_count,

3256: fnd_log.string(l_debug_proc,l_debug_module,
3257: '');
3258: END IF;
3259:
3260: FND_MSG_PUB.count_and_get( p_count => x_msg_count,
3261: p_data => x_msg_data,
3262: p_encoded => fnd_api.g_false);
3263:
3264: -- Call disposition api to associate material txn.

Line 3313: FND_MSG_PUB.count_and_get( p_count => x_msg_count,

3309: EXCEPTION
3310: WHEN FND_API.G_EXC_ERROR THEN
3311: x_return_status := FND_API.G_RET_STS_ERROR;
3312: Rollback to ReturnTo_Workorder_Locator_pvt;
3313: FND_MSG_PUB.count_and_get( p_count => x_msg_count,
3314: p_data => x_msg_data,
3315: p_encoded => fnd_api.g_false);
3316: -- Disable debug
3317: IF G_DEBUG = 'Y' THEN

Line 3325: FND_MSG_PUB.count_and_get( p_count => x_msg_count,

3321:
3322: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
3323: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
3324: Rollback to ReturnTo_Workorder_Locator_pvt;
3325: FND_MSG_PUB.count_and_get( p_count => x_msg_count,
3326: p_data => x_msg_data,
3327: p_encoded => fnd_api.g_false);
3328: -- Disable debug
3329: IF G_DEBUG = 'Y' THEN

Line 3336: --IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN

3332:
3333: WHEN OTHERS THEN
3334: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
3335: Rollback to ReturnTo_Workorder_Locator_pvt;
3336: --IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
3337: fnd_msg_pub.add_exc_msg(p_pkg_name => 'AHL_PRD_PARTS_CHANGE_PVT',
3338: p_procedure_name => 'process_parts',
3339: p_error_text => SQLERRM);
3340: --END IF;

Line 3337: fnd_msg_pub.add_exc_msg(p_pkg_name => 'AHL_PRD_PARTS_CHANGE_PVT',

3333: WHEN OTHERS THEN
3334: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
3335: Rollback to ReturnTo_Workorder_Locator_pvt;
3336: --IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
3337: fnd_msg_pub.add_exc_msg(p_pkg_name => 'AHL_PRD_PARTS_CHANGE_PVT',
3338: p_procedure_name => 'process_parts',
3339: p_error_text => SQLERRM);
3340: --END IF;
3341: FND_MSG_PUB.count_and_get( p_count => x_msg_count,

Line 3341: FND_MSG_PUB.count_and_get( p_count => x_msg_count,

3337: fnd_msg_pub.add_exc_msg(p_pkg_name => 'AHL_PRD_PARTS_CHANGE_PVT',
3338: p_procedure_name => 'process_parts',
3339: p_error_text => SQLERRM);
3340: --END IF;
3341: FND_MSG_PUB.count_and_get( p_count => x_msg_count,
3342: p_data => x_msg_data,
3343: p_encoded => fnd_api.g_false);
3344:
3345: -- Disable debug

Line 3399: FND_MSG_PUB.Initialize;

3395: END IF;
3396:
3397: -- Initialize message list if p_init_msg_list is set to TRUE
3398: IF FND_API.To_Boolean(p_init_msg_list) THEN
3399: FND_MSG_PUB.Initialize;
3400: END IF;
3401:
3402: -- Initialize API return status to success
3403: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 3514: FND_MSG_PUB.Count_And_Get

3510:
3511:
3512:
3513: -- Standard call to get message count and if count is 1, get message
3514: FND_MSG_PUB.Count_And_Get
3515: ( p_count => x_msg_count,
3516: p_data => x_msg_data,
3517: p_encoded => fnd_api.g_false);
3518:

Line 3532: FND_MSG_PUB.count_and_get( p_count => x_msg_count,

3528: EXCEPTION
3529: WHEN FND_API.G_EXC_ERROR THEN
3530: x_return_status := FND_API.G_RET_STS_ERROR;
3531: Rollback to MOVE_INSTANCE_LOCATION;
3532: FND_MSG_PUB.count_and_get( p_count => x_msg_count,
3533: p_data => x_msg_data,
3534: p_encoded => fnd_api.g_false);
3535:
3536:

Line 3540: FND_MSG_PUB.count_and_get( p_count => x_msg_count,

3536:
3537: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
3538: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
3539: Rollback to MOVE_INSTANCE_LOCATION;
3540: FND_MSG_PUB.count_and_get( p_count => x_msg_count,
3541: p_data => x_msg_data,
3542: p_encoded => fnd_api.g_false);
3543:
3544: WHEN OTHERS THEN

Line 3547: --IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN

3543:
3544: WHEN OTHERS THEN
3545: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
3546: Rollback to MOVE_INSTANCE_LOCATION;
3547: --IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
3548: fnd_msg_pub.add_exc_msg(p_pkg_name => 'AHL_PRD_PARTS_CHANGE_PVT',
3549: p_procedure_name => 'move_instance_location',
3550: p_error_text => SQLERRM);
3551: --END IF;

Line 3548: fnd_msg_pub.add_exc_msg(p_pkg_name => 'AHL_PRD_PARTS_CHANGE_PVT',

3544: WHEN OTHERS THEN
3545: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
3546: Rollback to MOVE_INSTANCE_LOCATION;
3547: --IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
3548: fnd_msg_pub.add_exc_msg(p_pkg_name => 'AHL_PRD_PARTS_CHANGE_PVT',
3549: p_procedure_name => 'move_instance_location',
3550: p_error_text => SQLERRM);
3551: --END IF;
3552: FND_MSG_PUB.count_and_get( p_count => x_msg_count,

Line 3552: FND_MSG_PUB.count_and_get( p_count => x_msg_count,

3548: fnd_msg_pub.add_exc_msg(p_pkg_name => 'AHL_PRD_PARTS_CHANGE_PVT',
3549: p_procedure_name => 'move_instance_location',
3550: p_error_text => SQLERRM);
3551: --END IF;
3552: FND_MSG_PUB.count_and_get( p_count => x_msg_count,
3553: p_data => x_msg_data,
3554: p_encoded => fnd_api.g_false);
3555:
3556: END move_instance_location;

Line 3654: FND_MSG_PUB.ADD;

3650: );
3651: END IF;
3652: FND_MESSAGE.Set_Name('AHL','AHL_PRD_WO_NUM_MISSING');
3653: FND_MESSAGE.Set_Token('WONUM',p_move_item_instance_rec.from_workorder_number);
3654: FND_MSG_PUB.ADD;
3655: END IF;
3656: CLOSE wip_entity_wonum_csr;
3657: ELSIF p_move_item_instance_rec.from_workorder_id IS NOT NULL THEN
3658: OPEN wip_entity_woid_csr(p_move_item_instance_rec.from_workorder_id);

Line 3671: FND_MSG_PUB.ADD;

3667: );
3668: END IF;
3669: FND_MESSAGE.Set_Name('AHL','AHL_PRD_WO_ID_MISSING');
3670: FND_MESSAGE.Set_Token('WOID',p_move_item_instance_rec.from_workorder_id);
3671: FND_MSG_PUB.ADD;
3672: END IF;
3673: CLOSE wip_entity_woid_csr;
3674: END IF;
3675: --dbms_output.put_line('point1');

Line 3691: FND_MSG_PUB.ADD;

3687: );
3688: END IF;
3689: FND_MESSAGE.Set_Name('AHL','AHL_PRD_WO_NUM_MISSING');
3690: FND_MESSAGE.Set_Token('WONUM',p_move_item_instance_rec.to_workorder_number);
3691: FND_MSG_PUB.ADD;
3692: END IF;
3693: CLOSE wip_entity_wonum_csr;
3694: ELSE
3695: OPEN wip_entity_woid_csr(p_move_item_instance_rec.to_workorder_id);

Line 3708: FND_MSG_PUB.ADD;

3704: );
3705: END IF;
3706: FND_MESSAGE.Set_Name('AHL','AHL_PRD_WO_ID_MISSING');
3707: FND_MESSAGE.Set_Token('WOID',p_move_item_instance_rec.to_workorder_id);
3708: FND_MSG_PUB.ADD;
3709: END IF;
3710: CLOSE wip_entity_woid_csr;
3711: END IF;
3712:

Line 3719: FND_MSG_PUB.ADD;

3715: FETCH check_org_csr INTO l_junk;
3716: IF(check_org_csr%NOTFOUND)THEN
3717: FND_MESSAGE.Set_Name('AHL','AHL_PRD_WO_NUM_MISSING');
3718: FND_MESSAGE.Set_Token('WONUM',p_move_item_instance_rec.to_workorder_number);
3719: FND_MSG_PUB.ADD;
3720: END IF;
3721: CLOSE check_org_csr;
3722: END IF;
3723:

Line 3750: FND_MSG_PUB.ADD;

3746: END IF;
3747: l_check_qnt_flag := FALSE; --amsriniv
3748: FND_MESSAGE.Set_Name('AHL','AHL_PRD_REM_INSTNUM_INV');
3749: FND_MESSAGE.Set_Token('INST',p_move_item_instance_rec.instance_number);
3750: FND_MSG_PUB.ADD;
3751: END IF;
3752: CLOSE csi_item_instance_num_csr;
3753: ELSE
3754: IF (fnd_log.level_statement >= fnd_log.g_current_runtime_level)THEN

Line 3781: FND_MSG_PUB.ADD;

3777: END IF;
3778: l_check_qnt_flag := FALSE; --amsriniv
3779: FND_MESSAGE.Set_Name('AHL','AHL_PRD_REM_INSTID_INV');
3780: FND_MESSAGE.Set_Token('INST',p_move_item_instance_rec.instance_id);--amsriniv
3781: FND_MSG_PUB.ADD;
3782: END IF;
3783: CLOSE csi_item_instance_id_csr;
3784: END IF;
3785:

Line 3818: FND_MSG_PUB.ADD;

3814: );
3815: END IF;
3816: FND_MESSAGE.Set_Name('AHL','AHL_PRD_INV_SER_QTY');
3817: FND_MESSAGE.Set_Token('QTY',to_char(p_move_item_instance_rec.quantity));
3818: FND_MSG_PUB.ADD;
3819: END IF;
3820: ELSE
3821: IF ((NVL(p_move_item_instance_rec.quantity,1) < 0) OR
3822: (NVL(p_move_item_instance_rec.quantity,1) > l_current_quantity))THEN

Line 3833: FND_MSG_PUB.ADD;

3829: );
3830: END IF;
3831: FND_MESSAGE.Set_Name('AHL','AHL_PRD_INV_NONSER_QTY');
3832: FND_MESSAGE.Set_Token('QTY',to_char(p_move_item_instance_rec.quantity));
3833: FND_MSG_PUB.ADD;
3834: END IF;
3835: END IF;
3836: END IF;
3837:

Line 3849: FND_MSG_PUB.ADD;

3845: );
3846: END IF;
3847: FND_MESSAGE.Set_Name('AHL','AHL_PRD_INV_CURR_LOC');
3848: FND_MESSAGE.Set_Token('INST',l_instance_rec.instance_id);
3849: FND_MSG_PUB.ADD;
3850: END IF;
3851: --Standard check to count messages
3852: IF Fnd_Msg_Pub.count_msg > 0 THEN
3853: x_return_status := Fnd_Api.G_RET_STS_ERROR;

Line 3852: IF Fnd_Msg_Pub.count_msg > 0 THEN

3848: FND_MESSAGE.Set_Token('INST',l_instance_rec.instance_id);
3849: FND_MSG_PUB.ADD;
3850: END IF;
3851: --Standard check to count messages
3852: IF Fnd_Msg_Pub.count_msg > 0 THEN
3853: x_return_status := Fnd_Api.G_RET_STS_ERROR;
3854: RAISE Fnd_Api.G_EXC_ERROR;
3855: END IF;
3856: