DBA Data[Home] [Help]

APPS.GME_INCREMENTAL_BACKFLUSH_PVT dependencies on GME_COMMON_PVT

Line 67: ,x_exception_material_tbl IN OUT NOCOPY gme_common_pvt.exceptions_tab

63: ,p_qty IN NUMBER
64: ,p_qty_type IN NUMBER
65: ,p_trans_date IN DATE
66: ,p_backflush_rsrc_usg_ind IN NUMBER
67: ,x_exception_material_tbl IN OUT NOCOPY gme_common_pvt.exceptions_tab
68: ,x_return_status OUT NOCOPY VARCHAR2) IS
69:
70: l_api_name CONSTANT VARCHAR2(30) := 'incremental_backflush';
71:

Line 76: AND (release_type = gme_common_pvt.g_mtl_incremental_release

72: CURSOR Cur_fetch_incr_mat_dtl(v_batch_id NUMBER, v_matl_dtl_id NUMBER) IS
73: SELECT *
74: FROM gme_material_details
75: WHERE batch_id = v_batch_id
76: AND (release_type = gme_common_pvt.g_mtl_incremental_release
77: OR
78: (release_type = gme_common_pvt.g_mtl_manual_release AND material_detail_id = v_matl_dtl_id)
79: )
80: AND wip_plan_qty <> 0

Line 78: (release_type = gme_common_pvt.g_mtl_manual_release AND material_detail_id = v_matl_dtl_id)

74: FROM gme_material_details
75: WHERE batch_id = v_batch_id
76: AND (release_type = gme_common_pvt.g_mtl_incremental_release
77: OR
78: (release_type = gme_common_pvt.g_mtl_manual_release AND material_detail_id = v_matl_dtl_id)
79: )
80: AND wip_plan_qty <> 0
81: ORDER BY line_type,line_no;
82:

Line 97: AND s.step_status = gme_common_pvt.g_step_wip;

93: WHERE m.batch_id = V_batch_id
94: AND m.material_detail_id = V_material_detail_id
95: AND s.batch_id = m.batch_id
96: AND s.batchstep_id = m.batchstep_id
97: AND s.step_status = gme_common_pvt.g_step_wip;
98:
99: --FPBug#4667093 get the IB Factor settings
100: CURSOR Cur_ib_factor(V_org_id VARCHAR2) IS
101: SELECT ib_factor_ind

Line 112: l_material_detail_tbl gme_common_pvt.material_details_tab;

108: l_batch_header_rec gme_batch_header%ROWTYPE;
109: l_material_detail_rec gme_material_details%ROWTYPE;
110: l_in_material_detail_rec gme_material_details%ROWTYPE;
111: l_phantom_material_rec gme_material_details%ROWTYPE;
112: l_material_detail_tbl gme_common_pvt.material_details_tab;
113:
114: l_batch_step_rec gme_batch_steps%ROWTYPE;
115: l_in_batch_step_rec gme_batch_steps%ROWTYPE;
116: l_step_tbl gme_common_pvt.steps_tab;

Line 116: l_step_tbl gme_common_pvt.steps_tab;

112: l_material_detail_tbl gme_common_pvt.material_details_tab;
113:
114: l_batch_step_rec gme_batch_steps%ROWTYPE;
115: l_in_batch_step_rec gme_batch_steps%ROWTYPE;
116: l_step_tbl gme_common_pvt.steps_tab;
117:
118: l_incr_qty NUMBER;
119: l_decr_qty NUMBER;
120: l_incr_factor NUMBER;

Line 167: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' gme_common_pvt.g_move_to_temp='||gme_common_pvt.g_move_to_temp);

163: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_trans_date IS NULL');
164: ELSE
165: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_trans_date='||to_char(p_trans_date, 'YYYY-MON-DD HH24:MI:SS'));
166: END IF;
167: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' gme_common_pvt.g_move_to_temp='||gme_common_pvt.g_move_to_temp);
168: END IF;
169:
170: /* Set the return status to success initially */
171: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 387: IF l_return_status NOT IN (FND_API.G_RET_STS_SUCCESS, gme_common_pvt.g_exceptions_err) THEN

383: ,p_backflush_rsrc_usg_ind => p_backflush_rsrc_usg_ind
384: ,x_exception_material_tbl => x_exception_material_tbl
385: ,x_return_status => l_return_status);
386:
387: IF l_return_status NOT IN (FND_API.G_RET_STS_SUCCESS, gme_common_pvt.g_exceptions_err) THEN
388: x_return_status := l_return_status;
389: RAISE error_phantom_backflush;
390: END IF;
391:

Line 392: IF l_return_status = gme_common_pvt.g_exceptions_err THEN

388: x_return_status := l_return_status;
389: RAISE error_phantom_backflush;
390: END IF;
391:
392: IF l_return_status = gme_common_pvt.g_exceptions_err THEN
393: x_return_status := gme_common_pvt.g_exceptions_err;
394: END IF;
395: ELSIF l_batch_header_rec.update_inventory_ind = 'Y' AND
396: l_item_rec.mtl_transactions_enabled_flag = 'Y' THEN

