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 110: , p_init_msg_list IN VARCHAR2 := fnd_api.g_false

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

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

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

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

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

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

189: -- Standard Start of API savepoint
190: SAVEPOINT GENERATE_LPN_PUB;
191:
192: -- Standard call to check for call compatibility.
193: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
194: fnd_message.set_name('WMS', 'WMS_CONT_INCOMPATIBLE_API_CALL');
195: fnd_msg_pub.ADD;
196: RAISE fnd_api.g_exc_unexpected_error;
197: END IF;

Line 196: RAISE fnd_api.g_exc_unexpected_error;

192: -- Standard call to check for call compatibility.
193: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
194: fnd_message.set_name('WMS', 'WMS_CONT_INCOMPATIBLE_API_CALL');
195: fnd_msg_pub.ADD;
196: RAISE fnd_api.g_exc_unexpected_error;
197: END IF;
198:
199: -- Initialize message list if p_init_msg_list is set to TRUE.
200: IF fnd_api.to_boolean(p_init_msg_list) THEN

Line 200: IF fnd_api.to_boolean(p_init_msg_list) THEN

196: RAISE fnd_api.g_exc_unexpected_error;
197: END IF;
198:
199: -- Initialize message list if p_init_msg_list is set to TRUE.
200: IF fnd_api.to_boolean(p_init_msg_list) THEN
201: fnd_msg_pub.initialize;
202: END IF;
203:
204: -- Initialize API return status to success

Line 205: x_return_status := fnd_api.g_ret_sts_success;

201: fnd_msg_pub.initialize;
202: END IF;
203:
204: -- Initialize API return status to success
205: x_return_status := fnd_api.g_ret_sts_success;
206: -- API body
207: IF (l_debug = 1) THEN
208: 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);
209: 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 216: IF (p_validation_level = fnd_api.g_valid_level_full) THEN

212: END IF;
213:
214: l_progress := 'Validate all inputs if validation level is set to full';
215:
216: IF (p_validation_level = fnd_api.g_valid_level_full) THEN
217: l_progress := 'Validate Organization ID';
218: l_org.organization_id := p_organization_id;
219: l_result := inv_validate.ORGANIZATION(l_org);
220:

Line 227: RAISE fnd_api.g_exc_error;

223: mdebug(p_organization_id || ' is not a valid org id', G_ERROR);
224: END IF;
225: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_ORG');
226: fnd_msg_pub.ADD;
227: RAISE fnd_api.g_exc_error;
228: END IF;
229:
230: l_progress := 'Validate Container Item';
231: IF (p_container_item_id IS NOT NULL) THEN

Line 241: RAISE fnd_api.g_exc_error;

237: mdebug(p_container_item_id || ' is not a valid container item id', 1);
238: END IF;
239: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_ITEM');
240: fnd_msg_pub.ADD;
241: RAISE fnd_api.g_exc_error;
242: END IF;
243:
244: IF (l_container_item.container_item_flag = 'N') THEN
245: IF (l_debug = 1) THEN

Line 250: RAISE fnd_api.g_exc_error;

246: mdebug(p_container_item_id || ' is not a container', 1);
247: END IF;
248: fnd_message.set_name('WMS', 'WMS_CONT_ITEM_NOT_A_CONT');
249: fnd_msg_pub.ADD;
250: RAISE fnd_api.g_exc_error;
251: END IF;
252: END IF;
253:
254: l_progress := 'Validate Subinventory';

Line 265: RAISE fnd_api.g_exc_error;

261: mdebug(p_subinventory || ' is not a valid sub', 1);
262: END IF;
263: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_SUB');
264: fnd_msg_pub.ADD;
265: RAISE fnd_api.g_exc_error;
266: END IF;
267: END IF;
268:
269: l_progress := 'Validate Locator';

Line 278: RAISE fnd_api.g_exc_error;

274: mdebug('Generate_LPN is missing required loc', 1);
275: END IF;
276: fnd_message.set_name('WMS', 'WMS_CONT_MISS_REQ_LOC');
277: fnd_msg_pub.ADD;
278: RAISE fnd_api.g_exc_error;
279: END IF;
280:
281: l_locator.inventory_location_id := p_locator_id;
282: l_result := inv_validate.validatelocator(l_locator, l_org, l_sub);

Line 290: RAISE fnd_api.g_exc_error;

286: mdebug(p_locator_id || ' is not a valid loc id', 1);
287: END IF;
288: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_LOC');
289: fnd_msg_pub.ADD;
290: RAISE fnd_api.g_exc_error;
291: END IF;
292: END IF;
293: END IF;
294:

Line 307: RAISE fnd_api.g_exc_error;

303: mdebug(p_revision || ' is not a valid rev', 1);
304: END IF;
305: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_REV');
306: fnd_msg_pub.ADD;
307: RAISE fnd_api.g_exc_error;
308: END IF;
309: ELSE
310: --Rev not supported for container items currently. Allow to use rev controlled items
311: IF (l_debug = 1) THEN

Line 316: --RAISE fnd_api.g_exc_error;

312: mdebug('Generate_LPN is missing the rev for rev container item..ok', 1);
313: END IF;
314: --fnd_message.set_name('WMS', 'WMS_CONT_MISS_REQ_REV');
315: --fnd_msg_pub.ADD;
316: --RAISE fnd_api.g_exc_error;
317: END IF;
318: END IF;
319: END IF;
320:

Line 334: RAISE fnd_api.g_exc_error;

330: mdebug(p_lot_number || ' is not a valid lot', 1);
331: END IF;
332: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_LOT');
333: fnd_msg_pub.ADD;
334: RAISE fnd_api.g_exc_error;
335: END IF;
336: ELSE
337: --Lots not supported for container items currently. Allow to use lot controlled items
338: IF (l_debug = 1) THEN

Line 343: --RAISE fnd_api.g_exc_error;

339: mdebug('Generate_LPN is missing lot for lot container item..ok', 1);
340: END IF;
341: --fnd_message.set_name('WMS', 'WMS_CONT_MISS_REQ_LOT');
342: --fnd_msg_pub.ADD;
343: --RAISE fnd_api.g_exc_error;
344: END IF;
345: END IF;
346: END IF;
347:

Line 359: RAISE fnd_api.g_exc_error;

355: mdebug(p_to_serial_number || ' failed MTL_Serial_Check', 1);
356: END IF;
357: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_SER');
358: fnd_msg_pub.ADD;
359: RAISE fnd_api.g_exc_error;
360: END IF;
361:
362: -- Check that in the case of a range of serial numbers, that the
363: -- inputted p_quantity equals the amount of items in the serial range.

Line 371: RAISE fnd_api.g_exc_error;

367: mdebug(p_quantity || ' does not match sn range qty of ' || l_quantity_serial, 1);
368: END IF;
369: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_X_QTY');
370: fnd_msg_pub.ADD;
371: RAISE fnd_api.g_exc_error;
372: END IF;
373: END IF;
374:
375: -- Get the serial number length.

Line 393: RAISE fnd_api.g_exc_error;

389: mdebug(l_current_serial || 'failed validate_serial', 1);
390: END IF;
391: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_SER');
392: fnd_msg_pub.ADD;
393: RAISE fnd_api.g_exc_error;
394: END IF;
395: ELSE
396: -- Subinventory was not given so will need to do
397: -- alternative non-standard serial number validation.

Line 407: RAISE fnd_api.g_exc_error;

403: mdebug(l_current_serial || ' could not be found in MTL_SERIAL_NUMBERS', 1);
404: END IF;
405: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_SER');
406: fnd_msg_pub.ADD;
407: RAISE fnd_api.g_exc_error;
408: END IF;
409:
410: CLOSE serial_validation_cursor;
411: END IF;

Line 435: --RAISE fnd_api.g_exc_error;

431: mdebug('Generate_LPN is missing sn for serial container item..ok', 1);
432: END IF;
433: --fnd_message.set_name('WMS', 'WMS_CONT_MISS_SER_NUM');
434: --fnd_msg_pub.ADD;
435: --RAISE fnd_api.g_exc_error;
436: END IF;
437: END IF;
438: END IF;
439:

Line 448: RAISE fnd_api.g_exc_error;

444: mdebug(p_quantity || ' is a negative qty', 1);
445: END IF;
446: fnd_message.set_name('WMS', 'WMS_CONT_NEG_QTY');
447: fnd_msg_pub.ADD;
448: RAISE fnd_api.g_exc_error;
449: END IF;
450:
451: l_quantity := p_quantity;
452: ELSE

Line 464: RAISE fnd_api.g_exc_error;

460: mdebug(p_source || ' is an invalid source', 1);
461: END IF;
462: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_LPN_CONTEXT');
463: fnd_msg_pub.ADD;
464: RAISE fnd_api.g_exc_error;
465: END IF;
466: END IF;
467:
468: l_progress := 'Validate Cost Group';

Line 478: RAISE fnd_api.g_exc_error;

474: mdebug(p_cost_group_id || ' is an invalid cost group id', 1);
475: END IF;
476: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_CST_GRP');
477: fnd_msg_pub.ADD;
478: RAISE fnd_api.g_exc_error;
479: END IF;
480: END IF;
481: END IF;
482:

Line 504: , p_init_msg_list => fnd_api.g_false

