226: l_lpn_bulk_rec WMS_CONTAINER_PVT.LPNBulkRecType;
227:
228: -- Validation Parameters
229: l_quantity NUMBER;
230: l_org inv_validate.org;
231: l_container_item inv_validate.item;
232: l_lpn lpn;
233: l_sub inv_validate.sub;
234: l_locator inv_validate.LOCATOR;
227:
228: -- Validation Parameters
229: l_quantity NUMBER;
230: l_org inv_validate.org;
231: l_container_item inv_validate.item;
232: l_lpn lpn;
233: l_sub inv_validate.sub;
234: l_locator inv_validate.LOCATOR;
235: l_lot inv_validate.lot;
229: l_quantity NUMBER;
230: l_org inv_validate.org;
231: l_container_item inv_validate.item;
232: l_lpn lpn;
233: l_sub inv_validate.sub;
234: l_locator inv_validate.LOCATOR;
235: l_lot inv_validate.lot;
236: l_serial inv_validate.serial;
237: l_current_serial VARCHAR2(30) := p_from_serial_number;
230: l_org inv_validate.org;
231: l_container_item inv_validate.item;
232: l_lpn lpn;
233: l_sub inv_validate.sub;
234: l_locator inv_validate.LOCATOR;
235: l_lot inv_validate.lot;
236: l_serial inv_validate.serial;
237: l_current_serial VARCHAR2(30) := p_from_serial_number;
238: l_prefix VARCHAR2(30);
231: l_container_item inv_validate.item;
232: l_lpn lpn;
233: l_sub inv_validate.sub;
234: l_locator inv_validate.LOCATOR;
235: l_lot inv_validate.lot;
236: l_serial inv_validate.serial;
237: l_current_serial VARCHAR2(30) := p_from_serial_number;
238: l_prefix VARCHAR2(30);
239: l_quantity_serial NUMBER;
232: l_lpn lpn;
233: l_sub inv_validate.sub;
234: l_locator inv_validate.LOCATOR;
235: l_lot inv_validate.lot;
236: l_serial inv_validate.serial;
237: l_current_serial VARCHAR2(30) := p_from_serial_number;
238: l_prefix VARCHAR2(30);
239: l_quantity_serial NUMBER;
240: l_from_number NUMBER;
290:
291: IF (p_validation_level = fnd_api.g_valid_level_full) THEN
292: l_progress := 'Validate Organization ID';
293: l_org.organization_id := p_organization_id;
294: l_result := inv_validate.ORGANIZATION(l_org);
295:
296: IF (l_result = inv_validate.f) THEN
297: IF (l_debug = 1) THEN
298: mdebug(p_organization_id || ' is not a valid org id', G_ERROR);
292: l_progress := 'Validate Organization ID';
293: l_org.organization_id := p_organization_id;
294: l_result := inv_validate.ORGANIZATION(l_org);
295:
296: IF (l_result = inv_validate.f) THEN
297: IF (l_debug = 1) THEN
298: mdebug(p_organization_id || ' is not a valid org id', G_ERROR);
299: END IF;
300: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_ORG');
304:
305: l_progress := 'Validate Container Item';
306: IF (p_container_item_id IS NOT NULL) THEN
307: l_container_item.inventory_item_id := p_container_item_id;
308: l_result := inv_validate.inventory_item(l_container_item, l_org);
309:
310: IF (l_result = inv_validate.f) THEN
311: IF (l_debug = 1) THEN
312: mdebug(p_container_item_id || ' is not a valid container item id', 1);
306: IF (p_container_item_id IS NOT NULL) THEN
307: l_container_item.inventory_item_id := p_container_item_id;
308: l_result := inv_validate.inventory_item(l_container_item, l_org);
309:
310: IF (l_result = inv_validate.f) THEN
311: IF (l_debug = 1) THEN
312: mdebug(p_container_item_id || ' is not a valid container item id', 1);
313: END IF;
314: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_ITEM');
328:
329: l_progress := 'Validate Subinventory';
330: IF (p_subinventory IS NOT NULL) THEN
331: l_sub.secondary_inventory_name := p_subinventory;
332: l_result := inv_validate.subinventory(l_sub, l_org);
333:
334: IF (l_result = inv_validate.f) THEN
335: IF (l_debug = 1) THEN
336: mdebug(p_subinventory || ' is not a valid sub', 1);
330: IF (p_subinventory IS NOT NULL) THEN
331: l_sub.secondary_inventory_name := p_subinventory;
332: l_result := inv_validate.subinventory(l_sub, l_org);
333:
334: IF (l_result = inv_validate.f) THEN
335: IF (l_debug = 1) THEN
336: mdebug(p_subinventory || ' is not a valid sub', 1);
337: END IF;
338: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_SUB');
353: RAISE fnd_api.g_exc_error;
354: END IF;
355:
356: l_locator.inventory_location_id := p_locator_id;
357: l_result := inv_validate.validatelocator(l_locator, l_org, l_sub);
358:
359: IF (l_result = inv_validate.f) THEN
360: IF (l_debug = 1) THEN
361: mdebug(p_locator_id || ' is not a valid loc id', 1);
355:
356: l_locator.inventory_location_id := p_locator_id;
357: l_result := inv_validate.validatelocator(l_locator, l_org, l_sub);
358:
359: IF (l_result = inv_validate.f) THEN
360: IF (l_debug = 1) THEN
361: mdebug(p_locator_id || ' is not a valid loc id', 1);
362: END IF;
363: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_LOC');
370: l_progress := 'Validate Revision';
371: IF (p_container_item_id IS NOT NULL) THEN
372: IF (l_container_item.revision_qty_control_code = 2) THEN
373: IF (p_revision IS NOT NULL) THEN
374: l_result := inv_validate.revision(p_revision, l_org, l_container_item);
375:
376: IF (l_result = inv_validate.f) THEN
377: IF (l_debug = 1) THEN
378: mdebug(p_revision || ' is not a valid rev', 1);
372: IF (l_container_item.revision_qty_control_code = 2) THEN
373: IF (p_revision IS NOT NULL) THEN
374: l_result := inv_validate.revision(p_revision, l_org, l_container_item);
375:
376: IF (l_result = inv_validate.f) THEN
377: IF (l_debug = 1) THEN
378: mdebug(p_revision || ' is not a valid rev', 1);
379: END IF;
380: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_REV');
397: IF (p_container_item_id IS NOT NULL) THEN
398: IF (l_container_item.lot_control_code = 2) THEN
399: IF (p_lot_number IS NOT NULL) THEN
400: l_lot.lot_number := p_lot_number;
401: l_result := inv_validate.lot_number(l_lot, l_org, l_container_item, l_sub, l_locator, p_revision);
402:
403: IF (l_result = inv_validate.f) THEN
404: IF (l_debug = 1) THEN
405: mdebug(p_lot_number || ' is not a valid lot', 1);
399: IF (p_lot_number IS NOT NULL) THEN
400: l_lot.lot_number := p_lot_number;
401: l_result := inv_validate.lot_number(l_lot, l_org, l_container_item, l_sub, l_locator, p_revision);
402:
403: IF (l_result = inv_validate.f) THEN
404: IF (l_debug = 1) THEN
405: mdebug(p_lot_number || ' is not a valid lot', 1);
406: END IF;
407: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_LOT');
456:
457: LOOP
458: IF (p_subinventory IS NOT NULL) THEN
459: l_serial.serial_number := l_current_serial;
460: l_result := inv_validate.validate_serial(l_serial, l_org, l_container_item, l_sub, l_lot, l_locator, p_revision);
461:
462: IF (l_result = inv_validate.f) THEN
463: IF (l_debug = 1) THEN
464: mdebug(l_current_serial || 'failed validate_serial', 1);
458: IF (p_subinventory IS NOT NULL) THEN
459: l_serial.serial_number := l_current_serial;
460: l_result := inv_validate.validate_serial(l_serial, l_org, l_container_item, l_sub, l_lot, l_locator, p_revision);
461:
462: IF (l_result = inv_validate.f) THEN
463: IF (l_debug = 1) THEN
464: mdebug(l_current_serial || 'failed validate_serial', 1);
465: END IF;
466: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_SER');
541: END IF;
542:
543: l_progress := 'Validate Cost Group';
544: IF (p_cost_group_id IS NOT NULL) THEN
545: l_result := inv_validate.cost_group(p_cost_group_id, p_organization_id);
546:
547: IF (l_result = inv_validate.f) THEN
548: IF (l_debug = 1) THEN
549: mdebug(p_cost_group_id || ' is an invalid cost group id', 1);
543: l_progress := 'Validate Cost Group';
544: IF (p_cost_group_id IS NOT NULL) THEN
545: l_result := inv_validate.cost_group(p_cost_group_id, p_organization_id);
546:
547: IF (l_result = inv_validate.f) THEN
548: IF (l_debug = 1) THEN
549: mdebug(p_cost_group_id || ' is an invalid cost group id', 1);
550: END IF;
551: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_CST_GRP');
662: ) IS
663: l_api_name CONSTANT VARCHAR2(30) := 'Associate_LPN';
664: l_api_version CONSTANT NUMBER := 1.0;
665: l_lpn lpn;
666: l_container_item inv_validate.item;
667: l_org inv_validate.org;
668: l_sub inv_validate.sub;
669: l_locator inv_validate.LOCATOR;
670: l_lot inv_validate.lot;
663: l_api_name CONSTANT VARCHAR2(30) := 'Associate_LPN';
664: l_api_version CONSTANT NUMBER := 1.0;
665: l_lpn lpn;
666: l_container_item inv_validate.item;
667: l_org inv_validate.org;
668: l_sub inv_validate.sub;
669: l_locator inv_validate.LOCATOR;
670: l_lot inv_validate.lot;
671: l_serial inv_validate.serial;
664: l_api_version CONSTANT NUMBER := 1.0;
665: l_lpn lpn;
666: l_container_item inv_validate.item;
667: l_org inv_validate.org;
668: l_sub inv_validate.sub;
669: l_locator inv_validate.LOCATOR;
670: l_lot inv_validate.lot;
671: l_serial inv_validate.serial;
672: l_result NUMBER;
665: l_lpn lpn;
666: l_container_item inv_validate.item;
667: l_org inv_validate.org;
668: l_sub inv_validate.sub;
669: l_locator inv_validate.LOCATOR;
670: l_lot inv_validate.lot;
671: l_serial inv_validate.serial;
672: l_result NUMBER;
673: l_new_lpn_id NUMBER;
666: l_container_item inv_validate.item;
667: l_org inv_validate.org;
668: l_sub inv_validate.sub;
669: l_locator inv_validate.LOCATOR;
670: l_lot inv_validate.lot;
671: l_serial inv_validate.serial;
672: l_result NUMBER;
673: l_new_lpn_id NUMBER;
674: l_new_lpn VARCHAR2(30);
667: l_org inv_validate.org;
668: l_sub inv_validate.sub;
669: l_locator inv_validate.LOCATOR;
670: l_lot inv_validate.lot;
671: l_serial inv_validate.serial;
672: l_result NUMBER;
673: l_new_lpn_id NUMBER;
674: l_new_lpn VARCHAR2(30);
675: l_insert_update_flag VARCHAR2(1); -- flag to signal existing lpn or new one
718: l_lpn.lpn_id := p_lpn_id;
719: l_lpn.license_plate_number := NULL;
720: l_result := validate_lpn(l_lpn);
721:
722: IF (l_result = inv_validate.f) THEN
723: l_new_lpn_id := p_lpn_id;
724: l_insert_update_flag := 'i';
725: ELSE
726: l_insert_update_flag := 'u';
727: END IF;
728:
729: /* Validate Organization ID */
730: l_org.organization_id := p_organization_id;
731: l_result := inv_validate.ORGANIZATION(l_org);
732:
733: IF (l_result = inv_validate.f) THEN
734: IF (l_debug = 1) THEN
735: mdebug(p_organization_id || ' is an invalid org id', 1);
729: /* Validate Organization ID */
730: l_org.organization_id := p_organization_id;
731: l_result := inv_validate.ORGANIZATION(l_org);
732:
733: IF (l_result = inv_validate.f) THEN
734: IF (l_debug = 1) THEN
735: mdebug(p_organization_id || ' is an invalid org id', 1);
736: END IF;
737: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_ORG');
741:
742: /* Validate Subinventory */
743: IF (p_subinventory IS NOT NULL) THEN
744: l_sub.secondary_inventory_name := p_subinventory;
745: l_result := inv_validate.subinventory(l_sub, l_org);
746:
747: IF (l_result = inv_validate.f) THEN
748: IF (l_debug = 1) THEN
749: mdebug(p_subinventory || ' is an invalid sub', 1);
743: IF (p_subinventory IS NOT NULL) THEN
744: l_sub.secondary_inventory_name := p_subinventory;
745: l_result := inv_validate.subinventory(l_sub, l_org);
746:
747: IF (l_result = inv_validate.f) THEN
748: IF (l_debug = 1) THEN
749: mdebug(p_subinventory || ' is an invalid sub', 1);
750: END IF;
751: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_SUB');
763: RAISE fnd_api.g_exc_error;
764: END IF;
765:
766: l_locator.inventory_location_id := p_locator_id;
767: l_result := inv_validate.validatelocator(l_locator, l_org, l_sub);
768:
769: IF (l_result = inv_validate.f) THEN
770: IF (l_debug = 1) THEN
771: mdebug(p_locator_id || ' is an invalid loc id', 1);
765:
766: l_locator.inventory_location_id := p_locator_id;
767: l_result := inv_validate.validatelocator(l_locator, l_org, l_sub);
768:
769: IF (l_result = inv_validate.f) THEN
770: IF (l_debug = 1) THEN
771: mdebug(p_locator_id || ' is an invalid loc id', 1);
772: END IF;
773: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_LOC');
780: /* Validate Container Item */
781: /* Validate Container Item */
782: IF (p_container_item_id IS NOT NULL) THEN
783: l_container_item.inventory_item_id := p_container_item_id;
784: l_result := inv_validate.inventory_item(l_container_item, l_org);
785:
786: IF (l_result = inv_validate.f) THEN
787: IF (l_debug = 1) THEN
788: mdebug(p_container_item_id || ' is an invalid container item id', 1);
782: IF (p_container_item_id IS NOT NULL) THEN
783: l_container_item.inventory_item_id := p_container_item_id;
784: l_result := inv_validate.inventory_item(l_container_item, l_org);
785:
786: IF (l_result = inv_validate.f) THEN
787: IF (l_debug = 1) THEN
788: mdebug(p_container_item_id || ' is an invalid container item id', 1);
789: END IF;
790: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_ITEM');
828: /* Validate Revision */
829: IF (p_container_item_id IS NOT NULL) THEN
830: IF (l_container_item.revision_qty_control_code = 2) THEN
831: IF (p_revision IS NOT NULL) THEN
832: l_result := inv_validate.revision(p_revision, l_org, l_container_item);
833:
834: IF (l_result = inv_validate.f) THEN
835: IF (l_debug = 1) THEN
836: mdebug(p_revision || ' is an invalid rev', 1);
830: IF (l_container_item.revision_qty_control_code = 2) THEN
831: IF (p_revision IS NOT NULL) THEN
832: l_result := inv_validate.revision(p_revision, l_org, l_container_item);
833:
834: IF (l_result = inv_validate.f) THEN
835: IF (l_debug = 1) THEN
836: mdebug(p_revision || ' is an invalid rev', 1);
837: END IF;
838: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_REV');
855: IF (p_container_item_id IS NOT NULL) THEN
856: IF (l_container_item.lot_control_code = 2) THEN
857: IF (p_lot_number IS NOT NULL) THEN
858: l_lot.lot_number := p_lot_number;
859: l_result := inv_validate.lot_number(l_lot, l_org, l_container_item, l_sub, l_locator, p_revision);
860:
861: IF (l_result = inv_validate.f) THEN
862: IF (l_debug = 1) THEN
863: mdebug(p_lot_number || ' is not a valid lot', 1);
857: IF (p_lot_number IS NOT NULL) THEN
858: l_lot.lot_number := p_lot_number;
859: l_result := inv_validate.lot_number(l_lot, l_org, l_container_item, l_sub, l_locator, p_revision);
860:
861: IF (l_result = inv_validate.f) THEN
862: IF (l_debug = 1) THEN
863: mdebug(p_lot_number || ' is not a valid lot', 1);
864: END IF;
865: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_LOT');
882: IF (p_container_item_id IS NOT NULL) THEN
883: IF (l_container_item.serial_number_control_code <> 1) THEN
884: IF (p_serial_number IS NOT NULL) THEN
885: l_serial.serial_number := p_serial_number;
886: l_result := inv_validate.validate_serial(l_serial, l_org, l_container_item, l_sub, l_lot, l_locator, p_revision);
887:
888: IF (l_result = inv_validate.f) THEN
889: IF (l_debug = 1) THEN
890: mdebug(p_serial_number || ' is an invalid sn', 1);
884: IF (p_serial_number IS NOT NULL) THEN
885: l_serial.serial_number := p_serial_number;
886: l_result := inv_validate.validate_serial(l_serial, l_org, l_container_item, l_sub, l_lot, l_locator, p_revision);
887:
888: IF (l_result = inv_validate.f) THEN
889: IF (l_debug = 1) THEN
890: mdebug(p_serial_number || ' is an invalid sn', 1);
891: END IF;
892: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_SER');
906: END IF;
907:
908: /* Validate Cost Group */
909: IF (p_cost_group_id IS NOT NULL) THEN
910: l_result := inv_validate.cost_group(p_cost_group_id, p_organization_id);
911:
912: IF (l_result = inv_validate.f) THEN
913: IF (l_debug = 1) THEN
914: mdebug(p_cost_group_id || ' is an invalid cg', 1);
908: /* Validate Cost Group */
909: IF (p_cost_group_id IS NOT NULL) THEN
910: l_result := inv_validate.cost_group(p_cost_group_id, p_organization_id);
911:
912: IF (l_result = inv_validate.f) THEN
913: IF (l_debug = 1) THEN
914: mdebug(p_cost_group_id || ' is an invalid cg', 1);
915: END IF;
916: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_CST_GRP');
929: l_lpn.lpn_id := p_lpn_id;
930: l_lpn.license_plate_number := NULL;
931: l_result := validate_lpn(l_lpn);
932:
933: IF (l_result = inv_validate.f) THEN
934: l_new_lpn_id := p_lpn_id;
935: l_insert_update_flag := 'i';
936: ELSE
937: l_insert_update_flag := 'u';
938: END IF;
939:
940: /* Validate Organization ID */
941: l_org.organization_id := p_organization_id;
942: l_result := inv_validate.ORGANIZATION(l_org);
943:
944: IF (l_result = inv_validate.f) THEN
945: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_ORG');
946: fnd_msg_pub.ADD;
940: /* Validate Organization ID */
941: l_org.organization_id := p_organization_id;
942: l_result := inv_validate.ORGANIZATION(l_org);
943:
944: IF (l_result = inv_validate.f) THEN
945: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_ORG');
946: fnd_msg_pub.ADD;
947: RAISE fnd_api.g_exc_error;
948: END IF;
949:
950: /* Validate Container Item */
951: IF (p_container_item_id IS NOT NULL) THEN
952: l_container_item.inventory_item_id := p_container_item_id;
953: l_result := inv_validate.inventory_item(l_container_item, l_org);
954:
955: IF (l_result = inv_validate.f) THEN
956: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_ITEM');
957: fnd_msg_pub.ADD;
951: IF (p_container_item_id IS NOT NULL) THEN
952: l_container_item.inventory_item_id := p_container_item_id;
953: l_result := inv_validate.inventory_item(l_container_item, l_org);
954:
955: IF (l_result = inv_validate.f) THEN
956: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_ITEM');
957: fnd_msg_pub.ADD;
958: RAISE fnd_api.g_exc_error;
959: END IF;
1051: l_lpn.lpn_id := l_new_lpn_id;
1052: l_lpn.license_plate_number := l_new_lpn;
1053: l_result := validate_lpn(l_lpn);
1054:
1055: IF (l_result = inv_validate.f) THEN
1056: EXIT;
1057: END IF;
1058: END LOOP;
1059:
1187: l_api_name CONSTANT VARCHAR2(30) := 'Create_LPN';
1188: l_api_version CONSTANT NUMBER := 1.0;
1189: l_lpn lpn;
1190: l_parent_lpn lpn;
1191: l_container_item inv_validate.item;
1192: l_org inv_validate.org;
1193: l_sub inv_validate.sub;
1194: l_locator inv_validate.LOCATOR;
1195: l_lot inv_validate.lot;
1188: l_api_version CONSTANT NUMBER := 1.0;
1189: l_lpn lpn;
1190: l_parent_lpn lpn;
1191: l_container_item inv_validate.item;
1192: l_org inv_validate.org;
1193: l_sub inv_validate.sub;
1194: l_locator inv_validate.LOCATOR;
1195: l_lot inv_validate.lot;
1196: l_serial inv_validate.serial;
1189: l_lpn lpn;
1190: l_parent_lpn lpn;
1191: l_container_item inv_validate.item;
1192: l_org inv_validate.org;
1193: l_sub inv_validate.sub;
1194: l_locator inv_validate.LOCATOR;
1195: l_lot inv_validate.lot;
1196: l_serial inv_validate.serial;
1197: l_result NUMBER;
1190: l_parent_lpn lpn;
1191: l_container_item inv_validate.item;
1192: l_org inv_validate.org;
1193: l_sub inv_validate.sub;
1194: l_locator inv_validate.LOCATOR;
1195: l_lot inv_validate.lot;
1196: l_serial inv_validate.serial;
1197: l_result NUMBER;
1198: l_debug number := NVL(FND_PROFILE.VALUE('INV_DEBUG_TRACE'),0);
1191: l_container_item inv_validate.item;
1192: l_org inv_validate.org;
1193: l_sub inv_validate.sub;
1194: l_locator inv_validate.LOCATOR;
1195: l_lot inv_validate.lot;
1196: l_serial inv_validate.serial;
1197: l_result NUMBER;
1198: l_debug number := NVL(FND_PROFILE.VALUE('INV_DEBUG_TRACE'),0);
1199: BEGIN
1192: l_org inv_validate.org;
1193: l_sub inv_validate.sub;
1194: l_locator inv_validate.LOCATOR;
1195: l_lot inv_validate.lot;
1196: l_serial inv_validate.serial;
1197: l_result NUMBER;
1198: l_debug number := NVL(FND_PROFILE.VALUE('INV_DEBUG_TRACE'),0);
1199: BEGIN
1200: -- Standard Start of API savepoint
1227: l_lpn.license_plate_number := p_lpn;
1228: l_lpn.lpn_id := NULL;
1229: l_result := validate_lpn(l_lpn);
1230:
1231: IF (l_result = inv_validate.t) THEN
1232: IF (l_debug = 1) THEN
1233: mdebug(p_lpn || ' failed LPN validation', 1);
1234: END IF;
1235: fnd_message.set_name('WMS', 'WMS_CONT_DUPLICATE_LPN');
1242: l_parent_lpn.lpn_id := p_parent_lpn_id;
1243: l_parent_lpn.license_plate_number := NULL;
1244: l_result := validate_lpn(l_parent_lpn);
1245:
1246: IF (l_result = inv_validate.t) THEN
1247: IF (l_debug = 1) THEN
1248: mdebug(p_parent_lpn_id || ' parent LPN failed validation', 1);
1249: END IF;
1250: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_LPN');
1254: END IF;
1255:
1256: /* Validate Organization ID */
1257: l_org.organization_id := p_organization_id;
1258: l_result := inv_validate.ORGANIZATION(l_org);
1259:
1260: IF (l_result = inv_validate.f) THEN
1261: IF (l_debug = 1) THEN
1262: mdebug(p_organization_id || ' is an invalid Org', 1);
1256: /* Validate Organization ID */
1257: l_org.organization_id := p_organization_id;
1258: l_result := inv_validate.ORGANIZATION(l_org);
1259:
1260: IF (l_result = inv_validate.f) THEN
1261: IF (l_debug = 1) THEN
1262: mdebug(p_organization_id || ' is an invalid Org', 1);
1263: END IF;
1264: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_ORG');
1268:
1269: /* Validate Subinventory */
1270: IF (p_subinventory IS NOT NULL) THEN
1271: l_sub.secondary_inventory_name := p_subinventory;
1272: l_result := inv_validate.subinventory(l_sub, l_org);
1273:
1274: IF (l_result = inv_validate.f) THEN
1275: IF (l_debug = 1) THEN
1276: mdebug(p_subinventory || ' Invalid Subinventory', 1);
1270: IF (p_subinventory IS NOT NULL) THEN
1271: l_sub.secondary_inventory_name := p_subinventory;
1272: l_result := inv_validate.subinventory(l_sub, l_org);
1273:
1274: IF (l_result = inv_validate.f) THEN
1275: IF (l_debug = 1) THEN
1276: mdebug(p_subinventory || ' Invalid Subinventory', 1);
1277: END IF;
1278: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_SUB');
1293: RAISE fnd_api.g_exc_error;
1294: END IF;
1295:
1296: l_locator.inventory_location_id := p_locator_id;
1297: l_result := inv_validate.validatelocator(l_locator, l_org, l_sub);
1298:
1299: IF (l_result = inv_validate.f) THEN
1300: IF (l_debug = 1) THEN
1301: mdebug(p_locator_id || ' is an invalid locator', 1);
1295:
1296: l_locator.inventory_location_id := p_locator_id;
1297: l_result := inv_validate.validatelocator(l_locator, l_org, l_sub);
1298:
1299: IF (l_result = inv_validate.f) THEN
1300: IF (l_debug = 1) THEN
1301: mdebug(p_locator_id || ' is an invalid locator', 1);
1302: END IF;
1303: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_LOC');
1309:
1310: /* Validate Container Item */
1311: IF (p_container_item_id IS NOT NULL) THEN
1312: l_container_item.inventory_item_id := p_container_item_id;
1313: l_result := inv_validate.inventory_item(l_container_item, l_org);
1314:
1315: IF (l_result = inv_validate.f) THEN
1316: IF (l_debug = 1) THEN
1317: mdebug(p_container_item_id || ' is an invalid container item', 1);
1311: IF (p_container_item_id IS NOT NULL) THEN
1312: l_container_item.inventory_item_id := p_container_item_id;
1313: l_result := inv_validate.inventory_item(l_container_item, l_org);
1314:
1315: IF (l_result = inv_validate.f) THEN
1316: IF (l_debug = 1) THEN
1317: mdebug(p_container_item_id || ' is an invalid container item', 1);
1318: END IF;
1319: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_ITEM');
1334: /* Validate Revision */
1335: IF (p_container_item_id IS NOT NULL) THEN
1336: IF (l_container_item.revision_qty_control_code = 2) THEN
1337: IF (p_revision IS NOT NULL) THEN
1338: l_result := inv_validate.revision(p_revision, l_org, l_container_item);
1339:
1340: IF (l_result = inv_validate.f) THEN
1341: IF (l_debug = 1) THEN
1342: mdebug(p_revision || ' is an invalid Revision', 1);
1336: IF (l_container_item.revision_qty_control_code = 2) THEN
1337: IF (p_revision IS NOT NULL) THEN
1338: l_result := inv_validate.revision(p_revision, l_org, l_container_item);
1339:
1340: IF (l_result = inv_validate.f) THEN
1341: IF (l_debug = 1) THEN
1342: mdebug(p_revision || ' is an invalid Revision', 1);
1343: END IF;
1344: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_REV');
1361: IF (p_container_item_id IS NOT NULL) THEN
1362: IF (l_container_item.lot_control_code = 2) THEN
1363: IF (p_lot_number IS NOT NULL) THEN
1364: l_lot.lot_number := p_lot_number;
1365: l_result := inv_validate.lot_number(l_lot, l_org, l_container_item, l_sub, l_locator, p_revision);
1366:
1367: IF (l_result = inv_validate.f) THEN
1368: IF (l_debug = 1) THEN
1369: mdebug(p_lot_number || ' is an invalid lot', 1);
1363: IF (p_lot_number IS NOT NULL) THEN
1364: l_lot.lot_number := p_lot_number;
1365: l_result := inv_validate.lot_number(l_lot, l_org, l_container_item, l_sub, l_locator, p_revision);
1366:
1367: IF (l_result = inv_validate.f) THEN
1368: IF (l_debug = 1) THEN
1369: mdebug(p_lot_number || ' is an invalid lot', 1);
1370: END IF;
1371: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_LOT');
1388: IF (p_container_item_id IS NOT NULL) THEN
1389: IF (l_container_item.serial_number_control_code <> 1) THEN
1390: IF (p_serial_number IS NOT NULL) THEN
1391: l_serial.serial_number := p_serial_number;
1392: l_result := inv_validate.validate_serial(l_serial, l_org, l_container_item, l_sub, l_lot, l_locator, p_revision);
1393:
1394: IF (l_result = inv_validate.f) THEN
1395: IF (l_debug = 1) THEN
1396: mdebug(l_serial.serial_number || ' is an invalid Serial Number', 1);
1390: IF (p_serial_number IS NOT NULL) THEN
1391: l_serial.serial_number := p_serial_number;
1392: l_result := inv_validate.validate_serial(l_serial, l_org, l_container_item, l_sub, l_lot, l_locator, p_revision);
1393:
1394: IF (l_result = inv_validate.f) THEN
1395: IF (l_debug = 1) THEN
1396: mdebug(l_serial.serial_number || ' is an invalid Serial Number', 1);
1397: END IF;
1398: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_SER');
1424: END IF;
1425:
1426: /* Validate Cost Group */
1427: IF (p_cost_group_id IS NOT NULL) THEN
1428: l_result := inv_validate.cost_group(p_cost_group_id, p_organization_id);
1429:
1430: IF (l_result = inv_validate.f) THEN
1431: IF (l_debug = 1) THEN
1432: mdebug(p_cost_group_id || 'is an invalid cost group', 1);
1426: /* Validate Cost Group */
1427: IF (p_cost_group_id IS NOT NULL) THEN
1428: l_result := inv_validate.cost_group(p_cost_group_id, p_organization_id);
1429:
1430: IF (l_result = inv_validate.f) THEN
1431: IF (l_debug = 1) THEN
1432: mdebug(p_cost_group_id || 'is an invalid cost group', 1);
1433: END IF;
1434: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_CST_GRP');
1520: ) IS
1521: l_api_name CONSTANT VARCHAR2(30) := 'Modify_LPN';
1522: l_api_version CONSTANT NUMBER := 1.0;
1523: l_lpn lpn;
1524: l_container_item inv_validate.item;
1525: l_parent_item inv_validate.item;
1526: l_org inv_validate.org;
1527: l_sub inv_validate.sub;
1528: l_locator inv_validate.LOCATOR;
1521: l_api_name CONSTANT VARCHAR2(30) := 'Modify_LPN';
1522: l_api_version CONSTANT NUMBER := 1.0;
1523: l_lpn lpn;
1524: l_container_item inv_validate.item;
1525: l_parent_item inv_validate.item;
1526: l_org inv_validate.org;
1527: l_sub inv_validate.sub;
1528: l_locator inv_validate.LOCATOR;
1529: l_result NUMBER;
1522: l_api_version CONSTANT NUMBER := 1.0;
1523: l_lpn lpn;
1524: l_container_item inv_validate.item;
1525: l_parent_item inv_validate.item;
1526: l_org inv_validate.org;
1527: l_sub inv_validate.sub;
1528: l_locator inv_validate.LOCATOR;
1529: l_result NUMBER;
1530: l_change_in_weight NUMBER := 0;
1523: l_lpn lpn;
1524: l_container_item inv_validate.item;
1525: l_parent_item inv_validate.item;
1526: l_org inv_validate.org;
1527: l_sub inv_validate.sub;
1528: l_locator inv_validate.LOCATOR;
1529: l_result NUMBER;
1530: l_change_in_weight NUMBER := 0;
1531: l_change_in_weight_uom VARCHAR2(3);
1524: l_container_item inv_validate.item;
1525: l_parent_item inv_validate.item;
1526: l_org inv_validate.org;
1527: l_sub inv_validate.sub;
1528: l_locator inv_validate.LOCATOR;
1529: l_result NUMBER;
1530: l_change_in_weight NUMBER := 0;
1531: l_change_in_weight_uom VARCHAR2(3);
1532: l_location_changed NUMBER := 1;
1614: l_lpn.lpn_id := p_lpn.lpn_id;
1615: l_lpn.license_plate_number := NULL;
1616: l_result := validate_lpn(l_lpn);
1617:
1618: IF (l_result = inv_validate.f) THEN
1619: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_LPN');
1620: fnd_msg_pub.ADD;
1621: RAISE fnd_api.g_exc_error;
1622: END IF;
1623:
1624: /* Validate Organization */
1625: IF (p_lpn.organization_id IS NOT NULL) THEN
1626: l_org.organization_id := p_lpn.organization_id;
1627: l_result := inv_validate.ORGANIZATION(l_org);
1628:
1629: IF (l_result = inv_validate.f) THEN
1630: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_ORG');
1631: fnd_msg_pub.ADD;
1625: IF (p_lpn.organization_id IS NOT NULL) THEN
1626: l_org.organization_id := p_lpn.organization_id;
1627: l_result := inv_validate.ORGANIZATION(l_org);
1628:
1629: IF (l_result = inv_validate.f) THEN
1630: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_ORG');
1631: fnd_msg_pub.ADD;
1632: RAISE fnd_api.g_exc_error;
1633: END IF;
1635:
1636: /* Validate Subinventory */
1637: IF (p_lpn.subinventory_code IS NOT NULL) THEN
1638: l_sub.secondary_inventory_name := p_lpn.subinventory_code;
1639: l_result := inv_validate.subinventory(l_sub, l_org);
1640:
1641: IF (l_result = inv_validate.f) THEN
1642: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_SUB');
1643: fnd_msg_pub.ADD;
1637: IF (p_lpn.subinventory_code IS NOT NULL) THEN
1638: l_sub.secondary_inventory_name := p_lpn.subinventory_code;
1639: l_result := inv_validate.subinventory(l_sub, l_org);
1640:
1641: IF (l_result = inv_validate.f) THEN
1642: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_SUB');
1643: fnd_msg_pub.ADD;
1644: RAISE fnd_api.g_exc_error;
1645: END IF;
1654: RAISE fnd_api.g_exc_error;
1655: END IF;
1656:
1657: l_locator.inventory_location_id := p_lpn.locator_id;
1658: l_result := inv_validate.validatelocator(l_locator, l_org, l_sub);
1659:
1660: IF (l_result = inv_validate.f) THEN
1661: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_LOC');
1662: fnd_msg_pub.ADD;
1656:
1657: l_locator.inventory_location_id := p_lpn.locator_id;
1658: l_result := inv_validate.validatelocator(l_locator, l_org, l_sub);
1659:
1660: IF (l_result = inv_validate.f) THEN
1661: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_LOC');
1662: fnd_msg_pub.ADD;
1663: RAISE fnd_api.g_exc_error;
1664: END IF;
1667:
1668: /* Validate Container Item */
1669: IF (p_lpn.inventory_item_id IS NOT NULL) THEN
1670: l_container_item.inventory_item_id := p_lpn.inventory_item_id;
1671: l_result := inv_validate.inventory_item(l_container_item, l_org);
1672:
1673: IF (l_result = inv_validate.f) THEN
1674: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_ITEM');
1675: fnd_msg_pub.ADD;
1669: IF (p_lpn.inventory_item_id IS NOT NULL) THEN
1670: l_container_item.inventory_item_id := p_lpn.inventory_item_id;
1671: l_result := inv_validate.inventory_item(l_container_item, l_org);
1672:
1673: IF (l_result = inv_validate.f) THEN
1674: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_ITEM');
1675: fnd_msg_pub.ADD;
1676: RAISE fnd_api.g_exc_error;
1677: END IF;
1865: l_lpn.lpn_id := p_lpn_id;
1866: l_lpn.license_plate_number := NULL;
1867: l_result := validate_lpn(l_lpn);
1868:
1869: IF (l_result = inv_validate.f) THEN
1870: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_LPN');
1871: fnd_msg_pub.ADD;
1872: RAISE fnd_api.g_exc_error;
1873: END IF;
1981: l_api_name CONSTANT VARCHAR2(30) := 'PackUnpack_Container';
1982: l_api_version CONSTANT NUMBER := 1.0;
1983: l_lpn lpn;
1984: l_content_lpn lpn;
1985: l_content_item inv_validate.item;
1986: l_org inv_validate.org;
1987: l_sub inv_validate.sub;
1988: l_locator inv_validate.LOCATOR;
1989: l_lot inv_validate.lot;
1982: l_api_version CONSTANT NUMBER := 1.0;
1983: l_lpn lpn;
1984: l_content_lpn lpn;
1985: l_content_item inv_validate.item;
1986: l_org inv_validate.org;
1987: l_sub inv_validate.sub;
1988: l_locator inv_validate.LOCATOR;
1989: l_lot inv_validate.lot;
1990: l_serial inv_validate.serial;
1983: l_lpn lpn;
1984: l_content_lpn lpn;
1985: l_content_item inv_validate.item;
1986: l_org inv_validate.org;
1987: l_sub inv_validate.sub;
1988: l_locator inv_validate.LOCATOR;
1989: l_lot inv_validate.lot;
1990: l_serial inv_validate.serial;
1991: l_current_serial VARCHAR2(30) := p_from_serial_number;
1984: l_content_lpn lpn;
1985: l_content_item inv_validate.item;
1986: l_org inv_validate.org;
1987: l_sub inv_validate.sub;
1988: l_locator inv_validate.LOCATOR;
1989: l_lot inv_validate.lot;
1990: l_serial inv_validate.serial;
1991: l_current_serial VARCHAR2(30) := p_from_serial_number;
1992: l_result NUMBER;
1985: l_content_item inv_validate.item;
1986: l_org inv_validate.org;
1987: l_sub inv_validate.sub;
1988: l_locator inv_validate.LOCATOR;
1989: l_lot inv_validate.lot;
1990: l_serial inv_validate.serial;
1991: l_current_serial VARCHAR2(30) := p_from_serial_number;
1992: l_result NUMBER;
1993: l_serial_summary_entry NUMBER := 2;
1986: l_org inv_validate.org;
1987: l_sub inv_validate.sub;
1988: l_locator inv_validate.LOCATOR;
1989: l_lot inv_validate.lot;
1990: l_serial inv_validate.serial;
1991: l_current_serial VARCHAR2(30) := p_from_serial_number;
1992: l_result NUMBER;
1993: l_serial_summary_entry NUMBER := 2;
1994: l_unit_weight NUMBER;
2190: l_lpn.lpn_id := p_lpn_id;
2191: l_lpn.license_plate_number := NULL;
2192: l_result := validate_lpn(l_lpn, 1);
2193:
2194: IF (l_result = inv_validate.f) THEN
2195: IF (l_debug = 1) THEN
2196: mdebug(p_lpn_id || 'is an invalid lpn_id', G_ERROR);
2197: END IF;
2198: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_LPN');
2206: IF (p_content_lpn_id IS NOT NULL) THEN
2207: l_content_lpn.lpn_id := p_content_lpn_id;
2208: l_result := validate_lpn(l_content_lpn);
2209:
2210: IF (l_result = inv_validate.f) THEN
2211: IF (l_debug = 1) THEN
2212: mdebug(p_content_lpn_id || 'is and invalid content lpn id', G_ERROR);
2213: END IF;
2214: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_CONTENT_LPN');
2231: END IF;
2232:
2233: /* Validate Organization ID */
2234: l_org.organization_id := p_organization_id;
2235: l_result := inv_validate.ORGANIZATION(l_org);
2236:
2237: IF (l_result = inv_validate.f) THEN
2238: IF (l_debug = 1) THEN
2239: mdebug(p_organization_id || 'is not a valid org_id', G_ERROR);
2233: /* Validate Organization ID */
2234: l_org.organization_id := p_organization_id;
2235: l_result := inv_validate.ORGANIZATION(l_org);
2236:
2237: IF (l_result = inv_validate.f) THEN
2238: IF (l_debug = 1) THEN
2239: mdebug(p_organization_id || 'is not a valid org_id', G_ERROR);
2240: END IF;
2241: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_ORG');
2245:
2246: /* Validate Content Item */
2247: IF (p_content_item_id IS NOT NULL) THEN
2248: l_content_item.inventory_item_id := p_content_item_id;
2249: l_result := inv_validate.inventory_item(l_content_item, l_org);
2250:
2251: IF (l_result = inv_validate.f) THEN
2252: IF (l_debug = 1) THEN
2253: mdebug(p_content_item_id || 'is not a valid content item id', G_ERROR);
2247: IF (p_content_item_id IS NOT NULL) THEN
2248: l_content_item.inventory_item_id := p_content_item_id;
2249: l_result := inv_validate.inventory_item(l_content_item, l_org);
2250:
2251: IF (l_result = inv_validate.f) THEN
2252: IF (l_debug = 1) THEN
2253: mdebug(p_content_item_id || 'is not a valid content item id', G_ERROR);
2254: END IF;
2255: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_CONTENT_ITEM');
2302:
2303: /* Validate Subinventory */
2304: IF (p_subinventory IS NOT NULL) THEN
2305: l_sub.secondary_inventory_name := p_subinventory;
2306: l_result := inv_validate.subinventory(l_sub, l_org);
2307:
2308: IF (l_result = inv_validate.f) THEN
2309: IF (l_debug = 1) THEN
2310: mdebug(p_subinventory || 'is an invalid sub', G_ERROR);
2304: IF (p_subinventory IS NOT NULL) THEN
2305: l_sub.secondary_inventory_name := p_subinventory;
2306: l_result := inv_validate.subinventory(l_sub, l_org);
2307:
2308: IF (l_result = inv_validate.f) THEN
2309: IF (l_debug = 1) THEN
2310: mdebug(p_subinventory || 'is an invalid sub', G_ERROR);
2311: END IF;
2312: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_SUB');
2344: RAISE fnd_api.g_exc_error;
2345: END IF;
2346:
2347: l_locator.inventory_location_id := p_locator_id;
2348: l_result := inv_validate.validatelocator(l_locator, l_org, l_sub);
2349:
2350: IF (l_result = inv_validate.f) THEN
2351: IF (l_debug = 1) THEN
2352: mdebug(p_locator_id || ' is an invalid locator_id', G_ERROR);
2346:
2347: l_locator.inventory_location_id := p_locator_id;
2348: l_result := inv_validate.validatelocator(l_locator, l_org, l_sub);
2349:
2350: IF (l_result = inv_validate.f) THEN
2351: IF (l_debug = 1) THEN
2352: mdebug(p_locator_id || ' is an invalid locator_id', G_ERROR);
2353: END IF;
2354: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_LOC');
2363: /* Validate Revision */
2364: IF (p_content_item_id IS NOT NULL) THEN
2365: IF (l_content_item.revision_qty_control_code = 2) THEN
2366: IF (p_revision IS NOT NULL) THEN
2367: l_result := inv_validate.revision(p_revision, l_org, l_content_item);
2368:
2369: IF (l_result = inv_validate.f) THEN
2370: IF (l_debug = 1) THEN
2371: mdebug(p_revision || ' is an invalid revision', G_ERROR);
2365: IF (l_content_item.revision_qty_control_code = 2) THEN
2366: IF (p_revision IS NOT NULL) THEN
2367: l_result := inv_validate.revision(p_revision, l_org, l_content_item);
2368:
2369: IF (l_result = inv_validate.f) THEN
2370: IF (l_debug = 1) THEN
2371: mdebug(p_revision || ' is an invalid revision', G_ERROR);
2372: END IF;
2373: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_REV');
2406: AND lot_number = p_lot_number
2407: AND inventory_item_id = p_content_item_id;
2408:
2409: IF l_temp_count > 0 THEN
2410: l_result := inv_validate.lot_number(l_lot, l_org, l_content_item, l_sub, l_locator, p_revision);
2411:
2412: IF (l_result = inv_validate.f) THEN
2413: IF (l_debug = 1) THEN
2414: mdebug(p_lot_number || ' is an invalid lot number', G_ERROR);
2408:
2409: IF l_temp_count > 0 THEN
2410: l_result := inv_validate.lot_number(l_lot, l_org, l_content_item, l_sub, l_locator, p_revision);
2411:
2412: IF (l_result = inv_validate.f) THEN
2413: IF (l_debug = 1) THEN
2414: mdebug(p_lot_number || ' is an invalid lot number', G_ERROR);
2415: END IF;
2416: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_LOT');
2541:
2542: IF ((p_subinventory IS NOT NULL) AND (l_dynamic_status = 0)) THEN
2543: l_serial.serial_number := l_current_serial;
2544: l_lot.lot_number := p_lot_number; -- Added for bug 8775286
2545: l_result := inv_validate.validate_serial(l_serial, l_org, l_content_item, l_sub, l_lot, l_locator, p_revision);
2546:
2547: IF (l_result = inv_validate.f) THEN
2548: IF (l_debug = 1) THEN
2549: mdebug(l_current_serial || ' is not a valid serial number', G_ERROR);
2543: l_serial.serial_number := l_current_serial;
2544: l_lot.lot_number := p_lot_number; -- Added for bug 8775286
2545: l_result := inv_validate.validate_serial(l_serial, l_org, l_content_item, l_sub, l_lot, l_locator, p_revision);
2546:
2547: IF (l_result = inv_validate.f) THEN
2548: IF (l_debug = 1) THEN
2549: mdebug(l_current_serial || ' is not a valid serial number', G_ERROR);
2550: END IF;
2551: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_SER');
2605: END IF;
2606:
2607: /* Validate content item UOM */
2608: IF (p_content_item_id IS NOT NULL) THEN
2609: l_result := inv_validate.uom(p_uom, l_org, l_content_item);
2610:
2611: IF (l_result = inv_validate.f) THEN
2612: IF (l_debug = 1) THEN
2613: mdebug(p_uom || ' is an invalid UOM', G_ERROR);
2607: /* Validate content item UOM */
2608: IF (p_content_item_id IS NOT NULL) THEN
2609: l_result := inv_validate.uom(p_uom, l_org, l_content_item);
2610:
2611: IF (l_result = inv_validate.f) THEN
2612: IF (l_debug = 1) THEN
2613: mdebug(p_uom || ' is an invalid UOM', G_ERROR);
2614: END IF;
2615: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_UOM');
2641: END IF;
2642:
2643: /* Validate Cost Group */
2644: IF (p_cost_group_id IS NOT NULL) THEN
2645: l_result := inv_validate.cost_group(p_cost_group_id, p_organization_id);
2646:
2647: IF (l_result = inv_validate.f) THEN
2648: IF (l_debug = 1) THEN
2649: mdebug(p_cost_group_id || ' is an invalid cost group is', G_ERROR);
2643: /* Validate Cost Group */
2644: IF (p_cost_group_id IS NOT NULL) THEN
2645: l_result := inv_validate.cost_group(p_cost_group_id, p_organization_id);
2646:
2647: IF (l_result = inv_validate.f) THEN
2648: IF (l_debug = 1) THEN
2649: mdebug(p_cost_group_id || ' is an invalid cost group is', G_ERROR);
2650: END IF;
2651: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_CST_GRP');
2759: l_api_name CONSTANT VARCHAR2(30) := 'pack_prepack_container';
2760: l_api_version CONSTANT NUMBER := 1.0;
2761: l_lpn lpn;
2762: l_content_lpn lpn;
2763: l_content_item inv_validate.item;
2764: l_org inv_validate.org;
2765: l_lot inv_validate.lot;
2766: l_serial inv_validate.serial;
2767: l_current_serial VARCHAR2(30) := p_from_serial_number;
2760: l_api_version CONSTANT NUMBER := 1.0;
2761: l_lpn lpn;
2762: l_content_lpn lpn;
2763: l_content_item inv_validate.item;
2764: l_org inv_validate.org;
2765: l_lot inv_validate.lot;
2766: l_serial inv_validate.serial;
2767: l_current_serial VARCHAR2(30) := p_from_serial_number;
2768: l_result NUMBER;
2761: l_lpn lpn;
2762: l_content_lpn lpn;
2763: l_content_item inv_validate.item;
2764: l_org inv_validate.org;
2765: l_lot inv_validate.lot;
2766: l_serial inv_validate.serial;
2767: l_current_serial VARCHAR2(30) := p_from_serial_number;
2768: l_result NUMBER;
2769: l_serial_summary_entry NUMBER := 2;
2762: l_content_lpn lpn;
2763: l_content_item inv_validate.item;
2764: l_org inv_validate.org;
2765: l_lot inv_validate.lot;
2766: l_serial inv_validate.serial;
2767: l_current_serial VARCHAR2(30) := p_from_serial_number;
2768: l_result NUMBER;
2769: l_serial_summary_entry NUMBER := 2;
2770:
2826: l_lpn.lpn_id := p_lpn_id;
2827: l_lpn.license_plate_number := NULL;
2828: l_result := validate_lpn(l_lpn);
2829:
2830: IF (l_result = inv_validate.f) THEN
2831: IF (l_debug = 1) THEN
2832: mdebug(p_lpn_id || 'is an invalid lpn_id', 1);
2833: END IF;
2834: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_LPN');
2837: END IF;
2838:
2839: /* Validate Organization ID */
2840: l_org.organization_id := p_organization_id;
2841: l_result := inv_validate.ORGANIZATION(l_org);
2842:
2843: IF (l_result = inv_validate.f) THEN
2844: IF (l_debug = 1) THEN
2845: mdebug(p_organization_id || 'is not a valid org_id', 1);
2839: /* Validate Organization ID */
2840: l_org.organization_id := p_organization_id;
2841: l_result := inv_validate.ORGANIZATION(l_org);
2842:
2843: IF (l_result = inv_validate.f) THEN
2844: IF (l_debug = 1) THEN
2845: mdebug(p_organization_id || 'is not a valid org_id', 1);
2846: END IF;
2847: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_ORG');
2851:
2852: /* Validate Content Item */
2853: IF (p_content_item_id IS NOT NULL) THEN
2854: l_content_item.inventory_item_id := p_content_item_id;
2855: l_result := inv_validate.inventory_item(l_content_item, l_org);
2856:
2857: IF (l_result = inv_validate.f) THEN
2858: IF (l_debug = 1) THEN
2859: mdebug(p_content_item_id || 'is not a valid content item id', 1);
2853: IF (p_content_item_id IS NOT NULL) THEN
2854: l_content_item.inventory_item_id := p_content_item_id;
2855: l_result := inv_validate.inventory_item(l_content_item, l_org);
2856:
2857: IF (l_result = inv_validate.f) THEN
2858: IF (l_debug = 1) THEN
2859: mdebug(p_content_item_id || 'is not a valid content item id', 1);
2860: END IF;
2861: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_CONTENT_ITEM');
2867: /* Validate Revision */
2868: IF (p_content_item_id IS NOT NULL) THEN
2869: IF (l_content_item.revision_qty_control_code = 2) THEN
2870: IF (p_revision IS NOT NULL) THEN
2871: l_result := inv_validate.revision(p_revision, l_org, l_content_item);
2872:
2873: IF (l_result = inv_validate.f) THEN
2874: IF (l_debug = 1) THEN
2875: mdebug(p_revision || ' is an invalid revision', 1);
2869: IF (l_content_item.revision_qty_control_code = 2) THEN
2870: IF (p_revision IS NOT NULL) THEN
2871: l_result := inv_validate.revision(p_revision, l_org, l_content_item);
2872:
2873: IF (l_result = inv_validate.f) THEN
2874: IF (l_debug = 1) THEN
2875: mdebug(p_revision || ' is an invalid revision', 1);
2876: END IF;
2877: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_REV');
3027: END IF;
3028:
3029: /* Validate content item UOM */
3030: IF (p_content_item_id IS NOT NULL) THEN
3031: l_result := inv_validate.uom(p_uom, l_org, l_content_item);
3032:
3033: IF (l_result = inv_validate.f) THEN
3034: IF (l_debug = 1) THEN
3035: mdebug(p_uom || ' is an invalid UOM', 1);
3029: /* Validate content item UOM */
3030: IF (p_content_item_id IS NOT NULL) THEN
3031: l_result := inv_validate.uom(p_uom, l_org, l_content_item);
3032:
3033: IF (l_result = inv_validate.f) THEN
3034: IF (l_debug = 1) THEN
3035: mdebug(p_uom || ' is an invalid UOM', 1);
3036: END IF;
3037: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_UOM');
3368: l_msgdata VARCHAR2(1000);
3369:
3370: -- Variables for validation
3371: l_result NUMBER;
3372: l_org inv_validate.org;
3373: l_lpn LPN;
3374:
3375: BEGIN
3376: -- Standard call to check for call compatibility.
3394:
3395: l_progress := '100';
3396: -- Validate Organization ID
3397: l_org.organization_id := p_organization_id;
3398: l_result := inv_validate.ORGANIZATION(l_org);
3399:
3400: IF ( l_result = INV_Validate.F ) THEN
3401: IF ( l_debug = 1 ) THEN
3402: mdebug(p_organization_id || ' is not a valid org id', G_ERROR);
3396: -- Validate Organization ID
3397: l_org.organization_id := p_organization_id;
3398: l_result := inv_validate.ORGANIZATION(l_org);
3399:
3400: IF ( l_result = INV_Validate.F ) THEN
3401: IF ( l_debug = 1 ) THEN
3402: mdebug(p_organization_id || ' is not a valid org id', G_ERROR);
3403: END IF;
3404: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_ORG');
3410: -- Validate LPN
3411: l_lpn.lpn_id := p_outermost_lpn_id;
3412: l_result := Validate_LPN(l_lpn);
3413:
3414: IF ( l_result = INV_Validate.F ) THEN
3415: IF ( l_debug = 1 ) THEN
3416: mdebug(p_outermost_lpn_id || ' is an invalid lpn id', G_ERROR);
3417: END IF;
3418: FND_MESSAGE.SET_NAME('WMS', 'WMS_CONT_INVALID_LPN');
3492: l_msgdata VARCHAR2(1000);
3493:
3494: -- Variables for validation
3495: l_result NUMBER;
3496: l_org inv_validate.org;
3497: l_lpn LPN;
3498:
3499: BEGIN
3500: -- Standard call to check for call compatibility.
3518:
3519: l_progress := '100';
3520: -- Validate Organization ID
3521: l_org.organization_id := p_organization_id;
3522: l_result := inv_validate.ORGANIZATION(l_org);
3523:
3524: IF ( l_result = INV_Validate.F ) THEN
3525: IF ( l_debug = 1 ) THEN
3526: mdebug(p_organization_id || ' is not a valid org id', G_ERROR);
3520: -- Validate Organization ID
3521: l_org.organization_id := p_organization_id;
3522: l_result := inv_validate.ORGANIZATION(l_org);
3523:
3524: IF ( l_result = INV_Validate.F ) THEN
3525: IF ( l_debug = 1 ) THEN
3526: mdebug(p_organization_id || ' is not a valid org id', G_ERROR);
3527: END IF;
3528: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_ORG');
3534: -- Validate LPN
3535: l_lpn.lpn_id := p_outermost_lpn_id;
3536: l_result := Validate_LPN(l_lpn);
3537:
3538: IF ( l_result = INV_Validate.F ) THEN
3539: IF ( l_debug = 1 ) THEN
3540: mdebug(p_outermost_lpn_id || ' is an invalid lpn id', G_ERROR);
3541: END IF;
3542: FND_MESSAGE.SET_NAME('WMS', 'WMS_CONT_INVALID_LPN');
3616: l_msgdata VARCHAR2(1000);
3617:
3618: -- Variables for validation
3619: l_result NUMBER;
3620: l_org inv_validate.org;
3621: l_lpn LPN;
3622:
3623: BEGIN
3624: -- Standard call to check for call compatibility.
3642:
3643: l_progress := '100';
3644: -- Validate Organization ID
3645: l_org.organization_id := p_organization_id;
3646: l_result := inv_validate.ORGANIZATION(l_org);
3647:
3648: IF ( l_result = INV_Validate.F ) THEN
3649: IF ( l_debug = 1 ) THEN
3650: mdebug(p_organization_id || ' is not a valid org id', G_ERROR);
3644: -- Validate Organization ID
3645: l_org.organization_id := p_organization_id;
3646: l_result := inv_validate.ORGANIZATION(l_org);
3647:
3648: IF ( l_result = INV_Validate.F ) THEN
3649: IF ( l_debug = 1 ) THEN
3650: mdebug(p_organization_id || ' is not a valid org id', G_ERROR);
3651: END IF;
3652: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_ORG');
3658: -- Validate LPN
3659: l_lpn.lpn_id := p_outermost_lpn_id;
3660: l_result := Validate_LPN(l_lpn);
3661:
3662: IF ( l_result = INV_Validate.F ) THEN
3663: IF ( l_debug = 1 ) THEN
3664: mdebug(p_outermost_lpn_id || ' is an invalid lpn id', G_ERROR);
3665: END IF;
3666: FND_MESSAGE.SET_NAME('WMS', 'WMS_CONT_INVALID_LPN');