Line 393: x_return_status := gme_common_pvt.g_exceptions_err;

389: RAISE error_phantom_backflush;
390: END IF;
391:
392: IF l_return_status = gme_common_pvt.g_exceptions_err THEN
393: x_return_status := gme_common_pvt.g_exceptions_err;
394: END IF;
395: ELSIF l_batch_header_rec.update_inventory_ind = 'Y' AND
396: l_item_rec.mtl_transactions_enabled_flag = 'Y' THEN
397: IF l_new_actual = 0 THEN

Line 411: IF l_return_status NOT IN (FND_API.G_RET_STS_SUCCESS, gme_common_pvt.g_exceptions_err) THEN

407: ,x_actual_qty => l_actual_qty
408: ,x_exception_material_tbl => x_exception_material_tbl
409: ,x_return_status => l_return_status);
410:
411: IF l_return_status NOT IN (FND_API.G_RET_STS_SUCCESS, gme_common_pvt.g_exceptions_err) THEN
412: x_return_status := l_return_status;
413: RAISE error_revert_matl_full;
414: END IF;
415:

Line 416: IF l_return_status = gme_common_pvt.g_exceptions_err THEN

412: x_return_status := l_return_status;
413: RAISE error_revert_matl_full;
414: END IF;
415:
416: IF l_return_status = gme_common_pvt.g_exceptions_err THEN
417: x_return_status := gme_common_pvt.g_exceptions_err;
418: END IF;
419:
420: l_upd_material := TRUE;

Line 417: x_return_status := gme_common_pvt.g_exceptions_err;

413: RAISE error_revert_matl_full;
414: END IF;
415:
416: IF l_return_status = gme_common_pvt.g_exceptions_err THEN
417: x_return_status := gme_common_pvt.g_exceptions_err;
418: END IF;
419:
420: l_upd_material := TRUE;
421: ELSIF l_incr_qty < 0 THEN

Line 436: IF l_return_status NOT IN (FND_API.G_RET_STS_SUCCESS, gme_common_pvt.g_exceptions_err) THEN

432: ,p_lot_divisible_flag => l_lot_divisible_flag
433: ,x_actual_qty => l_actual_qty
434: ,x_exception_material_tbl => x_exception_material_tbl
435: ,x_return_status => l_return_status);
436: IF l_return_status NOT IN (FND_API.G_RET_STS_SUCCESS, gme_common_pvt.g_exceptions_err) THEN
437: x_return_status := l_return_status;
438: RAISE error_revert_matl_part;
439: END IF;
440:

Line 441: IF l_return_status = gme_common_pvt.g_exceptions_err THEN

437: x_return_status := l_return_status;
438: RAISE error_revert_matl_part;
439: END IF;
440:
441: IF l_return_status = gme_common_pvt.g_exceptions_err THEN
442: x_return_status := gme_common_pvt.g_exceptions_err;
443: END IF;
444: l_upd_material := TRUE;
445: ELSIF l_incr_qty = 0 THEN

Line 442: x_return_status := gme_common_pvt.g_exceptions_err;

438: RAISE error_revert_matl_part;
439: END IF;
440:
441: IF l_return_status = gme_common_pvt.g_exceptions_err THEN
442: x_return_status := gme_common_pvt.g_exceptions_err;
443: END IF;
444: l_upd_material := TRUE;
445: ELSIF l_incr_qty = 0 THEN
446: -- nothing to do

Line 453: IF l_material_detail_rec.line_type = gme_common_pvt.g_line_type_ing THEN

449: END IF;
450: l_upd_material := FALSE;
451: ELSE
452: -- consume or yield based on line type
453: IF l_material_detail_rec.line_type = gme_common_pvt.g_line_type_ing THEN
454: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
455: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' calling gme_release_batch_pvt.consume_material with target_qty= '||l_new_actual);
456: END IF;
457: gme_release_batch_pvt.consume_material

Line 480: IF l_return_status NOT IN (FND_API.G_RET_STS_SUCCESS, gme_common_pvt.g_exceptions_err) THEN

476: ,x_actual_qty => l_actual_qty
477: ,x_return_status => l_return_status);
478: END IF;
479:
480: IF l_return_status NOT IN (FND_API.G_RET_STS_SUCCESS, gme_common_pvt.g_exceptions_err) THEN
481: x_return_status := l_return_status;
482: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
483: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' raising exception with x_return_status= '||x_return_status);
484: END IF;

Line 488: IF l_return_status = gme_common_pvt.g_exceptions_err THEN

484: END IF;
485: RAISE error_consum_yield;
486: END IF;
487:
488: IF l_return_status = gme_common_pvt.g_exceptions_err THEN
489: x_return_status := gme_common_pvt.g_exceptions_err;
490: END IF;
491: l_upd_material := TRUE;
492: END IF; -- IF l_new_actual = 0 THEN

Line 489: x_return_status := gme_common_pvt.g_exceptions_err;

485: RAISE error_consum_yield;
486: END IF;
487:
488: IF l_return_status = gme_common_pvt.g_exceptions_err THEN
489: x_return_status := gme_common_pvt.g_exceptions_err;
490: END IF;
491: l_upd_material := TRUE;
492: END IF; -- IF l_new_actual = 0 THEN
493:

