DBA Data[Home] [Help]

APPS.GMIVDX dependencies on IC_ITEM_MST

Line 234: x_ic_item_mst_row ic_item_mst%ROWTYPE;

230: IS
231: l_api_name CONSTANT VARCHAR2(30) := 'Validate_transfer' ;
232: l_api_version CONSTANT NUMBER := 1.0 ;
233: l_return_val NUMBER;
234: x_ic_item_mst_row ic_item_mst%ROWTYPE;
235: x_ic_whse_mst_row ic_whse_mst%ROWTYPE;
236: x_sy_reas_cds_row sy_reas_cds%ROWTYPE;
237: x_ic_lots_mst_row ic_lots_mst%ROWTYPE;
238: x_ic_loct_inv_row ic_loct_inv%ROWTYPE;

Line 313: FROM ic_item_mst_b iim, ic_gled_cls igc

309: l_get_odm_fiscal_details_row Cur_get_odm_fiscal_details%ROWTYPE;
310:
311: CURSOR cur_item_gl_cls (p_item_id NUMBER) IS
312: SELECT iim.gl_class
313: FROM ic_item_mst_b iim, ic_gled_cls igc
314: WHERE iim.item_id = p_item_id
315: AND iim.gl_class = igc.icgl_class;
316:
317: CURSOR Cur_gl_cls (p_item ic_item_mst.item_id%TYPE) IS

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

313: FROM ic_item_mst_b iim, ic_gled_cls igc
314: WHERE iim.item_id = p_item_id
315: AND iim.gl_class = igc.icgl_class;
316:
317: CURSOR Cur_gl_cls (p_item ic_item_mst.item_id%TYPE) IS
318: SELECT gic.item_id, gcs.opm_class, gic.category_id, kfv.CONCATENATED_SEGMENTS,
319: mcv.description
320: FROM mtl_categories_vl mcv, mtl_categories_b_kfv kfv, gmi_category_sets gcs, gmi_item_categories gic
321: WHERE gcs.category_set_id IS NOT NULL

Line 333: item_gl_class ic_item_mst.gl_class%TYPE;

329: v_business_class_found BOOLEAN := FALSE;
330: v_product_line_found BOOLEAN := FALSE;
331: gl_business_class_cat_id gmi_item_categories.category_id%TYPE := NULL;
332: gl_product_line_cat_id gmi_item_categories.category_id%TYPE := NULL;
333: item_gl_class ic_item_mst.gl_class%TYPE;
334: --End Supriya Malluru Bug#4114621
335:
336: BEGIN
337:

Line 504: x_ic_item_mst_row.item_no := NULL;

500: RAISE FND_API.G_EXC_ERROR;
501: END IF;
502:
503: /* All lines need an item. Make sure we have one which can be used */
504: x_ic_item_mst_row.item_no := NULL;
505: x_ic_item_mst_row.item_id := p_line_rec_tbl(i).opm_item_id;
506: IF ( GMIVDBL.ic_item_mst_select(x_ic_item_mst_row, x_ic_item_mst_row) ) THEN
507: IF (x_ic_item_mst_row.noninv_ind = 1) THEN
508: FND_MESSAGE.SET_NAME('GMI','IC_API_INVALID_ITEM_NO');

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

501: END IF;
502:
503: /* All lines need an item. Make sure we have one which can be used */
504: x_ic_item_mst_row.item_no := NULL;
505: x_ic_item_mst_row.item_id := p_line_rec_tbl(i).opm_item_id;
506: IF ( GMIVDBL.ic_item_mst_select(x_ic_item_mst_row, x_ic_item_mst_row) ) THEN
507: IF (x_ic_item_mst_row.noninv_ind = 1) THEN
508: FND_MESSAGE.SET_NAME('GMI','IC_API_INVALID_ITEM_NO');
509: FND_MESSAGE.SET_TOKEN('ITEM_NO',x_ic_item_mst_row.item_no);

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

502:
503: /* All lines need an item. Make sure we have one which can be used */
504: x_ic_item_mst_row.item_no := NULL;
505: x_ic_item_mst_row.item_id := p_line_rec_tbl(i).opm_item_id;
506: IF ( GMIVDBL.ic_item_mst_select(x_ic_item_mst_row, x_ic_item_mst_row) ) THEN
507: IF (x_ic_item_mst_row.noninv_ind = 1) THEN
508: FND_MESSAGE.SET_NAME('GMI','IC_API_INVALID_ITEM_NO');
509: FND_MESSAGE.SET_TOKEN('ITEM_NO',x_ic_item_mst_row.item_no);
510: FND_MSG_PUB.Add;

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

503: /* All lines need an item. Make sure we have one which can be used */
504: x_ic_item_mst_row.item_no := NULL;
505: x_ic_item_mst_row.item_id := p_line_rec_tbl(i).opm_item_id;
506: IF ( GMIVDBL.ic_item_mst_select(x_ic_item_mst_row, x_ic_item_mst_row) ) THEN
507: IF (x_ic_item_mst_row.noninv_ind = 1) THEN
508: FND_MESSAGE.SET_NAME('GMI','IC_API_INVALID_ITEM_NO');
509: FND_MESSAGE.SET_TOKEN('ITEM_NO',x_ic_item_mst_row.item_no);
510: FND_MSG_PUB.Add;
511: RAISE FND_API.G_EXC_ERROR;

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

