DBA Data[Home] [Help]

APPS.GME_TRANSACTIONS_PVT dependencies on FND_API

Line 49: l_return_status VARCHAR2 (1) := fnd_api.g_ret_sts_success;

45: ,p_phantom_trans IN NUMBER DEFAULT 0
46: ,x_return_status OUT NOCOPY VARCHAR2)
47: IS
48: l_api_name CONSTANT VARCHAR2 (30) := 'CREATE_MATERIAL_TXN';
49: l_return_status VARCHAR2 (1) := fnd_api.g_ret_sts_success;
50: l_mmti_rec mtl_transactions_interface%ROWTYPE;
51: l_mmli_tbl gme_common_pvt.mtl_trans_lots_inter_tbl;
52: m_mmti_rec mtl_transactions_interface%ROWTYPE;
53: m_mmli_tbl gme_common_pvt.mtl_trans_lots_inter_tbl;

Line 70: x_return_status := fnd_api.g_ret_sts_success;

66: l_cnt_temp NUMBER;
67: build_txn_inter_err EXCEPTION;
68: BEGIN
69: /* Initially let us assign the return status to success */
70: x_return_status := fnd_api.g_ret_sts_success;
71:
72: IF (g_debug <= gme_debug.g_log_statement) THEN
73: gme_debug.put_line (g_pkg_name || '.' || l_api_name || ':'
74: || 'Entering');

Line 85: RAISE fnd_api.g_exc_error;

81: -- Now fetch the material detials for the mateiral
82: IF NOT gme_material_details_dbl.fetch_row
83: (p_material_detail => l_mat_dtl_rec
84: ,x_material_detail => l_mat_dtl_rec) THEN
85: RAISE fnd_api.g_exc_error;
86: END IF;
87:
88: IF (g_debug <= gme_debug.g_log_statement) THEN
89: gme_debug.put_line ( g_pkg_name

Line 116: IF l_return_status <> fnd_api.g_ret_sts_success THEN

112: ,p_assign_phantom => l_assign_phantom
113: ,x_mmti_rec => x_mmti_rec
114: ,x_mmli_tbl => x_mmli_tbl
115: ,x_return_status => l_return_status);
116: IF l_return_status <> fnd_api.g_ret_sts_success THEN
117: RAISE build_txn_inter_err;
118: END IF;
119: l_assign_phantom := 0;
120:

Line 170: RAISE fnd_api.g_exc_error;

166: -- Now fetch the material detials for the phantom line
167: IF NOT gme_material_details_dbl.fetch_row
168: (p_material_detail => m_mat_dtl_rec
169: ,x_material_detail => m_mat_dtl_rec) THEN
170: RAISE fnd_api.g_exc_error;
171: END IF;
172:
173: m_mmti_rec.transaction_source_id := m_mat_dtl_rec.batch_id;
174:

Line 273: IF l_return_status <> fnd_api.g_ret_sts_success THEN

269: ,x_mmti_rec => x_mmti_rec
270: ,x_mmli_tbl => x_mmli_tbl
271: ,x_return_status => l_return_status);
272:
273: IF l_return_status <> fnd_api.g_ret_sts_success THEN
274: RAISE build_txn_inter_err;
275: END IF;
276:
277: IF (g_debug <= gme_debug.g_log_statement) THEN

Line 289: IF gme_common_pvt.g_move_to_temp = fnd_api.g_true THEN

285: END IF; -- for phantom
286: END IF; --p_phantom_trans <> 1 THEN
287:
288: -- code for moving the data to temp
289: IF gme_common_pvt.g_move_to_temp = fnd_api.g_true THEN
290: IF (g_debug <= gme_debug.g_log_statement) THEN
291: gme_debug.put_line ( g_pkg_name
292: || '.'
293: || l_api_name

Line 318: ,p_init_msg_list => fnd_api.g_true

314: we wil free the tree while calling process transactions */
315:
316: l_ret := inv_txn_manager_grp.validate_transactions
317: (p_api_version => l_api_version
318: ,p_init_msg_list => fnd_api.g_true
319: ,p_validation_level => fnd_api.g_valid_level_full
320: ,p_header_id => gme_common_pvt.g_transaction_header_id
321: ,x_return_status => l_return_status
322: ,x_msg_count => l_msg_count

Line 319: ,p_validation_level => fnd_api.g_valid_level_full

315:
316: l_ret := inv_txn_manager_grp.validate_transactions
317: (p_api_version => l_api_version
318: ,p_init_msg_list => fnd_api.g_true
319: ,p_validation_level => fnd_api.g_valid_level_full
320: ,p_header_id => gme_common_pvt.g_transaction_header_id
321: ,x_return_status => l_return_status
322: ,x_msg_count => l_msg_count
323: ,x_msg_data => l_msg_data

Line 325: ,p_free_tree => fnd_api.g_false);

321: ,x_return_status => l_return_status
322: ,x_msg_count => l_msg_count
323: ,x_msg_data => l_msg_data
324: ,x_trans_count => l_txn_count
325: ,p_free_tree => fnd_api.g_false);
326: IF (g_debug <= gme_debug.g_log_statement) THEN
327: gme_debug.put_line(g_pkg_name|| '.'|| l_api_name|| ':'|| 'after validate transactions:'|| l_ret);
328: gme_debug.put_line(g_pkg_name|| '.'|| l_api_name|| ':'|| 'x_trans_count:'|| l_txn_count);
329: select count(*) into l_cnt_temp

Line 361: RAISE fnd_api.g_exc_error;

357: ,p_token1_name => 'MESSAGE'
358: ,p_token1_value => get_msgs.error_explanation);
359: END LOOP;
360: END IF;
361: RAISE fnd_api.g_exc_error;
362: END IF;
363: END IF;
364: IF (g_debug <= gme_debug.g_log_statement) THEN
365: gme_debug.put_line ( g_pkg_name

Line 377: WHEN fnd_api.g_exc_error THEN

373: WHEN build_txn_inter_err THEN
374: gme_debug.put_line (g_pkg_name||'.'||l_api_name||':'
375: ||' error from build_txn_inter');
376: x_return_status := l_return_status;
377: WHEN fnd_api.g_exc_error THEN
378: x_return_status := fnd_api.g_ret_sts_error;
379: WHEN fnd_api.g_exc_unexpected_error THEN
380: x_return_status := fnd_api.g_ret_sts_unexp_error;
381: WHEN OTHERS THEN

Line 378: x_return_status := fnd_api.g_ret_sts_error;

374: gme_debug.put_line (g_pkg_name||'.'||l_api_name||':'
375: ||' error from build_txn_inter');
376: x_return_status := l_return_status;
377: WHEN fnd_api.g_exc_error THEN
378: x_return_status := fnd_api.g_ret_sts_error;
379: WHEN fnd_api.g_exc_unexpected_error THEN
380: x_return_status := fnd_api.g_ret_sts_unexp_error;
381: WHEN OTHERS THEN
382: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 379: WHEN fnd_api.g_exc_unexpected_error THEN

375: ||' error from build_txn_inter');
376: x_return_status := l_return_status;
377: WHEN fnd_api.g_exc_error THEN
378: x_return_status := fnd_api.g_ret_sts_error;
379: WHEN fnd_api.g_exc_unexpected_error THEN
380: x_return_status := fnd_api.g_ret_sts_unexp_error;
381: WHEN OTHERS THEN
382: x_return_status := fnd_api.g_ret_sts_unexp_error;
383: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);

Line 380: x_return_status := fnd_api.g_ret_sts_unexp_error;

376: x_return_status := l_return_status;
377: WHEN fnd_api.g_exc_error THEN
378: x_return_status := fnd_api.g_ret_sts_error;
379: WHEN fnd_api.g_exc_unexpected_error THEN
380: x_return_status := fnd_api.g_ret_sts_unexp_error;
381: WHEN OTHERS THEN
382: x_return_status := fnd_api.g_ret_sts_unexp_error;
383: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
384:

Line 382: x_return_status := fnd_api.g_ret_sts_unexp_error;

378: x_return_status := fnd_api.g_ret_sts_error;
379: WHEN fnd_api.g_exc_unexpected_error THEN
380: x_return_status := fnd_api.g_ret_sts_unexp_error;
381: WHEN OTHERS THEN
382: x_return_status := fnd_api.g_ret_sts_unexp_error;
383: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
384:
385: IF (NVL (g_debug, -1) = gme_debug.g_log_unexpected) THEN
386: gme_debug.put_line ( g_pkg_name

Line 428: l_return_status VARCHAR2 (1) := fnd_api.g_ret_sts_success;

424: l_mmln_tbl gme_common_pvt.mtl_trans_lots_num_tbl;
425: l_mmti_rec mtl_transactions_interface%ROWTYPE;
426: l_mmli_tbl gme_common_pvt.mtl_trans_lots_inter_tbl;
427: l_mat_dtl_rec gme_material_details%ROWTYPE;
428: l_return_status VARCHAR2 (1) := fnd_api.g_ret_sts_success;
429: create_material_txn_err EXCEPTION;
430: delete_material_txn_err EXCEPTION;
431: BEGIN
432: --Initially let us assign the return status to success

Line 433: x_return_status := fnd_api.g_ret_sts_success;

429: create_material_txn_err EXCEPTION;
430: delete_material_txn_err EXCEPTION;
431: BEGIN
432: --Initially let us assign the return status to success
433: x_return_status := fnd_api.g_ret_sts_success;
434:
435: IF (g_debug <= gme_debug.g_log_statement) THEN
436: gme_debug.put_line (g_pkg_name || '.' || l_api_name || ':'
437: || 'Entering');

Line 456: IF l_return_status <> fnd_api.g_ret_sts_success THEN

452:
453: delete_material_txn (p_transaction_id => p_transaction_id
454: ,x_return_status => l_return_status);
455:
456: IF l_return_status <> fnd_api.g_ret_sts_success THEN
457: IF (g_debug <= gme_debug.g_log_statement) THEN
458: gme_debug.put_line (g_pkg_name||'.'||l_api_name||':'||'Error from delete material txn');
459: END IF;
460: RAISE delete_material_txn_err;

Line 477: IF l_return_status <> fnd_api.g_ret_sts_success THEN

473: create_material_txn (p_mmti_rec => l_mmti_rec
474: ,p_mmli_tbl => l_mmli_tbl
475: ,x_return_status => l_return_status);
476:
477: IF l_return_status <> fnd_api.g_ret_sts_success THEN
478: RAISE create_material_txn_err;
479: END IF;
480:
481: IF (g_debug <= gme_debug.g_log_statement) THEN

Line 497: WHEN fnd_api.g_exc_error THEN

493:
494: WHEN create_material_txn_err THEN
495: gme_debug.put_line (g_pkg_name||'.'||l_api_name||':'||'Error from create material txn');
496: x_return_status := l_return_status ;
497: WHEN fnd_api.g_exc_error THEN
498: x_return_status := fnd_api.g_ret_sts_error;
499: WHEN fnd_api.g_exc_unexpected_error THEN
500: x_return_status := fnd_api.g_ret_sts_unexp_error;
501: WHEN OTHERS THEN

Line 498: x_return_status := fnd_api.g_ret_sts_error;

494: WHEN create_material_txn_err THEN
495: gme_debug.put_line (g_pkg_name||'.'||l_api_name||':'||'Error from create material txn');
496: x_return_status := l_return_status ;
497: WHEN fnd_api.g_exc_error THEN
498: x_return_status := fnd_api.g_ret_sts_error;
499: WHEN fnd_api.g_exc_unexpected_error THEN
500: x_return_status := fnd_api.g_ret_sts_unexp_error;
501: WHEN OTHERS THEN
502: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 499: WHEN fnd_api.g_exc_unexpected_error THEN

495: gme_debug.put_line (g_pkg_name||'.'||l_api_name||':'||'Error from create material txn');
496: x_return_status := l_return_status ;
497: WHEN fnd_api.g_exc_error THEN
498: x_return_status := fnd_api.g_ret_sts_error;
499: WHEN fnd_api.g_exc_unexpected_error THEN
500: x_return_status := fnd_api.g_ret_sts_unexp_error;
501: WHEN OTHERS THEN
502: x_return_status := fnd_api.g_ret_sts_unexp_error;
503: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);

Line 500: x_return_status := fnd_api.g_ret_sts_unexp_error;

496: x_return_status := l_return_status ;
497: WHEN fnd_api.g_exc_error THEN
498: x_return_status := fnd_api.g_ret_sts_error;
499: WHEN fnd_api.g_exc_unexpected_error THEN
500: x_return_status := fnd_api.g_ret_sts_unexp_error;
501: WHEN OTHERS THEN
502: x_return_status := fnd_api.g_ret_sts_unexp_error;
503: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
504:

Line 502: x_return_status := fnd_api.g_ret_sts_unexp_error;

498: x_return_status := fnd_api.g_ret_sts_error;
499: WHEN fnd_api.g_exc_unexpected_error THEN
500: x_return_status := fnd_api.g_ret_sts_unexp_error;
501: WHEN OTHERS THEN
502: x_return_status := fnd_api.g_ret_sts_unexp_error;
503: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
504:
505: IF (NVL (g_debug, -1) = gme_debug.g_log_unexpected) THEN
506: gme_debug.put_line ( g_pkg_name

Line 547: l_return_status VARCHAR2 (1) := fnd_api.g_ret_sts_success;

543: l_mmln_tbl gme_common_pvt.mtl_trans_lots_num_tbl;
544: l_mmti_rec mtl_transactions_interface%ROWTYPE;
545: l_mmli_tbl gme_common_pvt.mtl_trans_lots_inter_tbl;
546: l_mat_dtl_rec gme_material_details%ROWTYPE;
547: l_return_status VARCHAR2 (1) := fnd_api.g_ret_sts_success;
548: create_material_txn_err EXCEPTION;
549: delete_material_txn_err EXCEPTION;
550: BEGIN
551: -- Initially let us assign the return status to success

Line 552: x_return_status := fnd_api.g_ret_sts_success;

548: create_material_txn_err EXCEPTION;
549: delete_material_txn_err EXCEPTION;
550: BEGIN
551: -- Initially let us assign the return status to success
552: x_return_status := fnd_api.g_ret_sts_success;
553:
554: IF (g_debug <= gme_debug.g_log_statement) THEN
555: gme_debug.put_line (g_pkg_name || '.' || l_api_name || ':'
556: || 'Entering');

Line 578: IF l_return_status <> fnd_api.g_ret_sts_success THEN

574:
575: delete_material_txn (p_transaction_id => l_transaction_id
576: ,x_return_status => l_return_status);
577:
578: IF l_return_status <> fnd_api.g_ret_sts_success THEN
579: IF (g_debug <= gme_debug.g_log_statement) THEN
580: gme_debug.put_line (g_pkg_name||'.'||l_api_name||':'||'Error from delete material txn');
581: END IF;
582: RAISE delete_material_txn_err;

Line 601: IF l_return_status <> fnd_api.g_ret_sts_success THEN

597: ,x_mmti_rec => l_mmti_rec
598: ,x_mmli_tbl => l_mmli_tbl
599: ,x_return_status => l_return_status);
600:
601: IF l_return_status <> fnd_api.g_ret_sts_success THEN
602: IF (g_debug <= gme_debug.g_log_statement) THEN
603: gme_debug.put_line (g_pkg_name||'.'||l_api_name||':'||'Error from construct mmti');
604: END IF;
605: RAISE fnd_api.g_exc_error;