Line 576: gme_common_pvt.log_message ('GME_UNEXPECTED_ERROR', 'ERROR', SQLERRM);

572: END IF;
573:
574: EXCEPTION
575: WHEN error_fetch_batch OR error_fetch_matl OR error_update_row THEN
576: gme_common_pvt.log_message ('GME_UNEXPECTED_ERROR', 'ERROR', SQLERRM);
577: x_return_status := FND_API.g_ret_sts_unexp_error;
578: WHEN error_cant_go_neg THEN
579: gme_common_pvt.log_message ('GME_API_ACTUAL_CANT_GO_NEG');
580: x_return_status := FND_API.g_ret_sts_error;

Line 579: gme_common_pvt.log_message ('GME_API_ACTUAL_CANT_GO_NEG');

575: WHEN error_fetch_batch OR error_fetch_matl OR error_update_row THEN
576: gme_common_pvt.log_message ('GME_UNEXPECTED_ERROR', 'ERROR', SQLERRM);
577: x_return_status := FND_API.g_ret_sts_unexp_error;
578: WHEN error_cant_go_neg THEN
579: gme_common_pvt.log_message ('GME_API_ACTUAL_CANT_GO_NEG');
580: x_return_status := FND_API.g_ret_sts_error;
581: WHEN error_derive_factor OR error_get_item OR error_phantom_backflush OR
582: error_revert_matl_full OR error_consum_yield OR error_revert_matl_part THEN
583: NULL;

Line 760: IF (get_rec.step_status = gme_common_pvt.g_step_wip) THEN

756: -- If dependency is start to start and step is WIP then apply factor and process steps that
757: -- this step is dependent on, Pending and completed steps will not be touched
758: -- If dependency is finish to start and step is WIP then apply 100% of plan to actual and process steps that
759: -- this step is dependent on, Pending and completed steps will not be touched
760: IF (get_rec.step_status = gme_common_pvt.g_step_wip) THEN
761: IF (get_rec.dep_type = gme_common_pvt.g_dep_type_finish_start) THEN
762: l_backflush_factor := 1;
763: ELSE
764: l_backflush_factor := p_backflush_factor;

Line 761: IF (get_rec.dep_type = gme_common_pvt.g_dep_type_finish_start) THEN

757: -- this step is dependent on, Pending and completed steps will not be touched
758: -- If dependency is finish to start and step is WIP then apply 100% of plan to actual and process steps that
759: -- this step is dependent on, Pending and completed steps will not be touched
760: IF (get_rec.step_status = gme_common_pvt.g_step_wip) THEN
761: IF (get_rec.dep_type = gme_common_pvt.g_dep_type_finish_start) THEN
762: l_backflush_factor := 1;
763: ELSE
764: l_backflush_factor := p_backflush_factor;
765: END IF;

Line 813: ,x_exception_material_tbl IN OUT NOCOPY gme_common_pvt.exceptions_tab

