DBA Data[Home] [Help]

APPS.GMIVDX dependencies on IC_ITEM_MST

Line 227: x_ic_item_mst_row ic_item_mst%ROWTYPE;

223: IS
224: l_api_name CONSTANT VARCHAR2(30) := 'Validate_transfer' ;
225: l_api_version CONSTANT NUMBER := 1.0 ;
226: l_return_val NUMBER;
227: x_ic_item_mst_row ic_item_mst%ROWTYPE;
228: x_ic_whse_mst_row ic_whse_mst%ROWTYPE;
229: x_sy_reas_cds_row sy_reas_cds%ROWTYPE;
230: x_ic_lots_mst_row ic_lots_mst%ROWTYPE;
231: x_ic_loct_inv_row ic_loct_inv%ROWTYPE;

Line 306: FROM ic_item_mst_b iim, ic_gled_cls igc

302: l_get_odm_fiscal_details_row Cur_get_odm_fiscal_details%ROWTYPE;
303:
304: CURSOR cur_item_gl_cls (p_item_id NUMBER) IS
305: SELECT iim.gl_class
306: FROM ic_item_mst_b iim, ic_gled_cls igc
307: WHERE iim.item_id = p_item_id
308: AND iim.gl_class = igc.icgl_class;
309:
310: CURSOR Cur_gl_cls (p_item ic_item_mst.item_id%TYPE) IS

Line 310: CURSOR Cur_gl_cls (p_item ic_item_mst.item_id%TYPE) IS

306: FROM ic_item_mst_b iim, ic_gled_cls igc
307: WHERE iim.item_id = p_item_id
308: AND iim.gl_class = igc.icgl_class;
309:
310: CURSOR Cur_gl_cls (p_item ic_item_mst.item_id%TYPE) IS
311: SELECT gic.item_id, gcs.opm_class, gic.category_id, kfv.CONCATENATED_SEGMENTS,
312: mcv.description
313: FROM mtl_categories_vl mcv, mtl_categories_b_kfv kfv, gmi_category_sets gcs, gmi_item_categories gic
314: WHERE gcs.category_set_id IS NOT NULL

Line 326: item_gl_class ic_item_mst.gl_class%TYPE;

322: v_business_class_found BOOLEAN := FALSE;
323: v_product_line_found BOOLEAN := FALSE;
324: gl_business_class_cat_id gmi_item_categories.category_id%TYPE := NULL;
325: gl_product_line_cat_id gmi_item_categories.category_id%TYPE := NULL;
326: item_gl_class ic_item_mst.gl_class%TYPE;
327: --End Supriya Malluru Bug#4114621
328:
329: BEGIN
330:

Line 497: x_ic_item_mst_row.item_no := NULL;

493: RAISE FND_API.G_EXC_ERROR;
494: END IF;
495:
496: /* All lines need an item. Make sure we have one which can be used */
497: x_ic_item_mst_row.item_no := NULL;
498: x_ic_item_mst_row.item_id := p_line_rec_tbl(i).opm_item_id;
499: IF ( GMIVDBL.ic_item_mst_select(x_ic_item_mst_row, x_ic_item_mst_row) ) THEN
500: IF (x_ic_item_mst_row.noninv_ind = 1) THEN
501: FND_MESSAGE.SET_NAME('GMI','IC_API_INVALID_ITEM_NO');

Line 498: x_ic_item_mst_row.item_id := p_line_rec_tbl(i).opm_item_id;

494: END IF;
495:
496: /* All lines need an item. Make sure we have one which can be used */
497: x_ic_item_mst_row.item_no := NULL;
498: x_ic_item_mst_row.item_id := p_line_rec_tbl(i).opm_item_id;
499: IF ( GMIVDBL.ic_item_mst_select(x_ic_item_mst_row, x_ic_item_mst_row) ) THEN
500: IF (x_ic_item_mst_row.noninv_ind = 1) THEN
501: FND_MESSAGE.SET_NAME('GMI','IC_API_INVALID_ITEM_NO');
502: FND_MESSAGE.SET_TOKEN('ITEM_NO',x_ic_item_mst_row.item_no);

Line 499: IF ( GMIVDBL.ic_item_mst_select(x_ic_item_mst_row, x_ic_item_mst_row) ) THEN

495:
496: /* All lines need an item. Make sure we have one which can be used */
497: x_ic_item_mst_row.item_no := NULL;
498: x_ic_item_mst_row.item_id := p_line_rec_tbl(i).opm_item_id;
499: IF ( GMIVDBL.ic_item_mst_select(x_ic_item_mst_row, x_ic_item_mst_row) ) THEN
500: IF (x_ic_item_mst_row.noninv_ind = 1) THEN
501: FND_MESSAGE.SET_NAME('GMI','IC_API_INVALID_ITEM_NO');
502: FND_MESSAGE.SET_TOKEN('ITEM_NO',x_ic_item_mst_row.item_no);
503: FND_MSG_PUB.Add;

Line 500: IF (x_ic_item_mst_row.noninv_ind = 1) THEN

496: /* All lines need an item. Make sure we have one which can be used */
497: x_ic_item_mst_row.item_no := NULL;
498: x_ic_item_mst_row.item_id := p_line_rec_tbl(i).opm_item_id;
499: IF ( GMIVDBL.ic_item_mst_select(x_ic_item_mst_row, x_ic_item_mst_row) ) THEN
500: IF (x_ic_item_mst_row.noninv_ind = 1) THEN
501: FND_MESSAGE.SET_NAME('GMI','IC_API_INVALID_ITEM_NO');
502: FND_MESSAGE.SET_TOKEN('ITEM_NO',x_ic_item_mst_row.item_no);
503: FND_MSG_PUB.Add;
504: RAISE FND_API.G_EXC_ERROR;