500: l_serial_tbl(1).to_serial_number := p_to_serial_number;
501:
502: WMS_Container_PVT.Auto_Create_LPNs (
503: p_api_version => p_api_version
504: , p_init_msg_list => fnd_api.g_false
505: , p_commit => fnd_api.g_false
506: , x_return_status => x_return_status
507: , x_msg_count => x_msg_count
508: , x_msg_data => x_msg_data

Line 505: , p_commit => fnd_api.g_false

501:
502: WMS_Container_PVT.Auto_Create_LPNs (
503: p_api_version => p_api_version
504: , p_init_msg_list => fnd_api.g_false
505: , p_commit => fnd_api.g_false
506: , x_return_status => x_return_status
507: , x_msg_count => x_msg_count
508: , x_msg_data => x_msg_data
509: , p_caller => 'WMS_Generate_LPN'

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

516: , p_lpn_attributes => l_lpn_att_rec
517: , p_serial_ranges => l_serial_tbl
518: , x_created_lpns => l_gen_lpn_tbl );
519:
520: IF ( x_return_status = fnd_api.g_ret_sts_success ) THEN
521: p_lpn_id_out := l_gen_lpn_tbl(1).lpn_id;
522: p_lpn_out := l_gen_lpn_tbl(1).license_plate_number;
523: ELSE
524: IF ( l_debug = 1 ) THEN

Line 527: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

523: ELSE
524: IF ( l_debug = 1 ) THEN
525: mdebug('Call to WMS_Container_PVT.Auto_Create_LPNs Failed', G_ERROR);
526: END IF;
527: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
528: END IF;
529:
530: l_progress := 'End of API body';
531:

Line 533: IF fnd_api.to_boolean(p_commit) THEN

529:
530: l_progress := 'End of API body';
531:
532: -- Standard check of p_commit.
533: IF fnd_api.to_boolean(p_commit) THEN
534: COMMIT WORK;
535: END IF;
536:
537: -- Standard call to get message count and if count is 1,

Line 541: WHEN FND_API.G_EXC_ERROR THEN

537: -- Standard call to get message count and if count is 1,
538: -- get message info.
539: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
540: EXCEPTION
541: WHEN FND_API.G_EXC_ERROR THEN
542: x_return_status := fnd_api.g_ret_sts_error;
543: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
544: IF (l_debug = 1) THEN
545: FOR i in 1..x_msg_count LOOP

Line 542: x_return_status := fnd_api.g_ret_sts_error;

538: -- get message info.
539: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
540: EXCEPTION
541: WHEN FND_API.G_EXC_ERROR THEN
542: x_return_status := fnd_api.g_ret_sts_error;
543: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
544: IF (l_debug = 1) THEN
545: FOR i in 1..x_msg_count LOOP
546: l_msgdata := substr(l_msgdata||' | '||substr(fnd_msg_pub.get(x_msg_count-i+1, 'F'), 0, 200),1,2000);

Line 553: x_return_status := fnd_api.g_ret_sts_unexp_error;

549: mdebug('msg: '||l_msgdata, G_ERROR);
550: END IF;
551: ROLLBACK TO GENERATE_LPN_PUB;
552: WHEN OTHERS THEN
553: x_return_status := fnd_api.g_ret_sts_unexp_error;
554: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
555: IF (l_debug = 1) THEN
556: mdebug(l_api_name ||' Error progress='||l_progress||' SQL error: '|| SQLERRM(SQLCODE), G_ERROR);
557: END IF;

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

561: -- ----------------------------------------------------------------------------------
562: -- ----------------------------------------------------------------------------------
563: PROCEDURE associate_lpn(
564: p_api_version IN NUMBER,
565: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
566: p_commit IN VARCHAR2 := fnd_api.g_false,
567: p_validation_level IN NUMBER := fnd_api.g_valid_level_full,
568: x_return_status OUT NOCOPY VARCHAR2,
569: x_msg_count OUT NOCOPY NUMBER,

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

562: -- ----------------------------------------------------------------------------------
563: PROCEDURE associate_lpn(
564: p_api_version IN NUMBER,
565: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
566: p_commit IN VARCHAR2 := fnd_api.g_false,
567: p_validation_level IN NUMBER := fnd_api.g_valid_level_full,
568: x_return_status OUT NOCOPY VARCHAR2,
569: x_msg_count OUT NOCOPY NUMBER,
570: x_msg_data OUT NOCOPY VARCHAR2,

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

563: PROCEDURE associate_lpn(
564: p_api_version IN NUMBER,
565: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
566: p_commit IN VARCHAR2 := fnd_api.g_false,
567: p_validation_level IN NUMBER := fnd_api.g_valid_level_full,
568: x_return_status OUT NOCOPY VARCHAR2,
569: x_msg_count OUT NOCOPY NUMBER,
570: x_msg_data OUT NOCOPY VARCHAR2,
571: p_lpn_id IN NUMBER,

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

605: -- Standard Start of API savepoint
606: SAVEPOINT associate_lpn_pub;
607:
608: -- Standard call to check for call compatibility.
609: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
610: fnd_message.set_name('WMS', 'WMS_CONT_INCOMPATIBLE_API_CALL');
611: fnd_msg_pub.ADD;
612: RAISE fnd_api.g_exc_unexpected_error;
613: END IF;

Line 612: RAISE fnd_api.g_exc_unexpected_error;

608: -- Standard call to check for call compatibility.
609: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
610: fnd_message.set_name('WMS', 'WMS_CONT_INCOMPATIBLE_API_CALL');
611: fnd_msg_pub.ADD;
612: RAISE fnd_api.g_exc_unexpected_error;
613: END IF;
614:
615: -- Initialize message list if p_init_msg_list is set to TRUE.
616: IF fnd_api.to_boolean(p_init_msg_list) THEN

Line 616: IF fnd_api.to_boolean(p_init_msg_list) THEN

612: RAISE fnd_api.g_exc_unexpected_error;
613: END IF;
614:
615: -- Initialize message list if p_init_msg_list is set to TRUE.
616: IF fnd_api.to_boolean(p_init_msg_list) THEN
617: fnd_msg_pub.initialize;
618: END IF;
619:
620: -- Initialize API return status to success

Line 621: x_return_status := fnd_api.g_ret_sts_success;

617: fnd_msg_pub.initialize;
618: END IF;
619:
620: -- Initialize API return status to success
621: x_return_status := fnd_api.g_ret_sts_success;
622:
623: -- API body
624: IF (l_debug = 1) THEN
625: mdebug('Call to Associate_LPN API', G_MESSAGE);

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

628: mdebug('cg=' ||p_cost_group_id|| ' srctype=' ||p_source_type_id||' srchdr='||p_source_header_id||' srcln='||p_source_line_id, G_INFO);
629: END IF;
630:
631: /* Validate all inputs if validation level is set to full */
632: IF (p_validation_level = fnd_api.g_valid_level_full) THEN
633: /* Check that lpn id is given */
634: IF (p_lpn_id IS NULL) THEN
635: fnd_message.set_name('WMS', 'WMS_CONT_LPN_NOT_GIVEN');
636: fnd_msg_pub.ADD;

Line 637: RAISE fnd_api.g_exc_error;

633: /* Check that lpn id is given */
634: IF (p_lpn_id IS NULL) THEN
635: fnd_message.set_name('WMS', 'WMS_CONT_LPN_NOT_GIVEN');
636: fnd_msg_pub.ADD;
637: RAISE fnd_api.g_exc_error;
638: END IF;
639:
640: /* Validate the LPN */
641: l_lpn.lpn_id := p_lpn_id;

Line 662: RAISE fnd_api.g_exc_error;

658: mdebug(p_organization_id || ' is an invalid org id', 1);
659: END IF;
660: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_ORG');
661: fnd_msg_pub.ADD;
662: RAISE fnd_api.g_exc_error;
663: END IF;
664:
665: /* Validate Subinventory */
666: IF (p_subinventory IS NOT NULL) THEN

Line 676: RAISE fnd_api.g_exc_error;

672: mdebug(p_subinventory || ' is an invalid sub', 1);
673: END IF;
674: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_SUB');
675: fnd_msg_pub.ADD;
676: RAISE fnd_api.g_exc_error;
677: END IF;
678: END IF;
679:
680: /* Validate Locator */

Line 686: RAISE fnd_api.g_exc_error;

682: IF (l_sub.locator_type IN (2, 3)) THEN
683: IF (p_locator_id IS NULL) THEN
684: fnd_message.set_name('WMS', 'WMS_CONT_MISS_REQ_LOC');
685: fnd_msg_pub.ADD;
686: RAISE fnd_api.g_exc_error;
687: END IF;
688:
689: l_locator.inventory_location_id := p_locator_id;
690: l_result := inv_validate.validatelocator(l_locator, l_org, l_sub);

Line 698: RAISE fnd_api.g_exc_error;

694: mdebug(p_locator_id || ' is an invalid loc id', 1);
695: END IF;
696: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_LOC');
697: fnd_msg_pub.ADD;
698: RAISE fnd_api.g_exc_error;
699: END IF;
700: END IF;
701: END IF;
702:

Line 715: RAISE fnd_api.g_exc_error;

711: mdebug(p_container_item_id || ' is an invalid container item id', 1);
712: END IF;
713: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_ITEM');
714: fnd_msg_pub.ADD;
715: RAISE fnd_api.g_exc_error;
716: END IF;
717:
718: IF (l_container_item.container_item_flag = 'N') THEN
719: IF (l_debug = 1) THEN

Line 724: RAISE fnd_api.g_exc_error;

720: mdebug(p_container_item_id || ' is not a container item', 1);
721: END IF;
722: fnd_message.set_name('WMS', 'WMS_CONT_ITEM_NOT_A_CONT');
723: fnd_msg_pub.ADD;
724: RAISE fnd_api.g_exc_error;
725: END IF;
726:
727: IF (l_container_item.unit_weight IS NOT NULL) THEN
728: IF (l_lpn.gross_weight IS NOT NULL) THEN

Line 748: RAISE fnd_api.g_exc_error;

744: END IF;
745: ELSE
746: fnd_message.set_name('WMS', 'WMS_CONT_CONTAINER_NOT_GIVEN');
747: fnd_msg_pub.ADD;
748: RAISE fnd_api.g_exc_error;
749: END IF;
750:
751: /* Validate Revision */
752: IF (p_container_item_id IS NOT NULL) THEN

Line 763: RAISE fnd_api.g_exc_error;

759: mdebug(p_revision || ' is an invalid rev', 1);
760: END IF;
761: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_REV');
762: fnd_msg_pub.ADD;
763: RAISE fnd_api.g_exc_error;
764: END IF;
765: ELSE
766: --Rev not supported for container items currently. Allow to use rev controlled items
767: IF (l_debug = 1) THEN

Line 772: --RAISE fnd_api.g_exc_error;

768: mdebug('Associate_LPN is missing the rev for rev container item..ok', 1);
769: END IF;
770: --fnd_message.set_name('WMS', 'WMS_CONT_MISS_REQ_REV');
771: --fnd_msg_pub.ADD;
772: --RAISE fnd_api.g_exc_error;
773: END IF;
774: END IF;
775: END IF;
776:

Line 790: RAISE fnd_api.g_exc_error;

786: mdebug(p_lot_number || ' is not a valid lot', 1);
787: END IF;
788: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_LOT');
789: fnd_msg_pub.ADD;
790: RAISE fnd_api.g_exc_error;
791: END IF;
792: ELSE
793: --Lots not supported for container items currently. Allow to use lot controlled items
794: IF (l_debug = 1) THEN

Line 799: --RAISE fnd_api.g_exc_error;

795: mdebug('Associate_LPN is missing lot for lot container item..ok', 1);
796: END IF;
797: --fnd_message.set_name('WMS', 'WMS_CONT_MISS_REQ_LOT');
798: --fnd_msg_pub.ADD;
799: --RAISE fnd_api.g_exc_error;
800: END IF;
801: END IF;
802: END IF;
803:

Line 817: RAISE fnd_api.g_exc_error;

813: mdebug(p_serial_number || ' is an invalid sn', 1);
814: END IF;
815: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_SER');
816: fnd_msg_pub.ADD;
817: RAISE fnd_api.g_exc_error;
818: END IF;
819: ELSE
820: --SN not supported for container items currently. Allow to use serial controlled items
821: IF (l_debug = 1) THEN

Line 826: --RAISE fnd_api.g_exc_error;

822: mdebug('Associate_LPN is missing sn for serial container item..ok', 1);
823: END IF;
824: --fnd_message.set_name('WMS', 'WMS_CONT_MISS_REQ_SER');
825: --fnd_msg_pub.ADD;
826: --RAISE fnd_api.g_exc_error;
827: END IF;
828: END IF;
829: END IF;
830:

Line 841: RAISE fnd_api.g_exc_error;

837: mdebug(p_cost_group_id || ' is an invalid cg', 1);
838: END IF;
839: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_CST_GRP');
840: fnd_msg_pub.ADD;
841: RAISE fnd_api.g_exc_error;
842: END IF;
843: END IF;
844: END IF;
845:

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

846: /* End of input validation */
847:
848: -- Necessary validation to get local values
849: -- if full validation was not performed
850: IF (p_validation_level <> fnd_api.g_valid_level_full) THEN
851: /* Validate the LPN */
852: l_lpn.lpn_id := p_lpn_id;
853: l_lpn.license_plate_number := NULL;
854: l_result := validate_lpn(l_lpn);

Line 870: RAISE fnd_api.g_exc_error;

866:
867: IF (l_result = inv_validate.f) THEN
868: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_ORG');
869: fnd_msg_pub.ADD;
870: RAISE fnd_api.g_exc_error;
871: END IF;
872:
873: /* Validate Container Item */
874: IF (p_container_item_id IS NOT NULL) THEN

Line 881: RAISE fnd_api.g_exc_error;

877:
878: IF (l_result = inv_validate.f) THEN
879: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_ITEM');
880: fnd_msg_pub.ADD;
881: RAISE fnd_api.g_exc_error;
882: END IF;
883:
884: IF (l_container_item.container_item_flag = 'N') THEN
885: fnd_message.set_name('WMS', 'WMS_CONT_ITEM_NOT_A_CONT');

Line 887: RAISE fnd_api.g_exc_error;

883:
884: IF (l_container_item.container_item_flag = 'N') THEN
885: fnd_message.set_name('WMS', 'WMS_CONT_ITEM_NOT_A_CONT');
886: fnd_msg_pub.ADD;
887: RAISE fnd_api.g_exc_error;
888: END IF;
889:
890: IF (l_container_item.unit_weight IS NOT NULL) THEN
891: IF (l_lpn.gross_weight IS NOT NULL) THEN

Line 911: RAISE fnd_api.g_exc_error;

907: END IF;
908: ELSE
909: fnd_message.set_name('WMS', 'WMS_CONT_CONTAINER_NOT_GIVEN');
910: fnd_msg_pub.ADD;
911: RAISE fnd_api.g_exc_error;
912: END IF;
913: END IF;
914:
915: IF (l_insert_update_flag = 'u') THEN

Line 1054: IF fnd_api.to_boolean(p_commit) THEN

1050:
1051: -- End of API body
1052:
1053: -- Standard check of p_commit.
1054: IF fnd_api.to_boolean(p_commit) THEN
1055: COMMIT WORK;
1056: END IF;
1057:
1058: -- Standard call to get message count and if count is 1,

Line 1062: WHEN fnd_api.g_exc_error THEN

1058: -- Standard call to get message count and if count is 1,
1059: -- get message info.
1060: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1061: EXCEPTION
1062: WHEN fnd_api.g_exc_error THEN
1063: ROLLBACK TO associate_lpn_pub;
1064: x_return_status := fnd_api.g_ret_sts_error;
1065: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1066: WHEN fnd_api.g_exc_unexpected_error THEN

Line 1064: x_return_status := fnd_api.g_ret_sts_error;

1060: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1061: EXCEPTION
1062: WHEN fnd_api.g_exc_error THEN
1063: ROLLBACK TO associate_lpn_pub;
1064: x_return_status := fnd_api.g_ret_sts_error;
1065: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1066: WHEN fnd_api.g_exc_unexpected_error THEN
1067: ROLLBACK TO associate_lpn_pub;
1068: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 1066: WHEN fnd_api.g_exc_unexpected_error THEN

1062: WHEN fnd_api.g_exc_error THEN
1063: ROLLBACK TO associate_lpn_pub;
1064: x_return_status := fnd_api.g_ret_sts_error;
1065: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1066: WHEN fnd_api.g_exc_unexpected_error THEN
1067: ROLLBACK TO associate_lpn_pub;
1068: x_return_status := fnd_api.g_ret_sts_unexp_error;
1069: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1070: WHEN OTHERS THEN

Line 1068: x_return_status := fnd_api.g_ret_sts_unexp_error;

1064: x_return_status := fnd_api.g_ret_sts_error;
1065: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1066: WHEN fnd_api.g_exc_unexpected_error THEN
1067: ROLLBACK TO associate_lpn_pub;
1068: x_return_status := fnd_api.g_ret_sts_unexp_error;
1069: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1070: WHEN OTHERS THEN
1071: ROLLBACK TO associate_lpn_pub;
1072: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 1072: x_return_status := fnd_api.g_ret_sts_unexp_error;

1068: x_return_status := fnd_api.g_ret_sts_unexp_error;
1069: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1070: WHEN OTHERS THEN
1071: ROLLBACK TO associate_lpn_pub;
1072: x_return_status := fnd_api.g_ret_sts_unexp_error;
1073:
1074: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
1075: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
1076: END IF;

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

1082: -- ----------------------------------------------------------------------------------
1083:
1084: PROCEDURE Create_LPN (
1085: p_api_version IN NUMBER
1086: , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1087: , p_commit IN VARCHAR2 := fnd_api.g_false
1088: , p_validation_level IN NUMBER := fnd_api.g_valid_level_full
1089: , x_return_status OUT NOCOPY VARCHAR2
1090: , x_msg_count OUT NOCOPY NUMBER

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

1083:
1084: PROCEDURE Create_LPN (
1085: p_api_version IN NUMBER
1086: , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1087: , p_commit IN VARCHAR2 := fnd_api.g_false
1088: , p_validation_level IN NUMBER := fnd_api.g_valid_level_full
1089: , x_return_status OUT NOCOPY VARCHAR2
1090: , x_msg_count OUT NOCOPY NUMBER
1091: , x_msg_data OUT NOCOPY VARCHAR2

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

1084: PROCEDURE Create_LPN (
1085: p_api_version IN NUMBER
1086: , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1087: , p_commit IN VARCHAR2 := fnd_api.g_false
1088: , p_validation_level IN NUMBER := fnd_api.g_valid_level_full
1089: , x_return_status OUT NOCOPY VARCHAR2
1090: , x_msg_count OUT NOCOPY NUMBER
1091: , x_msg_data OUT NOCOPY VARCHAR2
1092: , p_lpn IN VARCHAR2

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

1123: -- Standard Start of API savepoint
1124: SAVEPOINT create_lpn_pub;
1125:
1126: -- Standard call to check for call compatibility.
1127: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
1128: fnd_message.set_name('WMS', 'WMS_CONT_INCOMPATIBLE_API_CALL');
1129: fnd_msg_pub.ADD;
1130: RAISE fnd_api.g_exc_unexpected_error;
1131: END IF;

Line 1130: RAISE fnd_api.g_exc_unexpected_error;

1126: -- Standard call to check for call compatibility.
1127: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
1128: fnd_message.set_name('WMS', 'WMS_CONT_INCOMPATIBLE_API_CALL');
1129: fnd_msg_pub.ADD;
1130: RAISE fnd_api.g_exc_unexpected_error;
1131: END IF;
1132:
1133: -- Initialize message list if p_init_msg_list is set to TRUE.
1134: IF fnd_api.to_boolean(p_init_msg_list) THEN

Line 1134: IF fnd_api.to_boolean(p_init_msg_list) THEN

1130: RAISE fnd_api.g_exc_unexpected_error;
1131: END IF;
1132:
1133: -- Initialize message list if p_init_msg_list is set to TRUE.
1134: IF fnd_api.to_boolean(p_init_msg_list) THEN
1135: fnd_msg_pub.initialize;
1136: END IF;
1137:
1138: -- Initialize API return status to success

Line 1139: x_return_status := fnd_api.g_ret_sts_success;

1135: fnd_msg_pub.initialize;
1136: END IF;
1137:
1138: -- Initialize API return status to success
1139: x_return_status := fnd_api.g_ret_sts_success;
1140: -- API body
1141: IF (l_debug = 1) THEN
1142: mdebug('Call to Create_LPN orgid=' ||p_organization_id|| ' sub=' ||p_subinventory|| ' loc=' ||p_locator_id|| ' lpn=' ||p_lpn|| ' src=' ||p_source, G_INFO);
1143: 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 1148: IF (p_validation_level = fnd_api.g_valid_level_full) THEN

1144: 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);
1145: END IF;
1146:
1147: /* Validate all inputs if validation level is set to full */
1148: IF (p_validation_level = fnd_api.g_valid_level_full) THEN
1149: /* Validate LPN */
1150: l_lpn.license_plate_number := p_lpn;
1151: l_lpn.lpn_id := NULL;
1152: l_result := validate_lpn(l_lpn);

Line 1160: RAISE fnd_api.g_exc_error;

1156: mdebug(p_lpn || ' failed LPN validation', 1);
1157: END IF;
1158: fnd_message.set_name('WMS', 'WMS_CONT_DUPLICATE_LPN');
1159: fnd_msg_pub.ADD;
1160: RAISE fnd_api.g_exc_error;
1161: END IF;
1162:
1163: /* Validate Parent LPN */
1164: IF (p_parent_lpn_id IS NOT NULL) THEN

Line 1175: RAISE fnd_api.g_exc_error;

1171: mdebug(p_parent_lpn_id || ' parent LPN failed validation', 1);
1172: END IF;
1173: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_LPN');
1174: fnd_msg_pub.ADD;
1175: RAISE fnd_api.g_exc_error;
1176: END IF;
1177: END IF;
1178:
1179: /* Validate Organization ID */

Line 1189: RAISE fnd_api.g_exc_error;

1185: mdebug(p_organization_id || ' is an invalid Org', 1);
1186: END IF;
1187: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_ORG');
1188: fnd_msg_pub.ADD;
1189: RAISE fnd_api.g_exc_error;
1190: END IF;
1191:
1192: /* Validate Subinventory */
1193: IF (p_subinventory IS NOT NULL) THEN

Line 1203: RAISE fnd_api.g_exc_error;

1199: mdebug(p_subinventory || ' Invalid Subinventory', 1);
1200: END IF;
1201: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_SUB');
1202: fnd_msg_pub.ADD;
1203: RAISE fnd_api.g_exc_error;
1204: END IF;
1205: END IF;
1206:
1207: /* Validate Locator */

Line 1216: RAISE fnd_api.g_exc_error;

1212: mdebug('Missing required locator', 1);
1213: END IF;
1214: fnd_message.set_name('WMS', 'WMS_CONT_MISS_REQ_LOC');
1215: fnd_msg_pub.ADD;
1216: RAISE fnd_api.g_exc_error;
1217: END IF;
1218:
1219: l_locator.inventory_location_id := p_locator_id;
1220: l_result := inv_validate.validatelocator(l_locator, l_org, l_sub);

Line 1228: RAISE fnd_api.g_exc_error;

1224: mdebug(p_locator_id || ' is an invalid locator', 1);
1225: END IF;
1226: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_LOC');
1227: fnd_msg_pub.ADD;
1228: RAISE fnd_api.g_exc_error;
1229: END IF;
1230: END IF;
1231: END IF;
1232:

Line 1244: RAISE fnd_api.g_exc_error;

1240: mdebug(p_container_item_id || ' is an invalid container item', 1);
1241: END IF;
1242: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_ITEM');
1243: fnd_msg_pub.ADD;
1244: RAISE fnd_api.g_exc_error;
1245: END IF;
1246:
1247: IF (l_container_item.container_item_flag = 'N') THEN
1248: IF (l_debug = 1) THEN

Line 1253: RAISE fnd_api.g_exc_error;

1249: mdebug(p_container_item_id || ' is not a container', 1);
1250: END IF;
1251: fnd_message.set_name('WMS', 'WMS_CONT_ITEM_NOT_A_CONTAINER');
1252: fnd_msg_pub.ADD;
1253: RAISE fnd_api.g_exc_error;
1254: END IF;
1255: END IF;
1256:
1257: /* Validate Revision */

Line 1269: RAISE fnd_api.g_exc_error;

1265: mdebug(p_revision || ' is an invalid Revision', 1);
1266: END IF;
1267: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_REV');
1268: fnd_msg_pub.ADD;
1269: RAISE fnd_api.g_exc_error;
1270: END IF;
1271: ELSE
1272: --Revision not supported for container items currently. Allow to use rev controlled items
1273: IF (l_debug = 1) THEN

Line 1278: --RAISE fnd_api.g_exc_error;

1274: mdebug('Generate_LPN is missing rev for lot container item..ok', 1);
1275: END IF;
1276: --fnd_message.set_name('WMS', 'WMS_CONT_MISS_REQ_REV');
1277: --fnd_msg_pub.ADD;
1278: --RAISE fnd_api.g_exc_error;
1279: END IF;
1280: END IF;
1281: END IF;
1282:

Line 1296: RAISE fnd_api.g_exc_error;

1292: mdebug(p_lot_number || ' is an invalid lot', 1);
1293: END IF;
1294: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_LOT');
1295: fnd_msg_pub.ADD;
1296: RAISE fnd_api.g_exc_error;
1297: END IF;
1298: ELSE
1299: --Lots not supported for container items currently. Allow to use lot controlled items
1300: IF (l_debug = 1) THEN

Line 1305: RAISE fnd_api.g_exc_error;

1301: mdebug('Generate_LPN is missing lot for lot container item..ok', 1);
1302: END IF;
1303: fnd_message.set_name('WMS', 'WMS_CONT_MISS_REQ_LOT');
1304: fnd_msg_pub.ADD;
1305: RAISE fnd_api.g_exc_error;
1306: END IF;
1307: END IF;
1308: END IF;
1309:

Line 1323: RAISE fnd_api.g_exc_error;

1319: mdebug(l_serial.serial_number || ' is an invalid Serial Number', 1);
1320: END IF;
1321: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_SER');
1322: fnd_msg_pub.ADD;
1323: RAISE fnd_api.g_exc_error;
1324: END IF;
1325: ELSE
1326: --SN not supported for container items currently. Allow to use serial controlled items
1327: IF (l_debug = 1) THEN

Line 1332: --RAISE fnd_api.g_exc_error;

1328: mdebug('Create_LPN is missing sn for serial container item..ok', 1);
1329: END IF;
1330: --fnd_message.set_name('WMS', 'WMS_CONT_MISS_REQ_SER');
1331: --fnd_msg_pub.ADD;
1332: --RAISE fnd_api.g_exc_error;
1333: END IF;
1334: END IF;
1335: END IF;
1336:

Line 1345: RAISE fnd_api.g_exc_error;

1341: mdebug(p_source || 'is an invalid source type', 1);
1342: END IF;
1343: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_LPN_CONTEXT');
1344: fnd_msg_pub.ADD;
1345: RAISE fnd_api.g_exc_error;
1346: END IF;
1347: END IF;
1348:
1349: /* Validate Cost Group */

Line 1359: RAISE fnd_api.g_exc_error;

1355: mdebug(p_cost_group_id || 'is an invalid cost group', 1);
1356: END IF;
1357: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_CST_GRP');
1358: fnd_msg_pub.ADD;
1359: RAISE fnd_api.g_exc_error;
1360: END IF;
1361: END IF;
1362: END IF;
1363:

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

1388: , p_source_line_id => p_source_line_id
1389: , p_source_line_detail_id => p_source_line_detail_id
1390: , x_lpn_id => x_lpn_id );
1391:
1392: IF ( x_return_status <> fnd_api.g_ret_sts_success ) THEN
1393: IF ( l_debug = 1 ) THEN
1394: mdebug('Call to WMS_CONTAINER_PVT.Create_LPN Failed', G_ERROR);
1395: END IF;
1396: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 1396: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

1392: IF ( x_return_status <> fnd_api.g_ret_sts_success ) THEN
1393: IF ( l_debug = 1 ) THEN
1394: mdebug('Call to WMS_CONTAINER_PVT.Create_LPN Failed', G_ERROR);
1395: END IF;
1396: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1397: END IF;
1398:
1399: -- Standard check of p_commit.
1400: IF fnd_api.to_boolean(p_commit) THEN

Line 1400: IF fnd_api.to_boolean(p_commit) THEN

1396: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1397: END IF;
1398:
1399: -- Standard check of p_commit.
1400: IF fnd_api.to_boolean(p_commit) THEN
1401: COMMIT WORK;
1402: END IF;
1403:
1404: -- Standard call to get message count and if count is 1,

Line 1408: WHEN fnd_api.g_exc_error THEN

1404: -- Standard call to get message count and if count is 1,
1405: -- get message info.
1406: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1407: EXCEPTION
1408: WHEN fnd_api.g_exc_error THEN
1409: ROLLBACK TO create_lpn_pub;
1410: x_return_status := fnd_api.g_ret_sts_error;
1411: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1412: WHEN fnd_api.g_exc_unexpected_error THEN

Line 1410: x_return_status := fnd_api.g_ret_sts_error;

1406: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1407: EXCEPTION
1408: WHEN fnd_api.g_exc_error THEN
1409: ROLLBACK TO create_lpn_pub;
1410: x_return_status := fnd_api.g_ret_sts_error;
1411: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1412: WHEN fnd_api.g_exc_unexpected_error THEN
1413: ROLLBACK TO create_lpn_pub;
1414: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 1412: WHEN fnd_api.g_exc_unexpected_error THEN

1408: WHEN fnd_api.g_exc_error THEN
1409: ROLLBACK TO create_lpn_pub;
1410: x_return_status := fnd_api.g_ret_sts_error;
1411: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1412: WHEN fnd_api.g_exc_unexpected_error THEN
1413: ROLLBACK TO create_lpn_pub;
1414: x_return_status := fnd_api.g_ret_sts_unexp_error;
1415: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1416: WHEN OTHERS THEN

Line 1414: x_return_status := fnd_api.g_ret_sts_unexp_error;

1410: x_return_status := fnd_api.g_ret_sts_error;
1411: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1412: WHEN fnd_api.g_exc_unexpected_error THEN
1413: ROLLBACK TO create_lpn_pub;
1414: x_return_status := fnd_api.g_ret_sts_unexp_error;
1415: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1416: WHEN OTHERS THEN
1417: ROLLBACK TO create_lpn_pub;
1418: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 1418: x_return_status := fnd_api.g_ret_sts_unexp_error;

1414: x_return_status := fnd_api.g_ret_sts_unexp_error;
1415: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1416: WHEN OTHERS THEN
1417: ROLLBACK TO create_lpn_pub;
1418: x_return_status := fnd_api.g_ret_sts_unexp_error;
1419:
1420: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
1421: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
1422: END IF;

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

1427: -- ----------------------------------------------------------------------------------
1428: -- ----------------------------------------------------------------------------------
1429: PROCEDURE modify_lpn(
1430: p_api_version IN NUMBER,
1431: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
1432: p_commit IN VARCHAR2 := fnd_api.g_false,
1433: p_validation_level IN NUMBER := fnd_api.g_valid_level_full,
1434: x_return_status OUT NOCOPY VARCHAR2,
1435: x_msg_count OUT NOCOPY NUMBER,

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

1428: -- ----------------------------------------------------------------------------------
1429: PROCEDURE modify_lpn(
1430: p_api_version IN NUMBER,
1431: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
1432: p_commit IN VARCHAR2 := fnd_api.g_false,
1433: p_validation_level IN NUMBER := fnd_api.g_valid_level_full,
1434: x_return_status OUT NOCOPY VARCHAR2,
1435: x_msg_count OUT NOCOPY NUMBER,
1436: x_msg_data OUT NOCOPY VARCHAR2,

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

1429: PROCEDURE modify_lpn(
1430: p_api_version IN NUMBER,
1431: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
1432: p_commit IN VARCHAR2 := fnd_api.g_false,
1433: p_validation_level IN NUMBER := fnd_api.g_valid_level_full,
1434: x_return_status OUT NOCOPY VARCHAR2,
1435: x_msg_count OUT NOCOPY NUMBER,
1436: x_msg_data OUT NOCOPY VARCHAR2,
1437: p_lpn IN lpn,

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

1515: -- Standard Start of API savepoint
1516: SAVEPOINT modify_lpn_pub;
1517:
1518: -- Standard call to check for call compatibility.
1519: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
1520: fnd_message.set_name('WMS', 'WMS_CONT_INCOMPATIBLE_API_CALL');
1521: fnd_msg_pub.ADD;
1522: RAISE fnd_api.g_exc_unexpected_error;
1523: END IF;

Line 1522: RAISE fnd_api.g_exc_unexpected_error;

1518: -- Standard call to check for call compatibility.
1519: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
1520: fnd_message.set_name('WMS', 'WMS_CONT_INCOMPATIBLE_API_CALL');
1521: fnd_msg_pub.ADD;
1522: RAISE fnd_api.g_exc_unexpected_error;
1523: END IF;
1524:
1525: -- Initialize message list if p_init_msg_list is set to TRUE.
1526: IF fnd_api.to_boolean(p_init_msg_list) THEN

Line 1526: IF fnd_api.to_boolean(p_init_msg_list) THEN

1522: RAISE fnd_api.g_exc_unexpected_error;
1523: END IF;
1524:
1525: -- Initialize message list if p_init_msg_list is set to TRUE.
1526: IF fnd_api.to_boolean(p_init_msg_list) THEN
1527: fnd_msg_pub.initialize;
1528: END IF;
1529:
1530: -- Initialize API return status to success

Line 1531: x_return_status := fnd_api.g_ret_sts_success;

1527: fnd_msg_pub.initialize;
1528: END IF;
1529:
1530: -- Initialize API return status to success
1531: x_return_status := fnd_api.g_ret_sts_success;
1532:
1533: -- API body
1534: /* Validate all inputs if validation level is set to full */
1535: IF (p_validation_level = fnd_api.g_valid_level_full) THEN

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

1531: x_return_status := fnd_api.g_ret_sts_success;
1532:
1533: -- API body
1534: /* Validate all inputs if validation level is set to full */
1535: IF (p_validation_level = fnd_api.g_valid_level_full) THEN
1536: /* Validate LPN */
1537: l_lpn.lpn_id := p_lpn.lpn_id;
1538: l_lpn.license_plate_number := NULL;
1539: l_result := validate_lpn(l_lpn);

Line 1544: RAISE fnd_api.g_exc_error;

1540:
1541: IF (l_result = inv_validate.f) THEN
1542: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_LPN');
1543: fnd_msg_pub.ADD;
1544: RAISE fnd_api.g_exc_error;
1545: END IF;
1546:
1547: /* Validate Organization */
1548: IF (p_lpn.organization_id IS NOT NULL) THEN

Line 1555: RAISE fnd_api.g_exc_error;

1551:
1552: IF (l_result = inv_validate.f) THEN
1553: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_ORG');
1554: fnd_msg_pub.ADD;
1555: RAISE fnd_api.g_exc_error;
1556: END IF;
1557: END IF;
1558:
1559: /* Validate Subinventory */

Line 1567: RAISE fnd_api.g_exc_error;

1563:
1564: IF (l_result = inv_validate.f) THEN
1565: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_SUB');
1566: fnd_msg_pub.ADD;
1567: RAISE fnd_api.g_exc_error;
1568: END IF;
1569: END IF;
1570:
1571: /* Validate Locator */

Line 1577: RAISE fnd_api.g_exc_error;

1573: IF (l_sub.locator_type IN (2, 3)) THEN
1574: IF (p_lpn.locator_id IS NULL) THEN
1575: fnd_message.set_name('WMS', 'WMS_CONT_MISS_REQ_LOC');
1576: fnd_msg_pub.ADD;
1577: RAISE fnd_api.g_exc_error;
1578: END IF;
1579:
1580: l_locator.inventory_location_id := p_lpn.locator_id;
1581: l_result := inv_validate.validatelocator(l_locator, l_org, l_sub);

Line 1586: RAISE fnd_api.g_exc_error;

1582:
1583: IF (l_result = inv_validate.f) THEN
1584: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_LOC');
1585: fnd_msg_pub.ADD;
1586: RAISE fnd_api.g_exc_error;
1587: END IF;
1588: END IF;
1589: END IF;
1590:

Line 1599: RAISE fnd_api.g_exc_error;

1595:
1596: IF (l_result = inv_validate.f) THEN
1597: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_ITEM');
1598: fnd_msg_pub.ADD;
1599: RAISE fnd_api.g_exc_error;
1600: END IF;
1601:
1602: IF (l_container_item.container_item_flag = 'N') THEN
1603: fnd_message.set_name('WMS', 'WMS_CONT_ITEM_NOT_A_CONTAINER');

Line 1605: RAISE fnd_api.g_exc_error;

1601:
1602: IF (l_container_item.container_item_flag = 'N') THEN
1603: fnd_message.set_name('WMS', 'WMS_CONT_ITEM_NOT_A_CONTAINER');
1604: fnd_msg_pub.ADD;
1605: RAISE fnd_api.g_exc_error;
1606: END IF;
1607: END IF;
1608:
1609: /* Validate Gross Weight */

Line 1617: RAISE fnd_api.g_exc_error;

1613: mdebug('gross weight= '|| p_lpn.gross_weight, 9);
1614: END IF;
1615: fnd_message.set_name('WMS', 'WMS_CONT_NEG_WEIGHT');
1616: fnd_msg_pub.ADD;
1617: RAISE fnd_api.g_exc_error;
1618: END IF;
1619: END IF;
1620:
1621: /* Validate Content Volume */

Line 1626: RAISE fnd_api.g_exc_error;

1622: IF (p_lpn.content_volume IS NOT NULL) THEN
1623: IF (p_lpn.content_volume < 0) THEN
1624: fnd_message.set_name('WMS', 'WMS_CONT_NEG_VOLUME');
1625: fnd_msg_pub.ADD;
1626: RAISE fnd_api.g_exc_error;
1627: END IF;
1628: END IF;
1629:
1630: /* Validate LPN Status ID */

Line 1635: RAISE fnd_api.g_exc_error;

1631: IF (p_lpn.status_id IS NOT NULL) THEN
1632: IF (p_lpn.status_id NOT IN (1, 2, 3, 4, 5, 6)) THEN
1633: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_STATUS_ID');
1634: fnd_msg_pub.ADD;
1635: RAISE fnd_api.g_exc_error;
1636: END IF;
1637: END IF;
1638:
1639: /* Validate LPN Context */

Line 1644: RAISE fnd_api.g_exc_error;

1640: IF (p_lpn.lpn_context IS NOT NULL) THEN
1641: IF (p_lpn.lpn_context NOT IN (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11)) THEN
1642: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_LPN_CONTEXT');
1643: fnd_msg_pub.ADD;
1644: RAISE fnd_api.g_exc_error;
1645: END IF;
1646: END IF;
1647:
1648: /* Validate Sealed Status */

Line 1653: RAISE fnd_api.g_exc_error;

1649: IF (p_lpn.sealed_status IS NOT NULL) THEN
1650: IF (p_lpn.sealed_status NOT IN (1, 2)) THEN
1651: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_SEALED_STAT');
1652: fnd_msg_pub.ADD;
1653: RAISE fnd_api.g_exc_error;
1654: END IF;
1655: END IF;
1656: END IF;
1657: /* End of input validation */

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

1659:
1660: IF ( p_source_type_id IS NOT NULL ) THEN
1661: l_lpn.source_type_id := p_source_type_id;
1662: ELSIF ( p_lpn.source_type_id IS NULL ) THEN
1663: l_lpn.source_type_id := fnd_api.g_miss_num;
1664: END IF;
1665:
1666: IF ( p_source_header_id IS NOT NULL ) THEN
1667: l_lpn.source_header_id := p_source_header_id;

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

1665:
1666: IF ( p_source_header_id IS NOT NULL ) THEN
1667: l_lpn.source_header_id := p_source_header_id;
1668: ELSIF ( p_lpn.source_header_id IS NULL ) THEN
1669: l_lpn.source_header_id := fnd_api.g_miss_num;
1670: END IF;
1671:
1672: IF ( p_source_line_id IS NOT NULL ) THEN
1673: l_lpn.source_line_id := p_source_line_id;

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

1671:
1672: IF ( p_source_line_id IS NOT NULL ) THEN
1673: l_lpn.source_line_id := p_source_line_id;
1674: ELSIF ( p_lpn.source_line_id IS NULL ) THEN
1675: l_lpn.source_line_id := fnd_api.g_miss_num;
1676: END IF;
1677:
1678: IF ( p_source_line_detail_id IS NOT NULL ) THEN
1679: l_lpn.source_line_detail_id := p_source_line_detail_id;

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

1677:
1678: IF ( p_source_line_detail_id IS NOT NULL ) THEN
1679: l_lpn.source_line_detail_id := p_source_line_detail_id;
1680: ELSIF ( p_lpn.source_line_detail_id IS NULL ) THEN
1681: l_lpn.source_line_detail_id := fnd_api.g_miss_num;
1682: END IF;
1683:
1684: IF ( p_source_name IS NOT NULL ) THEN
1685: l_lpn.source_name := p_source_name;

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

1683:
1684: IF ( p_source_name IS NOT NULL ) THEN
1685: l_lpn.source_name := p_source_name;
1686: ELSIF ( p_lpn.source_name IS NULL ) THEN
1687: l_lpn.source_name := fnd_api.g_miss_char;
1688: END IF;
1689:
1690: WMS_CONTAINER_PVT.Modify_LPN (
1691: p_api_version => p_api_version

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

1696: , x_msg_count => x_msg_count
1697: , x_msg_data => x_msg_data
1698: , p_lpn => l_lpn );
1699:
1700: IF ( x_return_status <> fnd_api.g_ret_sts_success ) THEN
1701: IF ( l_debug = 1 ) THEN
1702: mdebug('Call to WMS_CONTAINER_PVT.Modify_LPN Failed', G_ERROR);
1703: END IF;
1704: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 1704: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

1700: IF ( x_return_status <> fnd_api.g_ret_sts_success ) THEN
1701: IF ( l_debug = 1 ) THEN
1702: mdebug('Call to WMS_CONTAINER_PVT.Modify_LPN Failed', G_ERROR);
1703: END IF;
1704: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1705: END IF;
1706:
1707: -- Standard check of p_commit.
1708: IF fnd_api.to_boolean(p_commit) THEN

Line 1708: IF fnd_api.to_boolean(p_commit) THEN

1704: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1705: END IF;
1706:
1707: -- Standard check of p_commit.
1708: IF fnd_api.to_boolean(p_commit) THEN
1709: COMMIT WORK;
1710: END IF;
1711:
1712: -- Standard call to get message count and if count is 1,

Line 1716: WHEN fnd_api.g_exc_error THEN

1712: -- Standard call to get message count and if count is 1,
1713: -- get message info.
1714: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1715: EXCEPTION
1716: WHEN fnd_api.g_exc_error THEN
1717: ROLLBACK TO modify_lpn_pub;
1718: x_return_status := fnd_api.g_ret_sts_error;
1719: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1720: WHEN fnd_api.g_exc_unexpected_error THEN

Line 1718: x_return_status := fnd_api.g_ret_sts_error;

1714: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1715: EXCEPTION
1716: WHEN fnd_api.g_exc_error THEN
1717: ROLLBACK TO modify_lpn_pub;
1718: x_return_status := fnd_api.g_ret_sts_error;
1719: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1720: WHEN fnd_api.g_exc_unexpected_error THEN
1721: ROLLBACK TO modify_lpn_pub;
1722: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 1720: WHEN fnd_api.g_exc_unexpected_error THEN

1716: WHEN fnd_api.g_exc_error THEN
1717: ROLLBACK TO modify_lpn_pub;
1718: x_return_status := fnd_api.g_ret_sts_error;
1719: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1720: WHEN fnd_api.g_exc_unexpected_error THEN
1721: ROLLBACK TO modify_lpn_pub;
1722: x_return_status := fnd_api.g_ret_sts_unexp_error;
1723: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1724: WHEN OTHERS THEN

Line 1722: x_return_status := fnd_api.g_ret_sts_unexp_error;

1718: x_return_status := fnd_api.g_ret_sts_error;
1719: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1720: WHEN fnd_api.g_exc_unexpected_error THEN
1721: ROLLBACK TO modify_lpn_pub;
1722: x_return_status := fnd_api.g_ret_sts_unexp_error;
1723: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1724: WHEN OTHERS THEN
1725: ROLLBACK TO modify_lpn_pub;
1726: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 1726: x_return_status := fnd_api.g_ret_sts_unexp_error;

1722: x_return_status := fnd_api.g_ret_sts_unexp_error;
1723: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1724: WHEN OTHERS THEN
1725: ROLLBACK TO modify_lpn_pub;
1726: x_return_status := fnd_api.g_ret_sts_unexp_error;
1727:
1728: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
1729: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
1730: END IF;

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

1733: END modify_lpn;
1734:
1735: PROCEDURE modify_lpn_wrapper(
1736: p_api_version IN NUMBER,
1737: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
1738: p_commit IN VARCHAR2 := fnd_api.g_false,
1739: p_validation_level IN NUMBER := fnd_api.g_valid_level_full,
1740: x_return_status OUT NOCOPY VARCHAR2,
1741: x_msg_count OUT NOCOPY NUMBER,

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

1734:
1735: PROCEDURE modify_lpn_wrapper(
1736: p_api_version IN NUMBER,
1737: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
1738: p_commit IN VARCHAR2 := fnd_api.g_false,
1739: p_validation_level IN NUMBER := fnd_api.g_valid_level_full,
1740: x_return_status OUT NOCOPY VARCHAR2,
1741: x_msg_count OUT NOCOPY NUMBER,
1742: x_msg_data OUT NOCOPY VARCHAR2,

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

1735: PROCEDURE modify_lpn_wrapper(
1736: p_api_version IN NUMBER,
1737: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
1738: p_commit IN VARCHAR2 := fnd_api.g_false,
1739: p_validation_level IN NUMBER := fnd_api.g_valid_level_full,
1740: x_return_status OUT NOCOPY VARCHAR2,
1741: x_msg_count OUT NOCOPY NUMBER,
1742: x_msg_data OUT NOCOPY VARCHAR2,
1743: p_lpn_id IN NUMBER,

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

1768: -- Standard Start of API savepoint
1769: SAVEPOINT modify_lpn_wrapper_pub;
1770:
1771: -- Standard call to check for call compatibility.
1772: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
1773: fnd_message.set_name('WMS', 'WMS_CONT_INCOMPATIBLE_API_CALL');
1774: fnd_msg_pub.ADD;
1775: RAISE fnd_api.g_exc_unexpected_error;
1776: END IF;

Line 1775: RAISE fnd_api.g_exc_unexpected_error;

1771: -- Standard call to check for call compatibility.
1772: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
1773: fnd_message.set_name('WMS', 'WMS_CONT_INCOMPATIBLE_API_CALL');
1774: fnd_msg_pub.ADD;
1775: RAISE fnd_api.g_exc_unexpected_error;
1776: END IF;
1777:
1778: -- Initialize message list if p_init_msg_list is set to TRUE.
1779: IF fnd_api.to_boolean(p_init_msg_list) THEN

Line 1779: IF fnd_api.to_boolean(p_init_msg_list) THEN

1775: RAISE fnd_api.g_exc_unexpected_error;
1776: END IF;
1777:
1778: -- Initialize message list if p_init_msg_list is set to TRUE.
1779: IF fnd_api.to_boolean(p_init_msg_list) THEN
1780: fnd_msg_pub.initialize;
1781: END IF;
1782:
1783: -- Initialize API return status to success

Line 1784: x_return_status := fnd_api.g_ret_sts_success;

1780: fnd_msg_pub.initialize;
1781: END IF;
1782:
1783: -- Initialize API return status to success
1784: x_return_status := fnd_api.g_ret_sts_success;
1785: -- API body
1786:
1787: /* Validate LPN */
1788: l_lpn.lpn_id := p_lpn_id;

Line 1795: RAISE fnd_api.g_exc_error;

1791:
1792: IF (l_result = inv_validate.f) THEN
1793: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_LPN');
1794: fnd_msg_pub.ADD;
1795: RAISE fnd_api.g_exc_error;
1796: END IF;
1797:
1798: WMS_CONTAINER_PVT.Modify_LPN_Wrapper(
1799: p_api_version => p_api_version

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

1821: , p_source_name => p_source_name
1822: , p_source_line_id => p_source_line_id
1823: , p_source_line_detail_id => p_source_line_detail_id );
1824:
1825: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN
1826: -- Modify LPN should put the appropriate error message in the stack
1827: RAISE fnd_api.g_exc_error;
1828: END IF;
1829:

Line 1827: RAISE fnd_api.g_exc_error;

1823: , p_source_line_detail_id => p_source_line_detail_id );
1824:
1825: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN
1826: -- Modify LPN should put the appropriate error message in the stack
1827: RAISE fnd_api.g_exc_error;
1828: END IF;
1829:
1830: -- End of API body
1831:

Line 1833: IF fnd_api.to_boolean(p_commit) THEN

1829:
1830: -- End of API body
1831:
1832: -- Standard check of p_commit.
1833: IF fnd_api.to_boolean(p_commit) THEN
1834: COMMIT WORK;
1835: END IF;
1836:
1837: -- Standard call to get message count and if count is 1,

Line 1841: WHEN fnd_api.g_exc_error THEN

1837: -- Standard call to get message count and if count is 1,
1838: -- get message info.
1839: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1840: EXCEPTION
1841: WHEN fnd_api.g_exc_error THEN
1842: ROLLBACK TO modify_lpn_wrapper_pub;
1843: x_return_status := fnd_api.g_ret_sts_error;
1844: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1845: WHEN fnd_api.g_exc_unexpected_error THEN

Line 1843: x_return_status := fnd_api.g_ret_sts_error;

1839: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1840: EXCEPTION
1841: WHEN fnd_api.g_exc_error THEN
1842: ROLLBACK TO modify_lpn_wrapper_pub;
1843: x_return_status := fnd_api.g_ret_sts_error;
1844: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1845: WHEN fnd_api.g_exc_unexpected_error THEN
1846: ROLLBACK TO modify_lpn_wrapper_pub;
1847: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 1845: WHEN fnd_api.g_exc_unexpected_error THEN

1841: WHEN fnd_api.g_exc_error THEN
1842: ROLLBACK TO modify_lpn_wrapper_pub;
1843: x_return_status := fnd_api.g_ret_sts_error;
1844: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1845: WHEN fnd_api.g_exc_unexpected_error THEN
1846: ROLLBACK TO modify_lpn_wrapper_pub;
1847: x_return_status := fnd_api.g_ret_sts_unexp_error;
1848: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1849: WHEN OTHERS THEN

Line 1847: x_return_status := fnd_api.g_ret_sts_unexp_error;

1843: x_return_status := fnd_api.g_ret_sts_error;
1844: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1845: WHEN fnd_api.g_exc_unexpected_error THEN
1846: ROLLBACK TO modify_lpn_wrapper_pub;
1847: x_return_status := fnd_api.g_ret_sts_unexp_error;
1848: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1849: WHEN OTHERS THEN
1850: ROLLBACK TO modify_lpn_wrapper_pub;
1851: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 1851: x_return_status := fnd_api.g_ret_sts_unexp_error;

1847: x_return_status := fnd_api.g_ret_sts_unexp_error;
1848: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1849: WHEN OTHERS THEN
1850: ROLLBACK TO modify_lpn_wrapper_pub;
1851: x_return_status := fnd_api.g_ret_sts_unexp_error;
1852:
1853: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
1854: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
1855: END IF;

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

1860: -- ----------------------------------------------------------------------------------
1861: -- ----------------------------------------------------------------------------------
1862: PROCEDURE PackUnpack_Container (
1863: p_api_version IN NUMBER
1864: , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1865: , p_commit IN VARCHAR2 := fnd_api.g_false
1866: , p_validation_level IN NUMBER := fnd_api.g_valid_level_full
1867: , x_return_status OUT NOCOPY VARCHAR2
1868: , x_msg_count OUT NOCOPY NUMBER

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

1861: -- ----------------------------------------------------------------------------------
1862: PROCEDURE PackUnpack_Container (
1863: p_api_version IN NUMBER
1864: , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1865: , p_commit IN VARCHAR2 := fnd_api.g_false
1866: , p_validation_level IN NUMBER := fnd_api.g_valid_level_full
1867: , x_return_status OUT NOCOPY VARCHAR2
1868: , x_msg_count OUT NOCOPY NUMBER
1869: , x_msg_data OUT NOCOPY VARCHAR2

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

1862: PROCEDURE PackUnpack_Container (
1863: p_api_version IN NUMBER
1864: , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1865: , p_commit IN VARCHAR2 := fnd_api.g_false
1866: , p_validation_level IN NUMBER := fnd_api.g_valid_level_full
1867: , x_return_status OUT NOCOPY VARCHAR2
1868: , x_msg_count OUT NOCOPY NUMBER
1869: , x_msg_data OUT NOCOPY VARCHAR2
1870: , p_lpn_id IN NUMBER

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

1957:
1958: -- Bug# 1546081
1959: -- l_child_lpn nested_children_cursor%ROWTYPE;
1960: l_item_quantity NUMBER;
1961: l_null_cost_group_val NUMBER := -1 * fnd_api.g_miss_num;
1962:
1963: CURSOR existing_record_cursor IS
1964: -- Bug# 1546081
1965: -- SELECT wlc.*

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

2086: -- Standard Start of API savepoint
2087: SAVEPOINT packunpack_container_pub;
2088:
2089: -- Standard call to check for call compatibility.
2090: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
2091: fnd_message.set_name('WMS', 'WMS_CONT_INCOMPATIBLE_API_CALL');
2092: fnd_msg_pub.ADD;
2093: RAISE fnd_api.g_exc_unexpected_error;
2094: END IF;

Line 2093: RAISE fnd_api.g_exc_unexpected_error;

2089: -- Standard call to check for call compatibility.
2090: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
2091: fnd_message.set_name('WMS', 'WMS_CONT_INCOMPATIBLE_API_CALL');
2092: fnd_msg_pub.ADD;
2093: RAISE fnd_api.g_exc_unexpected_error;
2094: END IF;
2095:
2096: -- Initialize message list if p_init_msg_list is set to TRUE.
2097: IF fnd_api.to_boolean(p_init_msg_list) THEN

Line 2097: IF fnd_api.to_boolean(p_init_msg_list) THEN

2093: RAISE fnd_api.g_exc_unexpected_error;
2094: END IF;
2095:
2096: -- Initialize message list if p_init_msg_list is set to TRUE.
2097: IF fnd_api.to_boolean(p_init_msg_list) THEN
2098: fnd_msg_pub.initialize;
2099: END IF;
2100:
2101: -- Initialize API return status to success

Line 2102: x_return_status := fnd_api.g_ret_sts_success;

2098: fnd_msg_pub.initialize;
2099: END IF;
2100:
2101: -- Initialize API return status to success
2102: x_return_status := fnd_api.g_ret_sts_success;
2103:
2104: -- API body
2105: IF (l_debug = 1) THEN
2106: mdebug('Call to Packunpack API', G_MESSAGE);

Line 2123: RAISE fnd_api.g_exc_error;

2119: mdebug(p_lpn_id || 'is an invalid lpn_id', G_ERROR);
2120: END IF;
2121: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_LPN');
2122: fnd_msg_pub.ADD;
2123: RAISE fnd_api.g_exc_error;
2124: END IF;
2125:
2126: /* Validate all inputs if validation level is set to full */
2127: IF (p_validation_level = fnd_api.g_valid_level_full) THEN

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

2123: RAISE fnd_api.g_exc_error;
2124: END IF;
2125:
2126: /* Validate all inputs if validation level is set to full */
2127: IF (p_validation_level = fnd_api.g_valid_level_full) THEN
2128: /* Validate Content LPN */
2129: IF (p_content_lpn_id IS NOT NULL) THEN
2130: l_content_lpn.lpn_id := p_content_lpn_id;
2131: l_result := validate_lpn(l_content_lpn);

Line 2139: RAISE fnd_api.g_exc_error;

2135: mdebug(p_content_lpn_id || 'is and invalid content lpn id', G_ERROR);
2136: END IF;
2137: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_CONTENT_LPN');
2138: fnd_msg_pub.ADD;
2139: RAISE fnd_api.g_exc_error;
2140: END IF;
2141:
2142: -- Check that the content lpn is in fact stored within the given parent lpn
2143: -- Do this check only for the unpack operation

Line 2151: RAISE fnd_api.g_exc_error;

2147: mdebug('child lpn is not in lpn parent lpn', G_ERROR);
2148: END IF;
2149: fnd_message.set_name('WMS', 'WMS_CONT_LPN_NOT_IN_LPN');
2150: fnd_msg_pub.ADD;
2151: RAISE fnd_api.g_exc_error;
2152: END IF;
2153: END IF;
2154: END IF;
2155:

Line 2166: RAISE fnd_api.g_exc_error;

2162: mdebug(p_organization_id || 'is not a valid org_id', G_ERROR);
2163: END IF;
2164: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_ORG');
2165: fnd_msg_pub.ADD;
2166: RAISE fnd_api.g_exc_error;
2167: END IF;
2168:
2169: /* Validate Content Item */
2170: IF (p_content_item_id IS NOT NULL) THEN

Line 2180: RAISE fnd_api.g_exc_error;

2176: mdebug(p_content_item_id || 'is not a valid content item id', G_ERROR);
2177: END IF;
2178: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_CONTENT_ITEM');
2179: fnd_msg_pub.ADD;
2180: RAISE fnd_api.g_exc_error;
2181: END IF;
2182: END IF;
2183:
2184: /* Check that a content is given to pack/unpack */

Line 2197: RAISE fnd_api.g_exc_error;

2193: mdebug('no item description for unpack all', G_ERROR);
2194: END IF;
2195: fnd_message.set_name('WMS', 'WMS_CONT_NO_ITEM_DESC');
2196: fnd_msg_pub.ADD;
2197: RAISE fnd_api.g_exc_error;
2198: END IF;
2199: END IF;
2200:
2201: /* Validate that only a content item OR LPN, not both, is given */

Line 2210: RAISE fnd_api.g_exc_error;

2206: mdebug('Can not specify both content item and container item at same time', G_ERROR);
2207: END IF;
2208: fnd_message.set_name('WMS', 'WMS_CONT_LPN_AND_ITEM');
2209: fnd_msg_pub.ADD;
2210: RAISE fnd_api.g_exc_error;
2211: END IF;
2212:
2213: /* Validate that Subinventory must be given if pack operation and in INV*/
2214: IF (p_content_item_id IS NOT NULL) THEN

Line 2220: RAISE fnd_api.g_exc_error;

2216: IF (l_lpn.lpn_context IN (1, 11)) THEN
2217: IF (p_subinventory IS NULL) THEN
2218: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_SUB');
2219: fnd_msg_pub.ADD;
2220: RAISE fnd_api.g_exc_error;
2221: END IF;
2222: END IF;
2223: END IF;
2224: END IF;

Line 2237: RAISE fnd_api.g_exc_error;

2233: mdebug(p_subinventory || 'is an invalid sub', G_ERROR);
2234: END IF;
2235: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_SUB');
2236: fnd_msg_pub.ADD;
2237: RAISE fnd_api.g_exc_error;
2238: END IF;
2239: END IF;
2240:
2241: --Validate Locator

Line 2267: RAISE fnd_api.g_exc_error;

2263: mdebug('Missing required locator', G_ERROR);
2264: END IF;
2265: fnd_message.set_name('WMS', 'WMS_CONT_MISS_REQ_LOC');
2266: fnd_msg_pub.ADD;
2267: RAISE fnd_api.g_exc_error;
2268: END IF;
2269:
2270: l_locator.inventory_location_id := p_locator_id;
2271: l_result := inv_validate.validatelocator(l_locator, l_org, l_sub);

Line 2279: RAISE fnd_api.g_exc_error;

2275: mdebug(p_locator_id || ' is an invalid locator_id', G_ERROR);
2276: END IF;
2277: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_LOC');
2278: fnd_msg_pub.ADD;
2279: RAISE fnd_api.g_exc_error;
2280: END IF;
2281: --END IF;
2282: END IF;
2283: END IF;

Line 2298: RAISE fnd_api.g_exc_error;

2294: mdebug(p_revision || ' is an invalid revision', G_ERROR);
2295: END IF;
2296: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_REV');
2297: fnd_msg_pub.ADD;
2298: RAISE fnd_api.g_exc_error;
2299: END IF;
2300: ELSE
2301: IF (l_debug = 1) THEN
2302: mdebug('Mission required revision', G_ERROR);

Line 2306: RAISE fnd_api.g_exc_error;

2302: mdebug('Mission required revision', G_ERROR);
2303: END IF;
2304: fnd_message.set_name('WMS', 'WMS_CONT_MISS_REQ_REV');
2305: fnd_msg_pub.ADD;
2306: RAISE fnd_api.g_exc_error;
2307: END IF;
2308: END IF;
2309: END IF;
2310:

Line 2341: RAISE fnd_api.g_exc_error;

2337: mdebug(p_lot_number || ' is an invalid lot number', G_ERROR);
2338: END IF;
2339: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_LOT');
2340: fnd_msg_pub.ADD;
2341: RAISE fnd_api.g_exc_error;
2342: END IF;
2343: END IF;
2344: ELSE
2345: -- Subinventory was not given so will need to do

Line 2356: RAISE fnd_api.g_exc_error;

2352: mdebug(p_lot_number || ' is an invalid lot number', G_ERROR);
2353: END IF;
2354: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_LOT');
2355: fnd_msg_pub.ADD;
2356: RAISE fnd_api.g_exc_error;
2357: END IF;
2358:
2359: CLOSE lot_validation_cursor;
2360: END IF;

Line 2372: RAISE fnd_api.g_exc_error;

2368: mdebug('Missing required lot', G_ERROR);
2369: END IF;
2370: fnd_message.set_name('WMS', 'WMS_CONT_MISS_REQ_LOT');
2371: fnd_msg_pub.ADD;
2372: RAISE fnd_api.g_exc_error;
2373: END IF;
2374: END IF;
2375: END IF;
2376:

Line 2388: RAISE fnd_api.g_exc_error;

2384: mdebug('Requested a negative item qty', G_ERROR);
2385: END IF;
2386: fnd_message.set_name('WMS', 'WMS_CONT_NEG_ITEM_QTY');
2387: fnd_msg_pub.ADD;
2388: RAISE fnd_api.g_exc_error;
2389: ELSE
2390: l_quantity := p_quantity;
2391: END IF;
2392: END IF;

Line 2407: RAISE fnd_api.g_exc_error;

2403: mdebug('For container item unpack quantitiy must be 1', G_ERROR);
2404: END IF;
2405: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_QTY');
2406: fnd_msg_pub.ADD;
2407: RAISE fnd_api.g_exc_error;
2408: END IF;
2409: ELSE
2410: l_quantity := 1;
2411: END IF;

Line 2428: RAISE fnd_api.g_exc_error;

2424: mdebug('Invalid serial number given in range', G_ERROR);
2425: END IF;
2426: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_SER');
2427: fnd_msg_pub.ADD;
2428: RAISE fnd_api.g_exc_error;
2429: END IF;
2430:
2431: -- Check that in the case of a range of serial numbers, that the
2432: -- inputted p_quantity equals the amount of items in the serial range.

Line 2440: RAISE fnd_api.g_exc_error;

2436: mdebug('Serial range quantity '||l_quantity||' not the same as given qty '||p_quantity, G_ERROR);
2437: END IF;
2438: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_X_QTY');
2439: fnd_msg_pub.ADD;
2440: RAISE fnd_api.g_exc_error;
2441: END IF;
2442: END IF;
2443:
2444: -- Get the serial number length.

Line 2475: RAISE fnd_api.g_exc_error;

2471: mdebug(l_current_serial || ' is not a valid serial number', G_ERROR);
2472: END IF;
2473: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_SER');
2474: fnd_msg_pub.ADD;
2475: RAISE fnd_api.g_exc_error;
2476: END IF;
2477: ELSE
2478: -- Either the subinventory was not given or
2479: -- the serial number was dynamically generated. We will

Line 2490: RAISE fnd_api.g_exc_error;

2486: mdebug(l_current_serial || ' is not a valid serial number', G_ERROR);
2487: END IF;
2488: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_SER');
2489: fnd_msg_pub.ADD;
2490: RAISE fnd_api.g_exc_error;
2491: END IF;
2492:
2493: CLOSE serial_validation_cursor;
2494: END IF;

Line 2524: RAISE fnd_api.g_exc_error;

2520: mdebug('Missing require serial number', G_ERROR);
2521: END IF;
2522: fnd_message.set_name('WMS', 'WMS_CONT_MISS_SER_NUM');
2523: fnd_msg_pub.ADD;
2524: RAISE fnd_api.g_exc_error;
2525: END IF;
2526: END IF;
2527: END IF;
2528:

Line 2539: RAISE fnd_api.g_exc_error;

2535: mdebug(p_uom || ' is an invalid UOM', G_ERROR);
2536: END IF;
2537: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_UOM');
2538: fnd_msg_pub.ADD;
2539: RAISE fnd_api.g_exc_error;
2540: END IF;
2541: END IF;
2542:
2543: /* Validate the operation */

Line 2550: RAISE fnd_api.g_exc_error;

2546: mdebug(p_operation || ' is an invalid operation type', G_ERROR);
2547: END IF;
2548: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_OPERATION');
2549: fnd_msg_pub.ADD;
2550: RAISE fnd_api.g_exc_error;
2551: END IF;
2552:
2553: /* Validate the enforce weight and volume constraint flag */
2554: IF (p_enforce_wv_constraints IS NOT NULL) THEN

Line 2561: RAISE fnd_api.g_exc_error;

2557: mdebug(p_enforce_wv_constraints || ' is an invalid constraint type', G_MESSAGE);
2558: END IF;
2559: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_CONSTRAINT');
2560: fnd_msg_pub.ADD;
2561: RAISE fnd_api.g_exc_error;
2562: END IF;
2563: END IF;
2564:
2565: /* Validate Cost Group */

Line 2575: RAISE fnd_api.g_exc_error;

2571: mdebug(p_cost_group_id || ' is an invalid cost group is', G_ERROR);
2572: END IF;
2573: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_CST_GRP');
2574: fnd_msg_pub.ADD;
2575: RAISE fnd_api.g_exc_error;
2576: END IF;
2577: END IF;
2578: END IF;
2579: /* End of Input Validation */

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

2623: , p_source_line_detail_id => p_source_line_detail_id
2624: , p_unpack_all => p_unpack_all
2625: , p_ignore_item_controls => l_ignore_item_controls );
2626:
2627: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN
2628: RAISE fnd_api.g_exc_error;
2629: END IF;
2630:
2631: -- End of API body

Line 2628: RAISE fnd_api.g_exc_error;

2624: , p_unpack_all => p_unpack_all
2625: , p_ignore_item_controls => l_ignore_item_controls );
2626:
2627: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN
2628: RAISE fnd_api.g_exc_error;
2629: END IF;
2630:
2631: -- End of API body
2632:

Line 2634: IF fnd_api.to_boolean(p_commit) THEN

2630:
2631: -- End of API body
2632:
2633: -- Standard check of p_commit.
2634: IF fnd_api.to_boolean(p_commit) THEN
2635: COMMIT WORK;
2636: END IF;
2637:
2638: -- Standard call to get message count and if count is 1,

Line 2642: WHEN fnd_api.g_exc_error THEN

2638: -- Standard call to get message count and if count is 1,
2639: -- get message info.
2640: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2641: EXCEPTION
2642: WHEN fnd_api.g_exc_error THEN
2643: ROLLBACK TO packunpack_container_pub;
2644: x_return_status := fnd_api.g_ret_sts_error;
2645: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2646: WHEN fnd_api.g_exc_unexpected_error THEN

Line 2644: x_return_status := fnd_api.g_ret_sts_error;

2640: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2641: EXCEPTION
2642: WHEN fnd_api.g_exc_error THEN
2643: ROLLBACK TO packunpack_container_pub;
2644: x_return_status := fnd_api.g_ret_sts_error;
2645: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2646: WHEN fnd_api.g_exc_unexpected_error THEN
2647: ROLLBACK TO packunpack_container_pub;
2648: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 2646: WHEN fnd_api.g_exc_unexpected_error THEN

2642: WHEN fnd_api.g_exc_error THEN
2643: ROLLBACK TO packunpack_container_pub;
2644: x_return_status := fnd_api.g_ret_sts_error;
2645: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2646: WHEN fnd_api.g_exc_unexpected_error THEN
2647: ROLLBACK TO packunpack_container_pub;
2648: x_return_status := fnd_api.g_ret_sts_unexp_error;
2649: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2650: WHEN OTHERS THEN

Line 2648: x_return_status := fnd_api.g_ret_sts_unexp_error;

2644: x_return_status := fnd_api.g_ret_sts_error;
2645: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2646: WHEN fnd_api.g_exc_unexpected_error THEN
2647: ROLLBACK TO packunpack_container_pub;
2648: x_return_status := fnd_api.g_ret_sts_unexp_error;
2649: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2650: WHEN OTHERS THEN
2651: ROLLBACK TO packunpack_container_pub;
2652: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 2652: x_return_status := fnd_api.g_ret_sts_unexp_error;

2648: x_return_status := fnd_api.g_ret_sts_unexp_error;
2649: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2650: WHEN OTHERS THEN
2651: ROLLBACK TO packunpack_container_pub;
2652: x_return_status := fnd_api.g_ret_sts_unexp_error;
2653:
2654: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
2655: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
2656: END IF;

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

2659: END packunpack_container;
2660:
2661: PROCEDURE pack_prepack_container(
2662: p_api_version IN NUMBER,
2663: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
2664: p_commit IN VARCHAR2 := fnd_api.g_false,
2665: p_validation_level IN NUMBER := fnd_api.g_valid_level_full,
2666: x_return_status OUT NOCOPY VARCHAR2,
2667: x_msg_count OUT NOCOPY NUMBER,

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

2660:
2661: PROCEDURE pack_prepack_container(
2662: p_api_version IN NUMBER,
2663: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
2664: p_commit IN VARCHAR2 := fnd_api.g_false,
2665: p_validation_level IN NUMBER := fnd_api.g_valid_level_full,
2666: x_return_status OUT NOCOPY VARCHAR2,
2667: x_msg_count OUT NOCOPY NUMBER,
2668: x_msg_data OUT NOCOPY VARCHAR2,

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

2661: PROCEDURE pack_prepack_container(
2662: p_api_version IN NUMBER,
2663: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
2664: p_commit IN VARCHAR2 := fnd_api.g_false,
2665: p_validation_level IN NUMBER := fnd_api.g_valid_level_full,
2666: x_return_status OUT NOCOPY VARCHAR2,
2667: x_msg_count OUT NOCOPY NUMBER,
2668: x_msg_data OUT NOCOPY VARCHAR2,
2669: p_lpn_id IN NUMBER,

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

2719: -- Standard Start of API savepoint
2720: SAVEPOINT pack_prepack_container_pub;
2721:
2722: -- Standard call to check for call compatibility.
2723: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
2724: fnd_message.set_name('WMS', 'WMS_CONT_INCOMPATIBLE_API_CALL');
2725: fnd_msg_pub.ADD;
2726: RAISE fnd_api.g_exc_unexpected_error;
2727: END IF;

Line 2726: RAISE fnd_api.g_exc_unexpected_error;

2722: -- Standard call to check for call compatibility.
2723: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
2724: fnd_message.set_name('WMS', 'WMS_CONT_INCOMPATIBLE_API_CALL');
2725: fnd_msg_pub.ADD;
2726: RAISE fnd_api.g_exc_unexpected_error;
2727: END IF;
2728:
2729: -- Initialize message list if p_init_msg_list is set to TRUE.
2730: IF fnd_api.to_boolean(p_init_msg_list) THEN

Line 2730: IF fnd_api.to_boolean(p_init_msg_list) THEN

2726: RAISE fnd_api.g_exc_unexpected_error;
2727: END IF;
2728:
2729: -- Initialize message list if p_init_msg_list is set to TRUE.
2730: IF fnd_api.to_boolean(p_init_msg_list) THEN
2731: fnd_msg_pub.initialize;
2732: END IF;
2733:
2734: -- Initialize API return status to success

Line 2735: x_return_status := fnd_api.g_ret_sts_success;

2731: fnd_msg_pub.initialize;
2732: END IF;
2733:
2734: -- Initialize API return status to success
2735: x_return_status := fnd_api.g_ret_sts_success;
2736:
2737: -- API body
2738: IF (l_debug = 1) THEN
2739: mdebug('Call to Pack_Prepack_Container API', G_MESSAGE);

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

2742: mdebug('qty=' ||p_quantity|| ' uom=' ||p_uom|| ' oper=' ||p_operation|| ' srctype=' ||p_source_type_id, G_INFO);
2743: END IF;
2744:
2745: /* Validate all inputs if validation level is set to full */
2746: IF (p_validation_level = fnd_api.g_valid_level_full) THEN
2747: /* Validate LPN */
2748: l_lpn.lpn_id := p_lpn_id;
2749: l_lpn.license_plate_number := NULL;
2750: l_result := validate_lpn(l_lpn);

Line 2758: RAISE fnd_api.g_exc_error;

2754: mdebug(p_lpn_id || 'is an invalid lpn_id', 1);
2755: END IF;
2756: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_LPN');
2757: fnd_msg_pub.ADD;
2758: RAISE fnd_api.g_exc_error;
2759: END IF;
2760:
2761: /* Validate Organization ID */
2762: l_org.organization_id := p_organization_id;

Line 2771: RAISE fnd_api.g_exc_error;

2767: mdebug(p_organization_id || 'is not a valid org_id', 1);
2768: END IF;
2769: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_ORG');
2770: fnd_msg_pub.ADD;
2771: RAISE fnd_api.g_exc_error;
2772: END IF;
2773:
2774: /* Validate Content Item */
2775: IF (p_content_item_id IS NOT NULL) THEN

Line 2785: RAISE fnd_api.g_exc_error;

2781: mdebug(p_content_item_id || 'is not a valid content item id', 1);
2782: END IF;
2783: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_CONTENT_ITEM');
2784: fnd_msg_pub.ADD;
2785: RAISE fnd_api.g_exc_error;
2786: END IF;
2787: END IF;
2788:
2789: /* Validate Revision */

Line 2801: RAISE fnd_api.g_exc_error;

2797: mdebug(p_revision || ' is an invalid revision', 1);
2798: END IF;
2799: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_REV');
2800: fnd_msg_pub.ADD;
2801: RAISE fnd_api.g_exc_error;
2802: END IF;
2803: ELSE
2804: IF (l_debug = 1) THEN
2805: mdebug('Mission required revision', 1);

Line 2809: RAISE fnd_api.g_exc_error;

2805: mdebug('Mission required revision', 1);
2806: END IF;
2807: fnd_message.set_name('WMS', 'WMS_CONT_MISS_REQ_REV');
2808: fnd_msg_pub.ADD;
2809: RAISE fnd_api.g_exc_error;
2810: END IF;
2811: END IF;
2812: END IF;
2813:

Line 2824: RAISE fnd_api.g_exc_error;

2820: mdebug('Missing required lot', 1);
2821: END IF;
2822: fnd_message.set_name('WMS', 'WMS_CONT_MISS_REQ_LOT');
2823: fnd_msg_pub.ADD;
2824: RAISE fnd_api.g_exc_error;
2825: END IF;
2826: END IF;
2827: END IF;
2828:

Line 2840: RAISE fnd_api.g_exc_error;

2836: mdebug('Requested a negative item qty', 1);
2837: END IF;
2838: fnd_message.set_name('WMS', 'WMS_CONT_NEG_ITEM_QTY');
2839: fnd_msg_pub.ADD;
2840: RAISE fnd_api.g_exc_error;
2841: ELSE
2842: l_quantity := p_quantity;
2843: END IF;
2844: END IF;

Line 2861: RAISE fnd_api.g_exc_error;

2857: mdebug('Invalid serial number given in range', 1);
2858: END IF;
2859: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_SER');
2860: fnd_msg_pub.ADD;
2861: RAISE fnd_api.g_exc_error;
2862: END IF;
2863:
2864: -- Check that in the case of a range of serial numbers, that the
2865: -- inputted p_quantity equals the amount of items in the serial range.

Line 2873: RAISE fnd_api.g_exc_error;

2869: mdebug('Serial range quantity '||l_quantity||' not the same as given qty '||p_quantity, G_ERROR);
2870: END IF;
2871: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_X_QTY');
2872: fnd_msg_pub.ADD;
2873: RAISE fnd_api.g_exc_error;
2874: END IF;
2875: END IF;
2876:
2877: -- Get the serial number length.

Line 2913: RAISE fnd_api.g_exc_error;

2909: mdebug(l_current_serial || ' is not a valid serial number', 1);
2910: END IF;
2911: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_SER');
2912: fnd_msg_pub.ADD;
2913: RAISE fnd_api.g_exc_error;
2914: END IF;
2915:
2916: CLOSE serial_validation_cursor;
2917: END IF;

Line 2946: RAISE fnd_api.g_exc_error;

2942: mdebug('Missing require serial number', 1);
2943: END IF;
2944: fnd_message.set_name('WMS', 'WMS_CONT_MISS_SER_NUM');
2945: fnd_msg_pub.ADD;
2946: RAISE fnd_api.g_exc_error;
2947: END IF;
2948: END IF;
2949: END IF;
2950:

Line 2961: RAISE fnd_api.g_exc_error;

2957: mdebug(p_uom || ' is an invalid UOM', 1);
2958: END IF;
2959: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_UOM');
2960: fnd_msg_pub.ADD;
2961: RAISE fnd_api.g_exc_error;
2962: END IF;
2963: END IF;
2964:
2965: /* Validate the operation */

Line 2972: RAISE fnd_api.g_exc_error;

2968: mdebug(p_operation || ' is an invalid operation type', 1);
2969: END IF;
2970: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_OPERATION');
2971: fnd_msg_pub.ADD;
2972: RAISE fnd_api.g_exc_error;
2973: END IF;
2974: END IF;
2975: /* End of Input Validation */
2976:

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

2993: , p_organization_id => p_organization_id
2994: , p_operation => p_operation
2995: , p_source_type_id => p_source_type_id );
2996:
2997: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN
2998: RAISE fnd_api.g_exc_error;
2999: END IF;
3000:
3001: -- End of API body

Line 2998: RAISE fnd_api.g_exc_error;

2994: , p_operation => p_operation
2995: , p_source_type_id => p_source_type_id );
2996:
2997: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN
2998: RAISE fnd_api.g_exc_error;
2999: END IF;
3000:
3001: -- End of API body
3002:

Line 3004: IF fnd_api.to_boolean(p_commit) THEN

3000:
3001: -- End of API body
3002:
3003: -- Standard check of p_commit.
3004: IF fnd_api.to_boolean(p_commit) THEN
3005: COMMIT WORK;
3006: END IF;
3007:
3008: -- Standard call to get message count and if count is 1,

Line 3012: WHEN fnd_api.g_exc_error THEN

3008: -- Standard call to get message count and if count is 1,
3009: -- get message info.
3010: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
3011: EXCEPTION
3012: WHEN fnd_api.g_exc_error THEN
3013: ROLLBACK TO pack_prepack_container_pub;
3014: x_return_status := fnd_api.g_ret_sts_error;
3015: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
3016: WHEN fnd_api.g_exc_unexpected_error THEN

Line 3014: x_return_status := fnd_api.g_ret_sts_error;

3010: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
3011: EXCEPTION
3012: WHEN fnd_api.g_exc_error THEN
3013: ROLLBACK TO pack_prepack_container_pub;
3014: x_return_status := fnd_api.g_ret_sts_error;
3015: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
3016: WHEN fnd_api.g_exc_unexpected_error THEN
3017: ROLLBACK TO pack_prepack_container_pub;
3018: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 3016: WHEN fnd_api.g_exc_unexpected_error THEN

3012: WHEN fnd_api.g_exc_error THEN
3013: ROLLBACK TO pack_prepack_container_pub;
3014: x_return_status := fnd_api.g_ret_sts_error;
3015: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
3016: WHEN fnd_api.g_exc_unexpected_error THEN
3017: ROLLBACK TO pack_prepack_container_pub;
3018: x_return_status := fnd_api.g_ret_sts_unexp_error;
3019: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
3020: WHEN OTHERS THEN

Line 3018: x_return_status := fnd_api.g_ret_sts_unexp_error;

3014: x_return_status := fnd_api.g_ret_sts_error;
3015: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
3016: WHEN fnd_api.g_exc_unexpected_error THEN
3017: ROLLBACK TO pack_prepack_container_pub;
3018: x_return_status := fnd_api.g_ret_sts_unexp_error;
3019: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
3020: WHEN OTHERS THEN
3021: ROLLBACK TO pack_prepack_container_pub;
3022: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 3022: x_return_status := fnd_api.g_ret_sts_unexp_error;

3018: x_return_status := fnd_api.g_ret_sts_unexp_error;
3019: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
3020: WHEN OTHERS THEN
3021: ROLLBACK TO pack_prepack_container_pub;
3022: x_return_status := fnd_api.g_ret_sts_unexp_error;
3023:
3024: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
3025: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
3026: END IF;

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

3031: -- ----------------------------------------------------------------------------------
3032: -- ----------------------------------------------------------------------------------
3033: PROCEDURE explode_lpn(
3034: p_api_version IN NUMBER,
3035: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
3036: p_commit IN VARCHAR2 := fnd_api.g_false,
3037: x_return_status OUT NOCOPY VARCHAR2,
3038: x_msg_count OUT NOCOPY NUMBER,
3039: x_msg_data OUT NOCOPY VARCHAR2,

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

3032: -- ----------------------------------------------------------------------------------
3033: PROCEDURE explode_lpn(
3034: p_api_version IN NUMBER,
3035: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
3036: p_commit IN VARCHAR2 := fnd_api.g_false,
3037: x_return_status OUT NOCOPY VARCHAR2,
3038: x_msg_count OUT NOCOPY NUMBER,
3039: x_msg_data OUT NOCOPY VARCHAR2,
3040: p_lpn_id IN NUMBER,

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

3059: -- ----------------------------------------------------------------------------------
3060: -- ----------------------------------------------------------------------------------
3061: PROCEDURE container_required_qty(
3062: p_api_version IN NUMBER,
3063: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
3064: p_commit IN VARCHAR2 := fnd_api.g_false,
3065: x_return_status OUT NOCOPY VARCHAR2,
3066: x_msg_count OUT NOCOPY NUMBER,
3067: x_msg_data OUT NOCOPY VARCHAR2,

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

3060: -- ----------------------------------------------------------------------------------
3061: PROCEDURE container_required_qty(
3062: p_api_version IN NUMBER,
3063: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
3064: p_commit IN VARCHAR2 := fnd_api.g_false,
3065: x_return_status OUT NOCOPY VARCHAR2,
3066: x_msg_count OUT NOCOPY NUMBER,
3067: x_msg_data OUT NOCOPY VARCHAR2,
3068: p_source_item_id IN NUMBER,

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

3124: l_api_name CONSTANT VARCHAR2(30) := 'Prepack_LPN_CP';
3125: l_api_version CONSTANT NUMBER := 1.0;
3126: l_lpn lpn;
3127: l_result NUMBER;
3128: p_init_msg_list VARCHAR2(10) := fnd_api.g_false;
3129: p_commit VARCHAR2(10) := fnd_api.g_false;
3130: x_return_status VARCHAR2(4);
3131: x_msg_count NUMBER;
3132: x_msg_data VARCHAR2(300);

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

3125: l_api_version CONSTANT NUMBER := 1.0;
3126: l_lpn lpn;
3127: l_result NUMBER;
3128: p_init_msg_list VARCHAR2(10) := fnd_api.g_false;
3129: p_commit VARCHAR2(10) := fnd_api.g_false;
3130: x_return_status VARCHAR2(4);
3131: x_msg_count NUMBER;
3132: x_msg_data VARCHAR2(300);
3133: ret BOOLEAN;

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

3136: -- Standard Start of API savepoint
3137: SAVEPOINT prepack_lpn_cp_pub;
3138:
3139: -- Standard call to check for call compatibility.
3140: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
3141: fnd_message.set_name('WMS', 'WMS_CONT_INCOMPATIBLE_API_CALL');
3142: fnd_msg_pub.ADD;
3143: RAISE fnd_api.g_exc_unexpected_error;
3144: END IF;

Line 3143: RAISE fnd_api.g_exc_unexpected_error;

3139: -- Standard call to check for call compatibility.
3140: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
3141: fnd_message.set_name('WMS', 'WMS_CONT_INCOMPATIBLE_API_CALL');
3142: fnd_msg_pub.ADD;
3143: RAISE fnd_api.g_exc_unexpected_error;
3144: END IF;
3145:
3146: -- Initialize message list if p_init_msg_list is set to TRUE.
3147: IF fnd_api.to_boolean(p_init_msg_list) THEN

Line 3147: IF fnd_api.to_boolean(p_init_msg_list) THEN

3143: RAISE fnd_api.g_exc_unexpected_error;
3144: END IF;
3145:
3146: -- Initialize message list if p_init_msg_list is set to TRUE.
3147: IF fnd_api.to_boolean(p_init_msg_list) THEN
3148: fnd_msg_pub.initialize;
3149: END IF;
3150:
3151: -- Initialize API return status to success

Line 3152: x_return_status := fnd_api.g_ret_sts_success;

3148: fnd_msg_pub.initialize;
3149: END IF;
3150:
3151: -- Initialize API return status to success
3152: x_return_status := fnd_api.g_ret_sts_success;
3153: -- Start API body
3154:
3155: -- Call Prepack LPN
3156: WMS_CONTAINER_PVT.prepack_lpn(

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

3180: p_print_label=> p_print_label,
3181: p_print_content_report=> p_print_content_report
3182: );
3183:
3184: IF (x_return_status = fnd_api.g_ret_sts_success) THEN
3185: ret := fnd_concurrent.set_completion_status('NORMAL', x_msg_data);
3186: retcode := 0;
3187: ELSE
3188: ret := fnd_concurrent.set_completion_status('ERROR', x_msg_data);

Line 3196: IF fnd_api.to_boolean(p_commit) THEN

3192:
3193: -- End of API body
3194:
3195: -- Standard check of p_commit.
3196: IF fnd_api.to_boolean(p_commit) THEN
3197: COMMIT WORK;
3198: END IF;
3199:
3200: -- Standard call to get message count and if count is 1,

Line 3204: WHEN fnd_api.g_exc_error THEN

3200: -- Standard call to get message count and if count is 1,
3201: -- get message info.
3202: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
3203: EXCEPTION
3204: WHEN fnd_api.g_exc_error THEN
3205: ROLLBACK TO prepack_lpn_cp_pub;
3206: x_return_status := fnd_api.g_ret_sts_error;
3207: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
3208: WHEN fnd_api.g_exc_unexpected_error THEN

Line 3206: x_return_status := fnd_api.g_ret_sts_error;

3202: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
3203: EXCEPTION
3204: WHEN fnd_api.g_exc_error THEN
3205: ROLLBACK TO prepack_lpn_cp_pub;
3206: x_return_status := fnd_api.g_ret_sts_error;
3207: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
3208: WHEN fnd_api.g_exc_unexpected_error THEN
3209: ROLLBACK TO prepack_lpn_cp_pub;
3210: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 3208: WHEN fnd_api.g_exc_unexpected_error THEN

3204: WHEN fnd_api.g_exc_error THEN
3205: ROLLBACK TO prepack_lpn_cp_pub;
3206: x_return_status := fnd_api.g_ret_sts_error;
3207: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
3208: WHEN fnd_api.g_exc_unexpected_error THEN
3209: ROLLBACK TO prepack_lpn_cp_pub;
3210: x_return_status := fnd_api.g_ret_sts_unexp_error;
3211: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
3212: WHEN OTHERS THEN

Line 3210: x_return_status := fnd_api.g_ret_sts_unexp_error;

3206: x_return_status := fnd_api.g_ret_sts_error;
3207: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
3208: WHEN fnd_api.g_exc_unexpected_error THEN
3209: ROLLBACK TO prepack_lpn_cp_pub;
3210: x_return_status := fnd_api.g_ret_sts_unexp_error;
3211: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
3212: WHEN OTHERS THEN
3213: ROLLBACK TO prepack_lpn_cp_pub;
3214: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 3214: x_return_status := fnd_api.g_ret_sts_unexp_error;

3210: x_return_status := fnd_api.g_ret_sts_unexp_error;
3211: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
3212: WHEN OTHERS THEN
3213: ROLLBACK TO prepack_lpn_cp_pub;
3214: x_return_status := fnd_api.g_ret_sts_unexp_error;
3215:
3216: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
3217: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
3218: END IF;

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

3274: -- ----------------------------------------------------------------------------------
3275:
3276: PROCEDURE Merge_Up_LPN (
3277: p_api_version IN NUMBER
3278: , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
3279: , p_commit IN VARCHAR2 := fnd_api.g_false
3280: , x_return_status OUT NOCOPY VARCHAR2
3281: , x_msg_count OUT NOCOPY NUMBER
3282: , x_msg_data OUT NOCOPY VARCHAR2

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

3275:
3276: PROCEDURE Merge_Up_LPN (
3277: p_api_version IN NUMBER
3278: , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
3279: , p_commit IN VARCHAR2 := fnd_api.g_false
3280: , x_return_status OUT NOCOPY VARCHAR2
3281: , x_msg_count OUT NOCOPY NUMBER
3282: , x_msg_data OUT NOCOPY VARCHAR2
3283: , p_organization_id IN NUMBER

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

3295: l_lpn LPN;
3296:
3297: BEGIN
3298: -- Standard call to check for call compatibility.
3299: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
3300: fnd_message.set_name('WMS', 'WMS_CONT_INCOMPATIBLE_API_CALL');
3301: fnd_msg_pub.ADD;
3302: RAISE fnd_api.g_exc_error;
3303: END IF;

Line 3302: RAISE fnd_api.g_exc_error;

3298: -- Standard call to check for call compatibility.
3299: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
3300: fnd_message.set_name('WMS', 'WMS_CONT_INCOMPATIBLE_API_CALL');
3301: fnd_msg_pub.ADD;
3302: RAISE fnd_api.g_exc_error;
3303: END IF;
3304:
3305: -- Initialize message list if p_init_msg_list is set to TRUE.
3306: IF fnd_api.to_boolean(p_init_msg_list) THEN

Line 3306: IF fnd_api.to_boolean(p_init_msg_list) THEN

3302: RAISE fnd_api.g_exc_error;
3303: END IF;
3304:
3305: -- Initialize message list if p_init_msg_list is set to TRUE.
3306: IF fnd_api.to_boolean(p_init_msg_list) THEN
3307: fnd_msg_pub.initialize;
3308: END IF;
3309:
3310: -- Initialize API return status to success

Line 3311: x_return_status := fnd_api.g_ret_sts_success;

3307: fnd_msg_pub.initialize;
3308: END IF;
3309:
3310: -- Initialize API return status to success
3311: x_return_status := fnd_api.g_ret_sts_success;
3312:
3313: IF ( l_debug = 1 ) THEN
3314: mdebug(l_api_name || ' Entered ' || g_pkg_version, G_ERROR);
3315: END IF;

Line 3328: RAISE fnd_api.g_exc_error;

3324: mdebug(p_organization_id || ' is not a valid org id', G_ERROR);
3325: END IF;
3326: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_ORG');
3327: fnd_msg_pub.ADD;
3328: RAISE fnd_api.g_exc_error;
3329: END IF;
3330:
3331: l_progress := '200';
3332: -- Validate LPN

Line 3342: RAISE FND_API.G_EXC_ERROR;

3338: mdebug(p_outermost_lpn_id || ' is an invalid lpn id', G_ERROR);
3339: END IF;
3340: FND_MESSAGE.SET_NAME('WMS', 'WMS_CONT_INVALID_LPN');
3341: FND_MSG_PUB.ADD;
3342: RAISE FND_API.G_EXC_ERROR;
3343: END IF;
3344:
3345: l_progress := '300';
3346: -- Validate if LPN is valid for this transaction

Line 3356: RAISE FND_API.G_EXC_ERROR;

3352: IF ( l_result = WMS_CONTAINER_PVT.F ) THEN
3353: IF ( l_debug = 1 ) THEN
3354: mdebug(p_outermost_lpn_id || ' cannot be used for merge up', G_ERROR);
3355: END IF;
3356: RAISE FND_API.G_EXC_ERROR;
3357: END IF;
3358:
3359: l_progress := '400';
3360: WMS_CONTAINER_PVT.Merge_Up_LPN (

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

3366: , x_msg_data => x_msg_data
3367: , p_organization_id => p_organization_id
3368: , p_outermost_lpn_id => p_outermost_lpn_id );
3369:
3370: IF ( x_return_status <> fnd_api.g_ret_sts_success ) THEN
3371: IF ( x_return_status = fnd_api.g_ret_sts_error ) THEN
3372: RAISE FND_API.G_EXC_ERROR;
3373: END IF;
3374: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

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

3367: , p_organization_id => p_organization_id
3368: , p_outermost_lpn_id => p_outermost_lpn_id );
3369:
3370: IF ( x_return_status <> fnd_api.g_ret_sts_success ) THEN
3371: IF ( x_return_status = fnd_api.g_ret_sts_error ) THEN
3372: RAISE FND_API.G_EXC_ERROR;
3373: END IF;
3374: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3375: END IF;

Line 3372: RAISE FND_API.G_EXC_ERROR;

3368: , p_outermost_lpn_id => p_outermost_lpn_id );
3369:
3370: IF ( x_return_status <> fnd_api.g_ret_sts_success ) THEN
3371: IF ( x_return_status = fnd_api.g_ret_sts_error ) THEN
3372: RAISE FND_API.G_EXC_ERROR;
3373: END IF;
3374: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3375: END IF;
3376:

Line 3374: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

3370: IF ( x_return_status <> fnd_api.g_ret_sts_success ) THEN
3371: IF ( x_return_status = fnd_api.g_ret_sts_error ) THEN
3372: RAISE FND_API.G_EXC_ERROR;
3373: END IF;
3374: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3375: END IF;
3376:
3377: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
3378: EXCEPTION

Line 3379: WHEN FND_API.G_EXC_ERROR THEN

3375: END IF;
3376:
3377: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
3378: EXCEPTION
3379: WHEN FND_API.G_EXC_ERROR THEN
3380: x_return_status := fnd_api.g_ret_sts_error;
3381: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
3382: IF (l_debug = 1) THEN
3383: FOR i in 1..x_msg_count LOOP

Line 3380: x_return_status := fnd_api.g_ret_sts_error;

3376:
3377: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
3378: EXCEPTION
3379: WHEN FND_API.G_EXC_ERROR THEN
3380: x_return_status := fnd_api.g_ret_sts_error;
3381: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
3382: IF (l_debug = 1) THEN
3383: FOR i in 1..x_msg_count LOOP
3384: l_msgdata := substr(l_msgdata||' | '||substr(fnd_msg_pub.get(x_msg_count-i+1, 'F'), 0, 200),1,2000);

Line 3390: x_return_status := fnd_api.g_ret_sts_unexp_error;

3386: mdebug(l_api_name ||' Error progress='||l_progress||' SQL error: '|| SQLERRM(SQLCODE), 1);
3387: mdebug('msg: '||l_msgdata, 1);
3388: END IF;
3389: WHEN OTHERS THEN
3390: x_return_status := fnd_api.g_ret_sts_unexp_error;
3391: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
3392: IF (l_debug = 1) THEN
3393: mdebug(l_api_name ||' Error progress='||l_progress||' SQL error: '|| SQLERRM(SQLCODE), 1);
3394: END IF;

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

3398: -- ----------------------------------------------------------------------------------
3399:
3400: PROCEDURE Break_Down_LPN (
3401: p_api_version IN NUMBER
3402: , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
3403: , p_commit IN VARCHAR2 := fnd_api.g_false
3404: , x_return_status OUT NOCOPY VARCHAR2
3405: , x_msg_count OUT NOCOPY NUMBER
3406: , x_msg_data OUT NOCOPY VARCHAR2

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

3399:
3400: PROCEDURE Break_Down_LPN (
3401: p_api_version IN NUMBER
3402: , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
3403: , p_commit IN VARCHAR2 := fnd_api.g_false
3404: , x_return_status OUT NOCOPY VARCHAR2
3405: , x_msg_count OUT NOCOPY NUMBER
3406: , x_msg_data OUT NOCOPY VARCHAR2
3407: , p_organization_id IN NUMBER

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

3419: l_lpn LPN;
3420:
3421: BEGIN
3422: -- Standard call to check for call compatibility.
3423: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
3424: fnd_message.set_name('WMS', 'WMS_CONT_INCOMPATIBLE_API_CALL');
3425: fnd_msg_pub.ADD;
3426: RAISE fnd_api.g_exc_error;
3427: END IF;

Line 3426: RAISE fnd_api.g_exc_error;

3422: -- Standard call to check for call compatibility.
3423: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
3424: fnd_message.set_name('WMS', 'WMS_CONT_INCOMPATIBLE_API_CALL');
3425: fnd_msg_pub.ADD;
3426: RAISE fnd_api.g_exc_error;
3427: END IF;
3428:
3429: -- Initialize message list if p_init_msg_list is set to TRUE.
3430: IF fnd_api.to_boolean(p_init_msg_list) THEN

Line 3430: IF fnd_api.to_boolean(p_init_msg_list) THEN

3426: RAISE fnd_api.g_exc_error;
3427: END IF;
3428:
3429: -- Initialize message list if p_init_msg_list is set to TRUE.
3430: IF fnd_api.to_boolean(p_init_msg_list) THEN
3431: fnd_msg_pub.initialize;
3432: END IF;
3433:
3434: -- Initialize API return status to success

Line 3435: x_return_status := fnd_api.g_ret_sts_success;

3431: fnd_msg_pub.initialize;
3432: END IF;
3433:
3434: -- Initialize API return status to success
3435: x_return_status := fnd_api.g_ret_sts_success;
3436:
3437: IF ( l_debug = 1 ) THEN
3438: mdebug(l_api_name || ' Entered ' || g_pkg_version, G_ERROR);
3439: END IF;

Line 3452: RAISE fnd_api.g_exc_error;

3448: mdebug(p_organization_id || ' is not a valid org id', G_ERROR);
3449: END IF;
3450: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_ORG');
3451: fnd_msg_pub.ADD;
3452: RAISE fnd_api.g_exc_error;
3453: END IF;
3454:
3455: l_progress := '200';
3456: -- Validate LPN

Line 3466: RAISE FND_API.G_EXC_ERROR;

3462: mdebug(p_outermost_lpn_id || ' is an invalid lpn id', G_ERROR);
3463: END IF;
3464: FND_MESSAGE.SET_NAME('WMS', 'WMS_CONT_INVALID_LPN');
3465: FND_MSG_PUB.ADD;
3466: RAISE FND_API.G_EXC_ERROR;
3467: END IF;
3468:
3469: l_progress := '300';
3470: -- Validate if LPN is valid for this transaction

Line 3480: RAISE FND_API.G_EXC_ERROR;

3476: IF ( l_result = WMS_CONTAINER_PVT.F ) THEN
3477: IF ( l_debug = 1 ) THEN
3478: mdebug(p_outermost_lpn_id || ' cannot be used for merge up', G_ERROR);
3479: END IF;
3480: RAISE FND_API.G_EXC_ERROR;
3481: END IF;
3482:
3483: l_progress := '400';
3484: WMS_CONTAINER_PVT.Break_Down_LPN (

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

3490: , x_msg_data => x_msg_data
3491: , p_organization_id => p_organization_id
3492: , p_outermost_lpn_id => p_outermost_lpn_id );
3493:
3494: IF ( x_return_status <> fnd_api.g_ret_sts_success ) THEN
3495: IF ( x_return_status = fnd_api.g_ret_sts_error ) THEN
3496: RAISE FND_API.G_EXC_ERROR;
3497: END IF;
3498: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

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

3491: , p_organization_id => p_organization_id
3492: , p_outermost_lpn_id => p_outermost_lpn_id );
3493:
3494: IF ( x_return_status <> fnd_api.g_ret_sts_success ) THEN
3495: IF ( x_return_status = fnd_api.g_ret_sts_error ) THEN
3496: RAISE FND_API.G_EXC_ERROR;
3497: END IF;
3498: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3499: END IF;

Line 3496: RAISE FND_API.G_EXC_ERROR;

3492: , p_outermost_lpn_id => p_outermost_lpn_id );
3493:
3494: IF ( x_return_status <> fnd_api.g_ret_sts_success ) THEN
3495: IF ( x_return_status = fnd_api.g_ret_sts_error ) THEN
3496: RAISE FND_API.G_EXC_ERROR;
3497: END IF;
3498: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3499: END IF;
3500:

Line 3498: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

3494: IF ( x_return_status <> fnd_api.g_ret_sts_success ) THEN
3495: IF ( x_return_status = fnd_api.g_ret_sts_error ) THEN
3496: RAISE FND_API.G_EXC_ERROR;
3497: END IF;
3498: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3499: END IF;
3500:
3501: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
3502: EXCEPTION

Line 3503: WHEN FND_API.G_EXC_ERROR THEN

3499: END IF;
3500:
3501: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
3502: EXCEPTION
3503: WHEN FND_API.G_EXC_ERROR THEN
3504: x_return_status := fnd_api.g_ret_sts_error;
3505: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
3506: IF (l_debug = 1) THEN
3507: FOR i in 1..x_msg_count LOOP

Line 3504: x_return_status := fnd_api.g_ret_sts_error;

3500:
3501: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
3502: EXCEPTION
3503: WHEN FND_API.G_EXC_ERROR THEN
3504: x_return_status := fnd_api.g_ret_sts_error;
3505: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
3506: IF (l_debug = 1) THEN
3507: FOR i in 1..x_msg_count LOOP
3508: l_msgdata := substr(l_msgdata||' | '||substr(fnd_msg_pub.get(x_msg_count-i+1, 'F'), 0, 200),1,2000);

Line 3514: x_return_status := fnd_api.g_ret_sts_unexp_error;

3510: mdebug(l_api_name ||' Error progress='||l_progress||' SQL error: '|| SQLERRM(SQLCODE), 1);
3511: mdebug('msg: '||l_msgdata, 1);
3512: END IF;
3513: WHEN OTHERS THEN
3514: x_return_status := fnd_api.g_ret_sts_unexp_error;
3515: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
3516: IF (l_debug = 1) THEN
3517: mdebug(l_api_name ||' Error progress='||l_progress||' SQL error: '|| SQLERRM(SQLCODE), 1);
3518: END IF;

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

3522: -- ----------------------------------------------------------------------------------
3523:
3524: PROCEDURE Initialize_LPN (
3525: p_api_version IN NUMBER
3526: , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
3527: , p_commit IN VARCHAR2 := fnd_api.g_false
3528: , x_return_status OUT NOCOPY VARCHAR2
3529: , x_msg_count OUT NOCOPY NUMBER
3530: , x_msg_data OUT NOCOPY VARCHAR2

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

3523:
3524: PROCEDURE Initialize_LPN (
3525: p_api_version IN NUMBER
3526: , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
3527: , p_commit IN VARCHAR2 := fnd_api.g_false
3528: , x_return_status OUT NOCOPY VARCHAR2
3529: , x_msg_count OUT NOCOPY NUMBER
3530: , x_msg_data OUT NOCOPY VARCHAR2
3531: , p_organization_id IN NUMBER

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

3543: l_lpn LPN;
3544:
3545: BEGIN
3546: -- Standard call to check for call compatibility.
3547: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
3548: fnd_message.set_name('WMS', 'WMS_CONT_INCOMPATIBLE_API_CALL');
3549: fnd_msg_pub.ADD;
3550: RAISE fnd_api.g_exc_error;
3551: END IF;

Line 3550: RAISE fnd_api.g_exc_error;

3546: -- Standard call to check for call compatibility.
3547: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
3548: fnd_message.set_name('WMS', 'WMS_CONT_INCOMPATIBLE_API_CALL');
3549: fnd_msg_pub.ADD;
3550: RAISE fnd_api.g_exc_error;
3551: END IF;
3552:
3553: -- Initialize message list if p_init_msg_list is set to TRUE.
3554: IF fnd_api.to_boolean(p_init_msg_list) THEN

Line 3554: IF fnd_api.to_boolean(p_init_msg_list) THEN

3550: RAISE fnd_api.g_exc_error;
3551: END IF;
3552:
3553: -- Initialize message list if p_init_msg_list is set to TRUE.
3554: IF fnd_api.to_boolean(p_init_msg_list) THEN
3555: fnd_msg_pub.initialize;
3556: END IF;
3557:
3558: -- Initialize API return status to success

Line 3559: x_return_status := fnd_api.g_ret_sts_success;

3555: fnd_msg_pub.initialize;
3556: END IF;
3557:
3558: -- Initialize API return status to success
3559: x_return_status := fnd_api.g_ret_sts_success;
3560:
3561: IF ( l_debug = 1 ) THEN
3562: mdebug(l_api_name || ' Entered ' || g_pkg_version, G_ERROR);
3563: END IF;

Line 3576: RAISE fnd_api.g_exc_error;

3572: mdebug(p_organization_id || ' is not a valid org id', G_ERROR);
3573: END IF;
3574: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_ORG');
3575: fnd_msg_pub.ADD;
3576: RAISE fnd_api.g_exc_error;
3577: END IF;
3578:
3579: l_progress := '200';
3580: -- Validate LPN

Line 3590: RAISE FND_API.G_EXC_ERROR;

3586: mdebug(p_outermost_lpn_id || ' is an invalid lpn id', G_ERROR);
3587: END IF;
3588: FND_MESSAGE.SET_NAME('WMS', 'WMS_CONT_INVALID_LPN');
3589: FND_MSG_PUB.ADD;
3590: RAISE FND_API.G_EXC_ERROR;
3591: END IF;
3592:
3593: l_progress := '300';
3594: -- Validate if LPN is valid for this transaction

Line 3604: RAISE FND_API.G_EXC_ERROR;

3600: IF ( l_result = WMS_CONTAINER_PVT.F ) THEN
3601: IF ( l_debug = 1 ) THEN
3602: mdebug(p_outermost_lpn_id || ' cannot initialize LPN', G_ERROR);
3603: END IF;
3604: RAISE FND_API.G_EXC_ERROR;
3605: END IF;
3606:
3607: l_progress := '400';
3608: WMS_CONTAINER_PVT.Initialize_LPN (

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

3614: , x_msg_data => x_msg_data
3615: , p_organization_id => p_organization_id
3616: , p_outermost_lpn_id => p_outermost_lpn_id );
3617:
3618: IF ( x_return_status <> fnd_api.g_ret_sts_success ) THEN
3619: IF ( x_return_status = fnd_api.g_ret_sts_error ) THEN
3620: RAISE FND_API.G_EXC_ERROR;
3621: END IF;
3622: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

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

3615: , p_organization_id => p_organization_id
3616: , p_outermost_lpn_id => p_outermost_lpn_id );
3617:
3618: IF ( x_return_status <> fnd_api.g_ret_sts_success ) THEN
3619: IF ( x_return_status = fnd_api.g_ret_sts_error ) THEN
3620: RAISE FND_API.G_EXC_ERROR;
3621: END IF;
3622: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3623: END IF;

Line 3620: RAISE FND_API.G_EXC_ERROR;

3616: , p_outermost_lpn_id => p_outermost_lpn_id );
3617:
3618: IF ( x_return_status <> fnd_api.g_ret_sts_success ) THEN
3619: IF ( x_return_status = fnd_api.g_ret_sts_error ) THEN
3620: RAISE FND_API.G_EXC_ERROR;
3621: END IF;
3622: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3623: END IF;
3624:

Line 3622: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

3618: IF ( x_return_status <> fnd_api.g_ret_sts_success ) THEN
3619: IF ( x_return_status = fnd_api.g_ret_sts_error ) THEN
3620: RAISE FND_API.G_EXC_ERROR;
3621: END IF;
3622: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3623: END IF;
3624:
3625: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
3626: EXCEPTION

Line 3627: WHEN FND_API.G_EXC_ERROR THEN

3623: END IF;
3624:
3625: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
3626: EXCEPTION
3627: WHEN FND_API.G_EXC_ERROR THEN
3628: x_return_status := fnd_api.g_ret_sts_error;
3629: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
3630: IF (l_debug = 1) THEN
3631: FOR i in 1..x_msg_count LOOP

Line 3628: x_return_status := fnd_api.g_ret_sts_error;

3624:
3625: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
3626: EXCEPTION
3627: WHEN FND_API.G_EXC_ERROR THEN
3628: x_return_status := fnd_api.g_ret_sts_error;
3629: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
3630: IF (l_debug = 1) THEN
3631: FOR i in 1..x_msg_count LOOP
3632: l_msgdata := substr(l_msgdata||' | '||substr(fnd_msg_pub.get(x_msg_count-i+1, 'F'), 0, 200),1,2000);

Line 3638: x_return_status := fnd_api.g_ret_sts_unexp_error;

3634: mdebug(l_api_name ||' Error progress='||l_progress||' SQL error: '|| SQLERRM(SQLCODE), 1);
3635: mdebug('msg: '||l_msgdata, 1);
3636: END IF;
3637: WHEN OTHERS THEN
3638: x_return_status := fnd_api.g_ret_sts_unexp_error;
3639: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
3640: IF (l_debug = 1) THEN
3641: mdebug(l_api_name ||' Error progress='||l_progress||' SQL error: '|| SQLERRM(SQLCODE), 1);
3642: END IF;

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

3858:
3859:
3860: PROCEDURE REUSE_LPNS (
3861: p_api_version IN NUMBER
3862: , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
3863: , p_commit IN VARCHAR2 := fnd_api.g_false
3864: , p_validation_level IN NUMBER := fnd_api.g_valid_level_full
3865: , x_return_status OUT NOCOPY VARCHAR2
3866: , x_msg_count OUT NOCOPY NUMBER

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

3859:
3860: PROCEDURE REUSE_LPNS (
3861: p_api_version IN NUMBER
3862: , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
3863: , p_commit IN VARCHAR2 := fnd_api.g_false
3864: , p_validation_level IN NUMBER := fnd_api.g_valid_level_full
3865: , x_return_status OUT NOCOPY VARCHAR2
3866: , x_msg_count OUT NOCOPY NUMBER
3867: , x_msg_data OUT NOCOPY VARCHAR2

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

3860: PROCEDURE REUSE_LPNS (
3861: p_api_version IN NUMBER
3862: , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
3863: , p_commit IN VARCHAR2 := fnd_api.g_false
3864: , p_validation_level IN NUMBER := fnd_api.g_valid_level_full
3865: , x_return_status OUT NOCOPY VARCHAR2
3866: , x_msg_count OUT NOCOPY NUMBER
3867: , x_msg_data OUT NOCOPY VARCHAR2
3868: , p_lpn_id IN NUMBER

Line 3929: IF NOT FND_API.Compatible_API_Call( l_api_version

3925: IF p_init_msg_list ='Y' THEN
3926: fnd_msg_pub.initialize;
3927: END IF;
3928:
3929: IF NOT FND_API.Compatible_API_Call( l_api_version
3930: , p_api_version
3931: , l_api_name
3932: , G_PKG_NAME) THEN
3933:

Line 3937: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

3933:
3934: IF l_debug = 1 THEN
3935: mdebug('API Version not compatible');
3936: END IF;
3937: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3938: END IF;
3939:
3940: IF p_new_org_id IS NOT NULL THEN
3941: SELECT count(1)

Line 4250: RAISE fnd_api.g_exc_unexpected_error;

4246: , p_item_id => l_container_item_id ) ) THEN
4247: IF l_debug = 1 THEN
4248: mdebug('Error calling inv_cache.set_item_rec');
4249: END IF;
4250: RAISE fnd_api.g_exc_unexpected_error;
4251: END IF;
4252:
4253: UPDATE wms_license_plate_numbers
4254: SET gross_weight = inv_cache.item_rec.unit_weight

Line 4479: RAISE fnd_api.g_exc_unexpected_error;

4475: , p_item_id => l_container_item_id ) ) THEN
4476: IF l_debug = 1 THEN
4477: mdebug('Error calling inv_cache.set_item_rec');
4478: END IF;
4479: RAISE fnd_api.g_exc_unexpected_error;
4480: END IF;
4481:
4482: UPDATE wms_license_plate_numbers
4483: SET gross_weight = inv_cache.item_rec.unit_weight

Line 4496: IF p_commit = fnd_api.g_true THEN

4492: END LOOP;
4493:
4494: END IF;
4495:
4496: IF p_commit = fnd_api.g_true THEN
4497: IF l_debug = 1 THEN
4498: mdebug('p_commit is true, committing the transaction');
4499: END IF;
4500: COMMIT;