809: ,p_lot_control_code IN NUMBER -- 1 = not lot control; 2 = lot control
810: ,p_create_resv_pend_lots IN NUMBER
811: ,p_lot_divisible_flag IN VARCHAR2
812: ,x_actual_qty OUT NOCOPY NUMBER
813: ,x_exception_material_tbl IN OUT NOCOPY gme_common_pvt.exceptions_tab
814: ,x_return_status OUT NOCOPY VARCHAR2) IS
815:
816: CURSOR cur_lot_qty
817: (v_item_id IN NUMBER

Line 829: AND m.transaction_source_type_id = gme_common_pvt.g_txn_source_type

825: AND m.inventory_item_id = v_item_id
826: AND m.organization_id = v_organization_id
827: AND m.transaction_source_id = v_batch_id
828: AND m.trx_source_line_id = v_mat_det_id
829: AND m.transaction_source_type_id = gme_common_pvt.g_txn_source_type
830: GROUP BY l.lot_number;
831:
832: TYPE lot_qty_tab IS TABLE OF NUMBER INDEX BY mtl_transaction_lot_numbers.lot_number%TYPE;
833:

Line 856: l_mmt_tbl gme_common_pvt.mtl_mat_tran_tbl;

852: j NUMBER;
853: k NUMBER;
854:
855: l_mmt_rec mtl_material_transactions%ROWTYPE;
856: l_mmt_tbl gme_common_pvt.mtl_mat_tran_tbl;
857:
858: l_mmln_tbl gme_common_pvt.mtl_trans_lots_num_tbl;
859: l_mmln_tbl_orig gme_common_pvt.mtl_trans_lots_num_tbl;
860: l_mmln_tbl_new gme_common_pvt.mtl_trans_lots_num_tbl;

Line 858: l_mmln_tbl gme_common_pvt.mtl_trans_lots_num_tbl;

854:
855: l_mmt_rec mtl_material_transactions%ROWTYPE;
856: l_mmt_tbl gme_common_pvt.mtl_mat_tran_tbl;
857:
858: l_mmln_tbl gme_common_pvt.mtl_trans_lots_num_tbl;
859: l_mmln_tbl_orig gme_common_pvt.mtl_trans_lots_num_tbl;
860: l_mmln_tbl_new gme_common_pvt.mtl_trans_lots_num_tbl;
861: ln mtl_transaction_lot_numbers.lot_number%TYPE;
862: l_lot_number mtl_transaction_lot_numbers.lot_number%TYPE;

Line 859: l_mmln_tbl_orig gme_common_pvt.mtl_trans_lots_num_tbl;

855: l_mmt_rec mtl_material_transactions%ROWTYPE;
856: l_mmt_tbl gme_common_pvt.mtl_mat_tran_tbl;
857:
858: l_mmln_tbl gme_common_pvt.mtl_trans_lots_num_tbl;
859: l_mmln_tbl_orig gme_common_pvt.mtl_trans_lots_num_tbl;
860: l_mmln_tbl_new gme_common_pvt.mtl_trans_lots_num_tbl;
861: ln mtl_transaction_lot_numbers.lot_number%TYPE;
862: l_lot_number mtl_transaction_lot_numbers.lot_number%TYPE;
863: /* Jalaj Srivastava Bug 5021522*/

Line 860: l_mmln_tbl_new gme_common_pvt.mtl_trans_lots_num_tbl;

856: l_mmt_tbl gme_common_pvt.mtl_mat_tran_tbl;
857:
858: l_mmln_tbl gme_common_pvt.mtl_trans_lots_num_tbl;
859: l_mmln_tbl_orig gme_common_pvt.mtl_trans_lots_num_tbl;
860: l_mmln_tbl_new gme_common_pvt.mtl_trans_lots_num_tbl;
861: ln mtl_transaction_lot_numbers.lot_number%TYPE;
862: l_lot_number mtl_transaction_lot_numbers.lot_number%TYPE;
863: /* Jalaj Srivastava Bug 5021522*/
864: l_item_no varchar2(2000);

Line 910: IF p_material_detail_rec.line_type = gme_common_pvt.g_line_type_prod THEN

906: l_mmt_tbl(i).transaction_quantity := ABS(l_mmt_tbl(i).transaction_quantity);
907: END LOOP;
908:
909: -- set the transaction type to consider for deleting/updating
910: IF p_material_detail_rec.line_type = gme_common_pvt.g_line_type_prod THEN
911: l_trxn_type := gme_common_pvt.g_prod_completion;
912: ELSIF p_material_detail_rec.line_type = gme_common_pvt.g_line_type_byprod THEN
913: l_trxn_type := gme_common_pvt.g_byprod_completion;
914: ELSE

Line 911: l_trxn_type := gme_common_pvt.g_prod_completion;

907: END LOOP;
908:
909: -- set the transaction type to consider for deleting/updating
910: IF p_material_detail_rec.line_type = gme_common_pvt.g_line_type_prod THEN
911: l_trxn_type := gme_common_pvt.g_prod_completion;
912: ELSIF p_material_detail_rec.line_type = gme_common_pvt.g_line_type_byprod THEN
913: l_trxn_type := gme_common_pvt.g_byprod_completion;
914: ELSE
915: l_trxn_type := gme_common_pvt.g_ing_issue;

Line 912: ELSIF p_material_detail_rec.line_type = gme_common_pvt.g_line_type_byprod THEN

908:
909: -- set the transaction type to consider for deleting/updating
910: IF p_material_detail_rec.line_type = gme_common_pvt.g_line_type_prod THEN
911: l_trxn_type := gme_common_pvt.g_prod_completion;
912: ELSIF p_material_detail_rec.line_type = gme_common_pvt.g_line_type_byprod THEN
913: l_trxn_type := gme_common_pvt.g_byprod_completion;
914: ELSE
915: l_trxn_type := gme_common_pvt.g_ing_issue;
916: END IF;

Line 913: l_trxn_type := gme_common_pvt.g_byprod_completion;

909: -- set the transaction type to consider for deleting/updating
910: IF p_material_detail_rec.line_type = gme_common_pvt.g_line_type_prod THEN
911: l_trxn_type := gme_common_pvt.g_prod_completion;
912: ELSIF p_material_detail_rec.line_type = gme_common_pvt.g_line_type_byprod THEN
913: l_trxn_type := gme_common_pvt.g_byprod_completion;
914: ELSE
915: l_trxn_type := gme_common_pvt.g_ing_issue;
916: END IF;
917:

Line 915: l_trxn_type := gme_common_pvt.g_ing_issue;

911: l_trxn_type := gme_common_pvt.g_prod_completion;
912: ELSIF p_material_detail_rec.line_type = gme_common_pvt.g_line_type_byprod THEN
913: l_trxn_type := gme_common_pvt.g_byprod_completion;
914: ELSE
915: l_trxn_type := gme_common_pvt.g_ing_issue;
916: END IF;
917:
918: /* Jalaj Srivastava Bug 5021522
919: get item_no only for prod/byprod.

Line 921: IF (l_trxn_type IN (gme_common_pvt.g_prod_completion, gme_common_pvt.g_byprod_completion)) THEN

917:
918: /* Jalaj Srivastava Bug 5021522
919: get item_no only for prod/byprod.
920: In IB, there is no ing return transaction*/
921: IF (l_trxn_type IN (gme_common_pvt.g_prod_completion, gme_common_pvt.g_byprod_completion)) THEN
922: SELECT concatenated_segments
923: INTO l_item_no
924: FROM mtl_system_items_kfv
925: WHERE inventory_item_id = p_material_detail_rec.inventory_item_id

Line 929: IF p_material_detail_rec.line_type = gme_common_pvt.g_line_type_ing THEN

925: WHERE inventory_item_id = p_material_detail_rec.inventory_item_id
926: AND organization_id = p_material_detail_rec.organization_id;
927: END IF;
928:
929: IF p_material_detail_rec.line_type = gme_common_pvt.g_line_type_ing THEN
930: IF p_lot_divisible_flag = 'N' THEN
931: l_whole_qty := TRUE;
932: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
933: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' l_whole_qty = TRUE because lot indivisible item');