Line 502: FND_MESSAGE.SET_TOKEN('ITEM_NO',x_ic_item_mst_row.item_no);

498: x_ic_item_mst_row.item_id := p_line_rec_tbl(i).opm_item_id;
499: IF ( GMIVDBL.ic_item_mst_select(x_ic_item_mst_row, x_ic_item_mst_row) ) THEN
500: IF (x_ic_item_mst_row.noninv_ind = 1) THEN
501: FND_MESSAGE.SET_NAME('GMI','IC_API_INVALID_ITEM_NO');
502: FND_MESSAGE.SET_TOKEN('ITEM_NO',x_ic_item_mst_row.item_no);
503: FND_MSG_PUB.Add;
504: RAISE FND_API.G_EXC_ERROR;
505: END IF;
506: ELSE

Line 512: p_line_rec_tbl(i).opm_item_no := x_ic_item_mst_row.item_no;

508: FND_MESSAGE.SET_TOKEN('ITEM_ID',p_line_rec_tbl(i).opm_item_id);
509: FND_MSG_PUB.Add;
510: RAISE FND_API.G_EXC_ERROR;
511: END IF;
512: p_line_rec_tbl(i).opm_item_no := x_ic_item_mst_row.item_no;
513:
514: IF (x_ic_item_mst_row.lot_ctl = 0) THEN
515: p_line_rec_tbl(i).lot_control := 0;
516: ELSIF (x_ic_item_mst_row.lot_ctl = 1) THEN

Line 514: IF (x_ic_item_mst_row.lot_ctl = 0) THEN

510: RAISE FND_API.G_EXC_ERROR;
511: END IF;
512: p_line_rec_tbl(i).opm_item_no := x_ic_item_mst_row.item_no;
513:
514: IF (x_ic_item_mst_row.lot_ctl = 0) THEN
515: p_line_rec_tbl(i).lot_control := 0;
516: ELSIF (x_ic_item_mst_row.lot_ctl = 1) THEN
517: p_line_rec_tbl(i).lot_control := 1;
518: END IF;

Line 516: ELSIF (x_ic_item_mst_row.lot_ctl = 1) THEN

512: p_line_rec_tbl(i).opm_item_no := x_ic_item_mst_row.item_no;
513:
514: IF (x_ic_item_mst_row.lot_ctl = 0) THEN
515: p_line_rec_tbl(i).lot_control := 0;
516: ELSIF (x_ic_item_mst_row.lot_ctl = 1) THEN
517: p_line_rec_tbl(i).lot_control := 1;
518: END IF;
519:
520: --Validate the item in ODM

Line 582: IF (l_item.segment1 <> x_ic_item_mst_row.item_no) THEN

578:
579: END IF;
580:
581: --We should be dealing with the same item in OPM/ODM
582: IF (l_item.segment1 <> x_ic_item_mst_row.item_no) THEN
583: FND_MESSAGE.SET_NAME ('GMI','GMI_DXFR_DIFF_ITEM');
584: FND_MESSAGE.SET_TOKEN('LINE_NO',p_line_rec_tbl(i).line_no);
585: FND_MSG_PUB.Add;
586: RAISE FND_API.G_EXC_ERROR;

Line 593: IF (l_item.lot_control_code <> x_ic_item_mst_row.lot_ctl + 1) THEN

589: /* **************************************************************
590: Item should be either lot controlled both in opm/discrete or not
591: lot controlled both in opm/discrete.
592: ************************************************************** */
593: IF (l_item.lot_control_code <> x_ic_item_mst_row.lot_ctl + 1) THEN
594: FND_MESSAGE.SET_NAME('GMI','GMI_DXFR_DIFF_LOT_CONTROL');
595: FND_MESSAGE.SET_TOKEN('LINE_NO',p_line_rec_tbl(i).line_no);
596: FND_MSG_PUB.Add;
597: RAISE FND_API.G_EXC_ERROR;

Line 601: OPEN Cur_get_uom_code(x_ic_item_mst_row.item_um);

597: RAISE FND_API.G_EXC_ERROR;
598: END IF;
599:
600: --Get uom_code for OPM item's primary UOM
601: OPEN Cur_get_uom_code(x_ic_item_mst_row.item_um);
602: FETCH Cur_get_uom_code INTO l_opm_item_primary_uom_code;
603: CLOSE Cur_get_uom_code;
604:
605: IF (l_item.primary_uom_code <> l_opm_item_primary_uom_code) THEN

Line 612: IF (x_ic_item_mst_row.item_um2 IS NOT NULL) THEN

608: RAISE FND_API.G_EXC_ERROR;
609: END IF;
610:
611: --Get uom_code for OPM item's secondary UOM
612: IF (x_ic_item_mst_row.item_um2 IS NOT NULL) THEN
613: OPEN Cur_get_uom_code(x_ic_item_mst_row.item_um2);
614: FETCH Cur_get_uom_code INTO l_opm_item_secondary_uom_code;
615: CLOSE Cur_get_uom_code;
616: END IF;

Line 613: OPEN Cur_get_uom_code(x_ic_item_mst_row.item_um2);

609: END IF;
610:
611: --Get uom_code for OPM item's secondary UOM
612: IF (x_ic_item_mst_row.item_um2 IS NOT NULL) THEN
613: OPEN Cur_get_uom_code(x_ic_item_mst_row.item_um2);
614: FETCH Cur_get_uom_code INTO l_opm_item_secondary_uom_code;
615: CLOSE Cur_get_uom_code;
616: END IF;
617:

Line 749: FND_MESSAGE.SET_TOKEN('ITEM_NO' , x_ic_item_mst_row.item_no);