Line 605: RAISE fnd_api.g_exc_error;

601: IF l_return_status <> fnd_api.g_ret_sts_success THEN
602: IF (g_debug <= gme_debug.g_log_statement) THEN
603: gme_debug.put_line (g_pkg_name||'.'||l_api_name||':'||'Error from construct mmti');
604: END IF;
605: RAISE fnd_api.g_exc_error;
606: END IF;
607:
608: IF (g_debug <= gme_debug.g_log_statement) THEN
609: gme_debug.put_line ( g_pkg_name

Line 628: IF l_return_status <> fnd_api.g_ret_sts_success THEN

624: create_material_txn (p_mmti_rec => l_mmti_rec
625: ,p_mmli_tbl => l_mmli_tbl
626: ,x_return_status => l_return_status);
627:
628: IF l_return_status <> fnd_api.g_ret_sts_success THEN
629: IF (g_debug <= gme_debug.g_log_statement) THEN
630: gme_debug.put_line (g_pkg_name||'.'||l_api_name||':'||'Error from create material txn');
631: END IF;
632: RAISE create_material_txn_err;

Line 650: WHEN fnd_api.g_exc_error THEN

646: x_return_status := l_return_status ;
647: WHEN create_material_txn_err THEN
648: gme_debug.put_line (g_pkg_name||'.'||l_api_name||':'||'Error from create material txn');
649: x_return_status := l_return_status ;
650: WHEN fnd_api.g_exc_error THEN
651: x_return_status := fnd_api.g_ret_sts_error;
652: WHEN fnd_api.g_exc_unexpected_error THEN
653: x_return_status := fnd_api.g_ret_sts_unexp_error;
654: WHEN OTHERS THEN

Line 651: x_return_status := fnd_api.g_ret_sts_error;

647: WHEN create_material_txn_err THEN
648: gme_debug.put_line (g_pkg_name||'.'||l_api_name||':'||'Error from create material txn');
649: x_return_status := l_return_status ;
650: WHEN fnd_api.g_exc_error THEN
651: x_return_status := fnd_api.g_ret_sts_error;
652: WHEN fnd_api.g_exc_unexpected_error THEN
653: x_return_status := fnd_api.g_ret_sts_unexp_error;
654: WHEN OTHERS THEN
655: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 652: WHEN fnd_api.g_exc_unexpected_error THEN

648: gme_debug.put_line (g_pkg_name||'.'||l_api_name||':'||'Error from create material txn');
649: x_return_status := l_return_status ;
650: WHEN fnd_api.g_exc_error THEN
651: x_return_status := fnd_api.g_ret_sts_error;
652: WHEN fnd_api.g_exc_unexpected_error THEN
653: x_return_status := fnd_api.g_ret_sts_unexp_error;
654: WHEN OTHERS THEN
655: x_return_status := fnd_api.g_ret_sts_unexp_error;
656: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);

Line 653: x_return_status := fnd_api.g_ret_sts_unexp_error;

649: x_return_status := l_return_status ;
650: WHEN fnd_api.g_exc_error THEN
651: x_return_status := fnd_api.g_ret_sts_error;
652: WHEN fnd_api.g_exc_unexpected_error THEN
653: x_return_status := fnd_api.g_ret_sts_unexp_error;
654: WHEN OTHERS THEN
655: x_return_status := fnd_api.g_ret_sts_unexp_error;
656: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
657:

Line 655: x_return_status := fnd_api.g_ret_sts_unexp_error;

651: x_return_status := fnd_api.g_ret_sts_error;
652: WHEN fnd_api.g_exc_unexpected_error THEN
653: x_return_status := fnd_api.g_ret_sts_unexp_error;
654: WHEN OTHERS THEN
655: x_return_status := fnd_api.g_ret_sts_unexp_error;
656: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
657:
658: IF (NVL (g_debug, -1) = gme_debug.g_log_unexpected) THEN
659: gme_debug.put_line ( g_pkg_name

Line 706: l_return_status VARCHAR2 (1) := fnd_api.g_ret_sts_success;

702: l_mmln_tbl gme_common_pvt.mtl_trans_lots_num_tbl;
703: l_mmti_rec mtl_transactions_interface%ROWTYPE;
704: l_mmli_tbl gme_common_pvt.mtl_trans_lots_inter_tbl;
705: l_mat_dtl_rec gme_material_details%ROWTYPE;
706: l_return_status VARCHAR2 (1) := fnd_api.g_ret_sts_success;
707: create_material_txn_err EXCEPTION;
708: delete_material_txn_err EXCEPTION;
709: get_trans_err EXCEPTION;
710: BEGIN

Line 712: x_return_status := fnd_api.g_ret_sts_success;

708: delete_material_txn_err EXCEPTION;
709: get_trans_err EXCEPTION;
710: BEGIN
711: -- Initially let us assign the return status to success
712: x_return_status := fnd_api.g_ret_sts_success;
713:
714: IF (g_debug <= gme_debug.g_log_statement) THEN
715: gme_debug.put_line (g_pkg_name || '.' || l_api_name || ':'
716: || 'Entering');

Line 737: IF l_return_status <> fnd_api.g_ret_sts_success THEN

733: ,x_mmt_rec => l_mmt_rec
734: ,x_mmln_tbl => l_mmln_tbl
735: ,x_return_status => l_return_status);
736:
737: IF l_return_status <> fnd_api.g_ret_sts_success THEN
738: IF (g_debug <= gme_debug.g_log_statement) THEN
739: gme_debug.put_line (g_pkg_name||'.'||l_api_name||':'||'Error from get transactions');
740: END IF;
741: RAISE get_trans_err;

Line 767: IF l_return_status <> fnd_api.g_ret_sts_success THEN

763: ,x_mmti_rec => l_mmti_rec
764: ,x_mmli_tbl => l_mmli_tbl
765: ,x_return_status => l_return_status);
766:
767: IF l_return_status <> fnd_api.g_ret_sts_success THEN
768: IF (g_debug <= gme_debug.g_log_statement) THEN
769: gme_debug.put_line (g_pkg_name||'.'||l_api_name||':'||'Error from construct mmti');
770: END IF;
771: RAISE fnd_api.g_exc_error;

Line 771: RAISE fnd_api.g_exc_error;

767: IF l_return_status <> fnd_api.g_ret_sts_success THEN
768: IF (g_debug <= gme_debug.g_log_statement) THEN
769: gme_debug.put_line (g_pkg_name||'.'||l_api_name||':'||'Error from construct mmti');
770: END IF;
771: RAISE fnd_api.g_exc_error;
772: END IF;
773:
774: IF (g_debug <= gme_debug.g_log_statement) THEN
775: gme_debug.put_line ( g_pkg_name

Line 799: RAISE fnd_api.g_exc_error;

795:
796: IF NOT gme_material_details_dbl.fetch_row
797: (p_material_detail => l_mat_dtl_rec
798: ,x_material_detail => l_mat_dtl_rec) THEN
799: RAISE fnd_api.g_exc_error;
800: END IF;
801:
802: IF l_mmti_rec.transaction_type_id = gme_common_pvt.g_ing_issue THEN
803: --(35)

Line 871: IF l_return_status <> fnd_api.g_ret_sts_success THEN

867: ,p_mmli_tbl => l_mmli_tbl
868: ,p_phantom_trans => 1
869: ,x_return_status => l_return_status);
870:
871: IF l_return_status <> fnd_api.g_ret_sts_success THEN
872: IF (g_debug <= gme_debug.g_log_statement) THEN
873: gme_debug.put_line (g_pkg_name||'.'||l_api_name||':'||'Error from create mat txn');
874: END IF;
875: RAISE create_material_txn_err;

Line 957: IF l_return_status <> fnd_api.g_ret_sts_success THEN

953:
954: delete_material_txn (p_transaction_id => m_transaction_id
955: ,p_txns_pair => 1
956: ,x_return_status => l_return_status);
957: IF l_return_status <> fnd_api.g_ret_sts_success THEN
958: IF (g_debug <= gme_debug.g_log_statement) THEN
959: gme_debug.put_line (g_pkg_name||'.'||l_api_name||':'||'Error from create mat txn');
960: END IF;
961: RAISE delete_material_txn_err;

Line 993: WHEN fnd_api.g_exc_error THEN