Line 985: IF (l_trxn_type IN (gme_common_pvt.g_prod_completion, gme_common_pvt.g_byprod_completion)) THEN

981: IF l_trxn_qty <= l_qty OR l_whole_qty THEN
982: /* Jalaj Srivastava Bug 5021522
983: call check_inv_negative only for prod/byprod.
984: in IB, there is no ing return transaction*/
985: IF (l_trxn_type IN (gme_common_pvt.g_prod_completion, gme_common_pvt.g_byprod_completion)) THEN
986: IF gme_unrelease_batch_pvt.check_inv_negative
987: ( p_mmt_rec => l_mmt_rec
988: ,p_mmln_tbl => l_mmln_tbl
989: ,p_item_no => l_item_no) THEN

Line 1003: IF l_return_status = gme_common_pvt.g_not_transactable THEN

999: (p_transaction_id => l_mmt_rec.transaction_id
1000: ,p_txns_pair => NULL
1001: ,x_return_status => l_return_status);
1002:
1003: IF l_return_status = gme_common_pvt.g_not_transactable THEN
1004: -- do nothing... move on to the next, to try to reduce
1005: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
1006: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; gme_transactions_pvt.delete_material_txn returned '||l_return_status);
1007: END IF;

Line 1036: IF (l_trxn_type IN (gme_common_pvt.g_prod_completion, gme_common_pvt.g_byprod_completion)) THEN

1032:
1033: /* Jalaj Srivastava Bug 5021522
1034: call check_inv_negative only for prod/byprod.
1035: in IB, there is no ing return transaction*/
1036: IF (l_trxn_type IN (gme_common_pvt.g_prod_completion, gme_common_pvt.g_byprod_completion)) THEN
1037: IF gme_unrelease_batch_pvt.check_inv_negative
1038: ( p_mmt_rec => l_mmt_rec
1039: ,p_mmln_tbl => l_mmln_tbl
1040: ,p_item_no => l_item_no) THEN

Line 1055: IF l_return_status = gme_common_pvt.g_not_transactable THEN

1051: (p_mmt_rec => l_mmt_rec
1052: ,p_mmln_tbl => l_mmln_tbl
1053: ,x_return_status => l_return_status);
1054:
1055: IF l_return_status = gme_common_pvt.g_not_transactable THEN
1056: -- do nothing... move on to the next, to try to reduce
1057: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
1058: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; gme_transactions_pvt.update_material_txn returned '||l_return_status);
1059: END IF;

Line 1245: IF (l_trxn_type IN (gme_common_pvt.g_prod_completion, gme_common_pvt.g_byprod_completion)) THEN

1241:
1242: /* Jalaj Srivastava Bug 5021522
1243: call check_inv_negative only for prod/byprod.
1244: in IB, there is no ing return transaction*/
1245: IF (l_trxn_type IN (gme_common_pvt.g_prod_completion, gme_common_pvt.g_byprod_completion)) THEN
1246: IF gme_unrelease_batch_pvt.check_inv_negative
1247: ( p_mmt_rec => l_mmt_rec
1248: ,p_mmln_tbl => l_mmln_tbl_orig
1249: ,p_item_no => l_item_no) THEN

Line 1264: IF l_return_status = gme_common_pvt.g_not_transactable THEN

1260: (p_transaction_id => l_mmt_tbl(i).transaction_id
1261: ,p_txns_pair => NULL
1262: ,x_return_status => l_return_status);
1263:
1264: IF l_return_status = gme_common_pvt.g_not_transactable THEN
1265: l_trxn_success := FALSE;
1266: -- do nothing... move on to the next, to try to reduce
1267: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
1268: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; gme_transactions_pvt.delete_material_txn returned '||l_return_status);

Line 1302: IF (l_trxn_type IN (gme_common_pvt.g_prod_completion, gme_common_pvt.g_byprod_completion)) THEN

1298:
1299: /* Jalaj Srivastava Bug 5021522
1300: call check_inv_negative only for prod/byprod.
1301: in IB, there is no ing return transaction*/
1302: IF (l_trxn_type IN (gme_common_pvt.g_prod_completion, gme_common_pvt.g_byprod_completion)) THEN
1303: IF gme_unrelease_batch_pvt.check_inv_negative
1304: ( p_mmt_rec => l_mmt_rec
1305: ,p_mmln_tbl => l_mmln_tbl_new
1306: ,p_item_no => l_item_no) THEN