745: FND_MSG_PUB.Add;
746: RAISE FND_API.G_EXC_ERROR;
747: ELSIF (p_hdr_rec.trans_date > SYSDATE) THEN
748: FND_MESSAGE.SET_NAME('GMI','IC_API_CANNOT_POST_FUTURE');
749: FND_MESSAGE.SET_TOKEN('ITEM_NO' , x_ic_item_mst_row.item_no);
750: FND_MESSAGE.SET_TOKEN('TRANS_DATE', p_hdr_rec.trans_date);
751: FND_MSG_PUB.Add;
752: RAISE FND_API.G_EXC_ERROR;
753: END IF;

Line 847: IF ( (p_line_rec_tbl(i).quantity_um <> x_ic_item_mst_row.item_um)

843:
844: --lets validate the UOM .
845: --UOM should be same for lines and associated lot records
846: /* Jalaj Srivastava Bug 3812701 */
847: IF ( (p_line_rec_tbl(i).quantity_um <> x_ic_item_mst_row.item_um)
848: AND (NOT GMA_VALID_GRP.Validate_um(p_line_rec_tbl(i).quantity_um))
849: ) THEN
850:
851: FND_MESSAGE.SET_NAME('GMI','IC_API_INVALID_UOM');

Line 852: FND_MESSAGE.SET_TOKEN('ITEM_NO',x_ic_item_mst_row.item_no);

848: AND (NOT GMA_VALID_GRP.Validate_um(p_line_rec_tbl(i).quantity_um))
849: ) THEN
850:
851: FND_MESSAGE.SET_NAME('GMI','IC_API_INVALID_UOM');
852: FND_MESSAGE.SET_TOKEN('ITEM_NO',x_ic_item_mst_row.item_no);
853: FND_MESSAGE.SET_TOKEN('UOM',p_line_rec_tbl(i).quantity_um);
854: FND_MSG_PUB.Add;
855: RAISE FND_API.G_EXC_ERROR;
856: END IF;

Line 878: OR (x_ic_item_mst_row.loct_ctl = 0)

874: END IF;
875:
876: --Lets Validate the locations in OPM
877: IF ( (x_ic_whse_mst_row.loct_ctl = 0)
878: OR (x_ic_item_mst_row.loct_ctl = 0)
879: ) THEN
880: IF (nvl(p_line_rec_tbl(i).opm_location,GMIGUTL.IC$DEFAULT_LOCT) <> GMIGUTL.IC$DEFAULT_LOCT) THEN
881: IF FND_MSG_PUB.G_MSG_LVL_DEBUG_LOW >= G_Debug_Level THEN
882: log_msg('Failed while validating OPM location. Item and/or warehouse are not location controlled');

Line 885: FND_MESSAGE.SET_TOKEN('ITEM_NO',x_ic_item_mst_row.item_no);

881: IF FND_MSG_PUB.G_MSG_LVL_DEBUG_LOW >= G_Debug_Level THEN
882: log_msg('Failed while validating OPM location. Item and/or warehouse are not location controlled');
883: END IF;
884: FND_MESSAGE.SET_NAME('GMI','IC_API_INVALID_LOCATION');
885: FND_MESSAGE.SET_TOKEN('ITEM_NO',x_ic_item_mst_row.item_no);
886: FND_MESSAGE.SET_TOKEN('LOCATION',p_line_rec_tbl(i).opm_location);
887: FND_MESSAGE.SET_TOKEN('WHSE_CODE',p_line_rec_tbl(i).opm_whse_code);
888: FND_MSG_PUB.Add;
889: RAISE FND_API.G_EXC_ERROR;

Line 893: AND (x_ic_item_mst_row.loct_ctl = 1)

889: RAISE FND_API.G_EXC_ERROR;
890: END IF;
891: p_line_rec_tbl(i).opm_location := GMIGUTL.IC$DEFAULT_LOCT;
892: ELSIF ( (x_ic_whse_mst_row.loct_ctl = 1)
893: AND (x_ic_item_mst_row.loct_ctl = 1)
894: ) THEN
895: SELECT count(1) INTO l_count
896: FROM ic_loct_mst
897: WHERE whse_code = p_line_rec_tbl(i).opm_whse_code

Line 906: FND_MESSAGE.SET_TOKEN('ITEM_NO',x_ic_item_mst_row.item_no);

902: IF FND_MSG_PUB.G_MSG_LVL_DEBUG_LOW >= G_Debug_Level THEN
903: log_msg('Failed while validating OPM location. Item and warehouse are validated location controlled');
904: END IF;
905: FND_MESSAGE.SET_NAME('GMI','IC_API_INVALID_LOCATION');
906: FND_MESSAGE.SET_TOKEN('ITEM_NO',x_ic_item_mst_row.item_no);
907: FND_MESSAGE.SET_TOKEN('LOCATION',p_line_rec_tbl(i).opm_location);
908: FND_MESSAGE.SET_TOKEN('WHSE_CODE',p_line_rec_tbl(i).opm_whse_code);
909: FND_MSG_PUB.Add;
910: RAISE FND_API.G_EXC_ERROR;

Line 913: OR (x_ic_item_mst_row.loct_ctl = 2)

909: FND_MSG_PUB.Add;
910: RAISE FND_API.G_EXC_ERROR;
911: END IF;
912: ELSIF ( (x_ic_whse_mst_row.loct_ctl = 2)
913: OR (x_ic_item_mst_row.loct_ctl = 2)
914: ) THEN
915: SELECT count(1) INTO l_count
916: FROM ic_loct_inv
917: WHERE whse_code = p_line_rec_tbl(i).opm_whse_code

Line 927: FND_MESSAGE.SET_TOKEN('ITEM_NO',x_ic_item_mst_row.item_no);