505: x_ic_item_mst_row.item_id := p_line_rec_tbl(i).opm_item_id;
506: IF ( GMIVDBL.ic_item_mst_select(x_ic_item_mst_row, x_ic_item_mst_row) ) THEN
507: IF (x_ic_item_mst_row.noninv_ind = 1) THEN
508: FND_MESSAGE.SET_NAME('GMI','IC_API_INVALID_ITEM_NO');
509: FND_MESSAGE.SET_TOKEN('ITEM_NO',x_ic_item_mst_row.item_no);
510: FND_MSG_PUB.Add;
511: RAISE FND_API.G_EXC_ERROR;
512: END IF;
513: ELSE

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

515: FND_MESSAGE.SET_TOKEN('ITEM_ID',p_line_rec_tbl(i).opm_item_id);
516: FND_MSG_PUB.Add;
517: RAISE FND_API.G_EXC_ERROR;
518: END IF;
519: p_line_rec_tbl(i).opm_item_no := x_ic_item_mst_row.item_no;
520:
521: IF (x_ic_item_mst_row.lot_ctl = 0) THEN
522: p_line_rec_tbl(i).lot_control := 0;
523: ELSIF (x_ic_item_mst_row.lot_ctl = 1) THEN

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

517: RAISE FND_API.G_EXC_ERROR;
518: END IF;
519: p_line_rec_tbl(i).opm_item_no := x_ic_item_mst_row.item_no;
520:
521: IF (x_ic_item_mst_row.lot_ctl = 0) THEN
522: p_line_rec_tbl(i).lot_control := 0;
523: ELSIF (x_ic_item_mst_row.lot_ctl = 1) THEN
524: p_line_rec_tbl(i).lot_control := 1;
525: END IF;

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

519: p_line_rec_tbl(i).opm_item_no := x_ic_item_mst_row.item_no;
520:
521: IF (x_ic_item_mst_row.lot_ctl = 0) THEN
522: p_line_rec_tbl(i).lot_control := 0;
523: ELSIF (x_ic_item_mst_row.lot_ctl = 1) THEN
524: p_line_rec_tbl(i).lot_control := 1;
525: END IF;
526:
527: --Validate the item in ODM

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

585:
586: END IF;
587:
588: --We should be dealing with the same item in OPM/ODM
589: IF (l_item.segment1 <> x_ic_item_mst_row.item_no) THEN
590: FND_MESSAGE.SET_NAME ('GMI','GMI_DXFR_DIFF_ITEM');
591: FND_MESSAGE.SET_TOKEN('LINE_NO',p_line_rec_tbl(i).line_no);
592: FND_MSG_PUB.Add;
593: RAISE FND_API.G_EXC_ERROR;

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

596: /* **************************************************************
597: Item should be either lot controlled both in opm/discrete or not
598: lot controlled both in opm/discrete.
599: ************************************************************** */
600: IF (l_item.lot_control_code <> x_ic_item_mst_row.lot_ctl + 1) THEN
601: FND_MESSAGE.SET_NAME('GMI','GMI_DXFR_DIFF_LOT_CONTROL');
602: FND_MESSAGE.SET_TOKEN('LINE_NO',p_line_rec_tbl(i).line_no);
603: FND_MSG_PUB.Add;
604: RAISE FND_API.G_EXC_ERROR;

Line 608: OPEN Cur_get_uom_code(x_ic_item_mst_row.item_um);

604: RAISE FND_API.G_EXC_ERROR;
605: END IF;
606:
607: --Get uom_code for OPM item's primary UOM
608: OPEN Cur_get_uom_code(x_ic_item_mst_row.item_um);
609: FETCH Cur_get_uom_code INTO l_opm_item_primary_uom_code;
610: CLOSE Cur_get_uom_code;
611:
612: IF (l_item.primary_uom_code <> l_opm_item_primary_uom_code) THEN

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

615: RAISE FND_API.G_EXC_ERROR;
616: END IF;
617:
618: --Get uom_code for OPM item's secondary UOM
619: IF (x_ic_item_mst_row.item_um2 IS NOT NULL) THEN
620: OPEN Cur_get_uom_code(x_ic_item_mst_row.item_um2);
621: FETCH Cur_get_uom_code INTO l_opm_item_secondary_uom_code;
622: CLOSE Cur_get_uom_code;
623: END IF;

Line 620: OPEN Cur_get_uom_code(x_ic_item_mst_row.item_um2);

616: END IF;
617:
618: --Get uom_code for OPM item's secondary UOM
619: IF (x_ic_item_mst_row.item_um2 IS NOT NULL) THEN
620: OPEN Cur_get_uom_code(x_ic_item_mst_row.item_um2);
621: FETCH Cur_get_uom_code INTO l_opm_item_secondary_uom_code;
622: CLOSE Cur_get_uom_code;
623: END IF;
624:

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