Line 1334: IF l_return_status = gme_common_pvt.g_not_transactable THEN

1330: (p_mmt_rec => l_mmt_rec
1331: ,p_mmln_tbl => l_mmln_tbl_new
1332: ,x_return_status => l_return_status);
1333:
1334: IF l_return_status = gme_common_pvt.g_not_transactable THEN
1335: l_trxn_success := FALSE;
1336: -- do nothing... move on to the next, to try to reduce
1337: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
1338: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; gme_transactions_pvt.update_material_txn returned '||l_return_status);

Line 1484: IF p_batch_header_rec.batch_type = gme_common_pvt.g_doc_type_fpo THEN

1480: -- Set the return status to success initially
1481: x_return_status := FND_API.G_RET_STS_SUCCESS;
1482:
1483: -- IB not allowed for FPO
1484: IF p_batch_header_rec.batch_type = gme_common_pvt.g_doc_type_fpo THEN
1485: RAISE ERROR_INV_ACTION_FPO;
1486: END IF;
1487:
1488: --Bug#5111078 IB not allowed for lab batches with update inventory OFF

Line 1499: IF p_batch_header_rec.batch_status NOT IN (gme_common_pvt.g_batch_wip

1495: RAISE error_inv_action_phantom;
1496: END IF;
1497:
1498: -- IB allowed if batch status is WIP or Complete
1499: IF p_batch_header_rec.batch_status NOT IN (gme_common_pvt.g_batch_wip
1500: ,gme_common_pvt.g_batch_completed) THEN
1501: RAISE ERROR_INV_BATCH_STATUS;
1502: END IF;
1503:

Line 1500: ,gme_common_pvt.g_batch_completed) THEN

1496: END IF;
1497:
1498: -- IB allowed if batch status is WIP or Complete
1499: IF p_batch_header_rec.batch_status NOT IN (gme_common_pvt.g_batch_wip
1500: ,gme_common_pvt.g_batch_completed) THEN
1501: RAISE ERROR_INV_BATCH_STATUS;
1502: END IF;
1503:
1504: -- If batch is complete then proceed only if user wants to adjust qty

Line 1505: IF p_batch_header_rec.batch_status = gme_common_pvt.g_batch_completed THEN

1501: RAISE ERROR_INV_BATCH_STATUS;
1502: END IF;
1503:
1504: -- If batch is complete then proceed only if user wants to adjust qty
1505: IF p_batch_header_rec.batch_status = gme_common_pvt.g_batch_completed THEN
1506: IF p_adjust_cmplt = fnd_api.g_false THEN
1507: RAISE ERROR_ADJ_CMPLT_NOT_ALLOW;
1508: END IF;
1509: END IF;

Line 1517: IF p_material_detail_rec.release_type IN (gme_common_pvt.g_mtl_auto_release

1513: RAISE ERROR_INV_WIP_PLAN_QTY;
1514: END IF;
1515:
1516: -- Check Release Type
1517: IF p_material_detail_rec.release_type IN (gme_common_pvt.g_mtl_auto_release
1518: ,gme_common_pvt.g_mtl_autobystep_release) THEN
1519: RAISE ERROR_INV_RELEASE_TYPE;
1520: END IF;
1521:

Line 1518: ,gme_common_pvt.g_mtl_autobystep_release) THEN

1514: END IF;
1515:
1516: -- Check Release Type
1517: IF p_material_detail_rec.release_type IN (gme_common_pvt.g_mtl_auto_release
1518: ,gme_common_pvt.g_mtl_autobystep_release) THEN
1519: RAISE ERROR_INV_RELEASE_TYPE;
1520: END IF;
1521:
1522: -- If the step associated with the material line is closed or cancelled

Line 1526: IF NVL(l_step_status, 0) = gme_common_pvt.g_step_closed THEN

1522: -- If the step associated with the material line is closed or cancelled
1523: OPEN Cur_get_step_status (p_material_detail_rec.material_detail_id);
1524: FETCH Cur_get_step_status INTO l_step_no, l_step_status;
1525: CLOSE Cur_get_step_status;
1526: IF NVL(l_step_status, 0) = gme_common_pvt.g_step_closed THEN
1527: RAISE error_step_closed;
1528: END IF;
1529: IF NVL(l_step_status, 0) = gme_common_pvt.g_step_cancelled THEN
1530: RAISE error_step_cancelled;

Line 1529: IF NVL(l_step_status, 0) = gme_common_pvt.g_step_cancelled THEN

1525: CLOSE Cur_get_step_status;
1526: IF NVL(l_step_status, 0) = gme_common_pvt.g_step_closed THEN
1527: RAISE error_step_closed;
1528: END IF;
1529: IF NVL(l_step_status, 0) = gme_common_pvt.g_step_cancelled THEN
1530: RAISE error_step_cancelled;
1531: END IF;
1532:
1533: IF nvl(g_debug, gme_debug.g_log_procedure + 1) <= gme_debug.g_log_procedure THEN