989: x_return_status := l_return_status ;
990: WHEN create_material_txn_err THEN
991: gme_debug.put_line (g_pkg_name||'.'||l_api_name||':'||'Error from create material txn');
992: x_return_status := l_return_status ;
993: WHEN fnd_api.g_exc_error THEN
994: x_return_status := fnd_api.g_ret_sts_error;
995: WHEN fnd_api.g_exc_unexpected_error THEN
996: IF (g_debug <= gme_debug.g_log_statement) THEN
997: gme_debug.put_line ( g_pkg_name

Line 994: x_return_status := fnd_api.g_ret_sts_error;

990: WHEN create_material_txn_err THEN
991: gme_debug.put_line (g_pkg_name||'.'||l_api_name||':'||'Error from create material txn');
992: x_return_status := l_return_status ;
993: WHEN fnd_api.g_exc_error THEN
994: x_return_status := fnd_api.g_ret_sts_error;
995: WHEN fnd_api.g_exc_unexpected_error THEN
996: IF (g_debug <= gme_debug.g_log_statement) THEN
997: gme_debug.put_line ( g_pkg_name
998: || '.'

Line 995: WHEN fnd_api.g_exc_unexpected_error THEN

991: gme_debug.put_line (g_pkg_name||'.'||l_api_name||':'||'Error from create material txn');
992: x_return_status := l_return_status ;
993: WHEN fnd_api.g_exc_error THEN
994: x_return_status := fnd_api.g_ret_sts_error;
995: WHEN fnd_api.g_exc_unexpected_error THEN
996: IF (g_debug <= gme_debug.g_log_statement) THEN
997: gme_debug.put_line ( g_pkg_name
998: || '.'
999: || l_api_name

Line 1004: x_return_status := fnd_api.g_ret_sts_unexp_error;

1000: || ':'
1001: || 'Unexpected');
1002: END IF;
1003:
1004: x_return_status := fnd_api.g_ret_sts_unexp_error;
1005: WHEN OTHERS THEN
1006: x_return_status := fnd_api.g_ret_sts_unexp_error;
1007: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
1008:

Line 1006: x_return_status := fnd_api.g_ret_sts_unexp_error;

1002: END IF;
1003:
1004: x_return_status := fnd_api.g_ret_sts_unexp_error;
1005: WHEN OTHERS THEN
1006: x_return_status := fnd_api.g_ret_sts_unexp_error;
1007: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
1008:
1009: IF (g_debug <= gme_debug.g_log_statement) THEN
1010: gme_debug.put_line ( g_pkg_name

Line 1049: l_return_status VARCHAR2 (1) := fnd_api.g_ret_sts_success;

1045: l_mmti_rec mtl_transactions_interface%ROWTYPE;
1046: l_mmli_tbl gme_common_pvt.mtl_trans_lots_inter_tbl;
1047: l_api_name CONSTANT VARCHAR2 (30) := 'BUILD_TXN_INTER';
1048: x_header_id NUMBER;
1049: l_return_status VARCHAR2 (1) := fnd_api.g_ret_sts_success;
1050: l_insert_hdr BOOLEAN;
1051: build_txn_inter_err EXCEPTION;
1052: build_txn_inter_lot_err EXCEPTION;
1053: lot_expired_err EXCEPTION;

Line 1057: x_return_status := fnd_api.g_ret_sts_success;

1053: lot_expired_err EXCEPTION;
1054: insert_hdr_err EXCEPTION ;
1055: BEGIN
1056: -- Initially let us assign the return status to success
1057: x_return_status := fnd_api.g_ret_sts_success;
1058:
1059: IF (g_debug <= gme_debug.g_log_statement) THEN
1060: gme_debug.put_line (g_pkg_name || '.' || l_api_name || ':'
1061: || 'Entering');

Line 1078: IF l_return_status <> fnd_api.g_ret_sts_success THEN

1074: ,x_mmti_rec => x_mmti_rec
1075: ,x_return_status => l_return_status
1076: ,p_insert_hdr => l_insert_hdr);
1077:
1078: IF l_return_status <> fnd_api.g_ret_sts_success THEN
1079: IF (g_debug <= gme_debug.g_log_statement) THEN
1080: gme_debug.put_line (g_pkg_name||'.'||l_api_name||':'||'Error from build inter hdr');
1081: END IF;
1082: RAISE build_txn_inter_err;

Line 1148: IF l_return_status <> fnd_api.g_ret_sts_success THEN

1144: ,p_mmli_rec => l_mmli_tbl (i)
1145: ,x_mmli_rec => x_mmli_tbl (i)
1146: ,x_return_status => l_return_status);
1147:
1148: IF l_return_status <> fnd_api.g_ret_sts_success THEN
1149: IF (g_debug <= gme_debug.g_log_statement) THEN
1150: gme_debug.put_line (g_pkg_name||'.'||l_api_name||':'||'Error from build lot inter');
1151: END IF;
1152: RAISE build_txn_inter_lot_err;

Line 1160: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN

1156: /* Bug 4929610 Added code to insert if not inserted originally */
1157: IF NOT(l_insert_hdr) THEN
1158: insert_txn_inter_hdr(p_mmti_rec => x_mmti_rec,
1159: x_return_status => l_return_status);
1160: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN
1161: RAISE insert_hdr_err;
1162: END IF;
1163: END IF;
1164:

Line 1186: WHEN fnd_api.g_exc_error THEN

1182: x_return_status := l_return_status;
1183: WHEN build_txn_inter_err THEN
1184: gme_debug.put_line (g_pkg_name||'.'||l_api_name||':'||'build_txn_inter_err');
1185: x_return_status := l_return_status;
1186: WHEN fnd_api.g_exc_error THEN
1187: gme_debug.put_line (g_pkg_name||'.'||l_api_name||':'||'user defined error');
1188: x_return_status := fnd_api.g_ret_sts_error;
1189: WHEN fnd_api.g_exc_unexpected_error THEN
1190: gme_debug.put_line ( g_pkg_name

Line 1188: x_return_status := fnd_api.g_ret_sts_error;

1184: gme_debug.put_line (g_pkg_name||'.'||l_api_name||':'||'build_txn_inter_err');
1185: x_return_status := l_return_status;
1186: WHEN fnd_api.g_exc_error THEN
1187: gme_debug.put_line (g_pkg_name||'.'||l_api_name||':'||'user defined error');
1188: x_return_status := fnd_api.g_ret_sts_error;
1189: WHEN fnd_api.g_exc_unexpected_error THEN
1190: gme_debug.put_line ( g_pkg_name
1191: || '.'
1192: || l_api_name

Line 1189: WHEN fnd_api.g_exc_unexpected_error THEN

1185: x_return_status := l_return_status;
1186: WHEN fnd_api.g_exc_error THEN
1187: gme_debug.put_line (g_pkg_name||'.'||l_api_name||':'||'user defined error');
1188: x_return_status := fnd_api.g_ret_sts_error;
1189: WHEN fnd_api.g_exc_unexpected_error THEN
1190: gme_debug.put_line ( g_pkg_name
1191: || '.'
1192: || l_api_name
1193: || ':'

Line 1196: x_return_status := fnd_api.g_ret_sts_unexp_error;

1192: || l_api_name
1193: || ':'
1194: || 'unexp'
1195: || SQLERRM);
1196: x_return_status := fnd_api.g_ret_sts_unexp_error;
1197: WHEN OTHERS THEN
1198: x_return_status := fnd_api.g_ret_sts_unexp_error;
1199: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
1200:

Line 1198: x_return_status := fnd_api.g_ret_sts_unexp_error;

1194: || 'unexp'
1195: || SQLERRM);
1196: x_return_status := fnd_api.g_ret_sts_unexp_error;
1197: WHEN OTHERS THEN
1198: x_return_status := fnd_api.g_ret_sts_unexp_error;
1199: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
1200:
1201: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
1202: gme_debug.put_line ( g_pkg_name

Line 1248: l_return_status VARCHAR2 (1) := fnd_api.g_ret_sts_success;

1244: AND inventory_location_id (+) = v_loc_id;
1245: l_mmti_rec mtl_transactions_interface%ROWTYPE;
1246: l_api_name CONSTANT VARCHAR2 (30) := 'BUILD_TXN_INTER_hdr';
1247: x_header_id NUMBER;
1248: l_return_status VARCHAR2 (1) := fnd_api.g_ret_sts_success;
1249: l_item VARCHAR2(100);
1250: l_type VARCHAR2(100);
1251: l_locator VARCHAR2(100);
1252: material_status_err EXCEPTION ;

Line 1256: x_return_status := fnd_api.g_ret_sts_success;

1252: material_status_err EXCEPTION ;
1253: insert_hdr_err EXCEPTION ;
1254: BEGIN
1255: -- Initially let us assign the return status to success
1256: x_return_status := fnd_api.g_ret_sts_success;
1257:
1258: IF (g_debug <= gme_debug.g_log_statement) THEN
1259: gme_debug.put_line (g_pkg_name || '.' || l_api_name || ':'
1260: || 'Entering');

Line 1542: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN

1538: /* Bug 4929610 fixed */
1539: IF (p_insert_hdr) THEN
1540: insert_txn_inter_hdr(p_mmti_rec => l_mmti_rec,
1541: x_return_status => l_return_status);
1542: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN
1543: RAISE insert_hdr_err;
1544: END IF;
1545: END IF;
1546: x_mmti_rec := l_mmti_rec;

Line 1589: WHEN fnd_api.g_exc_unexpected_error THEN

1585: || ':'
1586: || 'material status invalid for item, subinventory, locator etc'
1587: );
1588: x_return_status := 'T';
1589: WHEN fnd_api.g_exc_unexpected_error THEN
1590: gme_debug.put_line ( g_pkg_name
1591: || '.'
1592: || l_api_name
1593: || ':'

Line 1596: x_return_status := fnd_api.g_ret_sts_unexp_error;

1592: || l_api_name
1593: || ':'
1594: || 'unexp'
1595: || SQLERRM);
1596: x_return_status := fnd_api.g_ret_sts_unexp_error;
1597: WHEN OTHERS THEN
1598: x_return_status := fnd_api.g_ret_sts_unexp_error;
1599: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
1600:

Line 1598: x_return_status := fnd_api.g_ret_sts_unexp_error;

1594: || 'unexp'
1595: || SQLERRM);
1596: x_return_status := fnd_api.g_ret_sts_unexp_error;
1597: WHEN OTHERS THEN
1598: x_return_status := fnd_api.g_ret_sts_unexp_error;
1599: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
1600:
1601: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
1602: gme_debug.put_line ( g_pkg_name

Line 1641: l_return_status VARCHAR2 (1) := fnd_api.g_ret_sts_success;

1637: ,x_mmli_rec OUT NOCOPY mtl_transaction_lots_interface%ROWTYPE
1638: ,x_return_status OUT NOCOPY VARCHAR2)
1639: IS
1640: l_api_name CONSTANT VARCHAR2 (30) := 'BUILD_TXN_INTER_LOT';
1641: l_return_status VARCHAR2 (1) := fnd_api.g_ret_sts_success;
1642: l_mmli_rec mtl_transaction_lots_interface%ROWTYPE;
1643: l_transaction_type_id NUMBER;
1644: l_inventory_item_id NUMBER;
1645: l_item VARCHAR2(100);

Line 1652: x_return_status := fnd_api.g_ret_sts_success;

1648: l_subinventory_code VARCHAR2(100);
1649: l_locator_id NUMBER;
1650: material_status_err EXCEPTION;
1651: BEGIN
1652: x_return_status := fnd_api.g_ret_sts_success;
1653:
1654: IF (g_debug <= gme_debug.g_log_statement) THEN
1655: gme_debug.put_line (g_pkg_name || '.' || l_api_name || ':'
1656: || 'Entering');

Line 1770: WHEN fnd_api.g_exc_error THEN

1766: || l_api_name
1767: || ':'
1768: || 'material status invalid for item, subinventory, locator etc');
1769: x_return_status := 'T';
1770: WHEN fnd_api.g_exc_error THEN
1771: gme_debug.put_line ( g_pkg_name
1772: || '.'
1773: || l_api_name
1774: || ':'

Line 1777: x_return_status := fnd_api.g_ret_sts_error;

1773: || l_api_name
1774: || ':'
1775: || 'WHEN exe'
1776: || SQLERRM);
1777: x_return_status := fnd_api.g_ret_sts_error;
1778: WHEN fnd_api.g_exc_unexpected_error THEN
1779: gme_debug.put_line ( g_pkg_name
1780: || '.'
1781: || l_api_name

Line 1778: WHEN fnd_api.g_exc_unexpected_error THEN

1774: || ':'
1775: || 'WHEN exe'
1776: || SQLERRM);
1777: x_return_status := fnd_api.g_ret_sts_error;
1778: WHEN fnd_api.g_exc_unexpected_error THEN
1779: gme_debug.put_line ( g_pkg_name
1780: || '.'
1781: || l_api_name
1782: || ':'

Line 1785: x_return_status := fnd_api.g_ret_sts_unexp_error;

1781: || l_api_name
1782: || ':'
1783: || 'unexp'
1784: || SQLERRM);
1785: x_return_status := fnd_api.g_ret_sts_unexp_error;
1786: WHEN OTHERS THEN
1787: x_return_status := fnd_api.g_ret_sts_unexp_error;
1788: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
1789:

Line 1787: x_return_status := fnd_api.g_ret_sts_unexp_error;

1783: || 'unexp'
1784: || SQLERRM);
1785: x_return_status := fnd_api.g_ret_sts_unexp_error;
1786: WHEN OTHERS THEN
1787: x_return_status := fnd_api.g_ret_sts_unexp_error;
1788: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
1789:
1790: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
1791: gme_debug.put_line ( g_pkg_name

Line 1851: l_return_status VARCHAR2 (1) := fnd_api.g_ret_sts_success;

1847: FROM mtl_transaction_lot_numbers
1848: WHERE transaction_id = v_transaction_id;
1849:
1850: l_api_name CONSTANT VARCHAR2 (30) := 'GET_TRANSACTIONS';
1851: l_return_status VARCHAR2 (1) := fnd_api.g_ret_sts_success;
1852: l_transaction_id NUMBER;
1853: no_transaction_found EXCEPTION;
1854:
1855: BEGIN

Line 1856: x_return_status := fnd_api.g_ret_sts_success;

1852: l_transaction_id NUMBER;
1853: no_transaction_found EXCEPTION;
1854:
1855: BEGIN
1856: x_return_status := fnd_api.g_ret_sts_success;
1857:
1858: IF (g_debug <= gme_debug.g_log_statement) THEN
1859: gme_debug.put_line (g_pkg_name || '.' || l_api_name || ':'
1860: || 'Entering with transaction '||p_transaction_id);

Line 1893: IF l_return_status <> fnd_api.g_ret_sts_success THEN

1889: get_lot_trans (p_transaction_id => l_transaction_id
1890: ,x_mmln_tbl => x_mmln_tbl
1891: ,x_return_status => l_return_status);
1892:
1893: IF l_return_status <> fnd_api.g_ret_sts_success THEN
1894: IF (g_debug <= gme_debug.g_log_statement) THEN
1895: gme_debug.put_line (g_pkg_name || '.' || l_api_name || ':'
1896: || 'error from get lot trans');
1897: END IF;

Line 1898: RAISE fnd_api.g_exc_error;

1894: IF (g_debug <= gme_debug.g_log_statement) THEN
1895: gme_debug.put_line (g_pkg_name || '.' || l_api_name || ':'
1896: || 'error from get lot trans');
1897: END IF;
1898: RAISE fnd_api.g_exc_error;
1899: END IF;
1900: ELSE /* IF cur_get_transaction%FOUND THEN */
1901: CLOSE cur_get_transaction;
1902: gme_common_pvt.log_message ('GME_NO_TRANS_FOUND');

Line 1903: RAISE fnd_api.g_exc_error;

1899: END IF;
1900: ELSE /* IF cur_get_transaction%FOUND THEN */
1901: CLOSE cur_get_transaction;
1902: gme_common_pvt.log_message ('GME_NO_TRANS_FOUND');
1903: RAISE fnd_api.g_exc_error;
1904: END IF;
1905: CLOSE cur_get_transaction;
1906:
1907: IF (g_debug <= gme_debug.g_log_statement) THEN

Line 1925: WHEN fnd_api.g_exc_error THEN

1921: || 'Exiting with '
1922: || x_return_status);
1923: END IF;
1924: EXCEPTION
1925: WHEN fnd_api.g_exc_error THEN
1926: x_return_status := fnd_api.g_ret_sts_error;
1927: WHEN fnd_api.g_exc_unexpected_error THEN
1928: x_return_status := fnd_api.g_ret_sts_unexp_error;
1929: WHEN OTHERS THEN

Line 1926: x_return_status := fnd_api.g_ret_sts_error;

1922: || x_return_status);
1923: END IF;
1924: EXCEPTION
1925: WHEN fnd_api.g_exc_error THEN
1926: x_return_status := fnd_api.g_ret_sts_error;
1927: WHEN fnd_api.g_exc_unexpected_error THEN
1928: x_return_status := fnd_api.g_ret_sts_unexp_error;
1929: WHEN OTHERS THEN
1930: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 1927: WHEN fnd_api.g_exc_unexpected_error THEN

1923: END IF;
1924: EXCEPTION
1925: WHEN fnd_api.g_exc_error THEN
1926: x_return_status := fnd_api.g_ret_sts_error;
1927: WHEN fnd_api.g_exc_unexpected_error THEN
1928: x_return_status := fnd_api.g_ret_sts_unexp_error;
1929: WHEN OTHERS THEN
1930: x_return_status := fnd_api.g_ret_sts_unexp_error;
1931: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);

Line 1928: x_return_status := fnd_api.g_ret_sts_unexp_error;

1924: EXCEPTION
1925: WHEN fnd_api.g_exc_error THEN
1926: x_return_status := fnd_api.g_ret_sts_error;
1927: WHEN fnd_api.g_exc_unexpected_error THEN
1928: x_return_status := fnd_api.g_ret_sts_unexp_error;
1929: WHEN OTHERS THEN
1930: x_return_status := fnd_api.g_ret_sts_unexp_error;
1931: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
1932:

Line 1930: x_return_status := fnd_api.g_ret_sts_unexp_error;

1926: x_return_status := fnd_api.g_ret_sts_error;
1927: WHEN fnd_api.g_exc_unexpected_error THEN
1928: x_return_status := fnd_api.g_ret_sts_unexp_error;
1929: WHEN OTHERS THEN
1930: x_return_status := fnd_api.g_ret_sts_unexp_error;
1931: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
1932:
1933: IF (NVL (g_debug, -1) = gme_debug.g_log_unexpected) THEN
1934: gme_debug.put_line ( g_pkg_name

Line 1976: x_return_status := fnd_api.g_ret_sts_success;

1972: l_mmli_tbl gme_common_pvt.mtl_trans_lots_inter_tbl;
1973: l_api_name CONSTANT VARCHAR2 (30) := 'CONSTRUCT_MMTI';
1974: BEGIN
1975: -- Initially let us assign the return status to success
1976: x_return_status := fnd_api.g_ret_sts_success;
1977:
1978: IF (g_debug <= gme_debug.g_log_statement) THEN
1979: gme_debug.put_line (g_pkg_name || '.' || l_api_name || ':'
1980: || 'Entering');

Line 2046: WHEN fnd_api.g_exc_error THEN

2042: || 'Exiting with '
2043: || x_return_status);
2044: END IF;
2045: EXCEPTION
2046: WHEN fnd_api.g_exc_error THEN
2047: x_return_status := fnd_api.g_ret_sts_error;
2048: WHEN fnd_api.g_exc_unexpected_error THEN
2049: x_return_status := fnd_api.g_ret_sts_unexp_error;
2050: WHEN OTHERS THEN

Line 2047: x_return_status := fnd_api.g_ret_sts_error;

2043: || x_return_status);
2044: END IF;
2045: EXCEPTION
2046: WHEN fnd_api.g_exc_error THEN
2047: x_return_status := fnd_api.g_ret_sts_error;
2048: WHEN fnd_api.g_exc_unexpected_error THEN
2049: x_return_status := fnd_api.g_ret_sts_unexp_error;
2050: WHEN OTHERS THEN
2051: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 2048: WHEN fnd_api.g_exc_unexpected_error THEN

2044: END IF;
2045: EXCEPTION
2046: WHEN fnd_api.g_exc_error THEN
2047: x_return_status := fnd_api.g_ret_sts_error;
2048: WHEN fnd_api.g_exc_unexpected_error THEN
2049: x_return_status := fnd_api.g_ret_sts_unexp_error;
2050: WHEN OTHERS THEN
2051: x_return_status := fnd_api.g_ret_sts_unexp_error;
2052: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);

Line 2049: x_return_status := fnd_api.g_ret_sts_unexp_error;

