DBA Data[Home] [Help]

APPS.GME_PENDING_PRODUCT_LOTS_PVT dependencies on FND_API

Line 43: x_return_status := FND_API.G_RET_STS_SUCCESS;

39: BEGIN
40: IF g_debug <= gme_debug.g_log_procedure THEN
41: gme_debug.put_line('Entering api '||g_pkg_name||'.'||l_api_name);
42: END IF;
43: x_return_status := FND_API.G_RET_STS_SUCCESS;
44:
45: OPEN cur_get_lots(p_material_detail_id);
46: FETCH cur_get_lots BULK COLLECT INTO x_pending_product_lot_tbl;
47: CLOSE cur_get_lots;

Line 58: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

54: IF g_debug <= gme_debug.g_log_unexpected THEN
55: gme_debug.put_line('When others exception in '||g_pkg_name||'.'||l_api_name||' Error is ' || SQLERRM);
56: END IF;
57: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
58: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
59: END get_pending_lot;
60:
61: PROCEDURE relieve_pending_lot
62: (p_pending_lot_id IN NUMBER

Line 83: x_return_status := FND_API.G_RET_STS_SUCCESS;

79: BEGIN
80: IF g_debug <= gme_debug.g_log_procedure THEN
81: gme_debug.put_line('Entering api '||g_pkg_name||'.'||l_api_name);
82: END IF;
83: x_return_status := FND_API.G_RET_STS_SUCCESS;
84:
85: OPEN cur_get_pending_lot_qty(p_pending_lot_id);
86: FETCH cur_get_pending_lot_qty INTO l_qty, l_sec_qty;
87: CLOSE cur_get_pending_lot_qty;

Line 97: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

93: l_pending_product_lots_rec.pending_product_lot_id := p_pending_lot_id;
94: delete_pending_product_lot( p_pending_product_lots_rec => l_pending_product_lots_rec
95: ,x_return_status => l_return_status
96: );
97: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
98: RAISE error_delete_row;
99: END IF;
100:
101: /*UPDATE gme_pending_product_lots

Line 140: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

136: IF g_debug <= gme_debug.g_log_unexpected THEN
137: gme_debug.put_line('When others exception in '||g_pkg_name||'.'||l_api_name||' Error is ' || SQLERRM);
138: END IF;
139: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
140: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
141: END relieve_pending_lot;
142:
143: PROCEDURE create_product_lot
144: (p_organization_id IN NUMBER

Line 203: x_return_status := FND_API.G_RET_STS_SUCCESS;

199: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_generate_lot= '||p_generate_lot);
200: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_generate_parent_lot= '||p_generate_parent_lot);
201: END IF;
202:
203: x_return_status := FND_API.G_RET_STS_SUCCESS;
204:
205: x_mmli_tbl := p_mmli_tbl;
206:
207: IF p_generate_lot = fnd_api.g_false THEN

Line 207: IF p_generate_lot = fnd_api.g_false THEN

203: x_return_status := FND_API.G_RET_STS_SUCCESS;
204:
205: x_mmli_tbl := p_mmli_tbl;
206:
207: IF p_generate_lot = fnd_api.g_false THEN
208: l_null_lot_number := FALSE;
209:
210: FOR i in 1..x_mmli_tbl.count LOOP
211: IF x_mmli_tbl(i).lot_number IS NULL THEN

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

223: END IF;
224:
225: l_parent_lot := p_parent_lot;
226:
227: IF p_generate_parent_lot = fnd_api.g_true AND p_parent_lot IS NULL THEN
228: l_parent_lot :=
229: inv_lot_api_pub.auto_gen_lot
230: (p_org_id => p_organization_id
231: ,p_inventory_item_id => p_inventory_item_id

Line 246: ,p_init_msg_list => fnd_api.g_false

242: ,p_transaction_action_id => NULL
243: ,p_transaction_source_type_id => NULL
244: ,p_lot_number => NULL
245: ,p_api_version => 1.0
246: ,p_init_msg_list => fnd_api.g_false
247: ,p_commit => fnd_api.g_false
248: ,p_validation_level => NULL
249: ,p_parent_lot_number => NULL
250: ,x_return_status => x_return_status

Line 247: ,p_commit => fnd_api.g_false

243: ,p_transaction_source_type_id => NULL
244: ,p_lot_number => NULL
245: ,p_api_version => 1.0
246: ,p_init_msg_list => fnd_api.g_false
247: ,p_commit => fnd_api.g_false
248: ,p_validation_level => NULL
249: ,p_parent_lot_number => NULL
250: ,x_return_status => x_return_status
251: ,x_msg_count => l_msg_count

Line 254: IF x_return_status <> fnd_api.g_ret_sts_success THEN

250: ,x_return_status => x_return_status
251: ,x_msg_count => l_msg_count
252: ,x_msg_data => l_msg_data);
253:
254: IF x_return_status <> fnd_api.g_ret_sts_success THEN
255: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
256: gme_debug.put_line (g_pkg_name||'.'||l_api_name
257: ||'auto_gen_lot for parent returned '
258: || x_return_status);

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

266: || ':'
267: || 'l_parent_lot= '
268: || l_parent_lot);
269: END IF;
270: END IF; -- IF p_generate_parent_lot = fnd_api.g_true AND p_parent_lot IS NULL THEN
271:
272: FOR i IN 1 .. x_mmli_tbl.COUNT LOOP
273: IF x_mmli_tbl (i).lot_number IS NULL THEN
274: x_mmli_tbl (i).lot_number := inv_lot_api_pub.auto_gen_lot

Line 291: ,p_init_msg_list => fnd_api.g_false

287: ,p_transaction_action_id => NULL
288: ,p_transaction_source_type_id => NULL
289: ,p_lot_number => NULL
290: ,p_api_version => 1.0
291: ,p_init_msg_list => fnd_api.g_false
292: ,p_commit => fnd_api.g_false
293: ,p_validation_level => NULL
294: ,p_parent_lot_number => l_parent_lot
295: ,x_return_status => x_return_status

Line 292: ,p_commit => fnd_api.g_false

288: ,p_transaction_source_type_id => NULL
289: ,p_lot_number => NULL
290: ,p_api_version => 1.0
291: ,p_init_msg_list => fnd_api.g_false
292: ,p_commit => fnd_api.g_false
293: ,p_validation_level => NULL
294: ,p_parent_lot_number => l_parent_lot
295: ,x_return_status => x_return_status
296: ,x_msg_count => l_msg_count

Line 299: IF x_return_status <> fnd_api.g_ret_sts_success THEN

295: ,x_return_status => x_return_status
296: ,x_msg_count => l_msg_count
297: ,x_msg_data => l_msg_data);
298:
299: IF x_return_status <> fnd_api.g_ret_sts_success THEN
300: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
301: gme_debug.put_line (g_pkg_name||'.'||l_api_name
302: ||'auto_gen_lot'
303: || ':'

Line 359: ,p_init_msg_list => fnd_api.g_true

355: ,x_lot_rec => l_lot_rec
356: ,p_lot_rec => l_in_lot_rec
357: ,p_source => l_source
358: ,p_api_version => l_api_version
359: ,p_init_msg_list => fnd_api.g_true
360: ,p_commit => fnd_api.g_false
361: ,p_validation_level => fnd_api.g_valid_level_full
362: ,p_origin_txn_id => 1);
363:

Line 360: ,p_commit => fnd_api.g_false

356: ,p_lot_rec => l_in_lot_rec
357: ,p_source => l_source
358: ,p_api_version => l_api_version
359: ,p_init_msg_list => fnd_api.g_true
360: ,p_commit => fnd_api.g_false
361: ,p_validation_level => fnd_api.g_valid_level_full
362: ,p_origin_txn_id => 1);
363:
364: IF x_return_status <> fnd_api.g_ret_sts_success THEN

Line 361: ,p_validation_level => fnd_api.g_valid_level_full

357: ,p_source => l_source
358: ,p_api_version => l_api_version
359: ,p_init_msg_list => fnd_api.g_true
360: ,p_commit => fnd_api.g_false
361: ,p_validation_level => fnd_api.g_valid_level_full
362: ,p_origin_txn_id => 1);
363:
364: IF x_return_status <> fnd_api.g_ret_sts_success THEN
365: RAISE error_lot_create;

Line 364: IF x_return_status <> fnd_api.g_ret_sts_success THEN

360: ,p_commit => fnd_api.g_false
361: ,p_validation_level => fnd_api.g_valid_level_full
362: ,p_origin_txn_id => 1);
363:
364: IF x_return_status <> fnd_api.g_ret_sts_success THEN
365: RAISE error_lot_create;
366: END IF;
367:
368: x_mmli_tbl (i).parent_lot_number := l_parent_lot;

Line 383: x_return_status := fnd_api.g_ret_sts_error;

379: EXCEPTION
380: WHEN error_get_item_rec OR error_gen_parent_lot OR error_gen_lot THEN
381: NULL;
382: WHEN error_not_prod OR error_lot_create OR error_gen_lot_no_create OR error_null_lots OR error_null_exp_dt THEN
383: x_return_status := fnd_api.g_ret_sts_error;
384: WHEN OTHERS THEN
385: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
386: IF (NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT) THEN
387: gme_debug.put_line ('Unexpected error: '||g_pkg_name||'.'||l_api_name||': '||SQLERRM);

Line 389: x_return_status := FND_API.g_ret_sts_unexp_error;

385: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
386: IF (NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT) THEN
387: gme_debug.put_line ('Unexpected error: '||g_pkg_name||'.'||l_api_name||': '||SQLERRM);
388: END IF;
389: x_return_status := FND_API.g_ret_sts_unexp_error;
390:
391: END create_product_lot;
392:
393: PROCEDURE create_pending_product_lot

Line 408: x_return_status := FND_API.G_RET_STS_SUCCESS;

404:
405: IF g_debug <= gme_debug.g_log_procedure THEN
406: gme_debug.put_line('Entering api '||g_pkg_name||'.'||l_api_name);
407: END IF;
408: x_return_status := FND_API.G_RET_STS_SUCCESS;
409:
410: IF NOT gme_pending_product_lots_dbl.insert_row
411: (p_pending_product_lots_rec => p_pending_product_lots_rec
412: ,x_pending_product_lots_rec => l_pp_lot_rec) THEN

Line 425: x_return_status := FND_API.g_ret_sts_unexp_error;

421:
422: EXCEPTION
423: WHEN error_insert_row THEN
424: gme_common_pvt.log_message ('GME_UNEXPECTED_ERROR', 'ERROR', SQLERRM);
425: x_return_status := FND_API.g_ret_sts_unexp_error;
426: WHEN OTHERS THEN
427: IF g_debug <= gme_debug.g_log_unexpected THEN
428: gme_debug.put_line('When others exception in '||g_pkg_name||'.'||l_api_name||' Error is ' || SQLERRM);
429: END IF;

Line 431: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

427: IF g_debug <= gme_debug.g_log_unexpected THEN
428: gme_debug.put_line('When others exception in '||g_pkg_name||'.'||l_api_name||' Error is ' || SQLERRM);
429: END IF;
430: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
431: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
432: END create_pending_product_lot;
433:
434: PROCEDURE update_pending_product_lot
435: (p_pending_product_lots_rec IN gme_pending_product_lots%ROWTYPE

Line 448: x_return_status := FND_API.G_RET_STS_SUCCESS;

444:
445: IF g_debug <= gme_debug.g_log_procedure THEN
446: gme_debug.put_line('Entering api '||g_pkg_name||'.'||l_api_name);
447: END IF;
448: x_return_status := FND_API.G_RET_STS_SUCCESS;
449:
450: IF NOT gme_pending_product_lots_dbl.update_row
451: (p_pending_product_lots_rec => p_pending_product_lots_rec) THEN
452: RAISE error_update_row;

Line 468: x_return_status := fnd_api.g_ret_sts_unexp_error;

464:
465: EXCEPTION
466: WHEN error_update_row OR error_fetch_row THEN
467: -- error message set in fetch routine
468: x_return_status := fnd_api.g_ret_sts_unexp_error;
469: WHEN OTHERS THEN
470: IF g_debug <= gme_debug.g_log_unexpected THEN
471: gme_debug.put_line('When others exception in '||g_pkg_name||'.'||l_api_name||' Error is ' || SQLERRM);
472: END IF;

Line 474: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

470: IF g_debug <= gme_debug.g_log_unexpected THEN
471: gme_debug.put_line('When others exception in '||g_pkg_name||'.'||l_api_name||' Error is ' || SQLERRM);
472: END IF;
473: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
474: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
475: END update_pending_product_lot;
476:
477: PROCEDURE delete_pending_product_lot
478: (p_pending_product_lots_rec IN gme_pending_product_lots%ROWTYPE

Line 489: x_return_status := FND_API.G_RET_STS_SUCCESS;

485:
486: IF g_debug <= gme_debug.g_log_procedure THEN
487: gme_debug.put_line('Entering api '||g_pkg_name||'.'||l_api_name);
488: END IF;
489: x_return_status := FND_API.G_RET_STS_SUCCESS;
490:
491: IF NOT gme_pending_product_lots_dbl.delete_row
492: (p_pending_product_lots_rec => p_pending_product_lots_rec) THEN
493: RAISE error_delete_row;

Line 503: x_return_status := FND_API.g_ret_sts_unexp_error;

499:
500: EXCEPTION
501: WHEN error_delete_row THEN
502: gme_common_pvt.log_message ('GME_UNEXPECTED_ERROR', 'ERROR', SQLERRM);
503: x_return_status := FND_API.g_ret_sts_unexp_error;
504: WHEN OTHERS THEN
505: IF g_debug <= gme_debug.g_log_unexpected THEN
506: gme_debug.put_line('When others exception in '||g_pkg_name||'.'||l_api_name||' Error is ' || SQLERRM);
507: END IF;

Line 509: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

505: IF g_debug <= gme_debug.g_log_unexpected THEN
506: gme_debug.put_line('When others exception in '||g_pkg_name||'.'||l_api_name||' Error is ' || SQLERRM);
507: END IF;
508: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
509: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
510: END delete_pending_product_lot;
511:
512: --Bug#5078853 created the following over loaded procedure
513: PROCEDURE delete_pending_product_lot

Line 530: x_return_status := FND_API.G_RET_STS_SUCCESS;

526: BEGIN
527: IF g_debug <= gme_debug.g_log_procedure THEN
528: gme_debug.put_line('Entering api '||g_pkg_name||'.'||l_api_name);
529: END IF;
530: x_return_status := FND_API.G_RET_STS_SUCCESS;
531:
532: IF p_material_detail_id IS NOT NULL THEN
533: OPEN c_get_pending_lots;
534: LOOP

Line 554: x_return_status := FND_API.g_ret_sts_unexp_error;

550:
551: EXCEPTION
552: WHEN error_delete_row THEN
553: gme_common_pvt.log_message ('GME_UNEXPECTED_ERROR', 'ERROR', SQLERRM);
554: x_return_status := FND_API.g_ret_sts_unexp_error;
555: WHEN OTHERS THEN
556: IF g_debug <= gme_debug.g_log_unexpected THEN
557: gme_debug.put_line('When others exception in '||g_pkg_name||'.'||l_api_name||' Error is ' || SQLERRM);
558: END IF;

Line 560: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

556: IF g_debug <= gme_debug.g_log_unexpected THEN
557: gme_debug.put_line('When others exception in '||g_pkg_name||'.'||l_api_name||' Error is ' || SQLERRM);
558: END IF;
559: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
560: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
561: END delete_pending_product_lot;
562:
563: PROCEDURE validate_material_for_create
564: (p_batch_header_rec IN gme_batch_header%ROWTYPE

Line 581: x_return_status := FND_API.G_RET_STS_SUCCESS;

577:
578: IF g_debug <= gme_debug.g_log_procedure THEN
579: gme_debug.put_line('Entering api '||g_pkg_name||'.'||l_api_name);
580: END IF;
581: x_return_status := FND_API.G_RET_STS_SUCCESS;
582:
583: gme_material_detail_pvt.get_item_rec
584: (p_org_id => p_batch_header_rec.organization_id
585: ,p_item_id => p_material_detail_rec.inventory_item_id

Line 589: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

585: ,p_item_id => p_material_detail_rec.inventory_item_id
586: ,x_item_rec => l_item_rec
587: ,x_return_status => x_return_status);
588:
589: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
590: RAISE error_get_item_rec;
591: END IF;
592:
593: IF l_item_rec.lot_control_code = 1 THEN

Line 618: x_return_status := fnd_api.g_ret_sts_error;

614: END IF;
615:
616: EXCEPTION
617: WHEN error_not_lot_control OR error_no_lot_create THEN
618: x_return_status := fnd_api.g_ret_sts_error;
619: WHEN OTHERS THEN
620: IF g_debug <= gme_debug.g_log_unexpected THEN
621: gme_debug.put_line('When others exception in '||g_pkg_name||'.'||l_api_name||' Error is ' || SQLERRM);
622: END IF;

Line 624: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

620: IF g_debug <= gme_debug.g_log_unexpected THEN
621: gme_debug.put_line('When others exception in '||g_pkg_name||'.'||l_api_name||' Error is ' || SQLERRM);
622: END IF;
623: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
624: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
625: END validate_material_for_create;
626:
627: FUNCTION get_last_sequence
628: (p_matl_dtl_id IN NUMBER

Line 644: x_return_status := FND_API.G_RET_STS_SUCCESS;

640: BEGIN
641: IF g_debug <= gme_debug.g_log_procedure THEN
642: gme_debug.put_line('Entering function '||g_pkg_name||'.'||l_api_name);
643: END IF;
644: x_return_status := FND_API.G_RET_STS_SUCCESS;
645:
646: OPEN cur_get_sequ(p_matl_dtl_id);
647: FETCH cur_get_sequ INTO l_sequ;
648: CLOSE cur_get_sequ;

Line 662: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

658: IF g_debug <= gme_debug.g_log_unexpected THEN
659: gme_debug.put_line('When others exception in '||g_pkg_name||'.'||l_api_name||' Error is ' || SQLERRM);
660: END IF;
661: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
662: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
663: END get_last_sequence;
664:
665: PROCEDURE validate_record_for_create
666: (p_material_detail_rec IN gme_material_details%ROWTYPE

Line 697: x_return_status := FND_API.G_RET_STS_SUCCESS;

693:
694: IF g_debug <= gme_debug.g_log_procedure THEN
695: gme_debug.put_line('Entering api '||g_pkg_name||'.'||l_api_name);
696: END IF;
697: x_return_status := FND_API.G_RET_STS_SUCCESS;
698:
699: x_pending_product_lots_rec.batch_id := p_material_detail_rec.batch_id;
700: x_pending_product_lots_rec.material_detail_id := p_material_detail_rec.material_detail_id;
701:

Line 708: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

704: ,p_item_id => p_material_detail_rec.inventory_item_id
705: ,x_item_rec => l_item_rec
706: ,x_return_status => x_return_status);
707:
708: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
709: RAISE error_get_item;
710: END IF;
711:
712: -- Validate following fields:

Line 736: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN

732: IF NOT validate_sequence
733: (p_matl_dtl_rec => p_material_detail_rec
734: ,p_sequence => l_sequence
735: ,x_return_status => x_return_status) THEN
736: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
737: x_return_status := FND_API.G_RET_STS_ERROR;
738: END IF;
739: RAISE error_validate;
740: END IF;

Line 737: x_return_status := FND_API.G_RET_STS_ERROR;

733: (p_matl_dtl_rec => p_material_detail_rec
734: ,p_sequence => l_sequence
735: ,x_return_status => x_return_status) THEN
736: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
737: x_return_status := FND_API.G_RET_STS_ERROR;
738: END IF;
739: RAISE error_validate;
740: END IF;
741:

Line 748: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN

744: IF NOT validate_revision
745: (p_item_rec => l_item_rec
746: ,p_revision => p_pending_product_lots_rec.revision
747: ,x_return_status => x_return_status) THEN
748: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
749: x_return_status := FND_API.G_RET_STS_ERROR;
750: END IF;
751: RAISE error_validate;
752: END IF;

Line 749: x_return_status := FND_API.G_RET_STS_ERROR;

745: (p_item_rec => l_item_rec
746: ,p_revision => p_pending_product_lots_rec.revision
747: ,x_return_status => x_return_status) THEN
748: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
749: x_return_status := FND_API.G_RET_STS_ERROR;
750: END IF;
751: RAISE error_validate;
752: END IF;
753:

Line 759: p_create_lot = fnd_api.g_true THEN

755:
756: l_lot_number := p_pending_product_lots_rec.lot_number;
757:
758: IF p_material_detail_rec.line_type <> gme_common_pvt.g_line_type_ing AND
759: p_create_lot = fnd_api.g_true THEN
760: l_in_mmli_tbl(1).lot_number := p_pending_product_lots_rec.lot_number;
761:
762: create_product_lot
763: (p_organization_id => p_material_detail_rec.organization_id

Line 774: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

770: ,p_expiration_date => p_expiration_date
771: ,x_mmli_tbl => l_mmli_tbl
772: ,x_return_status => x_return_status);
773:
774: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
775: RAISE error_create_lot;
776: END IF;
777:
778: l_lot_number := l_mmli_tbl(1).lot_number;

Line 786: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN

782: (p_inv_item_id => p_material_detail_rec.inventory_item_id
783: ,p_org_id => p_material_detail_rec.organization_id
784: ,p_lot_number => l_lot_number
785: ,x_return_status => x_return_status) THEN
786: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
787: x_return_status := FND_API.G_RET_STS_ERROR;
788: END IF;
789: RAISE error_validate;
790: END IF;

Line 787: x_return_status := FND_API.G_RET_STS_ERROR;

783: ,p_org_id => p_material_detail_rec.organization_id
784: ,p_lot_number => l_lot_number
785: ,x_return_status => x_return_status) THEN
786: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
787: x_return_status := FND_API.G_RET_STS_ERROR;
788: END IF;
789: RAISE error_validate;
790: END IF;
791:

Line 797: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN

793:
794: IF NOT validate_reason_id
795: (p_reason_id => p_pending_product_lots_rec.reason_id
796: ,x_return_status => x_return_status) THEN
797: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
798: x_return_status := FND_API.G_RET_STS_ERROR;
799: END IF;
800: RAISE error_validate;
801: END IF;

Line 798: x_return_status := FND_API.G_RET_STS_ERROR;

794: IF NOT validate_reason_id
795: (p_reason_id => p_pending_product_lots_rec.reason_id
796: ,x_return_status => x_return_status) THEN
797: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
798: x_return_status := FND_API.G_RET_STS_ERROR;
799: END IF;
800: RAISE error_validate;
801: END IF;
802:

Line 815: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN

811: ,p_revision => x_pending_product_lots_rec.revision
812: ,p_dtl_qty => l_dtl_qty
813: ,p_sec_qty => l_sec_qty
814: ,x_return_status => x_return_status) THEN
815: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
816: x_return_status := FND_API.G_RET_STS_ERROR;
817: END IF;
818: RAISE error_validate;
819: END IF;

Line 816: x_return_status := FND_API.G_RET_STS_ERROR;

812: ,p_dtl_qty => l_dtl_qty
813: ,p_sec_qty => l_sec_qty
814: ,x_return_status => x_return_status) THEN
815: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
816: x_return_status := FND_API.G_RET_STS_ERROR;
817: END IF;
818: RAISE error_validate;
819: END IF;
820:

Line 846: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

842: IF g_debug <= gme_debug.g_log_unexpected THEN
843: gme_debug.put_line('When others exception in '||g_pkg_name||'.'||l_api_name||' Error is ' || SQLERRM);
844: END IF;
845: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
846: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
847: END validate_record_for_create;
848:
849: PROCEDURE validate_material_for_update
850: (p_batch_header_rec IN gme_batch_header%ROWTYPE

Line 861: x_return_status := FND_API.G_RET_STS_SUCCESS;

857:
858: IF g_debug <= gme_debug.g_log_procedure THEN
859: gme_debug.put_line('Entering api '||g_pkg_name||'.'||l_api_name);
860: END IF;
861: x_return_status := FND_API.G_RET_STS_SUCCESS;
862:
863: IF g_debug <= gme_debug.g_log_procedure THEN
864: gme_debug.put_line('Exiting api '||g_pkg_name||'.'||l_api_name);
865: END IF;

Line 873: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

869: IF g_debug <= gme_debug.g_log_unexpected THEN
870: gme_debug.put_line('When others exception in '||g_pkg_name||'.'||l_api_name||' Error is ' || SQLERRM);
871: END IF;
872: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
873: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
874: END validate_material_for_update;
875:
876: PROCEDURE validate_record_for_update
877: (p_material_detail_rec IN gme_material_details%ROWTYPE

Line 905: x_return_status := FND_API.G_RET_STS_SUCCESS;

901:
902: IF g_debug <= gme_debug.g_log_procedure THEN
903: gme_debug.put_line('Entering api '||g_pkg_name||'.'||l_api_name);
904: END IF;
905: x_return_status := FND_API.G_RET_STS_SUCCESS;
906:
907:
908: IF p_db_pending_product_lots_rec.pending_product_lot_id IS NOT NULL THEN
909: l_db_pending_product_lots_rec := p_db_pending_product_lots_rec;

Line 941: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

937: ,p_item_id => p_material_detail_rec.inventory_item_id
938: ,x_item_rec => l_item_rec
939: ,x_return_status => x_return_status);
940:
941: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
942: RAISE error_get_item;
943: END IF;
944:
945: -- Validate following fields:

Line 958: IF l_sequence = fnd_api.g_miss_num THEN

954:
955: -- l_sequence is set above because if passed in for retrieval, then it shouldn't be
956: -- looked at for change, if pplot_id is passed in, then look at sequence for update
957:
958: IF l_sequence = fnd_api.g_miss_num THEN
959: l_sequence := get_last_sequence
960: (p_matl_dtl_id => p_material_detail_rec.material_detail_id
961: ,x_return_status => x_return_status);
962: l_sequence := l_sequence + g_sequence_increment;

Line 970: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN

966: IF NOT validate_sequence
967: (p_matl_dtl_rec => p_material_detail_rec
968: ,p_sequence => l_sequence
969: ,x_return_status => x_return_status) THEN
970: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
971: x_return_status := FND_API.G_RET_STS_ERROR;
972: END IF;
973: RAISE error_validate;
974: END IF;

Line 971: x_return_status := FND_API.G_RET_STS_ERROR;

967: (p_matl_dtl_rec => p_material_detail_rec
968: ,p_sequence => l_sequence
969: ,x_return_status => x_return_status) THEN
970: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
971: x_return_status := FND_API.G_RET_STS_ERROR;
972: END IF;
973: RAISE error_validate;
974: END IF;
975: x_pending_product_lots_rec.sequence := l_sequence;

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

976: ELSE
977: x_pending_product_lots_rec.sequence := l_db_pending_product_lots_rec.sequence;
978: END IF;
979:
980: IF p_pending_product_lots_rec.revision = fnd_api.g_miss_char THEN
981: x_pending_product_lots_rec.revision := NULL;
982: ELSIF p_pending_product_lots_rec.revision IS NOT NULL THEN
983: IF NOT validate_revision
984: (p_item_rec => l_item_rec

Line 987: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN

983: IF NOT validate_revision
984: (p_item_rec => l_item_rec
985: ,p_revision => p_pending_product_lots_rec.revision
986: ,x_return_status => x_return_status) THEN
987: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
988: x_return_status := FND_API.G_RET_STS_ERROR;
989: END IF;
990: RAISE error_validate;
991: END IF;

Line 988: x_return_status := FND_API.G_RET_STS_ERROR;

984: (p_item_rec => l_item_rec
985: ,p_revision => p_pending_product_lots_rec.revision
986: ,x_return_status => x_return_status) THEN
987: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
988: x_return_status := FND_API.G_RET_STS_ERROR;
989: END IF;
990: RAISE error_validate;
991: END IF;
992:

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

994: ELSE
995: x_pending_product_lots_rec.revision := l_db_pending_product_lots_rec.revision;
996: END IF;
997:
998: IF p_pending_product_lots_rec.lot_number = fnd_api.g_miss_char THEN
999: x_pending_product_lots_rec.lot_number := NULL;
1000: IF NOT validate_lot_number
1001: (p_inv_item_id => p_material_detail_rec.inventory_item_id
1002: ,p_org_id => p_material_detail_rec.organization_id

Line 1005: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN

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

Line 1006: x_return_status := FND_API.G_RET_STS_ERROR;

1002: ,p_org_id => p_material_detail_rec.organization_id
1003: ,p_lot_number => x_pending_product_lots_rec.lot_number
1004: ,x_return_status => x_return_status) THEN
1005: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
1006: x_return_status := FND_API.G_RET_STS_ERROR;
1007: END IF;
1008: RAISE error_validate;
1009: END IF;
1010: ELSIF p_pending_product_lots_rec.lot_number IS NOT NULL THEN

Line 1016: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN

1012: (p_inv_item_id => p_material_detail_rec.inventory_item_id
1013: ,p_org_id => p_material_detail_rec.organization_id
1014: ,p_lot_number => p_pending_product_lots_rec.lot_number
1015: ,x_return_status => x_return_status) THEN
1016: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
1017: x_return_status := FND_API.G_RET_STS_ERROR;
1018: END IF;
1019: RAISE error_validate;
1020: END IF;

Line 1017: x_return_status := FND_API.G_RET_STS_ERROR;

1013: ,p_org_id => p_material_detail_rec.organization_id
1014: ,p_lot_number => p_pending_product_lots_rec.lot_number
1015: ,x_return_status => x_return_status) THEN
1016: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
1017: x_return_status := FND_API.G_RET_STS_ERROR;
1018: END IF;
1019: RAISE error_validate;
1020: END IF;
1021: x_pending_product_lots_rec.lot_number := p_pending_product_lots_rec.lot_number;

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

1022: ELSE
1023: x_pending_product_lots_rec.lot_number := l_db_pending_product_lots_rec.lot_number;
1024: END IF;
1025:
1026: IF p_pending_product_lots_rec.reason_id = fnd_api.g_miss_num THEN
1027: x_pending_product_lots_rec.reason_id := NULL;
1028: ELSIF p_pending_product_lots_rec.reason_id IS NOT NULL THEN
1029: IF NOT validate_reason_id
1030: (p_reason_id => p_pending_product_lots_rec.reason_id

Line 1032: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN

1028: ELSIF p_pending_product_lots_rec.reason_id IS NOT NULL THEN
1029: IF NOT validate_reason_id
1030: (p_reason_id => p_pending_product_lots_rec.reason_id
1031: ,x_return_status => x_return_status) THEN
1032: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
1033: x_return_status := FND_API.G_RET_STS_ERROR;
1034: END IF;
1035: RAISE error_validate;
1036: END IF;

Line 1033: x_return_status := FND_API.G_RET_STS_ERROR;

1029: IF NOT validate_reason_id
1030: (p_reason_id => p_pending_product_lots_rec.reason_id
1031: ,x_return_status => x_return_status) THEN
1032: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
1033: x_return_status := FND_API.G_RET_STS_ERROR;
1034: END IF;
1035: RAISE error_validate;
1036: END IF;
1037: x_pending_product_lots_rec.reason_id := p_pending_product_lots_rec.reason_id;

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

1038: ELSE
1039: x_pending_product_lots_rec.reason_id := l_db_pending_product_lots_rec.reason_id;
1040: END IF;
1041:
1042: IF p_pending_product_lots_rec.quantity = fnd_api.g_miss_num THEN
1043: l_dtl_qty := NULL;
1044: ELSIF p_pending_product_lots_rec.quantity IS NOT NULL THEN
1045: l_dtl_qty := p_pending_product_lots_rec.quantity;
1046: ELSE

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

1046: ELSE
1047: l_dtl_qty := l_db_pending_product_lots_rec.quantity;
1048: END IF;
1049:
1050: IF p_pending_product_lots_rec.secondary_quantity = fnd_api.g_miss_num THEN
1051: l_sec_qty := NULL;
1052: ELSIF p_pending_product_lots_rec.quantity IS NOT NULL THEN
1053: l_sec_qty := p_pending_product_lots_rec.secondary_quantity;
1054: ELSE

Line 1065: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN

1061: ,p_revision => x_pending_product_lots_rec.revision
1062: ,p_dtl_qty => l_dtl_qty
1063: ,p_sec_qty => l_sec_qty
1064: ,x_return_status => x_return_status) THEN
1065: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
1066: x_return_status := FND_API.G_RET_STS_ERROR;
1067: END IF;
1068: RAISE error_validate;
1069: END IF;

Line 1066: x_return_status := FND_API.G_RET_STS_ERROR;

1062: ,p_dtl_qty => l_dtl_qty
1063: ,p_sec_qty => l_sec_qty
1064: ,x_return_status => x_return_status) THEN
1065: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
1066: x_return_status := FND_API.G_RET_STS_ERROR;
1067: END IF;
1068: RAISE error_validate;
1069: END IF;
1070:

Line 1083: x_return_status := fnd_api.g_ret_sts_unexp_error;

1079: WHEN error_validate OR error_get_item THEN
1080: NULL;
1081: WHEN error_fetch_row THEN
1082: -- error message set in fetch routine
1083: x_return_status := fnd_api.g_ret_sts_unexp_error;
1084: WHEN OTHERS THEN
1085: IF g_debug <= gme_debug.g_log_unexpected THEN
1086: gme_debug.put_line('When others exception in '||g_pkg_name||'.'||l_api_name||' Error is ' || SQLERRM);
1087: END IF;

Line 1089: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

1085: IF g_debug <= gme_debug.g_log_unexpected THEN
1086: gme_debug.put_line('When others exception in '||g_pkg_name||'.'||l_api_name||' Error is ' || SQLERRM);
1087: END IF;
1088: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
1089: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1090: END validate_record_for_update;
1091:
1092: PROCEDURE validate_material_for_delete
1093: (p_batch_header_rec IN gme_batch_header%ROWTYPE

Line 1104: x_return_status := FND_API.G_RET_STS_SUCCESS;

1100:
1101: IF g_debug <= gme_debug.g_log_procedure THEN
1102: gme_debug.put_line('Entering api '||g_pkg_name||'.'||l_api_name);
1103: END IF;
1104: x_return_status := FND_API.G_RET_STS_SUCCESS;
1105:
1106: IF g_debug <= gme_debug.g_log_procedure THEN
1107: gme_debug.put_line('Exiting api '||g_pkg_name||'.'||l_api_name);
1108: END IF;

Line 1116: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

1112: IF g_debug <= gme_debug.g_log_unexpected THEN
1113: gme_debug.put_line('When others exception in '||g_pkg_name||'.'||l_api_name||' Error is ' || SQLERRM);
1114: END IF;
1115: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
1116: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1117: END validate_material_for_delete;
1118:
1119: PROCEDURE validate_record_for_delete
1120: (p_material_detail_rec IN gme_material_details%ROWTYPE

Line 1137: x_return_status := FND_API.G_RET_STS_SUCCESS;

1133:
1134: IF g_debug <= gme_debug.g_log_procedure THEN
1135: gme_debug.put_line('Entering api '||g_pkg_name||'.'||l_api_name);
1136: END IF;
1137: x_return_status := FND_API.G_RET_STS_SUCCESS;
1138:
1139: IF p_db_pending_product_lots_rec.pending_product_lot_id IS NOT NULL THEN
1140: x_pending_product_lots_rec := p_db_pending_product_lots_rec;
1141: ELSE

Line 1160: x_return_status := fnd_api.g_ret_sts_unexp_error;

1156:
1157: EXCEPTION
1158: WHEN error_fetch_row THEN
1159: -- error message set in fetch routine
1160: x_return_status := fnd_api.g_ret_sts_unexp_error;
1161: WHEN OTHERS THEN
1162: IF g_debug <= gme_debug.g_log_unexpected THEN
1163: gme_debug.put_line('When others exception in '||g_pkg_name||'.'||l_api_name||' Error is ' || SQLERRM);
1164: END IF;

Line 1166: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

1162: IF g_debug <= gme_debug.g_log_unexpected THEN
1163: gme_debug.put_line('When others exception in '||g_pkg_name||'.'||l_api_name||' Error is ' || SQLERRM);
1164: END IF;
1165: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
1166: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1167: END validate_record_for_delete;
1168:
1169: -- Call this procedure at the record level because fields besides lot number are required
1170: FUNCTION validate_quantities

Line 1216: x_return_status := FND_API.G_RET_STS_SUCCESS;

1212: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_revision='||p_revision);
1213: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_dtl_qty='||p_dtl_qty);
1214: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_sec_qty='||p_sec_qty);
1215: END IF;
1216: x_return_status := FND_API.G_RET_STS_SUCCESS;
1217:
1218: IF p_matl_dtl_rec.line_type = gme_common_pvt.g_line_type_prod THEN
1219: l_transaction_type_id := GME_COMMON_PVT.g_prod_completion;
1220: ELSIF p_matl_dtl_rec.line_type = gme_common_pvt.g_line_type_byprod THEN

Line 1245: ,p_init_msg_list => FND_API.G_FALSE

1241: END IF;
1242:
1243: l_return := INV_LOT_API_PUB.validate_quantities
1244: (p_api_version => 1.0
1245: ,p_init_msg_list => FND_API.G_FALSE
1246: ,p_transaction_type_id => l_transaction_type_id
1247: ,p_organization_id => p_matl_dtl_rec.organization_id
1248: ,p_inventory_item_id => p_matl_dtl_rec.inventory_item_id
1249: ,p_revision => p_revision

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

1259: ,x_return_status => l_return_status
1260: ,x_msg_count => l_msg_count
1261: ,x_msg_data => l_msg_data);
1262:
1263: IF NOT l_return OR l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1264: x_return_status := l_return_status;
1265: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
1266: 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);
1267: gme_debug.put_line ( g_pkg_name||'.'||l_api_name||' l_msg_count='||l_msg_count);

Line 1313: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

1309: WHEN error_um_conv THEN
1310: FND_MESSAGE.SET_NAME('INV','INV_NO_CONVERSION_ERR');
1311: FND_MESSAGE.SET_TOKEN('PGM_NAME',g_pkg_name||'.'||l_api_name);
1312: fnd_msg_pub.ADD;
1313: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1314: RETURN FALSE;
1315: WHEN OTHERS THEN
1316: IF g_debug <= gme_debug.g_log_unexpected THEN
1317: gme_debug.put_line('When others exception in '||g_pkg_name||'.'||l_api_name||' Error is ' || SQLERRM);

Line 1320: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

1316: IF g_debug <= gme_debug.g_log_unexpected THEN
1317: gme_debug.put_line('When others exception in '||g_pkg_name||'.'||l_api_name||' Error is ' || SQLERRM);
1318: END IF;
1319: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
1320: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1321: RETURN FALSE;
1322: END validate_quantities;
1323:
1324: FUNCTION validate_lot_number (p_inv_item_id IN NUMBER

Line 1349: x_return_status := FND_API.G_RET_STS_SUCCESS;

1345:
1346: IF g_debug <= gme_debug.g_log_procedure THEN
1347: gme_debug.put_line('Entering function '||g_pkg_name||'.'||l_api_name);
1348: END IF;
1349: x_return_status := FND_API.G_RET_STS_SUCCESS;
1350:
1351: OPEN check_lot_exists(p_inv_item_id, p_org_id, p_lot_number);
1352: FETCH check_lot_exists INTO l_exists;
1353: CLOSE check_lot_exists;

Line 1376: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

1372: IF g_debug <= gme_debug.g_log_unexpected THEN
1373: gme_debug.put_line('When others exception in '||g_pkg_name||'.'||l_api_name||' Error is ' || SQLERRM);
1374: END IF;
1375: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
1376: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1377: RETURN FALSE;
1378: END validate_lot_number;
1379:
1380: FUNCTION validate_sequence (p_matl_dtl_rec IN gme_material_details%ROWTYPE

Line 1404: x_return_status := FND_API.G_RET_STS_SUCCESS;

1400:
1401: IF g_debug <= gme_debug.g_log_procedure THEN
1402: gme_debug.put_line('Entering function '||g_pkg_name||'.'||l_api_name);
1403: END IF;
1404: x_return_status := FND_API.G_RET_STS_SUCCESS;
1405:
1406: IF p_sequence IS NULL THEN
1407: gme_common_pvt.log_message ('GME_FIELD_VALUE_REQUIRED'
1408: ,'FIELD_NAME'

Line 1438: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

1434: IF g_debug <= gme_debug.g_log_unexpected THEN
1435: gme_debug.put_line('When others exception in '||g_pkg_name||'.'||l_api_name||' Error is ' || SQLERRM);
1436: END IF;
1437: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
1438: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1439: RETURN FALSE;
1440: END validate_sequence;
1441:
1442: FUNCTION validate_revision (p_item_rec IN mtl_system_items_b%ROWTYPE

Line 1459: x_return_status := FND_API.G_RET_STS_SUCCESS;

1455:
1456: IF g_debug <= gme_debug.g_log_procedure THEN
1457: gme_debug.put_line('Entering function '||g_pkg_name||'.'||l_api_name);
1458: END IF;
1459: x_return_status := FND_API.G_RET_STS_SUCCESS;
1460: /* Bug 4866553 Corrected API call */
1461: gme_material_detail_pvt.validate_revision
1462: (p_revision => p_revision
1463: ,p_item_rec => p_item_rec

Line 1466: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

1462: (p_revision => p_revision
1463: ,p_item_rec => p_item_rec
1464: ,x_return_status => x_return_status);
1465:
1466: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1467: -- error message set in gme_material_detail_pvt.validate_revision
1468: l_return := FALSE;
1469: ELSE
1470: l_return := TRUE;

Line 1485: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

1481: IF g_debug <= gme_debug.g_log_unexpected THEN
1482: gme_debug.put_line('When others exception in '||g_pkg_name||'.'||l_api_name||' Error is ' || SQLERRM);
1483: END IF;
1484: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
1485: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1486: RETURN FALSE;
1487: END validate_revision;
1488:
1489: FUNCTION validate_reason_id(p_reason_id IN NUMBER

Line 1507: x_return_status := FND_API.G_RET_STS_SUCCESS;

1503: BEGIN
1504: IF g_debug <= gme_debug.g_log_procedure THEN
1505: gme_debug.put_line('Entering function '||g_pkg_name||'.'||l_api_name);
1506: END IF;
1507: x_return_status := FND_API.G_RET_STS_SUCCESS;
1508:
1509: IF p_reason_id IS NULL THEN
1510: -- NULL is valid...
1511: return TRUE;

Line 1538: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

1534: IF g_debug <= gme_debug.g_log_unexpected THEN
1535: gme_debug.put_line('When others exception in '||g_pkg_name||'.'||l_api_name||' Error is ' || SQLERRM);
1536: END IF;
1537: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
1538: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1539: RETURN FALSE;
1540: END validate_reason_id;
1541:
1542: FUNCTION pending_product_lot_exist

Line 1604: x_return_status := fnd_api.g_ret_sts_success;

1600: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'
1601: || l_api_name);
1602: END IF;
1603:
1604: x_return_status := fnd_api.g_ret_sts_success;
1605: x_pnd_prod_lot_qty := 0;
1606:
1607: get_pending_lot(p_material_detail_id => p_mtl_dtl_id
1608: ,x_return_status => x_return_status

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

1607: get_pending_lot(p_material_detail_id => p_mtl_dtl_id
1608: ,x_return_status => x_return_status
1609: ,x_pending_product_lot_tbl => l_pnd_prod_lot_tbl);
1610:
1611: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN
1612: RAISE get_pending_lot_error;
1613: END IF;
1614:
1615: FOR i IN 1 .. l_pnd_prod_lot_tbl.COUNT LOOP

Line 1624: x_return_status := fnd_api.g_ret_sts_unexp_error;

1620: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);
1621: END IF;
1622: EXCEPTION
1623: WHEN get_pending_lot_error THEN
1624: x_return_status := fnd_api.g_ret_sts_unexp_error;
1625: WHEN OTHERS THEN
1626: IF g_debug <= gme_debug.g_log_unexpected THEN
1627: gme_debug.put_line ( 'When others exception in '
1628: || g_pkg_name

Line 1636: x_return_status := fnd_api.g_ret_sts_unexp_error;

1632: || SQLERRM);
1633: END IF;
1634:
1635: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
1636: x_return_status := fnd_api.g_ret_sts_unexp_error;
1637: END get_pnd_prod_lot_qty;
1638:
1639: END gme_pending_product_lots_pvt;