Line 1540: gme_common_pvt.log_message('GME_INV_ACTION_FPO');

1536:
1537: EXCEPTION
1538: WHEN ERROR_INV_ACTION_FPO THEN
1539: x_return_status := FND_API.G_RET_STS_ERROR;
1540: gme_common_pvt.log_message('GME_INV_ACTION_FPO');
1541: --Bug#5111078
1542: WHEN error_inv_action_lab THEN
1543: x_return_status := FND_API.G_RET_STS_ERROR;
1544: gme_common_pvt.log_message('GME_IB_FOR_UPDINV_NT_ALWD');

Line 1544: gme_common_pvt.log_message('GME_IB_FOR_UPDINV_NT_ALWD');

1540: gme_common_pvt.log_message('GME_INV_ACTION_FPO');
1541: --Bug#5111078
1542: WHEN error_inv_action_lab THEN
1543: x_return_status := FND_API.G_RET_STS_ERROR;
1544: gme_common_pvt.log_message('GME_IB_FOR_UPDINV_NT_ALWD');
1545: WHEN ERROR_INV_BATCH_STATUS THEN
1546: x_return_status := FND_API.G_RET_STS_ERROR;
1547: gme_common_pvt.log_message('GME_API_INV_BATCH_STATUS_PC');
1548: WHEN ERROR_INV_RELEASE_TYPE THEN

Line 1547: gme_common_pvt.log_message('GME_API_INV_BATCH_STATUS_PC');

1543: x_return_status := FND_API.G_RET_STS_ERROR;
1544: gme_common_pvt.log_message('GME_IB_FOR_UPDINV_NT_ALWD');
1545: WHEN ERROR_INV_BATCH_STATUS THEN
1546: x_return_status := FND_API.G_RET_STS_ERROR;
1547: gme_common_pvt.log_message('GME_API_INV_BATCH_STATUS_PC');
1548: WHEN ERROR_INV_RELEASE_TYPE THEN
1549: x_return_status := FND_API.G_RET_STS_ERROR;
1550: gme_common_pvt.log_message('GME_API_INV_RELEASE_TYPE');
1551: WHEN ERROR_INV_WIP_PLAN_QTY THEN

Line 1550: gme_common_pvt.log_message('GME_API_INV_RELEASE_TYPE');

1546: x_return_status := FND_API.G_RET_STS_ERROR;
1547: gme_common_pvt.log_message('GME_API_INV_BATCH_STATUS_PC');
1548: WHEN ERROR_INV_RELEASE_TYPE THEN
1549: x_return_status := FND_API.G_RET_STS_ERROR;
1550: gme_common_pvt.log_message('GME_API_INV_RELEASE_TYPE');
1551: WHEN ERROR_INV_WIP_PLAN_QTY THEN
1552: x_return_status := FND_API.G_RET_STS_ERROR;
1553: gme_common_pvt.log_message('GME_API_INV_WIP_PLAN_QTY_PC');
1554: WHEN ERROR_ADJ_CMPLT_NOT_ALLOW THEN

Line 1553: gme_common_pvt.log_message('GME_API_INV_WIP_PLAN_QTY_PC');

1549: x_return_status := FND_API.G_RET_STS_ERROR;
1550: gme_common_pvt.log_message('GME_API_INV_RELEASE_TYPE');
1551: WHEN ERROR_INV_WIP_PLAN_QTY THEN
1552: x_return_status := FND_API.G_RET_STS_ERROR;
1553: gme_common_pvt.log_message('GME_API_INV_WIP_PLAN_QTY_PC');
1554: WHEN ERROR_ADJ_CMPLT_NOT_ALLOW THEN
1555: x_return_status := FND_API.G_RET_STS_ERROR;
1556: gme_common_pvt.log_message('GME_API_ASK_ADJUST_CERTIFY');
1557: WHEN error_step_closed THEN

Line 1556: gme_common_pvt.log_message('GME_API_ASK_ADJUST_CERTIFY');

1552: x_return_status := FND_API.G_RET_STS_ERROR;
1553: gme_common_pvt.log_message('GME_API_INV_WIP_PLAN_QTY_PC');
1554: WHEN ERROR_ADJ_CMPLT_NOT_ALLOW THEN
1555: x_return_status := FND_API.G_RET_STS_ERROR;
1556: gme_common_pvt.log_message('GME_API_ASK_ADJUST_CERTIFY');
1557: WHEN error_step_closed THEN
1558: x_return_status := FND_API.G_RET_STS_ERROR;
1559: GME_COMMON_PVT.log_message ('GME_STEP_CLOSED_ERR', 'STEP_NO', l_step_no);
1560: WHEN error_step_cancelled THEN

Line 1559: GME_COMMON_PVT.log_message ('GME_STEP_CLOSED_ERR', 'STEP_NO', l_step_no);

1555: x_return_status := FND_API.G_RET_STS_ERROR;
1556: gme_common_pvt.log_message('GME_API_ASK_ADJUST_CERTIFY');
1557: WHEN error_step_closed THEN
1558: x_return_status := FND_API.G_RET_STS_ERROR;
1559: GME_COMMON_PVT.log_message ('GME_STEP_CLOSED_ERR', 'STEP_NO', l_step_no);
1560: WHEN error_step_cancelled THEN
1561: x_return_status := FND_API.G_RET_STS_ERROR;
1562: GME_COMMON_PVT.log_message ('GME_STEP_CANCELLED_ERR', 'STEP_NO', l_step_no);
1563: WHEN error_inv_action_phantom THEN

