44: l_debug number := NVL(FND_PROFILE.VALUE('INV_DEBUG_TRACE'),0);
45: BEGIN
46:
47: -- Initialize API return status to success
48: x_return_status := FND_API.G_RET_STS_SUCCESS;
49: /* If the locator has a physical_location_id
50: then use the physical_location_id for further
51: processing.Else we have to use the inventory_location_id
52: for further processing
136: END IF;
137:
138: EXCEPTION
139:
140: WHEN fnd_api.g_exc_error THEN
141: x_return_status := fnd_api.g_ret_sts_error;
142: fnd_msg_pub.count_and_get
143: ( p_count => x_msg_count,
144: p_data => x_msg_data
137:
138: EXCEPTION
139:
140: WHEN fnd_api.g_exc_error THEN
141: x_return_status := fnd_api.g_ret_sts_error;
142: fnd_msg_pub.count_and_get
143: ( p_count => x_msg_count,
144: p_data => x_msg_data
145: );
143: ( p_count => x_msg_count,
144: p_data => x_msg_data
145: );
146:
147: WHEN fnd_api.g_exc_unexpected_error THEN
148: x_return_status := fnd_api.g_ret_sts_unexp_error ;
149: fnd_msg_pub.count_and_get
150: ( p_count => x_msg_count,
151: p_data => x_msg_data
144: p_data => x_msg_data
145: );
146:
147: WHEN fnd_api.g_exc_unexpected_error THEN
148: x_return_status := fnd_api.g_ret_sts_unexp_error ;
149: fnd_msg_pub.count_and_get
150: ( p_count => x_msg_count,
151: p_data => x_msg_data
152: );
151: p_data => x_msg_data
152: );
153:
154: WHEN NO_DATA_FOUND THEN
155: x_return_status := fnd_api.g_ret_sts_error;
156:
157: WHEN OTHERS THEN
158: x_return_status := fnd_api.g_ret_sts_unexp_error;
159: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error)
154: WHEN NO_DATA_FOUND THEN
155: x_return_status := fnd_api.g_ret_sts_error;
156:
157: WHEN OTHERS THEN
158: x_return_status := fnd_api.g_ret_sts_unexp_error;
159: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error)
160: THEN
161: fnd_msg_pub.add_exc_msg
162: ( g_pkg_name,
190: l_debug number := NVL(FND_PROFILE.VALUE('INV_DEBUG_TRACE'),0);
191: BEGIN
192:
193: -- Initialize API return status to success
194: x_return_status := FND_API.G_RET_STS_SUCCESS;
195: /* If the locator has a physical_location_id
196: then use the physical_location_id for further
197: processing.Else we have to use the inventory_location_id
198: for further processing
238: END IF;
239:
240: EXCEPTION
241:
242: WHEN fnd_api.g_exc_error THEN
243: x_return_status := fnd_api.g_ret_sts_error;
244: fnd_msg_pub.count_and_get
245: ( p_count => x_msg_count,
246: p_data => x_msg_data
239:
240: EXCEPTION
241:
242: WHEN fnd_api.g_exc_error THEN
243: x_return_status := fnd_api.g_ret_sts_error;
244: fnd_msg_pub.count_and_get
245: ( p_count => x_msg_count,
246: p_data => x_msg_data
247: );
245: ( p_count => x_msg_count,
246: p_data => x_msg_data
247: );
248:
249: WHEN fnd_api.g_exc_unexpected_error THEN
250: x_return_status := fnd_api.g_ret_sts_unexp_error ;
251: fnd_msg_pub.count_and_get
252: ( p_count => x_msg_count,
253: p_data => x_msg_data
246: p_data => x_msg_data
247: );
248:
249: WHEN fnd_api.g_exc_unexpected_error THEN
250: x_return_status := fnd_api.g_ret_sts_unexp_error ;
251: fnd_msg_pub.count_and_get
252: ( p_count => x_msg_count,
253: p_data => x_msg_data
254: );
253: p_data => x_msg_data
254: );
255:
256: WHEN NO_DATA_FOUND THEN
257: x_return_status := fnd_api.g_ret_sts_error;
258:
259: WHEN OTHERS THEN
260: x_return_status := fnd_api.g_ret_sts_unexp_error;
261: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error)
256: WHEN NO_DATA_FOUND THEN
257: x_return_status := fnd_api.g_ret_sts_error;
258:
259: WHEN OTHERS THEN
260: x_return_status := fnd_api.g_ret_sts_unexp_error;
261: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error)
262: THEN
263: fnd_msg_pub.add_exc_msg
264: ( g_pkg_name
294: l_debug number := NVL(FND_PROFILE.VALUE('INV_DEBUG_TRACE'),0);
295: BEGIN
296:
297: -- Initialize API return status to success
298: x_return_status := FND_API.G_RET_STS_SUCCESS;
299: /* If the locator has a physical_location_id
300: then use the physical_location_id for further
301: processing.Else we have to use the inventory_location_id
302: for further processing
346: END IF;
347:
348: EXCEPTION
349:
350: WHEN fnd_api.g_exc_error THEN
351: x_return_status := fnd_api.g_ret_sts_error;
352: fnd_msg_pub.count_and_get
353: ( p_count => x_msg_count,
354: p_data => x_msg_data
347:
348: EXCEPTION
349:
350: WHEN fnd_api.g_exc_error THEN
351: x_return_status := fnd_api.g_ret_sts_error;
352: fnd_msg_pub.count_and_get
353: ( p_count => x_msg_count,
354: p_data => x_msg_data
355: );
353: ( p_count => x_msg_count,
354: p_data => x_msg_data
355: );
356:
357: WHEN fnd_api.g_exc_unexpected_error THEN
358: x_return_status := fnd_api.g_ret_sts_unexp_error ;
359: fnd_msg_pub.count_and_get
360: ( p_count => x_msg_count,
361: p_data => x_msg_data
354: p_data => x_msg_data
355: );
356:
357: WHEN fnd_api.g_exc_unexpected_error THEN
358: x_return_status := fnd_api.g_ret_sts_unexp_error ;
359: fnd_msg_pub.count_and_get
360: ( p_count => x_msg_count,
361: p_data => x_msg_data
362: );
361: p_data => x_msg_data
362: );
363:
364: WHEN NO_DATA_FOUND THEN
365: x_return_status := fnd_api.g_ret_sts_error;
366:
367: WHEN OTHERS THEN
368: x_return_status := fnd_api.g_ret_sts_unexp_error;
369: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error)
364: WHEN NO_DATA_FOUND THEN
365: x_return_status := fnd_api.g_ret_sts_error;
366:
367: WHEN OTHERS THEN
368: x_return_status := fnd_api.g_ret_sts_unexp_error;
369: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error)
370: THEN
371: fnd_msg_pub.add_exc_msg
372: ( g_pkg_name
401: l_debug number := NVL(FND_PROFILE.VALUE('INV_DEBUG_TRACE'),0);
402: BEGIN
403:
404: -- Initialize API return status to success
405: x_return_status := FND_API.G_RET_STS_SUCCESS;
406: /* If the locator has a physical_location_id
407: then use the physical_location_id for further
408: processing.Else we have to use the inventory_location_id
409: for further processing
455:
456:
457: EXCEPTION
458:
459: WHEN fnd_api.g_exc_error THEN
460: x_return_status := fnd_api.g_ret_sts_error;
461: fnd_msg_pub.count_and_get
462: ( p_count => x_msg_count,
463: p_data => x_msg_data
456:
457: EXCEPTION
458:
459: WHEN fnd_api.g_exc_error THEN
460: x_return_status := fnd_api.g_ret_sts_error;
461: fnd_msg_pub.count_and_get
462: ( p_count => x_msg_count,
463: p_data => x_msg_data
464: );
462: ( p_count => x_msg_count,
463: p_data => x_msg_data
464: );
465:
466: WHEN fnd_api.g_exc_unexpected_error THEN
467: x_return_status := fnd_api.g_ret_sts_unexp_error ;
468: fnd_msg_pub.count_and_get
469: ( p_count => x_msg_count,
470: p_data => x_msg_data
463: p_data => x_msg_data
464: );
465:
466: WHEN fnd_api.g_exc_unexpected_error THEN
467: x_return_status := fnd_api.g_ret_sts_unexp_error ;
468: fnd_msg_pub.count_and_get
469: ( p_count => x_msg_count,
470: p_data => x_msg_data
471: );
470: p_data => x_msg_data
471: );
472:
473: WHEN NO_DATA_FOUND THEN
474: x_return_status := fnd_api.g_ret_sts_error;
475:
476: WHEN OTHERS THEN
477: x_return_status := fnd_api.g_ret_sts_unexp_error;
478: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error)
473: WHEN NO_DATA_FOUND THEN
474: x_return_status := fnd_api.g_ret_sts_error;
475:
476: WHEN OTHERS THEN
477: x_return_status := fnd_api.g_ret_sts_unexp_error;
478: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error)
479: THEN
480: fnd_msg_pub.add_exc_msg
481: ( g_pkg_name
566: IF (l_debug = 1) THEN
567: mdebug('In update_loc_curr_capacity_nauto');
568: END IF;
569: -- Initialize API return status to success
570: x_return_status := FND_API.G_RET_STS_SUCCESS;
571: /* If the locator has a physical_location_id
572: then use the physical_location_id for further
573: processing.Else we have to use the inventory_location_id
574: for further processing
635: END IF;
636:
637: END IF;
638: WHEN OTHERS THEN
639: RAISE fnd_api.g_exc_unexpected_error;
640: END;
641: END LOOP;
642: --/**** Bug Fix 13451495 ends ****/
643:
828: -- if p_issue_flag neither Y/N, raise error
829: ELSE
830: fnd_message.set_name('INV', 'INV_FIELD_INVALID');
831: fnd_msg_pub.ADD;
832: RAISE fnd_api.g_exc_error;
833: END IF;
834: -- if not updating weight, then just propagate current_weight to updated_weight.
835: ELSE
836: l_upd_loc_current_weight := l_current_weight;
887: END IF;
888: ELSE
889: fnd_message.set_name('WMS', 'Invalid input to p_issue_flag (receipt/issue)');
890: fnd_msg_pub.ADD;
891: RAISE fnd_api.g_exc_error;
892:
893: END IF;
894: ELSE
895: l_upd_loc_current_volume := l_current_cubic_area;
948: -- if p_issue_flag neither Y/N, raise error
949: ELSE
950: fnd_message.set_name('WMS', 'Invalid input to p_issue_flag (receipt/issue)');
951: fnd_msg_pub.ADD;
952: RAISE fnd_api.g_exc_error;
953: END IF;
954: ELSE
955: l_upd_loc_current_units := l_current_units;
956: l_upd_loc_available_units := l_available_units;
973: END IF;
974:
975: EXCEPTION
976:
977: WHEN fnd_api.g_exc_error THEN
978: ROLLBACK;
979: x_return_status := fnd_api.g_ret_sts_error;
980: fnd_msg_pub.count_and_get
981: ( p_count => x_msg_count,
975: EXCEPTION
976:
977: WHEN fnd_api.g_exc_error THEN
978: ROLLBACK;
979: x_return_status := fnd_api.g_ret_sts_error;
980: fnd_msg_pub.count_and_get
981: ( p_count => x_msg_count,
982: p_data => x_msg_data
983: );
981: ( p_count => x_msg_count,
982: p_data => x_msg_data
983: );
984:
985: WHEN fnd_api.g_exc_unexpected_error THEN
986: ROLLBACK;
987: x_return_status := fnd_api.g_ret_sts_unexp_error ;
988: fnd_msg_pub.count_and_get
989: ( p_count => x_msg_count,
983: );
984:
985: WHEN fnd_api.g_exc_unexpected_error THEN
986: ROLLBACK;
987: x_return_status := fnd_api.g_ret_sts_unexp_error ;
988: fnd_msg_pub.count_and_get
989: ( p_count => x_msg_count,
990: p_data => x_msg_data
991: );
991: );
992:
993: WHEN NO_DATA_FOUND THEN
994: ROLLBACK;
995: x_return_status := fnd_api.g_ret_sts_error;
996:
997: WHEN OTHERS THEN
998: ROLLBACK;
999: x_return_status := fnd_api.g_ret_sts_unexp_error;
995: x_return_status := fnd_api.g_ret_sts_error;
996:
997: WHEN OTHERS THEN
998: ROLLBACK;
999: x_return_status := fnd_api.g_ret_sts_unexp_error;
1000: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error)
1001: THEN
1002: fnd_msg_pub.add_exc_msg
1003: ( g_pkg_name
1040: l_debug number := NVL(FND_PROFILE.VALUE('INV_DEBUG_TRACE'),0);
1041: BEGIN
1042:
1043: -- Initialize API return status to success
1044: x_return_status := FND_API.G_RET_STS_SUCCESS;
1045:
1046: inv_loc_wms_utils.update_loc_curr_capacity_nauto
1047: ( x_return_status => l_return_status,
1048: x_msg_count => x_msg_count,
1054: p_transaction_uom_code => p_transaction_uom_code,
1055: p_quantity => p_quantity,
1056: p_issue_flag => p_issue_flag);
1057:
1058: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN
1059: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
1060: RAISE fnd_api.g_exc_error;
1061: ELSE
1062: RAISE fnd_api.g_exc_unexpected_error;
1055: p_quantity => p_quantity,
1056: p_issue_flag => p_issue_flag);
1057:
1058: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN
1059: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
1060: RAISE fnd_api.g_exc_error;
1061: ELSE
1062: RAISE fnd_api.g_exc_unexpected_error;
1063: END IF;
1056: p_issue_flag => p_issue_flag);
1057:
1058: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN
1059: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
1060: RAISE fnd_api.g_exc_error;
1061: ELSE
1062: RAISE fnd_api.g_exc_unexpected_error;
1063: END IF;
1064: END IF;
1058: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN
1059: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
1060: RAISE fnd_api.g_exc_error;
1061: ELSE
1062: RAISE fnd_api.g_exc_unexpected_error;
1063: END IF;
1064: END IF;
1065:
1066: -- end of autonomous commit
1066: -- end of autonomous commit
1067: COMMIT;
1068: EXCEPTION
1069:
1070: WHEN fnd_api.g_exc_error THEN
1071: ROLLBACK;
1072: x_return_status := fnd_api.g_ret_sts_error;
1073: fnd_msg_pub.count_and_get
1074: ( p_count => x_msg_count,
1068: EXCEPTION
1069:
1070: WHEN fnd_api.g_exc_error THEN
1071: ROLLBACK;
1072: x_return_status := fnd_api.g_ret_sts_error;
1073: fnd_msg_pub.count_and_get
1074: ( p_count => x_msg_count,
1075: p_data => x_msg_data
1076: );
1074: ( p_count => x_msg_count,
1075: p_data => x_msg_data
1076: );
1077:
1078: WHEN fnd_api.g_exc_unexpected_error THEN
1079: ROLLBACK;
1080: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1081: fnd_msg_pub.count_and_get
1082: ( p_count => x_msg_count,
1076: );
1077:
1078: WHEN fnd_api.g_exc_unexpected_error THEN
1079: ROLLBACK;
1080: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1081: fnd_msg_pub.count_and_get
1082: ( p_count => x_msg_count,
1083: p_data => x_msg_data
1084: );
1084: );
1085:
1086: WHEN NO_DATA_FOUND THEN
1087: ROLLBACK;
1088: x_return_status := fnd_api.g_ret_sts_error;
1089:
1090: WHEN OTHERS THEN
1091: ROLLBACK;
1092: x_return_status := fnd_api.g_ret_sts_unexp_error;
1088: x_return_status := fnd_api.g_ret_sts_error;
1089:
1090: WHEN OTHERS THEN
1091: ROLLBACK;
1092: x_return_status := fnd_api.g_ret_sts_unexp_error;
1093: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error)
1094: THEN
1095: fnd_msg_pub.add_exc_msg
1096: ( g_pkg_name
1133: l_debug number := NVL(FND_PROFILE.VALUE('INV_DEBUG_TRACE'),0);
1134: BEGIN
1135:
1136: -- Initialize API return status to success
1137: x_return_status := FND_API.G_RET_STS_SUCCESS;
1138:
1139: inv_loc_wms_utils.update_loc_sugg_capacity_nauto
1140: ( x_return_status => l_return_status,
1141: x_msg_count => x_msg_count,
1147: p_transaction_uom_code => p_transaction_uom_code,
1148: p_quantity => p_quantity
1149: );
1150:
1151: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN
1152: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
1153: RAISE fnd_api.g_exc_error;
1154: ELSE
1155: RAISE fnd_api.g_exc_unexpected_error;
1148: p_quantity => p_quantity
1149: );
1150:
1151: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN
1152: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
1153: RAISE fnd_api.g_exc_error;
1154: ELSE
1155: RAISE fnd_api.g_exc_unexpected_error;
1156: END IF;
1149: );
1150:
1151: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN
1152: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
1153: RAISE fnd_api.g_exc_error;
1154: ELSE
1155: RAISE fnd_api.g_exc_unexpected_error;
1156: END IF;
1157: END IF;
1151: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN
1152: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
1153: RAISE fnd_api.g_exc_error;
1154: ELSE
1155: RAISE fnd_api.g_exc_unexpected_error;
1156: END IF;
1157: END IF;
1158:
1159: -- end of autonomous commit;
1159: -- end of autonomous commit;
1160: COMMIT;
1161: EXCEPTION
1162:
1163: WHEN fnd_api.g_exc_error THEN
1164: ROLLBACK;
1165: x_return_status := fnd_api.g_ret_sts_error;
1166: fnd_msg_pub.count_and_get
1167: ( p_count => x_msg_count,
1161: EXCEPTION
1162:
1163: WHEN fnd_api.g_exc_error THEN
1164: ROLLBACK;
1165: x_return_status := fnd_api.g_ret_sts_error;
1166: fnd_msg_pub.count_and_get
1167: ( p_count => x_msg_count,
1168: p_data => x_msg_data
1169: );
1167: ( p_count => x_msg_count,
1168: p_data => x_msg_data
1169: );
1170:
1171: WHEN fnd_api.g_exc_unexpected_error THEN
1172: ROLLBACK;
1173: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1174: fnd_msg_pub.count_and_get
1175: ( p_count => x_msg_count,
1169: );
1170:
1171: WHEN fnd_api.g_exc_unexpected_error THEN
1172: ROLLBACK;
1173: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1174: fnd_msg_pub.count_and_get
1175: ( p_count => x_msg_count,
1176: p_data => x_msg_data
1177: );
1177: );
1178:
1179: WHEN NO_DATA_FOUND THEN
1180: ROLLBACK;
1181: x_return_status := fnd_api.g_ret_sts_error;
1182:
1183: WHEN OTHERS THEN
1184: ROLLBACK;
1185: x_return_status := fnd_api.g_ret_sts_unexp_error;
1181: x_return_status := fnd_api.g_ret_sts_error;
1182:
1183: WHEN OTHERS THEN
1184: ROLLBACK;
1185: x_return_status := fnd_api.g_ret_sts_unexp_error;
1186: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error)
1187: THEN
1188: fnd_msg_pub.add_exc_msg
1189: ( g_pkg_name
1276: IF (l_debug = 1) THEN
1277: mdebug('In update_loc_sugg_capacity_nauto');
1278: END IF;
1279: -- Initialize API return status to success
1280: x_return_status := FND_API.G_RET_STS_SUCCESS;
1281: /* If the locator has a physical_location_id
1282: then use the physical_location_id for further
1283: processing.Else we have to use the inventory_location_id
1284: for further processing
1344: END IF;
1345: dbms_lock.sleep (0.01); --9447428
1346: END IF;
1347: WHEN OTHERS THEN
1348: RAISE fnd_api.g_exc_unexpected_error;
1349: END;
1350: END LOOP;
1351: --Bug#9864825(Base Bug : 9120873) end
1352:
1601: END IF;
1602:
1603: EXCEPTION
1604:
1605: WHEN fnd_api.g_exc_error THEN
1606: ROLLBACK;
1607: x_return_status := fnd_api.g_ret_sts_error;
1608: fnd_msg_pub.count_and_get
1609: ( p_count => x_msg_count,
1603: EXCEPTION
1604:
1605: WHEN fnd_api.g_exc_error THEN
1606: ROLLBACK;
1607: x_return_status := fnd_api.g_ret_sts_error;
1608: fnd_msg_pub.count_and_get
1609: ( p_count => x_msg_count,
1610: p_data => x_msg_data
1611: );
1609: ( p_count => x_msg_count,
1610: p_data => x_msg_data
1611: );
1612:
1613: WHEN fnd_api.g_exc_unexpected_error THEN
1614: ROLLBACK;
1615: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1616: fnd_msg_pub.count_and_get
1617: ( p_count => x_msg_count,
1611: );
1612:
1613: WHEN fnd_api.g_exc_unexpected_error THEN
1614: ROLLBACK;
1615: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1616: fnd_msg_pub.count_and_get
1617: ( p_count => x_msg_count,
1618: p_data => x_msg_data
1619: );
1619: );
1620:
1621: WHEN NO_DATA_FOUND THEN
1622: ROLLBACK;
1623: x_return_status := fnd_api.g_ret_sts_error;
1624:
1625: WHEN OTHERS THEN
1626: ROLLBACK;
1627: x_return_status := fnd_api.g_ret_sts_unexp_error;
1623: x_return_status := fnd_api.g_ret_sts_error;
1624:
1625: WHEN OTHERS THEN
1626: ROLLBACK;
1627: x_return_status := fnd_api.g_ret_sts_unexp_error;
1628: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error)
1629: THEN
1630: fnd_msg_pub.add_exc_msg
1631: ( g_pkg_name
1666: l_debug number := NVL(FND_PROFILE.VALUE('INV_DEBUG_TRACE'),0);
1667: BEGIN
1668:
1669: -- Initialize API return status to success
1670: x_return_status := FND_API.G_RET_STS_SUCCESS;
1671:
1672: inv_loc_wms_utils.update_loc_sugg_capacity_nauto
1673: ( x_return_status => l_return_status,
1674: x_msg_count => x_msg_count,
1680: p_transaction_uom_code => p_transaction_uom_code,
1681: p_quantity => p_quantity
1682: );
1683:
1684: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN
1685: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
1686: RAISE fnd_api.g_exc_error;
1687: ELSE
1688: RAISE fnd_api.g_exc_unexpected_error;
1681: p_quantity => p_quantity
1682: );
1683:
1684: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN
1685: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
1686: RAISE fnd_api.g_exc_error;
1687: ELSE
1688: RAISE fnd_api.g_exc_unexpected_error;
1689: END IF;
1682: );
1683:
1684: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN
1685: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
1686: RAISE fnd_api.g_exc_error;
1687: ELSE
1688: RAISE fnd_api.g_exc_unexpected_error;
1689: END IF;
1690: END IF;
1684: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN
1685: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
1686: RAISE fnd_api.g_exc_error;
1687: ELSE
1688: RAISE fnd_api.g_exc_unexpected_error;
1689: END IF;
1690: END IF;
1691:
1692: -- Update empty_flag, mixed_item_flag. Pass transaction action of receipt
1703: , P_TRANSFER_ORGANIZATION => NULL
1704: , P_TRANSFER_LOCATION_ID => NULL
1705: , P_SOURCE => null);
1706:
1707: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN
1708: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
1709: RAISE fnd_api.g_exc_error;
1710: ELSE
1711: RAISE fnd_api.g_exc_unexpected_error;
1704: , P_TRANSFER_LOCATION_ID => NULL
1705: , P_SOURCE => null);
1706:
1707: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN
1708: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
1709: RAISE fnd_api.g_exc_error;
1710: ELSE
1711: RAISE fnd_api.g_exc_unexpected_error;
1712: END IF;
1705: , P_SOURCE => null);
1706:
1707: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN
1708: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
1709: RAISE fnd_api.g_exc_error;
1710: ELSE
1711: RAISE fnd_api.g_exc_unexpected_error;
1712: END IF;
1713: END IF;
1707: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN
1708: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
1709: RAISE fnd_api.g_exc_error;
1710: ELSE
1711: RAISE fnd_api.g_exc_unexpected_error;
1712: END IF;
1713: END IF;
1714:
1715: -- end of autonomous commit;
1715: -- end of autonomous commit;
1716: COMMIT;
1717: EXCEPTION
1718:
1719: WHEN fnd_api.g_exc_error THEN
1720: ROLLBACK;
1721: x_return_status := fnd_api.g_ret_sts_error;
1722: fnd_msg_pub.count_and_get
1723: ( p_count => x_msg_count,
1717: EXCEPTION
1718:
1719: WHEN fnd_api.g_exc_error THEN
1720: ROLLBACK;
1721: x_return_status := fnd_api.g_ret_sts_error;
1722: fnd_msg_pub.count_and_get
1723: ( p_count => x_msg_count,
1724: p_data => x_msg_data
1725: );
1723: ( p_count => x_msg_count,
1724: p_data => x_msg_data
1725: );
1726:
1727: WHEN fnd_api.g_exc_unexpected_error THEN
1728: ROLLBACK;
1729: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1730: fnd_msg_pub.count_and_get
1731: ( p_count => x_msg_count,
1725: );
1726:
1727: WHEN fnd_api.g_exc_unexpected_error THEN
1728: ROLLBACK;
1729: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1730: fnd_msg_pub.count_and_get
1731: ( p_count => x_msg_count,
1732: p_data => x_msg_data
1733: );
1733: );
1734:
1735: WHEN NO_DATA_FOUND THEN
1736: ROLLBACK;
1737: x_return_status := fnd_api.g_ret_sts_error;
1738:
1739: WHEN OTHERS THEN
1740: ROLLBACK;
1741: x_return_status := fnd_api.g_ret_sts_unexp_error;
1737: x_return_status := fnd_api.g_ret_sts_error;
1738:
1739: WHEN OTHERS THEN
1740: ROLLBACK;
1741: x_return_status := fnd_api.g_ret_sts_unexp_error;
1742: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error)
1743: THEN
1744: fnd_msg_pub.add_exc_msg
1745: ( g_pkg_name
1831:
1832: l_debug number := NVL(FND_PROFILE.VALUE('INV_DEBUG_TRACE'),0);
1833: BEGIN
1834: -- Initialize API return status to success
1835: x_return_status := FND_API.G_RET_STS_SUCCESS;
1836:
1837: SAVEPOINT revert_loc_suggested_cap_sp;--BUG 4890372
1838:
1839: IF (l_debug=1) THEN
1909: mdebug('locking locator - Attempt: ' || 10001-l_loc_counter || ' in revert_loc_suggested_capacity');
1910: END IF;
1911: END IF;
1912: WHEN OTHERS THEN
1913: RAISE fnd_api.g_exc_unexpected_error;
1914: END;
1915: END LOOP;
1916:
1917:
2215: , P_TRANSFER_ORGANIZATION => NULL
2216: , P_TRANSFER_LOCATION_ID => NULL
2217: , P_SOURCE => l_source);
2218:
2219: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN
2220: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
2221: RAISE fnd_api.g_exc_error;
2222: ELSE
2223: RAISE fnd_api.g_exc_unexpected_error;
2216: , P_TRANSFER_LOCATION_ID => NULL
2217: , P_SOURCE => l_source);
2218:
2219: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN
2220: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
2221: RAISE fnd_api.g_exc_error;
2222: ELSE
2223: RAISE fnd_api.g_exc_unexpected_error;
2224: END IF;
2217: , P_SOURCE => l_source);
2218:
2219: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN
2220: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
2221: RAISE fnd_api.g_exc_error;
2222: ELSE
2223: RAISE fnd_api.g_exc_unexpected_error;
2224: END IF;
2225: END IF;
2219: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN
2220: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
2221: RAISE fnd_api.g_exc_error;
2222: ELSE
2223: RAISE fnd_api.g_exc_unexpected_error;
2224: END IF;
2225: END IF;
2226:
2227:
2226:
2227:
2228: EXCEPTION
2229:
2230: WHEN fnd_api.g_exc_error THEN
2231: ROLLBACK TO revert_loc_suggested_cap_sp;--BUG 4890372
2232: x_return_status := fnd_api.g_ret_sts_error;
2233: fnd_msg_pub.count_and_get
2234: ( p_count => x_msg_count,
2228: EXCEPTION
2229:
2230: WHEN fnd_api.g_exc_error THEN
2231: ROLLBACK TO revert_loc_suggested_cap_sp;--BUG 4890372
2232: x_return_status := fnd_api.g_ret_sts_error;
2233: fnd_msg_pub.count_and_get
2234: ( p_count => x_msg_count,
2235: p_data => x_msg_data
2236: );
2234: ( p_count => x_msg_count,
2235: p_data => x_msg_data
2236: );
2237:
2238: WHEN fnd_api.g_exc_unexpected_error THEN
2239: ROLLBACK TO revert_loc_suggested_cap_sp;--BUG 4890372
2240: x_return_status := fnd_api.g_ret_sts_unexp_error ;
2241: fnd_msg_pub.count_and_get
2242: ( p_count => x_msg_count,
2236: );
2237:
2238: WHEN fnd_api.g_exc_unexpected_error THEN
2239: ROLLBACK TO revert_loc_suggested_cap_sp;--BUG 4890372
2240: x_return_status := fnd_api.g_ret_sts_unexp_error ;
2241: fnd_msg_pub.count_and_get
2242: ( p_count => x_msg_count,
2243: p_data => x_msg_data
2244: );
2244: );
2245:
2246: WHEN NO_DATA_FOUND THEN
2247: ROLLBACK TO revert_loc_suggested_cap_sp;--BUG 4890372
2248: x_return_status := fnd_api.g_ret_sts_error;
2249:
2250: WHEN resource_busy_detected THEN
2251: ROLLBACK TO revert_loc_suggested_cap_sp;--BUG 4890372
2252: x_return_status := fnd_api.g_ret_sts_error;
2248: x_return_status := fnd_api.g_ret_sts_error;
2249:
2250: WHEN resource_busy_detected THEN
2251: ROLLBACK TO revert_loc_suggested_cap_sp;--BUG 4890372
2252: x_return_status := fnd_api.g_ret_sts_error;
2253:
2254: WHEN OTHERS THEN
2255: ROLLBACK TO revert_loc_suggested_cap_sp;--BUG 4890372
2256: x_return_status := fnd_api.g_ret_sts_unexp_error;
2252: x_return_status := fnd_api.g_ret_sts_error;
2253:
2254: WHEN OTHERS THEN
2255: ROLLBACK TO revert_loc_suggested_cap_sp;--BUG 4890372
2256: x_return_status := fnd_api.g_ret_sts_unexp_error;
2257: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error)
2258: THEN
2259: fnd_msg_pub.add_exc_msg
2260: ( g_pkg_name
2382: to_name => null) ;
2383: end if;
2384:
2385: IF l_gross_weight = -99999 THEN
2386: RAISE fnd_api.g_exc_error;
2387: END IF;
2388: end if;
2389:
2390: -- Compute content Volume
2405: to_name => null) ;
2406: end if;
2407:
2408: IF l_content_volume = -99999 THEN
2409: RAISE fnd_api.g_exc_error;
2410: END IF;
2411: end if;
2412:
2413: -- Compute container Weight
2428: to_name => null) ;
2429: end if;
2430:
2431: IF l_lpn_weight = -99999 THEN
2432: RAISE fnd_api.g_exc_error;
2433: END IF;
2434: end if;
2435:
2436: -- Compute container Volume
2451: to_name => null) ;
2452: end if;
2453:
2454: IF l_lpn_volume = -99999 THEN
2455: RAISE fnd_api.g_exc_error;
2456: END IF;
2457: end if;
2458: x_container_item_wt := l_lpn_weight;
2459: x_container_item_vol := l_lpn_volume;
2462: mdebug(l_prog_name||'container wt :'||x_container_item_wt);
2463: mdebug(l_prog_name||'container vol :'||x_container_item_vol);
2464: EXCEPTION
2465:
2466: WHEN fnd_api.g_exc_error THEN
2467: x_return_status := fnd_api.g_ret_sts_error;
2468: fnd_msg_pub.count_and_get
2469: ( p_count => x_msg_count,
2470: p_data => x_msg_data
2463: mdebug(l_prog_name||'container vol :'||x_container_item_vol);
2464: EXCEPTION
2465:
2466: WHEN fnd_api.g_exc_error THEN
2467: x_return_status := fnd_api.g_ret_sts_error;
2468: fnd_msg_pub.count_and_get
2469: ( p_count => x_msg_count,
2470: p_data => x_msg_data
2471: );
2469: ( p_count => x_msg_count,
2470: p_data => x_msg_data
2471: );
2472:
2473: WHEN fnd_api.g_exc_unexpected_error THEN
2474: x_return_status := fnd_api.g_ret_sts_unexp_error ;
2475: fnd_msg_pub.count_and_get
2476: ( p_count => x_msg_count,
2477: p_data => x_msg_data
2470: p_data => x_msg_data
2471: );
2472:
2473: WHEN fnd_api.g_exc_unexpected_error THEN
2474: x_return_status := fnd_api.g_ret_sts_unexp_error ;
2475: fnd_msg_pub.count_and_get
2476: ( p_count => x_msg_count,
2477: p_data => x_msg_data
2478: );
2477: p_data => x_msg_data
2478: );
2479:
2480: WHEN NO_DATA_FOUND THEN
2481: x_return_status := fnd_api.g_ret_sts_error;
2482:
2483: WHEN OTHERS THEN
2484: x_return_status := fnd_api.g_ret_sts_unexp_error;
2485: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error)
2480: WHEN NO_DATA_FOUND THEN
2481: x_return_status := fnd_api.g_ret_sts_error;
2482:
2483: WHEN OTHERS THEN
2484: x_return_status := fnd_api.g_ret_sts_unexp_error;
2485: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error)
2486: THEN
2487: fnd_msg_pub.add_exc_msg
2488: ( g_pkg_name,
2752: l_commit_count NUMBER := 0;
2753: l_debug NUMBER := nvl(fnd_profile.value('INV_DEBUG_TRACE'),0);
2754: BEGIN
2755: -- Initialize API return status to success
2756: x_return_status := fnd_api.g_ret_sts_success;
2757:
2758: SAVEPOINT locators_capacity_cleanup;
2759:
2760: IF (l_debug = 1) THEN
3800: IF (l_debug = 1) THEN
3801: inv_trx_util_pub.trace('End ','Locator_Capacity_Clean_Up',9);
3802: END IF;
3803: EXCEPTION
3804: WHEN fnd_api.g_exc_error THEN
3805: mdebug('Error:-'
3806: ||sqlerrm);
3807:
3808: ROLLBACK TO locators_capacity_cleanup ;
3806: ||sqlerrm);
3807:
3808: ROLLBACK TO locators_capacity_cleanup ;
3809:
3810: x_return_status := fnd_api.g_ret_sts_error;
3811:
3812: fnd_msg_pub.count_and_get(p_count => x_msg_count,p_data => x_msg_data);
3813: WHEN fnd_api.g_exc_unexpected_error THEN
3814: mdebug('Error:-'
3809:
3810: x_return_status := fnd_api.g_ret_sts_error;
3811:
3812: fnd_msg_pub.count_and_get(p_count => x_msg_count,p_data => x_msg_data);
3813: WHEN fnd_api.g_exc_unexpected_error THEN
3814: mdebug('Error:-'
3815: ||sqlerrm);
3816:
3817: ROLLBACK TO locators_capacity_cleanup;
3815: ||sqlerrm);
3816:
3817: ROLLBACK TO locators_capacity_cleanup;
3818:
3819: x_return_status := fnd_api.g_ret_sts_unexp_error;
3820:
3821: fnd_msg_pub.count_and_get(p_count => x_msg_count,p_data => x_msg_data);
3822: WHEN OTHERS THEN
3823: mdebug('Error:-'
3824: ||sqlerrm);
3825:
3826: ROLLBACK TO locators_capacity_cleanup;
3827:
3828: x_return_status := fnd_api.g_ret_sts_unexp_error;
3829:
3830: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
3831: fnd_msg_pub.add_exc_msg('inv_loc_wms_utils','locator_capacity_cleanup');
3832: END IF;
3854:
3855: IF (p_organization_id is null) THEN
3856: fnd_message.set_name('INV', 'INV_ORG_REQUIRED');
3857: fnd_msg_pub.add;
3858: RAISE fnd_api.g_exc_error;
3859: END IF;
3860:
3861: IF nvl(p_mixed_items_flag,2) = 1 then
3862: l_mixed_items_flag :='Y';
3872: , p_organization_id => p_organization_id
3873: , p_mixed_flag => l_mixed_items_flag
3874: , p_subinventory => p_subinventory);
3875:
3876: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN
3877: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
3878: IF (l_debug = 1) THEN
3879: INV_TRX_UTIL_PUB.TRACE('Locator capacity calc prog completed with Errors ', 'launch Upgrade',9);
3880: END IF;
3873: , p_mixed_flag => l_mixed_items_flag
3874: , p_subinventory => p_subinventory);
3875:
3876: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN
3877: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
3878: IF (l_debug = 1) THEN
3879: INV_TRX_UTIL_PUB.TRACE('Locator capacity calc prog completed with Errors ', 'launch Upgrade',9);
3880: END IF;
3881: RAISE fnd_api.g_exc_error;
3877: IF (l_return_status = fnd_api.g_ret_sts_error) THEN
3878: IF (l_debug = 1) THEN
3879: INV_TRX_UTIL_PUB.TRACE('Locator capacity calc prog completed with Errors ', 'launch Upgrade',9);
3880: END IF;
3881: RAISE fnd_api.g_exc_error;
3882: ELSE
3883: IF (l_debug = 1) THEN
3884: INV_TRX_UTIL_PUB.TRACE('Locator capacity calc prog completed with Unexp errors ', 'launch Upgrade',9);
3885: END IF;
3882: ELSE
3883: IF (l_debug = 1) THEN
3884: INV_TRX_UTIL_PUB.TRACE('Locator capacity calc prog completed with Unexp errors ', 'launch Upgrade',9);
3885: END IF;
3886: RAISE fnd_api.g_exc_unexpected_error;
3887: END IF;
3888: ELSE
3889: IF (l_debug = 1) THEN
3890: INV_TRX_UTIL_PUB.TRACE('Locator capacity calc prog completed successfully ', 'launch Upgrade',9);
3895: x_errorbuf := NULL;
3896: END IF;
3897:
3898: EXCEPTION
3899: WHEN fnd_api.g_exc_error THEN
3900:
3901: print_message();
3902: l_conc_status := fnd_concurrent.set_completion_status('ERROR','ERROR');
3903: x_retcode := RETCODE_ERROR;
3900:
3901: print_message();
3902: l_conc_status := fnd_concurrent.set_completion_status('ERROR','ERROR');
3903: x_retcode := RETCODE_ERROR;
3904: x_errorbuf := fnd_msg_pub.get(p_encoded => fnd_api.g_false);
3905:
3906: WHEN fnd_api.g_exc_unexpected_error THEN
3907:
3908: print_message();
3902: l_conc_status := fnd_concurrent.set_completion_status('ERROR','ERROR');
3903: x_retcode := RETCODE_ERROR;
3904: x_errorbuf := fnd_msg_pub.get(p_encoded => fnd_api.g_false);
3905:
3906: WHEN fnd_api.g_exc_unexpected_error THEN
3907:
3908: print_message();
3909: l_conc_status := fnd_concurrent.set_completion_status('ERROR','ERROR');
3910: x_retcode := RETCODE_ERROR;
3907:
3908: print_message();
3909: l_conc_status := fnd_concurrent.set_completion_status('ERROR','ERROR');
3910: x_retcode := RETCODE_ERROR;
3911: x_errorbuf := fnd_msg_pub.get(p_encoded => fnd_api.g_false);
3912:
3913: WHEN OTHERS THEN
3914:
3915: print_message();
3914:
3915: print_message();
3916: l_conc_status := fnd_concurrent.set_completion_status('ERROR','ERROR');
3917: x_retcode := RETCODE_ERROR;
3918: x_errorbuf := fnd_msg_pub.get(p_encoded => fnd_api.g_false);
3919:
3920: END launch_upgrade;
3921:
3922: PROCEDURE print_message(dummy IN VARCHAR2 )IS
4158: IS
4159: l_debug NUMBER := NVL(FND_PROFILE.VALUE('INV_DEBUG_TRACE'),0);
4160: l_proc_name VARCHAR2(50) := 'FETCH_ITEM_ATTRIBUTES: ';
4161: BEGIN
4162: x_return_status := FND_API.G_RET_STS_SUCCESS;
4163: item_attributes(
4164: x_return_status => x_return_status
4165: , x_msg_data => x_msg_data
4166: , x_msg_count => x_msg_count
4178: , p_quantity => p_quantity
4179: , p_organization_id => p_organization_id
4180: , p_container_item => p_container_item
4181: );
4182: IF x_return_status =fnd_api.g_ret_sts_error THEN
4183: RAISE fnd_api.g_exc_error;
4184: ELSIF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
4185: RAISE fnd_api.g_exc_unexpected_error;
4186: END IF;
4179: , p_organization_id => p_organization_id
4180: , p_container_item => p_container_item
4181: );
4182: IF x_return_status =fnd_api.g_ret_sts_error THEN
4183: RAISE fnd_api.g_exc_error;
4184: ELSIF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
4185: RAISE fnd_api.g_exc_unexpected_error;
4186: END IF;
4187:
4180: , p_container_item => p_container_item
4181: );
4182: IF x_return_status =fnd_api.g_ret_sts_error THEN
4183: RAISE fnd_api.g_exc_error;
4184: ELSIF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
4185: RAISE fnd_api.g_exc_unexpected_error;
4186: END IF;
4187:
4188: IF (l_debug = 1) THEN
4181: );
4182: IF x_return_status =fnd_api.g_ret_sts_error THEN
4183: RAISE fnd_api.g_exc_error;
4184: ELSIF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
4185: RAISE fnd_api.g_exc_unexpected_error;
4186: END IF;
4187:
4188: IF (l_debug = 1) THEN
4189: mdebug(l_proc_name||'The item weight UOM code : '||x_item_attr.l_item_weight_uom_code);
4218: l_lpn_exists_in_locator VARCHAR2(1);
4219: l_proc_name VARCHAR2(50) := 'FETCH_LPN_ATTR: ';
4220: l_debug NUMBER := NVL(FND_PROFILE.VALUE('INV_DEBUG_TRACE'),0);
4221: BEGIN
4222: x_return_status := FND_API.G_RET_STS_SUCCESS;
4223: IF (l_debug = 1) THEN
4224: mdebug(l_proc_name||'Fetching of LPN attibutes ');
4225: END IF;
4226: INV_LOC_WMS_UTILS.lpn_attributes(
4237: , p_lpn_id => p_lpn_id
4238: , p_org_id => p_org_id
4239: );
4240:
4241: IF x_return_status =fnd_api.g_ret_sts_error THEN
4242: RAISE fnd_api.g_exc_error;
4243: ELSIF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
4244: RAISE fnd_api.g_exc_unexpected_error;
4245: END IF;
4238: , p_org_id => p_org_id
4239: );
4240:
4241: IF x_return_status =fnd_api.g_ret_sts_error THEN
4242: RAISE fnd_api.g_exc_error;
4243: ELSIF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
4244: RAISE fnd_api.g_exc_unexpected_error;
4245: END IF;
4246:
4239: );
4240:
4241: IF x_return_status =fnd_api.g_ret_sts_error THEN
4242: RAISE fnd_api.g_exc_error;
4243: ELSIF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
4244: RAISE fnd_api.g_exc_unexpected_error;
4245: END IF;
4246:
4247: /*--------------------------------------------------------------------------------------
4240:
4241: IF x_return_status =fnd_api.g_ret_sts_error THEN
4242: RAISE fnd_api.g_exc_error;
4243: ELSIF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
4244: RAISE fnd_api.g_exc_unexpected_error;
4245: END IF;
4246:
4247: /*--------------------------------------------------------------------------------------
4248: Convert the Volume of the LPN into the Locator's Volume UOM code.
4268: /*--------------------------------------------------------------------------------------
4269: Conversion is not defined. Raise form trigger failure.
4270: --------------------------------------------------------------------------------------*/
4271: IF l_lpn_content_volume = -99999 THEN
4272: RAISE fnd_api.g_exc_error;
4273: END IF;
4274:
4275: IF (l_debug = 1) THEN
4276: mdebug(l_proc_name||'l_lpn_content_volume is '||to_char(l_lpn_content_volume));
4304: /*--------------------------------------------------------------------------------------
4305: Conversion is not defined. Raise form trigger failure.
4306: --------------------------------------------------------------------------------------*/
4307: IF l_lpn_container_item_vol = -99999 THEN
4308: RAISE fnd_api.g_exc_error;
4309: END IF;
4310:
4311: /*--------------------------------------------------------------------------------------
4312: Convert the Gross Weight of the LPN into the Locator's Volume UOM code.
4332: /*--------------------------------------------------------------------------------------
4333: Conversion is not defined. Raise form trigger failure.
4334: --------------------------------------------------------------------------------------*/
4335: IF l_lpn_gross_weight = -99999 THEN
4336: RAISE fnd_api.g_exc_error;
4337: END IF;
4338:
4339: /*--------------------------------------------------------------------------------------
4340: Convert the Container Item Weight of the LPN into the Locator's Volume UOM code.
4360: /*--------------------------------------------------------------------------------------
4361: Conversion is not defined. Raise form trigger failure.
4362: --------------------------------------------------------------------------------------*/
4363: IF l_lpn_container_item_weight = -99999 THEN
4364: RAISE fnd_api.g_exc_error;
4365: END IF;
4366:
4367: IF (l_debug = 1) THEN
4368: mdebug(l_proc_name||'End of Content LPN attibutes ');
4399: l_trn_lpn_exists_in_locator VARCHAR2(1);
4400: l_proc_name VARCHAR2(50) := 'FETCH_TRANSFER_LPN_ATTR: ';
4401: l_debug NUMBER := NVL(FND_PROFILE.VALUE('INV_DEBUG_TRACE'),0);
4402: BEGIN
4403: x_return_status := FND_API.G_RET_STS_SUCCESS;
4404: IF (l_debug = 1) THEN
4405: mdebug(l_proc_name||'Fetching of Transfer LPN attibutes ');
4406: END IF;
4407: INV_LOC_WMS_UTILS.lpn_attributes(
4418: , p_lpn_id => p_lpn_id
4419: , p_org_id => p_org_id
4420: );
4421:
4422: IF x_return_status =fnd_api.g_ret_sts_error THEN
4423: RAISE fnd_api.g_exc_error;
4424: ELSIF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
4425: RAISE fnd_api.g_exc_unexpected_error;
4426: END IF;
4419: , p_org_id => p_org_id
4420: );
4421:
4422: IF x_return_status =fnd_api.g_ret_sts_error THEN
4423: RAISE fnd_api.g_exc_error;
4424: ELSIF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
4425: RAISE fnd_api.g_exc_unexpected_error;
4426: END IF;
4427:
4420: );
4421:
4422: IF x_return_status =fnd_api.g_ret_sts_error THEN
4423: RAISE fnd_api.g_exc_error;
4424: ELSIF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
4425: RAISE fnd_api.g_exc_unexpected_error;
4426: END IF;
4427:
4428: /*--------------------------------------------------------------------------------------
4421:
4422: IF x_return_status =fnd_api.g_ret_sts_error THEN
4423: RAISE fnd_api.g_exc_error;
4424: ELSIF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
4425: RAISE fnd_api.g_exc_unexpected_error;
4426: END IF;
4427:
4428: /*--------------------------------------------------------------------------------------
4429: Convert the content Volume of Transfer LPN into the Locator's Volume UOM code.
4449: /*--------------------------------------------------------------------------------------
4450: Conversion is not defined. Raise form trigger failure.
4451: --------------------------------------------------------------------------------------*/
4452: IF l_trn_content_volume = -99999 THEN
4453: RAISE fnd_api.g_exc_error;
4454: END IF;
4455:
4456: IF (l_debug = 1) THEN
4457: mdebug(l_proc_name||'l_trn_content_volume is: '||to_char(l_trn_content_volume));
4481: /*--------------------------------------------------------------------------------------
4482: Conversion is not defined. Raise form trigger failure.
4483: --------------------------------------------------------------------------------------*/
4484: IF l_trn_gross_weight = -99999 THEN
4485: RAISE fnd_api.g_exc_error;
4486: END IF;
4487:
4488: IF (l_debug = 1) THEN
4489: mdebug(l_proc_name||'l_trn_gross_weight is: '||to_char(l_trn_gross_weight));
4513: /*--------------------------------------------------------------------------------------
4514: Conversion is not defined. Raise form trigger failure.
4515: --------------------------------------------------------------------------------------*/
4516: IF l_trn_container_item_weight = -99999 THEN
4517: RAISE fnd_api.g_exc_error;
4518: END IF;
4519:
4520: IF (l_debug = 1) THEN
4521: mdebug(l_proc_name||'l_trn_container_item_weight is: '||to_char(l_trn_container_item_weight));
4545: /*--------------------------------------------------------------------------------------
4546: Conversion is not defined. Raise form trigger failure.
4547: --------------------------------------------------------------------------------------*/
4548: IF l_trn_container_item_vol = -99999 THEN
4549: RAISE fnd_api.g_exc_error;
4550: END IF;
4551:
4552: IF (l_debug = 1) THEN
4553: mdebug(l_proc_name||'l_trn_container_item_vol is: '||to_char(l_trn_container_item_vol));
4584: l_quantity NUMBER := 0;
4585: l_proc_name VARCHAR2(50) := 'FETCH_CONTENT_LPN_ATTR: ';
4586: l_debug NUMBER := NVL(FND_PROFILE.VALUE('INV_DEBUG_TRACE'),0);
4587: BEGIN
4588: x_return_status := FND_API.G_RET_STS_SUCCESS;
4589: IF (l_debug = 1) THEN
4590: mdebug(l_proc_name||'Fetching attributes of the Content lpn: '||to_char(p_lpn_id));
4591: END IF;
4592: INV_LOC_WMS_UTILS.lpn_attributes(
4632: /*--------------------------------------------------------------------------------------
4633: Conversion is not defined. Raise form trigger failure.
4634: --------------------------------------------------------------------------------------*/
4635: IF l_cnt_content_volume = -99999 THEN
4636: RAISE fnd_api.g_exc_error;
4637: END IF;
4638:
4639: /*--------------------------------------------------------------------------------------
4640: Convert the container Volume into the Locator's Volume UOM code.
4664: /*--------------------------------------------------------------------------------------
4665: Conversion is not defined. Raise form trigger failure.
4666: --------------------------------------------------------------------------------------*/
4667: IF l_cnt_container_item_vol = -99999 THEN
4668: RAISE fnd_api.g_exc_error;
4669: END IF;
4670:
4671: /*--------------------------------------------------------------------------------------
4672: Convert the Gross Weight of the LPN into the Locator's Volume UOM code.
4692: /*--------------------------------------------------------------------------------------
4693: Conversion is not defined. Raise form trigger failure.
4694: --------------------------------------------------------------------------------------*/
4695: IF l_cnt_gross_weight = -99999 THEN
4696: RAISE fnd_api.g_exc_error;
4697: END IF;
4698:
4699: /*--------------------------------------------------------------------------------------
4700: Convert the Container Item Weight of the LPN into the Locator's Volume UOM code.
4720: /*--------------------------------------------------------------------------------------
4721: Conversion is not defined. Raise form trigger failure.
4722: --------------------------------------------------------------------------------------*/
4723: IF l_cnt_container_item_weight = -99999 THEN
4724: RAISE fnd_api.g_exc_error;
4725: END IF;
4726:
4727: IF (l_debug = 1) THEN
4728: mdebug(l_proc_name||'End of Content LPN attibutes ');
4765: l_locator_current_units NUMBER := 0;
4766: l_locator_available_units NUMBER;
4767: l_debug NUMBER := NVL(FND_PROFILE.VALUE('INV_DEBUG_TRACE'),0);
4768: BEGIN
4769: x_return_status := FND_API.G_RET_STS_SUCCESS;
4770:
4771: IF (l_debug = 1) THEN
4772: mdebug(l_proc_name||'transaction Type is issue ');
4773: END IF;
4801: , p_content_lpn_id => p_content_lpn_id
4802: , p_lpn_id => null
4803: , p_trn_lpn_exists_in_loc => null
4804: );
4805: IF x_return_status =fnd_api.g_ret_sts_error THEN
4806: RAISE fnd_api.g_exc_error;
4807: ELSIF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
4808: RAISE fnd_api.g_exc_unexpected_error;
4809: END IF;
4802: , p_lpn_id => null
4803: , p_trn_lpn_exists_in_loc => null
4804: );
4805: IF x_return_status =fnd_api.g_ret_sts_error THEN
4806: RAISE fnd_api.g_exc_error;
4807: ELSIF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
4808: RAISE fnd_api.g_exc_unexpected_error;
4809: END IF;
4810:
4803: , p_trn_lpn_exists_in_loc => null
4804: );
4805: IF x_return_status =fnd_api.g_ret_sts_error THEN
4806: RAISE fnd_api.g_exc_error;
4807: ELSIF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
4808: RAISE fnd_api.g_exc_unexpected_error;
4809: END IF;
4810:
4811: l_locator_current_units := p_loc_attr.l_locator_current_units - p_quantity;
4804: );
4805: IF x_return_status =fnd_api.g_ret_sts_error THEN
4806: RAISE fnd_api.g_exc_error;
4807: ELSIF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
4808: RAISE fnd_api.g_exc_unexpected_error;
4809: END IF;
4810:
4811: l_locator_current_units := p_loc_attr.l_locator_current_units - p_quantity;
4812:
4876: l_locator_current_units NUMBER := 0;
4877: l_locator_available_units NUMBER;
4878: l_debug NUMBER := NVL(FND_PROFILE.VALUE('INV_DEBUG_TRACE'),0);
4879: BEGIN
4880: x_return_status := FND_API.G_RET_STS_SUCCESS;
4881:
4882: IF (l_debug = 1) THEN
4883: mdebug(l_proc_name||'transaction Type is receipt ');
4884: END IF;
5015:
5016: l_proc_name VARCHAR2(50) := 'UPD_LPN_LOC_CPTY_FOR_XFR:';
5017: l_debug NUMBER := NVL(FND_PROFILE.VALUE('INV_DEBUG_TRACE'),0);
5018: BEGIN
5019: x_return_status := FND_API.G_RET_STS_SUCCESS;
5020:
5021: /*--------------------------------------------------------------------------------------------
5022: Fetch the actual Inventory Location ID for the source Locator.
5023: --------------------------------------------------------------------------------------------*/
5095: , p_quantity => p_quantity
5096: , p_organization_id => l_old_organization_id
5097: , p_container_item => null
5098: );
5099: IF x_return_status =fnd_api.g_ret_sts_error THEN
5100: RAISE fnd_api.g_exc_error;
5101: ELSIF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
5102: RAISE fnd_api.g_exc_unexpected_error;
5103: END IF;
5096: , p_organization_id => l_old_organization_id
5097: , p_container_item => null
5098: );
5099: IF x_return_status =fnd_api.g_ret_sts_error THEN
5100: RAISE fnd_api.g_exc_error;
5101: ELSIF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
5102: RAISE fnd_api.g_exc_unexpected_error;
5103: END IF;
5104:
5097: , p_container_item => null
5098: );
5099: IF x_return_status =fnd_api.g_ret_sts_error THEN
5100: RAISE fnd_api.g_exc_error;
5101: ELSIF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
5102: RAISE fnd_api.g_exc_unexpected_error;
5103: END IF;
5104:
5105: IF (l_debug = 1) THEN
5098: );
5099: IF x_return_status =fnd_api.g_ret_sts_error THEN
5100: RAISE fnd_api.g_exc_error;
5101: ELSIF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
5102: RAISE fnd_api.g_exc_unexpected_error;
5103: END IF;
5104:
5105: IF (l_debug = 1) THEN
5106: mdebug(l_proc_name||'The item weight UOM code : '||l_item_attr.l_item_weight_uom_code);
5136: , p_org_id => p_organization_id
5137: , p_locator_volume_uom_code => l_old_loc_attr.l_locator_volume_uom_code
5138: , p_locator_weight_uom_code => l_old_loc_attr.l_locator_weight_uom_code
5139: );
5140: IF x_return_status =fnd_api.g_ret_sts_error THEN
5141: RAISE fnd_api.g_exc_error;
5142: ELSIF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
5143: RAISE fnd_api.g_exc_unexpected_error;
5144: END IF;
5137: , p_locator_volume_uom_code => l_old_loc_attr.l_locator_volume_uom_code
5138: , p_locator_weight_uom_code => l_old_loc_attr.l_locator_weight_uom_code
5139: );
5140: IF x_return_status =fnd_api.g_ret_sts_error THEN
5141: RAISE fnd_api.g_exc_error;
5142: ELSIF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
5143: RAISE fnd_api.g_exc_unexpected_error;
5144: END IF;
5145: IF p_inventory_item_id = -1 THEN
5138: , p_locator_weight_uom_code => l_old_loc_attr.l_locator_weight_uom_code
5139: );
5140: IF x_return_status =fnd_api.g_ret_sts_error THEN
5141: RAISE fnd_api.g_exc_error;
5142: ELSIF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
5143: RAISE fnd_api.g_exc_unexpected_error;
5144: END IF;
5145: IF p_inventory_item_id = -1 THEN
5146: l_quantity := l_content_lpn_quantity;
5139: );
5140: IF x_return_status =fnd_api.g_ret_sts_error THEN
5141: RAISE fnd_api.g_exc_error;
5142: ELSIF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
5143: RAISE fnd_api.g_exc_unexpected_error;
5144: END IF;
5145: IF p_inventory_item_id = -1 THEN
5146: l_quantity := l_content_lpn_quantity;
5147: END IF;
5175: , p_org_id => p_organization_id
5176: , p_locator_volume_uom_code => l_old_loc_attr.l_locator_volume_uom_code
5177: , p_locator_weight_uom_code => l_old_loc_attr.l_locator_weight_uom_code
5178: );
5179: IF x_return_status =fnd_api.g_ret_sts_error THEN
5180: RAISE fnd_api.g_exc_error;
5181: ELSIF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
5182: RAISE fnd_api.g_exc_unexpected_error;
5183: END IF;
5176: , p_locator_volume_uom_code => l_old_loc_attr.l_locator_volume_uom_code
5177: , p_locator_weight_uom_code => l_old_loc_attr.l_locator_weight_uom_code
5178: );
5179: IF x_return_status =fnd_api.g_ret_sts_error THEN
5180: RAISE fnd_api.g_exc_error;
5181: ELSIF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
5182: RAISE fnd_api.g_exc_unexpected_error;
5183: END IF;
5184: IF (l_debug = 1) THEN
5177: , p_locator_weight_uom_code => l_old_loc_attr.l_locator_weight_uom_code
5178: );
5179: IF x_return_status =fnd_api.g_ret_sts_error THEN
5180: RAISE fnd_api.g_exc_error;
5181: ELSIF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
5182: RAISE fnd_api.g_exc_unexpected_error;
5183: END IF;
5184: IF (l_debug = 1) THEN
5185: mdebug(l_proc_name||'l_lpn_gross_weight_uom_code : '||l_lpn_attr.l_gross_weight_uom_code);
5178: );
5179: IF x_return_status =fnd_api.g_ret_sts_error THEN
5180: RAISE fnd_api.g_exc_error;
5181: ELSIF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
5182: RAISE fnd_api.g_exc_unexpected_error;
5183: END IF;
5184: IF (l_debug = 1) THEN
5185: mdebug(l_proc_name||'l_lpn_gross_weight_uom_code : '||l_lpn_attr.l_gross_weight_uom_code);
5186: mdebug(l_proc_name||'l_lpn_content_volume_uom_code : '||l_lpn_attr.l_content_volume_uom_code);
5226: , p_quantity => l_quantity
5227: , p_inventory_location_id => l_old_inventory_location_id
5228: , p_organization_id => l_old_organization_id
5229: );
5230: IF x_return_status =fnd_api.g_ret_sts_error THEN
5231: RAISE fnd_api.g_exc_error;
5232: ELSIF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
5233: RAISE fnd_api.g_exc_unexpected_error;
5234: END IF;
5227: , p_inventory_location_id => l_old_inventory_location_id
5228: , p_organization_id => l_old_organization_id
5229: );
5230: IF x_return_status =fnd_api.g_ret_sts_error THEN
5231: RAISE fnd_api.g_exc_error;
5232: ELSIF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
5233: RAISE fnd_api.g_exc_unexpected_error;
5234: END IF;
5235: l_update_table := FALSE;
5228: , p_organization_id => l_old_organization_id
5229: );
5230: IF x_return_status =fnd_api.g_ret_sts_error THEN
5231: RAISE fnd_api.g_exc_error;
5232: ELSIF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
5233: RAISE fnd_api.g_exc_unexpected_error;
5234: END IF;
5235: l_update_table := FALSE;
5236: ELSIF p_lpn_id IS NOT NULL THEN
5229: );
5230: IF x_return_status =fnd_api.g_ret_sts_error THEN
5231: RAISE fnd_api.g_exc_error;
5232: ELSIF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
5233: RAISE fnd_api.g_exc_unexpected_error;
5234: END IF;
5235: l_update_table := FALSE;
5236: ELSIF p_lpn_id IS NOT NULL THEN
5237: fetch_lpn_content_qty(
5254: , p_quantity => l_quantity
5255: , p_inventory_location_id => l_old_inventory_location_id
5256: , p_organization_id => l_old_organization_id
5257: );
5258: IF x_return_status =fnd_api.g_ret_sts_error THEN
5259: RAISE fnd_api.g_exc_error;
5260: ELSIF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
5261: RAISE fnd_api.g_exc_unexpected_error;
5262: END IF;
5255: , p_inventory_location_id => l_old_inventory_location_id
5256: , p_organization_id => l_old_organization_id
5257: );
5258: IF x_return_status =fnd_api.g_ret_sts_error THEN
5259: RAISE fnd_api.g_exc_error;
5260: ELSIF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
5261: RAISE fnd_api.g_exc_unexpected_error;
5262: END IF;
5263: l_update_table := FALSE;
5256: , p_organization_id => l_old_organization_id
5257: );
5258: IF x_return_status =fnd_api.g_ret_sts_error THEN
5259: RAISE fnd_api.g_exc_error;
5260: ELSIF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
5261: RAISE fnd_api.g_exc_unexpected_error;
5262: END IF;
5263: l_update_table := FALSE;
5264: ELSE
5257: );
5258: IF x_return_status =fnd_api.g_ret_sts_error THEN
5259: RAISE fnd_api.g_exc_error;
5260: ELSIF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
5261: RAISE fnd_api.g_exc_unexpected_error;
5262: END IF;
5263: l_update_table := FALSE;
5264: ELSE
5265: /*-----------------------------------------------------------------
5383: , p_quantity => p_quantity
5384: , p_inventory_location_id => p_inventory_location_id
5385: , p_organization_id => p_organization_id
5386: );
5387: IF x_return_status =fnd_api.g_ret_sts_error THEN
5388: RAISE fnd_api.g_exc_error;
5389: ELSIF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
5390: RAISE fnd_api.g_exc_unexpected_error;
5391: END IF;
5384: , p_inventory_location_id => p_inventory_location_id
5385: , p_organization_id => p_organization_id
5386: );
5387: IF x_return_status =fnd_api.g_ret_sts_error THEN
5388: RAISE fnd_api.g_exc_error;
5389: ELSIF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
5390: RAISE fnd_api.g_exc_unexpected_error;
5391: END IF;
5392: ELSIF p_content_lpn_id IS NOT NULL THEN
5385: , p_organization_id => p_organization_id
5386: );
5387: IF x_return_status =fnd_api.g_ret_sts_error THEN
5388: RAISE fnd_api.g_exc_error;
5389: ELSIF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
5390: RAISE fnd_api.g_exc_unexpected_error;
5391: END IF;
5392: ELSIF p_content_lpn_id IS NOT NULL THEN
5393: /*-----------------------------------------------------------------
5386: );
5387: IF x_return_status =fnd_api.g_ret_sts_error THEN
5388: RAISE fnd_api.g_exc_error;
5389: ELSIF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
5390: RAISE fnd_api.g_exc_unexpected_error;
5391: END IF;
5392: ELSIF p_content_lpn_id IS NOT NULL THEN
5393: /*-----------------------------------------------------------------
5394: Receive the Content LPN into the destination Locator.
5405: , p_quantity => l_quantity
5406: , p_inventory_location_id => p_inventory_location_id
5407: , p_organization_id => p_organization_id
5408: );
5409: IF x_return_status =fnd_api.g_ret_sts_error THEN
5410: RAISE fnd_api.g_exc_error;
5411: ELSIF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
5412: RAISE fnd_api.g_exc_unexpected_error;
5413: END IF;
5406: , p_inventory_location_id => p_inventory_location_id
5407: , p_organization_id => p_organization_id
5408: );
5409: IF x_return_status =fnd_api.g_ret_sts_error THEN
5410: RAISE fnd_api.g_exc_error;
5411: ELSIF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
5412: RAISE fnd_api.g_exc_unexpected_error;
5413: END IF;
5414: ELSE
5407: , p_organization_id => p_organization_id
5408: );
5409: IF x_return_status =fnd_api.g_ret_sts_error THEN
5410: RAISE fnd_api.g_exc_error;
5411: ELSIF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
5412: RAISE fnd_api.g_exc_unexpected_error;
5413: END IF;
5414: ELSE
5415: /*-------------------------------------------------------------------
5408: );
5409: IF x_return_status =fnd_api.g_ret_sts_error THEN
5410: RAISE fnd_api.g_exc_error;
5411: ELSIF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
5412: RAISE fnd_api.g_exc_unexpected_error;
5413: END IF;
5414: ELSE
5415: /*-------------------------------------------------------------------
5416: Receive transacted loose Item Capacity into the destination locator
5488: l_content_qty NUMBER;
5489: l_lpn_qty NUMBER;
5490: l_content_lpn_vol NUMBER;
5491: BEGIN
5492: x_return_status := FND_API.G_RET_STS_SUCCESS;
5493: l_locator_current_weight := p_loc_attr.l_locator_current_weight;
5494: l_locator_available_weight := p_loc_attr.l_locator_available_weight;
5495: /*-------------------------------------------------------------------------------------------------
5496: Content LPN is null. UnPack material to loose.
5616: l_content_volume NUMBER;
5617: l_lpn_exists_in_locator VARCHAR2(1);
5618: l_container_item_attr ItemRec;
5619: BEGIN
5620: x_return_status := FND_API.G_RET_STS_SUCCESS;
5621:
5622: --if it is a cartonization txn, the the lpn would not contain the container item weight and volume
5623: --yet.
5624: IF (l_debug = 1) THEN
5641: , p_quantity => NULL
5642: , p_organization_id => p_organization_id
5643: , p_container_item => 'Y'
5644: );
5645: IF x_return_status =fnd_api.g_ret_sts_error THEN
5646: RAISE fnd_api.g_exc_error;
5647: ELSIF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
5648: RAISE fnd_api.g_exc_unexpected_error;
5649: END IF;
5642: , p_organization_id => p_organization_id
5643: , p_container_item => 'Y'
5644: );
5645: IF x_return_status =fnd_api.g_ret_sts_error THEN
5646: RAISE fnd_api.g_exc_error;
5647: ELSIF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
5648: RAISE fnd_api.g_exc_unexpected_error;
5649: END IF;
5650:
5643: , p_container_item => 'Y'
5644: );
5645: IF x_return_status =fnd_api.g_ret_sts_error THEN
5646: RAISE fnd_api.g_exc_error;
5647: ELSIF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
5648: RAISE fnd_api.g_exc_unexpected_error;
5649: END IF;
5650:
5651: IF (l_debug = 1) THEN
5644: );
5645: IF x_return_status =fnd_api.g_ret_sts_error THEN
5646: RAISE fnd_api.g_exc_error;
5647: ELSIF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
5648: RAISE fnd_api.g_exc_unexpected_error;
5649: END IF;
5650:
5651: IF (l_debug = 1) THEN
5652: mdebug(l_proc_name||'The item weight UOM code : '||l_container_item_attr.l_item_weight_uom_code);
5809: l_debug NUMBER := NVL(FND_PROFILE.VALUE('INV_DEBUG_TRACE'),0);
5810: l_proc_name VARCHAR2(50) := 'UPD_LPN_LOC_CURR_CPTY_NOAUTO:';
5811: BEGIN
5812:
5813: x_return_status := FND_API.G_RET_STS_SUCCESS;
5814:
5815: /*--------------------------------------------------------------------------------------------
5816: Fetch the actual Inventory Location ID
5817: --------------------------------------------------------------------------------------------*/
5916: , p_quantity => l_quantity
5917: , p_organization_id => p_organization_id
5918: , p_container_item => null
5919: );
5920: IF l_return_status =fnd_api.g_ret_sts_error THEN
5921: RAISE fnd_api.g_exc_error;
5922: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5923: RAISE fnd_api.g_exc_unexpected_error;
5924: END IF;
5917: , p_organization_id => p_organization_id
5918: , p_container_item => null
5919: );
5920: IF l_return_status =fnd_api.g_ret_sts_error THEN
5921: RAISE fnd_api.g_exc_error;
5922: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5923: RAISE fnd_api.g_exc_unexpected_error;
5924: END IF;
5925:
5918: , p_container_item => null
5919: );
5920: IF l_return_status =fnd_api.g_ret_sts_error THEN
5921: RAISE fnd_api.g_exc_error;
5922: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5923: RAISE fnd_api.g_exc_unexpected_error;
5924: END IF;
5925:
5926: IF (l_debug = 1) THEN
5919: );
5920: IF l_return_status =fnd_api.g_ret_sts_error THEN
5921: RAISE fnd_api.g_exc_error;
5922: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5923: RAISE fnd_api.g_exc_unexpected_error;
5924: END IF;
5925:
5926: IF (l_debug = 1) THEN
5927: mdebug(l_proc_name||'The item weight UOM code : '||l_item_attr.l_item_weight_uom_code);
5957: , p_org_id => p_organization_id
5958: , p_locator_volume_uom_code => l_loc_attr.l_locator_volume_uom_code
5959: , p_locator_weight_uom_code => l_loc_attr.l_locator_weight_uom_code
5960: );
5961: IF l_return_status =fnd_api.g_ret_sts_error THEN
5962: RAISE fnd_api.g_exc_error;
5963: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5964: RAISE fnd_api.g_exc_unexpected_error;
5965: END IF;
5958: , p_locator_volume_uom_code => l_loc_attr.l_locator_volume_uom_code
5959: , p_locator_weight_uom_code => l_loc_attr.l_locator_weight_uom_code
5960: );
5961: IF l_return_status =fnd_api.g_ret_sts_error THEN
5962: RAISE fnd_api.g_exc_error;
5963: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5964: RAISE fnd_api.g_exc_unexpected_error;
5965: END IF;
5966:
5959: , p_locator_weight_uom_code => l_loc_attr.l_locator_weight_uom_code
5960: );
5961: IF l_return_status =fnd_api.g_ret_sts_error THEN
5962: RAISE fnd_api.g_exc_error;
5963: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5964: RAISE fnd_api.g_exc_unexpected_error;
5965: END IF;
5966:
5967: IF p_inventory_item_id = -1 THEN
5960: );
5961: IF l_return_status =fnd_api.g_ret_sts_error THEN
5962: RAISE fnd_api.g_exc_error;
5963: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5964: RAISE fnd_api.g_exc_unexpected_error;
5965: END IF;
5966:
5967: IF p_inventory_item_id = -1 THEN
5968: l_quantity := l_content_lpn_quantity;
5997: , p_org_id => p_organization_id
5998: , p_locator_volume_uom_code => l_loc_attr.l_locator_volume_uom_code
5999: , p_locator_weight_uom_code => l_loc_attr.l_locator_weight_uom_code
6000: );
6001: IF l_return_status =fnd_api.g_ret_sts_error THEN
6002: RAISE fnd_api.g_exc_error;
6003: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6004: RAISE fnd_api.g_exc_unexpected_error;
6005: END IF;
5998: , p_locator_volume_uom_code => l_loc_attr.l_locator_volume_uom_code
5999: , p_locator_weight_uom_code => l_loc_attr.l_locator_weight_uom_code
6000: );
6001: IF l_return_status =fnd_api.g_ret_sts_error THEN
6002: RAISE fnd_api.g_exc_error;
6003: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6004: RAISE fnd_api.g_exc_unexpected_error;
6005: END IF;
6006: IF (l_debug = 1) THEN
5999: , p_locator_weight_uom_code => l_loc_attr.l_locator_weight_uom_code
6000: );
6001: IF l_return_status =fnd_api.g_ret_sts_error THEN
6002: RAISE fnd_api.g_exc_error;
6003: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6004: RAISE fnd_api.g_exc_unexpected_error;
6005: END IF;
6006: IF (l_debug = 1) THEN
6007: mdebug(l_proc_name||'l_trn_gross_weight_uom_code : '||l_trn_lpn_attr.l_gross_weight_uom_code);
6000: );
6001: IF l_return_status =fnd_api.g_ret_sts_error THEN
6002: RAISE fnd_api.g_exc_error;
6003: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6004: RAISE fnd_api.g_exc_unexpected_error;
6005: END IF;
6006: IF (l_debug = 1) THEN
6007: mdebug(l_proc_name||'l_trn_gross_weight_uom_code : '||l_trn_lpn_attr.l_gross_weight_uom_code);
6008: mdebug(l_proc_name||'l_trn_content_volume_uom_code : '||l_trn_lpn_attr.l_content_volume_uom_code);
6033: , p_org_id => p_organization_id
6034: , p_locator_volume_uom_code => l_loc_attr.l_locator_volume_uom_code
6035: , p_locator_weight_uom_code => l_loc_attr.l_locator_weight_uom_code
6036: );
6037: IF l_return_status =fnd_api.g_ret_sts_error THEN
6038: RAISE fnd_api.g_exc_error;
6039: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6040: RAISE fnd_api.g_exc_unexpected_error;
6041: END IF;
6034: , p_locator_volume_uom_code => l_loc_attr.l_locator_volume_uom_code
6035: , p_locator_weight_uom_code => l_loc_attr.l_locator_weight_uom_code
6036: );
6037: IF l_return_status =fnd_api.g_ret_sts_error THEN
6038: RAISE fnd_api.g_exc_error;
6039: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6040: RAISE fnd_api.g_exc_unexpected_error;
6041: END IF;
6042: IF (l_debug = 1) THEN
6035: , p_locator_weight_uom_code => l_loc_attr.l_locator_weight_uom_code
6036: );
6037: IF l_return_status =fnd_api.g_ret_sts_error THEN
6038: RAISE fnd_api.g_exc_error;
6039: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6040: RAISE fnd_api.g_exc_unexpected_error;
6041: END IF;
6042: IF (l_debug = 1) THEN
6043: mdebug(l_proc_name||'l_lpn_gross_weight_uom_code : '||l_lpn_attr.l_gross_weight_uom_code);
6036: );
6037: IF l_return_status =fnd_api.g_ret_sts_error THEN
6038: RAISE fnd_api.g_exc_error;
6039: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6040: RAISE fnd_api.g_exc_unexpected_error;
6041: END IF;
6042: IF (l_debug = 1) THEN
6043: mdebug(l_proc_name||'l_lpn_gross_weight_uom_code : '||l_lpn_attr.l_gross_weight_uom_code);
6044: mdebug(l_proc_name||'l_lpn_content_volume_uom_code : '||l_lpn_attr.l_content_volume_uom_code);
6079: , p_item_attr => l_item_attr
6080: , p_container_item_id => p_container_item_id
6081: , p_cartonization_id => p_cartonization_id
6082: );
6083: IF l_return_status =fnd_api.g_ret_sts_error THEN
6084: RAISE fnd_api.g_exc_error;
6085: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6086: RAISE fnd_api.g_exc_unexpected_error;
6087: END IF;
6080: , p_container_item_id => p_container_item_id
6081: , p_cartonization_id => p_cartonization_id
6082: );
6083: IF l_return_status =fnd_api.g_ret_sts_error THEN
6084: RAISE fnd_api.g_exc_error;
6085: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6086: RAISE fnd_api.g_exc_unexpected_error;
6087: END IF;
6088: ELSIF p_transaction_action_id = 51 THEN
6081: , p_cartonization_id => p_cartonization_id
6082: );
6083: IF l_return_status =fnd_api.g_ret_sts_error THEN
6084: RAISE fnd_api.g_exc_error;
6085: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6086: RAISE fnd_api.g_exc_unexpected_error;
6087: END IF;
6088: ELSIF p_transaction_action_id = 51 THEN
6089: /*-------------------------------------------------------------------------------------------
6082: );
6083: IF l_return_status =fnd_api.g_ret_sts_error THEN
6084: RAISE fnd_api.g_exc_error;
6085: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6086: RAISE fnd_api.g_exc_unexpected_error;
6087: END IF;
6088: ELSIF p_transaction_action_id = 51 THEN
6089: /*-------------------------------------------------------------------------------------------
6090: UnPack Transaction
6106: , p_organization_id => p_organization_id
6107: , p_item_attr => l_item_attr
6108: , p_quantity => p_quantity
6109: );
6110: IF l_return_status =fnd_api.g_ret_sts_error THEN
6111: RAISE fnd_api.g_exc_error;
6112: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6113: RAISE fnd_api.g_exc_unexpected_error;
6114: END IF;
6107: , p_item_attr => l_item_attr
6108: , p_quantity => p_quantity
6109: );
6110: IF l_return_status =fnd_api.g_ret_sts_error THEN
6111: RAISE fnd_api.g_exc_error;
6112: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6113: RAISE fnd_api.g_exc_unexpected_error;
6114: END IF;
6115: ELSIF p_transaction_action_id IN (27,12, 31) OR
6108: , p_quantity => p_quantity
6109: );
6110: IF l_return_status =fnd_api.g_ret_sts_error THEN
6111: RAISE fnd_api.g_exc_error;
6112: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6113: RAISE fnd_api.g_exc_unexpected_error;
6114: END IF;
6115: ELSIF p_transaction_action_id IN (27,12, 31) OR
6116: (p_transaction_action_id IN (40,41,42) AND p_transfer_lpn_id IS NOT NULL ) THEN --Bug#4750846
6109: );
6110: IF l_return_status =fnd_api.g_ret_sts_error THEN
6111: RAISE fnd_api.g_exc_error;
6112: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6113: RAISE fnd_api.g_exc_unexpected_error;
6114: END IF;
6115: ELSIF p_transaction_action_id IN (27,12, 31) OR
6116: (p_transaction_action_id IN (40,41,42) AND p_transfer_lpn_id IS NOT NULL ) THEN --Bug#4750846
6117: /*-------------------------------------------------------------------------------------------
6132: , p_quantity => l_quantity
6133: , p_inventory_location_id => l_inventory_location_id
6134: , p_organization_id => p_organization_id
6135: );
6136: IF l_return_status =fnd_api.g_ret_sts_error THEN
6137: RAISE fnd_api.g_exc_error;
6138: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6139: RAISE fnd_api.g_exc_unexpected_error;
6140: END IF;
6133: , p_inventory_location_id => l_inventory_location_id
6134: , p_organization_id => p_organization_id
6135: );
6136: IF l_return_status =fnd_api.g_ret_sts_error THEN
6137: RAISE fnd_api.g_exc_error;
6138: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6139: RAISE fnd_api.g_exc_unexpected_error;
6140: END IF;
6141: ELSIF p_transaction_action_id IN (1,21,32,34) OR
6134: , p_organization_id => p_organization_id
6135: );
6136: IF l_return_status =fnd_api.g_ret_sts_error THEN
6137: RAISE fnd_api.g_exc_error;
6138: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6139: RAISE fnd_api.g_exc_unexpected_error;
6140: END IF;
6141: ELSIF p_transaction_action_id IN (1,21,32,34) OR
6142: (p_transaction_action_id IN (40,41,42) AND p_lpn_id IS NOT NULL ) THEN --Bug#4750846
6135: );
6136: IF l_return_status =fnd_api.g_ret_sts_error THEN
6137: RAISE fnd_api.g_exc_error;
6138: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6139: RAISE fnd_api.g_exc_unexpected_error;
6140: END IF;
6141: ELSIF p_transaction_action_id IN (1,21,32,34) OR
6142: (p_transaction_action_id IN (40,41,42) AND p_lpn_id IS NOT NULL ) THEN --Bug#4750846
6143: /*-------------------------------------------------------------------------------------------
6158: , p_quantity => l_quantity
6159: , p_inventory_location_id => l_inventory_location_id
6160: , p_organization_id => p_organization_id
6161: );
6162: IF l_return_status =fnd_api.g_ret_sts_error THEN
6163: RAISE fnd_api.g_exc_error;
6164: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6165: RAISE fnd_api.g_exc_unexpected_error;
6166: END IF;
6159: , p_inventory_location_id => l_inventory_location_id
6160: , p_organization_id => p_organization_id
6161: );
6162: IF l_return_status =fnd_api.g_ret_sts_error THEN
6163: RAISE fnd_api.g_exc_error;
6164: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6165: RAISE fnd_api.g_exc_unexpected_error;
6166: END IF;
6167: ELSIF p_transaction_action_id IN (2,3,28) THEN
6160: , p_organization_id => p_organization_id
6161: );
6162: IF l_return_status =fnd_api.g_ret_sts_error THEN
6163: RAISE fnd_api.g_exc_error;
6164: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6165: RAISE fnd_api.g_exc_unexpected_error;
6166: END IF;
6167: ELSIF p_transaction_action_id IN (2,3,28) THEN
6168: /*-------------------------------------------------------------------------------------------
6161: );
6162: IF l_return_status =fnd_api.g_ret_sts_error THEN
6163: RAISE fnd_api.g_exc_error;
6164: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6165: RAISE fnd_api.g_exc_unexpected_error;
6166: END IF;
6167: ELSIF p_transaction_action_id IN (2,3,28) THEN
6168: /*-------------------------------------------------------------------------------------------
6169: Transfer Transaction
6204: , p_primary_uom_flag => p_primary_uom_flag
6205: , p_from_org_id => p_from_org_id
6206: , p_from_loc_id => p_from_loc_id
6207: );
6208: IF l_return_status =fnd_api.g_ret_sts_error THEN
6209: RAISE fnd_api.g_exc_error;
6210: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6211: RAISE fnd_api.g_exc_unexpected_error;
6212: END IF;
6205: , p_from_org_id => p_from_org_id
6206: , p_from_loc_id => p_from_loc_id
6207: );
6208: IF l_return_status =fnd_api.g_ret_sts_error THEN
6209: RAISE fnd_api.g_exc_error;
6210: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6211: RAISE fnd_api.g_exc_unexpected_error;
6212: END IF;
6213: ELSIF p_transaction_action_id = (52) THEN
6206: , p_from_loc_id => p_from_loc_id
6207: );
6208: IF l_return_status =fnd_api.g_ret_sts_error THEN
6209: RAISE fnd_api.g_exc_error;
6210: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6211: RAISE fnd_api.g_exc_unexpected_error;
6212: END IF;
6213: ELSIF p_transaction_action_id = (52) THEN
6214: /*-------------------------------------------------------------------------------------------
6207: );
6208: IF l_return_status =fnd_api.g_ret_sts_error THEN
6209: RAISE fnd_api.g_exc_error;
6210: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6211: RAISE fnd_api.g_exc_unexpected_error;
6212: END IF;
6213: ELSIF p_transaction_action_id = (52) THEN
6214: /*-------------------------------------------------------------------------------------------
6215: LPN Split Transaction
6235: , p_organization_id => p_organization_id
6236: , p_item_attr => l_item_attr
6237: , p_quantity => p_quantity
6238: );
6239: IF l_return_status =fnd_api.g_ret_sts_error THEN
6240: RAISE fnd_api.g_exc_error;
6241: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6242: RAISE fnd_api.g_exc_unexpected_error;
6243: END IF;
6236: , p_item_attr => l_item_attr
6237: , p_quantity => p_quantity
6238: );
6239: IF l_return_status =fnd_api.g_ret_sts_error THEN
6240: RAISE fnd_api.g_exc_error;
6241: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6242: RAISE fnd_api.g_exc_unexpected_error;
6243: END IF;
6244:
6237: , p_quantity => p_quantity
6238: );
6239: IF l_return_status =fnd_api.g_ret_sts_error THEN
6240: RAISE fnd_api.g_exc_error;
6241: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6242: RAISE fnd_api.g_exc_unexpected_error;
6243: END IF;
6244:
6245: -- Then Call pack to pack the items into to LPN (transfer_lpn_id)
6238: );
6239: IF l_return_status =fnd_api.g_ret_sts_error THEN
6240: RAISE fnd_api.g_exc_error;
6241: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6242: RAISE fnd_api.g_exc_unexpected_error;
6243: END IF;
6244:
6245: -- Then Call pack to pack the items into to LPN (transfer_lpn_id)
6246: IF (l_debug = 1) THEN
6261: , p_item_attr => l_item_attr
6262: , p_container_item_id => p_container_item_id
6263: , p_cartonization_id => p_cartonization_id
6264: );
6265: IF l_return_status =fnd_api.g_ret_sts_error THEN
6266: RAISE fnd_api.g_exc_error;
6267: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6268: RAISE fnd_api.g_exc_unexpected_error;
6269: END IF;
6262: , p_container_item_id => p_container_item_id
6263: , p_cartonization_id => p_cartonization_id
6264: );
6265: IF l_return_status =fnd_api.g_ret_sts_error THEN
6266: RAISE fnd_api.g_exc_error;
6267: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6268: RAISE fnd_api.g_exc_unexpected_error;
6269: END IF;
6270: END IF;
6263: , p_cartonization_id => p_cartonization_id
6264: );
6265: IF l_return_status =fnd_api.g_ret_sts_error THEN
6266: RAISE fnd_api.g_exc_error;
6267: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6268: RAISE fnd_api.g_exc_unexpected_error;
6269: END IF;
6270: END IF;
6271: END upd_lpn_loc_curr_cpty_nauto;
6264: );
6265: IF l_return_status =fnd_api.g_ret_sts_error THEN
6266: RAISE fnd_api.g_exc_error;
6267: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6268: RAISE fnd_api.g_exc_unexpected_error;
6269: END IF;
6270: END IF;
6271: END upd_lpn_loc_curr_cpty_nauto;
6272:
6300: l_msg_count NUMBER;
6301: l_msg_data VARCHAR2(1000);
6302: l_debug number := NVL(FND_PROFILE.VALUE('INV_DEBUG_TRACE'),0);
6303: BEGIN
6304: x_return_status := FND_API.G_RET_STS_SUCCESS;
6305: INV_LOC_WMS_UTILS.upd_lpn_loc_curr_cpty_nauto
6306: ( x_return_status =>l_return_status,
6307: x_msg_count =>l_msg_count,
6308: x_msg_data =>l_msg_data,
6321: p_from_org_id => p_from_org_id,
6322: p_from_loc_id => p_from_loc_id
6323: );
6324:
6325: if l_return_status <> fnd_api.g_ret_sts_success THEN
6326: IF l_return_status = fnd_api.g_ret_sts_error then
6327: raise fnd_api.g_exc_error;
6328: ELSE
6329: RAISE fnd_api.g_exc_unexpected_error;
6322: p_from_loc_id => p_from_loc_id
6323: );
6324:
6325: if l_return_status <> fnd_api.g_ret_sts_success THEN
6326: IF l_return_status = fnd_api.g_ret_sts_error then
6327: raise fnd_api.g_exc_error;
6328: ELSE
6329: RAISE fnd_api.g_exc_unexpected_error;
6330: END IF;
6323: );
6324:
6325: if l_return_status <> fnd_api.g_ret_sts_success THEN
6326: IF l_return_status = fnd_api.g_ret_sts_error then
6327: raise fnd_api.g_exc_error;
6328: ELSE
6329: RAISE fnd_api.g_exc_unexpected_error;
6330: END IF;
6331: end if;
6325: if l_return_status <> fnd_api.g_ret_sts_success THEN
6326: IF l_return_status = fnd_api.g_ret_sts_error then
6327: raise fnd_api.g_exc_error;
6328: ELSE
6329: RAISE fnd_api.g_exc_unexpected_error;
6330: END IF;
6331: end if;
6332:
6333: commit;
6331: end if;
6332:
6333: commit;
6334: EXCEPTION
6335: WHEN fnd_api.g_exc_error THEN
6336: rollback;
6337: x_return_status := fnd_api.g_ret_sts_error;
6338: fnd_msg_pub.count_and_get
6339: ( p_count => x_msg_count,
6333: commit;
6334: EXCEPTION
6335: WHEN fnd_api.g_exc_error THEN
6336: rollback;
6337: x_return_status := fnd_api.g_ret_sts_error;
6338: fnd_msg_pub.count_and_get
6339: ( p_count => x_msg_count,
6340: p_data => x_msg_data
6341: );
6339: ( p_count => x_msg_count,
6340: p_data => x_msg_data
6341: );
6342:
6343: WHEN fnd_api.g_exc_unexpected_error THEN
6344: rollback;
6345: x_return_status := fnd_api.g_ret_sts_unexp_error ;
6346: fnd_msg_pub.count_and_get
6347: ( p_count => x_msg_count,
6341: );
6342:
6343: WHEN fnd_api.g_exc_unexpected_error THEN
6344: rollback;
6345: x_return_status := fnd_api.g_ret_sts_unexp_error ;
6346: fnd_msg_pub.count_and_get
6347: ( p_count => x_msg_count,
6348: p_data => x_msg_data
6349: );
6349: );
6350:
6351: WHEN NO_DATA_FOUND THEN
6352: rollback;
6353: x_return_status := fnd_api.g_ret_sts_error;
6354:
6355: WHEN OTHERS THEN
6356: rollback;
6357: x_return_status := fnd_api.g_ret_sts_unexp_error;
6353: x_return_status := fnd_api.g_ret_sts_error;
6354:
6355: WHEN OTHERS THEN
6356: rollback;
6357: x_return_status := fnd_api.g_ret_sts_unexp_error;
6358: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error)
6359: THEN
6360: fnd_msg_pub.add_exc_msg
6361: ( 'inv_loc_wms_utils'
6379: l_msg_data varchar2(1000);
6380: l_msg_count number;
6381: l_debug number := NVL(FND_PROFILE.VALUE('INV_DEBUG_TRACE'),0);
6382: BEGIN
6383: x_return_status := fnd_api.g_ret_sts_success;
6384:
6385: savepoint lpn_loc_cleanup;
6386: IF (l_debug = 1) THEN
6387: INV_TRX_UTIL_PUB.TRACE('In LPN_LOC_CAPACITY_clean_up Procedure ','lpn_loc_capacity_clean_up',9);
6392: x_msg_data => x_msg_data,
6393: p_organization_id =>p_organization_id,
6394: p_mixed_flag => p_mixed_flag);
6395:
6396: IF X_RETURN_STATUS =fnd_api.g_ret_sts_error THEN
6397: IF (l_debug = 1) THEN
6398: INV_TRX_UTIL_PUB.TRACE('Call to LPN_LOC_current_CAPACITY failed with Status E ','lpn_loc_capacity_clean_up',9);
6399: END IF;
6400: RAISE fnd_api.g_exc_error;
6396: IF X_RETURN_STATUS =fnd_api.g_ret_sts_error THEN
6397: IF (l_debug = 1) THEN
6398: INV_TRX_UTIL_PUB.TRACE('Call to LPN_LOC_current_CAPACITY failed with Status E ','lpn_loc_capacity_clean_up',9);
6399: END IF;
6400: RAISE fnd_api.g_exc_error;
6401: ELSIF X_RETURN_STATUS =fnd_api.g_ret_sts_unexp_error THEN
6402: IF (l_debug = 1) THEN
6403: INV_TRX_UTIL_PUB.TRACE('Call to LPN_LOC_current_CAPACITY failed with status U','lpn_loc_capacity_clean_up',9);
6404: END IF;
6397: IF (l_debug = 1) THEN
6398: INV_TRX_UTIL_PUB.TRACE('Call to LPN_LOC_current_CAPACITY failed with Status E ','lpn_loc_capacity_clean_up',9);
6399: END IF;
6400: RAISE fnd_api.g_exc_error;
6401: ELSIF X_RETURN_STATUS =fnd_api.g_ret_sts_unexp_error THEN
6402: IF (l_debug = 1) THEN
6403: INV_TRX_UTIL_PUB.TRACE('Call to LPN_LOC_current_CAPACITY failed with status U','lpn_loc_capacity_clean_up',9);
6404: END IF;
6405: RAISE fnd_api.g_exc_unexpected_error;
6401: ELSIF X_RETURN_STATUS =fnd_api.g_ret_sts_unexp_error THEN
6402: IF (l_debug = 1) THEN
6403: INV_TRX_UTIL_PUB.TRACE('Call to LPN_LOC_current_CAPACITY failed with status U','lpn_loc_capacity_clean_up',9);
6404: END IF;
6405: RAISE fnd_api.g_exc_unexpected_error;
6406: END IF;
6407:
6408: IF (l_debug = 1) THEN
6409: INV_TRX_UTIL_PUB.TRACE('Before call to lpn_loc_cleanup_mmtt','lpn_loc_capacity_clean_up',9);
6414: x_msg_data =>l_msg_data,
6415: p_organization_id =>p_organization_id,
6416: p_mixed_flag =>p_mixed_flag);
6417:
6418: IF X_RETURN_STATUS =fnd_api.g_ret_sts_error THEN
6419: IF (l_debug = 1) THEN
6420: INV_TRX_UTIL_PUB.TRACE('Call to lpn_loc_cleanup_mmtt failed with status E','lpn_loc_capacity_clean_up',9);
6421: END IF;
6422: RAISE fnd_api.g_exc_error;
6418: IF X_RETURN_STATUS =fnd_api.g_ret_sts_error THEN
6419: IF (l_debug = 1) THEN
6420: INV_TRX_UTIL_PUB.TRACE('Call to lpn_loc_cleanup_mmtt failed with status E','lpn_loc_capacity_clean_up',9);
6421: END IF;
6422: RAISE fnd_api.g_exc_error;
6423: ELSIF X_RETURN_STATUS =fnd_api.g_ret_sts_unexp_error THEN
6424: IF (l_debug = 1) THEN
6425: INV_TRX_UTIL_PUB.TRACE('Call to lpn_loc_cleanup_mmtt failed with status U','lpn_loc_capacity_clean_up',9);
6426: END IF;
6419: IF (l_debug = 1) THEN
6420: INV_TRX_UTIL_PUB.TRACE('Call to lpn_loc_cleanup_mmtt failed with status E','lpn_loc_capacity_clean_up',9);
6421: END IF;
6422: RAISE fnd_api.g_exc_error;
6423: ELSIF X_RETURN_STATUS =fnd_api.g_ret_sts_unexp_error THEN
6424: IF (l_debug = 1) THEN
6425: INV_TRX_UTIL_PUB.TRACE('Call to lpn_loc_cleanup_mmtt failed with status U','lpn_loc_capacity_clean_up',9);
6426: END IF;
6427: RAISE fnd_api.g_exc_unexpected_error;
6423: ELSIF X_RETURN_STATUS =fnd_api.g_ret_sts_unexp_error THEN
6424: IF (l_debug = 1) THEN
6425: INV_TRX_UTIL_PUB.TRACE('Call to lpn_loc_cleanup_mmtt failed with status U','lpn_loc_capacity_clean_up',9);
6426: END IF;
6427: RAISE fnd_api.g_exc_unexpected_error;
6428: END IF;
6429:
6430: EXCEPTION
6431: WHEN fnd_api.g_exc_error THEN
6427: RAISE fnd_api.g_exc_unexpected_error;
6428: END IF;
6429:
6430: EXCEPTION
6431: WHEN fnd_api.g_exc_error THEN
6432: --Fixed bug 2342723, do not rollback to savepoint
6433: -- Bug 3511690 rolling back to savepoint
6434: rollback to lpn_loc_cleanup;
6435: --rollback;
6432: --Fixed bug 2342723, do not rollback to savepoint
6433: -- Bug 3511690 rolling back to savepoint
6434: rollback to lpn_loc_cleanup;
6435: --rollback;
6436: x_return_status := fnd_api.g_ret_sts_error;
6437: fnd_msg_pub.count_and_get
6438: ( p_count => x_msg_count,
6439: p_data => x_msg_data
6440: );
6438: ( p_count => x_msg_count,
6439: p_data => x_msg_data
6440: );
6441:
6442: WHEN fnd_api.g_exc_unexpected_error THEN
6443: x_return_status := fnd_api.g_ret_sts_unexp_error ;
6444: rollback to lpn_loc_cleanup;
6445: --rollback;
6446: fnd_msg_pub.count_and_get
6439: p_data => x_msg_data
6440: );
6441:
6442: WHEN fnd_api.g_exc_unexpected_error THEN
6443: x_return_status := fnd_api.g_ret_sts_unexp_error ;
6444: rollback to lpn_loc_cleanup;
6445: --rollback;
6446: fnd_msg_pub.count_and_get
6447: ( p_count => x_msg_count,
6448: p_data => x_msg_data
6449: );
6450:
6451: WHEN NO_DATA_FOUND THEN
6452: x_return_status := fnd_api.g_ret_sts_error;
6453: rollback to lpn_loc_cleanup;
6454: --rollback;
6455: fnd_msg_pub.count_and_get
6456: ( p_count => x_msg_count,
6456: ( p_count => x_msg_count,
6457: p_data => x_msg_data
6458: );
6459: WHEN OTHERS THEN
6460: x_return_status := fnd_api.g_ret_sts_unexp_error;
6461: rollback to lpn_loc_cleanup;
6462: --rollback;
6463: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error)
6464: THEN
6658: x_locator_current_volume := l_locator_current_volume - l_cnt_lpn_container_item_vol;
6659: END IF;
6660: END IF;
6661: EXCEPTION
6662: WHEN fnd_api.g_exc_error THEN
6663: x_return_status := fnd_api.g_ret_sts_error;
6664: fnd_msg_pub.count_and_get
6665: ( p_count => x_msg_count,
6666: p_data => x_msg_data
6659: END IF;
6660: END IF;
6661: EXCEPTION
6662: WHEN fnd_api.g_exc_error THEN
6663: x_return_status := fnd_api.g_ret_sts_error;
6664: fnd_msg_pub.count_and_get
6665: ( p_count => x_msg_count,
6666: p_data => x_msg_data
6667: );
6664: fnd_msg_pub.count_and_get
6665: ( p_count => x_msg_count,
6666: p_data => x_msg_data
6667: );
6668: WHEN fnd_api.g_exc_unexpected_error THEN
6669: x_return_status := fnd_api.g_ret_sts_unexp_error ;
6670: fnd_msg_pub.count_and_get
6671: ( p_count => x_msg_count,
6672: p_data => x_msg_data
6665: ( p_count => x_msg_count,
6666: p_data => x_msg_data
6667: );
6668: WHEN fnd_api.g_exc_unexpected_error THEN
6669: x_return_status := fnd_api.g_ret_sts_unexp_error ;
6670: fnd_msg_pub.count_and_get
6671: ( p_count => x_msg_count,
6672: p_data => x_msg_data
6673: );
6671: ( p_count => x_msg_count,
6672: p_data => x_msg_data
6673: );
6674: WHEN NO_DATA_FOUND THEN
6675: x_return_status := fnd_api.g_ret_sts_error;
6676: WHEN OTHERS THEN
6677: x_return_status := fnd_api.g_ret_sts_unexp_error;
6678: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error)
6679: THEN
6673: );
6674: WHEN NO_DATA_FOUND THEN
6675: x_return_status := fnd_api.g_ret_sts_error;
6676: WHEN OTHERS THEN
6677: x_return_status := fnd_api.g_ret_sts_unexp_error;
6678: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error)
6679: THEN
6680: fnd_msg_pub.add_exc_msg
6681: ( 'inv_loc_wms_utils'
6726: l_msg_data VARCHAR2(1000);
6727: l_msg_count NUMBER;
6728: l_debug number := NVL(FND_PROFILE.VALUE('INV_DEBUG_TRACE'),0);
6729: BEGIN
6730: x_return_status := FND_API.G_RET_STS_SUCCESS;
6731: BEGIN
6732:
6733: SELECT GROSS_WEIGHT_UOM_CODE,
6734: CONTENT_VOLUME_UOM_CODE,
6783: null ,
6784: p_org_id,
6785: 'Y'
6786: );
6787: IF l_return_status =fnd_api.g_ret_sts_error THEN
6788: IF (l_debug = 1) THEN
6789: INV_TRX_UTIL_PUB.TRACE('Error fetching container item attributes - '||l_return_status , 'LPN-ATTRIBUTE-UPDATE_LPN_LOC',4);
6790: END IF;
6791: RAISE fnd_api.g_exc_error;
6787: IF l_return_status =fnd_api.g_ret_sts_error THEN
6788: IF (l_debug = 1) THEN
6789: INV_TRX_UTIL_PUB.TRACE('Error fetching container item attributes - '||l_return_status , 'LPN-ATTRIBUTE-UPDATE_LPN_LOC',4);
6790: END IF;
6791: RAISE fnd_api.g_exc_error;
6792: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6793: IF (l_debug = 1) THEN
6794: INV_TRX_UTIL_PUB.TRACE('Error fetching container item attributes - '||l_return_status , 'LPN-ATTRIBUTE-UPDATE_LPN_LOC',4);
6795: END IF;
6788: IF (l_debug = 1) THEN
6789: INV_TRX_UTIL_PUB.TRACE('Error fetching container item attributes - '||l_return_status , 'LPN-ATTRIBUTE-UPDATE_LPN_LOC',4);
6790: END IF;
6791: RAISE fnd_api.g_exc_error;
6792: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6793: IF (l_debug = 1) THEN
6794: INV_TRX_UTIL_PUB.TRACE('Error fetching container item attributes - '||l_return_status , 'LPN-ATTRIBUTE-UPDATE_LPN_LOC',4);
6795: END IF;
6796: RAISE fnd_api.g_exc_unexpected_error;
6792: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6793: IF (l_debug = 1) THEN
6794: INV_TRX_UTIL_PUB.TRACE('Error fetching container item attributes - '||l_return_status , 'LPN-ATTRIBUTE-UPDATE_LPN_LOC',4);
6795: END IF;
6796: RAISE fnd_api.g_exc_unexpected_error;
6797: END IF;
6798: END IF;
6799:
6800: IF l_gross_weight_uom_code is not null AND
6818: ELSE
6819: l_container_item_xacted_weight := l_container_item_unit_weight;
6820: END IF;
6821: IF l_container_item_xacted_weight = -99999 THEN
6822: RAISE fnd_api.g_exc_error;
6823: END IF;
6824: IF (l_debug = 1) THEN
6825: INV_TRX_UTIL_PUB.TRACE('l_container_item_xacted_weight is '||to_char(l_container_item_xacted_weight), 'LPN-ATTRIBUTE-UPDATE_LPN_LOC',4);
6826: END IF;
6846: IF (l_debug = 1) THEN
6847: INV_TRX_UTIL_PUB.TRACE('l_container_item_xacted_volume is '||to_char(l_container_item_xacted_volume), 'LPN-ATTRIBUTE-UPDATE_LPN_LOC',4);
6848: END IF;
6849: IF l_container_item_xacted_volume = -99999 THEN
6850: RAISE fnd_api.g_exc_error;
6851: END IF;
6852:
6853: END IF;
6854:
6893: x_container_item_weight :=nvl(l_container_item_xacted_weight,0);
6894: x_container_item_vol :=nvl(l_container_item_xacted_volume,0);
6895:
6896: EXCEPTION
6897: WHEN fnd_api.g_exc_error THEN
6898: x_return_status := fnd_api.g_ret_sts_error;
6899: fnd_msg_pub.count_and_get
6900: ( p_count => x_msg_count,
6901: p_data => x_msg_data
6894: x_container_item_vol :=nvl(l_container_item_xacted_volume,0);
6895:
6896: EXCEPTION
6897: WHEN fnd_api.g_exc_error THEN
6898: x_return_status := fnd_api.g_ret_sts_error;
6899: fnd_msg_pub.count_and_get
6900: ( p_count => x_msg_count,
6901: p_data => x_msg_data
6902: );
6900: ( p_count => x_msg_count,
6901: p_data => x_msg_data
6902: );
6903:
6904: WHEN fnd_api.g_exc_unexpected_error THEN
6905: x_return_status := fnd_api.g_ret_sts_unexp_error ;
6906: fnd_msg_pub.count_and_get
6907: ( p_count => x_msg_count,
6908: p_data => x_msg_data
6901: p_data => x_msg_data
6902: );
6903:
6904: WHEN fnd_api.g_exc_unexpected_error THEN
6905: x_return_status := fnd_api.g_ret_sts_unexp_error ;
6906: fnd_msg_pub.count_and_get
6907: ( p_count => x_msg_count,
6908: p_data => x_msg_data
6909: );
6908: p_data => x_msg_data
6909: );
6910:
6911: WHEN NO_DATA_FOUND THEN
6912: x_return_status := fnd_api.g_ret_sts_error;
6913:
6914: WHEN OTHERS THEN
6915: x_return_status := fnd_api.g_ret_sts_unexp_error;
6916: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error)
6911: WHEN NO_DATA_FOUND THEN
6912: x_return_status := fnd_api.g_ret_sts_error;
6913:
6914: WHEN OTHERS THEN
6915: x_return_status := fnd_api.g_ret_sts_unexp_error;
6916: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error)
6917: THEN
6918: fnd_msg_pub.add_exc_msg
6919: ( 'inv_loc_wms_utils'
6966: l_quantity NUMBER;
6967:
6968: l_debug number := NVL(FND_PROFILE.VALUE('INV_DEBUG_TRACE'),0);
6969: BEGIN
6970: x_return_status := FND_API.G_RET_STS_SUCCESS;
6971:
6972: SELECT primary_uom_code
6973: ,weight_uom_code
6974: ,unit_weight
7029: ELSE
7030: l_item_unit_weight := l_item_unit_weight;
7031: END IF;
7032: IF l_item_unit_weight = -99999 THEN
7033: RAISE fnd_api.g_exc_error;
7034: END IF;
7035: END IF;
7036:
7037: IF l_item_volume_uom_code is not null AND
7050: ELSE
7051: l_item_unit_volume := l_item_unit_volume;
7052: END IF;
7053: IF l_item_unit_volume = -99999 THEN
7054: RAISE fnd_api.g_exc_error;
7055: END IF;
7056: END IF;
7057: IF p_container_item ='Y' THEN
7058:
7088: l_quantity := p_quantity ;
7089: END IF;
7090:
7091: IF l_quantity = -99999 THEN
7092: RAISE fnd_api.g_exc_error;
7093: END IF;
7094: IF (l_debug = 1) THEN
7095: INV_TRX_UTIL_PUB.TRACE('The value of l_quantity is '||to_char(l_quantity),'UPD_LPN_LOC-ITEM_ATTRIBUTES',4);
7096: END IF;
7124: from_name => null,
7125: to_name => null
7126: );
7127: IF l_item_xacted_weight= -99999 THEN
7128: RAISE fnd_api.g_exc_error;
7129: END IF;
7130: END IF;
7131: END IF;
7132:
7155: to_name => null
7156: );
7157: END IF;
7158: IF l_item_xacted_volume= -99999 THEN
7159: RAISE fnd_api.g_exc_error;
7160: END IF;
7161: END IF;
7162:
7163: x_item_unit_weight := nvl(l_item_unit_weight,0);
7172: END IF;
7173:
7174: END IF; /* End of p_container_item =Y */
7175: EXCEPTION
7176: WHEN fnd_api.g_exc_error THEN
7177: x_return_status := fnd_api.g_ret_sts_error;
7178: fnd_msg_pub.count_and_get
7179: ( p_count => x_msg_count,
7180: p_data => x_msg_data
7173:
7174: END IF; /* End of p_container_item =Y */
7175: EXCEPTION
7176: WHEN fnd_api.g_exc_error THEN
7177: x_return_status := fnd_api.g_ret_sts_error;
7178: fnd_msg_pub.count_and_get
7179: ( p_count => x_msg_count,
7180: p_data => x_msg_data
7181: );
7179: ( p_count => x_msg_count,
7180: p_data => x_msg_data
7181: );
7182:
7183: WHEN fnd_api.g_exc_unexpected_error THEN
7184: x_return_status := fnd_api.g_ret_sts_unexp_error ;
7185: fnd_msg_pub.count_and_get
7186: ( p_count => x_msg_count,
7187: p_data => x_msg_data
7180: p_data => x_msg_data
7181: );
7182:
7183: WHEN fnd_api.g_exc_unexpected_error THEN
7184: x_return_status := fnd_api.g_ret_sts_unexp_error ;
7185: fnd_msg_pub.count_and_get
7186: ( p_count => x_msg_count,
7187: p_data => x_msg_data
7188: );
7187: p_data => x_msg_data
7188: );
7189:
7190: WHEN NO_DATA_FOUND THEN
7191: x_return_status := fnd_api.g_ret_sts_error;
7192:
7193: WHEN OTHERS THEN
7194: x_return_status := fnd_api.g_ret_sts_unexp_error;
7195: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error)
7190: WHEN NO_DATA_FOUND THEN
7191: x_return_status := fnd_api.g_ret_sts_error;
7192:
7193: WHEN OTHERS THEN
7194: x_return_status := fnd_api.g_ret_sts_unexp_error;
7195: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error)
7196: THEN
7197: fnd_msg_pub.add_exc_msg
7198: ( 'inv_loc_wms_utils'
7223: l_msg_data varchar2(1000);
7224: l_msg_count number;
7225: l_debug number := NVL(FND_PROFILE.VALUE('INV_DEBUG_TRACE'),0);
7226: BEGIN
7227: x_return_status := fnd_api.g_ret_sts_success ;
7228:
7229: INV_LOC_WMS_UTILS.LOC_EMPTY_MIXED_FLAG (
7230: X_RETURN_STATUS => l_return_status
7231: , X_MSG_COUNT => l_MSG_COUNT
7237: , P_TRANSFER_ORGANIZATION => p_transfer_organization
7238: , P_TRANSFER_LOCATION_ID => p_transfer_location_id
7239: , P_SOURCE => p_source); --bug#9159019 FPing fix for #894446
7240:
7241: if l_return_status <> fnd_api.g_ret_sts_success THEN
7242: IF l_return_status = fnd_api.g_ret_sts_error then
7243: raise fnd_api.g_exc_error;
7244: ELSE
7245: RAISE fnd_api.g_exc_unexpected_error;
7238: , P_TRANSFER_LOCATION_ID => p_transfer_location_id
7239: , P_SOURCE => p_source); --bug#9159019 FPing fix for #894446
7240:
7241: if l_return_status <> fnd_api.g_ret_sts_success THEN
7242: IF l_return_status = fnd_api.g_ret_sts_error then
7243: raise fnd_api.g_exc_error;
7244: ELSE
7245: RAISE fnd_api.g_exc_unexpected_error;
7246: END IF;
7239: , P_SOURCE => p_source); --bug#9159019 FPing fix for #894446
7240:
7241: if l_return_status <> fnd_api.g_ret_sts_success THEN
7242: IF l_return_status = fnd_api.g_ret_sts_error then
7243: raise fnd_api.g_exc_error;
7244: ELSE
7245: RAISE fnd_api.g_exc_unexpected_error;
7246: END IF;
7247: end if;
7241: if l_return_status <> fnd_api.g_ret_sts_success THEN
7242: IF l_return_status = fnd_api.g_ret_sts_error then
7243: raise fnd_api.g_exc_error;
7244: ELSE
7245: RAISE fnd_api.g_exc_unexpected_error;
7246: END IF;
7247: end if;
7248:
7249: commit;
7247: end if;
7248:
7249: commit;
7250: EXCEPTION
7251: WHEN fnd_api.g_exc_error THEN
7252: rollback; --13346632
7253: x_return_status := fnd_api.g_ret_sts_error;
7254: fnd_msg_pub.count_and_get
7255: ( p_count => x_msg_count,
7249: commit;
7250: EXCEPTION
7251: WHEN fnd_api.g_exc_error THEN
7252: rollback; --13346632
7253: x_return_status := fnd_api.g_ret_sts_error;
7254: fnd_msg_pub.count_and_get
7255: ( p_count => x_msg_count,
7256: p_data => x_msg_data
7257: );
7255: ( p_count => x_msg_count,
7256: p_data => x_msg_data
7257: );
7258:
7259: WHEN fnd_api.g_exc_unexpected_error THEN
7260: rollback; --13346632
7261: x_return_status := fnd_api.g_ret_sts_unexp_error ;
7262: fnd_msg_pub.count_and_get
7263: ( p_count => x_msg_count,
7257: );
7258:
7259: WHEN fnd_api.g_exc_unexpected_error THEN
7260: rollback; --13346632
7261: x_return_status := fnd_api.g_ret_sts_unexp_error ;
7262: fnd_msg_pub.count_and_get
7263: ( p_count => x_msg_count,
7264: p_data => x_msg_data
7265: );
7265: );
7266:
7267: WHEN NO_DATA_FOUND THEN
7268: rollback; --13346632
7269: x_return_status := fnd_api.g_ret_sts_error;
7270:
7271: WHEN OTHERS THEN
7272: rollback; --13346632
7273: x_return_status := fnd_api.g_ret_sts_unexp_error;
7269: x_return_status := fnd_api.g_ret_sts_error;
7270:
7271: WHEN OTHERS THEN
7272: rollback; --13346632
7273: x_return_status := fnd_api.g_ret_sts_unexp_error;
7274: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error)
7275: THEN
7276: fnd_msg_pub.add_exc_msg
7277: ( 'inv_loc_wms_utils'
7320:
7321: -- Fixed bug 2342723, remove the savepoint
7322: savepoint loc_empty; --13346632
7323:
7324: x_return_status := FND_API.G_RET_STS_SUCCESS;
7325:
7326: SELECT physical_location_id ,
7327: inventory_location_id
7328: INTO l_physical_locator_id,
7374: END IF;
7375:
7376: END IF;
7377: WHEN OTHERS THEN
7378: RAISE fnd_api.g_exc_unexpected_error;
7379: END;
7380: END LOOP;
7381: /*11809528.end*/
7382:
7403: ,P_ORG_ID => P_ORGANIZATION_ID
7404: ,P_INVENTORY_ITEM_ID => P_INVENTORY_ITEM_ID
7405: ) ;
7406:
7407: IF X_RETURN_STATUS =fnd_api.g_ret_sts_error THEN
7408: IF (l_debug = 1) THEN
7409: INV_TRX_UTIL_PUB.TRACE('Failed for Receipt transaction with status -E ', 'LOC_EMPTY_MIXED_FLAG',9);
7410: END IF;
7411: RAISE fnd_api.g_exc_error;
7407: IF X_RETURN_STATUS =fnd_api.g_ret_sts_error THEN
7408: IF (l_debug = 1) THEN
7409: INV_TRX_UTIL_PUB.TRACE('Failed for Receipt transaction with status -E ', 'LOC_EMPTY_MIXED_FLAG',9);
7410: END IF;
7411: RAISE fnd_api.g_exc_error;
7412: ELSIF X_RETURN_STATUS =fnd_api.g_ret_sts_unexp_error THEN
7413: IF (l_debug = 1) THEN
7414: INV_TRX_UTIL_PUB.TRACE('Failed for Receipt transaction with status -U ', 'LOC_EMPTY_MIXED_FLAG',9);
7415: END IF;
7408: IF (l_debug = 1) THEN
7409: INV_TRX_UTIL_PUB.TRACE('Failed for Receipt transaction with status -E ', 'LOC_EMPTY_MIXED_FLAG',9);
7410: END IF;
7411: RAISE fnd_api.g_exc_error;
7412: ELSIF X_RETURN_STATUS =fnd_api.g_ret_sts_unexp_error THEN
7413: IF (l_debug = 1) THEN
7414: INV_TRX_UTIL_PUB.TRACE('Failed for Receipt transaction with status -U ', 'LOC_EMPTY_MIXED_FLAG',9);
7415: END IF;
7416: RAISE fnd_api.g_exc_unexpected_error;
7412: ELSIF X_RETURN_STATUS =fnd_api.g_ret_sts_unexp_error THEN
7413: IF (l_debug = 1) THEN
7414: INV_TRX_UTIL_PUB.TRACE('Failed for Receipt transaction with status -U ', 'LOC_EMPTY_MIXED_FLAG',9);
7415: END IF;
7416: RAISE fnd_api.g_exc_unexpected_error;
7417: END IF;
7418:
7419: ELSIF P_TRANSACTION_ACTION_ID in (1,21,32,34) /* Issue */ THEN
7420: IF (l_debug = 1) THEN
7431: ,P_LOCATOR_ID => l_inventory_location_id
7432: ,P_INVENTORY_ITEM_ID=> P_INVENTORY_ITEM_ID
7433: ,P_SOURCE =>p_source
7434: ) ;
7435: IF X_RETURN_STATUS =fnd_api.g_ret_sts_error THEN
7436: IF (l_debug = 1) THEN
7437: INV_TRX_UTIL_PUB.TRACE('Failed for Issue transaction with status -E ', 'LOC_EMPTY_MIXED_FLAG',9);
7438: END IF;
7439: RAISE fnd_api.g_exc_error;
7435: IF X_RETURN_STATUS =fnd_api.g_ret_sts_error THEN
7436: IF (l_debug = 1) THEN
7437: INV_TRX_UTIL_PUB.TRACE('Failed for Issue transaction with status -E ', 'LOC_EMPTY_MIXED_FLAG',9);
7438: END IF;
7439: RAISE fnd_api.g_exc_error;
7440: ELSIF X_RETURN_STATUS =fnd_api.g_ret_sts_unexp_error THEN
7441: IF (l_debug = 1) THEN
7442: INV_TRX_UTIL_PUB.TRACE('Failed for Issue transaction with status - U', 'LOC_EMPTY_MIXED_FLAG',9);
7443: END IF;
7436: IF (l_debug = 1) THEN
7437: INV_TRX_UTIL_PUB.TRACE('Failed for Issue transaction with status -E ', 'LOC_EMPTY_MIXED_FLAG',9);
7438: END IF;
7439: RAISE fnd_api.g_exc_error;
7440: ELSIF X_RETURN_STATUS =fnd_api.g_ret_sts_unexp_error THEN
7441: IF (l_debug = 1) THEN
7442: INV_TRX_UTIL_PUB.TRACE('Failed for Issue transaction with status - U', 'LOC_EMPTY_MIXED_FLAG',9);
7443: END IF;
7444: RAISE fnd_api.g_exc_unexpected_error;
7440: ELSIF X_RETURN_STATUS =fnd_api.g_ret_sts_unexp_error THEN
7441: IF (l_debug = 1) THEN
7442: INV_TRX_UTIL_PUB.TRACE('Failed for Issue transaction with status - U', 'LOC_EMPTY_MIXED_FLAG',9);
7443: END IF;
7444: RAISE fnd_api.g_exc_unexpected_error;
7445: END IF;
7446: ELSIF p_transaction_action_id in(2,3,28) /* TRANSFER */ THEN
7447:
7448: IF (l_debug = 1) THEN
7502: END IF;
7503:
7504: END IF;
7505: WHEN OTHERS THEN
7506: RAISE fnd_api.g_exc_unexpected_error;
7507: END;
7508: END LOOP;
7509: /*11809528.ends*/
7510:
7522: ,P_LOCATOR_ID => l_des_inventory_location_id
7523: ,P_ORG_ID => P_TRANSFER_ORGANIZATION
7524: ,P_INVENTORY_ITEM_ID => P_INVENTORY_ITEM_ID
7525: ) ;
7526: IF X_RETURN_STATUS =fnd_api.g_ret_sts_error THEN
7527: IF (l_debug = 1) THEN
7528: INV_TRX_UTIL_PUB.TRACE('Failed for Receipt transaction with status -E ', 'LOC_EMPTY_MIXED_FLAG',9);
7529: END IF;
7530: RAISE fnd_api.g_exc_error;
7526: IF X_RETURN_STATUS =fnd_api.g_ret_sts_error THEN
7527: IF (l_debug = 1) THEN
7528: INV_TRX_UTIL_PUB.TRACE('Failed for Receipt transaction with status -E ', 'LOC_EMPTY_MIXED_FLAG',9);
7529: END IF;
7530: RAISE fnd_api.g_exc_error;
7531: ELSIF X_RETURN_STATUS =fnd_api.g_ret_sts_unexp_error THEN
7532: IF (l_debug = 1) THEN
7533: INV_TRX_UTIL_PUB.TRACE('Failed for Receipt transaction with status -U ', 'LOC_EMPTY_MIXED_FLAG',9);
7534: END IF;
7527: IF (l_debug = 1) THEN
7528: INV_TRX_UTIL_PUB.TRACE('Failed for Receipt transaction with status -E ', 'LOC_EMPTY_MIXED_FLAG',9);
7529: END IF;
7530: RAISE fnd_api.g_exc_error;
7531: ELSIF X_RETURN_STATUS =fnd_api.g_ret_sts_unexp_error THEN
7532: IF (l_debug = 1) THEN
7533: INV_TRX_UTIL_PUB.TRACE('Failed for Receipt transaction with status -U ', 'LOC_EMPTY_MIXED_FLAG',9);
7534: END IF;
7535: RAISE fnd_api.g_exc_unexpected_error;
7531: ELSIF X_RETURN_STATUS =fnd_api.g_ret_sts_unexp_error THEN
7532: IF (l_debug = 1) THEN
7533: INV_TRX_UTIL_PUB.TRACE('Failed for Receipt transaction with status -U ', 'LOC_EMPTY_MIXED_FLAG',9);
7534: END IF;
7535: RAISE fnd_api.g_exc_unexpected_error;
7536: END IF;
7537:
7538: IF (l_debug = 1) THEN
7539: INV_TRX_UTIL_PUB.TRACE('Before Updating destination locator ', 'LOC_EMPTY_MIXED_FLAG',10);
7572: ,P_LOCATOR_ID => l_inventory_location_id
7573: ,P_INVENTORY_ITEM_ID=> P_INVENTORY_ITEM_ID
7574: ,P_SOURCE =>p_source
7575: ) ;
7576: IF X_RETURN_STATUS =fnd_api.g_ret_sts_error THEN
7577: IF (l_debug = 1) THEN
7578: INV_TRX_UTIL_PUB.TRACE('Failed for Issue transaction with status -E ', 'LOC_EMPTY_MIXED_FLAG',9);
7579: END IF;
7580: RAISE fnd_api.g_exc_error;
7576: IF X_RETURN_STATUS =fnd_api.g_ret_sts_error THEN
7577: IF (l_debug = 1) THEN
7578: INV_TRX_UTIL_PUB.TRACE('Failed for Issue transaction with status -E ', 'LOC_EMPTY_MIXED_FLAG',9);
7579: END IF;
7580: RAISE fnd_api.g_exc_error;
7581: ELSIF X_RETURN_STATUS =fnd_api.g_ret_sts_unexp_error THEN
7582: IF (l_debug = 1) THEN
7583: INV_TRX_UTIL_PUB.TRACE('Failed for Issue transaction with status - U', 'LOC_EMPTY_MIXED_FLAG',9);
7584: END IF;
7577: IF (l_debug = 1) THEN
7578: INV_TRX_UTIL_PUB.TRACE('Failed for Issue transaction with status -E ', 'LOC_EMPTY_MIXED_FLAG',9);
7579: END IF;
7580: RAISE fnd_api.g_exc_error;
7581: ELSIF X_RETURN_STATUS =fnd_api.g_ret_sts_unexp_error THEN
7582: IF (l_debug = 1) THEN
7583: INV_TRX_UTIL_PUB.TRACE('Failed for Issue transaction with status - U', 'LOC_EMPTY_MIXED_FLAG',9);
7584: END IF;
7585: RAISE fnd_api.g_exc_unexpected_error;
7581: ELSIF X_RETURN_STATUS =fnd_api.g_ret_sts_unexp_error THEN
7582: IF (l_debug = 1) THEN
7583: INV_TRX_UTIL_PUB.TRACE('Failed for Issue transaction with status - U', 'LOC_EMPTY_MIXED_FLAG',9);
7584: END IF;
7585: RAISE fnd_api.g_exc_unexpected_error;
7586: END IF;
7587: END IF; /* End if for the transaction_action_id */
7588:
7589: IF (l_debug = 1) THEN
7610: IF (l_debug = 1) THEN
7611: INV_TRX_UTIL_PUB.TRACE('End of Procedure LOC_EMPTY_MIXED_FLAG ', 'LOC_EMPTY_MIXED_FLAG',10);
7612: END IF;
7613: EXCEPTION
7614: WHEN fnd_api.g_exc_error THEN
7615: x_return_status := fnd_api.g_ret_sts_error;
7616: --Fixed bug 2342723, do not rollback to savepoint
7617: ROLLBACK TO loc_empty; --1334632
7618: -- ROLLBACK; -- 13816420 missed to comment out by 13346632
7611: INV_TRX_UTIL_PUB.TRACE('End of Procedure LOC_EMPTY_MIXED_FLAG ', 'LOC_EMPTY_MIXED_FLAG',10);
7612: END IF;
7613: EXCEPTION
7614: WHEN fnd_api.g_exc_error THEN
7615: x_return_status := fnd_api.g_ret_sts_error;
7616: --Fixed bug 2342723, do not rollback to savepoint
7617: ROLLBACK TO loc_empty; --1334632
7618: -- ROLLBACK; -- 13816420 missed to comment out by 13346632
7619: fnd_msg_pub.count_and_get
7619: fnd_msg_pub.count_and_get
7620: ( p_count => x_msg_count,
7621: p_data => x_msg_data
7622: );
7623: WHEN fnd_api.g_exc_unexpected_error THEN
7624: x_return_status := fnd_api.g_ret_sts_unexp_error ;
7625: ROLLBACK TO loc_empty; --1334632
7626: -- ROLLBACK; -- 13816420 missed to comment out by 13346632
7627: fnd_msg_pub.count_and_get
7620: ( p_count => x_msg_count,
7621: p_data => x_msg_data
7622: );
7623: WHEN fnd_api.g_exc_unexpected_error THEN
7624: x_return_status := fnd_api.g_ret_sts_unexp_error ;
7625: ROLLBACK TO loc_empty; --1334632
7626: -- ROLLBACK; -- 13816420 missed to comment out by 13346632
7627: fnd_msg_pub.count_and_get
7628: ( p_count => x_msg_count,
7628: ( p_count => x_msg_count,
7629: p_data => x_msg_data
7630: );
7631: WHEN NO_DATA_FOUND THEN
7632: x_return_status := fnd_api.g_ret_sts_error;
7633: ROLLBACK TO loc_empty; --1334632
7634: -- ROLLBACK; -- 13816420 missed to comment out by 13346632
7635: WHEN OTHERS THEN
7636: x_return_status := fnd_api.g_ret_sts_unexp_error;
7632: x_return_status := fnd_api.g_ret_sts_error;
7633: ROLLBACK TO loc_empty; --1334632
7634: -- ROLLBACK; -- 13816420 missed to comment out by 13346632
7635: WHEN OTHERS THEN
7636: x_return_status := fnd_api.g_ret_sts_unexp_error;
7637: ROLLBACK TO loc_empty; --1334632
7638: -- ROLLBACK; -- 13816420 missed to comment out by 13346632
7639: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
7640: fnd_msg_pub.add_exc_msg
7683: IF (l_debug = 1) THEN
7684: INV_TRX_UTIL_PUB.TRACE('In Procedure inv_loc_issues ','inv_loc_issues',10);
7685: END IF;
7686:
7687: x_return_status := FND_API.G_RET_STS_SUCCESS;
7688:
7689: IF P_SOURCE IS NULL THEN
7690:
7691: IF (l_debug = 1) THEN
7799: END;
7800: END IF; /* FOR P_SOURCE IS NULL*/
7801: EXCEPTION
7802: WHEN OTHERS THEN
7803: x_return_status := fnd_api.g_ret_sts_unexp_error;
7804: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
7805: fnd_msg_pub.add_exc_msg
7806: ( 'inv_loc_wms_utils'
7807: , 'inv_loc_issues'
7827: l_chk_flag number;
7828: l_subinventory_code varchar2(30); --Added variable for 3237709
7829: l_debug number := NVL(FND_PROFILE.VALUE('INV_DEBUG_TRACE'),0);
7830: BEGIN
7831: x_return_status := FND_API.G_RET_STS_SUCCESS;
7832:
7833: IF (l_debug = 1) THEN
7834: INV_TRX_UTIL_PUB.TRACE('In Procedure inv_loc_receipt ','receipts',10);
7835: END IF;
7896: x_item_id := P_INVENTORY_ITEM_ID;
7897: END;
7898: EXCEPTION
7899: WHEN OTHERS THEN
7900: x_return_status := fnd_api.g_ret_sts_unexp_error;
7901:
7902: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
7903: fnd_msg_pub.add_exc_msg
7904: ( 'inv_loc_wms_utils'
7969: l_msg_data varchar2(1000);
7970: l_msg_count number;
7971: l_debug number := NVL(FND_PROFILE.VALUE('INV_DEBUG_TRACE'),0);
7972: BEGIN
7973: x_return_status := fnd_api.g_ret_sts_success;
7974: --Fixed bug 2342723, removed savepoint
7975: -- bug 3511690 retained the savepoint
7976: savepoint lpn_loc_mmtt_upd;
7977: IF p_mixed_flag IS NOT NULL THEN
8000: p_transfer_lpn_id => l_mmtt_cur_mixed_flg.transfer_lpn_id,
8001: p_content_lpn_id => l_mmtt_cur_mixed_flg.content_lpn_id,
8002: p_quantity => l_mmtt_cur_mixed_flg.primary_quantity
8003: );
8004: IF X_RETURN_STATUS =fnd_api.g_ret_sts_error THEN
8005: IF (l_debug = 1) THEN
8006: INV_TRX_UTIL_PUB.TRACE('Loc cpty calc -Transfer case- failed with status E','LPN_LOC_CLEANUP_MMTT',10);
8007: END IF;
8008: RAISE fnd_api.g_exc_error;
8004: IF X_RETURN_STATUS =fnd_api.g_ret_sts_error THEN
8005: IF (l_debug = 1) THEN
8006: INV_TRX_UTIL_PUB.TRACE('Loc cpty calc -Transfer case- failed with status E','LPN_LOC_CLEANUP_MMTT',10);
8007: END IF;
8008: RAISE fnd_api.g_exc_error;
8009: ELSIF X_RETURN_STATUS =fnd_api.g_ret_sts_unexp_error THEN
8010: IF (l_debug = 1) THEN
8011: INV_TRX_UTIL_PUB.TRACE('Loc cpty calc-Transfer case- failed with status U','LPN_LOC_CLEANUP_MMTT',10);
8012: END IF;
8005: IF (l_debug = 1) THEN
8006: INV_TRX_UTIL_PUB.TRACE('Loc cpty calc -Transfer case- failed with status E','LPN_LOC_CLEANUP_MMTT',10);
8007: END IF;
8008: RAISE fnd_api.g_exc_error;
8009: ELSIF X_RETURN_STATUS =fnd_api.g_ret_sts_unexp_error THEN
8010: IF (l_debug = 1) THEN
8011: INV_TRX_UTIL_PUB.TRACE('Loc cpty calc-Transfer case- failed with status U','LPN_LOC_CLEANUP_MMTT',10);
8012: END IF;
8013: RAISE fnd_api.g_exc_unexpected_error;
8009: ELSIF X_RETURN_STATUS =fnd_api.g_ret_sts_unexp_error THEN
8010: IF (l_debug = 1) THEN
8011: INV_TRX_UTIL_PUB.TRACE('Loc cpty calc-Transfer case- failed with status U','LPN_LOC_CLEANUP_MMTT',10);
8012: END IF;
8013: RAISE fnd_api.g_exc_unexpected_error;
8014: END IF;
8015:
8016: INV_LOC_WMS_UTILS.LOC_EMPTY_MIXED_FLAG (
8017: X_RETURN_STATUS => l_return_status
8024: ,P_TRANSFER_ORGANIZATION => l_mmtt_cur_mixed_flg.transfer_organization
8025: ,P_TRANSFER_LOCATION_ID => l_mmtt_cur_mixed_flg.transfer_to_location
8026: ,P_SOURCE => 'CONCURRENT'
8027: );
8028: IF X_RETURN_STATUS =fnd_api.g_ret_sts_error THEN
8029: IF (l_debug = 1) THEN
8030: INV_TRX_UTIL_PUB.TRACE('LOC_EMPTY_MIXED-Transfer Case failed with status E','LPN_LOC_CLEANUP_MMTT',10);
8031: END IF;
8032: RAISE fnd_api.g_exc_error;
8028: IF X_RETURN_STATUS =fnd_api.g_ret_sts_error THEN
8029: IF (l_debug = 1) THEN
8030: INV_TRX_UTIL_PUB.TRACE('LOC_EMPTY_MIXED-Transfer Case failed with status E','LPN_LOC_CLEANUP_MMTT',10);
8031: END IF;
8032: RAISE fnd_api.g_exc_error;
8033: ELSIF X_RETURN_STATUS =fnd_api.g_ret_sts_unexp_error THEN
8034: IF (l_debug = 1) THEN
8035: INV_TRX_UTIL_PUB.TRACE('LOC_EMPTY_MIXED-Transfer case failed with status U','LPN_LOC_CLEANUP_MMTT',10);
8036: END IF;
8029: IF (l_debug = 1) THEN
8030: INV_TRX_UTIL_PUB.TRACE('LOC_EMPTY_MIXED-Transfer Case failed with status E','LPN_LOC_CLEANUP_MMTT',10);
8031: END IF;
8032: RAISE fnd_api.g_exc_error;
8033: ELSIF X_RETURN_STATUS =fnd_api.g_ret_sts_unexp_error THEN
8034: IF (l_debug = 1) THEN
8035: INV_TRX_UTIL_PUB.TRACE('LOC_EMPTY_MIXED-Transfer case failed with status U','LPN_LOC_CLEANUP_MMTT',10);
8036: END IF;
8037: RAISE fnd_api.g_exc_unexpected_error;
8033: ELSIF X_RETURN_STATUS =fnd_api.g_ret_sts_unexp_error THEN
8034: IF (l_debug = 1) THEN
8035: INV_TRX_UTIL_PUB.TRACE('LOC_EMPTY_MIXED-Transfer case failed with status U','LPN_LOC_CLEANUP_MMTT',10);
8036: END IF;
8037: RAISE fnd_api.g_exc_unexpected_error;
8038: END IF;
8039:
8040: ELSE /* For transaction_action_id not in (2,3,28) */
8041: INV_LOC_WMS_UTILS.upd_lpn_loc_curr_cpty_nauto(x_return_status => l_return_status,
8051: p_transfer_lpn_id => l_mmtt_cur_mixed_flg.transfer_lpn_id,
8052: p_content_lpn_id => l_mmtt_cur_mixed_flg.content_lpn_id,
8053: p_quantity => l_mmtt_cur_mixed_flg.primary_quantity
8054: );
8055: IF X_RETURN_STATUS =fnd_api.g_ret_sts_error THEN
8056: IF (l_debug = 1) THEN
8057: INV_TRX_UTIL_PUB.TRACE('Loc cpty calc - failed with status E','LPN_LOC_CLEANUP_MMTT',10);
8058: END IF;
8059: RAISE fnd_api.g_exc_error;
8055: IF X_RETURN_STATUS =fnd_api.g_ret_sts_error THEN
8056: IF (l_debug = 1) THEN
8057: INV_TRX_UTIL_PUB.TRACE('Loc cpty calc - failed with status E','LPN_LOC_CLEANUP_MMTT',10);
8058: END IF;
8059: RAISE fnd_api.g_exc_error;
8060: ELSIF X_RETURN_STATUS =fnd_api.g_ret_sts_unexp_error THEN
8061: IF (l_debug = 1) THEN
8062: INV_TRX_UTIL_PUB.TRACE('Loc cpty calc - failed with status U','LPN_LOC_CLEANUP_MMTT',10);
8063: END IF;
8056: IF (l_debug = 1) THEN
8057: INV_TRX_UTIL_PUB.TRACE('Loc cpty calc - failed with status E','LPN_LOC_CLEANUP_MMTT',10);
8058: END IF;
8059: RAISE fnd_api.g_exc_error;
8060: ELSIF X_RETURN_STATUS =fnd_api.g_ret_sts_unexp_error THEN
8061: IF (l_debug = 1) THEN
8062: INV_TRX_UTIL_PUB.TRACE('Loc cpty calc - failed with status U','LPN_LOC_CLEANUP_MMTT',10);
8063: END IF;
8064: RAISE fnd_api.g_exc_unexpected_error;
8060: ELSIF X_RETURN_STATUS =fnd_api.g_ret_sts_unexp_error THEN
8061: IF (l_debug = 1) THEN
8062: INV_TRX_UTIL_PUB.TRACE('Loc cpty calc - failed with status U','LPN_LOC_CLEANUP_MMTT',10);
8063: END IF;
8064: RAISE fnd_api.g_exc_unexpected_error;
8065: END IF;
8066:
8067: INV_LOC_WMS_UTILS.LOC_EMPTY_MIXED_FLAG (
8068: X_RETURN_STATUS => l_return_status
8075: ,P_TRANSFER_ORGANIZATION => NULL
8076: ,P_TRANSFER_LOCATION_ID => NULL
8077: ,P_SOURCE => 'CONCURRENT'
8078: );
8079: IF X_RETURN_STATUS =fnd_api.g_ret_sts_error THEN
8080: IF (l_debug = 1) THEN
8081: INV_TRX_UTIL_PUB.TRACE('LOC_EMPTY_MIXED failed with status E','LPN_LOC_CLEANUP_MMTT',10);
8082: END IF;
8083: RAISE fnd_api.g_exc_error;
8079: IF X_RETURN_STATUS =fnd_api.g_ret_sts_error THEN
8080: IF (l_debug = 1) THEN
8081: INV_TRX_UTIL_PUB.TRACE('LOC_EMPTY_MIXED failed with status E','LPN_LOC_CLEANUP_MMTT',10);
8082: END IF;
8083: RAISE fnd_api.g_exc_error;
8084: ELSIF X_RETURN_STATUS =fnd_api.g_ret_sts_unexp_error THEN
8085: IF (l_debug = 1) THEN
8086: INV_TRX_UTIL_PUB.TRACE('LOC_EMPTY_MIXED failed with status U','LPN_LOC_CLEANUP_MMTT',10);
8087: END IF;
8080: IF (l_debug = 1) THEN
8081: INV_TRX_UTIL_PUB.TRACE('LOC_EMPTY_MIXED failed with status E','LPN_LOC_CLEANUP_MMTT',10);
8082: END IF;
8083: RAISE fnd_api.g_exc_error;
8084: ELSIF X_RETURN_STATUS =fnd_api.g_ret_sts_unexp_error THEN
8085: IF (l_debug = 1) THEN
8086: INV_TRX_UTIL_PUB.TRACE('LOC_EMPTY_MIXED failed with status U','LPN_LOC_CLEANUP_MMTT',10);
8087: END IF;
8088: RAISE fnd_api.g_exc_unexpected_error;
8084: ELSIF X_RETURN_STATUS =fnd_api.g_ret_sts_unexp_error THEN
8085: IF (l_debug = 1) THEN
8086: INV_TRX_UTIL_PUB.TRACE('LOC_EMPTY_MIXED failed with status U','LPN_LOC_CLEANUP_MMTT',10);
8087: END IF;
8088: RAISE fnd_api.g_exc_unexpected_error;
8089: END IF;
8090:
8091: END IF;
8092: END LOOP;
8117: p_transfer_lpn_id => l_mmtt_cur.transfer_lpn_id,
8118: p_content_lpn_id => l_mmtt_cur.content_lpn_id,
8119: p_quantity => l_mmtt_cur.primary_quantity
8120: );
8121: IF X_RETURN_STATUS =fnd_api.g_ret_sts_error THEN
8122: IF (l_debug = 1) THEN
8123: INV_TRX_UTIL_PUB.TRACE('Loc cpty calc -Transfer case- failed with status E','LPN_LOC_CLEANUP_MMTT',10);
8124: END IF;
8125: RAISE fnd_api.g_exc_error;
8121: IF X_RETURN_STATUS =fnd_api.g_ret_sts_error THEN
8122: IF (l_debug = 1) THEN
8123: INV_TRX_UTIL_PUB.TRACE('Loc cpty calc -Transfer case- failed with status E','LPN_LOC_CLEANUP_MMTT',10);
8124: END IF;
8125: RAISE fnd_api.g_exc_error;
8126: ELSIF X_RETURN_STATUS =fnd_api.g_ret_sts_unexp_error THEN
8127: IF (l_debug = 1) THEN
8128: INV_TRX_UTIL_PUB.TRACE('Loc cpty calc -Transfer case- failed with status U','LPN_LOC_CLEANUP_MMTT',10);
8129: END IF;
8122: IF (l_debug = 1) THEN
8123: INV_TRX_UTIL_PUB.TRACE('Loc cpty calc -Transfer case- failed with status E','LPN_LOC_CLEANUP_MMTT',10);
8124: END IF;
8125: RAISE fnd_api.g_exc_error;
8126: ELSIF X_RETURN_STATUS =fnd_api.g_ret_sts_unexp_error THEN
8127: IF (l_debug = 1) THEN
8128: INV_TRX_UTIL_PUB.TRACE('Loc cpty calc -Transfer case- failed with status U','LPN_LOC_CLEANUP_MMTT',10);
8129: END IF;
8130: RAISE fnd_api.g_exc_unexpected_error;
8126: ELSIF X_RETURN_STATUS =fnd_api.g_ret_sts_unexp_error THEN
8127: IF (l_debug = 1) THEN
8128: INV_TRX_UTIL_PUB.TRACE('Loc cpty calc -Transfer case- failed with status U','LPN_LOC_CLEANUP_MMTT',10);
8129: END IF;
8130: RAISE fnd_api.g_exc_unexpected_error;
8131: END IF;
8132:
8133: INV_LOC_WMS_UTILS.LOC_EMPTY_MIXED_FLAG (
8134: X_RETURN_STATUS => l_return_status
8141: ,P_TRANSFER_ORGANIZATION => l_mmtt_cur.transfer_organization
8142: ,P_TRANSFER_LOCATION_ID => l_mmtt_cur.transfer_to_location
8143: ,P_SOURCE => 'CONCURRENT'
8144: );
8145: IF X_RETURN_STATUS =fnd_api.g_ret_sts_error THEN
8146: IF (l_debug = 1) THEN
8147: INV_TRX_UTIL_PUB.TRACE('LOC_EMPTY_MIXED-Transfer Case failed with status E','LPN_LOC_CLEANUP_MMTT',10);
8148: END IF;
8149: RAISE fnd_api.g_exc_error;
8145: IF X_RETURN_STATUS =fnd_api.g_ret_sts_error THEN
8146: IF (l_debug = 1) THEN
8147: INV_TRX_UTIL_PUB.TRACE('LOC_EMPTY_MIXED-Transfer Case failed with status E','LPN_LOC_CLEANUP_MMTT',10);
8148: END IF;
8149: RAISE fnd_api.g_exc_error;
8150: ELSIF X_RETURN_STATUS =fnd_api.g_ret_sts_unexp_error THEN
8151: IF (l_debug = 1) THEN
8152: INV_TRX_UTIL_PUB.TRACE('LOC_EMPTY_MIXED-Transfer Case failed with status U','LPN_LOC_CLEANUP_MMTT',10);
8153: END IF;
8146: IF (l_debug = 1) THEN
8147: INV_TRX_UTIL_PUB.TRACE('LOC_EMPTY_MIXED-Transfer Case failed with status E','LPN_LOC_CLEANUP_MMTT',10);
8148: END IF;
8149: RAISE fnd_api.g_exc_error;
8150: ELSIF X_RETURN_STATUS =fnd_api.g_ret_sts_unexp_error THEN
8151: IF (l_debug = 1) THEN
8152: INV_TRX_UTIL_PUB.TRACE('LOC_EMPTY_MIXED-Transfer Case failed with status U','LPN_LOC_CLEANUP_MMTT',10);
8153: END IF;
8154: RAISE fnd_api.g_exc_unexpected_error;
8150: ELSIF X_RETURN_STATUS =fnd_api.g_ret_sts_unexp_error THEN
8151: IF (l_debug = 1) THEN
8152: INV_TRX_UTIL_PUB.TRACE('LOC_EMPTY_MIXED-Transfer Case failed with status U','LPN_LOC_CLEANUP_MMTT',10);
8153: END IF;
8154: RAISE fnd_api.g_exc_unexpected_error;
8155: END IF;
8156:
8157: ELSE /* For transaction_action_id not in (2,3,28) */
8158: INV_LOC_WMS_UTILS.upd_lpn_loc_curr_cpty_nauto(x_return_status => l_return_status,
8168: p_transfer_lpn_id => l_mmtt_cur.transfer_lpn_id,
8169: p_content_lpn_id => l_mmtt_cur.content_lpn_id,
8170: p_quantity => l_mmtt_cur.primary_quantity
8171: );
8172: IF X_RETURN_STATUS =fnd_api.g_ret_sts_error THEN
8173: IF (l_debug = 1) THEN
8174: INV_TRX_UTIL_PUB.TRACE('Loc cpty calc - failed with status E','LPN_LOC_CLEANUP_MMTT',10);
8175: END IF;
8176: RAISE fnd_api.g_exc_error;
8172: IF X_RETURN_STATUS =fnd_api.g_ret_sts_error THEN
8173: IF (l_debug = 1) THEN
8174: INV_TRX_UTIL_PUB.TRACE('Loc cpty calc - failed with status E','LPN_LOC_CLEANUP_MMTT',10);
8175: END IF;
8176: RAISE fnd_api.g_exc_error;
8177: ELSIF X_RETURN_STATUS =fnd_api.g_ret_sts_unexp_error THEN
8178: IF (l_debug = 1) THEN
8179: INV_TRX_UTIL_PUB.TRACE('Loc cpty calc - failed with status U','LPN_LOC_CLEANUP_MMTT',10);
8180: END IF;
8173: IF (l_debug = 1) THEN
8174: INV_TRX_UTIL_PUB.TRACE('Loc cpty calc - failed with status E','LPN_LOC_CLEANUP_MMTT',10);
8175: END IF;
8176: RAISE fnd_api.g_exc_error;
8177: ELSIF X_RETURN_STATUS =fnd_api.g_ret_sts_unexp_error THEN
8178: IF (l_debug = 1) THEN
8179: INV_TRX_UTIL_PUB.TRACE('Loc cpty calc - failed with status U','LPN_LOC_CLEANUP_MMTT',10);
8180: END IF;
8181: RAISE fnd_api.g_exc_unexpected_error;
8177: ELSIF X_RETURN_STATUS =fnd_api.g_ret_sts_unexp_error THEN
8178: IF (l_debug = 1) THEN
8179: INV_TRX_UTIL_PUB.TRACE('Loc cpty calc - failed with status U','LPN_LOC_CLEANUP_MMTT',10);
8180: END IF;
8181: RAISE fnd_api.g_exc_unexpected_error;
8182: END IF;
8183:
8184: INV_LOC_WMS_UTILS.LOC_EMPTY_MIXED_FLAG (
8185: X_RETURN_STATUS => l_return_status
8192: ,P_TRANSFER_ORGANIZATION => NULL
8193: ,P_TRANSFER_LOCATION_ID => NULL
8194: ,P_SOURCE => 'CONCURRENT'
8195: );
8196: IF X_RETURN_STATUS =fnd_api.g_ret_sts_error THEN
8197: IF (l_debug = 1) THEN
8198: INV_TRX_UTIL_PUB.TRACE('LOC_EMPTY_MIXED failed with Return status E','LPN_LOC_CLEANUP_MMTT',10);
8199: END IF;
8200: RAISE fnd_api.g_exc_error;
8196: IF X_RETURN_STATUS =fnd_api.g_ret_sts_error THEN
8197: IF (l_debug = 1) THEN
8198: INV_TRX_UTIL_PUB.TRACE('LOC_EMPTY_MIXED failed with Return status E','LPN_LOC_CLEANUP_MMTT',10);
8199: END IF;
8200: RAISE fnd_api.g_exc_error;
8201: ELSIF X_RETURN_STATUS =fnd_api.g_ret_sts_unexp_error THEN
8202: RAISE fnd_api.g_exc_unexpected_error;
8203: IF (l_debug = 1) THEN
8204: INV_TRX_UTIL_PUB.TRACE('LOC_EMPTY_MIXED failed with Return status U','LPN_LOC_CLEANUP_MMTT',10);
8197: IF (l_debug = 1) THEN
8198: INV_TRX_UTIL_PUB.TRACE('LOC_EMPTY_MIXED failed with Return status E','LPN_LOC_CLEANUP_MMTT',10);
8199: END IF;
8200: RAISE fnd_api.g_exc_error;
8201: ELSIF X_RETURN_STATUS =fnd_api.g_ret_sts_unexp_error THEN
8202: RAISE fnd_api.g_exc_unexpected_error;
8203: IF (l_debug = 1) THEN
8204: INV_TRX_UTIL_PUB.TRACE('LOC_EMPTY_MIXED failed with Return status U','LPN_LOC_CLEANUP_MMTT',10);
8205: END IF;
8198: INV_TRX_UTIL_PUB.TRACE('LOC_EMPTY_MIXED failed with Return status E','LPN_LOC_CLEANUP_MMTT',10);
8199: END IF;
8200: RAISE fnd_api.g_exc_error;
8201: ELSIF X_RETURN_STATUS =fnd_api.g_ret_sts_unexp_error THEN
8202: RAISE fnd_api.g_exc_unexpected_error;
8203: IF (l_debug = 1) THEN
8204: INV_TRX_UTIL_PUB.TRACE('LOC_EMPTY_MIXED failed with Return status U','LPN_LOC_CLEANUP_MMTT',10);
8205: END IF;
8206: END IF;
8212: END IF;
8213: END IF;
8214: EXCEPTION
8215:
8216: WHEN fnd_api.g_exc_error THEN
8217: IF mmtt_cur_mixed_flg%ISOPEN then
8218: close mmtt_cur_mixed_flg;
8219: end if;
8220: IF mmtt_cur%isopen then
8222: end if;
8223: --Fixed bug 2342723
8224: rollback to lpn_loc_mmtt_upd;
8225: --rollback;
8226: x_return_status := fnd_api.g_ret_sts_error;
8227: fnd_msg_pub.count_and_get
8228: ( p_count => x_msg_count,
8229: p_data => x_msg_data
8230: );
8228: ( p_count => x_msg_count,
8229: p_data => x_msg_data
8230: );
8231:
8232: WHEN fnd_api.g_exc_unexpected_error THEN
8233: IF mmtt_cur_mixed_flg%ISOPEN then
8234: close mmtt_cur_mixed_flg;
8235: end if;
8236: IF mmtt_cur%isopen then
8235: end if;
8236: IF mmtt_cur%isopen then
8237: close mmtt_cur;
8238: end if;
8239: x_return_status := fnd_api.g_ret_sts_unexp_error ;
8240: rollback to lpn_loc_mmtt_upd;
8241: --rollback;
8242: fnd_msg_pub.count_and_get
8243: ( p_count => x_msg_count,
8250: end if;
8251: IF mmtt_cur%isopen then
8252: close mmtt_cur;
8253: end if;
8254: x_return_status := fnd_api.g_ret_sts_error;
8255: rollback to lpn_loc_mmtt_upd;
8256: --rollback;
8257:
8258: WHEN OTHERS THEN
8261: end if;
8262: IF mmtt_cur%isopen then
8263: close mmtt_cur;
8264: end if;
8265: x_return_status := fnd_api.g_ret_sts_unexp_error;
8266: rollback to lpn_loc_mmtt_upd;
8267: --rollback;
8268: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error)
8269: THEN
8364: BEGIN
8365: IF (l_debug = 1) THEN
8366: INV_TRX_UTIL_PUB.TRACE('In LPN_LOC_CURRENT_CAPACITY Procedure ','LPN_LOC_CURRENT_CAPACITY',9);
8367: END IF;
8368: x_return_status := fnd_api.g_ret_sts_success;
8369: --Fixed bug 2342723, romoved the savepoint
8370: -- Bug 3511690 savepoint retained
8371: savepoint lpn_loc_cpty_upd;
8372: IF p_mixed_flag IS NOT NULL THEN
8500: end loop;
8501: close current_cpty;
8502: END IF;
8503: EXCEPTION
8504: WHEN fnd_api.g_exc_error THEN
8505: IF current_cpty%ISOPEN then
8506: close current_cpty;
8507: end if;
8508: IF curr_cpty_mixed_flg%isopen then
8510: end if;
8511: -- Fixed bug 2342723, do not rollback to savepoint
8512: rollback to lpn_loc_cpty_upd;
8513: --rollback;
8514: x_return_status := fnd_api.g_ret_sts_error;
8515: fnd_msg_pub.count_and_get
8516: ( p_count => x_msg_count,
8517: p_data => x_msg_data
8518: );
8516: ( p_count => x_msg_count,
8517: p_data => x_msg_data
8518: );
8519:
8520: WHEN fnd_api.g_exc_unexpected_error THEN
8521: IF current_cpty%ISOPEN then
8522: close current_cpty;
8523: end if;
8524: IF curr_cpty_mixed_flg%isopen then
8523: end if;
8524: IF curr_cpty_mixed_flg%isopen then
8525: close curr_cpty_mixed_flg;
8526: end if;
8527: x_return_status := fnd_api.g_ret_sts_unexp_error ;
8528: rollback to lpn_loc_cpty_upd;
8529: --rollback;
8530: fnd_msg_pub.count_and_get
8531: ( p_count => x_msg_count,
8538: end if;
8539: IF curr_cpty_mixed_flg%isopen then
8540: close curr_cpty_mixed_flg;
8541: end if;
8542: x_return_status := fnd_api.g_ret_sts_error;
8543: rollback to lpn_loc_cpty_upd;
8544: --rollback;
8545:
8546: WHEN OTHERS THEN
8549: end if;
8550: IF curr_cpty_mixed_flg%isopen then
8551: close curr_cpty_mixed_flg;
8552: end if;
8553: x_return_status := fnd_api.g_ret_sts_unexp_error;
8554: rollback to lpn_loc_cpty_upd;
8555: --rollback;
8556: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error)
8557: THEN
8584: l_physical_locator_id NUMBER := NULL;
8585: l_locator_id NUMBER;
8586: l_debug number := NVL(FND_PROFILE.VALUE('INV_DEBUG_TRACE'),0);
8587: BEGIN
8588: x_return_status := FND_API.G_RET_STS_SUCCESS;
8589:
8590: l_locator_id := p_locator_id;
8591:
8592: IF (l_debug = 1) THEN
8668:
8669: EXCEPTION
8670: WHEN OTHERS THEN
8671: rollback; --9824620
8672: x_return_status := fnd_api.g_ret_sts_unexp_error;
8673:
8674: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
8675: fnd_msg_pub.add_exc_msg
8676: ( 'inv_loc_wms_utils'