2045: EXCEPTION
2046: WHEN fnd_api.g_exc_error THEN
2047: x_return_status := fnd_api.g_ret_sts_error;
2048: WHEN fnd_api.g_exc_unexpected_error THEN
2049: x_return_status := fnd_api.g_ret_sts_unexp_error;
2050: WHEN OTHERS THEN
2051: x_return_status := fnd_api.g_ret_sts_unexp_error;
2052: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
2053:

Line 2051: x_return_status := fnd_api.g_ret_sts_unexp_error;

2047: x_return_status := fnd_api.g_ret_sts_error;
2048: WHEN fnd_api.g_exc_unexpected_error THEN
2049: x_return_status := fnd_api.g_ret_sts_unexp_error;
2050: WHEN OTHERS THEN
2051: x_return_status := fnd_api.g_ret_sts_unexp_error;
2052: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
2053:
2054: IF (NVL (g_debug, -1) = gme_debug.g_log_unexpected) THEN
2055: gme_debug.put_line ( g_pkg_name

Line 2113: x_return_status := fnd_api.g_ret_sts_success;

2109:
2110: l_api_name CONSTANT VARCHAR2 (30) := 'GET_MAT_TRANS';
2111: BEGIN
2112: -- Initially let us assign the return status to success
2113: x_return_status := fnd_api.g_ret_sts_success;
2114:
2115: IF (g_debug <= gme_debug.g_log_statement) THEN
2116: gme_debug.put_line (g_pkg_name || '.' || l_api_name || ':'
2117: || 'Entering with mat/batch '||p_mat_det_id||'/'||p_batch_id);

Line 2137: WHEN fnd_api.g_exc_error THEN

2133: || 'Exiting with '
2134: || x_return_status);
2135: END IF;
2136: EXCEPTION
2137: WHEN fnd_api.g_exc_error THEN
2138: x_return_status := fnd_api.g_ret_sts_error;
2139: WHEN fnd_api.g_exc_unexpected_error THEN
2140: x_return_status := fnd_api.g_ret_sts_unexp_error;
2141: WHEN OTHERS THEN

Line 2138: x_return_status := fnd_api.g_ret_sts_error;

2134: || x_return_status);
2135: END IF;
2136: EXCEPTION
2137: WHEN fnd_api.g_exc_error THEN
2138: x_return_status := fnd_api.g_ret_sts_error;
2139: WHEN fnd_api.g_exc_unexpected_error THEN
2140: x_return_status := fnd_api.g_ret_sts_unexp_error;
2141: WHEN OTHERS THEN
2142: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 2139: WHEN fnd_api.g_exc_unexpected_error THEN

2135: END IF;
2136: EXCEPTION
2137: WHEN fnd_api.g_exc_error THEN
2138: x_return_status := fnd_api.g_ret_sts_error;
2139: WHEN fnd_api.g_exc_unexpected_error THEN
2140: x_return_status := fnd_api.g_ret_sts_unexp_error;
2141: WHEN OTHERS THEN
2142: x_return_status := fnd_api.g_ret_sts_unexp_error;
2143: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);

Line 2140: x_return_status := fnd_api.g_ret_sts_unexp_error;

2136: EXCEPTION
2137: WHEN fnd_api.g_exc_error THEN
2138: x_return_status := fnd_api.g_ret_sts_error;
2139: WHEN fnd_api.g_exc_unexpected_error THEN
2140: x_return_status := fnd_api.g_ret_sts_unexp_error;
2141: WHEN OTHERS THEN
2142: x_return_status := fnd_api.g_ret_sts_unexp_error;
2143: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
2144:

Line 2142: x_return_status := fnd_api.g_ret_sts_unexp_error;

2138: x_return_status := fnd_api.g_ret_sts_error;
2139: WHEN fnd_api.g_exc_unexpected_error THEN
2140: x_return_status := fnd_api.g_ret_sts_unexp_error;
2141: WHEN OTHERS THEN
2142: x_return_status := fnd_api.g_ret_sts_unexp_error;
2143: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
2144:
2145: IF (NVL (g_debug, -1) = gme_debug.g_log_unexpected) THEN
2146: gme_debug.put_line ( g_pkg_name

Line 2186: x_return_status := fnd_api.g_ret_sts_success;

2182:
2183: l_api_name CONSTANT VARCHAR2 (30) := 'GET_LOT_TRANS';
2184: BEGIN
2185: -- Initially let us assign the return status to success
2186: x_return_status := fnd_api.g_ret_sts_success;
2187:
2188: IF (g_debug <= gme_debug.g_log_statement) THEN
2189: gme_debug.put_line (g_pkg_name || '.' || l_api_name || ':'
2190: || 'Entering with transaction id '||p_transaction_id);

Line 2216: WHEN fnd_api.g_exc_error THEN

2212: || 'Exiting with '
2213: || x_return_status);
2214: END IF;
2215: EXCEPTION
2216: WHEN fnd_api.g_exc_error THEN
2217: x_return_status := fnd_api.g_ret_sts_error;
2218: WHEN fnd_api.g_exc_unexpected_error THEN
2219: x_return_status := fnd_api.g_ret_sts_unexp_error;
2220: WHEN OTHERS THEN

Line 2217: x_return_status := fnd_api.g_ret_sts_error;

2213: || x_return_status);
2214: END IF;
2215: EXCEPTION
2216: WHEN fnd_api.g_exc_error THEN
2217: x_return_status := fnd_api.g_ret_sts_error;
2218: WHEN fnd_api.g_exc_unexpected_error THEN
2219: x_return_status := fnd_api.g_ret_sts_unexp_error;
2220: WHEN OTHERS THEN
2221: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 2218: WHEN fnd_api.g_exc_unexpected_error THEN

2214: END IF;
2215: EXCEPTION
2216: WHEN fnd_api.g_exc_error THEN
2217: x_return_status := fnd_api.g_ret_sts_error;
2218: WHEN fnd_api.g_exc_unexpected_error THEN
2219: x_return_status := fnd_api.g_ret_sts_unexp_error;
2220: WHEN OTHERS THEN
2221: x_return_status := fnd_api.g_ret_sts_unexp_error;
2222:

Line 2219: x_return_status := fnd_api.g_ret_sts_unexp_error;

2215: EXCEPTION
2216: WHEN fnd_api.g_exc_error THEN
2217: x_return_status := fnd_api.g_ret_sts_error;
2218: WHEN fnd_api.g_exc_unexpected_error THEN
2219: x_return_status := fnd_api.g_ret_sts_unexp_error;
2220: WHEN OTHERS THEN
2221: x_return_status := fnd_api.g_ret_sts_unexp_error;
2222:
2223: IF (NVL (g_debug, -1) = gme_debug.g_log_unexpected) THEN

Line 2221: x_return_status := fnd_api.g_ret_sts_unexp_error;

2217: x_return_status := fnd_api.g_ret_sts_error;
2218: WHEN fnd_api.g_exc_unexpected_error THEN
2219: x_return_status := fnd_api.g_ret_sts_unexp_error;
2220: WHEN OTHERS THEN
2221: x_return_status := fnd_api.g_ret_sts_unexp_error;
2222:
2223: IF (NVL (g_debug, -1) = gme_debug.g_log_unexpected) THEN
2224: gme_debug.put_line ( g_pkg_name
2225: || '.'

Line 2265: l_return_status VARCHAR2 (1) := fnd_api.g_ret_sts_success;

2261: WHERE transaction_header_id = v_hdr_id
2262: AND transaction_source_type_id = gme_common_pvt.g_txn_source_type
2263: AND wip_entity_type = gme_common_pvt.g_wip_entity_type_batch;
2264:
2265: l_return_status VARCHAR2 (1) := fnd_api.g_ret_sts_success;
2266: l_number_tab gme_common_pvt.number_tab;
2267: no_transaction_found EXCEPTION;
2268: l_api_name CONSTANT VARCHAR2 (30) := 'GME_PRE_PROCESS';
2269: BEGIN

Line 2271: x_return_status := fnd_api.g_ret_sts_success;

2267: no_transaction_found EXCEPTION;
2268: l_api_name CONSTANT VARCHAR2 (30) := 'GME_PRE_PROCESS';
2269: BEGIN
2270: -- Initially let us assign the return status to success
2271: x_return_status := fnd_api.g_ret_sts_success;
2272:
2273: IF (g_debug <= gme_debug.g_log_statement) THEN
2274: gme_debug.put_line (g_pkg_name || '.' || l_api_name || ':'
2275: || 'Entering with p_transaction_hdr_id '||p_transaction_hdr_id);

Line 2283: RAISE fnd_api.g_exc_error;

2279: OPEN cur_get_trans (p_transaction_hdr_id);
2280: IF cur_get_trans%NOTFOUND THEN
2281: CLOSE cur_get_trans;
2282: gme_common_pvt.log_message ('GME_NO_TRANS_FOUND');
2283: RAISE fnd_api.g_exc_error;
2284: END IF;
2285: FETCH cur_get_trans
2286: BULK COLLECT INTO l_number_tab;
2287: CLOSE cur_get_trans;

Line 2298: IF l_return_status <> fnd_api.g_ret_sts_success THEN

2294: END IF;
2295: pre_process_val (p_transaction_interface_id => l_number_tab (i)
2296: ,x_return_status => l_return_status);
2297:
2298: IF l_return_status <> fnd_api.g_ret_sts_success THEN
2299: RAISE fnd_api.g_exc_error;
2300: END IF;
2301: END LOOP;
2302:

Line 2299: RAISE fnd_api.g_exc_error;

2295: pre_process_val (p_transaction_interface_id => l_number_tab (i)
2296: ,x_return_status => l_return_status);
2297:
2298: IF l_return_status <> fnd_api.g_ret_sts_success THEN
2299: RAISE fnd_api.g_exc_error;
2300: END IF;
2301: END LOOP;
2302:
2303: IF (g_debug <= gme_debug.g_log_statement) THEN

Line 2317: WHEN fnd_api.g_exc_error THEN

2313: set error_code = 'wip_mtlInterfaceProc_pub.processInterface()',
2314: error_explanation = l_errMessage,
2315: process_flag = wip_constants.mti_error
2316: where transaction_header_id = p_txnHdrID; */
2317: WHEN fnd_api.g_exc_error THEN
2318: x_return_status := fnd_api.g_ret_sts_error;
2319: WHEN fnd_api.g_exc_unexpected_error THEN
2320: x_return_status := fnd_api.g_ret_sts_unexp_error;
2321: WHEN OTHERS THEN

Line 2318: x_return_status := fnd_api.g_ret_sts_error;

2314: error_explanation = l_errMessage,
2315: process_flag = wip_constants.mti_error
2316: where transaction_header_id = p_txnHdrID; */
2317: WHEN fnd_api.g_exc_error THEN
2318: x_return_status := fnd_api.g_ret_sts_error;
2319: WHEN fnd_api.g_exc_unexpected_error THEN
2320: x_return_status := fnd_api.g_ret_sts_unexp_error;
2321: WHEN OTHERS THEN
2322: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 2319: WHEN fnd_api.g_exc_unexpected_error THEN

2315: process_flag = wip_constants.mti_error
2316: where transaction_header_id = p_txnHdrID; */
2317: WHEN fnd_api.g_exc_error THEN
2318: x_return_status := fnd_api.g_ret_sts_error;
2319: WHEN fnd_api.g_exc_unexpected_error THEN
2320: x_return_status := fnd_api.g_ret_sts_unexp_error;
2321: WHEN OTHERS THEN
2322: x_return_status := fnd_api.g_ret_sts_unexp_error;
2323:

Line 2320: x_return_status := fnd_api.g_ret_sts_unexp_error;

2316: where transaction_header_id = p_txnHdrID; */
2317: WHEN fnd_api.g_exc_error THEN
2318: x_return_status := fnd_api.g_ret_sts_error;
2319: WHEN fnd_api.g_exc_unexpected_error THEN
2320: x_return_status := fnd_api.g_ret_sts_unexp_error;
2321: WHEN OTHERS THEN
2322: x_return_status := fnd_api.g_ret_sts_unexp_error;
2323:
2324: IF (NVL (g_debug, -1) = gme_debug.g_log_unexpected) THEN

Line 2322: x_return_status := fnd_api.g_ret_sts_unexp_error;

2318: x_return_status := fnd_api.g_ret_sts_error;
2319: WHEN fnd_api.g_exc_unexpected_error THEN
2320: x_return_status := fnd_api.g_ret_sts_unexp_error;
2321: WHEN OTHERS THEN
2322: x_return_status := fnd_api.g_ret_sts_unexp_error;
2323:
2324: IF (NVL (g_debug, -1) = gme_debug.g_log_unexpected) THEN
2325: gme_debug.put_line ( g_pkg_name
2326: || '.'

Line 2433: x_return_status := fnd_api.g_ret_sts_success;

2429: l_api_name CONSTANT VARCHAR2 (30) := 'GET_RETURNABLE_QTY';
2430:
2431: BEGIN
2432: -- Initially let us assign the return status to success
2433: x_return_status := fnd_api.g_ret_sts_success;
2434:
2435: IF (g_debug <= gme_debug.g_log_statement) THEN
2436: gme_debug.put_line (g_pkg_name || '.' || l_api_name || ':' || 'Entering');
2437: END IF;

Line 2495: x_return_status := fnd_api.g_ret_sts_unexp_error;

2491: || x_available_qty);
2492: END IF;
2493: EXCEPTION
2494: WHEN OTHERS THEN
2495: x_return_status := fnd_api.g_ret_sts_unexp_error;
2496: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
2497:
2498: IF (NVL (g_debug, -1) = gme_debug.g_log_unexpected) THEN
2499: gme_debug.put_line ( g_pkg_name

Line 2571: x_return_status := fnd_api.g_ret_sts_success;

2567: lot_val_err EXCEPTION;
2568: l_api_name CONSTANT VARCHAR2 (30) := 'PRE_PROCESS_VAL';
2569: BEGIN
2570: -- Initially let us assign the return status to success
2571: x_return_status := fnd_api.g_ret_sts_success;
2572:
2573: IF (g_debug <= gme_debug.g_log_statement) THEN
2574: gme_debug.put_line (g_pkg_name || '.' || l_api_name || ':'
2575: || 'Entering');

Line 2604: RAISE fnd_api.g_exc_error;

2600:
2601: IF NOT gme_batch_header_dbl.fetch_row
2602: (p_batch_header => l_batch_hdr_rec
2603: ,x_batch_header => l_batch_hdr_rec) THEN
2604: RAISE fnd_api.g_exc_error;
2605: END IF;-- batch fetch
2606: ELSE
2607: RAISE fnd_api.g_exc_error;
2608: END IF; -- transaction_source_id IS NOT NULL

Line 2607: RAISE fnd_api.g_exc_error;

2603: ,x_batch_header => l_batch_hdr_rec) THEN
2604: RAISE fnd_api.g_exc_error;
2605: END IF;-- batch fetch
2606: ELSE
2607: RAISE fnd_api.g_exc_error;
2608: END IF; -- transaction_source_id IS NOT NULL
2609:
2610: IF l_batch_hdr_rec.update_inventory_ind = 'Y' THEN
2611: IF l_mmti_rec.trx_source_line_id IS NOT NULL THEN

Line 2617: RAISE fnd_api.g_exc_error;

2613:
2614: IF NOT gme_material_details_dbl.fetch_row
2615: (p_material_detail => l_mat_dtl_rec
2616: ,x_material_detail => l_mat_dtl_rec) THEN
2617: RAISE fnd_api.g_exc_error;
2618: END IF; -- material fetch
2619:
2620: ELSE
2621: RAISE fnd_api.g_exc_error;

Line 2621: RAISE fnd_api.g_exc_error;

2617: RAISE fnd_api.g_exc_error;
2618: END IF; -- material fetch
2619:
2620: ELSE
2621: RAISE fnd_api.g_exc_error;
2622: END IF; -- trx_source_line_id IS NOT NULL
2623: IF gme_common_pvt.g_batch_status_check = fnd_api.g_true THEN
2624: IF l_batch_hdr_rec.batch_status NOT IN (2, 3) THEN
2625: gme_common_pvt.log_message ('GME_INVALID_BATCH_STATUS');

Line 2623: IF gme_common_pvt.g_batch_status_check = fnd_api.g_true THEN

2619:
2620: ELSE
2621: RAISE fnd_api.g_exc_error;
2622: END IF; -- trx_source_line_id IS NOT NULL
2623: IF gme_common_pvt.g_batch_status_check = fnd_api.g_true THEN
2624: IF l_batch_hdr_rec.batch_status NOT IN (2, 3) THEN
2625: gme_common_pvt.log_message ('GME_INVALID_BATCH_STATUS');
2626: RAISE fnd_api.g_exc_error;
2627: END IF;

Line 2626: RAISE fnd_api.g_exc_error;

2622: END IF; -- trx_source_line_id IS NOT NULL
2623: IF gme_common_pvt.g_batch_status_check = fnd_api.g_true THEN
2624: IF l_batch_hdr_rec.batch_status NOT IN (2, 3) THEN
2625: gme_common_pvt.log_message ('GME_INVALID_BATCH_STATUS');
2626: RAISE fnd_api.g_exc_error;
2627: END IF;
2628: -- Check for step status in case the item is associated to a step.
2629: l_rel_type :=
2630: gme_common_pvt.is_material_auto_release

Line 2638: RAISE fnd_api.g_exc_error;

2634: FETCH Cur_associated_step INTO l_step_status;
2635: CLOSE Cur_associated_step;
2636: IF l_step_status NOT IN (2,3) THEN
2637: gme_common_pvt.log_message ('GME_API_INVALID_STEP_STATUS');
2638: RAISE fnd_api.g_exc_error;
2639: END IF;
2640: END IF; -- IF ( l_rel_type = gme_common_pvt.g_mtl_autobystep_release ) THEN
2641: -- check for item release type for products
2642: IF (l_rel_type = gme_common_pvt.g_mtl_auto_release )

Line 2647: RAISE fnd_api.g_exc_error;

2643: AND l_mat_dtl_rec.line_type IN (1,2)
2644: AND l_mat_dtl_rec.phantom_line_id IS NULL THEN
2645: IF l_batch_hdr_rec.batch_status <> 3 THEN
2646: gme_common_pvt.log_message('GME_INVALID_BATCH_STATUS');
2647: RAISE fnd_api.g_exc_error;
2648: END IF;
2649: END IF;
2650: END IF; -- gme_common_pvt.g_batch_status_check
2651: IF l_mmti_rec.transaction_type_id IN

Line 2656: RAISE fnd_api.g_exc_error;

2652: (gme_common_pvt.g_ing_issue, gme_common_pvt.g_ing_return) THEN
2653: IF l_mat_dtl_rec.line_type <> -1 THEN
2654: /* Bug 5141394 Changed message */
2655: gme_common_pvt.log_message ('GME_LINE_TYPE_TXN_TYPE_DIFF');
2656: RAISE fnd_api.g_exc_error;
2657: END IF;
2658: ELSIF l_mmti_rec.transaction_type_id IN
2659: (gme_common_pvt.g_prod_completion
2660: ,gme_common_pvt.g_prod_return) THEN

Line 2664: RAISE fnd_api.g_exc_error;

2660: ,gme_common_pvt.g_prod_return) THEN
2661: IF l_mat_dtl_rec.line_type <> 1 THEN
2662: /* Bug 5141394 Changed message */
2663: gme_common_pvt.log_message ('GME_LINE_TYPE_TXN_TYPE_DIFF');
2664: RAISE fnd_api.g_exc_error;
2665: END IF;
2666: ELSIF l_mmti_rec.transaction_type_id IN
2667: (gme_common_pvt.g_byprod_completion
2668: ,gme_common_pvt.g_byprod_return) THEN

