DBA Data[Home] [Help]

APPS.GME_PENDING_PRODUCT_LOTS_PVT dependencies on FND_API

Line 35: x_return_status := FND_API.G_RET_STS_SUCCESS;

31: BEGIN
32: IF g_debug <= gme_debug.g_log_procedure THEN
33: gme_debug.put_line('Entering api '||g_pkg_name||'.'||l_api_name);
34: END IF;
35: x_return_status := FND_API.G_RET_STS_SUCCESS;
36:
37: OPEN cur_get_lots(p_material_detail_id);
38: FETCH cur_get_lots BULK COLLECT INTO x_pending_product_lot_tbl;
39: CLOSE cur_get_lots;

Line 50: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

46: IF g_debug <= gme_debug.g_log_unexpected THEN
47: gme_debug.put_line('When others exception in '||g_pkg_name||'.'||l_api_name||' Error is ' || SQLERRM);
48: END IF;
49: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
50: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
51: END get_pending_lot;
52:
53: PROCEDURE relieve_pending_lot
54: (p_pending_lot_id IN NUMBER

Line 75: x_return_status := FND_API.G_RET_STS_SUCCESS;

71: BEGIN
72: IF g_debug <= gme_debug.g_log_procedure THEN
73: gme_debug.put_line('Entering api '||g_pkg_name||'.'||l_api_name);
74: END IF;
75: x_return_status := FND_API.G_RET_STS_SUCCESS;
76:
77: OPEN cur_get_pending_lot_qty(p_pending_lot_id);
78: FETCH cur_get_pending_lot_qty INTO l_qty, l_sec_qty;
79: CLOSE cur_get_pending_lot_qty;

Line 89: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

85: l_pending_product_lots_rec.pending_product_lot_id := p_pending_lot_id;
86: delete_pending_product_lot( p_pending_product_lots_rec => l_pending_product_lots_rec
87: ,x_return_status => l_return_status
88: );
89: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
90: RAISE error_delete_row;
91: END IF;
92:
93: /*UPDATE gme_pending_product_lots

Line 132: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

128: IF g_debug <= gme_debug.g_log_unexpected THEN
129: gme_debug.put_line('When others exception in '||g_pkg_name||'.'||l_api_name||' Error is ' || SQLERRM);
130: END IF;
131: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
132: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
133: END relieve_pending_lot;
134:
135: PROCEDURE create_product_lot
136: (p_organization_id IN NUMBER

Line 195: x_return_status := FND_API.G_RET_STS_SUCCESS;

191: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_generate_lot= '||p_generate_lot);
192: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_generate_parent_lot= '||p_generate_parent_lot);
193: END IF;
194:
195: x_return_status := FND_API.G_RET_STS_SUCCESS;
196:
197: x_mmli_tbl := p_mmli_tbl;
198:
199: IF p_generate_lot = fnd_api.g_false THEN

Line 199: IF p_generate_lot = fnd_api.g_false THEN

195: x_return_status := FND_API.G_RET_STS_SUCCESS;
196:
197: x_mmli_tbl := p_mmli_tbl;
198:
199: IF p_generate_lot = fnd_api.g_false THEN
200: l_null_lot_number := FALSE;
201:
202: FOR i in 1..x_mmli_tbl.count LOOP
203: IF x_mmli_tbl(i).lot_number IS NULL THEN

Line 219: IF p_generate_parent_lot = fnd_api.g_true AND p_parent_lot IS NULL THEN

215: END IF;
216:
217: l_parent_lot := p_parent_lot;
218:
219: IF p_generate_parent_lot = fnd_api.g_true AND p_parent_lot IS NULL THEN
220: l_parent_lot :=
221: inv_lot_api_pub.auto_gen_lot
222: (p_org_id => p_organization_id
223: ,p_inventory_item_id => p_inventory_item_id

Line 238: ,p_init_msg_list => fnd_api.g_false

234: ,p_transaction_action_id => NULL
235: ,p_transaction_source_type_id => NULL
236: ,p_lot_number => NULL
237: ,p_api_version => 1.0
238: ,p_init_msg_list => fnd_api.g_false
239: ,p_commit => fnd_api.g_false
240: ,p_validation_level => NULL
241: ,p_parent_lot_number => NULL
242: ,x_return_status => x_return_status

Line 239: ,p_commit => fnd_api.g_false

235: ,p_transaction_source_type_id => NULL
236: ,p_lot_number => NULL
237: ,p_api_version => 1.0
238: ,p_init_msg_list => fnd_api.g_false
239: ,p_commit => fnd_api.g_false
240: ,p_validation_level => NULL
241: ,p_parent_lot_number => NULL
242: ,x_return_status => x_return_status
243: ,x_msg_count => l_msg_count

Line 246: IF x_return_status <> fnd_api.g_ret_sts_success THEN

242: ,x_return_status => x_return_status
243: ,x_msg_count => l_msg_count
244: ,x_msg_data => l_msg_data);
245:
246: IF x_return_status <> fnd_api.g_ret_sts_success THEN
247: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
248: gme_debug.put_line (g_pkg_name||'.'||l_api_name
249: ||'auto_gen_lot for parent returned '
250: || x_return_status);

Line 262: END IF; -- IF p_generate_parent_lot = fnd_api.g_true AND p_parent_lot IS NULL THEN

258: || ':'
259: || 'l_parent_lot= '
260: || l_parent_lot);
261: END IF;
262: END IF; -- IF p_generate_parent_lot = fnd_api.g_true AND p_parent_lot IS NULL THEN
263:
264: FOR i IN 1 .. x_mmli_tbl.COUNT LOOP
265: IF x_mmli_tbl (i).lot_number IS NULL THEN
266: x_mmli_tbl (i).lot_number := inv_lot_api_pub.auto_gen_lot

Line 283: ,p_init_msg_list => fnd_api.g_false

279: ,p_transaction_action_id => NULL
280: ,p_transaction_source_type_id => NULL
281: ,p_lot_number => NULL
282: ,p_api_version => 1.0
283: ,p_init_msg_list => fnd_api.g_false
284: ,p_commit => fnd_api.g_false
285: ,p_validation_level => NULL
286: ,p_parent_lot_number => l_parent_lot
287: ,x_return_status => x_return_status

Line 284: ,p_commit => fnd_api.g_false

280: ,p_transaction_source_type_id => NULL
281: ,p_lot_number => NULL
282: ,p_api_version => 1.0
283: ,p_init_msg_list => fnd_api.g_false
284: ,p_commit => fnd_api.g_false
285: ,p_validation_level => NULL
286: ,p_parent_lot_number => l_parent_lot
287: ,x_return_status => x_return_status
288: ,x_msg_count => l_msg_count

Line 291: IF x_return_status <> fnd_api.g_ret_sts_success THEN

287: ,x_return_status => x_return_status
288: ,x_msg_count => l_msg_count
289: ,x_msg_data => l_msg_data);
290:
291: IF x_return_status <> fnd_api.g_ret_sts_success THEN
292: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
293: gme_debug.put_line (g_pkg_name||'.'||l_api_name
294: ||'auto_gen_lot'
295: || ':'

Line 346: ,p_init_msg_list => fnd_api.g_true

342: ,x_lot_rec => l_lot_rec
343: ,p_lot_rec => l_in_lot_rec
344: ,p_source => l_source
345: ,p_api_version => l_api_version
346: ,p_init_msg_list => fnd_api.g_true
347: ,p_commit => fnd_api.g_false
348: ,p_validation_level => fnd_api.g_valid_level_full
349: ,p_origin_txn_id => 1);
350:

Line 347: ,p_commit => fnd_api.g_false

343: ,p_lot_rec => l_in_lot_rec
344: ,p_source => l_source
345: ,p_api_version => l_api_version
346: ,p_init_msg_list => fnd_api.g_true
347: ,p_commit => fnd_api.g_false
348: ,p_validation_level => fnd_api.g_valid_level_full
349: ,p_origin_txn_id => 1);
350:
351: IF x_return_status <> fnd_api.g_ret_sts_success THEN

Line 348: ,p_validation_level => fnd_api.g_valid_level_full

344: ,p_source => l_source
345: ,p_api_version => l_api_version
346: ,p_init_msg_list => fnd_api.g_true
347: ,p_commit => fnd_api.g_false
348: ,p_validation_level => fnd_api.g_valid_level_full
349: ,p_origin_txn_id => 1);
350:
351: IF x_return_status <> fnd_api.g_ret_sts_success THEN
352: RAISE error_lot_create;

Line 351: IF x_return_status <> fnd_api.g_ret_sts_success THEN

347: ,p_commit => fnd_api.g_false
348: ,p_validation_level => fnd_api.g_valid_level_full
349: ,p_origin_txn_id => 1);
350:
351: IF x_return_status <> fnd_api.g_ret_sts_success THEN
352: RAISE error_lot_create;
353: END IF;
354:
355: x_mmli_tbl (i).parent_lot_number := l_parent_lot;

Line 370: x_return_status := fnd_api.g_ret_sts_error;

366: EXCEPTION
367: WHEN error_get_item_rec OR error_gen_parent_lot OR error_gen_lot THEN
368: NULL;
369: WHEN error_not_prod OR error_lot_create OR error_gen_lot_no_create OR error_null_lots OR error_null_exp_dt THEN
370: x_return_status := fnd_api.g_ret_sts_error;
371: WHEN OTHERS THEN
372: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
373: IF (NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT) THEN
374: gme_debug.put_line ('Unexpected error: '||g_pkg_name||'.'||l_api_name||': '||SQLERRM);

Line 376: x_return_status := FND_API.g_ret_sts_unexp_error;

372: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
373: IF (NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT) THEN
374: gme_debug.put_line ('Unexpected error: '||g_pkg_name||'.'||l_api_name||': '||SQLERRM);
375: END IF;
376: x_return_status := FND_API.g_ret_sts_unexp_error;
377:
378: END create_product_lot;
379:
380: PROCEDURE create_pending_product_lot

Line 395: x_return_status := FND_API.G_RET_STS_SUCCESS;

391:
392: IF g_debug <= gme_debug.g_log_procedure THEN
393: gme_debug.put_line('Entering api '||g_pkg_name||'.'||l_api_name);
394: END IF;
395: x_return_status := FND_API.G_RET_STS_SUCCESS;
396:
397: IF NOT gme_pending_product_lots_dbl.insert_row
398: (p_pending_product_lots_rec => p_pending_product_lots_rec
399: ,x_pending_product_lots_rec => l_pp_lot_rec) THEN

Line 412: x_return_status := FND_API.g_ret_sts_unexp_error;

408:
409: EXCEPTION
410: WHEN error_insert_row THEN
411: gme_common_pvt.log_message ('GME_UNEXPECTED_ERROR', 'ERROR', SQLERRM);
412: x_return_status := FND_API.g_ret_sts_unexp_error;
413: WHEN OTHERS THEN
414: IF g_debug <= gme_debug.g_log_unexpected THEN
415: gme_debug.put_line('When others exception in '||g_pkg_name||'.'||l_api_name||' Error is ' || SQLERRM);
416: END IF;

Line 418: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

414: IF g_debug <= gme_debug.g_log_unexpected THEN
415: gme_debug.put_line('When others exception in '||g_pkg_name||'.'||l_api_name||' Error is ' || SQLERRM);
416: END IF;
417: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
418: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
419: END create_pending_product_lot;
420:
421: PROCEDURE update_pending_product_lot
422: (p_pending_product_lots_rec IN gme_pending_product_lots%ROWTYPE

Line 435: x_return_status := FND_API.G_RET_STS_SUCCESS;

431:
432: IF g_debug <= gme_debug.g_log_procedure THEN
433: gme_debug.put_line('Entering api '||g_pkg_name||'.'||l_api_name);
434: END IF;
435: x_return_status := FND_API.G_RET_STS_SUCCESS;
436:
437: IF NOT gme_pending_product_lots_dbl.update_row
438: (p_pending_product_lots_rec => p_pending_product_lots_rec) THEN
439: RAISE error_update_row;

Line 455: x_return_status := fnd_api.g_ret_sts_unexp_error;

451:
452: EXCEPTION
453: WHEN error_update_row OR error_fetch_row THEN
454: -- error message set in fetch routine
455: x_return_status := fnd_api.g_ret_sts_unexp_error;
456: WHEN OTHERS THEN
457: IF g_debug <= gme_debug.g_log_unexpected THEN
458: gme_debug.put_line('When others exception in '||g_pkg_name||'.'||l_api_name||' Error is ' || SQLERRM);
459: END IF;

Line 461: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

457: IF g_debug <= gme_debug.g_log_unexpected THEN
458: gme_debug.put_line('When others exception in '||g_pkg_name||'.'||l_api_name||' Error is ' || SQLERRM);
459: END IF;
460: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
461: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
462: END update_pending_product_lot;
463:
464: PROCEDURE delete_pending_product_lot
465: (p_pending_product_lots_rec IN gme_pending_product_lots%ROWTYPE

Line 476: x_return_status := FND_API.G_RET_STS_SUCCESS;

472:
473: IF g_debug <= gme_debug.g_log_procedure THEN
474: gme_debug.put_line('Entering api '||g_pkg_name||'.'||l_api_name);
475: END IF;
476: x_return_status := FND_API.G_RET_STS_SUCCESS;
477:
478: IF NOT gme_pending_product_lots_dbl.delete_row
479: (p_pending_product_lots_rec => p_pending_product_lots_rec) THEN
480: RAISE error_delete_row;

Line 490: x_return_status := FND_API.g_ret_sts_unexp_error;

486:
487: EXCEPTION
488: WHEN error_delete_row THEN
489: gme_common_pvt.log_message ('GME_UNEXPECTED_ERROR', 'ERROR', SQLERRM);
490: x_return_status := FND_API.g_ret_sts_unexp_error;
491: WHEN OTHERS THEN
492: IF g_debug <= gme_debug.g_log_unexpected THEN
493: gme_debug.put_line('When others exception in '||g_pkg_name||'.'||l_api_name||' Error is ' || SQLERRM);
494: END IF;

Line 496: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

492: IF g_debug <= gme_debug.g_log_unexpected THEN
493: gme_debug.put_line('When others exception in '||g_pkg_name||'.'||l_api_name||' Error is ' || SQLERRM);
494: END IF;
495: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
496: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
497: END delete_pending_product_lot;
498:
499: --Bug#5078853 created the following over loaded procedure
500: PROCEDURE delete_pending_product_lot

Line 517: x_return_status := FND_API.G_RET_STS_SUCCESS;

513: BEGIN
514: IF g_debug <= gme_debug.g_log_procedure THEN
515: gme_debug.put_line('Entering api '||g_pkg_name||'.'||l_api_name);
516: END IF;
517: x_return_status := FND_API.G_RET_STS_SUCCESS;
518:
519: IF p_material_detail_id IS NOT NULL THEN
520: OPEN c_get_pending_lots;
521: LOOP

Line 541: x_return_status := FND_API.g_ret_sts_unexp_error;

537:
538: EXCEPTION
539: WHEN error_delete_row THEN
540: gme_common_pvt.log_message ('GME_UNEXPECTED_ERROR', 'ERROR', SQLERRM);
541: x_return_status := FND_API.g_ret_sts_unexp_error;
542: WHEN OTHERS THEN
543: IF g_debug <= gme_debug.g_log_unexpected THEN
544: gme_debug.put_line('When others exception in '||g_pkg_name||'.'||l_api_name||' Error is ' || SQLERRM);
545: END IF;

Line 547: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

543: IF g_debug <= gme_debug.g_log_unexpected THEN
544: gme_debug.put_line('When others exception in '||g_pkg_name||'.'||l_api_name||' Error is ' || SQLERRM);
545: END IF;
546: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
547: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
548: END delete_pending_product_lot;
549:
550: PROCEDURE validate_material_for_create
551: (p_batch_header_rec IN gme_batch_header%ROWTYPE

Line 568: x_return_status := FND_API.G_RET_STS_SUCCESS;

564:
565: IF g_debug <= gme_debug.g_log_procedure THEN
566: gme_debug.put_line('Entering api '||g_pkg_name||'.'||l_api_name);
567: END IF;
568: x_return_status := FND_API.G_RET_STS_SUCCESS;
569:
570: gme_material_detail_pvt.get_item_rec
571: (p_org_id => p_batch_header_rec.organization_id
572: ,p_item_id => p_material_detail_rec.inventory_item_id

Line 576: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

572: ,p_item_id => p_material_detail_rec.inventory_item_id
573: ,x_item_rec => l_item_rec
574: ,x_return_status => x_return_status);
575:
576: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
577: RAISE error_get_item_rec;
578: END IF;
579:
580: IF l_item_rec.lot_control_code = 1 THEN

Line 605: x_return_status := fnd_api.g_ret_sts_error;

601: END IF;
602:
603: EXCEPTION
604: WHEN error_not_lot_control OR error_no_lot_create THEN
605: x_return_status := fnd_api.g_ret_sts_error;
606: WHEN OTHERS THEN
607: IF g_debug <= gme_debug.g_log_unexpected THEN
608: gme_debug.put_line('When others exception in '||g_pkg_name||'.'||l_api_name||' Error is ' || SQLERRM);
609: END IF;

Line 611: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

607: IF g_debug <= gme_debug.g_log_unexpected THEN
608: gme_debug.put_line('When others exception in '||g_pkg_name||'.'||l_api_name||' Error is ' || SQLERRM);
609: END IF;
610: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
611: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
612: END validate_material_for_create;
613:
614: FUNCTION get_last_sequence
615: (p_matl_dtl_id IN NUMBER

Line 631: x_return_status := FND_API.G_RET_STS_SUCCESS;

627: BEGIN
628: IF g_debug <= gme_debug.g_log_procedure THEN
629: gme_debug.put_line('Entering function '||g_pkg_name||'.'||l_api_name);
630: END IF;
631: x_return_status := FND_API.G_RET_STS_SUCCESS;
632:
633: OPEN cur_get_sequ(p_matl_dtl_id);
634: FETCH cur_get_sequ INTO l_sequ;
635: CLOSE cur_get_sequ;

Line 649: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

645: IF g_debug <= gme_debug.g_log_unexpected THEN
646: gme_debug.put_line('When others exception in '||g_pkg_name||'.'||l_api_name||' Error is ' || SQLERRM);
647: END IF;
648: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
649: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
650: END get_last_sequence;
651:
652: PROCEDURE validate_record_for_create
653: (p_material_detail_rec IN gme_material_details%ROWTYPE

Line 684: x_return_status := FND_API.G_RET_STS_SUCCESS;

680:
681: IF g_debug <= gme_debug.g_log_procedure THEN
682: gme_debug.put_line('Entering api '||g_pkg_name||'.'||l_api_name);
683: END IF;
684: x_return_status := FND_API.G_RET_STS_SUCCESS;
685:
686: x_pending_product_lots_rec.batch_id := p_material_detail_rec.batch_id;
687: x_pending_product_lots_rec.material_detail_id := p_material_detail_rec.material_detail_id;
688:

Line 695: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

691: ,p_item_id => p_material_detail_rec.inventory_item_id
692: ,x_item_rec => l_item_rec
693: ,x_return_status => x_return_status);
694:
695: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
696: RAISE error_get_item;
697: END IF;
698:
699: -- Validate following fields:

Line 723: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN

719: IF NOT validate_sequence
720: (p_matl_dtl_rec => p_material_detail_rec
721: ,p_sequence => l_sequence
722: ,x_return_status => x_return_status) THEN
723: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
724: x_return_status := FND_API.G_RET_STS_ERROR;
725: END IF;
726: RAISE error_validate;
727: END IF;

Line 724: x_return_status := FND_API.G_RET_STS_ERROR;

720: (p_matl_dtl_rec => p_material_detail_rec
721: ,p_sequence => l_sequence
722: ,x_return_status => x_return_status) THEN
723: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
724: x_return_status := FND_API.G_RET_STS_ERROR;
725: END IF;
726: RAISE error_validate;
727: END IF;
728:

Line 735: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN

731: IF NOT validate_revision
732: (p_item_rec => l_item_rec
733: ,p_revision => p_pending_product_lots_rec.revision
734: ,x_return_status => x_return_status) THEN
735: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
736: x_return_status := FND_API.G_RET_STS_ERROR;
737: END IF;
738: RAISE error_validate;
739: END IF;

Line 736: x_return_status := FND_API.G_RET_STS_ERROR;

732: (p_item_rec => l_item_rec
733: ,p_revision => p_pending_product_lots_rec.revision
734: ,x_return_status => x_return_status) THEN
735: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
736: x_return_status := FND_API.G_RET_STS_ERROR;
737: END IF;
738: RAISE error_validate;
739: END IF;
740:

Line 746: p_create_lot = fnd_api.g_true THEN

742:
743: l_lot_number := p_pending_product_lots_rec.lot_number;
744:
745: IF p_material_detail_rec.line_type <> gme_common_pvt.g_line_type_ing AND
746: p_create_lot = fnd_api.g_true THEN
747: l_in_mmli_tbl(1).lot_number := p_pending_product_lots_rec.lot_number;
748:
749: create_product_lot
750: (p_organization_id => p_material_detail_rec.organization_id

Line 761: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

757: ,p_expiration_date => p_expiration_date
758: ,x_mmli_tbl => l_mmli_tbl
759: ,x_return_status => x_return_status);
760:
761: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
762: RAISE error_create_lot;
763: END IF;
764:
765: l_lot_number := l_mmli_tbl(1).lot_number;

Line 773: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN

769: (p_inv_item_id => p_material_detail_rec.inventory_item_id
770: ,p_org_id => p_material_detail_rec.organization_id
771: ,p_lot_number => l_lot_number
772: ,x_return_status => x_return_status) THEN
773: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
774: x_return_status := FND_API.G_RET_STS_ERROR;
775: END IF;
776: RAISE error_validate;
777: END IF;

Line 774: x_return_status := FND_API.G_RET_STS_ERROR;

770: ,p_org_id => p_material_detail_rec.organization_id
771: ,p_lot_number => l_lot_number
772: ,x_return_status => x_return_status) THEN
773: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
774: x_return_status := FND_API.G_RET_STS_ERROR;
775: END IF;
776: RAISE error_validate;
777: END IF;
778:

Line 784: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN

780:
781: IF NOT validate_reason_id
782: (p_reason_id => p_pending_product_lots_rec.reason_id
783: ,x_return_status => x_return_status) THEN
784: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
785: x_return_status := FND_API.G_RET_STS_ERROR;
786: END IF;
787: RAISE error_validate;
788: END IF;

Line 785: x_return_status := FND_API.G_RET_STS_ERROR;

781: IF NOT validate_reason_id
782: (p_reason_id => p_pending_product_lots_rec.reason_id
783: ,x_return_status => x_return_status) THEN
784: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
785: x_return_status := FND_API.G_RET_STS_ERROR;
786: END IF;
787: RAISE error_validate;
788: END IF;
789:

Line 802: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN

798: ,p_revision => x_pending_product_lots_rec.revision
799: ,p_dtl_qty => l_dtl_qty
800: ,p_sec_qty => l_sec_qty
801: ,x_return_status => x_return_status) THEN
802: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
803: x_return_status := FND_API.G_RET_STS_ERROR;
804: END IF;
805: RAISE error_validate;
806: END IF;

Line 803: x_return_status := FND_API.G_RET_STS_ERROR;

799: ,p_dtl_qty => l_dtl_qty
800: ,p_sec_qty => l_sec_qty
801: ,x_return_status => x_return_status) THEN
802: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
803: x_return_status := FND_API.G_RET_STS_ERROR;
804: END IF;
805: RAISE error_validate;
806: END IF;
807:

Line 833: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

829: IF g_debug <= gme_debug.g_log_unexpected THEN
830: gme_debug.put_line('When others exception in '||g_pkg_name||'.'||l_api_name||' Error is ' || SQLERRM);
831: END IF;
832: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
833: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
834: END validate_record_for_create;
835:
836: PROCEDURE validate_material_for_update
837: (p_batch_header_rec IN gme_batch_header%ROWTYPE

Line 848: x_return_status := FND_API.G_RET_STS_SUCCESS;

844:
845: IF g_debug <= gme_debug.g_log_procedure THEN
846: gme_debug.put_line('Entering api '||g_pkg_name||'.'||l_api_name);
847: END IF;
848: x_return_status := FND_API.G_RET_STS_SUCCESS;
849:
850: IF g_debug <= gme_debug.g_log_procedure THEN
851: gme_debug.put_line('Exiting api '||g_pkg_name||'.'||l_api_name);
852: END IF;

Line 860: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

856: IF g_debug <= gme_debug.g_log_unexpected THEN
857: gme_debug.put_line('When others exception in '||g_pkg_name||'.'||l_api_name||' Error is ' || SQLERRM);
858: END IF;
859: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
860: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
861: END validate_material_for_update;
862:
863: PROCEDURE validate_record_for_update
864: (p_material_detail_rec IN gme_material_details%ROWTYPE

Line 892: x_return_status := FND_API.G_RET_STS_SUCCESS;

888:
889: IF g_debug <= gme_debug.g_log_procedure THEN
890: gme_debug.put_line('Entering api '||g_pkg_name||'.'||l_api_name);
891: END IF;
892: x_return_status := FND_API.G_RET_STS_SUCCESS;
893:
894:
895: IF p_db_pending_product_lots_rec.pending_product_lot_id IS NOT NULL THEN
896: l_db_pending_product_lots_rec := p_db_pending_product_lots_rec;

Line 928: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

924: ,p_item_id => p_material_detail_rec.inventory_item_id
925: ,x_item_rec => l_item_rec
926: ,x_return_status => x_return_status);
927:
928: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
929: RAISE error_get_item;
930: END IF;
931:
932: -- Validate following fields:

Line 945: IF l_sequence = fnd_api.g_miss_num THEN

941:
942: -- l_sequence is set above because if passed in for retrieval, then it shouldn't be
943: -- looked at for change, if pplot_id is passed in, then look at sequence for update
944:
945: IF l_sequence = fnd_api.g_miss_num THEN
946: l_sequence := get_last_sequence
947: (p_matl_dtl_id => p_material_detail_rec.material_detail_id
948: ,x_return_status => x_return_status);
949: l_sequence := l_sequence + g_sequence_increment;

Line 957: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN

953: IF NOT validate_sequence
954: (p_matl_dtl_rec => p_material_detail_rec
955: ,p_sequence => l_sequence
956: ,x_return_status => x_return_status) THEN
957: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
958: x_return_status := FND_API.G_RET_STS_ERROR;
959: END IF;
960: RAISE error_validate;
961: END IF;

Line 958: x_return_status := FND_API.G_RET_STS_ERROR;

954: (p_matl_dtl_rec => p_material_detail_rec
955: ,p_sequence => l_sequence
956: ,x_return_status => x_return_status) THEN
957: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
958: x_return_status := FND_API.G_RET_STS_ERROR;
959: END IF;
960: RAISE error_validate;
961: END IF;
962: x_pending_product_lots_rec.sequence := l_sequence;

Line 967: IF p_pending_product_lots_rec.revision = fnd_api.g_miss_char THEN

963: ELSE
964: x_pending_product_lots_rec.sequence := l_db_pending_product_lots_rec.sequence;
965: END IF;
966:
967: IF p_pending_product_lots_rec.revision = fnd_api.g_miss_char THEN
968: x_pending_product_lots_rec.revision := NULL;
969: ELSIF p_pending_product_lots_rec.revision IS NOT NULL THEN
970: IF NOT validate_revision
971: (p_item_rec => l_item_rec

Line 974: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN

970: IF NOT validate_revision
971: (p_item_rec => l_item_rec
972: ,p_revision => p_pending_product_lots_rec.revision
973: ,x_return_status => x_return_status) THEN
974: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
975: x_return_status := FND_API.G_RET_STS_ERROR;
976: END IF;
977: RAISE error_validate;
978: END IF;

Line 975: x_return_status := FND_API.G_RET_STS_ERROR;

971: (p_item_rec => l_item_rec
972: ,p_revision => p_pending_product_lots_rec.revision
973: ,x_return_status => x_return_status) THEN
974: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
975: x_return_status := FND_API.G_RET_STS_ERROR;
976: END IF;
977: RAISE error_validate;
978: END IF;
979:

Line 985: IF p_pending_product_lots_rec.lot_number = fnd_api.g_miss_char THEN

981: ELSE
982: x_pending_product_lots_rec.revision := l_db_pending_product_lots_rec.revision;
983: END IF;
984:
985: IF p_pending_product_lots_rec.lot_number = fnd_api.g_miss_char THEN
986: x_pending_product_lots_rec.lot_number := NULL;
987: IF NOT validate_lot_number
988: (p_inv_item_id => p_material_detail_rec.inventory_item_id
989: ,p_org_id => p_material_detail_rec.organization_id

Line 992: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN

988: (p_inv_item_id => p_material_detail_rec.inventory_item_id
989: ,p_org_id => p_material_detail_rec.organization_id
990: ,p_lot_number => x_pending_product_lots_rec.lot_number
991: ,x_return_status => x_return_status) THEN
992: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
993: x_return_status := FND_API.G_RET_STS_ERROR;
994: END IF;
995: RAISE error_validate;
996: END IF;

Line 993: x_return_status := FND_API.G_RET_STS_ERROR;

989: ,p_org_id => p_material_detail_rec.organization_id
990: ,p_lot_number => x_pending_product_lots_rec.lot_number
991: ,x_return_status => x_return_status) THEN
992: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
993: x_return_status := FND_API.G_RET_STS_ERROR;
994: END IF;
995: RAISE error_validate;
996: END IF;
997: ELSIF p_pending_product_lots_rec.lot_number IS NOT NULL THEN

Line 1003: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN

999: (p_inv_item_id => p_material_detail_rec.inventory_item_id
1000: ,p_org_id => p_material_detail_rec.organization_id
1001: ,p_lot_number => p_pending_product_lots_rec.lot_number
1002: ,x_return_status => x_return_status) THEN
1003: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
1004: x_return_status := FND_API.G_RET_STS_ERROR;
1005: END IF;
1006: RAISE error_validate;
1007: END IF;

Line 1004: x_return_status := FND_API.G_RET_STS_ERROR;

1000: ,p_org_id => p_material_detail_rec.organization_id
1001: ,p_lot_number => p_pending_product_lots_rec.lot_number
1002: ,x_return_status => x_return_status) THEN
1003: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
1004: x_return_status := FND_API.G_RET_STS_ERROR;
1005: END IF;
1006: RAISE error_validate;
1007: END IF;
1008: x_pending_product_lots_rec.lot_number := p_pending_product_lots_rec.lot_number;

Line 1013: IF p_pending_product_lots_rec.reason_id = fnd_api.g_miss_num THEN

1009: ELSE
1010: x_pending_product_lots_rec.lot_number := l_db_pending_product_lots_rec.lot_number;
1011: END IF;
1012:
1013: IF p_pending_product_lots_rec.reason_id = fnd_api.g_miss_num THEN
1014: x_pending_product_lots_rec.reason_id := NULL;
1015: ELSIF p_pending_product_lots_rec.reason_id IS NOT NULL THEN
1016: IF NOT validate_reason_id
1017: (p_reason_id => p_pending_product_lots_rec.reason_id

Line 1019: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN

1015: ELSIF p_pending_product_lots_rec.reason_id IS NOT NULL THEN
1016: IF NOT validate_reason_id
1017: (p_reason_id => p_pending_product_lots_rec.reason_id
1018: ,x_return_status => x_return_status) THEN
1019: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
1020: x_return_status := FND_API.G_RET_STS_ERROR;
1021: END IF;
1022: RAISE error_validate;
1023: END IF;

Line 1020: x_return_status := FND_API.G_RET_STS_ERROR;

1016: IF NOT validate_reason_id
1017: (p_reason_id => p_pending_product_lots_rec.reason_id
1018: ,x_return_status => x_return_status) THEN
1019: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
1020: x_return_status := FND_API.G_RET_STS_ERROR;
1021: END IF;
1022: RAISE error_validate;
1023: END IF;
1024: x_pending_product_lots_rec.reason_id := p_pending_product_lots_rec.reason_id;

Line 1029: IF p_pending_product_lots_rec.quantity = fnd_api.g_miss_num THEN

1025: ELSE
1026: x_pending_product_lots_rec.reason_id := l_db_pending_product_lots_rec.reason_id;
1027: END IF;
1028:
1029: IF p_pending_product_lots_rec.quantity = fnd_api.g_miss_num THEN
1030: l_dtl_qty := NULL;
1031: ELSIF p_pending_product_lots_rec.quantity IS NOT NULL THEN
1032: l_dtl_qty := p_pending_product_lots_rec.quantity;
1033: ELSE

Line 1037: IF p_pending_product_lots_rec.secondary_quantity = fnd_api.g_miss_num THEN

1033: ELSE
1034: l_dtl_qty := l_db_pending_product_lots_rec.quantity;
1035: END IF;
1036:
1037: IF p_pending_product_lots_rec.secondary_quantity = fnd_api.g_miss_num THEN
1038: l_sec_qty := NULL;
1039: ELSIF p_pending_product_lots_rec.quantity IS NOT NULL THEN
1040: l_sec_qty := p_pending_product_lots_rec.secondary_quantity;
1041: ELSE

Line 1052: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN

1048: ,p_revision => x_pending_product_lots_rec.revision
1049: ,p_dtl_qty => l_dtl_qty
1050: ,p_sec_qty => l_sec_qty
1051: ,x_return_status => x_return_status) THEN
1052: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
1053: x_return_status := FND_API.G_RET_STS_ERROR;
1054: END IF;
1055: RAISE error_validate;
1056: END IF;

Line 1053: x_return_status := FND_API.G_RET_STS_ERROR;

1049: ,p_dtl_qty => l_dtl_qty
1050: ,p_sec_qty => l_sec_qty
1051: ,x_return_status => x_return_status) THEN
1052: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
1053: x_return_status := FND_API.G_RET_STS_ERROR;
1054: END IF;
1055: RAISE error_validate;
1056: END IF;
1057:

Line 1070: x_return_status := fnd_api.g_ret_sts_unexp_error;

1066: WHEN error_validate OR error_get_item THEN
1067: NULL;
1068: WHEN error_fetch_row THEN
1069: -- error message set in fetch routine
1070: x_return_status := fnd_api.g_ret_sts_unexp_error;
1071: WHEN OTHERS THEN
1072: IF g_debug <= gme_debug.g_log_unexpected THEN
1073: gme_debug.put_line('When others exception in '||g_pkg_name||'.'||l_api_name||' Error is ' || SQLERRM);
1074: END IF;

Line 1076: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

1072: IF g_debug <= gme_debug.g_log_unexpected THEN
1073: gme_debug.put_line('When others exception in '||g_pkg_name||'.'||l_api_name||' Error is ' || SQLERRM);
1074: END IF;
1075: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
1076: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1077: END validate_record_for_update;
1078:
1079: PROCEDURE validate_material_for_delete
1080: (p_batch_header_rec IN gme_batch_header%ROWTYPE

Line 1091: x_return_status := FND_API.G_RET_STS_SUCCESS;

1087:
1088: IF g_debug <= gme_debug.g_log_procedure THEN
1089: gme_debug.put_line('Entering api '||g_pkg_name||'.'||l_api_name);
1090: END IF;
1091: x_return_status := FND_API.G_RET_STS_SUCCESS;
1092:
1093: IF g_debug <= gme_debug.g_log_procedure THEN
1094: gme_debug.put_line('Exiting api '||g_pkg_name||'.'||l_api_name);
1095: END IF;

Line 1103: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

1099: IF g_debug <= gme_debug.g_log_unexpected THEN
1100: gme_debug.put_line('When others exception in '||g_pkg_name||'.'||l_api_name||' Error is ' || SQLERRM);
1101: END IF;
1102: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
1103: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1104: END validate_material_for_delete;
1105:
1106: PROCEDURE validate_record_for_delete
1107: (p_material_detail_rec IN gme_material_details%ROWTYPE

Line 1124: x_return_status := FND_API.G_RET_STS_SUCCESS;

1120:
1121: IF g_debug <= gme_debug.g_log_procedure THEN
1122: gme_debug.put_line('Entering api '||g_pkg_name||'.'||l_api_name);
1123: END IF;
1124: x_return_status := FND_API.G_RET_STS_SUCCESS;
1125:
1126: IF p_db_pending_product_lots_rec.pending_product_lot_id IS NOT NULL THEN
1127: x_pending_product_lots_rec := p_db_pending_product_lots_rec;
1128: ELSE

Line 1147: x_return_status := fnd_api.g_ret_sts_unexp_error;

1143:
1144: EXCEPTION
1145: WHEN error_fetch_row THEN
1146: -- error message set in fetch routine
1147: x_return_status := fnd_api.g_ret_sts_unexp_error;
1148: WHEN OTHERS THEN
1149: IF g_debug <= gme_debug.g_log_unexpected THEN
1150: gme_debug.put_line('When others exception in '||g_pkg_name||'.'||l_api_name||' Error is ' || SQLERRM);
1151: END IF;

Line 1153: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

1149: IF g_debug <= gme_debug.g_log_unexpected THEN
1150: gme_debug.put_line('When others exception in '||g_pkg_name||'.'||l_api_name||' Error is ' || SQLERRM);
1151: END IF;
1152: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
1153: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1154: END validate_record_for_delete;
1155:
1156: -- Call this procedure at the record level because fields besides lot number are required
1157: FUNCTION validate_quantities

Line 1203: x_return_status := FND_API.G_RET_STS_SUCCESS;

1199: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_revision='||p_revision);
1200: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_dtl_qty='||p_dtl_qty);
1201: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_sec_qty='||p_sec_qty);
1202: END IF;
1203: x_return_status := FND_API.G_RET_STS_SUCCESS;
1204:
1205: IF p_matl_dtl_rec.line_type = gme_common_pvt.g_line_type_prod THEN
1206: l_transaction_type_id := GME_COMMON_PVT.g_prod_completion;
1207: ELSIF p_matl_dtl_rec.line_type = gme_common_pvt.g_line_type_byprod THEN

Line 1232: ,p_init_msg_list => FND_API.G_FALSE

1228: END IF;
1229:
1230: l_return := INV_LOT_API_PUB.validate_quantities
1231: (p_api_version => 1.0
1232: ,p_init_msg_list => FND_API.G_FALSE
1233: ,p_transaction_type_id => l_transaction_type_id
1234: ,p_organization_id => p_matl_dtl_rec.organization_id
1235: ,p_inventory_item_id => p_matl_dtl_rec.inventory_item_id
1236: ,p_revision => p_revision

Line 1250: IF NOT l_return OR l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

1246: ,x_return_status => l_return_status
1247: ,x_msg_count => l_msg_count
1248: ,x_msg_data => l_msg_data);
1249:
1250: IF NOT l_return OR l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1251: x_return_status := l_return_status;
1252: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
1253: gme_debug.put_line ( g_pkg_name||'.'||l_api_name||' error returned from INV_LOT_API_PUB.validate_quantities with return status='||l_return_status);
1254: gme_debug.put_line ( g_pkg_name||'.'||l_api_name||' l_msg_count='||l_msg_count);

Line 1300: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

1296: WHEN error_um_conv THEN
1297: FND_MESSAGE.SET_NAME('INV','INV_NO_CONVERSION_ERR');
1298: FND_MESSAGE.SET_TOKEN('PGM_NAME',g_pkg_name||'.'||l_api_name);
1299: fnd_msg_pub.ADD;
1300: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1301: RETURN FALSE;
1302: WHEN OTHERS THEN
1303: IF g_debug <= gme_debug.g_log_unexpected THEN
1304: gme_debug.put_line('When others exception in '||g_pkg_name||'.'||l_api_name||' Error is ' || SQLERRM);

Line 1307: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

1303: IF g_debug <= gme_debug.g_log_unexpected THEN
1304: gme_debug.put_line('When others exception in '||g_pkg_name||'.'||l_api_name||' Error is ' || SQLERRM);
1305: END IF;
1306: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
1307: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1308: RETURN FALSE;
1309: END validate_quantities;
1310:
1311: FUNCTION validate_lot_number (p_inv_item_id IN NUMBER

Line 1336: x_return_status := FND_API.G_RET_STS_SUCCESS;

1332:
1333: IF g_debug <= gme_debug.g_log_procedure THEN
1334: gme_debug.put_line('Entering function '||g_pkg_name||'.'||l_api_name);
1335: END IF;
1336: x_return_status := FND_API.G_RET_STS_SUCCESS;
1337:
1338: OPEN check_lot_exists(p_inv_item_id, p_org_id, p_lot_number);
1339: FETCH check_lot_exists INTO l_exists;
1340: CLOSE check_lot_exists;

Line 1363: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

1359: IF g_debug <= gme_debug.g_log_unexpected THEN
1360: gme_debug.put_line('When others exception in '||g_pkg_name||'.'||l_api_name||' Error is ' || SQLERRM);
1361: END IF;
1362: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
1363: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1364: RETURN FALSE;
1365: END validate_lot_number;
1366:
1367: FUNCTION validate_sequence (p_matl_dtl_rec IN gme_material_details%ROWTYPE

Line 1391: x_return_status := FND_API.G_RET_STS_SUCCESS;

1387:
1388: IF g_debug <= gme_debug.g_log_procedure THEN
1389: gme_debug.put_line('Entering function '||g_pkg_name||'.'||l_api_name);
1390: END IF;
1391: x_return_status := FND_API.G_RET_STS_SUCCESS;
1392:
1393: IF p_sequence IS NULL THEN
1394: gme_common_pvt.log_message ('GME_FIELD_VALUE_REQUIRED'
1395: ,'FIELD_NAME'

Line 1425: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

1421: IF g_debug <= gme_debug.g_log_unexpected THEN
1422: gme_debug.put_line('When others exception in '||g_pkg_name||'.'||l_api_name||' Error is ' || SQLERRM);
1423: END IF;
1424: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
1425: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1426: RETURN FALSE;
1427: END validate_sequence;
1428:
1429: FUNCTION validate_revision (p_item_rec IN mtl_system_items_b%ROWTYPE

Line 1446: x_return_status := FND_API.G_RET_STS_SUCCESS;

1442:
1443: IF g_debug <= gme_debug.g_log_procedure THEN
1444: gme_debug.put_line('Entering function '||g_pkg_name||'.'||l_api_name);
1445: END IF;
1446: x_return_status := FND_API.G_RET_STS_SUCCESS;
1447: /* Bug 4866553 Corrected API call */
1448: gme_material_detail_pvt.validate_revision
1449: (p_revision => p_revision
1450: ,p_item_rec => p_item_rec

Line 1453: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

1449: (p_revision => p_revision
1450: ,p_item_rec => p_item_rec
1451: ,x_return_status => x_return_status);
1452:
1453: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1454: -- error message set in gme_material_detail_pvt.validate_revision
1455: l_return := FALSE;
1456: ELSE
1457: l_return := TRUE;

Line 1472: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

1468: IF g_debug <= gme_debug.g_log_unexpected THEN
1469: gme_debug.put_line('When others exception in '||g_pkg_name||'.'||l_api_name||' Error is ' || SQLERRM);
1470: END IF;
1471: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
1472: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1473: RETURN FALSE;
1474: END validate_revision;
1475:
1476: FUNCTION validate_reason_id(p_reason_id IN NUMBER

Line 1494: x_return_status := FND_API.G_RET_STS_SUCCESS;

1490: BEGIN
1491: IF g_debug <= gme_debug.g_log_procedure THEN
1492: gme_debug.put_line('Entering function '||g_pkg_name||'.'||l_api_name);
1493: END IF;
1494: x_return_status := FND_API.G_RET_STS_SUCCESS;
1495:
1496: IF p_reason_id IS NULL THEN
1497: -- NULL is valid...
1498: return TRUE;

Line 1525: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

1521: IF g_debug <= gme_debug.g_log_unexpected THEN
1522: gme_debug.put_line('When others exception in '||g_pkg_name||'.'||l_api_name||' Error is ' || SQLERRM);
1523: END IF;
1524: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
1525: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1526: RETURN FALSE;
1527: END validate_reason_id;
1528:
1529: FUNCTION pending_product_lot_exist

Line 1591: x_return_status := fnd_api.g_ret_sts_success;

1587: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'
1588: || l_api_name);
1589: END IF;
1590:
1591: x_return_status := fnd_api.g_ret_sts_success;
1592: x_pnd_prod_lot_qty := 0;
1593:
1594: get_pending_lot(p_material_detail_id => p_mtl_dtl_id
1595: ,x_return_status => x_return_status

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

1594: get_pending_lot(p_material_detail_id => p_mtl_dtl_id
1595: ,x_return_status => x_return_status
1596: ,x_pending_product_lot_tbl => l_pnd_prod_lot_tbl);
1597:
1598: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN
1599: RAISE get_pending_lot_error;
1600: END IF;
1601:
1602: FOR i IN 1 .. l_pnd_prod_lot_tbl.COUNT LOOP

Line 1611: x_return_status := fnd_api.g_ret_sts_unexp_error;

1607: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);
1608: END IF;
1609: EXCEPTION
1610: WHEN get_pending_lot_error THEN
1611: x_return_status := fnd_api.g_ret_sts_unexp_error;
1612: WHEN OTHERS THEN
1613: IF g_debug <= gme_debug.g_log_unexpected THEN
1614: gme_debug.put_line ( 'When others exception in '
1615: || g_pkg_name

Line 1623: x_return_status := fnd_api.g_ret_sts_unexp_error;

1619: || SQLERRM);
1620: END IF;
1621:
1622: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
1623: x_return_status := fnd_api.g_ret_sts_unexp_error;
1624: END get_pnd_prod_lot_qty;
1625:
1626: END gme_pending_product_lots_pvt;