Line 1562: GME_COMMON_PVT.log_message ('GME_STEP_CANCELLED_ERR', 'STEP_NO', l_step_no);

1558: x_return_status := FND_API.G_RET_STS_ERROR;
1559: GME_COMMON_PVT.log_message ('GME_STEP_CLOSED_ERR', 'STEP_NO', l_step_no);
1560: WHEN error_step_cancelled THEN
1561: x_return_status := FND_API.G_RET_STS_ERROR;
1562: GME_COMMON_PVT.log_message ('GME_STEP_CANCELLED_ERR', 'STEP_NO', l_step_no);
1563: WHEN error_inv_action_phantom THEN
1564: x_return_status := FND_API.G_RET_STS_ERROR;
1565: gme_common_pvt.log_message('PM_INVALID_PHANTOM_ACTION');
1566: WHEN OTHERS THEN

Line 1565: gme_common_pvt.log_message('PM_INVALID_PHANTOM_ACTION');

1561: x_return_status := FND_API.G_RET_STS_ERROR;
1562: GME_COMMON_PVT.log_message ('GME_STEP_CANCELLED_ERR', 'STEP_NO', l_step_no);
1563: WHEN error_inv_action_phantom THEN
1564: x_return_status := FND_API.G_RET_STS_ERROR;
1565: gme_common_pvt.log_message('PM_INVALID_PHANTOM_ACTION');
1566: WHEN OTHERS THEN
1567: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
1568: IF g_debug <= gme_debug.g_log_procedure THEN
1569: gme_debug.put_line ('Unexpected error: '||g_pkg_name||'.'||l_api_name||': '||SQLERRM);

Line 1630: gme_common_pvt.log_message( 'GME_API_INVALID_INCR_TYPE');

1626:
1627: EXCEPTION
1628: WHEN ERROR_INV_INCR_TYPE THEN
1629: x_return_status := FND_API.G_RET_STS_ERROR;
1630: gme_common_pvt.log_message( 'GME_API_INVALID_INCR_TYPE');
1631: WHEN ERROR_QTY_CREATE_NEG_ACTUAL THEN
1632: x_return_status := FND_API.G_RET_STS_ERROR;
1633: gme_common_pvt.log_message( 'GME_API_ACTUAL_CANT_GO_NEG');
1634: WHEN ERROR_QTY_CANT_BE_ZERO THEN

Line 1633: gme_common_pvt.log_message( 'GME_API_ACTUAL_CANT_GO_NEG');

1629: x_return_status := FND_API.G_RET_STS_ERROR;
1630: gme_common_pvt.log_message( 'GME_API_INVALID_INCR_TYPE');
1631: WHEN ERROR_QTY_CREATE_NEG_ACTUAL THEN
1632: x_return_status := FND_API.G_RET_STS_ERROR;
1633: gme_common_pvt.log_message( 'GME_API_ACTUAL_CANT_GO_NEG');
1634: WHEN ERROR_QTY_CANT_BE_ZERO THEN
1635: x_return_status := FND_API.G_RET_STS_ERROR;
1636: gme_common_pvt.log_message( 'GME_API_QTY_CANT_BE_ZERO');
1637: WHEN OTHERS THEN

Line 1636: gme_common_pvt.log_message( 'GME_API_QTY_CANT_BE_ZERO');

1632: x_return_status := FND_API.G_RET_STS_ERROR;
1633: gme_common_pvt.log_message( 'GME_API_ACTUAL_CANT_GO_NEG');
1634: WHEN ERROR_QTY_CANT_BE_ZERO THEN
1635: x_return_status := FND_API.G_RET_STS_ERROR;
1636: gme_common_pvt.log_message( 'GME_API_QTY_CANT_BE_ZERO');
1637: WHEN OTHERS THEN
1638: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
1639: IF g_debug <= gme_debug.g_log_procedure THEN
1640: gme_debug.put_line ('Unexpected error: '||g_pkg_name||'.'||l_api_name||': '||SQLERRM);

Line 1687: ,precision => gme_common_pvt.g_precision

1683: x_conv_qty := inv_convert.inv_um_convert
1684: (item_id => p_item_id
1685: ,lot_number => p_lot_number
1686: ,organization_id => p_org_id
1687: ,precision => gme_common_pvt.g_precision
1688: ,from_quantity => p_qty
1689: ,from_unit => p_from_um
1690: ,to_unit => p_to_um
1691: ,from_name => NULL

Line 1694: -- Note: -99999 should be in gme_common_pvt

1690: ,to_unit => p_to_um
1691: ,from_name => NULL
1692: ,to_name => NULL);
1693:
1694: -- Note: -99999 should be in gme_common_pvt
1695: IF x_conv_qty = -99999 THEN
1696: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
1697: gme_debug.put_line
1698: ( g_pkg_name