Line 2673: RAISE fnd_api.g_exc_error;

2669: IF l_mat_dtl_rec.line_type <> 2 THEN
2670: /* Bug 5141394 Changed message */
2671: --RLNAGARA Bug6873185 Moved below line which was setting message name inside the IF condition.
2672: gme_common_pvt.log_message ('GME_LINE_TYPE_TXN_TYPE_DIFF');
2673: RAISE fnd_api.g_exc_error;
2674: END IF;
2675: END IF;
2676:
2677: -- check for phantom

Line 2682: RAISE fnd_api.g_exc_error;

2678: IF l_mat_dtl_rec.phantom_line_id IS NOT NULL THEN
2679: IF l_mmti_rec.transaction_header_id <>
2680: gme_common_pvt.g_transaction_header_id THEN
2681: gme_common_pvt.log_message ('GME_PHANTOM_NO_RETURN');
2682: RAISE fnd_api.g_exc_error;
2683: END IF;
2684: END IF;
2685:
2686: -- get the item propertites

Line 2712: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

2708: gme_transactions_pvt.validate_lot_for_ing(p_organization_id => l_mmti_rec.organization_id,
2709: p_inventory_item_id => l_mmti_rec.inventory_item_id,
2710: p_lot_number => get_lots.lot_number,
2711: x_return_status => l_return_status);
2712: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
2713: RAISE lot_val_err;
2714: END IF;
2715: END LOOP;
2716: END IF;

Line 2744: IF x_return_Status <> fnd_api.g_ret_sts_success THEN

2740: ,p_lot_control => l_item_rec.lot_control_code
2741: ,x_available_qty => l_available_qty
2742: ,x_return_status => x_return_status);
2743:
2744: IF x_return_Status <> fnd_api.g_ret_sts_success THEN
2745: RAISE fnd_api.g_exc_unexpected_error;
2746: END IF;
2747: IF (g_debug <= gme_debug.g_log_statement) THEN
2748: gme_debug.put_line ( g_pkg_name

Line 2745: RAISE fnd_api.g_exc_unexpected_error;

2741: ,x_available_qty => l_available_qty
2742: ,x_return_status => x_return_status);
2743:
2744: IF x_return_Status <> fnd_api.g_ret_sts_success THEN
2745: RAISE fnd_api.g_exc_unexpected_error;
2746: END IF;
2747: IF (g_debug <= gme_debug.g_log_statement) THEN
2748: gme_debug.put_line ( g_pkg_name
2749: || '.'

Line 2764: RAISE fnd_api.g_exc_error;

2760: END IF;
2761:
2762: IF ABS (l_available_qty) < ABS (l_mmti_rec.transaction_quantity) THEN
2763: gme_common_pvt.log_message ('GME_QTY_LESS_THEN_ISSUED');
2764: RAISE fnd_api.g_exc_error;
2765: END IF;
2766: ELSE /* Lot Control */
2767: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
2768: gme_debug.put_line ( g_pkg_name

Line 2785: IF x_return_Status <> fnd_api.g_ret_sts_success THEN

2781: ,p_lot_control => l_item_rec.lot_control_code
2782: ,x_available_qty => l_available_qty
2783: ,x_return_status => x_return_status);
2784:
2785: IF x_return_Status <> fnd_api.g_ret_sts_success THEN
2786: RAISE fnd_api.g_exc_unexpected_error;
2787: END IF;
2788: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
2789: gme_debug.put_line ( g_pkg_name

Line 2786: RAISE fnd_api.g_exc_unexpected_error;

2782: ,x_available_qty => l_available_qty
2783: ,x_return_status => x_return_status);
2784:
2785: IF x_return_Status <> fnd_api.g_ret_sts_success THEN
2786: RAISE fnd_api.g_exc_unexpected_error;
2787: END IF;
2788: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
2789: gme_debug.put_line ( g_pkg_name
2790: || '.'

Line 2804: RAISE fnd_api.g_exc_error;

2800: END IF;
2801:
2802: IF ABS (l_available_qty) < ABS (get_rec.l_mtli_lot_qty) THEN
2803: gme_common_pvt.log_message ('GME_QTY_LESS_THEN_ISSUED');
2804: RAISE fnd_api.g_exc_error;
2805: END IF;
2806: END LOOP;
2807: END IF; /* IF l_item_rec.lot_control_code = 1 THEN */
2808: END IF; /* IF transaction_type_id in RETURNS */

Line 2822: WHEN fnd_api.g_exc_error THEN

2818: END IF;
2819: EXCEPTION
2820: WHEN lot_val_err THEN
2821: x_return_status := l_return_status;
2822: WHEN fnd_api.g_exc_error THEN
2823: x_return_status := fnd_api.g_ret_sts_error;
2824: gme_transactions_pvt.gme_txn_message
2825: (p_api_name => l_api_name
2826: ,p_transaction_interface_id => p_transaction_interface_id

Line 2823: x_return_status := fnd_api.g_ret_sts_error;

2819: EXCEPTION
2820: WHEN lot_val_err THEN
2821: x_return_status := l_return_status;
2822: WHEN fnd_api.g_exc_error THEN
2823: x_return_status := fnd_api.g_ret_sts_error;
2824: gme_transactions_pvt.gme_txn_message
2825: (p_api_name => l_api_name
2826: ,p_transaction_interface_id => p_transaction_interface_id
2827: );

Line 2828: WHEN fnd_api.g_exc_unexpected_error THEN

2824: gme_transactions_pvt.gme_txn_message
2825: (p_api_name => l_api_name
2826: ,p_transaction_interface_id => p_transaction_interface_id
2827: );
2828: WHEN fnd_api.g_exc_unexpected_error THEN
2829: x_return_status := fnd_api.g_ret_sts_unexp_error;
2830: WHEN OTHERS THEN
2831: x_return_status := fnd_api.g_ret_sts_unexp_error;
2832: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);

Line 2829: x_return_status := fnd_api.g_ret_sts_unexp_error;

2825: (p_api_name => l_api_name
2826: ,p_transaction_interface_id => p_transaction_interface_id
2827: );
2828: WHEN fnd_api.g_exc_unexpected_error THEN
2829: x_return_status := fnd_api.g_ret_sts_unexp_error;
2830: WHEN OTHERS THEN
2831: x_return_status := fnd_api.g_ret_sts_unexp_error;
2832: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
2833:

Line 2831: x_return_status := fnd_api.g_ret_sts_unexp_error;

2827: );
2828: WHEN fnd_api.g_exc_unexpected_error THEN
2829: x_return_status := fnd_api.g_ret_sts_unexp_error;
2830: WHEN OTHERS THEN
2831: x_return_status := fnd_api.g_ret_sts_unexp_error;
2832: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
2833:
2834: IF (NVL (g_debug, -1) = gme_debug.g_log_unexpected) THEN
2835: gme_debug.put_line ( g_pkg_name

Line 2889: ,p_encoded => fnd_api.g_false

2885: END IF;
2886:
2887: -- based on message call count and get
2888: gme_common_pvt.count_and_get (x_count => x_message_count
2889: ,p_encoded => fnd_api.g_false
2890: ,x_data => x_message_list);
2891:
2892: UPDATE mtl_transactions_interface
2893: SET ERROR_CODE = g_pkg_name || '.' || p_api_name

Line 3025: x_return_status := fnd_api.g_ret_sts_success;

3021: transfer_error EXCEPTION; -- B4944024
3022: dispense_error EXCEPTION;
3023: BEGIN
3024: -- Initially let us assign the return status to success
3025: x_return_status := fnd_api.g_ret_sts_success;
3026:
3027: IF (g_debug <= gme_debug.g_log_statement) THEN
3028: gme_debug.put_line (g_pkg_name || '.' || l_api_name || ':'
3029: || 'Entering with trans id: '||p_transaction_id);

Line 3144: RAISE fnd_api.g_exc_error;

3140: l_mat_dtl_rec.material_detail_id := l_trx_source_line_id ;
3141: IF NOT gme_material_details_dbl.fetch_row
3142: (p_material_detail => l_mat_dtl_rec
3143: ,x_material_detail => l_mat_dtl_rec) THEN
3144: RAISE fnd_api.g_exc_error;
3145: END IF;
3146: IF (g_debug <= gme_debug.g_log_statement) THEN
3147: gme_debug.put_line
3148: ( g_pkg_name

Line 3297: IF l_return_status <> fnd_api.g_ret_sts_success THEN

3293: p_dispense_id => l_dispense_id,
3294: p_status_code => 'CNSUMED',
3295: p_transaction_id => l_transaction_id
3296: ) ;
3297: IF l_return_status <> fnd_api.g_ret_sts_success THEN
3298: RAISE dispense_error;
3299: END IF;
3300: ELSE
3301: -- unconsume

Line 3314: IF l_return_status <> fnd_api.g_ret_sts_success THEN

3310: p_dispense_id => l_dispense_id,
3311: p_status_code => 'REVRDISP' ,
3312: p_transaction_id => l_transaction_id
3313: ) ;
3314: IF l_return_status <> fnd_api.g_ret_sts_success THEN
3315: RAISE dispense_error;
3316: END IF;
3317: END IF;
3318: END IF ; -- dispense_ind

Line 3345: RAISE fnd_api.g_exc_error;

3341:
3342: IF NOT gme_material_details_dbl.fetch_row
3343: (p_material_detail => l_mat_dtl_rec
3344: ,x_material_detail => l_mat_dtl_rec) THEN
3345: RAISE fnd_api.g_exc_error;
3346: END IF;
3347:
3348: IF (g_debug <= gme_debug.g_log_statement) THEN
3349: gme_debug.put_line (g_pkg_name||'.'||l_api_name||':'||' mat_id '|| l_mat_dtl_rec.material_detail_id );

Line 3378: RAISE fnd_api.g_exc_error;

3374: l_mat_dtl_rec.actual_qty := ABS (l_actual_qty);
3375:
3376: IF NOT gme_material_details_dbl.update_row
3377: (p_material_detail => l_mat_dtl_rec) THEN
3378: RAISE fnd_api.g_exc_error;
3379: END IF;
3380:
3381: -- B4944024 BEGIN
3382: -- At yield, any reservations against PROD must transfer to a supply source of Inventory

Line 3415: IF x_return_status <> fnd_api.g_ret_sts_success THEN

3411: || l_api_name
3412: || ' transfer_reservation_to_inv returns '
3413: || x_return_status);
3414: END IF;
3415: IF x_return_status <> fnd_api.g_ret_sts_success THEN
3416: RAISE transfer_error; -- B4944024
3417: END IF;
3418: END IF;
3419: -- B4944024 END