752: FND_MSG_PUB.Add;
753: RAISE FND_API.G_EXC_ERROR;
754: ELSIF (p_hdr_rec.trans_date > SYSDATE) THEN
755: FND_MESSAGE.SET_NAME('GMI','IC_API_CANNOT_POST_FUTURE');
756: FND_MESSAGE.SET_TOKEN('ITEM_NO' , x_ic_item_mst_row.item_no);
757: FND_MESSAGE.SET_TOKEN('TRANS_DATE', p_hdr_rec.trans_date);
758: FND_MSG_PUB.Add;
759: RAISE FND_API.G_EXC_ERROR;
760: END IF;

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

850:
851: --lets validate the UOM .
852: --UOM should be same for lines and associated lot records
853: /* Jalaj Srivastava Bug 3812701 */
854: IF ( (p_line_rec_tbl(i).quantity_um <> x_ic_item_mst_row.item_um)
855: AND (NOT GMA_VALID_GRP.Validate_um(p_line_rec_tbl(i).quantity_um))
856: ) THEN
857:
858: FND_MESSAGE.SET_NAME('GMI','IC_API_INVALID_UOM');

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

855: AND (NOT GMA_VALID_GRP.Validate_um(p_line_rec_tbl(i).quantity_um))
856: ) THEN
857:
858: FND_MESSAGE.SET_NAME('GMI','IC_API_INVALID_UOM');
859: FND_MESSAGE.SET_TOKEN('ITEM_NO',x_ic_item_mst_row.item_no);
860: FND_MESSAGE.SET_TOKEN('UOM',p_line_rec_tbl(i).quantity_um);
861: FND_MSG_PUB.Add;
862: RAISE FND_API.G_EXC_ERROR;
863: END IF;

Line 885: OR (x_ic_item_mst_row.loct_ctl = 0)

881: END IF;
882:
883: --Lets Validate the locations in OPM
884: IF ( (x_ic_whse_mst_row.loct_ctl = 0)
885: OR (x_ic_item_mst_row.loct_ctl = 0)
886: ) THEN
887: IF (nvl(p_line_rec_tbl(i).opm_location,GMIGUTL.IC$DEFAULT_LOCT) <> GMIGUTL.IC$DEFAULT_LOCT) THEN
888: IF FND_MSG_PUB.G_MSG_LVL_DEBUG_LOW >= G_Debug_Level THEN
889: log_msg('Failed while validating OPM location. Item and/or warehouse are not location controlled');

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

888: IF FND_MSG_PUB.G_MSG_LVL_DEBUG_LOW >= G_Debug_Level THEN
889: log_msg('Failed while validating OPM location. Item and/or warehouse are not location controlled');
890: END IF;
891: FND_MESSAGE.SET_NAME('GMI','IC_API_INVALID_LOCATION');
892: FND_MESSAGE.SET_TOKEN('ITEM_NO',x_ic_item_mst_row.item_no);
893: FND_MESSAGE.SET_TOKEN('LOCATION',p_line_rec_tbl(i).opm_location);
894: FND_MESSAGE.SET_TOKEN('WHSE_CODE',p_line_rec_tbl(i).opm_whse_code);
895: FND_MSG_PUB.Add;
896: RAISE FND_API.G_EXC_ERROR;

Line 900: AND (x_ic_item_mst_row.loct_ctl = 1)

896: RAISE FND_API.G_EXC_ERROR;
897: END IF;
898: p_line_rec_tbl(i).opm_location := GMIGUTL.IC$DEFAULT_LOCT;
899: ELSIF ( (x_ic_whse_mst_row.loct_ctl = 1)
900: AND (x_ic_item_mst_row.loct_ctl = 1)
901: ) THEN
902: SELECT count(1) INTO l_count
903: FROM ic_loct_inv -- Bug 8359386
904: WHERE whse_code = p_line_rec_tbl(i).opm_whse_code

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

909: IF FND_MSG_PUB.G_MSG_LVL_DEBUG_LOW >= G_Debug_Level THEN
910: log_msg('Failed while validating OPM location. Item and warehouse are validated location controlled');
911: END IF;
912: FND_MESSAGE.SET_NAME('GMI','IC_API_INVALID_LOCATION');
913: FND_MESSAGE.SET_TOKEN('ITEM_NO',x_ic_item_mst_row.item_no);
914: FND_MESSAGE.SET_TOKEN('LOCATION',p_line_rec_tbl(i).opm_location);
915: FND_MESSAGE.SET_TOKEN('WHSE_CODE',p_line_rec_tbl(i).opm_whse_code);
916: FND_MSG_PUB.Add;
917: RAISE FND_API.G_EXC_ERROR;

Line 920: OR (x_ic_item_mst_row.loct_ctl = 2)