923: IF FND_MSG_PUB.G_MSG_LVL_DEBUG_LOW >= G_Debug_Level THEN
924: log_msg('Failed while validating OPM location. Item and/or warehouse are non validated location controlled');
925: END IF;
926: FND_MESSAGE.SET_NAME('GMI','IC_API_INVALID_LOCATION');
927: FND_MESSAGE.SET_TOKEN('ITEM_NO',x_ic_item_mst_row.item_no);
928: FND_MESSAGE.SET_TOKEN('LOCATION',p_line_rec_tbl(i).opm_location);
929: FND_MESSAGE.SET_TOKEN('WHSE_CODE',p_line_rec_tbl(i).opm_whse_code);
930: FND_MSG_PUB.Add;
931: RAISE FND_API.G_EXC_ERROR;

Line 956: IF (x_ic_item_mst_row.lot_ctl = 0) THEN

952: FOR k in 1..p_lot_rec_tbl.count LOOP
953: IF (p_lot_rec_tbl(k).line_no = p_line_rec_tbl(i).line_no) THEN
954: --If lot is specified at line level then it cannot be specified at lot level.
955: --for non lot controlled items default lot could be specified only at the line level.
956: IF (x_ic_item_mst_row.lot_ctl = 0) THEN
957: FND_MESSAGE.SET_NAME('GMI','GMI_DXFR_LOT_RECORD_NOT_NEEDED');
958: FND_MESSAGE.SET_TOKEN('LINE_NO',p_line_rec_tbl(i).line_no);
959: FND_MSG_PUB.Add;
960: RAISE FND_API.G_EXC_ERROR;

Line 997: IF (x_ic_item_mst_row.dualum_ind > 0) THEN

993: p_lot_rec_tbl(l_lot_rec_count).quantity := p_line_rec_tbl(i).quantity;
994: p_lot_rec_tbl(l_lot_rec_count).quantity2 := p_line_rec_tbl(i).quantity2;
995: END IF;
996:
997: IF (x_ic_item_mst_row.dualum_ind > 0) THEN
998: p_line_rec_tbl(i).quantity2 := 0;
999: ELSIF (x_ic_item_mst_row.dualum_ind = 0) THEN
1000: p_line_rec_tbl(i).quantity2 := NULL;
1001: END IF;

Line 999: ELSIF (x_ic_item_mst_row.dualum_ind = 0) THEN

995: END IF;
996:
997: IF (x_ic_item_mst_row.dualum_ind > 0) THEN
998: p_line_rec_tbl(i).quantity2 := 0;
999: ELSIF (x_ic_item_mst_row.dualum_ind = 0) THEN
1000: p_line_rec_tbl(i).quantity2 := NULL;
1001: END IF;
1002:
1003: --lets start validating the lots and the quantities

Line 1031: IF (x_ic_item_mst_row.lot_ctl = 0) THEN