Line 3434: x_return_status := fnd_api.g_ret_sts_error;

3430: END IF; -- l_exists = 0
3431: EXCEPTION
3432: WHEN dispense_error THEN
3433:
3434: x_return_status := fnd_api.g_ret_sts_error;
3435: WHEN fnd_api.g_exc_error THEN
3436: x_return_status := fnd_api.g_ret_sts_error;
3437: WHEN fnd_api.g_exc_unexpected_error THEN
3438: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 3435: WHEN fnd_api.g_exc_error THEN

3431: EXCEPTION
3432: WHEN dispense_error THEN
3433:
3434: x_return_status := fnd_api.g_ret_sts_error;
3435: WHEN fnd_api.g_exc_error THEN
3436: x_return_status := fnd_api.g_ret_sts_error;
3437: WHEN fnd_api.g_exc_unexpected_error THEN
3438: x_return_status := fnd_api.g_ret_sts_unexp_error;
3439: WHEN OTHERS THEN

Line 3436: x_return_status := fnd_api.g_ret_sts_error;

3432: WHEN dispense_error THEN
3433:
3434: x_return_status := fnd_api.g_ret_sts_error;
3435: WHEN fnd_api.g_exc_error THEN
3436: x_return_status := fnd_api.g_ret_sts_error;
3437: WHEN fnd_api.g_exc_unexpected_error THEN
3438: x_return_status := fnd_api.g_ret_sts_unexp_error;
3439: WHEN OTHERS THEN
3440: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);

Line 3437: WHEN fnd_api.g_exc_unexpected_error THEN

3433:
3434: x_return_status := fnd_api.g_ret_sts_error;
3435: WHEN fnd_api.g_exc_error THEN
3436: x_return_status := fnd_api.g_ret_sts_error;
3437: WHEN fnd_api.g_exc_unexpected_error THEN
3438: x_return_status := fnd_api.g_ret_sts_unexp_error;
3439: WHEN OTHERS THEN
3440: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
3441:

Line 3438: x_return_status := fnd_api.g_ret_sts_unexp_error;

3434: x_return_status := fnd_api.g_ret_sts_error;
3435: WHEN fnd_api.g_exc_error THEN
3436: x_return_status := fnd_api.g_ret_sts_error;
3437: WHEN fnd_api.g_exc_unexpected_error THEN
3438: x_return_status := fnd_api.g_ret_sts_unexp_error;
3439: WHEN OTHERS THEN
3440: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
3441:
3442: IF g_debug <= gme_debug.g_log_unexpected THEN

Line 3480: x_return_status := fnd_api.g_ret_sts_success;

3476: l_material_detail_id NUMBER;
3477: l_api_name CONSTANT VARCHAR2 (30) := 'purge_trans_pairs';
3478: BEGIN
3479: -- Initially let us assign the return status to success
3480: x_return_status := fnd_api.g_ret_sts_success;
3481:
3482: IF (g_debug <= gme_debug.g_log_statement) THEN
3483: gme_debug.put_line (g_pkg_name || '.' || l_api_name || ':'
3484: || 'Entering');

Line 3491: RAISE fnd_api.g_exc_error;

3487: IF p_batch_id IS NULL AND p_material_detail_id IS NULL THEN
3488: gme_common_pvt.log_message ('GME_INVALID_FIELD'
3489: ,'FIELD'
3490: ,'p_batch_id');
3491: RAISE fnd_api.g_exc_error;
3492: END IF;
3493:
3494: l_batch_id := p_batch_id;
3495: l_material_detail_id := p_material_detail_id;

Line 3533: WHEN fnd_api.g_exc_error THEN

3529: || 'Exiting with '
3530: || x_return_status);
3531: END IF;
3532: EXCEPTION
3533: WHEN fnd_api.g_exc_error THEN
3534: x_return_status := fnd_api.g_ret_sts_error;
3535: WHEN fnd_api.g_exc_unexpected_error THEN
3536: x_return_status := fnd_api.g_ret_sts_unexp_error;
3537: WHEN OTHERS THEN

Line 3534: x_return_status := fnd_api.g_ret_sts_error;

3530: || x_return_status);
3531: END IF;
3532: EXCEPTION
3533: WHEN fnd_api.g_exc_error THEN
3534: x_return_status := fnd_api.g_ret_sts_error;
3535: WHEN fnd_api.g_exc_unexpected_error THEN
3536: x_return_status := fnd_api.g_ret_sts_unexp_error;
3537: WHEN OTHERS THEN
3538: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);

Line 3535: WHEN fnd_api.g_exc_unexpected_error THEN

3531: END IF;
3532: EXCEPTION
3533: WHEN fnd_api.g_exc_error THEN
3534: x_return_status := fnd_api.g_ret_sts_error;
3535: WHEN fnd_api.g_exc_unexpected_error THEN
3536: x_return_status := fnd_api.g_ret_sts_unexp_error;
3537: WHEN OTHERS THEN
3538: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
3539:

Line 3536: x_return_status := fnd_api.g_ret_sts_unexp_error;

3532: EXCEPTION
3533: WHEN fnd_api.g_exc_error THEN
3534: x_return_status := fnd_api.g_ret_sts_error;
3535: WHEN fnd_api.g_exc_unexpected_error THEN
3536: x_return_status := fnd_api.g_ret_sts_unexp_error;
3537: WHEN OTHERS THEN
3538: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
3539:
3540: IF g_debug <= gme_debug.g_log_unexpected THEN

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

3581: +==========================================================================+ */
3582: /* Bug 5255959 added p_clear_qty_cache parameter */
3583: PROCEDURE process_transactions (
3584: p_api_version IN NUMBER := 1
3585: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
3586: ,p_commit IN VARCHAR2 := fnd_api.g_false
3587: ,p_validation_level IN NUMBER
3588: := fnd_api.g_valid_level_full
3589: ,p_table IN NUMBER := 2

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

3582: /* Bug 5255959 added p_clear_qty_cache parameter */
3583: PROCEDURE process_transactions (
3584: p_api_version IN NUMBER := 1
3585: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
3586: ,p_commit IN VARCHAR2 := fnd_api.g_false
3587: ,p_validation_level IN NUMBER
3588: := fnd_api.g_valid_level_full
3589: ,p_table IN NUMBER := 2
3590: ,p_header_id IN NUMBER

Line 3588: := fnd_api.g_valid_level_full

3584: p_api_version IN NUMBER := 1
3585: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
3586: ,p_commit IN VARCHAR2 := fnd_api.g_false
3587: ,p_validation_level IN NUMBER
3588: := fnd_api.g_valid_level_full
3589: ,p_table IN NUMBER := 2
3590: ,p_header_id IN NUMBER
3591: := gme_common_pvt.get_txn_header_id
3592: ,x_return_status OUT NOCOPY VARCHAR2

Line 3597: ,p_clear_qty_cache IN VARCHAR2 := fnd_api.g_true)

3593: ,x_msg_count OUT NOCOPY NUMBER
3594: ,x_msg_data OUT NOCOPY VARCHAR2
3595: ,x_trans_count OUT NOCOPY NUMBER
3596: --Bug#5584699 Changed variable from boolean to varchar2
3597: ,p_clear_qty_cache IN VARCHAR2 := fnd_api.g_true)
3598: --,p_clear_qty_cache IN BOOLEAN DEFAULT TRUE)
3599: IS
3600: CURSOR get_error_int
3601: IS

Line 3629: IF (p_table = 2 AND p_clear_qty_cache = fnd_api.g_true) THEN

3625: if p_table is MMTT then
3626: free the quantity tree */
3627: /* Bug 5255959 added p_clear_qty_cache condition */
3628: --Bug#5584699
3629: IF (p_table = 2 AND p_clear_qty_cache = fnd_api.g_true) THEN
3630: IF (NVL (g_debug, 0) = gme_debug.g_log_statement) THEN
3631: gme_debug.put_line
3632: ( g_pkg_name
3633: || '.'

Line 3729: RAISE fnd_api.g_exc_unexpected_error;

3725: END LOOP;
3726: END IF; -- IF p_table
3727:
3728: IF (x_return_status IS NULL OR x_return_status = 'S') THEN
3729: RAISE fnd_api.g_exc_unexpected_error;
3730: END IF;
3731: END IF;
3732: /* Bug 5903208 Start GMF code */
3733: IF x_return_status = 'S' THEN

Line 3809: p_init_msg_list => FND_API.G_FALSE,

3805: l_trans_rec.doc_qty := -1 * l_trans_rec.doc_qty;
3806:
3807: gmf_layers.Create_outgoing_Layers
3808: ( p_api_version => 1.0,
3809: p_init_msg_list => FND_API.G_FALSE,
3810: p_tran_rec => l_trans_rec,
3811: x_return_status => x_return_status,
3812: x_msg_count => x_msg_count,
3813: x_msg_data => x_msg_data);

Line 3823: p_init_msg_list => FND_API.G_FALSE,

3819: --Bug#6322202 Added the below condition for byproducts
3820: IF trans_rec.line_type <> 1 THEN
3821: gmf_layers.Create_outgoing_Layers
3822: ( p_api_version => 1.0,
3823: p_init_msg_list => FND_API.G_FALSE,
3824: p_tran_rec => l_trans_rec,
3825: x_return_status => x_return_status,
3826: x_msg_count => x_msg_count,
3827: x_msg_data => x_msg_data);

Line 3831: p_init_msg_list => FND_API.G_FALSE,

3827: x_msg_data => x_msg_data);
3828: ELSE
3829: gmf_layers.Create_Incoming_Layers
3830: ( p_api_version => 1.0,
3831: p_init_msg_list => FND_API.G_FALSE,
3832: p_tran_rec => l_trans_rec,
3833: x_return_status => x_return_status,
3834: x_msg_count => x_msg_count,
3835: x_msg_data => x_msg_data);

Line 3850: gme_common_pvt.g_batch_status_check := fnd_api.g_true;

3846: /* Bug 5903208 End GMF code */
3847:
3848: IF x_return_status = 'S' THEN
3849: gme_common_pvt.g_transaction_header_id := NULL;
3850: gme_common_pvt.g_batch_status_check := fnd_api.g_true;
3851: END IF;
3852: /* end temporary */
3853:
3854: IF (l_return = 0) AND (fnd_api.to_boolean (p_commit) ) THEN

Line 3854: IF (l_return = 0) AND (fnd_api.to_boolean (p_commit) ) THEN

3850: gme_common_pvt.g_batch_status_check := fnd_api.g_true;
3851: END IF;
3852: /* end temporary */
3853:
3854: IF (l_return = 0) AND (fnd_api.to_boolean (p_commit) ) THEN
3855: --empty the quantity tree cache
3856: IF (NVL (g_debug, 0) = gme_debug.g_log_statement) THEN
3857: gme_debug.put_line
3858: ( g_pkg_name

Line 3881: WHEN fnd_api.g_exc_error THEN

3877: || x_return_status);
3878: END IF;
3879:
3880: EXCEPTION
3881: WHEN fnd_api.g_exc_error THEN
3882: x_return_status := fnd_api.g_ret_sts_error;
3883: fnd_msg_pub.count_and_get (p_count => x_msg_count
3884: ,p_data => x_msg_data);
3885: WHEN fnd_api.g_exc_unexpected_error THEN

Line 3882: x_return_status := fnd_api.g_ret_sts_error;

3878: END IF;
3879:
3880: EXCEPTION
3881: WHEN fnd_api.g_exc_error THEN
3882: x_return_status := fnd_api.g_ret_sts_error;
3883: fnd_msg_pub.count_and_get (p_count => x_msg_count
3884: ,p_data => x_msg_data);
3885: WHEN fnd_api.g_exc_unexpected_error THEN
3886: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 3885: WHEN fnd_api.g_exc_unexpected_error THEN