916: FND_MSG_PUB.Add;
917: RAISE FND_API.G_EXC_ERROR;
918: END IF;
919: ELSIF ( (x_ic_whse_mst_row.loct_ctl = 2)
920: OR (x_ic_item_mst_row.loct_ctl = 2)
921: ) THEN
922: SELECT count(1) INTO l_count
923: FROM ic_loct_inv
924: WHERE whse_code = p_line_rec_tbl(i).opm_whse_code

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

930: IF FND_MSG_PUB.G_MSG_LVL_DEBUG_LOW >= G_Debug_Level THEN
931: log_msg('Failed while validating OPM location. Item and/or warehouse are non validated location controlled');
932: END IF;
933: FND_MESSAGE.SET_NAME('GMI','IC_API_INVALID_LOCATION');
934: FND_MESSAGE.SET_TOKEN('ITEM_NO',x_ic_item_mst_row.item_no);
935: FND_MESSAGE.SET_TOKEN('LOCATION',p_line_rec_tbl(i).opm_location);
936: FND_MESSAGE.SET_TOKEN('WHSE_CODE',p_line_rec_tbl(i).opm_whse_code);
937: FND_MSG_PUB.Add;
938: RAISE FND_API.G_EXC_ERROR;

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

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

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

1000: p_lot_rec_tbl(l_lot_rec_count).quantity := p_line_rec_tbl(i).quantity;
1001: p_lot_rec_tbl(l_lot_rec_count).quantity2 := p_line_rec_tbl(i).quantity2;
1002: END IF;
1003:
1004: IF (x_ic_item_mst_row.dualum_ind > 0) THEN
1005: p_line_rec_tbl(i).quantity2 := 0;
1006: ELSIF (x_ic_item_mst_row.dualum_ind = 0) THEN
1007: p_line_rec_tbl(i).quantity2 := NULL;
1008: END IF;

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

1002: END IF;
1003:
1004: IF (x_ic_item_mst_row.dualum_ind > 0) THEN
1005: p_line_rec_tbl(i).quantity2 := 0;
1006: ELSIF (x_ic_item_mst_row.dualum_ind = 0) THEN
1007: p_line_rec_tbl(i).quantity2 := NULL;
1008: END IF;
1009:
1010: --lets start validating the lots and the quantities

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

