DBA Data[Home] [Help]

APPS.WMS_CONTAINER_PUB dependencies on FND_API

Line 100: wsh_container_grp.update_container(l_api_version, fnd_api.g_false,fnd_api.g_false,fnd_api.g_valid_level_full, x_return_status, x_msg_count, x_msg_data, l_changed_attributes);

96: mdebug('***volume_uom_code='|| p_volume_uom);
97: mdebug('***l_lpn_item_id='|| l_lpn_item_id);
98: END IF;
99: --Call the Shipping API to update Container details.
100: wsh_container_grp.update_container(l_api_version, fnd_api.g_false,fnd_api.g_false,fnd_api.g_valid_level_full, x_return_status, x_msg_count, x_msg_data, l_changed_attributes);
101: -- End bug 5190145
102: END IF;
103:
104:

Line 111: , p_init_msg_list IN VARCHAR2 := fnd_api.g_false

107:
108:
109: PROCEDURE Generate_LPN (
110: p_api_version IN NUMBER
111: , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
112: , p_commit IN VARCHAR2 := fnd_api.g_false
113: , p_validation_level IN NUMBER := fnd_api.g_valid_level_full
114: , x_return_status OUT NOCOPY VARCHAR2
115: , x_msg_count OUT NOCOPY NUMBER

Line 112: , p_commit IN VARCHAR2 := fnd_api.g_false

108:
109: PROCEDURE Generate_LPN (
110: p_api_version IN NUMBER
111: , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
112: , p_commit IN VARCHAR2 := fnd_api.g_false
113: , p_validation_level IN NUMBER := fnd_api.g_valid_level_full
114: , x_return_status OUT NOCOPY VARCHAR2
115: , x_msg_count OUT NOCOPY NUMBER
116: , x_msg_data OUT NOCOPY VARCHAR2

Line 113: , p_validation_level IN NUMBER := fnd_api.g_valid_level_full

109: PROCEDURE Generate_LPN (
110: p_api_version IN NUMBER
111: , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
112: , p_commit IN VARCHAR2 := fnd_api.g_false
113: , p_validation_level IN NUMBER := fnd_api.g_valid_level_full
114: , x_return_status OUT NOCOPY VARCHAR2
115: , x_msg_count OUT NOCOPY NUMBER
116: , x_msg_data OUT NOCOPY VARCHAR2
117: , p_organization_id IN NUMBER

Line 184: , p_init_msg_list IN VARCHAR2 := fnd_api.g_false

180: -- Overloaded for LSP, bug 9087971
181:
182: PROCEDURE Generate_LPN (
183: p_api_version IN NUMBER
184: , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
185: , p_commit IN VARCHAR2 := fnd_api.g_false
186: , p_validation_level IN NUMBER := fnd_api.g_valid_level_full
187: , x_return_status OUT NOCOPY VARCHAR2
188: , x_msg_count OUT NOCOPY NUMBER

Line 185: , p_commit IN VARCHAR2 := fnd_api.g_false

181:
182: PROCEDURE Generate_LPN (
183: p_api_version IN NUMBER
184: , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
185: , p_commit IN VARCHAR2 := fnd_api.g_false
186: , p_validation_level IN NUMBER := fnd_api.g_valid_level_full
187: , x_return_status OUT NOCOPY VARCHAR2
188: , x_msg_count OUT NOCOPY NUMBER
189: , x_msg_data OUT NOCOPY VARCHAR2

Line 186: , p_validation_level IN NUMBER := fnd_api.g_valid_level_full

182: PROCEDURE Generate_LPN (
183: p_api_version IN NUMBER
184: , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
185: , p_commit IN VARCHAR2 := fnd_api.g_false
186: , p_validation_level IN NUMBER := fnd_api.g_valid_level_full
187: , x_return_status OUT NOCOPY VARCHAR2
188: , x_msg_count OUT NOCOPY NUMBER
189: , x_msg_data OUT NOCOPY VARCHAR2
190: , p_organization_id IN NUMBER

Line 268: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN

264: -- Standard Start of API savepoint
265: SAVEPOINT GENERATE_LPN_PUB;
266:
267: -- Standard call to check for call compatibility.
268: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
269: fnd_message.set_name('WMS', 'WMS_CONT_INCOMPATIBLE_API_CALL');
270: fnd_msg_pub.ADD;
271: RAISE fnd_api.g_exc_unexpected_error;
272: END IF;

Line 271: RAISE fnd_api.g_exc_unexpected_error;

267: -- Standard call to check for call compatibility.
268: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
269: fnd_message.set_name('WMS', 'WMS_CONT_INCOMPATIBLE_API_CALL');
270: fnd_msg_pub.ADD;
271: RAISE fnd_api.g_exc_unexpected_error;
272: END IF;
273:
274: -- Initialize message list if p_init_msg_list is set to TRUE.
275: IF fnd_api.to_boolean(p_init_msg_list) THEN

Line 275: IF fnd_api.to_boolean(p_init_msg_list) THEN

271: RAISE fnd_api.g_exc_unexpected_error;
272: END IF;
273:
274: -- Initialize message list if p_init_msg_list is set to TRUE.
275: IF fnd_api.to_boolean(p_init_msg_list) THEN
276: fnd_msg_pub.initialize;
277: END IF;
278:
279: -- Initialize API return status to success

Line 280: x_return_status := fnd_api.g_ret_sts_success;

276: fnd_msg_pub.initialize;
277: END IF;
278:
279: -- Initialize API return status to success
280: x_return_status := fnd_api.g_ret_sts_success;
281: -- API body
282: IF (l_debug = 1) THEN
283: mdebug('Call to Generate_LPN orgid='||p_organization_id||' sub='||p_subinventory||' loc='||p_locator_id||' src='||p_source||' vlev='||p_validation_level, G_INFO);
284: mdebug('cntitemid='||p_container_item_id||' rev='||p_revision||' lot='||p_lot_number||' fmsn='||p_from_serial_number||' tosn='||p_to_serial_number||' cstgrp='||p_cost_group_id, G_INFO);

Line 291: IF (p_validation_level = fnd_api.g_valid_level_full) THEN

287: END IF;
288:
289: l_progress := 'Validate all inputs if validation level is set to full';
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:

Line 302: RAISE fnd_api.g_exc_error;

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');
301: fnd_msg_pub.ADD;
302: RAISE fnd_api.g_exc_error;
303: END IF;
304:
305: l_progress := 'Validate Container Item';
306: IF (p_container_item_id IS NOT NULL) THEN

Line 316: RAISE fnd_api.g_exc_error;

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');
315: fnd_msg_pub.ADD;
316: RAISE fnd_api.g_exc_error;
317: END IF;
318:
319: IF (l_container_item.container_item_flag = 'N') THEN
320: IF (l_debug = 1) THEN

Line 325: RAISE fnd_api.g_exc_error;

321: mdebug(p_container_item_id || ' is not a container', 1);
322: END IF;
323: fnd_message.set_name('WMS', 'WMS_CONT_ITEM_NOT_A_CONT');
324: fnd_msg_pub.ADD;
325: RAISE fnd_api.g_exc_error;
326: END IF;
327: END IF;
328:
329: l_progress := 'Validate Subinventory';

Line 340: RAISE fnd_api.g_exc_error;

336: mdebug(p_subinventory || ' is not a valid sub', 1);
337: END IF;
338: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_SUB');
339: fnd_msg_pub.ADD;
340: RAISE fnd_api.g_exc_error;
341: END IF;
342: END IF;
343:
344: l_progress := 'Validate Locator';

Line 353: RAISE fnd_api.g_exc_error;

349: mdebug('Generate_LPN is missing required loc', 1);
350: END IF;
351: fnd_message.set_name('WMS', 'WMS_CONT_MISS_REQ_LOC');
352: fnd_msg_pub.ADD;
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);

Line 365: RAISE fnd_api.g_exc_error;

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');
364: fnd_msg_pub.ADD;
365: RAISE fnd_api.g_exc_error;
366: END IF;
367: END IF;
368: END IF;
369:

Line 382: RAISE fnd_api.g_exc_error;

378: mdebug(p_revision || ' is not a valid rev', 1);
379: END IF;
380: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_REV');
381: fnd_msg_pub.ADD;
382: RAISE fnd_api.g_exc_error;
383: END IF;
384: ELSE
385: --Rev not supported for container items currently. Allow to use rev controlled items
386: IF (l_debug = 1) THEN

Line 391: --RAISE fnd_api.g_exc_error;

387: mdebug('Generate_LPN is missing the rev for rev container item..ok', 1);
388: END IF;
389: --fnd_message.set_name('WMS', 'WMS_CONT_MISS_REQ_REV');
390: --fnd_msg_pub.ADD;
391: --RAISE fnd_api.g_exc_error;
392: END IF;
393: END IF;
394: END IF;
395:

Line 409: RAISE fnd_api.g_exc_error;

405: mdebug(p_lot_number || ' is not a valid lot', 1);
406: END IF;
407: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_LOT');
408: fnd_msg_pub.ADD;
409: RAISE fnd_api.g_exc_error;
410: END IF;
411: ELSE
412: --Lots not supported for container items currently. Allow to use lot controlled items
413: IF (l_debug = 1) THEN

Line 418: --RAISE fnd_api.g_exc_error;

414: mdebug('Generate_LPN is missing lot for lot container item..ok', 1);
415: END IF;
416: --fnd_message.set_name('WMS', 'WMS_CONT_MISS_REQ_LOT');
417: --fnd_msg_pub.ADD;
418: --RAISE fnd_api.g_exc_error;
419: END IF;
420: END IF;
421: END IF;
422:

Line 434: RAISE fnd_api.g_exc_error;

430: mdebug(p_to_serial_number || ' failed MTL_Serial_Check', 1);
431: END IF;
432: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_SER');
433: fnd_msg_pub.ADD;
434: RAISE fnd_api.g_exc_error;
435: END IF;
436:
437: -- Check that in the case of a range of serial numbers, that the
438: -- inputted p_quantity equals the amount of items in the serial range.

Line 446: RAISE fnd_api.g_exc_error;

442: mdebug(p_quantity || ' does not match sn range qty of ' || l_quantity_serial, 1);
443: END IF;
444: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_X_QTY');
445: fnd_msg_pub.ADD;
446: RAISE fnd_api.g_exc_error;
447: END IF;
448: END IF;
449:
450: -- Get the serial number length.

Line 468: RAISE fnd_api.g_exc_error;

464: mdebug(l_current_serial || 'failed validate_serial', 1);
465: END IF;
466: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_SER');
467: fnd_msg_pub.ADD;
468: RAISE fnd_api.g_exc_error;
469: END IF;
470: ELSE
471: -- Subinventory was not given so will need to do
472: -- alternative non-standard serial number validation.

Line 482: RAISE fnd_api.g_exc_error;

478: mdebug(l_current_serial || ' could not be found in MTL_SERIAL_NUMBERS', 1);
479: END IF;
480: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_SER');
481: fnd_msg_pub.ADD;
482: RAISE fnd_api.g_exc_error;
483: END IF;
484:
485: CLOSE serial_validation_cursor;
486: END IF;

Line 510: --RAISE fnd_api.g_exc_error;

506: mdebug('Generate_LPN is missing sn for serial container item..ok', 1);
507: END IF;
508: --fnd_message.set_name('WMS', 'WMS_CONT_MISS_SER_NUM');
509: --fnd_msg_pub.ADD;
510: --RAISE fnd_api.g_exc_error;
511: END IF;
512: END IF;
513: END IF;
514:

Line 523: RAISE fnd_api.g_exc_error;

519: mdebug(p_quantity || ' is a negative qty', 1);
520: END IF;
521: fnd_message.set_name('WMS', 'WMS_CONT_NEG_QTY');
522: fnd_msg_pub.ADD;
523: RAISE fnd_api.g_exc_error;
524: END IF;
525:
526: l_quantity := p_quantity;
527: ELSE

Line 539: RAISE fnd_api.g_exc_error;

535: mdebug(p_source || ' is an invalid source', 1);
536: END IF;
537: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_LPN_CONTEXT');
538: fnd_msg_pub.ADD;
539: RAISE fnd_api.g_exc_error;
540: END IF;
541: END IF;
542:
543: l_progress := 'Validate Cost Group';

Line 553: RAISE fnd_api.g_exc_error;

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');
552: fnd_msg_pub.ADD;
553: RAISE fnd_api.g_exc_error;
554: END IF;
555: END IF;
556: END IF;
557:

Line 579: , p_init_msg_list => fnd_api.g_false

575: l_serial_tbl(1).to_serial_number := p_to_serial_number;
576:
577: WMS_Container_PVT.Auto_Create_LPNs (
578: p_api_version => p_api_version
579: , p_init_msg_list => fnd_api.g_false
580: , p_commit => fnd_api.g_false
581: , x_return_status => x_return_status
582: , x_msg_count => x_msg_count
583: , x_msg_data => x_msg_data

Line 580: , p_commit => fnd_api.g_false

576:
577: WMS_Container_PVT.Auto_Create_LPNs (
578: p_api_version => p_api_version
579: , p_init_msg_list => fnd_api.g_false
580: , p_commit => fnd_api.g_false
581: , x_return_status => x_return_status
582: , x_msg_count => x_msg_count
583: , x_msg_data => x_msg_data
584: , p_caller => 'WMS_Generate_LPN'

Line 597: IF ( x_return_status = fnd_api.g_ret_sts_success ) THEN

593: , x_created_lpns => l_gen_lpn_tbl
594: , p_client_code => p_client_code -- Added for LSP, bug 9087971
595: );
596:
597: IF ( x_return_status = fnd_api.g_ret_sts_success ) THEN
598: p_lpn_id_out := l_gen_lpn_tbl(1).lpn_id;
599: p_lpn_out := l_gen_lpn_tbl(1).license_plate_number;
600: ELSE
601: IF ( l_debug = 1 ) THEN

Line 604: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

600: ELSE
601: IF ( l_debug = 1 ) THEN
602: mdebug('Call to WMS_Container_PVT.Auto_Create_LPNs Failed', G_ERROR);
603: END IF;
604: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
605: END IF;
606:
607: l_progress := 'End of API body';
608:

Line 610: IF fnd_api.to_boolean(p_commit) THEN

606:
607: l_progress := 'End of API body';
608:
609: -- Standard check of p_commit.
610: IF fnd_api.to_boolean(p_commit) THEN
611: COMMIT WORK;
612: END IF;
613:
614: -- Standard call to get message count and if count is 1,

Line 618: WHEN FND_API.G_EXC_ERROR THEN

614: -- Standard call to get message count and if count is 1,
615: -- get message info.
616: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
617: EXCEPTION
618: WHEN FND_API.G_EXC_ERROR THEN
619: x_return_status := fnd_api.g_ret_sts_error;
620: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
621: IF (l_debug = 1) THEN
622: FOR i in 1..x_msg_count LOOP

Line 619: x_return_status := fnd_api.g_ret_sts_error;

615: -- get message info.
616: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
617: EXCEPTION
618: WHEN FND_API.G_EXC_ERROR THEN
619: x_return_status := fnd_api.g_ret_sts_error;
620: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
621: IF (l_debug = 1) THEN
622: FOR i in 1..x_msg_count LOOP
623: l_msgdata := substr(l_msgdata||' | '||substr(fnd_msg_pub.get(x_msg_count-i+1, 'F'), 0, 200),1,2000);

Line 630: x_return_status := fnd_api.g_ret_sts_unexp_error;

626: mdebug('msg: '||l_msgdata, G_ERROR);
627: END IF;
628: ROLLBACK TO GENERATE_LPN_PUB;
629: WHEN OTHERS THEN
630: x_return_status := fnd_api.g_ret_sts_unexp_error;
631: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
632: IF (l_debug = 1) THEN
633: mdebug(l_api_name ||' Error progress='||l_progress||' SQL error: '|| SQLERRM(SQLCODE), G_ERROR);
634: END IF;

Line 642: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,

638: -- ----------------------------------------------------------------------------------
639: -- ----------------------------------------------------------------------------------
640: PROCEDURE associate_lpn(
641: p_api_version IN NUMBER,
642: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
643: p_commit IN VARCHAR2 := fnd_api.g_false,
644: p_validation_level IN NUMBER := fnd_api.g_valid_level_full,
645: x_return_status OUT NOCOPY VARCHAR2,
646: x_msg_count OUT NOCOPY NUMBER,

Line 643: p_commit IN VARCHAR2 := fnd_api.g_false,

639: -- ----------------------------------------------------------------------------------
640: PROCEDURE associate_lpn(
641: p_api_version IN NUMBER,
642: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
643: p_commit IN VARCHAR2 := fnd_api.g_false,
644: p_validation_level IN NUMBER := fnd_api.g_valid_level_full,
645: x_return_status OUT NOCOPY VARCHAR2,
646: x_msg_count OUT NOCOPY NUMBER,
647: x_msg_data OUT NOCOPY VARCHAR2,

Line 644: p_validation_level IN NUMBER := fnd_api.g_valid_level_full,

640: PROCEDURE associate_lpn(
641: p_api_version IN NUMBER,
642: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
643: p_commit IN VARCHAR2 := fnd_api.g_false,
644: p_validation_level IN NUMBER := fnd_api.g_valid_level_full,
645: x_return_status OUT NOCOPY VARCHAR2,
646: x_msg_count OUT NOCOPY NUMBER,
647: x_msg_data OUT NOCOPY VARCHAR2,
648: p_lpn_id IN NUMBER,

Line 686: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN

682: -- Standard Start of API savepoint
683: SAVEPOINT associate_lpn_pub;
684:
685: -- Standard call to check for call compatibility.
686: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
687: fnd_message.set_name('WMS', 'WMS_CONT_INCOMPATIBLE_API_CALL');
688: fnd_msg_pub.ADD;
689: RAISE fnd_api.g_exc_unexpected_error;
690: END IF;

Line 689: RAISE fnd_api.g_exc_unexpected_error;

685: -- Standard call to check for call compatibility.
686: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
687: fnd_message.set_name('WMS', 'WMS_CONT_INCOMPATIBLE_API_CALL');
688: fnd_msg_pub.ADD;
689: RAISE fnd_api.g_exc_unexpected_error;
690: END IF;
691:
692: -- Initialize message list if p_init_msg_list is set to TRUE.
693: IF fnd_api.to_boolean(p_init_msg_list) THEN

Line 693: IF fnd_api.to_boolean(p_init_msg_list) THEN

689: RAISE fnd_api.g_exc_unexpected_error;
690: END IF;
691:
692: -- Initialize message list if p_init_msg_list is set to TRUE.
693: IF fnd_api.to_boolean(p_init_msg_list) THEN
694: fnd_msg_pub.initialize;
695: END IF;
696:
697: -- Initialize API return status to success

Line 698: x_return_status := fnd_api.g_ret_sts_success;

694: fnd_msg_pub.initialize;
695: END IF;
696:
697: -- Initialize API return status to success
698: x_return_status := fnd_api.g_ret_sts_success;
699:
700: -- API body
701: IF (l_debug = 1) THEN
702: mdebug('Call to Associate_LPN API', G_MESSAGE);

Line 709: IF (p_validation_level = fnd_api.g_valid_level_full) THEN

705: mdebug('cg=' ||p_cost_group_id|| ' srctype=' ||p_source_type_id||' srchdr='||p_source_header_id||' srcln='||p_source_line_id, G_INFO);
706: END IF;
707:
708: /* Validate all inputs if validation level is set to full */
709: IF (p_validation_level = fnd_api.g_valid_level_full) THEN
710: /* Check that lpn id is given */
711: IF (p_lpn_id IS NULL) THEN
712: fnd_message.set_name('WMS', 'WMS_CONT_LPN_NOT_GIVEN');
713: fnd_msg_pub.ADD;

Line 714: RAISE fnd_api.g_exc_error;

710: /* Check that lpn id is given */
711: IF (p_lpn_id IS NULL) THEN
712: fnd_message.set_name('WMS', 'WMS_CONT_LPN_NOT_GIVEN');
713: fnd_msg_pub.ADD;
714: RAISE fnd_api.g_exc_error;
715: END IF;
716:
717: /* Validate the LPN */
718: l_lpn.lpn_id := p_lpn_id;

Line 739: RAISE fnd_api.g_exc_error;

735: mdebug(p_organization_id || ' is an invalid org id', 1);
736: END IF;
737: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_ORG');
738: fnd_msg_pub.ADD;
739: RAISE fnd_api.g_exc_error;
740: END IF;
741:
742: /* Validate Subinventory */
743: IF (p_subinventory IS NOT NULL) THEN

Line 753: RAISE fnd_api.g_exc_error;

749: mdebug(p_subinventory || ' is an invalid sub', 1);
750: END IF;
751: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_SUB');
752: fnd_msg_pub.ADD;
753: RAISE fnd_api.g_exc_error;
754: END IF;
755: END IF;
756:
757: /* Validate Locator */

Line 763: RAISE fnd_api.g_exc_error;

759: IF (l_sub.locator_type IN (2, 3)) THEN
760: IF (p_locator_id IS NULL) THEN
761: fnd_message.set_name('WMS', 'WMS_CONT_MISS_REQ_LOC');
762: fnd_msg_pub.ADD;
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);

Line 775: RAISE fnd_api.g_exc_error;

771: mdebug(p_locator_id || ' is an invalid loc id', 1);
772: END IF;
773: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_LOC');
774: fnd_msg_pub.ADD;
775: RAISE fnd_api.g_exc_error;
776: END IF;
777: END IF;
778: END IF;
779:

Line 792: RAISE fnd_api.g_exc_error;

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');
791: fnd_msg_pub.ADD;
792: RAISE fnd_api.g_exc_error;
793: END IF;
794:
795: IF (l_container_item.container_item_flag = 'N') THEN
796: IF (l_debug = 1) THEN

Line 801: RAISE fnd_api.g_exc_error;

797: mdebug(p_container_item_id || ' is not a container item', 1);
798: END IF;
799: fnd_message.set_name('WMS', 'WMS_CONT_ITEM_NOT_A_CONT');
800: fnd_msg_pub.ADD;
801: RAISE fnd_api.g_exc_error;
802: END IF;
803:
804: IF (l_container_item.unit_weight IS NOT NULL) THEN
805: IF (l_lpn.gross_weight IS NOT NULL) THEN

Line 825: RAISE fnd_api.g_exc_error;

821: END IF;
822: ELSE
823: fnd_message.set_name('WMS', 'WMS_CONT_CONTAINER_NOT_GIVEN');
824: fnd_msg_pub.ADD;
825: RAISE fnd_api.g_exc_error;
826: END IF;
827:
828: /* Validate Revision */
829: IF (p_container_item_id IS NOT NULL) THEN

Line 840: RAISE fnd_api.g_exc_error;

836: mdebug(p_revision || ' is an invalid rev', 1);
837: END IF;
838: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_REV');
839: fnd_msg_pub.ADD;
840: RAISE fnd_api.g_exc_error;
841: END IF;
842: ELSE
843: --Rev not supported for container items currently. Allow to use rev controlled items
844: IF (l_debug = 1) THEN

Line 849: --RAISE fnd_api.g_exc_error;

845: mdebug('Associate_LPN is missing the rev for rev container item..ok', 1);
846: END IF;
847: --fnd_message.set_name('WMS', 'WMS_CONT_MISS_REQ_REV');
848: --fnd_msg_pub.ADD;
849: --RAISE fnd_api.g_exc_error;
850: END IF;
851: END IF;
852: END IF;
853:

Line 867: RAISE fnd_api.g_exc_error;

863: mdebug(p_lot_number || ' is not a valid lot', 1);
864: END IF;
865: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_LOT');
866: fnd_msg_pub.ADD;
867: RAISE fnd_api.g_exc_error;
868: END IF;
869: ELSE
870: --Lots not supported for container items currently. Allow to use lot controlled items
871: IF (l_debug = 1) THEN

Line 876: --RAISE fnd_api.g_exc_error;

872: mdebug('Associate_LPN is missing lot for lot container item..ok', 1);
873: END IF;
874: --fnd_message.set_name('WMS', 'WMS_CONT_MISS_REQ_LOT');
875: --fnd_msg_pub.ADD;
876: --RAISE fnd_api.g_exc_error;
877: END IF;
878: END IF;
879: END IF;
880:

Line 894: RAISE fnd_api.g_exc_error;

890: mdebug(p_serial_number || ' is an invalid sn', 1);
891: END IF;
892: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_SER');
893: fnd_msg_pub.ADD;
894: RAISE fnd_api.g_exc_error;
895: END IF;
896: ELSE
897: --SN not supported for container items currently. Allow to use serial controlled items
898: IF (l_debug = 1) THEN

Line 903: --RAISE fnd_api.g_exc_error;

899: mdebug('Associate_LPN is missing sn for serial container item..ok', 1);
900: END IF;
901: --fnd_message.set_name('WMS', 'WMS_CONT_MISS_REQ_SER');
902: --fnd_msg_pub.ADD;
903: --RAISE fnd_api.g_exc_error;
904: END IF;
905: END IF;
906: END IF;
907:

Line 918: RAISE fnd_api.g_exc_error;

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');
917: fnd_msg_pub.ADD;
918: RAISE fnd_api.g_exc_error;
919: END IF;
920: END IF;
921: END IF;
922:

Line 927: IF (p_validation_level <> fnd_api.g_valid_level_full) THEN

923: /* End of input validation */
924:
925: -- Necessary validation to get local values
926: -- if full validation was not performed
927: IF (p_validation_level <> fnd_api.g_valid_level_full) THEN
928: /* Validate the LPN */
929: l_lpn.lpn_id := p_lpn_id;
930: l_lpn.license_plate_number := NULL;
931: l_result := validate_lpn(l_lpn);

Line 947: RAISE fnd_api.g_exc_error;

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

Line 958: RAISE fnd_api.g_exc_error;

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;
960:
961: IF (l_container_item.container_item_flag = 'N') THEN
962: fnd_message.set_name('WMS', 'WMS_CONT_ITEM_NOT_A_CONT');

Line 964: RAISE fnd_api.g_exc_error;

960:
961: IF (l_container_item.container_item_flag = 'N') THEN
962: fnd_message.set_name('WMS', 'WMS_CONT_ITEM_NOT_A_CONT');
963: fnd_msg_pub.ADD;
964: RAISE fnd_api.g_exc_error;
965: END IF;
966:
967: IF (l_container_item.unit_weight IS NOT NULL) THEN
968: IF (l_lpn.gross_weight IS NOT NULL) THEN

Line 988: RAISE fnd_api.g_exc_error;

984: END IF;
985: ELSE
986: fnd_message.set_name('WMS', 'WMS_CONT_CONTAINER_NOT_GIVEN');
987: fnd_msg_pub.ADD;
988: RAISE fnd_api.g_exc_error;
989: END IF;
990: END IF;
991:
992: IF (l_insert_update_flag = 'u') THEN

Line 1131: IF fnd_api.to_boolean(p_commit) THEN

1127:
1128: -- End of API body
1129:
1130: -- Standard check of p_commit.
1131: IF fnd_api.to_boolean(p_commit) THEN
1132: COMMIT WORK;
1133: END IF;
1134:
1135: -- Standard call to get message count and if count is 1,

Line 1139: WHEN fnd_api.g_exc_error THEN

1135: -- Standard call to get message count and if count is 1,
1136: -- get message info.
1137: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1138: EXCEPTION
1139: WHEN fnd_api.g_exc_error THEN
1140: ROLLBACK TO associate_lpn_pub;
1141: x_return_status := fnd_api.g_ret_sts_error;
1142: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1143: WHEN fnd_api.g_exc_unexpected_error THEN

Line 1141: x_return_status := fnd_api.g_ret_sts_error;

1137: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1138: EXCEPTION
1139: WHEN fnd_api.g_exc_error THEN
1140: ROLLBACK TO associate_lpn_pub;
1141: x_return_status := fnd_api.g_ret_sts_error;
1142: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1143: WHEN fnd_api.g_exc_unexpected_error THEN
1144: ROLLBACK TO associate_lpn_pub;
1145: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 1143: WHEN fnd_api.g_exc_unexpected_error THEN

1139: WHEN fnd_api.g_exc_error THEN
1140: ROLLBACK TO associate_lpn_pub;
1141: x_return_status := fnd_api.g_ret_sts_error;
1142: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1143: WHEN fnd_api.g_exc_unexpected_error THEN
1144: ROLLBACK TO associate_lpn_pub;
1145: x_return_status := fnd_api.g_ret_sts_unexp_error;
1146: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1147: WHEN OTHERS THEN

Line 1145: x_return_status := fnd_api.g_ret_sts_unexp_error;

1141: x_return_status := fnd_api.g_ret_sts_error;
1142: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1143: WHEN fnd_api.g_exc_unexpected_error THEN
1144: ROLLBACK TO associate_lpn_pub;
1145: x_return_status := fnd_api.g_ret_sts_unexp_error;
1146: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1147: WHEN OTHERS THEN
1148: ROLLBACK TO associate_lpn_pub;
1149: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 1149: x_return_status := fnd_api.g_ret_sts_unexp_error;

1145: x_return_status := fnd_api.g_ret_sts_unexp_error;
1146: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1147: WHEN OTHERS THEN
1148: ROLLBACK TO associate_lpn_pub;
1149: x_return_status := fnd_api.g_ret_sts_unexp_error;
1150:
1151: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
1152: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
1153: END IF;

Line 1163: , p_init_msg_list IN VARCHAR2 := fnd_api.g_false

1159: -- ----------------------------------------------------------------------------------
1160:
1161: PROCEDURE Create_LPN (
1162: p_api_version IN NUMBER
1163: , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1164: , p_commit IN VARCHAR2 := fnd_api.g_false
1165: , p_validation_level IN NUMBER := fnd_api.g_valid_level_full
1166: , x_return_status OUT NOCOPY VARCHAR2
1167: , x_msg_count OUT NOCOPY NUMBER

Line 1164: , p_commit IN VARCHAR2 := fnd_api.g_false

1160:
1161: PROCEDURE Create_LPN (
1162: p_api_version IN NUMBER
1163: , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1164: , p_commit IN VARCHAR2 := fnd_api.g_false
1165: , p_validation_level IN NUMBER := fnd_api.g_valid_level_full
1166: , x_return_status OUT NOCOPY VARCHAR2
1167: , x_msg_count OUT NOCOPY NUMBER
1168: , x_msg_data OUT NOCOPY VARCHAR2

Line 1165: , p_validation_level IN NUMBER := fnd_api.g_valid_level_full

1161: PROCEDURE Create_LPN (
1162: p_api_version IN NUMBER
1163: , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1164: , p_commit IN VARCHAR2 := fnd_api.g_false
1165: , p_validation_level IN NUMBER := fnd_api.g_valid_level_full
1166: , x_return_status OUT NOCOPY VARCHAR2
1167: , x_msg_count OUT NOCOPY NUMBER
1168: , x_msg_data OUT NOCOPY VARCHAR2
1169: , p_lpn IN VARCHAR2

Line 1204: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN

1200: -- Standard Start of API savepoint
1201: SAVEPOINT create_lpn_pub;
1202:
1203: -- Standard call to check for call compatibility.
1204: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
1205: fnd_message.set_name('WMS', 'WMS_CONT_INCOMPATIBLE_API_CALL');
1206: fnd_msg_pub.ADD;
1207: RAISE fnd_api.g_exc_unexpected_error;
1208: END IF;

Line 1207: RAISE fnd_api.g_exc_unexpected_error;

1203: -- Standard call to check for call compatibility.
1204: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
1205: fnd_message.set_name('WMS', 'WMS_CONT_INCOMPATIBLE_API_CALL');
1206: fnd_msg_pub.ADD;
1207: RAISE fnd_api.g_exc_unexpected_error;
1208: END IF;
1209:
1210: -- Initialize message list if p_init_msg_list is set to TRUE.
1211: IF fnd_api.to_boolean(p_init_msg_list) THEN

Line 1211: IF fnd_api.to_boolean(p_init_msg_list) THEN

1207: RAISE fnd_api.g_exc_unexpected_error;
1208: END IF;
1209:
1210: -- Initialize message list if p_init_msg_list is set to TRUE.
1211: IF fnd_api.to_boolean(p_init_msg_list) THEN
1212: fnd_msg_pub.initialize;
1213: END IF;
1214:
1215: -- Initialize API return status to success

Line 1216: x_return_status := fnd_api.g_ret_sts_success;

1212: fnd_msg_pub.initialize;
1213: END IF;
1214:
1215: -- Initialize API return status to success
1216: x_return_status := fnd_api.g_ret_sts_success;
1217: -- API body
1218: IF (l_debug = 1) THEN
1219: mdebug('Call to Create_LPN orgid=' ||p_organization_id|| ' sub=' ||p_subinventory|| ' loc=' ||p_locator_id|| ' lpn=' ||p_lpn|| ' src=' ||p_source, G_INFO);
1220: mdebug('cntitemid=' ||p_container_item_id|| ' rev=' ||p_revision|| ' lot=' ||p_lot_number|| ' sn=' ||p_serial_number|| ' cstgrp=' ||p_cost_group_id, G_INFO);

Line 1225: IF (p_validation_level = fnd_api.g_valid_level_full) THEN

1221: mdebug('prntlpnid=' ||p_parent_lpn_id|| ' scrtype=' ||p_source_type_id|| ' srchdr=' ||p_source_header_id|| ' srcname=' ||p_source_name|| ' srcln=' ||p_source_line_id||' srclndet='||p_source_line_detail_id, G_INFO);
1222: END IF;
1223:
1224: /* Validate all inputs if validation level is set to full */
1225: IF (p_validation_level = fnd_api.g_valid_level_full) THEN
1226: /* Validate LPN */
1227: l_lpn.license_plate_number := p_lpn;
1228: l_lpn.lpn_id := NULL;
1229: l_result := validate_lpn(l_lpn);

Line 1237: RAISE fnd_api.g_exc_error;

1233: mdebug(p_lpn || ' failed LPN validation', 1);
1234: END IF;
1235: fnd_message.set_name('WMS', 'WMS_CONT_DUPLICATE_LPN');
1236: fnd_msg_pub.ADD;
1237: RAISE fnd_api.g_exc_error;
1238: END IF;
1239:
1240: /* Validate Parent LPN */
1241: IF (p_parent_lpn_id IS NOT NULL) THEN

Line 1252: RAISE fnd_api.g_exc_error;

1248: mdebug(p_parent_lpn_id || ' parent LPN failed validation', 1);
1249: END IF;
1250: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_LPN');
1251: fnd_msg_pub.ADD;
1252: RAISE fnd_api.g_exc_error;
1253: END IF;
1254: END IF;
1255:
1256: /* Validate Organization ID */

Line 1266: RAISE fnd_api.g_exc_error;

1262: mdebug(p_organization_id || ' is an invalid Org', 1);
1263: END IF;
1264: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_ORG');
1265: fnd_msg_pub.ADD;
1266: RAISE fnd_api.g_exc_error;
1267: END IF;
1268:
1269: /* Validate Subinventory */
1270: IF (p_subinventory IS NOT NULL) THEN

Line 1280: RAISE fnd_api.g_exc_error;

1276: mdebug(p_subinventory || ' Invalid Subinventory', 1);
1277: END IF;
1278: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_SUB');
1279: fnd_msg_pub.ADD;
1280: RAISE fnd_api.g_exc_error;
1281: END IF;
1282: END IF;
1283:
1284: /* Validate Locator */

Line 1293: RAISE fnd_api.g_exc_error;

1289: mdebug('Missing required locator', 1);
1290: END IF;
1291: fnd_message.set_name('WMS', 'WMS_CONT_MISS_REQ_LOC');
1292: fnd_msg_pub.ADD;
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);

Line 1305: RAISE fnd_api.g_exc_error;

1301: mdebug(p_locator_id || ' is an invalid locator', 1);
1302: END IF;
1303: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_LOC');
1304: fnd_msg_pub.ADD;
1305: RAISE fnd_api.g_exc_error;
1306: END IF;
1307: END IF;
1308: END IF;
1309:

Line 1321: RAISE fnd_api.g_exc_error;

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');
1320: fnd_msg_pub.ADD;
1321: RAISE fnd_api.g_exc_error;
1322: END IF;
1323:
1324: IF (l_container_item.container_item_flag = 'N') THEN
1325: IF (l_debug = 1) THEN

Line 1330: RAISE fnd_api.g_exc_error;

1326: mdebug(p_container_item_id || ' is not a container', 1);
1327: END IF;
1328: fnd_message.set_name('WMS', 'WMS_CONT_ITEM_NOT_A_CONTAINER');
1329: fnd_msg_pub.ADD;
1330: RAISE fnd_api.g_exc_error;
1331: END IF;
1332: END IF;
1333:
1334: /* Validate Revision */

Line 1346: RAISE fnd_api.g_exc_error;

1342: mdebug(p_revision || ' is an invalid Revision', 1);
1343: END IF;
1344: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_REV');
1345: fnd_msg_pub.ADD;
1346: RAISE fnd_api.g_exc_error;
1347: END IF;
1348: ELSE
1349: --Revision not supported for container items currently. Allow to use rev controlled items
1350: IF (l_debug = 1) THEN

Line 1355: --RAISE fnd_api.g_exc_error;

1351: mdebug('Generate_LPN is missing rev for lot container item..ok', 1);
1352: END IF;
1353: --fnd_message.set_name('WMS', 'WMS_CONT_MISS_REQ_REV');
1354: --fnd_msg_pub.ADD;
1355: --RAISE fnd_api.g_exc_error;
1356: END IF;
1357: END IF;
1358: END IF;
1359:

Line 1373: RAISE fnd_api.g_exc_error;

1369: mdebug(p_lot_number || ' is an invalid lot', 1);
1370: END IF;
1371: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_LOT');
1372: fnd_msg_pub.ADD;
1373: RAISE fnd_api.g_exc_error;
1374: END IF;
1375: ELSE
1376: --Lots not supported for container items currently. Allow to use lot controlled items
1377: IF (l_debug = 1) THEN

Line 1382: RAISE fnd_api.g_exc_error;

1378: mdebug('Generate_LPN is missing lot for lot container item..ok', 1);
1379: END IF;
1380: fnd_message.set_name('WMS', 'WMS_CONT_MISS_REQ_LOT');
1381: fnd_msg_pub.ADD;
1382: RAISE fnd_api.g_exc_error;
1383: END IF;
1384: END IF;
1385: END IF;
1386:

Line 1400: RAISE fnd_api.g_exc_error;

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');
1399: fnd_msg_pub.ADD;
1400: RAISE fnd_api.g_exc_error;
1401: END IF;
1402: ELSE
1403: --SN not supported for container items currently. Allow to use serial controlled items
1404: IF (l_debug = 1) THEN

Line 1409: --RAISE fnd_api.g_exc_error;

1405: mdebug('Create_LPN is missing sn for serial container item..ok', 1);
1406: END IF;
1407: --fnd_message.set_name('WMS', 'WMS_CONT_MISS_REQ_SER');
1408: --fnd_msg_pub.ADD;
1409: --RAISE fnd_api.g_exc_error;
1410: END IF;
1411: END IF;
1412: END IF;
1413:

Line 1422: RAISE fnd_api.g_exc_error;

1418: mdebug(p_source || 'is an invalid source type', 1);
1419: END IF;
1420: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_LPN_CONTEXT');
1421: fnd_msg_pub.ADD;
1422: RAISE fnd_api.g_exc_error;
1423: END IF;
1424: END IF;
1425:
1426: /* Validate Cost Group */

Line 1436: RAISE fnd_api.g_exc_error;

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');
1435: fnd_msg_pub.ADD;
1436: RAISE fnd_api.g_exc_error;
1437: END IF;
1438: END IF;
1439: END IF;
1440:

Line 1469: IF ( x_return_status <> fnd_api.g_ret_sts_success ) THEN

1465: , p_source_line_id => p_source_line_id
1466: , p_source_line_detail_id => p_source_line_detail_id
1467: , x_lpn_id => x_lpn_id );
1468:
1469: IF ( x_return_status <> fnd_api.g_ret_sts_success ) THEN
1470: IF ( l_debug = 1 ) THEN
1471: mdebug('Call to WMS_CONTAINER_PVT.Create_LPN Failed', G_ERROR);
1472: END IF;
1473: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 1473: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

1469: IF ( x_return_status <> fnd_api.g_ret_sts_success ) THEN
1470: IF ( l_debug = 1 ) THEN
1471: mdebug('Call to WMS_CONTAINER_PVT.Create_LPN Failed', G_ERROR);
1472: END IF;
1473: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1474: END IF;
1475:
1476: -- Standard check of p_commit.
1477: IF fnd_api.to_boolean(p_commit) THEN

Line 1477: IF fnd_api.to_boolean(p_commit) THEN

1473: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1474: END IF;
1475:
1476: -- Standard check of p_commit.
1477: IF fnd_api.to_boolean(p_commit) THEN
1478: COMMIT WORK;
1479: END IF;
1480:
1481: -- Standard call to get message count and if count is 1,

Line 1485: WHEN fnd_api.g_exc_error THEN

1481: -- Standard call to get message count and if count is 1,
1482: -- get message info.
1483: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1484: EXCEPTION
1485: WHEN fnd_api.g_exc_error THEN
1486: ROLLBACK TO create_lpn_pub;
1487: x_return_status := fnd_api.g_ret_sts_error;
1488: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1489: WHEN fnd_api.g_exc_unexpected_error THEN

Line 1487: x_return_status := fnd_api.g_ret_sts_error;

1483: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1484: EXCEPTION
1485: WHEN fnd_api.g_exc_error THEN
1486: ROLLBACK TO create_lpn_pub;
1487: x_return_status := fnd_api.g_ret_sts_error;
1488: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1489: WHEN fnd_api.g_exc_unexpected_error THEN
1490: ROLLBACK TO create_lpn_pub;
1491: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 1489: WHEN fnd_api.g_exc_unexpected_error THEN

1485: WHEN fnd_api.g_exc_error THEN
1486: ROLLBACK TO create_lpn_pub;
1487: x_return_status := fnd_api.g_ret_sts_error;
1488: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1489: WHEN fnd_api.g_exc_unexpected_error THEN
1490: ROLLBACK TO create_lpn_pub;
1491: x_return_status := fnd_api.g_ret_sts_unexp_error;
1492: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1493: WHEN OTHERS THEN

Line 1491: x_return_status := fnd_api.g_ret_sts_unexp_error;

1487: x_return_status := fnd_api.g_ret_sts_error;
1488: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1489: WHEN fnd_api.g_exc_unexpected_error THEN
1490: ROLLBACK TO create_lpn_pub;
1491: x_return_status := fnd_api.g_ret_sts_unexp_error;
1492: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1493: WHEN OTHERS THEN
1494: ROLLBACK TO create_lpn_pub;
1495: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 1495: x_return_status := fnd_api.g_ret_sts_unexp_error;

1491: x_return_status := fnd_api.g_ret_sts_unexp_error;
1492: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1493: WHEN OTHERS THEN
1494: ROLLBACK TO create_lpn_pub;
1495: x_return_status := fnd_api.g_ret_sts_unexp_error;
1496:
1497: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
1498: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
1499: END IF;

Line 1508: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,

1504: -- ----------------------------------------------------------------------------------
1505: -- ----------------------------------------------------------------------------------
1506: PROCEDURE modify_lpn(
1507: p_api_version IN NUMBER,
1508: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
1509: p_commit IN VARCHAR2 := fnd_api.g_false,
1510: p_validation_level IN NUMBER := fnd_api.g_valid_level_full,
1511: x_return_status OUT NOCOPY VARCHAR2,
1512: x_msg_count OUT NOCOPY NUMBER,

Line 1509: p_commit IN VARCHAR2 := fnd_api.g_false,

1505: -- ----------------------------------------------------------------------------------
1506: PROCEDURE modify_lpn(
1507: p_api_version IN NUMBER,
1508: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
1509: p_commit IN VARCHAR2 := fnd_api.g_false,
1510: p_validation_level IN NUMBER := fnd_api.g_valid_level_full,
1511: x_return_status OUT NOCOPY VARCHAR2,
1512: x_msg_count OUT NOCOPY NUMBER,
1513: x_msg_data OUT NOCOPY VARCHAR2,

Line 1510: p_validation_level IN NUMBER := fnd_api.g_valid_level_full,

1506: PROCEDURE modify_lpn(
1507: p_api_version IN NUMBER,
1508: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
1509: p_commit IN VARCHAR2 := fnd_api.g_false,
1510: p_validation_level IN NUMBER := fnd_api.g_valid_level_full,
1511: x_return_status OUT NOCOPY VARCHAR2,
1512: x_msg_count OUT NOCOPY NUMBER,
1513: x_msg_data OUT NOCOPY VARCHAR2,
1514: p_lpn IN lpn,

Line 1596: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN

1592: -- Standard Start of API savepoint
1593: SAVEPOINT modify_lpn_pub;
1594:
1595: -- Standard call to check for call compatibility.
1596: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
1597: fnd_message.set_name('WMS', 'WMS_CONT_INCOMPATIBLE_API_CALL');
1598: fnd_msg_pub.ADD;
1599: RAISE fnd_api.g_exc_unexpected_error;
1600: END IF;

Line 1599: RAISE fnd_api.g_exc_unexpected_error;

1595: -- Standard call to check for call compatibility.
1596: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
1597: fnd_message.set_name('WMS', 'WMS_CONT_INCOMPATIBLE_API_CALL');
1598: fnd_msg_pub.ADD;
1599: RAISE fnd_api.g_exc_unexpected_error;
1600: END IF;
1601:
1602: -- Initialize message list if p_init_msg_list is set to TRUE.
1603: IF fnd_api.to_boolean(p_init_msg_list) THEN

Line 1603: IF fnd_api.to_boolean(p_init_msg_list) THEN

1599: RAISE fnd_api.g_exc_unexpected_error;
1600: END IF;
1601:
1602: -- Initialize message list if p_init_msg_list is set to TRUE.
1603: IF fnd_api.to_boolean(p_init_msg_list) THEN
1604: fnd_msg_pub.initialize;
1605: END IF;
1606:
1607: -- Initialize API return status to success

Line 1608: x_return_status := fnd_api.g_ret_sts_success;

1604: fnd_msg_pub.initialize;
1605: END IF;
1606:
1607: -- Initialize API return status to success
1608: x_return_status := fnd_api.g_ret_sts_success;
1609:
1610: -- API body
1611: /* Validate all inputs if validation level is set to full */
1612: IF (p_validation_level = fnd_api.g_valid_level_full) THEN

Line 1612: IF (p_validation_level = fnd_api.g_valid_level_full) THEN

1608: x_return_status := fnd_api.g_ret_sts_success;
1609:
1610: -- API body
1611: /* Validate all inputs if validation level is set to full */
1612: IF (p_validation_level = fnd_api.g_valid_level_full) THEN
1613: /* Validate LPN */
1614: l_lpn.lpn_id := p_lpn.lpn_id;
1615: l_lpn.license_plate_number := NULL;
1616: l_result := validate_lpn(l_lpn);

Line 1621: RAISE fnd_api.g_exc_error;

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

Line 1632: RAISE fnd_api.g_exc_error;

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;
1634: END IF;
1635:
1636: /* Validate Subinventory */

Line 1644: RAISE fnd_api.g_exc_error;

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;
1646: END IF;
1647:
1648: /* Validate Locator */

Line 1654: RAISE fnd_api.g_exc_error;

1650: IF (l_sub.locator_type IN (2, 3)) THEN
1651: IF (p_lpn.locator_id IS NULL) THEN
1652: fnd_message.set_name('WMS', 'WMS_CONT_MISS_REQ_LOC');
1653: fnd_msg_pub.ADD;
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);

Line 1663: RAISE fnd_api.g_exc_error;

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;
1665: END IF;
1666: END IF;
1667:

Line 1676: RAISE fnd_api.g_exc_error;

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;
1678:
1679: IF (l_container_item.container_item_flag = 'N') THEN
1680: fnd_message.set_name('WMS', 'WMS_CONT_ITEM_NOT_A_CONTAINER');

Line 1682: RAISE fnd_api.g_exc_error;

1678:
1679: IF (l_container_item.container_item_flag = 'N') THEN
1680: fnd_message.set_name('WMS', 'WMS_CONT_ITEM_NOT_A_CONTAINER');
1681: fnd_msg_pub.ADD;
1682: RAISE fnd_api.g_exc_error;
1683: END IF;
1684: END IF;
1685:
1686: /* Validate Gross Weight */

Line 1694: RAISE fnd_api.g_exc_error;

1690: mdebug('gross weight= '|| p_lpn.gross_weight, 9);
1691: END IF;
1692: fnd_message.set_name('WMS', 'WMS_CONT_NEG_WEIGHT');
1693: fnd_msg_pub.ADD;
1694: RAISE fnd_api.g_exc_error;
1695: END IF;
1696: END IF;
1697:
1698: /* Validate Content Volume */

Line 1703: RAISE fnd_api.g_exc_error;

1699: IF (p_lpn.content_volume IS NOT NULL) THEN
1700: IF (p_lpn.content_volume < 0) THEN
1701: fnd_message.set_name('WMS', 'WMS_CONT_NEG_VOLUME');
1702: fnd_msg_pub.ADD;
1703: RAISE fnd_api.g_exc_error;
1704: END IF;
1705: END IF;
1706:
1707: /* Validate LPN Status ID */

Line 1712: RAISE fnd_api.g_exc_error;

1708: IF (p_lpn.status_id IS NOT NULL) THEN
1709: IF (p_lpn.status_id NOT IN (1, 2, 3, 4, 5, 6)) THEN
1710: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_STATUS_ID');
1711: fnd_msg_pub.ADD;
1712: RAISE fnd_api.g_exc_error;
1713: END IF;
1714: END IF;
1715:
1716: /* Validate LPN Context */

Line 1721: RAISE fnd_api.g_exc_error;

1717: IF (p_lpn.lpn_context IS NOT NULL) THEN
1718: IF (p_lpn.lpn_context NOT IN (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11)) THEN
1719: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_LPN_CONTEXT');
1720: fnd_msg_pub.ADD;
1721: RAISE fnd_api.g_exc_error;
1722: END IF;
1723: END IF;
1724:
1725: /* Validate Sealed Status */

Line 1730: RAISE fnd_api.g_exc_error;

1726: IF (p_lpn.sealed_status IS NOT NULL) THEN
1727: IF (p_lpn.sealed_status NOT IN (1, 2)) THEN
1728: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_SEALED_STAT');
1729: fnd_msg_pub.ADD;
1730: RAISE fnd_api.g_exc_error;
1731: END IF;
1732: END IF;
1733: END IF;
1734: /* End of input validation */

Line 1740: l_lpn.source_type_id := fnd_api.g_miss_num;

1736:
1737: IF ( p_source_type_id IS NOT NULL ) THEN
1738: l_lpn.source_type_id := p_source_type_id;
1739: ELSIF ( p_lpn.source_type_id IS NULL ) THEN
1740: l_lpn.source_type_id := fnd_api.g_miss_num;
1741: END IF;
1742:
1743: IF ( p_source_header_id IS NOT NULL ) THEN
1744: l_lpn.source_header_id := p_source_header_id;

Line 1746: l_lpn.source_header_id := fnd_api.g_miss_num;

1742:
1743: IF ( p_source_header_id IS NOT NULL ) THEN
1744: l_lpn.source_header_id := p_source_header_id;
1745: ELSIF ( p_lpn.source_header_id IS NULL ) THEN
1746: l_lpn.source_header_id := fnd_api.g_miss_num;
1747: END IF;
1748:
1749: IF ( p_source_line_id IS NOT NULL ) THEN
1750: l_lpn.source_line_id := p_source_line_id;

Line 1752: l_lpn.source_line_id := fnd_api.g_miss_num;

1748:
1749: IF ( p_source_line_id IS NOT NULL ) THEN
1750: l_lpn.source_line_id := p_source_line_id;
1751: ELSIF ( p_lpn.source_line_id IS NULL ) THEN
1752: l_lpn.source_line_id := fnd_api.g_miss_num;
1753: END IF;
1754:
1755: IF ( p_source_line_detail_id IS NOT NULL ) THEN
1756: l_lpn.source_line_detail_id := p_source_line_detail_id;

Line 1758: l_lpn.source_line_detail_id := fnd_api.g_miss_num;

1754:
1755: IF ( p_source_line_detail_id IS NOT NULL ) THEN
1756: l_lpn.source_line_detail_id := p_source_line_detail_id;
1757: ELSIF ( p_lpn.source_line_detail_id IS NULL ) THEN
1758: l_lpn.source_line_detail_id := fnd_api.g_miss_num;
1759: END IF;
1760:
1761: IF ( p_source_name IS NOT NULL ) THEN
1762: l_lpn.source_name := p_source_name;

Line 1764: l_lpn.source_name := fnd_api.g_miss_char;

1760:
1761: IF ( p_source_name IS NOT NULL ) THEN
1762: l_lpn.source_name := p_source_name;
1763: ELSIF ( p_lpn.source_name IS NULL ) THEN
1764: l_lpn.source_name := fnd_api.g_miss_char;
1765: END IF;
1766:
1767: WMS_CONTAINER_PVT.Modify_LPN (
1768: p_api_version => p_api_version

Line 1777: IF ( x_return_status <> fnd_api.g_ret_sts_success ) THEN

1773: , x_msg_count => x_msg_count
1774: , x_msg_data => x_msg_data
1775: , p_lpn => l_lpn );
1776:
1777: IF ( x_return_status <> fnd_api.g_ret_sts_success ) THEN
1778: IF ( l_debug = 1 ) THEN
1779: mdebug('Call to WMS_CONTAINER_PVT.Modify_LPN Failed', G_ERROR);
1780: END IF;
1781: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 1781: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

1777: IF ( x_return_status <> fnd_api.g_ret_sts_success ) THEN
1778: IF ( l_debug = 1 ) THEN
1779: mdebug('Call to WMS_CONTAINER_PVT.Modify_LPN Failed', G_ERROR);
1780: END IF;
1781: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1782: END IF;
1783:
1784: -- Standard check of p_commit.
1785: IF fnd_api.to_boolean(p_commit) THEN

Line 1785: IF fnd_api.to_boolean(p_commit) THEN

1781: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1782: END IF;
1783:
1784: -- Standard check of p_commit.
1785: IF fnd_api.to_boolean(p_commit) THEN
1786: COMMIT WORK;
1787: END IF;
1788:
1789: -- Standard call to get message count and if count is 1,

Line 1793: WHEN fnd_api.g_exc_error THEN

1789: -- Standard call to get message count and if count is 1,
1790: -- get message info.
1791: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1792: EXCEPTION
1793: WHEN fnd_api.g_exc_error THEN
1794: ROLLBACK TO modify_lpn_pub;
1795: x_return_status := fnd_api.g_ret_sts_error;
1796: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1797: WHEN fnd_api.g_exc_unexpected_error THEN

Line 1795: x_return_status := fnd_api.g_ret_sts_error;

1791: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1792: EXCEPTION
1793: WHEN fnd_api.g_exc_error THEN
1794: ROLLBACK TO modify_lpn_pub;
1795: x_return_status := fnd_api.g_ret_sts_error;
1796: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1797: WHEN fnd_api.g_exc_unexpected_error THEN
1798: ROLLBACK TO modify_lpn_pub;
1799: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 1797: WHEN fnd_api.g_exc_unexpected_error THEN

1793: WHEN fnd_api.g_exc_error THEN
1794: ROLLBACK TO modify_lpn_pub;
1795: x_return_status := fnd_api.g_ret_sts_error;
1796: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1797: WHEN fnd_api.g_exc_unexpected_error THEN
1798: ROLLBACK TO modify_lpn_pub;
1799: x_return_status := fnd_api.g_ret_sts_unexp_error;
1800: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1801: WHEN OTHERS THEN

Line 1799: x_return_status := fnd_api.g_ret_sts_unexp_error;

1795: x_return_status := fnd_api.g_ret_sts_error;
1796: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1797: WHEN fnd_api.g_exc_unexpected_error THEN
1798: ROLLBACK TO modify_lpn_pub;
1799: x_return_status := fnd_api.g_ret_sts_unexp_error;
1800: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1801: WHEN OTHERS THEN
1802: ROLLBACK TO modify_lpn_pub;
1803: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 1803: x_return_status := fnd_api.g_ret_sts_unexp_error;

1799: x_return_status := fnd_api.g_ret_sts_unexp_error;
1800: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1801: WHEN OTHERS THEN
1802: ROLLBACK TO modify_lpn_pub;
1803: x_return_status := fnd_api.g_ret_sts_unexp_error;
1804:
1805: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
1806: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
1807: END IF;

Line 1814: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,

1810: END modify_lpn;
1811:
1812: PROCEDURE modify_lpn_wrapper(
1813: p_api_version IN NUMBER,
1814: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
1815: p_commit IN VARCHAR2 := fnd_api.g_false,
1816: p_validation_level IN NUMBER := fnd_api.g_valid_level_full,
1817: x_return_status OUT NOCOPY VARCHAR2,
1818: x_msg_count OUT NOCOPY NUMBER,

Line 1815: p_commit IN VARCHAR2 := fnd_api.g_false,

1811:
1812: PROCEDURE modify_lpn_wrapper(
1813: p_api_version IN NUMBER,
1814: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
1815: p_commit IN VARCHAR2 := fnd_api.g_false,
1816: p_validation_level IN NUMBER := fnd_api.g_valid_level_full,
1817: x_return_status OUT NOCOPY VARCHAR2,
1818: x_msg_count OUT NOCOPY NUMBER,
1819: x_msg_data OUT NOCOPY VARCHAR2,

Line 1816: p_validation_level IN NUMBER := fnd_api.g_valid_level_full,

1812: PROCEDURE modify_lpn_wrapper(
1813: p_api_version IN NUMBER,
1814: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
1815: p_commit IN VARCHAR2 := fnd_api.g_false,
1816: p_validation_level IN NUMBER := fnd_api.g_valid_level_full,
1817: x_return_status OUT NOCOPY VARCHAR2,
1818: x_msg_count OUT NOCOPY NUMBER,
1819: x_msg_data OUT NOCOPY VARCHAR2,
1820: p_lpn_id IN NUMBER,

Line 1849: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN

1845: -- Standard Start of API savepoint
1846: SAVEPOINT modify_lpn_wrapper_pub;
1847:
1848: -- Standard call to check for call compatibility.
1849: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
1850: fnd_message.set_name('WMS', 'WMS_CONT_INCOMPATIBLE_API_CALL');
1851: fnd_msg_pub.ADD;
1852: RAISE fnd_api.g_exc_unexpected_error;
1853: END IF;

Line 1852: RAISE fnd_api.g_exc_unexpected_error;

1848: -- Standard call to check for call compatibility.
1849: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
1850: fnd_message.set_name('WMS', 'WMS_CONT_INCOMPATIBLE_API_CALL');
1851: fnd_msg_pub.ADD;
1852: RAISE fnd_api.g_exc_unexpected_error;
1853: END IF;
1854:
1855: -- Initialize message list if p_init_msg_list is set to TRUE.
1856: IF fnd_api.to_boolean(p_init_msg_list) THEN

Line 1856: IF fnd_api.to_boolean(p_init_msg_list) THEN

1852: RAISE fnd_api.g_exc_unexpected_error;
1853: END IF;
1854:
1855: -- Initialize message list if p_init_msg_list is set to TRUE.
1856: IF fnd_api.to_boolean(p_init_msg_list) THEN
1857: fnd_msg_pub.initialize;
1858: END IF;
1859:
1860: -- Initialize API return status to success

Line 1861: x_return_status := fnd_api.g_ret_sts_success;

1857: fnd_msg_pub.initialize;
1858: END IF;
1859:
1860: -- Initialize API return status to success
1861: x_return_status := fnd_api.g_ret_sts_success;
1862: -- API body
1863:
1864: /* Validate LPN */
1865: l_lpn.lpn_id := p_lpn_id;

Line 1872: RAISE fnd_api.g_exc_error;

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;
1874:
1875: WMS_CONTAINER_PVT.Modify_LPN_Wrapper(
1876: p_api_version => p_api_version

Line 1902: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN

1898: , p_source_name => p_source_name
1899: , p_source_line_id => p_source_line_id
1900: , p_source_line_detail_id => p_source_line_detail_id );
1901:
1902: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN
1903: -- Modify LPN should put the appropriate error message in the stack
1904: RAISE fnd_api.g_exc_error;
1905: END IF;
1906:

Line 1904: RAISE fnd_api.g_exc_error;

1900: , p_source_line_detail_id => p_source_line_detail_id );
1901:
1902: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN
1903: -- Modify LPN should put the appropriate error message in the stack
1904: RAISE fnd_api.g_exc_error;
1905: END IF;
1906:
1907: -- End of API body
1908:

Line 1910: IF fnd_api.to_boolean(p_commit) THEN

1906:
1907: -- End of API body
1908:
1909: -- Standard check of p_commit.
1910: IF fnd_api.to_boolean(p_commit) THEN
1911: COMMIT WORK;
1912: END IF;
1913:
1914: -- Standard call to get message count and if count is 1,

Line 1918: WHEN fnd_api.g_exc_error THEN

1914: -- Standard call to get message count and if count is 1,
1915: -- get message info.
1916: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1917: EXCEPTION
1918: WHEN fnd_api.g_exc_error THEN
1919: ROLLBACK TO modify_lpn_wrapper_pub;
1920: x_return_status := fnd_api.g_ret_sts_error;
1921: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1922: WHEN fnd_api.g_exc_unexpected_error THEN

Line 1920: x_return_status := fnd_api.g_ret_sts_error;

1916: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1917: EXCEPTION
1918: WHEN fnd_api.g_exc_error THEN
1919: ROLLBACK TO modify_lpn_wrapper_pub;
1920: x_return_status := fnd_api.g_ret_sts_error;
1921: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1922: WHEN fnd_api.g_exc_unexpected_error THEN
1923: ROLLBACK TO modify_lpn_wrapper_pub;
1924: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 1922: WHEN fnd_api.g_exc_unexpected_error THEN

1918: WHEN fnd_api.g_exc_error THEN
1919: ROLLBACK TO modify_lpn_wrapper_pub;
1920: x_return_status := fnd_api.g_ret_sts_error;
1921: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1922: WHEN fnd_api.g_exc_unexpected_error THEN
1923: ROLLBACK TO modify_lpn_wrapper_pub;
1924: x_return_status := fnd_api.g_ret_sts_unexp_error;
1925: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1926: WHEN OTHERS THEN

Line 1924: x_return_status := fnd_api.g_ret_sts_unexp_error;

1920: x_return_status := fnd_api.g_ret_sts_error;
1921: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1922: WHEN fnd_api.g_exc_unexpected_error THEN
1923: ROLLBACK TO modify_lpn_wrapper_pub;
1924: x_return_status := fnd_api.g_ret_sts_unexp_error;
1925: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1926: WHEN OTHERS THEN
1927: ROLLBACK TO modify_lpn_wrapper_pub;
1928: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 1928: x_return_status := fnd_api.g_ret_sts_unexp_error;

1924: x_return_status := fnd_api.g_ret_sts_unexp_error;
1925: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1926: WHEN OTHERS THEN
1927: ROLLBACK TO modify_lpn_wrapper_pub;
1928: x_return_status := fnd_api.g_ret_sts_unexp_error;
1929:
1930: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
1931: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
1932: END IF;

Line 1941: , p_init_msg_list IN VARCHAR2 := fnd_api.g_false

1937: -- ----------------------------------------------------------------------------------
1938: -- ----------------------------------------------------------------------------------
1939: PROCEDURE PackUnpack_Container (
1940: p_api_version IN NUMBER
1941: , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1942: , p_commit IN VARCHAR2 := fnd_api.g_false
1943: , p_validation_level IN NUMBER := fnd_api.g_valid_level_full
1944: , x_return_status OUT NOCOPY VARCHAR2
1945: , x_msg_count OUT NOCOPY NUMBER

Line 1942: , p_commit IN VARCHAR2 := fnd_api.g_false

1938: -- ----------------------------------------------------------------------------------
1939: PROCEDURE PackUnpack_Container (
1940: p_api_version IN NUMBER
1941: , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1942: , p_commit IN VARCHAR2 := fnd_api.g_false
1943: , p_validation_level IN NUMBER := fnd_api.g_valid_level_full
1944: , x_return_status OUT NOCOPY VARCHAR2
1945: , x_msg_count OUT NOCOPY NUMBER
1946: , x_msg_data OUT NOCOPY VARCHAR2

Line 1943: , p_validation_level IN NUMBER := fnd_api.g_valid_level_full

1939: PROCEDURE PackUnpack_Container (
1940: p_api_version IN NUMBER
1941: , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1942: , p_commit IN VARCHAR2 := fnd_api.g_false
1943: , p_validation_level IN NUMBER := fnd_api.g_valid_level_full
1944: , x_return_status OUT NOCOPY VARCHAR2
1945: , x_msg_count OUT NOCOPY NUMBER
1946: , x_msg_data OUT NOCOPY VARCHAR2
1947: , p_lpn_id IN NUMBER

Line 2038: l_null_cost_group_val NUMBER := -1 * fnd_api.g_miss_num;

2034:
2035: -- Bug# 1546081
2036: -- l_child_lpn nested_children_cursor%ROWTYPE;
2037: l_item_quantity NUMBER;
2038: l_null_cost_group_val NUMBER := -1 * fnd_api.g_miss_num;
2039:
2040: CURSOR existing_record_cursor IS
2041: -- Bug# 1546081
2042: -- SELECT wlc.*

Line 2167: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN

2163: -- Standard Start of API savepoint
2164: SAVEPOINT packunpack_container_pub;
2165:
2166: -- Standard call to check for call compatibility.
2167: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
2168: fnd_message.set_name('WMS', 'WMS_CONT_INCOMPATIBLE_API_CALL');
2169: fnd_msg_pub.ADD;
2170: RAISE fnd_api.g_exc_unexpected_error;
2171: END IF;

Line 2170: RAISE fnd_api.g_exc_unexpected_error;

2166: -- Standard call to check for call compatibility.
2167: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
2168: fnd_message.set_name('WMS', 'WMS_CONT_INCOMPATIBLE_API_CALL');
2169: fnd_msg_pub.ADD;
2170: RAISE fnd_api.g_exc_unexpected_error;
2171: END IF;
2172:
2173: -- Initialize message list if p_init_msg_list is set to TRUE.
2174: IF fnd_api.to_boolean(p_init_msg_list) THEN

Line 2174: IF fnd_api.to_boolean(p_init_msg_list) THEN

2170: RAISE fnd_api.g_exc_unexpected_error;
2171: END IF;
2172:
2173: -- Initialize message list if p_init_msg_list is set to TRUE.
2174: IF fnd_api.to_boolean(p_init_msg_list) THEN
2175: fnd_msg_pub.initialize;
2176: END IF;
2177:
2178: -- Initialize API return status to success

Line 2179: x_return_status := fnd_api.g_ret_sts_success;

2175: fnd_msg_pub.initialize;
2176: END IF;
2177:
2178: -- Initialize API return status to success
2179: x_return_status := fnd_api.g_ret_sts_success;
2180:
2181: -- API body
2182: IF (l_debug = 1) THEN
2183: mdebug('Call to Packunpack API', G_MESSAGE);

Line 2200: RAISE fnd_api.g_exc_error;

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');
2199: fnd_msg_pub.ADD;
2200: RAISE fnd_api.g_exc_error;
2201: END IF;
2202:
2203: /* Validate all inputs if validation level is set to full */
2204: IF (p_validation_level = fnd_api.g_valid_level_full) THEN

Line 2204: IF (p_validation_level = fnd_api.g_valid_level_full) THEN

2200: RAISE fnd_api.g_exc_error;
2201: END IF;
2202:
2203: /* Validate all inputs if validation level is set to full */
2204: IF (p_validation_level = fnd_api.g_valid_level_full) THEN
2205: /* Validate Content 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);

Line 2216: RAISE fnd_api.g_exc_error;

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');
2215: fnd_msg_pub.ADD;
2216: RAISE fnd_api.g_exc_error;
2217: END IF;
2218:
2219: -- Check that the content lpn is in fact stored within the given parent lpn
2220: -- Do this check only for the unpack operation

Line 2228: RAISE fnd_api.g_exc_error;

2224: mdebug('child lpn is not in lpn parent lpn', G_ERROR);
2225: END IF;
2226: fnd_message.set_name('WMS', 'WMS_CONT_LPN_NOT_IN_LPN');
2227: fnd_msg_pub.ADD;
2228: RAISE fnd_api.g_exc_error;
2229: END IF;
2230: END IF;
2231: END IF;
2232:

Line 2243: RAISE fnd_api.g_exc_error;

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');
2242: fnd_msg_pub.ADD;
2243: RAISE fnd_api.g_exc_error;
2244: END IF;
2245:
2246: /* Validate Content Item */
2247: IF (p_content_item_id IS NOT NULL) THEN

Line 2257: RAISE fnd_api.g_exc_error;

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');
2256: fnd_msg_pub.ADD;
2257: RAISE fnd_api.g_exc_error;
2258: END IF;
2259: END IF;
2260:
2261: /* Check that a content is given to pack/unpack */

Line 2274: RAISE fnd_api.g_exc_error;

2270: mdebug('no item description for unpack all', G_ERROR);
2271: END IF;
2272: fnd_message.set_name('WMS', 'WMS_CONT_NO_ITEM_DESC');
2273: fnd_msg_pub.ADD;
2274: RAISE fnd_api.g_exc_error;
2275: END IF;
2276: END IF;
2277:
2278: /* Validate that only a content item OR LPN, not both, is given */

Line 2287: RAISE fnd_api.g_exc_error;

2283: mdebug('Can not specify both content item and container item at same time', G_ERROR);
2284: END IF;
2285: fnd_message.set_name('WMS', 'WMS_CONT_LPN_AND_ITEM');
2286: fnd_msg_pub.ADD;
2287: RAISE fnd_api.g_exc_error;
2288: END IF;
2289:
2290: /* Validate that Subinventory must be given if pack operation and in INV*/
2291: IF (p_content_item_id IS NOT NULL) THEN

Line 2297: RAISE fnd_api.g_exc_error;

2293: IF (l_lpn.lpn_context IN (1, 11)) THEN
2294: IF (p_subinventory IS NULL) THEN
2295: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_SUB');
2296: fnd_msg_pub.ADD;
2297: RAISE fnd_api.g_exc_error;
2298: END IF;
2299: END IF;
2300: END IF;
2301: END IF;

Line 2314: RAISE fnd_api.g_exc_error;

2310: mdebug(p_subinventory || 'is an invalid sub', G_ERROR);
2311: END IF;
2312: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_SUB');
2313: fnd_msg_pub.ADD;
2314: RAISE fnd_api.g_exc_error;
2315: END IF;
2316: END IF;
2317:
2318: --Validate Locator

Line 2344: RAISE fnd_api.g_exc_error;

2340: mdebug('Missing required locator', G_ERROR);
2341: END IF;
2342: fnd_message.set_name('WMS', 'WMS_CONT_MISS_REQ_LOC');
2343: fnd_msg_pub.ADD;
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);

Line 2356: RAISE fnd_api.g_exc_error;

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');
2355: fnd_msg_pub.ADD;
2356: RAISE fnd_api.g_exc_error;
2357: END IF;
2358: --END IF;
2359: END IF;
2360: END IF;

Line 2375: RAISE fnd_api.g_exc_error;

2371: mdebug(p_revision || ' is an invalid revision', G_ERROR);
2372: END IF;
2373: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_REV');
2374: fnd_msg_pub.ADD;
2375: RAISE fnd_api.g_exc_error;
2376: END IF;
2377: ELSE
2378: IF (l_debug = 1) THEN
2379: mdebug('Mission required revision', G_ERROR);

Line 2383: RAISE fnd_api.g_exc_error;

2379: mdebug('Mission required revision', G_ERROR);
2380: END IF;
2381: fnd_message.set_name('WMS', 'WMS_CONT_MISS_REQ_REV');
2382: fnd_msg_pub.ADD;
2383: RAISE fnd_api.g_exc_error;
2384: END IF;
2385: END IF;
2386: END IF;
2387:

Line 2418: RAISE fnd_api.g_exc_error;

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');
2417: fnd_msg_pub.ADD;
2418: RAISE fnd_api.g_exc_error;
2419: END IF;
2420: END IF;
2421: ELSE
2422: -- Subinventory was not given so will need to do

Line 2433: RAISE fnd_api.g_exc_error;

2429: mdebug(p_lot_number || ' is an invalid lot number', G_ERROR);
2430: END IF;
2431: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_LOT');
2432: fnd_msg_pub.ADD;
2433: RAISE fnd_api.g_exc_error;
2434: END IF;
2435:
2436: CLOSE lot_validation_cursor;
2437: END IF;

Line 2449: RAISE fnd_api.g_exc_error;

2445: mdebug('Missing required lot', G_ERROR);
2446: END IF;
2447: fnd_message.set_name('WMS', 'WMS_CONT_MISS_REQ_LOT');
2448: fnd_msg_pub.ADD;
2449: RAISE fnd_api.g_exc_error;
2450: END IF;
2451: END IF;
2452: END IF;
2453:

Line 2465: RAISE fnd_api.g_exc_error;

2461: mdebug('Requested a negative item qty', G_ERROR);
2462: END IF;
2463: fnd_message.set_name('WMS', 'WMS_CONT_NEG_ITEM_QTY');
2464: fnd_msg_pub.ADD;
2465: RAISE fnd_api.g_exc_error;
2466: ELSE
2467: l_quantity := p_quantity;
2468: END IF;
2469: END IF;

Line 2484: RAISE fnd_api.g_exc_error;

2480: mdebug('For container item unpack quantitiy must be 1', G_ERROR);
2481: END IF;
2482: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_QTY');
2483: fnd_msg_pub.ADD;
2484: RAISE fnd_api.g_exc_error;
2485: END IF;
2486: ELSE
2487: l_quantity := 1;
2488: END IF;

Line 2505: RAISE fnd_api.g_exc_error;

2501: mdebug('Invalid serial number given in range', G_ERROR);
2502: END IF;
2503: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_SER');
2504: fnd_msg_pub.ADD;
2505: RAISE fnd_api.g_exc_error;
2506: END IF;
2507:
2508: -- Check that in the case of a range of serial numbers, that the
2509: -- inputted p_quantity equals the amount of items in the serial range.

Line 2517: RAISE fnd_api.g_exc_error;

2513: mdebug('Serial range quantity '||l_quantity||' not the same as given qty '||p_quantity, G_ERROR);
2514: END IF;
2515: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_X_QTY');
2516: fnd_msg_pub.ADD;
2517: RAISE fnd_api.g_exc_error;
2518: END IF;
2519: END IF;
2520:
2521: -- Get the serial number length.

Line 2553: RAISE fnd_api.g_exc_error;

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');
2552: fnd_msg_pub.ADD;
2553: RAISE fnd_api.g_exc_error;
2554: END IF;
2555: ELSE
2556: -- Either the subinventory was not given or
2557: -- the serial number was dynamically generated. We will

Line 2568: RAISE fnd_api.g_exc_error;

2564: mdebug(l_current_serial || ' is not a valid serial number', G_ERROR);
2565: END IF;
2566: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_SER');
2567: fnd_msg_pub.ADD;
2568: RAISE fnd_api.g_exc_error;
2569: END IF;
2570:
2571: CLOSE serial_validation_cursor;
2572: END IF;

Line 2602: RAISE fnd_api.g_exc_error;

2598: mdebug('Missing require serial number', G_ERROR);
2599: END IF;
2600: fnd_message.set_name('WMS', 'WMS_CONT_MISS_SER_NUM');
2601: fnd_msg_pub.ADD;
2602: RAISE fnd_api.g_exc_error;
2603: END IF;
2604: END IF;
2605: END IF;
2606:

Line 2617: RAISE fnd_api.g_exc_error;

2613: mdebug(p_uom || ' is an invalid UOM', G_ERROR);
2614: END IF;
2615: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_UOM');
2616: fnd_msg_pub.ADD;
2617: RAISE fnd_api.g_exc_error;
2618: END IF;
2619: END IF;
2620:
2621: /* Validate the operation */

Line 2628: RAISE fnd_api.g_exc_error;

2624: mdebug(p_operation || ' is an invalid operation type', G_ERROR);
2625: END IF;
2626: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_OPERATION');
2627: fnd_msg_pub.ADD;
2628: RAISE fnd_api.g_exc_error;
2629: END IF;
2630:
2631: /* Validate the enforce weight and volume constraint flag */
2632: IF (p_enforce_wv_constraints IS NOT NULL) THEN

Line 2639: RAISE fnd_api.g_exc_error;

2635: mdebug(p_enforce_wv_constraints || ' is an invalid constraint type', G_MESSAGE);
2636: END IF;
2637: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_CONSTRAINT');
2638: fnd_msg_pub.ADD;
2639: RAISE fnd_api.g_exc_error;
2640: END IF;
2641: END IF;
2642:
2643: /* Validate Cost Group */

Line 2653: RAISE fnd_api.g_exc_error;

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');
2652: fnd_msg_pub.ADD;
2653: RAISE fnd_api.g_exc_error;
2654: END IF;
2655: END IF;
2656: END IF;
2657: /* End of Input Validation */

Line 2705: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN

2701: , p_source_line_detail_id => p_source_line_detail_id
2702: , p_unpack_all => p_unpack_all
2703: , p_ignore_item_controls => l_ignore_item_controls );
2704:
2705: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN
2706: RAISE fnd_api.g_exc_error;
2707: END IF;
2708:
2709: -- End of API body

Line 2706: RAISE fnd_api.g_exc_error;

2702: , p_unpack_all => p_unpack_all
2703: , p_ignore_item_controls => l_ignore_item_controls );
2704:
2705: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN
2706: RAISE fnd_api.g_exc_error;
2707: END IF;
2708:
2709: -- End of API body
2710:

Line 2712: IF fnd_api.to_boolean(p_commit) THEN

2708:
2709: -- End of API body
2710:
2711: -- Standard check of p_commit.
2712: IF fnd_api.to_boolean(p_commit) THEN
2713: COMMIT WORK;
2714: END IF;
2715:
2716: -- Standard call to get message count and if count is 1,

Line 2720: WHEN fnd_api.g_exc_error THEN

2716: -- Standard call to get message count and if count is 1,
2717: -- get message info.
2718: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2719: EXCEPTION
2720: WHEN fnd_api.g_exc_error THEN
2721: ROLLBACK TO packunpack_container_pub;
2722: x_return_status := fnd_api.g_ret_sts_error;
2723: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2724: WHEN fnd_api.g_exc_unexpected_error THEN

Line 2722: x_return_status := fnd_api.g_ret_sts_error;

2718: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2719: EXCEPTION
2720: WHEN fnd_api.g_exc_error THEN
2721: ROLLBACK TO packunpack_container_pub;
2722: x_return_status := fnd_api.g_ret_sts_error;
2723: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2724: WHEN fnd_api.g_exc_unexpected_error THEN
2725: ROLLBACK TO packunpack_container_pub;
2726: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 2724: WHEN fnd_api.g_exc_unexpected_error THEN

2720: WHEN fnd_api.g_exc_error THEN
2721: ROLLBACK TO packunpack_container_pub;
2722: x_return_status := fnd_api.g_ret_sts_error;
2723: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2724: WHEN fnd_api.g_exc_unexpected_error THEN
2725: ROLLBACK TO packunpack_container_pub;
2726: x_return_status := fnd_api.g_ret_sts_unexp_error;
2727: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2728: WHEN OTHERS THEN

Line 2726: x_return_status := fnd_api.g_ret_sts_unexp_error;

2722: x_return_status := fnd_api.g_ret_sts_error;
2723: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2724: WHEN fnd_api.g_exc_unexpected_error THEN
2725: ROLLBACK TO packunpack_container_pub;
2726: x_return_status := fnd_api.g_ret_sts_unexp_error;
2727: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2728: WHEN OTHERS THEN
2729: ROLLBACK TO packunpack_container_pub;
2730: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 2730: x_return_status := fnd_api.g_ret_sts_unexp_error;

2726: x_return_status := fnd_api.g_ret_sts_unexp_error;
2727: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2728: WHEN OTHERS THEN
2729: ROLLBACK TO packunpack_container_pub;
2730: x_return_status := fnd_api.g_ret_sts_unexp_error;
2731:
2732: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
2733: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
2734: END IF;

Line 2741: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,

2737: END packunpack_container;
2738:
2739: PROCEDURE pack_prepack_container(
2740: p_api_version IN NUMBER,
2741: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
2742: p_commit IN VARCHAR2 := fnd_api.g_false,
2743: p_validation_level IN NUMBER := fnd_api.g_valid_level_full,
2744: x_return_status OUT NOCOPY VARCHAR2,
2745: x_msg_count OUT NOCOPY NUMBER,

Line 2742: p_commit IN VARCHAR2 := fnd_api.g_false,

2738:
2739: PROCEDURE pack_prepack_container(
2740: p_api_version IN NUMBER,
2741: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
2742: p_commit IN VARCHAR2 := fnd_api.g_false,
2743: p_validation_level IN NUMBER := fnd_api.g_valid_level_full,
2744: x_return_status OUT NOCOPY VARCHAR2,
2745: x_msg_count OUT NOCOPY NUMBER,
2746: x_msg_data OUT NOCOPY VARCHAR2,

Line 2743: p_validation_level IN NUMBER := fnd_api.g_valid_level_full,

2739: PROCEDURE pack_prepack_container(
2740: p_api_version IN NUMBER,
2741: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
2742: p_commit IN VARCHAR2 := fnd_api.g_false,
2743: p_validation_level IN NUMBER := fnd_api.g_valid_level_full,
2744: x_return_status OUT NOCOPY VARCHAR2,
2745: x_msg_count OUT NOCOPY NUMBER,
2746: x_msg_data OUT NOCOPY VARCHAR2,
2747: p_lpn_id IN NUMBER,

Line 2801: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN

2797: -- Standard Start of API savepoint
2798: SAVEPOINT pack_prepack_container_pub;
2799:
2800: -- Standard call to check for call compatibility.
2801: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
2802: fnd_message.set_name('WMS', 'WMS_CONT_INCOMPATIBLE_API_CALL');
2803: fnd_msg_pub.ADD;
2804: RAISE fnd_api.g_exc_unexpected_error;
2805: END IF;

Line 2804: RAISE fnd_api.g_exc_unexpected_error;

2800: -- Standard call to check for call compatibility.
2801: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
2802: fnd_message.set_name('WMS', 'WMS_CONT_INCOMPATIBLE_API_CALL');
2803: fnd_msg_pub.ADD;
2804: RAISE fnd_api.g_exc_unexpected_error;
2805: END IF;
2806:
2807: -- Initialize message list if p_init_msg_list is set to TRUE.
2808: IF fnd_api.to_boolean(p_init_msg_list) THEN

Line 2808: IF fnd_api.to_boolean(p_init_msg_list) THEN

2804: RAISE fnd_api.g_exc_unexpected_error;
2805: END IF;
2806:
2807: -- Initialize message list if p_init_msg_list is set to TRUE.
2808: IF fnd_api.to_boolean(p_init_msg_list) THEN
2809: fnd_msg_pub.initialize;
2810: END IF;
2811:
2812: -- Initialize API return status to success

Line 2813: x_return_status := fnd_api.g_ret_sts_success;

2809: fnd_msg_pub.initialize;
2810: END IF;
2811:
2812: -- Initialize API return status to success
2813: x_return_status := fnd_api.g_ret_sts_success;
2814:
2815: -- API body
2816: IF (l_debug = 1) THEN
2817: mdebug('Call to Pack_Prepack_Container API', G_MESSAGE);

Line 2824: IF (p_validation_level = fnd_api.g_valid_level_full) THEN

2820: mdebug('qty=' ||p_quantity|| ' uom=' ||p_uom|| ' oper=' ||p_operation|| ' srctype=' ||p_source_type_id, G_INFO);
2821: END IF;
2822:
2823: /* Validate all inputs if validation level is set to full */
2824: IF (p_validation_level = fnd_api.g_valid_level_full) THEN
2825: /* Validate LPN */
2826: l_lpn.lpn_id := p_lpn_id;
2827: l_lpn.license_plate_number := NULL;
2828: l_result := validate_lpn(l_lpn);

Line 2836: RAISE fnd_api.g_exc_error;

2832: mdebug(p_lpn_id || 'is an invalid lpn_id', 1);
2833: END IF;
2834: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_LPN');
2835: fnd_msg_pub.ADD;
2836: RAISE fnd_api.g_exc_error;
2837: END IF;
2838:
2839: /* Validate Organization ID */
2840: l_org.organization_id := p_organization_id;

Line 2849: RAISE fnd_api.g_exc_error;

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');
2848: fnd_msg_pub.ADD;
2849: RAISE fnd_api.g_exc_error;
2850: END IF;
2851:
2852: /* Validate Content Item */
2853: IF (p_content_item_id IS NOT NULL) THEN

Line 2863: RAISE fnd_api.g_exc_error;

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');
2862: fnd_msg_pub.ADD;
2863: RAISE fnd_api.g_exc_error;
2864: END IF;
2865: END IF;
2866:
2867: /* Validate Revision */

Line 2879: RAISE fnd_api.g_exc_error;

2875: mdebug(p_revision || ' is an invalid revision', 1);
2876: END IF;
2877: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_REV');
2878: fnd_msg_pub.ADD;
2879: RAISE fnd_api.g_exc_error;
2880: END IF;
2881: ELSE
2882: IF (l_debug = 1) THEN
2883: mdebug('Mission required revision', 1);

Line 2887: RAISE fnd_api.g_exc_error;

2883: mdebug('Mission required revision', 1);
2884: END IF;
2885: fnd_message.set_name('WMS', 'WMS_CONT_MISS_REQ_REV');
2886: fnd_msg_pub.ADD;
2887: RAISE fnd_api.g_exc_error;
2888: END IF;
2889: END IF;
2890: END IF;
2891:

Line 2902: RAISE fnd_api.g_exc_error;

2898: mdebug('Missing required lot', 1);
2899: END IF;
2900: fnd_message.set_name('WMS', 'WMS_CONT_MISS_REQ_LOT');
2901: fnd_msg_pub.ADD;
2902: RAISE fnd_api.g_exc_error;
2903: END IF;
2904: END IF;
2905: END IF;
2906:

Line 2918: RAISE fnd_api.g_exc_error;

2914: mdebug('Requested a negative item qty', 1);
2915: END IF;
2916: fnd_message.set_name('WMS', 'WMS_CONT_NEG_ITEM_QTY');
2917: fnd_msg_pub.ADD;
2918: RAISE fnd_api.g_exc_error;
2919: ELSE
2920: l_quantity := p_quantity;
2921: END IF;
2922: END IF;

Line 2939: RAISE fnd_api.g_exc_error;

2935: mdebug('Invalid serial number given in range', 1);
2936: END IF;
2937: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_SER');
2938: fnd_msg_pub.ADD;
2939: RAISE fnd_api.g_exc_error;
2940: END IF;
2941:
2942: -- Check that in the case of a range of serial numbers, that the
2943: -- inputted p_quantity equals the amount of items in the serial range.

Line 2951: RAISE fnd_api.g_exc_error;

2947: mdebug('Serial range quantity '||l_quantity||' not the same as given qty '||p_quantity, G_ERROR);
2948: END IF;
2949: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_X_QTY');
2950: fnd_msg_pub.ADD;
2951: RAISE fnd_api.g_exc_error;
2952: END IF;
2953: END IF;
2954:
2955: -- Get the serial number length.

Line 2991: RAISE fnd_api.g_exc_error;

2987: mdebug(l_current_serial || ' is not a valid serial number', 1);
2988: END IF;
2989: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_SER');
2990: fnd_msg_pub.ADD;
2991: RAISE fnd_api.g_exc_error;
2992: END IF;
2993:
2994: CLOSE serial_validation_cursor;
2995: END IF;

Line 3024: RAISE fnd_api.g_exc_error;

3020: mdebug('Missing require serial number', 1);
3021: END IF;
3022: fnd_message.set_name('WMS', 'WMS_CONT_MISS_SER_NUM');
3023: fnd_msg_pub.ADD;
3024: RAISE fnd_api.g_exc_error;
3025: END IF;
3026: END IF;
3027: END IF;
3028:

Line 3039: RAISE fnd_api.g_exc_error;

3035: mdebug(p_uom || ' is an invalid UOM', 1);
3036: END IF;
3037: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_UOM');
3038: fnd_msg_pub.ADD;
3039: RAISE fnd_api.g_exc_error;
3040: END IF;
3041: END IF;
3042:
3043: /* Validate the operation */

Line 3050: RAISE fnd_api.g_exc_error;

3046: mdebug(p_operation || ' is an invalid operation type', 1);
3047: END IF;
3048: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_OPERATION');
3049: fnd_msg_pub.ADD;
3050: RAISE fnd_api.g_exc_error;
3051: END IF;
3052: END IF;
3053: /* End of Input Validation */
3054:

Line 3075: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN

3071: , p_organization_id => p_organization_id
3072: , p_operation => p_operation
3073: , p_source_type_id => p_source_type_id );
3074:
3075: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN
3076: RAISE fnd_api.g_exc_error;
3077: END IF;
3078:
3079: -- End of API body

Line 3076: RAISE fnd_api.g_exc_error;

3072: , p_operation => p_operation
3073: , p_source_type_id => p_source_type_id );
3074:
3075: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN
3076: RAISE fnd_api.g_exc_error;
3077: END IF;
3078:
3079: -- End of API body
3080:

Line 3082: IF fnd_api.to_boolean(p_commit) THEN

3078:
3079: -- End of API body
3080:
3081: -- Standard check of p_commit.
3082: IF fnd_api.to_boolean(p_commit) THEN
3083: COMMIT WORK;
3084: END IF;
3085:
3086: -- Standard call to get message count and if count is 1,

Line 3090: WHEN fnd_api.g_exc_error THEN

3086: -- Standard call to get message count and if count is 1,
3087: -- get message info.
3088: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
3089: EXCEPTION
3090: WHEN fnd_api.g_exc_error THEN
3091: ROLLBACK TO pack_prepack_container_pub;
3092: x_return_status := fnd_api.g_ret_sts_error;
3093: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
3094: WHEN fnd_api.g_exc_unexpected_error THEN

Line 3092: x_return_status := fnd_api.g_ret_sts_error;

3088: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
3089: EXCEPTION
3090: WHEN fnd_api.g_exc_error THEN
3091: ROLLBACK TO pack_prepack_container_pub;
3092: x_return_status := fnd_api.g_ret_sts_error;
3093: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
3094: WHEN fnd_api.g_exc_unexpected_error THEN
3095: ROLLBACK TO pack_prepack_container_pub;
3096: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 3094: WHEN fnd_api.g_exc_unexpected_error THEN

3090: WHEN fnd_api.g_exc_error THEN
3091: ROLLBACK TO pack_prepack_container_pub;
3092: x_return_status := fnd_api.g_ret_sts_error;
3093: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
3094: WHEN fnd_api.g_exc_unexpected_error THEN
3095: ROLLBACK TO pack_prepack_container_pub;
3096: x_return_status := fnd_api.g_ret_sts_unexp_error;
3097: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
3098: WHEN OTHERS THEN

Line 3096: x_return_status := fnd_api.g_ret_sts_unexp_error;

3092: x_return_status := fnd_api.g_ret_sts_error;
3093: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
3094: WHEN fnd_api.g_exc_unexpected_error THEN
3095: ROLLBACK TO pack_prepack_container_pub;
3096: x_return_status := fnd_api.g_ret_sts_unexp_error;
3097: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
3098: WHEN OTHERS THEN
3099: ROLLBACK TO pack_prepack_container_pub;
3100: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 3100: x_return_status := fnd_api.g_ret_sts_unexp_error;

3096: x_return_status := fnd_api.g_ret_sts_unexp_error;
3097: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
3098: WHEN OTHERS THEN
3099: ROLLBACK TO pack_prepack_container_pub;
3100: x_return_status := fnd_api.g_ret_sts_unexp_error;
3101:
3102: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
3103: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
3104: END IF;

Line 3113: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,

3109: -- ----------------------------------------------------------------------------------
3110: -- ----------------------------------------------------------------------------------
3111: PROCEDURE explode_lpn(
3112: p_api_version IN NUMBER,
3113: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
3114: p_commit IN VARCHAR2 := fnd_api.g_false,
3115: x_return_status OUT NOCOPY VARCHAR2,
3116: x_msg_count OUT NOCOPY NUMBER,
3117: x_msg_data OUT NOCOPY VARCHAR2,

Line 3114: p_commit IN VARCHAR2 := fnd_api.g_false,

3110: -- ----------------------------------------------------------------------------------
3111: PROCEDURE explode_lpn(
3112: p_api_version IN NUMBER,
3113: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
3114: p_commit IN VARCHAR2 := fnd_api.g_false,
3115: x_return_status OUT NOCOPY VARCHAR2,
3116: x_msg_count OUT NOCOPY NUMBER,
3117: x_msg_data OUT NOCOPY VARCHAR2,
3118: p_lpn_id IN NUMBER,

Line 3141: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,

3137: -- ----------------------------------------------------------------------------------
3138: -- ----------------------------------------------------------------------------------
3139: PROCEDURE container_required_qty(
3140: p_api_version IN NUMBER,
3141: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
3142: p_commit IN VARCHAR2 := fnd_api.g_false,
3143: x_return_status OUT NOCOPY VARCHAR2,
3144: x_msg_count OUT NOCOPY NUMBER,
3145: x_msg_data OUT NOCOPY VARCHAR2,

Line 3142: p_commit IN VARCHAR2 := fnd_api.g_false,

3138: -- ----------------------------------------------------------------------------------
3139: PROCEDURE container_required_qty(
3140: p_api_version IN NUMBER,
3141: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
3142: p_commit IN VARCHAR2 := fnd_api.g_false,
3143: x_return_status OUT NOCOPY VARCHAR2,
3144: x_msg_count OUT NOCOPY NUMBER,
3145: x_msg_data OUT NOCOPY VARCHAR2,
3146: p_source_item_id IN NUMBER,

Line 3206: p_init_msg_list VARCHAR2(10) := fnd_api.g_false;

3202: l_api_name CONSTANT VARCHAR2(30) := 'Prepack_LPN_CP';
3203: l_api_version CONSTANT NUMBER := 1.0;
3204: l_lpn lpn;
3205: l_result NUMBER;
3206: p_init_msg_list VARCHAR2(10) := fnd_api.g_false;
3207: p_commit VARCHAR2(10) := fnd_api.g_false;
3208: x_return_status VARCHAR2(4);
3209: x_msg_count NUMBER;
3210: x_msg_data VARCHAR2(300);

Line 3207: p_commit VARCHAR2(10) := fnd_api.g_false;

3203: l_api_version CONSTANT NUMBER := 1.0;
3204: l_lpn lpn;
3205: l_result NUMBER;
3206: p_init_msg_list VARCHAR2(10) := fnd_api.g_false;
3207: p_commit VARCHAR2(10) := fnd_api.g_false;
3208: x_return_status VARCHAR2(4);
3209: x_msg_count NUMBER;
3210: x_msg_data VARCHAR2(300);
3211: ret BOOLEAN;

Line 3218: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN

3214: -- Standard Start of API savepoint
3215: SAVEPOINT prepack_lpn_cp_pub;
3216:
3217: -- Standard call to check for call compatibility.
3218: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
3219: fnd_message.set_name('WMS', 'WMS_CONT_INCOMPATIBLE_API_CALL');
3220: fnd_msg_pub.ADD;
3221: RAISE fnd_api.g_exc_unexpected_error;
3222: END IF;

Line 3221: RAISE fnd_api.g_exc_unexpected_error;

3217: -- Standard call to check for call compatibility.
3218: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
3219: fnd_message.set_name('WMS', 'WMS_CONT_INCOMPATIBLE_API_CALL');
3220: fnd_msg_pub.ADD;
3221: RAISE fnd_api.g_exc_unexpected_error;
3222: END IF;
3223:
3224: -- Initialize message list if p_init_msg_list is set to TRUE.
3225: IF fnd_api.to_boolean(p_init_msg_list) THEN

Line 3225: IF fnd_api.to_boolean(p_init_msg_list) THEN

3221: RAISE fnd_api.g_exc_unexpected_error;
3222: END IF;
3223:
3224: -- Initialize message list if p_init_msg_list is set to TRUE.
3225: IF fnd_api.to_boolean(p_init_msg_list) THEN
3226: fnd_msg_pub.initialize;
3227: END IF;
3228:
3229: -- Initialize API return status to success

Line 3230: x_return_status := fnd_api.g_ret_sts_success;

3226: fnd_msg_pub.initialize;
3227: END IF;
3228:
3229: -- Initialize API return status to success
3230: x_return_status := fnd_api.g_ret_sts_success;
3231: -- Start API body
3232:
3233: -- Call Prepack LPN
3234: WMS_CONTAINER_PVT.prepack_lpn(

Line 3262: IF (x_return_status = fnd_api.g_ret_sts_success) THEN

3258: p_print_label=> p_print_label,
3259: p_print_content_report=> p_print_content_report
3260: );
3261:
3262: IF (x_return_status = fnd_api.g_ret_sts_success) THEN
3263: ret := fnd_concurrent.set_completion_status('NORMAL', x_msg_data);
3264: retcode := 0;
3265: ELSE
3266: ret := fnd_concurrent.set_completion_status('ERROR', x_msg_data);

Line 3274: IF fnd_api.to_boolean(p_commit) THEN

3270:
3271: -- End of API body
3272:
3273: -- Standard check of p_commit.
3274: IF fnd_api.to_boolean(p_commit) THEN
3275: COMMIT WORK;
3276: END IF;
3277:
3278: -- Standard call to get message count and if count is 1,

Line 3282: WHEN fnd_api.g_exc_error THEN

3278: -- Standard call to get message count and if count is 1,
3279: -- get message info.
3280: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
3281: EXCEPTION
3282: WHEN fnd_api.g_exc_error THEN
3283: ROLLBACK TO prepack_lpn_cp_pub;
3284: x_return_status := fnd_api.g_ret_sts_error;
3285: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
3286: WHEN fnd_api.g_exc_unexpected_error THEN

Line 3284: x_return_status := fnd_api.g_ret_sts_error;

3280: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
3281: EXCEPTION
3282: WHEN fnd_api.g_exc_error THEN
3283: ROLLBACK TO prepack_lpn_cp_pub;
3284: x_return_status := fnd_api.g_ret_sts_error;
3285: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
3286: WHEN fnd_api.g_exc_unexpected_error THEN
3287: ROLLBACK TO prepack_lpn_cp_pub;
3288: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 3286: WHEN fnd_api.g_exc_unexpected_error THEN

3282: WHEN fnd_api.g_exc_error THEN
3283: ROLLBACK TO prepack_lpn_cp_pub;
3284: x_return_status := fnd_api.g_ret_sts_error;
3285: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
3286: WHEN fnd_api.g_exc_unexpected_error THEN
3287: ROLLBACK TO prepack_lpn_cp_pub;
3288: x_return_status := fnd_api.g_ret_sts_unexp_error;
3289: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
3290: WHEN OTHERS THEN

Line 3288: x_return_status := fnd_api.g_ret_sts_unexp_error;

3284: x_return_status := fnd_api.g_ret_sts_error;
3285: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
3286: WHEN fnd_api.g_exc_unexpected_error THEN
3287: ROLLBACK TO prepack_lpn_cp_pub;
3288: x_return_status := fnd_api.g_ret_sts_unexp_error;
3289: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
3290: WHEN OTHERS THEN
3291: ROLLBACK TO prepack_lpn_cp_pub;
3292: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 3292: x_return_status := fnd_api.g_ret_sts_unexp_error;

3288: x_return_status := fnd_api.g_ret_sts_unexp_error;
3289: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
3290: WHEN OTHERS THEN
3291: ROLLBACK TO prepack_lpn_cp_pub;
3292: x_return_status := fnd_api.g_ret_sts_unexp_error;
3293:
3294: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
3295: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
3296: END IF;

Line 3356: , p_init_msg_list IN VARCHAR2 := fnd_api.g_false

3352: -- ----------------------------------------------------------------------------------
3353:
3354: PROCEDURE Merge_Up_LPN (
3355: p_api_version IN NUMBER
3356: , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
3357: , p_commit IN VARCHAR2 := fnd_api.g_false
3358: , x_return_status OUT NOCOPY VARCHAR2
3359: , x_msg_count OUT NOCOPY NUMBER
3360: , x_msg_data OUT NOCOPY VARCHAR2

Line 3357: , p_commit IN VARCHAR2 := fnd_api.g_false

3353:
3354: PROCEDURE Merge_Up_LPN (
3355: p_api_version IN NUMBER
3356: , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
3357: , p_commit IN VARCHAR2 := fnd_api.g_false
3358: , x_return_status OUT NOCOPY VARCHAR2
3359: , x_msg_count OUT NOCOPY NUMBER
3360: , x_msg_data OUT NOCOPY VARCHAR2
3361: , p_organization_id IN NUMBER

Line 3377: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN

3373: l_lpn LPN;
3374:
3375: BEGIN
3376: -- Standard call to check for call compatibility.
3377: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
3378: fnd_message.set_name('WMS', 'WMS_CONT_INCOMPATIBLE_API_CALL');
3379: fnd_msg_pub.ADD;
3380: RAISE fnd_api.g_exc_error;
3381: END IF;

Line 3380: RAISE fnd_api.g_exc_error;

3376: -- Standard call to check for call compatibility.
3377: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
3378: fnd_message.set_name('WMS', 'WMS_CONT_INCOMPATIBLE_API_CALL');
3379: fnd_msg_pub.ADD;
3380: RAISE fnd_api.g_exc_error;
3381: END IF;
3382:
3383: -- Initialize message list if p_init_msg_list is set to TRUE.
3384: IF fnd_api.to_boolean(p_init_msg_list) THEN

Line 3384: IF fnd_api.to_boolean(p_init_msg_list) THEN

3380: RAISE fnd_api.g_exc_error;
3381: END IF;
3382:
3383: -- Initialize message list if p_init_msg_list is set to TRUE.
3384: IF fnd_api.to_boolean(p_init_msg_list) THEN
3385: fnd_msg_pub.initialize;
3386: END IF;
3387:
3388: -- Initialize API return status to success

Line 3389: x_return_status := fnd_api.g_ret_sts_success;

3385: fnd_msg_pub.initialize;
3386: END IF;
3387:
3388: -- Initialize API return status to success
3389: x_return_status := fnd_api.g_ret_sts_success;
3390:
3391: IF ( l_debug = 1 ) THEN
3392: mdebug(l_api_name || ' Entered ' || g_pkg_version, G_ERROR);
3393: END IF;

Line 3406: RAISE fnd_api.g_exc_error;

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');
3405: fnd_msg_pub.ADD;
3406: RAISE fnd_api.g_exc_error;
3407: END IF;
3408:
3409: l_progress := '200';
3410: -- Validate LPN

Line 3420: RAISE FND_API.G_EXC_ERROR;

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');
3419: FND_MSG_PUB.ADD;
3420: RAISE FND_API.G_EXC_ERROR;
3421: END IF;
3422:
3423: l_progress := '300';
3424: -- Validate if LPN is valid for this transaction

Line 3434: RAISE FND_API.G_EXC_ERROR;

3430: IF ( l_result = WMS_CONTAINER_PVT.F ) THEN
3431: IF ( l_debug = 1 ) THEN
3432: mdebug(p_outermost_lpn_id || ' cannot be used for merge up', G_ERROR);
3433: END IF;
3434: RAISE FND_API.G_EXC_ERROR;
3435: END IF;
3436:
3437: l_progress := '400';
3438: WMS_CONTAINER_PVT.Merge_Up_LPN (

Line 3448: IF ( x_return_status <> fnd_api.g_ret_sts_success ) THEN

3444: , x_msg_data => x_msg_data
3445: , p_organization_id => p_organization_id
3446: , p_outermost_lpn_id => p_outermost_lpn_id );
3447:
3448: IF ( x_return_status <> fnd_api.g_ret_sts_success ) THEN
3449: IF ( x_return_status = fnd_api.g_ret_sts_error ) THEN
3450: RAISE FND_API.G_EXC_ERROR;
3451: END IF;
3452: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 3449: IF ( x_return_status = fnd_api.g_ret_sts_error ) THEN

3445: , p_organization_id => p_organization_id
3446: , p_outermost_lpn_id => p_outermost_lpn_id );
3447:
3448: IF ( x_return_status <> fnd_api.g_ret_sts_success ) THEN
3449: IF ( x_return_status = fnd_api.g_ret_sts_error ) THEN
3450: RAISE FND_API.G_EXC_ERROR;
3451: END IF;
3452: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3453: END IF;

Line 3450: RAISE FND_API.G_EXC_ERROR;

3446: , p_outermost_lpn_id => p_outermost_lpn_id );
3447:
3448: IF ( x_return_status <> fnd_api.g_ret_sts_success ) THEN
3449: IF ( x_return_status = fnd_api.g_ret_sts_error ) THEN
3450: RAISE FND_API.G_EXC_ERROR;
3451: END IF;
3452: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3453: END IF;
3454:

Line 3452: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

3448: IF ( x_return_status <> fnd_api.g_ret_sts_success ) THEN
3449: IF ( x_return_status = fnd_api.g_ret_sts_error ) THEN
3450: RAISE FND_API.G_EXC_ERROR;
3451: END IF;
3452: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3453: END IF;
3454:
3455: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
3456: EXCEPTION

Line 3457: WHEN FND_API.G_EXC_ERROR THEN

3453: END IF;
3454:
3455: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
3456: EXCEPTION
3457: WHEN FND_API.G_EXC_ERROR THEN
3458: x_return_status := fnd_api.g_ret_sts_error;
3459: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
3460: IF (l_debug = 1) THEN
3461: FOR i in 1..x_msg_count LOOP

Line 3458: x_return_status := fnd_api.g_ret_sts_error;

3454:
3455: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
3456: EXCEPTION
3457: WHEN FND_API.G_EXC_ERROR THEN
3458: x_return_status := fnd_api.g_ret_sts_error;
3459: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
3460: IF (l_debug = 1) THEN
3461: FOR i in 1..x_msg_count LOOP
3462: l_msgdata := substr(l_msgdata||' | '||substr(fnd_msg_pub.get(x_msg_count-i+1, 'F'), 0, 200),1,2000);

Line 3468: x_return_status := fnd_api.g_ret_sts_unexp_error;

3464: mdebug(l_api_name ||' Error progress='||l_progress||' SQL error: '|| SQLERRM(SQLCODE), 1);
3465: mdebug('msg: '||l_msgdata, 1);
3466: END IF;
3467: WHEN OTHERS THEN
3468: x_return_status := fnd_api.g_ret_sts_unexp_error;
3469: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
3470: IF (l_debug = 1) THEN
3471: mdebug(l_api_name ||' Error progress='||l_progress||' SQL error: '|| SQLERRM(SQLCODE), 1);
3472: END IF;

Line 3480: , p_init_msg_list IN VARCHAR2 := fnd_api.g_false

3476: -- ----------------------------------------------------------------------------------
3477:
3478: PROCEDURE Break_Down_LPN (
3479: p_api_version IN NUMBER
3480: , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
3481: , p_commit IN VARCHAR2 := fnd_api.g_false
3482: , x_return_status OUT NOCOPY VARCHAR2
3483: , x_msg_count OUT NOCOPY NUMBER
3484: , x_msg_data OUT NOCOPY VARCHAR2

Line 3481: , p_commit IN VARCHAR2 := fnd_api.g_false

3477:
3478: PROCEDURE Break_Down_LPN (
3479: p_api_version IN NUMBER
3480: , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
3481: , p_commit IN VARCHAR2 := fnd_api.g_false
3482: , x_return_status OUT NOCOPY VARCHAR2
3483: , x_msg_count OUT NOCOPY NUMBER
3484: , x_msg_data OUT NOCOPY VARCHAR2
3485: , p_organization_id IN NUMBER

Line 3501: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN

3497: l_lpn LPN;
3498:
3499: BEGIN
3500: -- Standard call to check for call compatibility.
3501: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
3502: fnd_message.set_name('WMS', 'WMS_CONT_INCOMPATIBLE_API_CALL');
3503: fnd_msg_pub.ADD;
3504: RAISE fnd_api.g_exc_error;
3505: END IF;

Line 3504: RAISE fnd_api.g_exc_error;

3500: -- Standard call to check for call compatibility.
3501: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
3502: fnd_message.set_name('WMS', 'WMS_CONT_INCOMPATIBLE_API_CALL');
3503: fnd_msg_pub.ADD;
3504: RAISE fnd_api.g_exc_error;
3505: END IF;
3506:
3507: -- Initialize message list if p_init_msg_list is set to TRUE.
3508: IF fnd_api.to_boolean(p_init_msg_list) THEN

Line 3508: IF fnd_api.to_boolean(p_init_msg_list) THEN

3504: RAISE fnd_api.g_exc_error;
3505: END IF;
3506:
3507: -- Initialize message list if p_init_msg_list is set to TRUE.
3508: IF fnd_api.to_boolean(p_init_msg_list) THEN
3509: fnd_msg_pub.initialize;
3510: END IF;
3511:
3512: -- Initialize API return status to success

Line 3513: x_return_status := fnd_api.g_ret_sts_success;

3509: fnd_msg_pub.initialize;
3510: END IF;
3511:
3512: -- Initialize API return status to success
3513: x_return_status := fnd_api.g_ret_sts_success;
3514:
3515: IF ( l_debug = 1 ) THEN
3516: mdebug(l_api_name || ' Entered ' || g_pkg_version, G_ERROR);
3517: END IF;

Line 3530: RAISE fnd_api.g_exc_error;

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');
3529: fnd_msg_pub.ADD;
3530: RAISE fnd_api.g_exc_error;
3531: END IF;
3532:
3533: l_progress := '200';
3534: -- Validate LPN

Line 3544: RAISE FND_API.G_EXC_ERROR;

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');
3543: FND_MSG_PUB.ADD;
3544: RAISE FND_API.G_EXC_ERROR;
3545: END IF;
3546:
3547: l_progress := '300';
3548: -- Validate if LPN is valid for this transaction

Line 3558: RAISE FND_API.G_EXC_ERROR;

3554: IF ( l_result = WMS_CONTAINER_PVT.F ) THEN
3555: IF ( l_debug = 1 ) THEN
3556: mdebug(p_outermost_lpn_id || ' cannot be used for merge up', G_ERROR);
3557: END IF;
3558: RAISE FND_API.G_EXC_ERROR;
3559: END IF;
3560:
3561: l_progress := '400';
3562: WMS_CONTAINER_PVT.Break_Down_LPN (

Line 3572: IF ( x_return_status <> fnd_api.g_ret_sts_success ) THEN

3568: , x_msg_data => x_msg_data
3569: , p_organization_id => p_organization_id
3570: , p_outermost_lpn_id => p_outermost_lpn_id );
3571:
3572: IF ( x_return_status <> fnd_api.g_ret_sts_success ) THEN
3573: IF ( x_return_status = fnd_api.g_ret_sts_error ) THEN
3574: RAISE FND_API.G_EXC_ERROR;
3575: END IF;
3576: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 3573: IF ( x_return_status = fnd_api.g_ret_sts_error ) THEN

3569: , p_organization_id => p_organization_id
3570: , p_outermost_lpn_id => p_outermost_lpn_id );
3571:
3572: IF ( x_return_status <> fnd_api.g_ret_sts_success ) THEN
3573: IF ( x_return_status = fnd_api.g_ret_sts_error ) THEN
3574: RAISE FND_API.G_EXC_ERROR;
3575: END IF;
3576: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3577: END IF;

Line 3574: RAISE FND_API.G_EXC_ERROR;

3570: , p_outermost_lpn_id => p_outermost_lpn_id );
3571:
3572: IF ( x_return_status <> fnd_api.g_ret_sts_success ) THEN
3573: IF ( x_return_status = fnd_api.g_ret_sts_error ) THEN
3574: RAISE FND_API.G_EXC_ERROR;
3575: END IF;
3576: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3577: END IF;
3578:

Line 3576: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

3572: IF ( x_return_status <> fnd_api.g_ret_sts_success ) THEN
3573: IF ( x_return_status = fnd_api.g_ret_sts_error ) THEN
3574: RAISE FND_API.G_EXC_ERROR;
3575: END IF;
3576: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3577: END IF;
3578:
3579: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
3580: EXCEPTION

Line 3581: WHEN FND_API.G_EXC_ERROR THEN

3577: END IF;
3578:
3579: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
3580: EXCEPTION
3581: WHEN FND_API.G_EXC_ERROR THEN
3582: x_return_status := fnd_api.g_ret_sts_error;
3583: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
3584: IF (l_debug = 1) THEN
3585: FOR i in 1..x_msg_count LOOP

Line 3582: x_return_status := fnd_api.g_ret_sts_error;

3578:
3579: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
3580: EXCEPTION
3581: WHEN FND_API.G_EXC_ERROR THEN
3582: x_return_status := fnd_api.g_ret_sts_error;
3583: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
3584: IF (l_debug = 1) THEN
3585: FOR i in 1..x_msg_count LOOP
3586: l_msgdata := substr(l_msgdata||' | '||substr(fnd_msg_pub.get(x_msg_count-i+1, 'F'), 0, 200),1,2000);

Line 3592: x_return_status := fnd_api.g_ret_sts_unexp_error;

3588: mdebug(l_api_name ||' Error progress='||l_progress||' SQL error: '|| SQLERRM(SQLCODE), 1);
3589: mdebug('msg: '||l_msgdata, 1);
3590: END IF;
3591: WHEN OTHERS THEN
3592: x_return_status := fnd_api.g_ret_sts_unexp_error;
3593: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
3594: IF (l_debug = 1) THEN
3595: mdebug(l_api_name ||' Error progress='||l_progress||' SQL error: '|| SQLERRM(SQLCODE), 1);
3596: END IF;

Line 3604: , p_init_msg_list IN VARCHAR2 := fnd_api.g_false

3600: -- ----------------------------------------------------------------------------------
3601:
3602: PROCEDURE Initialize_LPN (
3603: p_api_version IN NUMBER
3604: , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
3605: , p_commit IN VARCHAR2 := fnd_api.g_false
3606: , x_return_status OUT NOCOPY VARCHAR2
3607: , x_msg_count OUT NOCOPY NUMBER
3608: , x_msg_data OUT NOCOPY VARCHAR2

Line 3605: , p_commit IN VARCHAR2 := fnd_api.g_false

3601:
3602: PROCEDURE Initialize_LPN (
3603: p_api_version IN NUMBER
3604: , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
3605: , p_commit IN VARCHAR2 := fnd_api.g_false
3606: , x_return_status OUT NOCOPY VARCHAR2
3607: , x_msg_count OUT NOCOPY NUMBER
3608: , x_msg_data OUT NOCOPY VARCHAR2
3609: , p_organization_id IN NUMBER

Line 3625: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN

3621: l_lpn LPN;
3622:
3623: BEGIN
3624: -- Standard call to check for call compatibility.
3625: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
3626: fnd_message.set_name('WMS', 'WMS_CONT_INCOMPATIBLE_API_CALL');
3627: fnd_msg_pub.ADD;
3628: RAISE fnd_api.g_exc_error;
3629: END IF;

Line 3628: RAISE fnd_api.g_exc_error;

3624: -- Standard call to check for call compatibility.
3625: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
3626: fnd_message.set_name('WMS', 'WMS_CONT_INCOMPATIBLE_API_CALL');
3627: fnd_msg_pub.ADD;
3628: RAISE fnd_api.g_exc_error;
3629: END IF;
3630:
3631: -- Initialize message list if p_init_msg_list is set to TRUE.
3632: IF fnd_api.to_boolean(p_init_msg_list) THEN

Line 3632: IF fnd_api.to_boolean(p_init_msg_list) THEN

3628: RAISE fnd_api.g_exc_error;
3629: END IF;
3630:
3631: -- Initialize message list if p_init_msg_list is set to TRUE.
3632: IF fnd_api.to_boolean(p_init_msg_list) THEN
3633: fnd_msg_pub.initialize;
3634: END IF;
3635:
3636: -- Initialize API return status to success

Line 3637: x_return_status := fnd_api.g_ret_sts_success;

3633: fnd_msg_pub.initialize;
3634: END IF;
3635:
3636: -- Initialize API return status to success
3637: x_return_status := fnd_api.g_ret_sts_success;
3638:
3639: IF ( l_debug = 1 ) THEN
3640: mdebug(l_api_name || ' Entered ' || g_pkg_version, G_ERROR);
3641: END IF;

Line 3654: RAISE fnd_api.g_exc_error;

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');
3653: fnd_msg_pub.ADD;
3654: RAISE fnd_api.g_exc_error;
3655: END IF;
3656:
3657: l_progress := '200';
3658: -- Validate LPN

Line 3668: RAISE FND_API.G_EXC_ERROR;

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');
3667: FND_MSG_PUB.ADD;
3668: RAISE FND_API.G_EXC_ERROR;
3669: END IF;
3670:
3671: l_progress := '300';
3672: -- Validate if LPN is valid for this transaction

Line 3682: RAISE FND_API.G_EXC_ERROR;

3678: IF ( l_result = WMS_CONTAINER_PVT.F ) THEN
3679: IF ( l_debug = 1 ) THEN
3680: mdebug(p_outermost_lpn_id || ' cannot initialize LPN', G_ERROR);
3681: END IF;
3682: RAISE FND_API.G_EXC_ERROR;
3683: END IF;
3684:
3685: l_progress := '400';
3686: WMS_CONTAINER_PVT.Initialize_LPN (

Line 3696: IF ( x_return_status <> fnd_api.g_ret_sts_success ) THEN

3692: , x_msg_data => x_msg_data
3693: , p_organization_id => p_organization_id
3694: , p_outermost_lpn_id => p_outermost_lpn_id );
3695:
3696: IF ( x_return_status <> fnd_api.g_ret_sts_success ) THEN
3697: IF ( x_return_status = fnd_api.g_ret_sts_error ) THEN
3698: RAISE FND_API.G_EXC_ERROR;
3699: END IF;
3700: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 3697: IF ( x_return_status = fnd_api.g_ret_sts_error ) THEN

3693: , p_organization_id => p_organization_id
3694: , p_outermost_lpn_id => p_outermost_lpn_id );
3695:
3696: IF ( x_return_status <> fnd_api.g_ret_sts_success ) THEN
3697: IF ( x_return_status = fnd_api.g_ret_sts_error ) THEN
3698: RAISE FND_API.G_EXC_ERROR;
3699: END IF;
3700: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3701: END IF;

Line 3698: RAISE FND_API.G_EXC_ERROR;

3694: , p_outermost_lpn_id => p_outermost_lpn_id );
3695:
3696: IF ( x_return_status <> fnd_api.g_ret_sts_success ) THEN
3697: IF ( x_return_status = fnd_api.g_ret_sts_error ) THEN
3698: RAISE FND_API.G_EXC_ERROR;
3699: END IF;
3700: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3701: END IF;
3702:

Line 3700: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

3696: IF ( x_return_status <> fnd_api.g_ret_sts_success ) THEN
3697: IF ( x_return_status = fnd_api.g_ret_sts_error ) THEN
3698: RAISE FND_API.G_EXC_ERROR;
3699: END IF;
3700: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3701: END IF;
3702:
3703: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
3704: EXCEPTION

Line 3705: WHEN FND_API.G_EXC_ERROR THEN

3701: END IF;
3702:
3703: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
3704: EXCEPTION
3705: WHEN FND_API.G_EXC_ERROR THEN
3706: x_return_status := fnd_api.g_ret_sts_error;
3707: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
3708: IF (l_debug = 1) THEN
3709: FOR i in 1..x_msg_count LOOP

Line 3706: x_return_status := fnd_api.g_ret_sts_error;

3702:
3703: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
3704: EXCEPTION
3705: WHEN FND_API.G_EXC_ERROR THEN
3706: x_return_status := fnd_api.g_ret_sts_error;
3707: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
3708: IF (l_debug = 1) THEN
3709: FOR i in 1..x_msg_count LOOP
3710: l_msgdata := substr(l_msgdata||' | '||substr(fnd_msg_pub.get(x_msg_count-i+1, 'F'), 0, 200),1,2000);

Line 3716: x_return_status := fnd_api.g_ret_sts_unexp_error;

3712: mdebug(l_api_name ||' Error progress='||l_progress||' SQL error: '|| SQLERRM(SQLCODE), 1);
3713: mdebug('msg: '||l_msgdata, 1);
3714: END IF;
3715: WHEN OTHERS THEN
3716: x_return_status := fnd_api.g_ret_sts_unexp_error;
3717: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
3718: IF (l_debug = 1) THEN
3719: mdebug(l_api_name ||' Error progress='||l_progress||' SQL error: '|| SQLERRM(SQLCODE), 1);
3720: END IF;

Line 3940: , p_init_msg_list IN VARCHAR2 := fnd_api.g_false

3936:
3937:
3938: PROCEDURE REUSE_LPNS (
3939: p_api_version IN NUMBER
3940: , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
3941: , p_commit IN VARCHAR2 := fnd_api.g_false
3942: , p_validation_level IN NUMBER := fnd_api.g_valid_level_full
3943: , x_return_status OUT NOCOPY VARCHAR2
3944: , x_msg_count OUT NOCOPY NUMBER

Line 3941: , p_commit IN VARCHAR2 := fnd_api.g_false

3937:
3938: PROCEDURE REUSE_LPNS (
3939: p_api_version IN NUMBER
3940: , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
3941: , p_commit IN VARCHAR2 := fnd_api.g_false
3942: , p_validation_level IN NUMBER := fnd_api.g_valid_level_full
3943: , x_return_status OUT NOCOPY VARCHAR2
3944: , x_msg_count OUT NOCOPY NUMBER
3945: , x_msg_data OUT NOCOPY VARCHAR2

Line 3942: , p_validation_level IN NUMBER := fnd_api.g_valid_level_full

3938: PROCEDURE REUSE_LPNS (
3939: p_api_version IN NUMBER
3940: , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
3941: , p_commit IN VARCHAR2 := fnd_api.g_false
3942: , p_validation_level IN NUMBER := fnd_api.g_valid_level_full
3943: , x_return_status OUT NOCOPY VARCHAR2
3944: , x_msg_count OUT NOCOPY NUMBER
3945: , x_msg_data OUT NOCOPY VARCHAR2
3946: , p_lpn_id IN NUMBER

Line 4007: IF NOT FND_API.Compatible_API_Call( l_api_version

4003: IF p_init_msg_list ='Y' THEN
4004: fnd_msg_pub.initialize;
4005: END IF;
4006:
4007: IF NOT FND_API.Compatible_API_Call( l_api_version
4008: , p_api_version
4009: , l_api_name
4010: , G_PKG_NAME) THEN
4011:

Line 4015: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

4011:
4012: IF l_debug = 1 THEN
4013: mdebug('API Version not compatible');
4014: END IF;
4015: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
4016: END IF;
4017:
4018: IF p_new_org_id IS NOT NULL THEN
4019: SELECT count(1)

Line 4328: RAISE fnd_api.g_exc_unexpected_error;

4324: , p_item_id => l_container_item_id ) ) THEN
4325: IF l_debug = 1 THEN
4326: mdebug('Error calling inv_cache.set_item_rec');
4327: END IF;
4328: RAISE fnd_api.g_exc_unexpected_error;
4329: END IF;
4330:
4331: UPDATE wms_license_plate_numbers
4332: SET gross_weight = inv_cache.item_rec.unit_weight

Line 4557: RAISE fnd_api.g_exc_unexpected_error;

4553: , p_item_id => l_container_item_id ) ) THEN
4554: IF l_debug = 1 THEN
4555: mdebug('Error calling inv_cache.set_item_rec');
4556: END IF;
4557: RAISE fnd_api.g_exc_unexpected_error;
4558: END IF;
4559:
4560: UPDATE wms_license_plate_numbers
4561: SET gross_weight = inv_cache.item_rec.unit_weight

Line 4574: IF p_commit = fnd_api.g_true THEN

4570: END LOOP;
4571:
4572: END IF;
4573:
4574: IF p_commit = fnd_api.g_true THEN
4575: IF l_debug = 1 THEN
4576: mdebug('p_commit is true, committing the transaction');
4577: END IF;
4578: COMMIT;