3881: WHEN fnd_api.g_exc_error THEN
3882: x_return_status := fnd_api.g_ret_sts_error;
3883: fnd_msg_pub.count_and_get (p_count => x_msg_count
3884: ,p_data => x_msg_data);
3885: WHEN fnd_api.g_exc_unexpected_error THEN
3886: x_return_status := fnd_api.g_ret_sts_unexp_error;
3887:
3888: IF (NVL (g_debug, 0) > 0) THEN
3889: gme_debug.put_line ( g_pkg_name

Line 3886: x_return_status := fnd_api.g_ret_sts_unexp_error;

3882: x_return_status := fnd_api.g_ret_sts_error;
3883: fnd_msg_pub.count_and_get (p_count => x_msg_count
3884: ,p_data => x_msg_data);
3885: WHEN fnd_api.g_exc_unexpected_error THEN
3886: x_return_status := fnd_api.g_ret_sts_unexp_error;
3887:
3888: IF (NVL (g_debug, 0) > 0) THEN
3889: gme_debug.put_line ( g_pkg_name
3890: || '.'

Line 3900: x_return_status := fnd_api.g_ret_sts_unexp_error;

3896:
3897: fnd_msg_pub.count_and_get (p_count => x_msg_count
3898: ,p_data => x_msg_data);
3899: WHEN OTHERS THEN
3900: x_return_status := fnd_api.g_ret_sts_unexp_error;
3901:
3902: IF (NVL (g_debug, 0) > 0) THEN
3903: gme_debug.put_line ( g_pkg_name
3904: || '.'

Line 3924: | p_init_msg_list fnd_api.g_false or fnd_api.g_true is passed as input to determine whether to Initialize message list or not |

3920: | Query quantities at a level specified by the input
3921: |
3922: | ARGUMENTS
3923: | p_api_version API Version of this procedure. Current version is 1.0
3924: | p_init_msg_list fnd_api.g_false or fnd_api.g_true is passed as input to determine whether to Initialize message list or not |
3925: | x_return_status Returns the status to indicate success or failure of execution
3926: | x_msg_count Returns number of error message in the error message stack in case of failure
3927: | x_msg_data Returns the error message in case of failure
3928: |

Line 3939: DEFAULT fnd_api.g_false

3935: +==========================================================================+ */
3936: PROCEDURE query_quantities (
3937: p_api_version_number IN NUMBER := 1
3938: ,p_init_msg_lst IN VARCHAR2
3939: DEFAULT fnd_api.g_false
3940: ,x_return_status OUT NOCOPY VARCHAR2
3941: ,x_msg_count OUT NOCOPY NUMBER
3942: ,x_msg_data OUT NOCOPY VARCHAR2
3943: ,p_organization_id IN NUMBER

Line 4108: WHEN fnd_api.g_exc_error THEN

4104: || 'Exiting with '
4105: || x_return_status);
4106: END IF;
4107: EXCEPTION
4108: WHEN fnd_api.g_exc_error THEN
4109: x_return_status := fnd_api.g_ret_sts_error;
4110: fnd_msg_pub.count_and_get (p_count => x_msg_count
4111: ,p_data => x_msg_data);
4112: WHEN fnd_api.g_exc_unexpected_error THEN

Line 4109: x_return_status := fnd_api.g_ret_sts_error;

4105: || x_return_status);
4106: END IF;
4107: EXCEPTION
4108: WHEN fnd_api.g_exc_error THEN
4109: x_return_status := fnd_api.g_ret_sts_error;
4110: fnd_msg_pub.count_and_get (p_count => x_msg_count
4111: ,p_data => x_msg_data);
4112: WHEN fnd_api.g_exc_unexpected_error THEN
4113: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 4112: WHEN fnd_api.g_exc_unexpected_error THEN

4108: WHEN fnd_api.g_exc_error THEN
4109: x_return_status := fnd_api.g_ret_sts_error;
4110: fnd_msg_pub.count_and_get (p_count => x_msg_count
4111: ,p_data => x_msg_data);
4112: WHEN fnd_api.g_exc_unexpected_error THEN
4113: x_return_status := fnd_api.g_ret_sts_unexp_error;
4114:
4115: IF (NVL (g_debug, 0) > 0) THEN
4116: gme_debug.put_line ( g_pkg_name

Line 4113: x_return_status := fnd_api.g_ret_sts_unexp_error;

4109: x_return_status := fnd_api.g_ret_sts_error;
4110: fnd_msg_pub.count_and_get (p_count => x_msg_count
4111: ,p_data => x_msg_data);
4112: WHEN fnd_api.g_exc_unexpected_error THEN
4113: x_return_status := fnd_api.g_ret_sts_unexp_error;
4114:
4115: IF (NVL (g_debug, 0) > 0) THEN
4116: gme_debug.put_line ( g_pkg_name
4117: || '.'

Line 4127: x_return_status := fnd_api.g_ret_sts_unexp_error;

4123:
4124: fnd_msg_pub.count_and_get (p_count => x_msg_count
4125: ,p_data => x_msg_data);
4126: WHEN OTHERS THEN
4127: x_return_status := fnd_api.g_ret_sts_unexp_error;
4128:
4129: IF (NVL (g_debug, 0) > 0) THEN
4130: gme_debug.put_line ( g_pkg_name
4131: || '.'

Line 4152: | p_init_msg_list fnd_api.g_false or fnd_api.g_true is passed as input to determine whether to Initialize message list or not |

4148: | return the quantities at the level after the update
4149: |
4150: | ARGUMENTS
4151: | p_api_version API Version of this procedure. Current version is 1.0
4152: | p_init_msg_list fnd_api.g_false or fnd_api.g_true is passed as input to determine whether to Initialize message list or not |
4153: | x_return_status Returns the status to indicate success or failure of execution
4154: | x_msg_count Returns number of error message in the error message stack in case of failure
4155: | x_msg_data Returns the error message in case of failure
4156: |

Line 4167: DEFAULT fnd_api.g_false

4163: +==========================================================================+ */
4164: PROCEDURE update_quantities (
4165: p_api_version_number IN NUMBER := 1
4166: ,p_init_msg_lst IN VARCHAR2
4167: DEFAULT fnd_api.g_false
4168: ,x_return_status OUT NOCOPY VARCHAR2
4169: ,x_msg_count OUT NOCOPY NUMBER
4170: ,x_msg_data OUT NOCOPY VARCHAR2
4171: ,p_organization_id IN NUMBER

Line 4364: WHEN fnd_api.g_exc_error THEN

4360: || 'Exiting with '
4361: || x_return_status);
4362: END IF;
4363: EXCEPTION
4364: WHEN fnd_api.g_exc_error THEN
4365: x_return_status := fnd_api.g_ret_sts_error;
4366: fnd_msg_pub.count_and_get (p_count => x_msg_count
4367: ,p_data => x_msg_data);
4368: WHEN fnd_api.g_exc_unexpected_error THEN

Line 4365: x_return_status := fnd_api.g_ret_sts_error;

4361: || x_return_status);
4362: END IF;
4363: EXCEPTION
4364: WHEN fnd_api.g_exc_error THEN
4365: x_return_status := fnd_api.g_ret_sts_error;
4366: fnd_msg_pub.count_and_get (p_count => x_msg_count
4367: ,p_data => x_msg_data);
4368: WHEN fnd_api.g_exc_unexpected_error THEN
4369: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 4368: WHEN fnd_api.g_exc_unexpected_error THEN

4364: WHEN fnd_api.g_exc_error THEN
4365: x_return_status := fnd_api.g_ret_sts_error;
4366: fnd_msg_pub.count_and_get (p_count => x_msg_count
4367: ,p_data => x_msg_data);
4368: WHEN fnd_api.g_exc_unexpected_error THEN
4369: x_return_status := fnd_api.g_ret_sts_unexp_error;
4370:
4371: IF (NVL (g_debug, 0) > 0) THEN
4372: gme_debug.put_line ( g_pkg_name

Line 4369: x_return_status := fnd_api.g_ret_sts_unexp_error;

4365: x_return_status := fnd_api.g_ret_sts_error;
4366: fnd_msg_pub.count_and_get (p_count => x_msg_count
4367: ,p_data => x_msg_data);
4368: WHEN fnd_api.g_exc_unexpected_error THEN
4369: x_return_status := fnd_api.g_ret_sts_unexp_error;
4370:
4371: IF (NVL (g_debug, 0) > 0) THEN
4372: gme_debug.put_line ( g_pkg_name
4373: || '.'

Line 4383: x_return_status := fnd_api.g_ret_sts_unexp_error;

4379:
4380: fnd_msg_pub.count_and_get (p_count => x_msg_count
4381: ,p_data => x_msg_data);
4382: WHEN OTHERS THEN
4383: x_return_status := fnd_api.g_ret_sts_unexp_error;
4384:
4385: IF (NVL (g_debug, 0) > 0) THEN
4386: gme_debug.put_line ( g_pkg_name
4387: || '.'

Line 4458: x_return_status := fnd_api.g_ret_sts_success;

4454: BEGIN
4455: IF (NVL (g_debug, 0) IN (gme_debug.g_log_statement, gme_debug.g_log_procedure) ) THEN
4456: gme_debug.put_line (g_pkg_name || '.' || l_api_name || ':' || 'Entering');
4457: END IF;
4458: x_return_status := fnd_api.g_ret_sts_success;
4459: INSERT INTO mtl_transactions_interface
4460: (transaction_interface_id
4461: ,transaction_header_id
4462: ,source_code

Line 4553: x_return_status := fnd_api.g_ret_sts_unexp_error;

4549: gme_debug.put_line (g_pkg_name || '.' || l_api_name || ':' || 'Exiting');
4550: END IF;
4551: EXCEPTION
4552: WHEN OTHERS THEN
4553: x_return_status := fnd_api.g_ret_sts_unexp_error;
4554: IF (NVL (g_debug, 0) > 0) THEN
4555: gme_debug.put_line (g_pkg_name|| '.'|| l_api_name|| ':'|| 'WHEN OTHERS:'|| SQLERRM);
4556: END IF;
4557: END insert_txn_inter_hdr;

Line 4600: l_return_status VARCHAR2 (1) := fnd_api.g_ret_sts_success;

4596: FROM mtl_transaction_lot_numbers
4597: WHERE transaction_id = v_transaction_id;
4598:
4599: l_api_name CONSTANT VARCHAR2 (30) := 'GET_MMT_TRANSACTIONS';
4600: l_return_status VARCHAR2 (1) := fnd_api.g_ret_sts_success;
4601: l_transaction_id NUMBER;
4602: no_transaction_found EXCEPTION;
4603:
4604: BEGIN

Line 4605: x_return_status := fnd_api.g_ret_sts_success;

4601: l_transaction_id NUMBER;
4602: no_transaction_found EXCEPTION;
4603:
4604: BEGIN
4605: x_return_status := fnd_api.g_ret_sts_success;
4606:
4607: IF (g_debug <= gme_debug.g_log_statement) THEN
4608: gme_debug.put_line (g_pkg_name || '.' || l_api_name || ':'
4609: || 'Entering with transaction '||p_transaction_id);

Line 4641: IF l_return_status <> fnd_api.g_ret_sts_success THEN

4637: get_lot_trans (p_transaction_id => l_transaction_id
4638: ,x_mmln_tbl => x_mmln_tbl
4639: ,x_return_status => l_return_status);
4640:
4641: IF l_return_status <> fnd_api.g_ret_sts_success THEN
4642: IF (g_debug <= gme_debug.g_log_statement) THEN
4643: gme_debug.put_line (g_pkg_name || '.' || l_api_name || ':'
4644: || 'error from get lot trans');
4645: END IF;

Line 4646: RAISE fnd_api.g_exc_error;

4642: IF (g_debug <= gme_debug.g_log_statement) THEN
4643: gme_debug.put_line (g_pkg_name || '.' || l_api_name || ':'
4644: || 'error from get lot trans');
4645: END IF;
4646: RAISE fnd_api.g_exc_error;
4647: END IF;
4648: ELSE /* IF cur_get_transaction%FOUND THEN */
4649: CLOSE cur_get_transaction;
4650: gme_common_pvt.log_message ('GME_NO_TRANS_FOUND');

Line 4651: RAISE fnd_api.g_exc_error;

4647: END IF;
4648: ELSE /* IF cur_get_transaction%FOUND THEN */
4649: CLOSE cur_get_transaction;
4650: gme_common_pvt.log_message ('GME_NO_TRANS_FOUND');
4651: RAISE fnd_api.g_exc_error;
4652: END IF;
4653: CLOSE cur_get_transaction;
4654:
4655: IF (g_debug <= gme_debug.g_log_statement) THEN

Line 4673: WHEN fnd_api.g_exc_error THEN

4669: || 'Exiting with '
4670: || x_return_status);
4671: END IF;
4672: EXCEPTION
4673: WHEN fnd_api.g_exc_error THEN
4674: x_return_status := fnd_api.g_ret_sts_error;
4675: WHEN fnd_api.g_exc_unexpected_error THEN
4676: x_return_status := fnd_api.g_ret_sts_unexp_error;
4677: WHEN OTHERS THEN

Line 4674: x_return_status := fnd_api.g_ret_sts_error;

4670: || x_return_status);
4671: END IF;
4672: EXCEPTION
4673: WHEN fnd_api.g_exc_error THEN
4674: x_return_status := fnd_api.g_ret_sts_error;
4675: WHEN fnd_api.g_exc_unexpected_error THEN
4676: x_return_status := fnd_api.g_ret_sts_unexp_error;
4677: WHEN OTHERS THEN
4678: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 4675: WHEN fnd_api.g_exc_unexpected_error THEN

4671: END IF;
4672: EXCEPTION
4673: WHEN fnd_api.g_exc_error THEN
4674: x_return_status := fnd_api.g_ret_sts_error;
4675: WHEN fnd_api.g_exc_unexpected_error THEN
4676: x_return_status := fnd_api.g_ret_sts_unexp_error;
4677: WHEN OTHERS THEN
4678: x_return_status := fnd_api.g_ret_sts_unexp_error;
4679: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);

Line 4676: x_return_status := fnd_api.g_ret_sts_unexp_error;

4672: EXCEPTION
4673: WHEN fnd_api.g_exc_error THEN
4674: x_return_status := fnd_api.g_ret_sts_error;
4675: WHEN fnd_api.g_exc_unexpected_error THEN
4676: x_return_status := fnd_api.g_ret_sts_unexp_error;
4677: WHEN OTHERS THEN
4678: x_return_status := fnd_api.g_ret_sts_unexp_error;
4679: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
4680:

Line 4678: x_return_status := fnd_api.g_ret_sts_unexp_error;

4674: x_return_status := fnd_api.g_ret_sts_error;
4675: WHEN fnd_api.g_exc_unexpected_error THEN
4676: x_return_status := fnd_api.g_ret_sts_unexp_error;
4677: WHEN OTHERS THEN
4678: x_return_status := fnd_api.g_ret_sts_unexp_error;
4679: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
4680:
4681: IF (NVL (g_debug, -1) = gme_debug.g_log_unexpected) THEN
4682: gme_debug.put_line ( g_pkg_name

Line 4711: x_return_status := FND_API.G_RET_STS_SUCCESS;

4707: IF (g_debug <= gme_debug.g_log_procedure) THEN
4708: gme_debug.put_line (g_pkg_name || '.' || l_api_name || ':'|| 'Entering with organization_id = '||p_organization_id
4709: ||' inventory_item_id = '||p_inventory_item_id||' lot_number = '||p_lot_number);
4710: END IF;
4711: x_return_status := FND_API.G_RET_STS_SUCCESS;
4712: OPEN Cur_get_lot;
4713: FETCH Cur_get_lot INTO l_date;
4714: IF (Cur_get_lot%NOTFOUND) THEN
4715: CLOSE Cur_get_lot;

Line 4729: x_return_status := fnd_api.g_ret_sts_error;

4725: EXCEPTION
4726: WHEN expired_lot THEN
4727: gme_common_pvt.log_message(p_message_code => 'INV_LOT_EXPIRED',
4728: p_product_code => 'INV');
4729: x_return_status := fnd_api.g_ret_sts_error;
4730: WHEN invalid_lot THEN
4731: x_return_status := fnd_api.g_ret_sts_unexp_error;
4732: gme_common_pvt.log_message(p_message_code => 'INV_INVALID_LOT',
4733: p_product_code => 'INV');

Line 4731: x_return_status := fnd_api.g_ret_sts_unexp_error;

4727: gme_common_pvt.log_message(p_message_code => 'INV_LOT_EXPIRED',
4728: p_product_code => 'INV');
4729: x_return_status := fnd_api.g_ret_sts_error;
4730: WHEN invalid_lot THEN
4731: x_return_status := fnd_api.g_ret_sts_unexp_error;
4732: gme_common_pvt.log_message(p_message_code => 'INV_INVALID_LOT',
4733: p_product_code => 'INV');
4734: WHEN OTHERS THEN
4735: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 4735: x_return_status := fnd_api.g_ret_sts_unexp_error;

4731: x_return_status := fnd_api.g_ret_sts_unexp_error;
4732: gme_common_pvt.log_message(p_message_code => 'INV_INVALID_LOT',
4733: p_product_code => 'INV');
4734: WHEN OTHERS THEN
4735: x_return_status := fnd_api.g_ret_sts_unexp_error;
4736: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
4737: IF (NVL (g_debug, -1) = gme_debug.g_log_unexpected) THEN
4738: gme_debug.put_line ( g_pkg_name|| '.'|| l_api_name|| ':'|| 'WHEN OTHERS:'|| SQLERRM);
4739: END IF;

Line 4769: x_return_status := fnd_api.g_ret_sts_success;

4765: lot_val_err EXCEPTION;
4766: l_api_name CONSTANT VARCHAR2(30) := 'GMO_PRE_PROCESS_VAL';
4767: BEGIN
4768: -- Initially let us assign the return status to success
4769: x_return_status := fnd_api.g_ret_sts_success;
4770: IF (g_debug <= gme_debug.g_log_statement) THEN
4771: gme_debug.put_line (g_pkg_name || '.' || l_api_name || ':'|| 'Entering');
4772: END IF;
4773: IF (g_debug <= gme_debug.g_log_statement) THEN

Line 4787: RAISE fnd_api.g_exc_error;

4783: END IF;
4784: IF p_mmti_rec.transaction_source_id IS NOT NULL THEN
4785: l_batch_hdr_rec.batch_id := p_mmti_rec.transaction_source_id;
4786: IF NOT gme_batch_header_dbl.fetch_row(l_batch_hdr_rec, l_batch_hdr_rec) THEN
4787: RAISE fnd_api.g_exc_error;
4788: END IF;
4789: ELSE
4790: RAISE fnd_api.g_exc_error;
4791: END IF; -- transaction_source_id IS NOT NULL

Line 4790: RAISE fnd_api.g_exc_error;

4786: IF NOT gme_batch_header_dbl.fetch_row(l_batch_hdr_rec, l_batch_hdr_rec) THEN
4787: RAISE fnd_api.g_exc_error;
4788: END IF;
4789: ELSE
4790: RAISE fnd_api.g_exc_error;
4791: END IF; -- transaction_source_id IS NOT NULL
4792:
4793: IF l_batch_hdr_rec.update_inventory_ind = 'Y' THEN
4794: IF p_mmti_rec.trx_source_line_id IS NOT NULL THEN

Line 4797: RAISE fnd_api.g_exc_error;

4793: IF l_batch_hdr_rec.update_inventory_ind = 'Y' THEN
4794: IF p_mmti_rec.trx_source_line_id IS NOT NULL THEN
4795: l_mat_dtl_rec.material_detail_id := p_mmti_rec.trx_source_line_id;
4796: IF NOT gme_material_details_dbl.fetch_row(l_mat_dtl_rec, l_mat_dtl_rec) THEN
4797: RAISE fnd_api.g_exc_error;
4798: END IF; -- material fetch
4799: ELSE
4800: RAISE fnd_api.g_exc_error;
4801: END IF; -- trx_source_line_id IS NOT NULL

Line 4800: RAISE fnd_api.g_exc_error;

4796: IF NOT gme_material_details_dbl.fetch_row(l_mat_dtl_rec, l_mat_dtl_rec) THEN
4797: RAISE fnd_api.g_exc_error;
4798: END IF; -- material fetch
4799: ELSE
4800: RAISE fnd_api.g_exc_error;
4801: END IF; -- trx_source_line_id IS NOT NULL
4802: IF gme_common_pvt.g_batch_status_check = fnd_api.g_true THEN
4803: IF l_batch_hdr_rec.batch_status NOT IN (2, 3) THEN
4804: gme_common_pvt.log_message ('GME_INVALID_BATCH_STATUS');

Line 4802: IF gme_common_pvt.g_batch_status_check = fnd_api.g_true THEN

4798: END IF; -- material fetch
4799: ELSE
4800: RAISE fnd_api.g_exc_error;
4801: END IF; -- trx_source_line_id IS NOT NULL
4802: IF gme_common_pvt.g_batch_status_check = fnd_api.g_true THEN
4803: IF l_batch_hdr_rec.batch_status NOT IN (2, 3) THEN
4804: gme_common_pvt.log_message ('GME_INVALID_BATCH_STATUS');
4805: RAISE fnd_api.g_exc_error;
4806: END IF;

Line 4805: RAISE fnd_api.g_exc_error;

4801: END IF; -- trx_source_line_id IS NOT NULL
4802: IF gme_common_pvt.g_batch_status_check = fnd_api.g_true THEN
4803: IF l_batch_hdr_rec.batch_status NOT IN (2, 3) THEN
4804: gme_common_pvt.log_message ('GME_INVALID_BATCH_STATUS');
4805: RAISE fnd_api.g_exc_error;
4806: END IF;
4807: -- Check for step status in case the item is associated to a step.
4808: l_rel_type := gme_common_pvt.is_material_auto_release(l_mat_dtl_rec.material_detail_id);
4809: IF (l_rel_type = gme_common_pvt.g_mtl_autobystep_release) THEN

Line 4815: RAISE fnd_api.g_exc_error;

4811: FETCH Cur_associated_step INTO l_step_status;
4812: CLOSE Cur_associated_step;
4813: IF l_step_status NOT IN (2,3) THEN
4814: gme_common_pvt.log_message ('GME_API_INVALID_STEP_STATUS');
4815: RAISE fnd_api.g_exc_error;
4816: END IF;
4817: END IF; -- IF ( l_rel_type = gme_common_pvt.g_mtl_autobystep_release ) THEN
4818: -- check for item release type for products
4819: IF (l_rel_type = gme_common_pvt.g_mtl_auto_release AND l_mat_dtl_rec.line_type IN (1,2) AND l_mat_dtl_rec.phantom_line_id IS NULL) THEN

Line 4822: RAISE fnd_api.g_exc_error;

4818: -- check for item release type for products
4819: IF (l_rel_type = gme_common_pvt.g_mtl_auto_release AND l_mat_dtl_rec.line_type IN (1,2) AND l_mat_dtl_rec.phantom_line_id IS NULL) THEN
4820: IF l_batch_hdr_rec.batch_status <> 3 THEN
4821: gme_common_pvt.log_message('GME_INVALID_BATCH_STATUS');
4822: RAISE fnd_api.g_exc_error;
4823: END IF;
4824: END IF;
4825: END IF; -- gme_common_pvt.g_batch_status_check
4826: IF (l_mat_dtl_rec.line_type <> -1 AND p_mmti_rec.transaction_type_id IN (gme_common_pvt.g_ing_issue, gme_common_pvt.g_ing_return))

Line 4830: RAISE fnd_api.g_exc_error;

4826: IF (l_mat_dtl_rec.line_type <> -1 AND p_mmti_rec.transaction_type_id IN (gme_common_pvt.g_ing_issue, gme_common_pvt.g_ing_return))
4827: OR (l_mat_dtl_rec.line_type <> 1 AND p_mmti_rec.transaction_type_id IN (gme_common_pvt.g_prod_completion, gme_common_pvt.g_prod_return))
4828: OR (l_mat_dtl_rec.line_type <> 2 AND p_mmti_rec.transaction_type_id IN (gme_common_pvt.g_byprod_completion, gme_common_pvt.g_byprod_return)) THEN
4829: gme_common_pvt.log_message ('GME_LINE_TYPE_TXN_TYPE_DIFF');
4830: RAISE fnd_api.g_exc_error;
4831: END IF;
4832: -- get the item propertites
4833: OPEN cur_get_item_rec (p_mmti_rec.inventory_item_id, p_mmti_rec.organization_id);
4834: FETCH cur_get_item_rec INTO l_item_rec;

Line 4858: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

4854: gme_transactions_pvt.validate_lot_for_ing(p_organization_id => p_mmti_rec.organization_id,
4855: p_inventory_item_id => p_mmti_rec.inventory_item_id,
4856: p_lot_number => p_mmli_tbl(i).lot_number,
4857: x_return_status => l_return_status);
4858: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
4859: RAISE lot_val_err;
4860: END IF;
4861: END LOOP;
4862: END IF;

Line 4877: IF x_return_status <> fnd_api.g_ret_sts_success THEN

4873: ,p_lot_number => NULL
4874: ,p_lot_control => l_item_rec.lot_control_code
4875: ,x_available_qty => l_available_qty
4876: ,x_return_status => x_return_status);
4877: IF x_return_status <> fnd_api.g_ret_sts_success THEN
4878: RAISE fnd_api.g_exc_unexpected_error;
4879: END IF;
4880: IF (g_debug <= gme_debug.g_log_statement) THEN
4881: gme_debug.put_line(g_pkg_name|| '.'|| l_api_name|| ':'|| 'Returning Qty '|| p_mmti_rec.transaction_quantity);

Line 4878: RAISE fnd_api.g_exc_unexpected_error;

4874: ,p_lot_control => l_item_rec.lot_control_code
4875: ,x_available_qty => l_available_qty
4876: ,x_return_status => x_return_status);
4877: IF x_return_status <> fnd_api.g_ret_sts_success THEN
4878: RAISE fnd_api.g_exc_unexpected_error;
4879: END IF;
4880: IF (g_debug <= gme_debug.g_log_statement) THEN
4881: gme_debug.put_line(g_pkg_name|| '.'|| l_api_name|| ':'|| 'Returning Qty '|| p_mmti_rec.transaction_quantity);
4882: gme_debug.put_line(g_pkg_name|| '.'|| l_api_name|| ':'|| 'Available to Return '|| l_available_qty);

Line 4886: RAISE fnd_api.g_exc_error;

4882: gme_debug.put_line(g_pkg_name|| '.'|| l_api_name|| ':'|| 'Available to Return '|| l_available_qty);
4883: END IF;
4884: IF ABS (l_available_qty) < ABS (p_mmti_rec.transaction_quantity) THEN
4885: gme_common_pvt.log_message ('GME_QTY_LESS_THEN_ISSUED');
4886: RAISE fnd_api.g_exc_error;
4887: END IF;
4888: ELSE /* Lot Control */
4889: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
4890: gme_debug.put_line(g_pkg_name|| '.'|| l_api_name|| ':'|| 'Item is lot control: '|| l_item_rec.lot_control_code);

Line 4898: IF x_return_Status <> fnd_api.g_ret_sts_success THEN

4894: ,p_lot_number => p_mmli_tbl(i).lot_number
4895: ,p_lot_control => l_item_rec.lot_control_code
4896: ,x_available_qty => l_available_qty
4897: ,x_return_status => x_return_status);
4898: IF x_return_Status <> fnd_api.g_ret_sts_success THEN
4899: RAISE fnd_api.g_exc_unexpected_error;
4900: END IF;
4901: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
4902: gme_debug.put_line(g_pkg_name|| '.'|| l_api_name|| ':'|| 'Returning qty: '|| p_mmli_tbl(i).transaction_quantity);

Line 4899: RAISE fnd_api.g_exc_unexpected_error;

4895: ,p_lot_control => l_item_rec.lot_control_code
4896: ,x_available_qty => l_available_qty
4897: ,x_return_status => x_return_status);
4898: IF x_return_Status <> fnd_api.g_ret_sts_success THEN
4899: RAISE fnd_api.g_exc_unexpected_error;
4900: END IF;
4901: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
4902: gme_debug.put_line(g_pkg_name|| '.'|| l_api_name|| ':'|| 'Returning qty: '|| p_mmli_tbl(i).transaction_quantity);
4903: gme_debug.put_line(g_pkg_name|| '.'|| l_api_name|| ':'|| 'Available to Return '|| l_available_qty);

Line 4907: RAISE fnd_api.g_exc_error;

4903: gme_debug.put_line(g_pkg_name|| '.'|| l_api_name|| ':'|| 'Available to Return '|| l_available_qty);
4904: END IF;
4905: IF ABS(l_available_qty) < ABS(p_mmli_tbl(i).transaction_quantity) THEN
4906: gme_common_pvt.log_message ('GME_QTY_LESS_THEN_ISSUED');
4907: RAISE fnd_api.g_exc_error;
4908: END IF;
4909: END LOOP;
4910: END IF; /* IF l_item_rec.lot_control_code = 1 THEN */
4911: END IF; /* IF transaction_type_id in RETURNS */

Line 4919: WHEN fnd_api.g_exc_error THEN

4915: END IF;
4916: EXCEPTION
4917: WHEN lot_val_err THEN
4918: x_return_status := l_return_status;
4919: WHEN fnd_api.g_exc_error THEN
4920: x_return_status := fnd_api.g_ret_sts_error;
4921: WHEN fnd_api.g_exc_unexpected_error THEN
4922: x_return_status := fnd_api.g_ret_sts_unexp_error;
4923: WHEN OTHERS THEN

Line 4920: x_return_status := fnd_api.g_ret_sts_error;

4916: EXCEPTION
4917: WHEN lot_val_err THEN
4918: x_return_status := l_return_status;
4919: WHEN fnd_api.g_exc_error THEN
4920: x_return_status := fnd_api.g_ret_sts_error;
4921: WHEN fnd_api.g_exc_unexpected_error THEN
4922: x_return_status := fnd_api.g_ret_sts_unexp_error;
4923: WHEN OTHERS THEN
4924: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 4921: WHEN fnd_api.g_exc_unexpected_error THEN

4917: WHEN lot_val_err THEN
4918: x_return_status := l_return_status;
4919: WHEN fnd_api.g_exc_error THEN
4920: x_return_status := fnd_api.g_ret_sts_error;
4921: WHEN fnd_api.g_exc_unexpected_error THEN
4922: x_return_status := fnd_api.g_ret_sts_unexp_error;
4923: WHEN OTHERS THEN
4924: x_return_status := fnd_api.g_ret_sts_unexp_error;
4925: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);

Line 4922: x_return_status := fnd_api.g_ret_sts_unexp_error;

4918: x_return_status := l_return_status;
4919: WHEN fnd_api.g_exc_error THEN
4920: x_return_status := fnd_api.g_ret_sts_error;
4921: WHEN fnd_api.g_exc_unexpected_error THEN
4922: x_return_status := fnd_api.g_ret_sts_unexp_error;
4923: WHEN OTHERS THEN
4924: x_return_status := fnd_api.g_ret_sts_unexp_error;
4925: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
4926: IF (NVL (g_debug, -1) = gme_debug.g_log_unexpected) THEN

Line 4924: x_return_status := fnd_api.g_ret_sts_unexp_error;

4920: x_return_status := fnd_api.g_ret_sts_error;
4921: WHEN fnd_api.g_exc_unexpected_error THEN
4922: x_return_status := fnd_api.g_ret_sts_unexp_error;
4923: WHEN OTHERS THEN
4924: x_return_status := fnd_api.g_ret_sts_unexp_error;
4925: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
4926: IF (NVL (g_debug, -1) = gme_debug.g_log_unexpected) THEN
4927: gme_debug.put_line(g_pkg_name|| '.'|| l_api_name|| ':'|| 'WHEN OTHERS:'|| SQLERRM);
4928: END IF;