1034:
1035: --transfer is from process to discrete
1036: --{
1037: IF (p_hdr_rec.transfer_type = 0) THEN
1038: IF (x_ic_item_mst_row.lot_ctl = 0) THEN
1039: IF (p_lot_rec_tbl(j).opm_lot_id <> 0) THEN
1040: FND_MESSAGE.SET_NAME('GMI','GMI_DXFR_OPM_LOT_IS_NOT_DEFAULT');
1041: FND_MESSAGE.SET_TOKEN('LINE_NO',p_line_rec_tbl(i).line_no);
1042: FND_MESSAGE.SET_TOKEN('ITEM_NO',x_ic_item_mst_row.item_no);

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

1038: IF (x_ic_item_mst_row.lot_ctl = 0) THEN
1039: IF (p_lot_rec_tbl(j).opm_lot_id <> 0) THEN
1040: FND_MESSAGE.SET_NAME('GMI','GMI_DXFR_OPM_LOT_IS_NOT_DEFAULT');
1041: FND_MESSAGE.SET_TOKEN('LINE_NO',p_line_rec_tbl(i).line_no);
1042: FND_MESSAGE.SET_TOKEN('ITEM_NO',x_ic_item_mst_row.item_no);
1043: FND_MSG_PUB.Add;
1044: RAISE FND_API.G_EXC_ERROR;
1045:
1046: END IF;

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

1044: RAISE FND_API.G_EXC_ERROR;
1045:
1046: END IF;
1047:
1048: ELSIF (x_ic_item_mst_row.lot_ctl = 1) THEN
1049: IF (p_lot_rec_tbl(j).opm_lot_id = 0) THEN
1050: FND_MESSAGE.SET_NAME('GMI','GMI_DXFR_OPM_LOT_IS_DEFAULT');
1051: FND_MESSAGE.SET_TOKEN('LINE_NO',p_line_rec_tbl(i).line_no);
1052: FND_MESSAGE.SET_TOKEN('ITEM_NO',x_ic_item_mst_row.item_no);

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

1048: ELSIF (x_ic_item_mst_row.lot_ctl = 1) THEN
1049: IF (p_lot_rec_tbl(j).opm_lot_id = 0) THEN
1050: FND_MESSAGE.SET_NAME('GMI','GMI_DXFR_OPM_LOT_IS_DEFAULT');
1051: FND_MESSAGE.SET_TOKEN('LINE_NO',p_line_rec_tbl(i).line_no);
1052: FND_MESSAGE.SET_TOKEN('ITEM_NO',x_ic_item_mst_row.item_no);
1053: FND_MSG_PUB.Add;
1054: RAISE FND_API.G_EXC_ERROR;
1055: END IF;
1056: IF FND_MSG_PUB.G_MSG_LVL_DEBUG_LOW >= G_Debug_Level THEN

Line 1099: x_ic_item_mst_row.item_id,

1095:
1096: p_lot_rec_tbl(j).opm_lot_status := x_ic_loct_inv_row.lot_status;
1097: l_return_val := GMICUOM.uom_conversion
1098: (
1099: x_ic_item_mst_row.item_id,
1100: nvl(x_ic_lots_mst_row.lot_id,0),
1101: p_lot_rec_tbl(j).quantity,
1102: p_line_rec_tbl(i).quantity_um,
1103: x_ic_item_mst_row.item_um,

Line 1103: x_ic_item_mst_row.item_um,

1099: x_ic_item_mst_row.item_id,
1100: nvl(x_ic_lots_mst_row.lot_id,0),
1101: p_lot_rec_tbl(j).quantity,
1102: p_line_rec_tbl(i).quantity_um,
1103: x_ic_item_mst_row.item_um,
1104: 0
1105: );
1106: IF FND_MSG_PUB.G_MSG_LVL_DEBUG_LOW >= G_Debug_Level THEN
1107: log_msg('After calling GMICUOM.uom_conversion to get opm_primary_quantity when transfer type is 0. return val is '||l_return_val);

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

1119: FND_MESSAGE.set_name('GMI', 'IC_UOMCV_NEWUMTYPE_ERR');
1120: ELSIF (l_return_val = -5) THEN
1121: FND_MESSAGE.set_name('GMI', 'IC_UOMCV_INVUOMTYPE_ERR2');
1122: FND_MESSAGE.set_token('FROMUOM',p_line_rec_tbl(i).quantity_um);
1123: FND_MESSAGE.set_token('TOUOM',x_ic_item_mst_row.item_um);
1124: ELSIF (l_return_val = -6) THEN
1125: FND_MESSAGE.set_name('GMI', 'IC_UOMCV_INVUMTYPE_ERR');
1126: ELSIF (l_return_val = -7) THEN
1127: FND_MESSAGE.set_name('GMI', 'IC_UOMCV_CURFACTOR_ERR');

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

1127: FND_MESSAGE.set_name('GMI', 'IC_UOMCV_CURFACTOR_ERR');
1128: ELSIF (l_return_val = -10) THEN
1129: FND_MESSAGE.set_name('GMI', 'IC_UOMCV_INVUOMTYPE_ERR2');
1130: FND_MESSAGE.set_token('FROMUOM',p_line_rec_tbl(i).quantity_um);
1131: FND_MESSAGE.set_token('TOUOM',x_ic_item_mst_row.item_um);
1132: ELSIF (l_return_val = -11) THEN
1133: FND_MESSAGE.set_name('GMI', 'IC_UOMCV_NOITEMID_ERR');
1134: ELSIF (l_return_val < -11) THEN
1135: FND_MESSAGE.set_name('GMI', 'IC_UOMCV_FATAL_ERR');

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

1137: FND_MSG_PUB.ADD;
1138: RAISE FND_API.G_EXC_ERROR;
1139: END IF;
1140:
1141: IF ( (x_ic_item_mst_row.lot_indivisible = 1)
1142: AND (x_ic_loct_inv_row.loct_onhand <> p_lot_rec_tbl(j).opm_primary_quantity)
1143: ) THEN
1144: FND_MESSAGE.SET_NAME('GMI','GMI_DXFR_INDIVISIBLE_LOT');
1145: FND_MESSAGE.SET_TOKEN('LINE_NO',p_line_rec_tbl(i).line_no);

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

1156: END IF;--}
1157:
1158: --lets check the deviation between OPM primary and secondary if secondary is passed
1159: --if it is not passed we calculate the secondary qty.
1160: IF (x_ic_item_mst_row.dualum_ind > 0) THEN
1161: IF (x_ic_loct_inv_row.loct_onhand = p_lot_rec_tbl(j).opm_primary_quantity) THEN
1162: p_lot_rec_tbl(j).quantity2 := x_ic_loct_inv_row.loct_onhand2;
1163: ELSE
1164: IF (p_lot_rec_tbl(j).quantity2 IS NULL) THEN

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

1162: p_lot_rec_tbl(j).quantity2 := x_ic_loct_inv_row.loct_onhand2;
1163: ELSE
1164: IF (p_lot_rec_tbl(j).quantity2 IS NULL) THEN
1165:
1166: IF (x_ic_item_mst_row.dualum_ind = 3) THEN
1167: FND_MESSAGE.SET_NAME('GMI','GMI_DXFR_NULL_QTY2');
1168: FND_MESSAGE.SET_TOKEN('LINE_NO',p_line_rec_tbl(i).line_no);
1169: FND_MESSAGE.SET_TOKEN('ITEM_NO',x_ic_item_mst_row.item_no);
1170: FND_MSG_PUB.Add;

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

