DBA Data[Home] [Help]

APPS.GMIVQTY dependencies on IC_ITEM_MST

Line 103: ( p_item_id IN ic_item_mst.item_id%TYPE

99: | 01-OCT-1998 M.Godfrey Created |
100: +=========================================================================+
101: */
102: FUNCTION Check_unposted_jnl_lot_status
103: ( p_item_id IN ic_item_mst.item_id%TYPE
104: , p_lot_id IN ic_lots_mst.lot_id%TYPE
105: , p_whse_code IN ic_whse_mst.whse_code%TYPE
106: , p_location IN ic_loct_mst.location%TYPE
107: , p_lot_status IN ic_lots_sts.lot_status%TYPE

Line 183: ( p_item_id IN ic_item_mst.item_id%TYPE

179: | 01-OCT-1998 M.Godfrey Created |
180: +=========================================================================+
181: */
182: FUNCTION Check_unposted_jnl_qc_grade
183: ( p_item_id IN ic_item_mst.item_id%TYPE
184: , p_lot_id IN ic_lots_mst.lot_id%TYPE
185: , p_qc_grade IN qc_grad_mst.qc_grade%TYPE
186: )
187: RETURN BOOLEAN

Line 477: , p_ic_item_mst_row IN ic_item_mst%ROWTYPE

473: PROCEDURE Validate_Inventory_Posting
474: ( p_api_version IN NUMBER
475: , p_validation_level IN NUMBER
476: , p_qty_rec IN GMIGAPI.qty_rec_typ
477: , p_ic_item_mst_row IN ic_item_mst%ROWTYPE
478: , p_ic_item_cpg_row IN ic_item_cpg%ROWTYPE
479: , p_ic_lots_mst_row IN ic_lots_mst%ROWTYPE
480: , p_ic_lots_cpg_row IN ic_lots_cpg%ROWTYPE
481: , x_ic_jrnl_mst_row OUT NOCOPY ic_jrnl_mst%ROWTYPE

Line 522: WHERE item_id = p_ic_item_mst_row.item_id

518: l_from_whse_co_code VARCHAR2(4);
519: CURSOR Cur_get_onhand_for_grade IS
520: SELECT sum(loct_onhand),sum(loct_onhand2)
521: FROM ic_loct_inv
522: WHERE item_id = p_ic_item_mst_row.item_id
523: AND lot_id = p_ic_lots_mst_row.lot_id;
524:
525: --BEGIN BUG#3171345
526: CURSOR Cur_get_status IS

Line 528: FROM ic_item_mst

524:
525: --BEGIN BUG#3171345
526: CURSOR Cur_get_status IS
527: SELECT lot_status
528: FROM ic_item_mst
529: WHERE item_id = p_ic_item_mst_row.item_id;
530: --END BUG#3171345
531:
532: BEGIN

Line 529: WHERE item_id = p_ic_item_mst_row.item_id;

525: --BEGIN BUG#3171345
526: CURSOR Cur_get_status IS
527: SELECT lot_status
528: FROM ic_item_mst
529: WHERE item_id = p_ic_item_mst_row.item_id;
530: --END BUG#3171345
531:
532: BEGIN
533: /* Store inputs locally */

Line 580: IF p_ic_item_mst_row.grade_ctl = 0 AND l_trans_type IN (5,10)

576: END IF;
577:
578: /* Check that transaction type is applicable to item. If */
579: /* it's not, complain, otherwise set up a few defaults. */
580: IF p_ic_item_mst_row.grade_ctl = 0 AND l_trans_type IN (5,10)
581: OR p_ic_item_mst_row.status_ctl = 0 AND l_trans_type IN (4,9)
582: THEN
583: FND_MESSAGE.SET_NAME('GMI','IC_API_INV_TRANS_TYPE_FOR_ITEM');
584: FND_MESSAGE.SET_TOKEN('ITEM_NO',l_qty_rec.item_no);

Line 581: OR p_ic_item_mst_row.status_ctl = 0 AND l_trans_type IN (4,9)

577:
578: /* Check that transaction type is applicable to item. If */
579: /* it's not, complain, otherwise set up a few defaults. */
580: IF p_ic_item_mst_row.grade_ctl = 0 AND l_trans_type IN (5,10)
581: OR p_ic_item_mst_row.status_ctl = 0 AND l_trans_type IN (4,9)
582: THEN
583: FND_MESSAGE.SET_NAME('GMI','IC_API_INV_TRANS_TYPE_FOR_ITEM');
584: FND_MESSAGE.SET_TOKEN('ITEM_NO',l_qty_rec.item_no);
585: FND_MESSAGE.SET_TOKEN('TRANS_TYPE', l_trans_type);

Line 594: l_qty_rec.item_um := p_ic_item_mst_row.item_um;

590: /* accept what we're given unless they're null, in which */
591: /* case default them. */
592: IF (l_trans_type IN (4,5,9,10))
593: THEN
594: l_qty_rec.item_um := p_ic_item_mst_row.item_um;
595: l_qty_rec.item_um2 := p_ic_item_mst_row.item_um2;
596: ELSE
597: l_qty_rec.item_um := nvl(l_qty_rec.item_um, p_ic_item_mst_row.item_um);
598: l_qty_rec.item_um2 := nvl(l_qty_rec.item_um2, p_ic_item_mst_row.item_um2);

Line 595: l_qty_rec.item_um2 := p_ic_item_mst_row.item_um2;

591: /* case default them. */
592: IF (l_trans_type IN (4,5,9,10))
593: THEN
594: l_qty_rec.item_um := p_ic_item_mst_row.item_um;
595: l_qty_rec.item_um2 := p_ic_item_mst_row.item_um2;
596: ELSE
597: l_qty_rec.item_um := nvl(l_qty_rec.item_um, p_ic_item_mst_row.item_um);
598: l_qty_rec.item_um2 := nvl(l_qty_rec.item_um2, p_ic_item_mst_row.item_um2);
599: END IF;

Line 597: l_qty_rec.item_um := nvl(l_qty_rec.item_um, p_ic_item_mst_row.item_um);

593: THEN
594: l_qty_rec.item_um := p_ic_item_mst_row.item_um;
595: l_qty_rec.item_um2 := p_ic_item_mst_row.item_um2;
596: ELSE
597: l_qty_rec.item_um := nvl(l_qty_rec.item_um, p_ic_item_mst_row.item_um);
598: l_qty_rec.item_um2 := nvl(l_qty_rec.item_um2, p_ic_item_mst_row.item_um2);
599: END IF;
600:
601: IF (l_trans_type < 6) THEN

Line 598: l_qty_rec.item_um2 := nvl(l_qty_rec.item_um2, p_ic_item_mst_row.item_um2);

594: l_qty_rec.item_um := p_ic_item_mst_row.item_um;
595: l_qty_rec.item_um2 := p_ic_item_mst_row.item_um2;
596: ELSE
597: l_qty_rec.item_um := nvl(l_qty_rec.item_um, p_ic_item_mst_row.item_um);
598: l_qty_rec.item_um2 := nvl(l_qty_rec.item_um2, p_ic_item_mst_row.item_um2);
599: END IF;
600:
601: IF (l_trans_type < 6) THEN
602: l_qty_rec.journal_ind := 'N';

Line 648: l_qty_rec.lot_status := p_ic_item_mst_row.lot_status;

644: END IF;
645:
646: l_qty_rec.txn_type := substr(l_trans_code,1,3);
647: IF (l_qty_rec.txn_type = 'CRE') THEN
648: l_qty_rec.lot_status := p_ic_item_mst_row.lot_status;
649: l_qty_rec.qc_grade := p_ic_item_mst_row.qc_grade;
650: END IF;
651:
652: IF (l_qty_rec.txn_type = 'STS') THEN

Line 649: l_qty_rec.qc_grade := p_ic_item_mst_row.qc_grade;

645:
646: l_qty_rec.txn_type := substr(l_trans_code,1,3);
647: IF (l_qty_rec.txn_type = 'CRE') THEN
648: l_qty_rec.lot_status := p_ic_item_mst_row.lot_status;
649: l_qty_rec.qc_grade := p_ic_item_mst_row.qc_grade;
650: END IF;
651:
652: IF (l_qty_rec.txn_type = 'STS') THEN
653: l_qty_rec.to_whse_code := l_qty_rec.from_whse_code;

Line 667: IF p_ic_item_mst_row.item_id = 0

663:
664:
665: /* All transaction types need an item. Make sure we have */
666: /* one which can be used */
667: IF p_ic_item_mst_row.item_id = 0
668: OR p_ic_item_mst_row.delete_mark = 1
669: OR p_ic_item_mst_row.noninv_ind = 1
670: OR p_ic_item_mst_row.inactive_ind =1 AND GMIGUTL.IC$API_ALLOW_INACTIVE=0
671: THEN

Line 668: OR p_ic_item_mst_row.delete_mark = 1

664:
665: /* All transaction types need an item. Make sure we have */
666: /* one which can be used */
667: IF p_ic_item_mst_row.item_id = 0
668: OR p_ic_item_mst_row.delete_mark = 1
669: OR p_ic_item_mst_row.noninv_ind = 1
670: OR p_ic_item_mst_row.inactive_ind =1 AND GMIGUTL.IC$API_ALLOW_INACTIVE=0
671: THEN
672: FND_MESSAGE.SET_NAME('GMI','IC_API_INVALID_ITEM_NO');

Line 669: OR p_ic_item_mst_row.noninv_ind = 1

665: /* All transaction types need an item. Make sure we have */
666: /* one which can be used */
667: IF p_ic_item_mst_row.item_id = 0
668: OR p_ic_item_mst_row.delete_mark = 1
669: OR p_ic_item_mst_row.noninv_ind = 1
670: OR p_ic_item_mst_row.inactive_ind =1 AND GMIGUTL.IC$API_ALLOW_INACTIVE=0
671: THEN
672: FND_MESSAGE.SET_NAME('GMI','IC_API_INVALID_ITEM_NO');
673: FND_MESSAGE.SET_TOKEN('ITEM_NO',l_qty_rec.item_no);

Line 670: OR p_ic_item_mst_row.inactive_ind =1 AND GMIGUTL.IC$API_ALLOW_INACTIVE=0

666: /* one which can be used */
667: IF p_ic_item_mst_row.item_id = 0
668: OR p_ic_item_mst_row.delete_mark = 1
669: OR p_ic_item_mst_row.noninv_ind = 1
670: OR p_ic_item_mst_row.inactive_ind =1 AND GMIGUTL.IC$API_ALLOW_INACTIVE=0
671: THEN
672: FND_MESSAGE.SET_NAME('GMI','IC_API_INVALID_ITEM_NO');
673: FND_MESSAGE.SET_TOKEN('ITEM_NO',l_qty_rec.item_no);
674: FND_MSG_PUB.Add;

Line 687: IF p_ic_item_mst_row.lot_ctl > 0

683: /* mean that we should have a sublot number. Also make sure */
684: /* that attempts to transact against the default lot are */
685: /* blocked. */
686:
687: IF p_ic_item_mst_row.lot_ctl > 0
688: THEN
689: IF NVL(l_qty_rec.lot_no,GMIGUTL.IC$DEFAULT_LOT)=GMIGUTL.IC$DEFAULT_LOT
690: OR p_ic_lots_mst_row.delete_mark = 1
691: OR p_ic_lots_mst_row.inactive_ind = 1 AND GMIGUTL.IC$API_ALLOW_INACTIVE = 0

Line 777: IF p_ic_item_mst_row.loct_ctl > 0

773: END IF;
774:
775: l_bad_location := 0;
776:
777: IF p_ic_item_mst_row.loct_ctl > 0
778: THEN
779: IF l_from_loct_ctl > 0 AND
780: l_qty_rec.from_location=GMIGUTL.IC$DEFAULT_LOCT
781: OR l_trans_type in (3,4,8,9) AND

Line 824: ( p_item_id => p_ic_item_mst_row.item_id

820: IF GMIGUTL.v_qc_grade(l_qty_rec.qc_grade, l_qc_grad_mst_row)
821: THEN
822: /* Check for unposted journals with different QC grade */
823: IF Check_unposted_jnl_qc_grade
824: ( p_item_id => p_ic_item_mst_row.item_id
825: , p_lot_id => p_ic_lots_mst_row.lot_id
826: , p_qc_grade => l_qty_rec.qc_grade
827: )
828: THEN

Line 960: ( p_item_id => p_ic_item_mst_row.item_id

956:
957: IF l_trans_type in (1,2,4,6,7,9)
958: THEN
959: GMIGUTL.get_loct_inv
960: ( p_item_id => p_ic_item_mst_row.item_id
961: , p_whse_code =>l_qty_rec.from_whse_code
962: , p_lot_id =>p_ic_lots_mst_row.lot_id
963: , p_location =>l_qty_rec.from_location
964: , x_ic_loct_inv_row =>l_ic_loct_inv_row_from

Line 977: ( p_item_id => p_ic_item_mst_row.item_id

973: END IF;
974: ELSIF l_trans_type IN (3,8)
975: THEN
976: GMIGUTL.get_loct_inv
977: ( p_item_id => p_ic_item_mst_row.item_id
978: , p_whse_code =>l_qty_rec.from_whse_code
979: , p_lot_id =>p_ic_lots_mst_row.lot_id
980: , p_location =>l_qty_rec.from_location
981: , x_ic_loct_inv_row =>l_ic_loct_inv_row_from

Line 984: ( p_item_id => p_ic_item_mst_row.item_id

980: , p_location =>l_qty_rec.from_location
981: , x_ic_loct_inv_row =>l_ic_loct_inv_row_from
982: );
983: GMIGUTL.get_loct_inv
984: ( p_item_id => p_ic_item_mst_row.item_id
985: , p_whse_code =>l_qty_rec.to_whse_code
986: , p_lot_id =>p_ic_lots_mst_row.lot_id
987: , p_location =>l_qty_rec.to_location
988: , x_ic_loct_inv_row =>l_ic_loct_inv_row_to

Line 1031: l_qty_rec.lot_status := p_ic_item_mst_row.lot_status;

1027: FND_MESSAGE.SET_TOKEN('LOCATION',l_qty_rec.from_location);
1028: FND_MSG_PUB.Add;
1029: RAISE FND_API.G_EXC_ERROR;
1030: ELSE
1031: l_qty_rec.lot_status := p_ic_item_mst_row.lot_status;
1032: l_qty_rec.qc_grade := p_ic_item_mst_row.qc_grade;
1033: END IF;
1034: ELSIF l_trans_type IN (2,7)
1035: THEN

Line 1032: l_qty_rec.qc_grade := p_ic_item_mst_row.qc_grade;

1028: FND_MSG_PUB.Add;
1029: RAISE FND_API.G_EXC_ERROR;
1030: ELSE
1031: l_qty_rec.lot_status := p_ic_item_mst_row.lot_status;
1032: l_qty_rec.qc_grade := p_ic_item_mst_row.qc_grade;
1033: END IF;
1034: ELSIF l_trans_type IN (2,7)
1035: THEN
1036: /* If adjusting there might or might not be stock */

Line 1039: l_qty_rec.lot_status := p_ic_item_mst_row.lot_status;

1035: THEN
1036: /* If adjusting there might or might not be stock */
1037: IF l_ic_loct_inv_row_from.loct_onhand IS NULL
1038: THEN
1039: l_qty_rec.lot_status := p_ic_item_mst_row.lot_status;
1040: l_qty_rec.qc_grade := p_ic_item_mst_row.qc_grade;
1041: ELSE
1042: l_qty_rec.lot_status := l_ic_loct_inv_row_from.lot_status;
1043: l_qty_rec.qc_grade := p_ic_lots_mst_row.qc_grade;

Line 1040: l_qty_rec.qc_grade := p_ic_item_mst_row.qc_grade;

1036: /* If adjusting there might or might not be stock */
1037: IF l_ic_loct_inv_row_from.loct_onhand IS NULL
1038: THEN
1039: l_qty_rec.lot_status := p_ic_item_mst_row.lot_status;
1040: l_qty_rec.qc_grade := p_ic_item_mst_row.qc_grade;
1041: ELSE
1042: l_qty_rec.lot_status := l_ic_loct_inv_row_from.lot_status;
1043: l_qty_rec.qc_grade := p_ic_lots_mst_row.qc_grade;
1044: END IF;

Line 1066: IF p_ic_item_mst_row.status_ctl = 1 AND l_ic_loct_inv_row_from.lot_status IS NULL THEN

1062: /*==================================================
1063: 27/Dec/2001 J.DiIorio Bug#2117575 - 11.5.1I
1064: ================================================*/
1065: --BEGIN BUG James Bernard3171345
1066: IF p_ic_item_mst_row.status_ctl = 1 AND l_ic_loct_inv_row_from.lot_status IS NULL THEN
1067: --Check first if there is any/zero qty in the to whse ie destination whse.
1068: IF l_ic_loct_inv_row_to.lot_status IS NULL THEN
1069: OPEN Cur_get_status;
1070: FETCH Cur_get_status INTO l_ic_loct_inv_row_from.lot_status;

Line 1136: ELSIF l_qty_rec.lot_status = p_ic_item_mst_row.lot_status

1132: FND_MESSAGE.SET_TOKEN('LOT_NO',l_qty_rec.lot_no);
1133: FND_MESSAGE.SET_TOKEN('SUBLOT_NO',l_qty_rec.sublot_no);
1134: FND_MSG_PUB.Add;
1135: RAISE FND_API.G_EXC_ERROR;
1136: ELSIF l_qty_rec.lot_status = p_ic_item_mst_row.lot_status
1137: THEN
1138: NULL;
1139: ELSE
1140: IF GMIGUTL.v_lot_status (l_qty_rec.lot_status, l_ic_lots_sts_row)

Line 1153: ( p_item_id => p_ic_item_mst_row.item_id

1149: END IF;
1150: END If;
1151: /* Check for unposted journals with different lot status */
1152: IF Check_unposted_jnl_lot_status
1153: ( p_item_id => p_ic_item_mst_row.item_id
1154: , p_lot_id => p_ic_lots_mst_row.lot_id
1155: , p_whse_code => l_qty_rec.from_whse_code
1156: , p_location => l_qty_rec.from_location
1157: , p_lot_status => l_qty_rec.lot_status

Line 1182: IF l_qty_rec.item_um <> p_ic_item_mst_row.item_um

1178:
1179:
1180: /* Before embarking on major number crunching, validate the */
1181: /* primary uom of the quantity passed in. */
1182: IF l_qty_rec.item_um <> p_ic_item_mst_row.item_um
1183: THEN
1184: IF NOT GMA_VALID_GRP.Validate_um(l_qty_rec.item_um)
1185: THEN
1186: FND_MESSAGE.SET_NAME('GMI','IC_API_INVALID_UOM');

Line 1201: IF (l_qty_rec.item_um <> p_ic_item_mst_row.item_um) OR

1197:
1198: /* Handle Quantities */
1199: /* If primary Uom differs from item primary UoM then convert */
1200: /* transaction quantity */
1201: IF (l_qty_rec.item_um <> p_ic_item_mst_row.item_um) OR
1202: (l_qty_rec.item_um IS NULL)
1203: THEN
1204: /* If quantity to convert is negative then make positive for conversion */
1205: IF l_qty_rec.trans_qty < 0

Line 1211: ( pitem_id =>p_ic_item_mst_row.item_id

1207: l_neg_qty := 1;
1208: l_qty_rec.trans_qty := 0 - l_qty_rec.trans_qty;
1209: END IF;
1210: l_qty_rec.trans_qty :=GMICUOM.uom_conversion
1211: ( pitem_id =>p_ic_item_mst_row.item_id
1212: , plot_id =>p_ic_lots_mst_row.lot_id
1213: , pcur_qty =>l_qty_rec.trans_qty
1214: , pcur_uom =>l_qty_rec.item_um
1215: , pnew_uom =>p_ic_item_mst_row.item_um

Line 1215: , pnew_uom =>p_ic_item_mst_row.item_um

1211: ( pitem_id =>p_ic_item_mst_row.item_id
1212: , plot_id =>p_ic_lots_mst_row.lot_id
1213: , pcur_qty =>l_qty_rec.trans_qty
1214: , pcur_uom =>l_qty_rec.item_um
1215: , pnew_uom =>p_ic_item_mst_row.item_um
1216: , patomic =>0
1217: );
1218: /* Negative quantity indicates UoM conversion failure */
1219: IF (l_qty_rec.trans_qty < 0)

Line 1224: FND_MESSAGE.SET_TOKEN('TO_UOM',p_ic_item_mst_row.item_um);

1220: THEN
1221: FND_MESSAGE.SET_NAME('GMI','IC_API_UOM_CONVERSION_ERROR');
1222: FND_MESSAGE.SET_TOKEN('ITEM_NO',l_qty_rec.item_no);
1223: FND_MESSAGE.SET_TOKEN('FROM_UOM',l_qty_rec.item_um);
1224: FND_MESSAGE.SET_TOKEN('TO_UOM',p_ic_item_mst_row.item_um);
1225: FND_MSG_PUB.Add;
1226: RAISE FND_API.G_EXC_ERROR;
1227: ELSE
1228: l_qty_rec.item_um :=p_ic_item_mst_row.item_um;

Line 1228: l_qty_rec.item_um :=p_ic_item_mst_row.item_um;

1224: FND_MESSAGE.SET_TOKEN('TO_UOM',p_ic_item_mst_row.item_um);
1225: FND_MSG_PUB.Add;
1226: RAISE FND_API.G_EXC_ERROR;
1227: ELSE
1228: l_qty_rec.item_um :=p_ic_item_mst_row.item_um;
1229: /* Reverse quantity sign if reversed above */
1230: IF l_neg_qty = 1
1231: THEN
1232: l_neg_qty := 0;

Line 1240: IF (p_ic_item_mst_row.dualum_ind > 0)

1236: END IF;
1237: END IF;
1238:
1239: /* If dual unit of measure then convert to item secondary unit of measure */
1240: IF (p_ic_item_mst_row.dualum_ind > 0)
1241: THEN
1242: /* Bug 2206335 */
1243: /* Do not call the uom conversion routine if the user is trying to
1244: zero out the quantity or move entire quantity */

Line 1249: IF (p_ic_item_mst_row.dualum_ind = 2) THEN

1245: IF ( (l_trans_type IN (2,7)) AND
1246: (l_qty_rec.trans_qty + l_ic_loct_inv_row_from.loct_onhand) = 0 )
1247: THEN
1248: -- BEGIN BUG#2861715 Sastry
1249: IF (p_ic_item_mst_row.dualum_ind = 2) THEN
1250: IF (UPPER(l_qty_rec.move_entire_qty) = 'Y') THEN
1251: l_qty2 := l_ic_loct_inv_row_from.loct_onhand2 * -1;
1252: l_qty_rec.trans_qty2 :=l_qty2;
1253: l_check_deviation := 0;

Line 1256: ( pitem_id =>p_ic_item_mst_row.item_id

1252: l_qty_rec.trans_qty2 :=l_qty2;
1253: l_check_deviation := 0;
1254: ELSE
1255: l_qty2 := GMICUOM.uom_conversion
1256: ( pitem_id =>p_ic_item_mst_row.item_id
1257: , plot_id =>p_ic_lots_mst_row.lot_id
1258: , pcur_qty =>l_qty_rec.trans_qty
1259: , pcur_uom =>p_ic_item_mst_row.item_um
1260: , pnew_uom =>p_ic_item_mst_row.item_um2

Line 1259: , pcur_uom =>p_ic_item_mst_row.item_um

1255: l_qty2 := GMICUOM.uom_conversion
1256: ( pitem_id =>p_ic_item_mst_row.item_id
1257: , plot_id =>p_ic_lots_mst_row.lot_id
1258: , pcur_qty =>l_qty_rec.trans_qty
1259: , pcur_uom =>p_ic_item_mst_row.item_um
1260: , pnew_uom =>p_ic_item_mst_row.item_um2
1261: , patomic =>0
1262: );
1263: l_check_deviation := 1;

Line 1260: , pnew_uom =>p_ic_item_mst_row.item_um2

1256: ( pitem_id =>p_ic_item_mst_row.item_id
1257: , plot_id =>p_ic_lots_mst_row.lot_id
1258: , pcur_qty =>l_qty_rec.trans_qty
1259: , pcur_uom =>p_ic_item_mst_row.item_um
1260: , pnew_uom =>p_ic_item_mst_row.item_um2
1261: , patomic =>0
1262: );
1263: l_check_deviation := 1;
1264: END IF;

Line 1276: IF (p_ic_item_mst_row.dualum_ind = 2) THEN

1272: (l_qty_rec.trans_qty - l_ic_loct_inv_row_from.loct_onhand) = 0 )
1273: THEN
1274: -- BEGIN BUG#2861715 Sastry
1275: -- Added code to move the entire Onhand qty2 based on the newly added parameter
1276: IF (p_ic_item_mst_row.dualum_ind = 2) THEN
1277: IF (UPPER(l_qty_rec.move_entire_qty) = 'Y') THEN
1278: l_qty2 := l_ic_loct_inv_row_from.loct_onhand2;
1279: l_qty_rec.trans_qty2 :=l_qty2;
1280: l_check_deviation := 0;

Line 1283: ( pitem_id =>p_ic_item_mst_row.item_id

1279: l_qty_rec.trans_qty2 :=l_qty2;
1280: l_check_deviation := 0;
1281: ELSE
1282: l_qty2 := GMICUOM.uom_conversion
1283: ( pitem_id =>p_ic_item_mst_row.item_id
1284: , plot_id =>p_ic_lots_mst_row.lot_id
1285: , pcur_qty =>l_qty_rec.trans_qty
1286: , pcur_uom =>p_ic_item_mst_row.item_um
1287: , pnew_uom =>p_ic_item_mst_row.item_um2

Line 1286: , pcur_uom =>p_ic_item_mst_row.item_um

1282: l_qty2 := GMICUOM.uom_conversion
1283: ( pitem_id =>p_ic_item_mst_row.item_id
1284: , plot_id =>p_ic_lots_mst_row.lot_id
1285: , pcur_qty =>l_qty_rec.trans_qty
1286: , pcur_uom =>p_ic_item_mst_row.item_um
1287: , pnew_uom =>p_ic_item_mst_row.item_um2
1288: , patomic =>0
1289: );
1290: l_check_deviation := 1;

Line 1287: , pnew_uom =>p_ic_item_mst_row.item_um2

1283: ( pitem_id =>p_ic_item_mst_row.item_id
1284: , plot_id =>p_ic_lots_mst_row.lot_id
1285: , pcur_qty =>l_qty_rec.trans_qty
1286: , pcur_uom =>p_ic_item_mst_row.item_um
1287: , pnew_uom =>p_ic_item_mst_row.item_um2
1288: , patomic =>0
1289: );
1290: l_check_deviation := 1;
1291: END IF;

Line 1306: ( pitem_id =>p_ic_item_mst_row.item_id

1302: l_neg_qty := 1;
1303: l_qty_rec.trans_qty := 0 - l_qty_rec.trans_qty;
1304: END IF;
1305: l_qty2 :=GMICUOM.uom_conversion
1306: ( pitem_id =>p_ic_item_mst_row.item_id
1307: , plot_id =>p_ic_lots_mst_row.lot_id
1308: , pcur_qty =>l_qty_rec.trans_qty
1309: , pcur_uom =>p_ic_item_mst_row.item_um
1310: , pnew_uom =>p_ic_item_mst_row.item_um2

Line 1309: , pcur_uom =>p_ic_item_mst_row.item_um

1305: l_qty2 :=GMICUOM.uom_conversion
1306: ( pitem_id =>p_ic_item_mst_row.item_id
1307: , plot_id =>p_ic_lots_mst_row.lot_id
1308: , pcur_qty =>l_qty_rec.trans_qty
1309: , pcur_uom =>p_ic_item_mst_row.item_um
1310: , pnew_uom =>p_ic_item_mst_row.item_um2
1311: , patomic =>0
1312: );
1313: /* Negative quantity indicates UoM conversion failure */

Line 1310: , pnew_uom =>p_ic_item_mst_row.item_um2

1306: ( pitem_id =>p_ic_item_mst_row.item_id
1307: , plot_id =>p_ic_lots_mst_row.lot_id
1308: , pcur_qty =>l_qty_rec.trans_qty
1309: , pcur_uom =>p_ic_item_mst_row.item_um
1310: , pnew_uom =>p_ic_item_mst_row.item_um2
1311: , patomic =>0
1312: );
1313: /* Negative quantity indicates UoM conversion failure */
1314: IF (l_qty2 < 0)

Line 1318: FND_MESSAGE.SET_TOKEN('FROM_UOM',p_ic_item_mst_row.item_um);

1314: IF (l_qty2 < 0)
1315: THEN
1316: FND_MESSAGE.SET_NAME('GMI','IC_API_UOM_CONVERSION_ERROR');
1317: FND_MESSAGE.SET_TOKEN('ITEM_NO',l_qty_rec.item_no);
1318: FND_MESSAGE.SET_TOKEN('FROM_UOM',p_ic_item_mst_row.item_um);
1319: FND_MESSAGE.SET_TOKEN('TO_UOM',p_ic_item_mst_row.item_um2);
1320: FND_MSG_PUB.Add;
1321: RAISE FND_API.G_EXC_ERROR;
1322: END IF;

Line 1319: FND_MESSAGE.SET_TOKEN('TO_UOM',p_ic_item_mst_row.item_um2);

1315: THEN
1316: FND_MESSAGE.SET_NAME('GMI','IC_API_UOM_CONVERSION_ERROR');
1317: FND_MESSAGE.SET_TOKEN('ITEM_NO',l_qty_rec.item_no);
1318: FND_MESSAGE.SET_TOKEN('FROM_UOM',p_ic_item_mst_row.item_um);
1319: FND_MESSAGE.SET_TOKEN('TO_UOM',p_ic_item_mst_row.item_um2);
1320: FND_MSG_PUB.Add;
1321: RAISE FND_API.G_EXC_ERROR;
1322: END IF;
1323: /* Reverse quantity sign if reversed above */

Line 1333: IF (p_ic_item_mst_row.dualum_ind = 1) OR

1329: END IF;
1330: END IF; /* 2206335 */
1331:
1332: /* If fixed conversion then converted value is secondary qty */
1333: IF (p_ic_item_mst_row.dualum_ind = 1) OR
1334: (p_ic_item_mst_row.dualum_ind = 2 AND l_qty_rec.trans_qty2 = 0)
1335: THEN
1336: l_qty_rec.trans_qty2 :=l_qty2;
1337: l_qty_rec.item_um2 :=p_ic_item_mst_row.item_um2;

Line 1334: (p_ic_item_mst_row.dualum_ind = 2 AND l_qty_rec.trans_qty2 = 0)

1330: END IF; /* 2206335 */
1331:
1332: /* If fixed conversion then converted value is secondary qty */
1333: IF (p_ic_item_mst_row.dualum_ind = 1) OR
1334: (p_ic_item_mst_row.dualum_ind = 2 AND l_qty_rec.trans_qty2 = 0)
1335: THEN
1336: l_qty_rec.trans_qty2 :=l_qty2;
1337: l_qty_rec.item_um2 :=p_ic_item_mst_row.item_um2;
1338: ELSE

Line 1337: l_qty_rec.item_um2 :=p_ic_item_mst_row.item_um2;

1333: IF (p_ic_item_mst_row.dualum_ind = 1) OR
1334: (p_ic_item_mst_row.dualum_ind = 2 AND l_qty_rec.trans_qty2 = 0)
1335: THEN
1336: l_qty_rec.trans_qty2 :=l_qty2;
1337: l_qty_rec.item_um2 :=p_ic_item_mst_row.item_um2;
1338: ELSE
1339: /* If secondary Uom differs from item secondary UoM then convert */
1340: /* transaction quantity */
1341: IF (l_qty_rec.item_um2 <> p_ic_item_mst_row.item_um2)

Line 1341: IF (l_qty_rec.item_um2 <> p_ic_item_mst_row.item_um2)

1337: l_qty_rec.item_um2 :=p_ic_item_mst_row.item_um2;
1338: ELSE
1339: /* If secondary Uom differs from item secondary UoM then convert */
1340: /* transaction quantity */
1341: IF (l_qty_rec.item_um2 <> p_ic_item_mst_row.item_um2)
1342:
1343: THEN
1344: /* If quantity to convert is negative then make positive for conversion */
1345: IF l_qty_rec.trans_qty < 0

Line 1351: ( pitem_id =>p_ic_item_mst_row.item_id

1347: l_neg_qty := 1;
1348: l_qty_rec.trans_qty2 := 0 - l_qty_rec.trans_qty2;
1349: END IF;
1350: l_qty_rec.trans_qty2 :=GMICUOM.uom_conversion
1351: ( pitem_id =>p_ic_item_mst_row.item_id
1352: , plot_id =>p_ic_lots_mst_row.lot_id
1353: , pcur_qty =>l_qty_rec.trans_qty2
1354: , pcur_uom =>l_qty_rec.item_um2
1355: , pnew_uom =>p_ic_item_mst_row.item_um2

Line 1355: , pnew_uom =>p_ic_item_mst_row.item_um2

1351: ( pitem_id =>p_ic_item_mst_row.item_id
1352: , plot_id =>p_ic_lots_mst_row.lot_id
1353: , pcur_qty =>l_qty_rec.trans_qty2
1354: , pcur_uom =>l_qty_rec.item_um2
1355: , pnew_uom =>p_ic_item_mst_row.item_um2
1356: , patomic =>0
1357: );
1358: /* Negative quantity indicates UoM conversion failure */
1359: IF (l_qty_rec.trans_qty2 < 0)

Line 1364: FND_MESSAGE.SET_TOKEN('TO_UOM',p_ic_item_mst_row.item_um2);

1360: THEN
1361: FND_MESSAGE.SET_NAME('GMI','IC_API_UOM_CONVERSION_ERROR');
1362: FND_MESSAGE.SET_TOKEN('ITEM_NO',l_qty_rec.item_no);
1363: FND_MESSAGE.SET_TOKEN('FROM_UOM',l_qty_rec.item_um2);
1364: FND_MESSAGE.SET_TOKEN('TO_UOM',p_ic_item_mst_row.item_um2);
1365: FND_MSG_PUB.Add;
1366: RAISE FND_API.G_EXC_ERROR;
1367: ELSE
1368: l_qty_rec.item_um2 :=p_ic_item_mst_row.item_um2;

Line 1368: l_qty_rec.item_um2 :=p_ic_item_mst_row.item_um2;

1364: FND_MESSAGE.SET_TOKEN('TO_UOM',p_ic_item_mst_row.item_um2);
1365: FND_MSG_PUB.Add;
1366: RAISE FND_API.G_EXC_ERROR;
1367: ELSE
1368: l_qty_rec.item_um2 :=p_ic_item_mst_row.item_um2;
1369: /* Reverse quantity sign if reversed above */
1370: IF l_neg_qty = 1
1371: THEN
1372: l_neg_qty := 0;

Line 1391: ABS(l_qty2) * (1 + p_ic_item_mst_row.deviation_hi)) OR

1387: -- If the user is trying to zero out the qty then do not
1388: -- run the deviation logic as it is already accounted for.
1389: IF (l_check_deviation <> 0) THEN
1390: IF (ABS(l_qty_rec.trans_qty2) >
1391: ABS(l_qty2) * (1 + p_ic_item_mst_row.deviation_hi)) OR
1392: (ABS(l_qty_rec.trans_qty2) <
1393: ABS(l_qty2) * (1 - p_ic_item_mst_row.deviation_lo))
1394: THEN
1395: FND_MESSAGE.SET_NAME('GMI','IC_API_QTY_TOLERANCE_ERROR');

Line 1393: ABS(l_qty2) * (1 - p_ic_item_mst_row.deviation_lo))

1389: IF (l_check_deviation <> 0) THEN
1390: IF (ABS(l_qty_rec.trans_qty2) >
1391: ABS(l_qty2) * (1 + p_ic_item_mst_row.deviation_hi)) OR
1392: (ABS(l_qty_rec.trans_qty2) <
1393: ABS(l_qty2) * (1 - p_ic_item_mst_row.deviation_lo))
1394: THEN
1395: FND_MESSAGE.SET_NAME('GMI','IC_API_QTY_TOLERANCE_ERROR');
1396: FND_MESSAGE.SET_TOKEN('ITEM_NO',l_qty_rec.item_no);
1397: FND_MESSAGE.SET_TOKEN('LOT_NO',l_qty_rec.lot_no);

Line 1429: AND a.item_id = p_ic_item_mst_row.item_id

1425: WHERE j.orgn_code = l_qty_rec.orgn_code
1426: AND j.journal_no = nvl(l_qty_rec.journal_no,GMIGAPI.prev_journal_no)
1427: AND a.journal_id = j.journal_id
1428: AND a.line_type <> -1
1429: AND a.item_id = p_ic_item_mst_row.item_id
1430: AND a.lot_id = nvl(p_ic_lots_mst_row.lot_id,0)
1431: AND a.whse_code = l_qty_rec.from_whse_code
1432: AND a.location = nvl(l_qty_rec.from_location,GMIGUTL.IC$DEFAULT_LOCT);
1433: END IF;-- ( (l_trans_type IN (7,8))

Line 1459: IF (p_ic_item_mst_row.lot_indivisible = 1) AND

1455: END IF;
1456: END IF;
1457:
1458: /* Check move quantity if item is lot-indivisble */
1459: IF (p_ic_item_mst_row.lot_indivisible = 1) AND
1460: (l_trans_type IN (3,8)) AND
1461: (l_ic_loct_inv_row_from.loct_onhand <> l_qty_rec.trans_qty)
1462: THEN
1463: FND_MESSAGE.SET_NAME('GMI','IC_API_LOT_INDIVISIBLE');

Line 1605: x_ic_adjs_jnl_row1.item_id := p_ic_item_mst_row.item_id;

1601: END IF;
1602: x_ic_adjs_jnl_row1.whse_code := l_qty_rec.from_whse_code;
1603: x_ic_adjs_jnl_row1.reason_code := l_qty_rec.reason_code;
1604: x_ic_adjs_jnl_row1.doc_date := l_qty_rec.trans_date;
1605: x_ic_adjs_jnl_row1.item_id := p_ic_item_mst_row.item_id;
1606: x_ic_adjs_jnl_row1.item_um := l_qty_rec.item_um;
1607: x_ic_adjs_jnl_row1.item_um2 := l_qty_rec.item_um2;
1608: x_ic_adjs_jnl_row1.lot_id := p_ic_lots_mst_row.lot_id;
1609: x_ic_adjs_jnl_row1.location := l_qty_rec.from_location;