1027:
1028: --transfer is from process to discrete
1029: --{
1030: IF (p_hdr_rec.transfer_type = 0) THEN
1031: IF (x_ic_item_mst_row.lot_ctl = 0) THEN
1032: IF (p_lot_rec_tbl(j).opm_lot_id <> 0) THEN
1033: FND_MESSAGE.SET_NAME('GMI','GMI_DXFR_OPM_LOT_IS_NOT_DEFAULT');
1034: FND_MESSAGE.SET_TOKEN('LINE_NO',p_line_rec_tbl(i).line_no);
1035: FND_MESSAGE.SET_TOKEN('ITEM_NO',x_ic_item_mst_row.item_no);

Line 1035: FND_MESSAGE.SET_TOKEN('ITEM_NO',x_ic_item_mst_row.item_no);

1031: IF (x_ic_item_mst_row.lot_ctl = 0) THEN
1032: IF (p_lot_rec_tbl(j).opm_lot_id <> 0) THEN
1033: FND_MESSAGE.SET_NAME('GMI','GMI_DXFR_OPM_LOT_IS_NOT_DEFAULT');
1034: FND_MESSAGE.SET_TOKEN('LINE_NO',p_line_rec_tbl(i).line_no);
1035: FND_MESSAGE.SET_TOKEN('ITEM_NO',x_ic_item_mst_row.item_no);
1036: FND_MSG_PUB.Add;
1037: RAISE FND_API.G_EXC_ERROR;
1038:
1039: END IF;

Line 1041: ELSIF (x_ic_item_mst_row.lot_ctl = 1) THEN

1037: RAISE FND_API.G_EXC_ERROR;
1038:
1039: END IF;
1040:
1041: ELSIF (x_ic_item_mst_row.lot_ctl = 1) THEN
1042: IF (p_lot_rec_tbl(j).opm_lot_id = 0) THEN
1043: FND_MESSAGE.SET_NAME('GMI','GMI_DXFR_OPM_LOT_IS_DEFAULT');
1044: FND_MESSAGE.SET_TOKEN('LINE_NO',p_line_rec_tbl(i).line_no);
1045: FND_MESSAGE.SET_TOKEN('ITEM_NO',x_ic_item_mst_row.item_no);

Line 1045: FND_MESSAGE.SET_TOKEN('ITEM_NO',x_ic_item_mst_row.item_no);

1041: ELSIF (x_ic_item_mst_row.lot_ctl = 1) THEN
1042: IF (p_lot_rec_tbl(j).opm_lot_id = 0) THEN
1043: FND_MESSAGE.SET_NAME('GMI','GMI_DXFR_OPM_LOT_IS_DEFAULT');
1044: FND_MESSAGE.SET_TOKEN('LINE_NO',p_line_rec_tbl(i).line_no);
1045: FND_MESSAGE.SET_TOKEN('ITEM_NO',x_ic_item_mst_row.item_no);
1046: FND_MSG_PUB.Add;
1047: RAISE FND_API.G_EXC_ERROR;
1048: END IF;
1049: IF FND_MSG_PUB.G_MSG_LVL_DEBUG_LOW >= G_Debug_Level THEN

Line 1092: x_ic_item_mst_row.item_id,

1088:
1089: p_lot_rec_tbl(j).opm_lot_status := x_ic_loct_inv_row.lot_status;
1090: l_return_val := GMICUOM.uom_conversion
1091: (
1092: x_ic_item_mst_row.item_id,
1093: nvl(x_ic_lots_mst_row.lot_id,0),
1094: p_lot_rec_tbl(j).quantity,
1095: p_line_rec_tbl(i).quantity_um,
1096: x_ic_item_mst_row.item_um,

Line 1096: x_ic_item_mst_row.item_um,

1092: x_ic_item_mst_row.item_id,
1093: nvl(x_ic_lots_mst_row.lot_id,0),
1094: p_lot_rec_tbl(j).quantity,
1095: p_line_rec_tbl(i).quantity_um,
1096: x_ic_item_mst_row.item_um,
1097: 0
1098: );
1099: IF FND_MSG_PUB.G_MSG_LVL_DEBUG_LOW >= G_Debug_Level THEN
1100: log_msg('After calling GMICUOM.uom_conversion to get opm_primary_quantity when transfer type is 0. return val is '||l_return_val);

Line 1116: FND_MESSAGE.set_token('TOUOM',x_ic_item_mst_row.item_um);

1112: FND_MESSAGE.set_name('GMI', 'IC_UOMCV_NEWUMTYPE_ERR');
1113: ELSIF (l_return_val = -5) THEN
1114: FND_MESSAGE.set_name('GMI', 'IC_UOMCV_INVUOMTYPE_ERR2');
1115: FND_MESSAGE.set_token('FROMUOM',p_line_rec_tbl(i).quantity_um);
1116: FND_MESSAGE.set_token('TOUOM',x_ic_item_mst_row.item_um);
1117: ELSIF (l_return_val = -6) THEN
1118: FND_MESSAGE.set_name('GMI', 'IC_UOMCV_INVUMTYPE_ERR');
1119: ELSIF (l_return_val = -7) THEN
1120: FND_MESSAGE.set_name('GMI', 'IC_UOMCV_CURFACTOR_ERR');

Line 1124: FND_MESSAGE.set_token('TOUOM',x_ic_item_mst_row.item_um);

1120: FND_MESSAGE.set_name('GMI', 'IC_UOMCV_CURFACTOR_ERR');
1121: ELSIF (l_return_val = -10) THEN
1122: FND_MESSAGE.set_name('GMI', 'IC_UOMCV_INVUOMTYPE_ERR2');
1123: FND_MESSAGE.set_token('FROMUOM',p_line_rec_tbl(i).quantity_um);
1124: FND_MESSAGE.set_token('TOUOM',x_ic_item_mst_row.item_um);
1125: ELSIF (l_return_val = -11) THEN
1126: FND_MESSAGE.set_name('GMI', 'IC_UOMCV_NOITEMID_ERR');
1127: ELSIF (l_return_val < -11) THEN
1128: FND_MESSAGE.set_name('GMI', 'IC_UOMCV_FATAL_ERR');

Line 1134: IF ( (x_ic_item_mst_row.lot_indivisible = 1)

1130: FND_MSG_PUB.ADD;
1131: RAISE FND_API.G_EXC_ERROR;
1132: END IF;
1133:
1134: IF ( (x_ic_item_mst_row.lot_indivisible = 1)
1135: AND (x_ic_loct_inv_row.loct_onhand <> p_lot_rec_tbl(j).opm_primary_quantity)
1136: ) THEN
1137: FND_MESSAGE.SET_NAME('GMI','GMI_DXFR_INDIVISIBLE_LOT');
1138: FND_MESSAGE.SET_TOKEN('LINE_NO',p_line_rec_tbl(i).line_no);

Line 1153: IF (x_ic_item_mst_row.dualum_ind > 0) THEN

1149: END IF;--}
1150:
1151: --lets check the deviation between OPM primary and secondary if secondary is passed
1152: --if it is not passed we calculate the secondary qty.
1153: IF (x_ic_item_mst_row.dualum_ind > 0) THEN
1154: IF (x_ic_loct_inv_row.loct_onhand = p_lot_rec_tbl(j).opm_primary_quantity) THEN
1155: p_lot_rec_tbl(j).quantity2 := x_ic_loct_inv_row.loct_onhand2;
1156: ELSE
1157: IF (p_lot_rec_tbl(j).quantity2 IS NULL) THEN

Line 1159: IF (x_ic_item_mst_row.dualum_ind = 3) THEN

1155: p_lot_rec_tbl(j).quantity2 := x_ic_loct_inv_row.loct_onhand2;
1156: ELSE
1157: IF (p_lot_rec_tbl(j).quantity2 IS NULL) THEN
1158:
1159: IF (x_ic_item_mst_row.dualum_ind = 3) THEN
1160: FND_MESSAGE.SET_NAME('GMI','GMI_DXFR_NULL_QTY2');
1161: FND_MESSAGE.SET_TOKEN('LINE_NO',p_line_rec_tbl(i).line_no);
1162: FND_MESSAGE.SET_TOKEN('ITEM_NO',x_ic_item_mst_row.item_no);
1163: FND_MSG_PUB.Add;

Line 1162: FND_MESSAGE.SET_TOKEN('ITEM_NO',x_ic_item_mst_row.item_no);

1158:
1159: IF (x_ic_item_mst_row.dualum_ind = 3) THEN
1160: FND_MESSAGE.SET_NAME('GMI','GMI_DXFR_NULL_QTY2');
1161: FND_MESSAGE.SET_TOKEN('LINE_NO',p_line_rec_tbl(i).line_no);
1162: FND_MESSAGE.SET_TOKEN('ITEM_NO',x_ic_item_mst_row.item_no);
1163: FND_MSG_PUB.Add;
1164: RAISE FND_API.G_EXC_ERROR;
1165: END IF;
1166:

Line 1169: x_ic_item_mst_row.item_id,

1165: END IF;
1166:
1167: l_return_val := GMICUOM.uom_conversion
1168: (
1169: x_ic_item_mst_row.item_id,
1170: nvl(x_ic_lots_mst_row.lot_id,0),
1171: p_lot_rec_tbl(j).quantity,
1172: p_line_rec_tbl(i).quantity_um,
1173: x_ic_item_mst_row.item_um2,

Line 1173: x_ic_item_mst_row.item_um2,

1169: x_ic_item_mst_row.item_id,
1170: nvl(x_ic_lots_mst_row.lot_id,0),
1171: p_lot_rec_tbl(j).quantity,
1172: p_line_rec_tbl(i).quantity_um,
1173: x_ic_item_mst_row.item_um2,
1174: 0
1175: );
1176: IF FND_MSG_PUB.G_MSG_LVL_DEBUG_LOW >= G_Debug_Level THEN
1177: log_msg('After calling GMICUOM.uom_conversion to get quantity2 when transfer type is 0. return val is '||l_return_val);

Line 1194: FND_MESSAGE.set_token('TOUOM',x_ic_item_mst_row.item_um2);

1190: FND_MESSAGE.set_name('GMI', 'IC_UOMCV_NEWUMTYPE_ERR');
1191: ELSIF (l_return_val = -5) THEN
1192: FND_MESSAGE.set_name('GMI', 'IC_UOMCV_INVUOMTYPE_ERR2');
1193: FND_MESSAGE.set_token('FROMUOM',p_line_rec_tbl(i).quantity_um);
1194: FND_MESSAGE.set_token('TOUOM',x_ic_item_mst_row.item_um2);
1195: ELSIF (l_return_val = -6) THEN
1196: FND_MESSAGE.set_name('GMI', 'IC_UOMCV_INVUMTYPE_ERR');
1197: ELSIF (l_return_val = -7) THEN
1198: FND_MESSAGE.set_name('GMI', 'IC_UOMCV_CURFACTOR_ERR');

Line 1202: FND_MESSAGE.set_token('TOUOM',x_ic_item_mst_row.item_um2);

1198: FND_MESSAGE.set_name('GMI', 'IC_UOMCV_CURFACTOR_ERR');
1199: ELSIF (l_return_val = -10) THEN
1200: FND_MESSAGE.set_name('GMI', 'IC_UOMCV_INVUOMTYPE_ERR2');
1201: FND_MESSAGE.set_token('FROMUOM',p_line_rec_tbl(i).quantity_um);
1202: FND_MESSAGE.set_token('TOUOM',x_ic_item_mst_row.item_um2);
1203: ELSIF (l_return_val = -11) THEN
1204: FND_MESSAGE.set_name('GMI', 'IC_UOMCV_NOITEMID_ERR');
1205: ELSIF (l_return_val < -11) THEN
1206: FND_MESSAGE.set_name('GMI', 'IC_UOMCV_FATAL_ERR');

Line 1213: ELSIF (x_ic_item_mst_row.dualum_ind = 0) THEN

1209: RAISE FND_API.G_EXC_ERROR;
1210: END IF;
1211: END IF;
1212: END IF;
1213: ELSIF (x_ic_item_mst_row.dualum_ind = 0) THEN
1214: p_lot_rec_tbl(j).quantity2 := NULL;
1215: END IF;
1216:
1217: IF FND_MSG_PUB.G_MSG_LVL_DEBUG_LOW >= G_Debug_Level THEN

Line 1224: IF (x_ic_item_mst_row.lot_ctl = 1) THEN

1220:
1221: --Lets see if the OPM lot already exists in discrete
1222: --lets get the ODM lot
1223: --{
1224: IF (x_ic_item_mst_row.lot_ctl = 1) THEN
1225:
1226: l_odm_lot.lot_number := p_lot_rec_tbl(j).odm_lot_number;
1227:
1228: --{

Line 1275: FND_MESSAGE.SET_TOKEN('ITEM_NO',x_ic_item_mst_row.item_no);

1271: IF (l_item.lot_control_code = 1) THEN
1272: IF (p_lot_rec_tbl(j).odm_lot_number IS NOT NULL) THEN
1273: FND_MESSAGE.SET_NAME('GMI','GMI_DXFR_ODM_LOT_IS_NOT_NULL');
1274: FND_MESSAGE.SET_TOKEN('LINE_NO',p_line_rec_tbl(i).line_no);
1275: FND_MESSAGE.SET_TOKEN('ITEM_NO',x_ic_item_mst_row.item_no);
1276: FND_MSG_PUB.Add;
1277: RAISE FND_API.G_EXC_ERROR;
1278: END IF;
1279:

Line 1289: FND_MESSAGE.SET_TOKEN('ITEM_NO',x_ic_item_mst_row.item_no);

1285:
1286: IF (p_lot_rec_tbl(j).odm_lot_number IS NULL) THEN
1287: FND_MESSAGE.SET_NAME('GMI','GMI_DXFR_ODM_LOT_IS_NULL');
1288: FND_MESSAGE.SET_TOKEN('LINE_NO',p_line_rec_tbl(i).line_no);
1289: FND_MESSAGE.SET_TOKEN('ITEM_NO',x_ic_item_mst_row.item_no);
1290: FND_MSG_PUB.Add;
1291: RAISE FND_API.G_EXC_ERROR;
1292: END IF;
1293:

Line 1297: IF (x_ic_item_mst_row.lot_ctl = 1) THEN

1293:
1294: END IF;--}
1295:
1296: --Lets see if the ODM lot already exists in OPM
1297: IF (x_ic_item_mst_row.lot_ctl = 1) THEN
1298:
1299: --get the opm lot row
1300: SELECT *
1301: INTO x_ic_lots_mst_row

Line 1303: WHERE ITEM_ID = x_ic_item_mst_row.item_id

1299: --get the opm lot row
1300: SELECT *
1301: INTO x_ic_lots_mst_row
1302: FROM ic_lots_mst
1303: WHERE ITEM_ID = x_ic_item_mst_row.item_id
1304: AND lot_id = p_lot_rec_tbl(j).opm_lot_id;
1305:
1306:
1307: p_lot_rec_tbl(j).opm_lot_no := x_ic_lots_mst_row.lot_no;

Line 1334: x_ic_item_mst_row.item_id,

1330: --conversion could have been lot specific.
1331:
1332: l_return_val := GMICUOM.uom_conversion
1333: (
1334: x_ic_item_mst_row.item_id,
1335: nvl(p_lot_rec_tbl(j).opm_lot_id,0),
1336: p_lot_rec_tbl(j).quantity,
1337: p_line_rec_tbl(i).quantity_um,
1338: x_ic_item_mst_row.item_um,

Line 1338: x_ic_item_mst_row.item_um,

1334: x_ic_item_mst_row.item_id,
1335: nvl(p_lot_rec_tbl(j).opm_lot_id,0),
1336: p_lot_rec_tbl(j).quantity,
1337: p_line_rec_tbl(i).quantity_um,
1338: x_ic_item_mst_row.item_um,
1339: 0
1340: );
1341:
1342: IF FND_MSG_PUB.G_MSG_LVL_DEBUG_LOW >= G_Debug_Level THEN

Line 1360: FND_MESSAGE.set_token('TOUOM',x_ic_item_mst_row.item_um);

1356: FND_MESSAGE.set_name('GMI', 'IC_UOMCV_NEWUMTYPE_ERR');
1357: ELSIF (l_return_val = -5) THEN
1358: FND_MESSAGE.set_name('GMI', 'IC_UOMCV_INVUOMTYPE_ERR2');
1359: FND_MESSAGE.set_token('FROMUOM',p_line_rec_tbl(i).quantity_um);
1360: FND_MESSAGE.set_token('TOUOM',x_ic_item_mst_row.item_um);
1361: ELSIF (l_return_val = -6) THEN
1362: FND_MESSAGE.set_name('GMI', 'IC_UOMCV_INVUMTYPE_ERR');
1363: ELSIF (l_return_val = -7) THEN
1364: FND_MESSAGE.set_name('GMI', 'IC_UOMCV_CURFACTOR_ERR');

Line 1368: FND_MESSAGE.set_token('TOUOM',x_ic_item_mst_row.item_um);

1364: FND_MESSAGE.set_name('GMI', 'IC_UOMCV_CURFACTOR_ERR');
1365: ELSIF (l_return_val = -10) THEN
1366: FND_MESSAGE.set_name('GMI', 'IC_UOMCV_INVUOMTYPE_ERR2');
1367: FND_MESSAGE.set_token('FROMUOM',p_line_rec_tbl(i).quantity_um);
1368: FND_MESSAGE.set_token('TOUOM',x_ic_item_mst_row.item_um);
1369: ELSIF (l_return_val = -11) THEN
1370: FND_MESSAGE.set_name('GMI', 'IC_UOMCV_NOITEMID_ERR');
1371: ELSIF (l_return_val < -11) THEN
1372: FND_MESSAGE.set_name('GMI', 'IC_UOMCV_FATAL_ERR');

Line 1378: IF (x_ic_item_mst_row.dualum_ind > 0) THEN

1374: FND_MSG_PUB.ADD;
1375: RAISE FND_API.G_EXC_ERROR;
1376: END IF;
1377:
1378: IF (x_ic_item_mst_row.dualum_ind > 0) THEN
1379: IF (p_lot_rec_tbl(j).quantity2 IS NULL) THEN
1380:
1381: IF (x_ic_item_mst_row.dualum_ind = 3) THEN
1382: FND_MESSAGE.SET_NAME('GMI','GMI_DXFR_NULL_QTY2');

Line 1381: IF (x_ic_item_mst_row.dualum_ind = 3) THEN

1377:
1378: IF (x_ic_item_mst_row.dualum_ind > 0) THEN
1379: IF (p_lot_rec_tbl(j).quantity2 IS NULL) THEN
1380:
1381: IF (x_ic_item_mst_row.dualum_ind = 3) THEN
1382: FND_MESSAGE.SET_NAME('GMI','GMI_DXFR_NULL_QTY2');
1383: FND_MESSAGE.SET_TOKEN('LINE_NO',p_line_rec_tbl(i).line_no);
1384: FND_MESSAGE.SET_TOKEN('ITEM_NO',x_ic_item_mst_row.item_no);
1385: FND_MSG_PUB.Add;

Line 1384: FND_MESSAGE.SET_TOKEN('ITEM_NO',x_ic_item_mst_row.item_no);

1380:
1381: IF (x_ic_item_mst_row.dualum_ind = 3) THEN
1382: FND_MESSAGE.SET_NAME('GMI','GMI_DXFR_NULL_QTY2');
1383: FND_MESSAGE.SET_TOKEN('LINE_NO',p_line_rec_tbl(i).line_no);
1384: FND_MESSAGE.SET_TOKEN('ITEM_NO',x_ic_item_mst_row.item_no);
1385: FND_MSG_PUB.Add;
1386: RAISE FND_API.G_EXC_ERROR;
1387: END IF;
1388:

Line 1391: x_ic_item_mst_row.item_id,

1387: END IF;
1388:
1389: l_return_val := GMICUOM.uom_conversion
1390: (
1391: x_ic_item_mst_row.item_id,
1392: nvl(p_lot_rec_tbl(j).opm_lot_id,0),
1393: p_lot_rec_tbl(j).quantity,
1394: p_line_rec_tbl(i).quantity_um,
1395: x_ic_item_mst_row.item_um2,

Line 1395: x_ic_item_mst_row.item_um2,

1391: x_ic_item_mst_row.item_id,
1392: nvl(p_lot_rec_tbl(j).opm_lot_id,0),
1393: p_lot_rec_tbl(j).quantity,
1394: p_line_rec_tbl(i).quantity_um,
1395: x_ic_item_mst_row.item_um2,
1396: 0
1397: );
1398:
1399: IF FND_MSG_PUB.G_MSG_LVL_DEBUG_LOW >= G_Debug_Level THEN

Line 1417: FND_MESSAGE.set_token('TOUOM',x_ic_item_mst_row.item_um2);

1413: FND_MESSAGE.set_name('GMI', 'IC_UOMCV_NEWUMTYPE_ERR');
1414: ELSIF (l_return_val = -5) THEN
1415: FND_MESSAGE.set_name('GMI', 'IC_UOMCV_INVUOMTYPE_ERR2');
1416: FND_MESSAGE.set_token('FROMUOM',p_line_rec_tbl(i).quantity_um);
1417: FND_MESSAGE.set_token('TOUOM',x_ic_item_mst_row.item_um2);
1418: ELSIF (l_return_val = -6) THEN
1419: FND_MESSAGE.set_name('GMI', 'IC_UOMCV_INVUMTYPE_ERR');
1420: ELSIF (l_return_val = -7) THEN
1421: FND_MESSAGE.set_name('GMI', 'IC_UOMCV_CURFACTOR_ERR');

Line 1425: FND_MESSAGE.set_token('TOUOM',x_ic_item_mst_row.item_um2);

1421: FND_MESSAGE.set_name('GMI', 'IC_UOMCV_CURFACTOR_ERR');
1422: ELSIF (l_return_val = -10) THEN
1423: FND_MESSAGE.set_name('GMI', 'IC_UOMCV_INVUOMTYPE_ERR2');
1424: FND_MESSAGE.set_token('FROMUOM',p_line_rec_tbl(i).quantity_um);
1425: FND_MESSAGE.set_token('TOUOM',x_ic_item_mst_row.item_um2);
1426: ELSIF (l_return_val = -11) THEN
1427: FND_MESSAGE.set_name('GMI', 'IC_UOMCV_NOITEMID_ERR');
1428: ELSIF (l_return_val < -11) THEN
1429: FND_MESSAGE.set_name('GMI', 'IC_UOMCV_FATAL_ERR');

Line 1436: ELSIF (x_ic_item_mst_row.dualum_ind = 0) THEN

1432: RAISE FND_API.G_EXC_ERROR;
1433: END IF;
1434:
1435: END IF;
1436: ELSIF (x_ic_item_mst_row.dualum_ind = 0) THEN
1437: p_lot_rec_tbl(j).quantity2 := NULL;
1438: END IF;
1439: END IF;--}
1440: p_lot_rec_tbl(j).odm_primary_quantity := p_lot_rec_tbl(j).opm_primary_quantity;

Line 1445: IF (x_ic_item_mst_row.dualum_ind > 0) THEN

1441: --add the quantities at lot to get quantities at the line level
1442: p_line_rec_tbl(i).odm_primary_quantity := nvl(p_line_rec_tbl(i).odm_primary_quantity,0) + p_lot_rec_tbl(j).odm_primary_quantity;
1443: p_line_rec_tbl(i).opm_primary_quantity := nvl(p_line_rec_tbl(i).opm_primary_quantity,0) + p_lot_rec_tbl(j).opm_primary_quantity;
1444:
1445: IF (x_ic_item_mst_row.dualum_ind > 0) THEN
1446: p_line_rec_tbl(i).quantity2 := p_line_rec_tbl(i).quantity2 + p_lot_rec_tbl(j).quantity2;
1447: END IF;
1448:
1449: IF (p_line_rec_tbl(i).lot_control = 0) THEN

Line 1490: item_gl_class := x_ic_item_mst_row.gl_class;

1486: --lets get the charge accounts.
1487:
1488: --Begin Supriya Malluru Bug#4114621
1489: IF (p_line_rec_tbl(i).opm_item_no IS NOT NULL) THEN
1490: item_gl_class := x_ic_item_mst_row.gl_class;
1491: OPEN cur_item_gl_cls(p_line_rec_tbl(i).opm_item_id);
1492: FETCH cur_item_gl_cls
1493: INTO item_gl_class;
1494:

Line 1548: ,v_icgl_class => x_ic_item_mst_row.gl_class

1544: ,v_acct_ttl_type => 6000 /* IVA */
1545: ,v_source => 7 /* IC */
1546: ,v_vendor_id => NULL
1547: ,v_cust_id => NULL
1548: ,v_icgl_class => x_ic_item_mst_row.gl_class
1549: ,v_vendgl_class => NULL
1550: ,v_custgl_class => NULL
1551: ,v_currency_code => l_get_opm_fiscal_details_row.base_currency_code
1552: ,v_routing_id => NULL