1165:
1166: IF (x_ic_item_mst_row.dualum_ind = 3) THEN
1167: FND_MESSAGE.SET_NAME('GMI','GMI_DXFR_NULL_QTY2');
1168: FND_MESSAGE.SET_TOKEN('LINE_NO',p_line_rec_tbl(i).line_no);
1169: FND_MESSAGE.SET_TOKEN('ITEM_NO',x_ic_item_mst_row.item_no);
1170: FND_MSG_PUB.Add;
1171: RAISE FND_API.G_EXC_ERROR;
1172: END IF;
1173:

Line 1176: x_ic_item_mst_row.item_id,

1172: END IF;
1173:
1174: l_return_val := GMICUOM.uom_conversion
1175: (
1176: x_ic_item_mst_row.item_id,
1177: nvl(x_ic_lots_mst_row.lot_id,0),
1178: p_lot_rec_tbl(j).quantity,
1179: p_line_rec_tbl(i).quantity_um,
1180: x_ic_item_mst_row.item_um2,

Line 1180: x_ic_item_mst_row.item_um2,

1176: x_ic_item_mst_row.item_id,
1177: nvl(x_ic_lots_mst_row.lot_id,0),
1178: p_lot_rec_tbl(j).quantity,
1179: p_line_rec_tbl(i).quantity_um,
1180: x_ic_item_mst_row.item_um2,
1181: 0
1182: );
1183: IF FND_MSG_PUB.G_MSG_LVL_DEBUG_LOW >= G_Debug_Level THEN
1184: log_msg('After calling GMICUOM.uom_conversion to get quantity2 when transfer type is 0. return val is '||l_return_val);

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

1197: FND_MESSAGE.set_name('GMI', 'IC_UOMCV_NEWUMTYPE_ERR');
1198: ELSIF (l_return_val = -5) THEN
1199: FND_MESSAGE.set_name('GMI', 'IC_UOMCV_INVUOMTYPE_ERR2');
1200: FND_MESSAGE.set_token('FROMUOM',p_line_rec_tbl(i).quantity_um);
1201: FND_MESSAGE.set_token('TOUOM',x_ic_item_mst_row.item_um2);
1202: ELSIF (l_return_val = -6) THEN
1203: FND_MESSAGE.set_name('GMI', 'IC_UOMCV_INVUMTYPE_ERR');
1204: ELSIF (l_return_val = -7) THEN
1205: FND_MESSAGE.set_name('GMI', 'IC_UOMCV_CURFACTOR_ERR');

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

1205: FND_MESSAGE.set_name('GMI', 'IC_UOMCV_CURFACTOR_ERR');
1206: ELSIF (l_return_val = -10) THEN
1207: FND_MESSAGE.set_name('GMI', 'IC_UOMCV_INVUOMTYPE_ERR2');
1208: FND_MESSAGE.set_token('FROMUOM',p_line_rec_tbl(i).quantity_um);
1209: FND_MESSAGE.set_token('TOUOM',x_ic_item_mst_row.item_um2);
1210: ELSIF (l_return_val = -11) THEN
1211: FND_MESSAGE.set_name('GMI', 'IC_UOMCV_NOITEMID_ERR');
1212: ELSIF (l_return_val < -11) THEN
1213: FND_MESSAGE.set_name('GMI', 'IC_UOMCV_FATAL_ERR');

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

1216: RAISE FND_API.G_EXC_ERROR;
1217: END IF;
1218: END IF;
1219: END IF;
1220: ELSIF (x_ic_item_mst_row.dualum_ind = 0) THEN
1221: p_lot_rec_tbl(j).quantity2 := NULL;
1222: END IF;
1223:
1224: IF FND_MSG_PUB.G_MSG_LVL_DEBUG_LOW >= G_Debug_Level THEN

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

1227:
1228: --Lets see if the OPM lot already exists in discrete
1229: --lets get the ODM lot
1230: --{
1231: IF (x_ic_item_mst_row.lot_ctl = 1) THEN
1232:
1233: l_odm_lot.lot_number := p_lot_rec_tbl(j).odm_lot_number;
1234:
1235: --{

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

1278: IF (l_item.lot_control_code = 1) THEN
1279: IF (p_lot_rec_tbl(j).odm_lot_number IS NOT NULL) THEN
1280: FND_MESSAGE.SET_NAME('GMI','GMI_DXFR_ODM_LOT_IS_NOT_NULL');
1281: FND_MESSAGE.SET_TOKEN('LINE_NO',p_line_rec_tbl(i).line_no);
1282: FND_MESSAGE.SET_TOKEN('ITEM_NO',x_ic_item_mst_row.item_no);
1283: FND_MSG_PUB.Add;
1284: RAISE FND_API.G_EXC_ERROR;
1285: END IF;
1286:

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

1292:
1293: IF (p_lot_rec_tbl(j).odm_lot_number IS NULL) THEN
1294: FND_MESSAGE.SET_NAME('GMI','GMI_DXFR_ODM_LOT_IS_NULL');
1295: FND_MESSAGE.SET_TOKEN('LINE_NO',p_line_rec_tbl(i).line_no);
1296: FND_MESSAGE.SET_TOKEN('ITEM_NO',x_ic_item_mst_row.item_no);
1297: FND_MSG_PUB.Add;
1298: RAISE FND_API.G_EXC_ERROR;
1299: END IF;
1300:

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

1300:
1301: END IF;--}
1302:
1303: --Lets see if the ODM lot already exists in OPM
1304: IF (x_ic_item_mst_row.lot_ctl = 1) THEN
1305:
1306: --get the opm lot row
1307: SELECT *
1308: INTO x_ic_lots_mst_row

Line 1310: WHERE ITEM_ID = x_ic_item_mst_row.item_id

1306: --get the opm lot row
1307: SELECT *
1308: INTO x_ic_lots_mst_row
1309: FROM ic_lots_mst
1310: WHERE ITEM_ID = x_ic_item_mst_row.item_id
1311: AND lot_id = p_lot_rec_tbl(j).opm_lot_id;
1312:
1313:
1314: p_lot_rec_tbl(j).opm_lot_no := x_ic_lots_mst_row.lot_no;

Line 1341: x_ic_item_mst_row.item_id,

1337: --conversion could have been lot specific.
1338:
1339: l_return_val := GMICUOM.uom_conversion
1340: (
1341: x_ic_item_mst_row.item_id,
1342: nvl(p_lot_rec_tbl(j).opm_lot_id,0),
1343: p_lot_rec_tbl(j).quantity,
1344: p_line_rec_tbl(i).quantity_um,
1345: x_ic_item_mst_row.item_um,

Line 1345: x_ic_item_mst_row.item_um,

1341: x_ic_item_mst_row.item_id,
1342: nvl(p_lot_rec_tbl(j).opm_lot_id,0),
1343: p_lot_rec_tbl(j).quantity,
1344: p_line_rec_tbl(i).quantity_um,
1345: x_ic_item_mst_row.item_um,
1346: 0
1347: );
1348:
1349: IF FND_MSG_PUB.G_MSG_LVL_DEBUG_LOW >= G_Debug_Level THEN

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

1363: FND_MESSAGE.set_name('GMI', 'IC_UOMCV_NEWUMTYPE_ERR');
1364: ELSIF (l_return_val = -5) THEN
1365: FND_MESSAGE.set_name('GMI', 'IC_UOMCV_INVUOMTYPE_ERR2');
1366: FND_MESSAGE.set_token('FROMUOM',p_line_rec_tbl(i).quantity_um);
1367: FND_MESSAGE.set_token('TOUOM',x_ic_item_mst_row.item_um);
1368: ELSIF (l_return_val = -6) THEN
1369: FND_MESSAGE.set_name('GMI', 'IC_UOMCV_INVUMTYPE_ERR');
1370: ELSIF (l_return_val = -7) THEN
1371: FND_MESSAGE.set_name('GMI', 'IC_UOMCV_CURFACTOR_ERR');

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

1371: FND_MESSAGE.set_name('GMI', 'IC_UOMCV_CURFACTOR_ERR');
1372: ELSIF (l_return_val = -10) THEN
1373: FND_MESSAGE.set_name('GMI', 'IC_UOMCV_INVUOMTYPE_ERR2');
1374: FND_MESSAGE.set_token('FROMUOM',p_line_rec_tbl(i).quantity_um);
1375: FND_MESSAGE.set_token('TOUOM',x_ic_item_mst_row.item_um);
1376: ELSIF (l_return_val = -11) THEN
1377: FND_MESSAGE.set_name('GMI', 'IC_UOMCV_NOITEMID_ERR');
1378: ELSIF (l_return_val < -11) THEN
1379: FND_MESSAGE.set_name('GMI', 'IC_UOMCV_FATAL_ERR');

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

1381: FND_MSG_PUB.ADD;
1382: RAISE FND_API.G_EXC_ERROR;
1383: END IF;
1384:
1385: IF (x_ic_item_mst_row.dualum_ind > 0) THEN
1386: IF (p_lot_rec_tbl(j).quantity2 IS NULL) THEN
1387:
1388: IF (x_ic_item_mst_row.dualum_ind = 3) THEN
1389: FND_MESSAGE.SET_NAME('GMI','GMI_DXFR_NULL_QTY2');

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

1384:
1385: IF (x_ic_item_mst_row.dualum_ind > 0) THEN
1386: IF (p_lot_rec_tbl(j).quantity2 IS NULL) THEN
1387:
1388: IF (x_ic_item_mst_row.dualum_ind = 3) THEN
1389: FND_MESSAGE.SET_NAME('GMI','GMI_DXFR_NULL_QTY2');
1390: FND_MESSAGE.SET_TOKEN('LINE_NO',p_line_rec_tbl(i).line_no);
1391: FND_MESSAGE.SET_TOKEN('ITEM_NO',x_ic_item_mst_row.item_no);
1392: FND_MSG_PUB.Add;

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

1387:
1388: IF (x_ic_item_mst_row.dualum_ind = 3) THEN
1389: FND_MESSAGE.SET_NAME('GMI','GMI_DXFR_NULL_QTY2');
1390: FND_MESSAGE.SET_TOKEN('LINE_NO',p_line_rec_tbl(i).line_no);
1391: FND_MESSAGE.SET_TOKEN('ITEM_NO',x_ic_item_mst_row.item_no);
1392: FND_MSG_PUB.Add;
1393: RAISE FND_API.G_EXC_ERROR;
1394: END IF;
1395:

Line 1398: x_ic_item_mst_row.item_id,

1394: END IF;
1395:
1396: l_return_val := GMICUOM.uom_conversion
1397: (
1398: x_ic_item_mst_row.item_id,
1399: nvl(p_lot_rec_tbl(j).opm_lot_id,0),
1400: p_lot_rec_tbl(j).quantity,
1401: p_line_rec_tbl(i).quantity_um,
1402: x_ic_item_mst_row.item_um2,

Line 1402: x_ic_item_mst_row.item_um2,

1398: x_ic_item_mst_row.item_id,
1399: nvl(p_lot_rec_tbl(j).opm_lot_id,0),
1400: p_lot_rec_tbl(j).quantity,
1401: p_line_rec_tbl(i).quantity_um,
1402: x_ic_item_mst_row.item_um2,
1403: 0
1404: );
1405:
1406: IF FND_MSG_PUB.G_MSG_LVL_DEBUG_LOW >= G_Debug_Level THEN

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

1420: FND_MESSAGE.set_name('GMI', 'IC_UOMCV_NEWUMTYPE_ERR');
1421: ELSIF (l_return_val = -5) THEN
1422: FND_MESSAGE.set_name('GMI', 'IC_UOMCV_INVUOMTYPE_ERR2');
1423: FND_MESSAGE.set_token('FROMUOM',p_line_rec_tbl(i).quantity_um);
1424: FND_MESSAGE.set_token('TOUOM',x_ic_item_mst_row.item_um2);
1425: ELSIF (l_return_val = -6) THEN
1426: FND_MESSAGE.set_name('GMI', 'IC_UOMCV_INVUMTYPE_ERR');
1427: ELSIF (l_return_val = -7) THEN
1428: FND_MESSAGE.set_name('GMI', 'IC_UOMCV_CURFACTOR_ERR');

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

1428: FND_MESSAGE.set_name('GMI', 'IC_UOMCV_CURFACTOR_ERR');
1429: ELSIF (l_return_val = -10) THEN
1430: FND_MESSAGE.set_name('GMI', 'IC_UOMCV_INVUOMTYPE_ERR2');
1431: FND_MESSAGE.set_token('FROMUOM',p_line_rec_tbl(i).quantity_um);
1432: FND_MESSAGE.set_token('TOUOM',x_ic_item_mst_row.item_um2);
1433: ELSIF (l_return_val = -11) THEN
1434: FND_MESSAGE.set_name('GMI', 'IC_UOMCV_NOITEMID_ERR');
1435: ELSIF (l_return_val < -11) THEN
1436: FND_MESSAGE.set_name('GMI', 'IC_UOMCV_FATAL_ERR');

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

1439: RAISE FND_API.G_EXC_ERROR;
1440: END IF;
1441:
1442: END IF;
1443: ELSIF (x_ic_item_mst_row.dualum_ind = 0) THEN
1444: p_lot_rec_tbl(j).quantity2 := NULL;
1445: END IF;
1446: END IF;--}
1447: p_lot_rec_tbl(j).odm_primary_quantity := p_lot_rec_tbl(j).opm_primary_quantity;

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

1448: --add the quantities at lot to get quantities at the line level
1449: 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;
1450: 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;
1451:
1452: IF (x_ic_item_mst_row.dualum_ind > 0) THEN
1453: p_line_rec_tbl(i).quantity2 := p_line_rec_tbl(i).quantity2 + p_lot_rec_tbl(j).quantity2;
1454: END IF;
1455:
1456: IF (p_line_rec_tbl(i).lot_control = 0) THEN

Line 1497: item_gl_class := x_ic_item_mst_row.gl_class;

1493: --lets get the charge accounts.
1494:
1495: --Begin Supriya Malluru Bug#4114621
1496: IF (p_line_rec_tbl(i).opm_item_no IS NOT NULL) THEN
1497: item_gl_class := x_ic_item_mst_row.gl_class;
1498: OPEN cur_item_gl_cls(p_line_rec_tbl(i).opm_item_id);
1499: FETCH cur_item_gl_cls
1500: INTO item_gl_class;
1501:

Line 1555: ,v_icgl_class => x_ic_item_mst_row.gl_class

1551: ,v_acct_ttl_type => 6000 /* IVA */
1552: ,v_source => 7 /* IC */
1553: ,v_vendor_id => NULL
1554: ,v_cust_id => NULL
1555: ,v_icgl_class => x_ic_item_mst_row.gl_class
1556: ,v_vendgl_class => NULL
1557: ,v_custgl_class => NULL
1558: ,v_currency_code => l_get_opm_fiscal_details_row.base_currency_code
1559: ,v_routing_id => NULL