DBA Data[Home] [Help]

APPS.GMI_QUANTITY_PVT dependencies on IC_ITEM_MST

Line 79: , x_item_id OUT ic_item_mst.item_id%TYPE

75: --| Amended Deviation Logic |
76: --+=========================================================================+
77: PROCEDURE Validate_Inventory_Posting
78: ( p_trans_rec IN GMI_QUANTITY_PUB.trans_rec_typ
79: , x_item_id OUT ic_item_mst.item_id%TYPE
80: , x_lot_id OUT ic_lots_mst.lot_id%TYPE
81: , x_old_lot_status OUT ic_lots_sts.lot_status%TYPE
82: , x_old_qc_grade OUT qc_grad_mst.qc_grade%TYPE
83: , x_return_status OUT VARCHAR2

Line 90: l_ic_item_mst_rec ic_item_mst%ROWTYPE;

86: , x_trans_rec OUT GMI_QUANTITY_PUB.trans_rec_typ
87: )
88: IS
89: l_trans_rec GMI_QUANTITY_PUB.trans_rec_typ;
90: l_ic_item_mst_rec ic_item_mst%ROWTYPE;
91: l_ic_item_cpg_rec ic_item_cpg%ROWTYPE;
92: l_ic_lots_mst_rec ic_lots_mst%ROWTYPE;
93: l_ic_lots_cpg_rec ic_lots_cpg%ROWTYPE;
94: l_ic_whse_mst_rec ic_whse_mst%ROWTYPE;

Line 99: l_item_id ic_item_mst.item_id%TYPE;

95: l_ic_loct_inv_rec_from ic_loct_inv%ROWTYPE;
96: l_ic_loct_inv_rec_to ic_loct_inv%ROWTYPE;
97: l_sy_reas_cds_rec sy_reas_cds%ROWTYPE;
98: l_lot_rec GMI_LOTS_PUB.lot_rec_typ;
99: l_item_id ic_item_mst.item_id%TYPE;
100: l_lot_id ic_lots_mst.lot_id%TYPE;
101: l_qty2 NUMBER;
102: l_lot_onhand NUMBER :=0;
103: l_trans_type NUMBER(2);

Line 344: , x_ic_item_mst => l_ic_item_mst_rec

340: END IF;
341:
342: -- Get the item details
343: GMI_GLOBAL_GRP.Get_Item ( p_item_no => l_trans_rec.item_no
344: , x_ic_item_mst => l_ic_item_mst_rec
345: , x_ic_item_cpg => l_ic_item_cpg_rec
346: );
347: -- If errors were found then raise exception
348: IF (l_ic_item_mst_rec.item_id < 0)

Line 348: IF (l_ic_item_mst_rec.item_id < 0)

344: , x_ic_item_mst => l_ic_item_mst_rec
345: , x_ic_item_cpg => l_ic_item_cpg_rec
346: );
347: -- If errors were found then raise exception
348: IF (l_ic_item_mst_rec.item_id < 0)
349: THEN
350: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
351: ELSIF (l_ic_item_mst_rec.item_id = 0) OR
352: (l_ic_item_mst_rec.delete_mark = 1)

Line 351: ELSIF (l_ic_item_mst_rec.item_id = 0) OR

347: -- If errors were found then raise exception
348: IF (l_ic_item_mst_rec.item_id < 0)
349: THEN
350: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
351: ELSIF (l_ic_item_mst_rec.item_id = 0) OR
352: (l_ic_item_mst_rec.delete_mark = 1)
353: THEN
354: FND_MESSAGE.SET_NAME('GMI','IC_API_INVALID_ITEM_NO');
355: FND_MESSAGE.SET_TOKEN('ITEM_NO',l_trans_rec.item_no);

Line 352: (l_ic_item_mst_rec.delete_mark = 1)

348: IF (l_ic_item_mst_rec.item_id < 0)
349: THEN
350: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
351: ELSIF (l_ic_item_mst_rec.item_id = 0) OR
352: (l_ic_item_mst_rec.delete_mark = 1)
353: THEN
354: FND_MESSAGE.SET_NAME('GMI','IC_API_INVALID_ITEM_NO');
355: FND_MESSAGE.SET_TOKEN('ITEM_NO',l_trans_rec.item_no);
356: FND_MSG_PUB.Add;

Line 358: ELSIF (l_ic_item_mst_rec.noninv_ind = 1)

354: FND_MESSAGE.SET_NAME('GMI','IC_API_INVALID_ITEM_NO');
355: FND_MESSAGE.SET_TOKEN('ITEM_NO',l_trans_rec.item_no);
356: FND_MSG_PUB.Add;
357: RAISE FND_API.G_EXC_ERROR;
358: ELSIF (l_ic_item_mst_rec.noninv_ind = 1)
359: THEN
360: FND_MESSAGE.SET_NAME('GMI','IC_API_NONINV_ITEM_NO');
361: FND_MESSAGE.SET_TOKEN('ITEM_NO',l_trans_rec.item_no);
362: FND_MSG_PUB.Add;

Line 364: ELSIF (l_ic_item_mst_rec.inactive_ind = 1)

360: FND_MESSAGE.SET_NAME('GMI','IC_API_NONINV_ITEM_NO');
361: FND_MESSAGE.SET_TOKEN('ITEM_NO',l_trans_rec.item_no);
362: FND_MSG_PUB.Add;
363: RAISE FND_API.G_EXC_ERROR;
364: ELSIF (l_ic_item_mst_rec.inactive_ind = 1)
365: THEN
366: FND_MESSAGE.SET_NAME('GMI','IC_API_INACTIVE_ITEM_NO');
367: FND_MESSAGE.SET_TOKEN('ITEM_NO',l_trans_rec.item_no);
368: FND_MSG_PUB.Add;

Line 374: IF (l_ic_item_mst_rec.grade_ctl = 0 AND l_trans_type = 5)

370: END IF;
371:
372: -- Check that transaction type is applicable to item
373: -- QC grade change
374: IF (l_ic_item_mst_rec.grade_ctl = 0 AND l_trans_type = 5)
375: THEN
376: FND_MESSAGE.SET_NAME('GMI','IC_API_INV_TRANS_TYPE_FOR_ITEM');
377: FND_MESSAGE.SET_TOKEN('ITEM_NO',l_trans_rec.item_no);
378: FND_MESSAGE.SET_TOKEN('TRANS_TYPE', l_trans_type);

Line 384: IF (l_ic_item_mst_rec.status_ctl = 0 AND l_trans_type = 4)

380: RAISE FND_API.G_EXC_ERROR;
381: END IF;
382:
383: -- Lot status change
384: IF (l_ic_item_mst_rec.status_ctl = 0 AND l_trans_type = 4)
385: THEN
386: FND_MESSAGE.SET_NAME('GMI','IC_API_INV_TRANS_TYPE_FOR_ITEM');
387: FND_MESSAGE.SET_TOKEN('ITEM_NO',l_trans_rec.item_no);
388: FND_MESSAGE.SET_TOKEN('TRANS_TYPE', l_trans_type);

Line 396: l_trans_rec.item_um := l_ic_item_mst_rec.item_um;

392:
393: -- Default unit of measure fields for status and QC grade change
394: IF (l_trans_type > 3)
395: THEN
396: l_trans_rec.item_um := l_ic_item_mst_rec.item_um;
397: l_trans_rec.item_um2 := l_ic_item_mst_rec.item_um2;
398: END IF;
399:
400: -- Store item_id for return to calling API

Line 397: l_trans_rec.item_um2 := l_ic_item_mst_rec.item_um2;

393: -- Default unit of measure fields for status and QC grade change
394: IF (l_trans_type > 3)
395: THEN
396: l_trans_rec.item_um := l_ic_item_mst_rec.item_um;
397: l_trans_rec.item_um2 := l_ic_item_mst_rec.item_um2;
398: END IF;
399:
400: -- Store item_id for return to calling API
401: x_item_id :=l_ic_item_mst_rec.item_id;

Line 401: x_item_id :=l_ic_item_mst_rec.item_id;

397: l_trans_rec.item_um2 := l_ic_item_mst_rec.item_um2;
398: END IF;
399:
400: -- Store item_id for return to calling API
401: x_item_id :=l_ic_item_mst_rec.item_id;
402: l_item_id :=l_ic_item_mst_rec.item_id;
403:
404: -- Store the default lot_status of the item. This will be
405: -- used as the 'Old' lot_status for QC grade transactions

Line 402: l_item_id :=l_ic_item_mst_rec.item_id;

398: END IF;
399:
400: -- Store item_id for return to calling API
401: x_item_id :=l_ic_item_mst_rec.item_id;
402: l_item_id :=l_ic_item_mst_rec.item_id;
403:
404: -- Store the default lot_status of the item. This will be
405: -- used as the 'Old' lot_status for QC grade transactions
406: -- In this situation 'Old' and 'New' lot_status is not

Line 408: x_old_lot_status :=l_ic_item_mst_rec.lot_status;

404: -- Store the default lot_status of the item. This will be
405: -- used as the 'Old' lot_status for QC grade transactions
406: -- In this situation 'Old' and 'New' lot_status is not
407: -- applicable.
408: x_old_lot_status :=l_ic_item_mst_rec.lot_status;
409:
410: -- If not change lot status then store lot_status
411: IF (l_trans_type <> 4)
412: THEN

Line 413: l_trans_rec.lot_status :=l_ic_item_mst_rec.lot_status;

409:
410: -- If not change lot status then store lot_status
411: IF (l_trans_type <> 4)
412: THEN
413: l_trans_rec.lot_status :=l_ic_item_mst_rec.lot_status;
414: END IF;
415:
416: -- Check lot parameters
417: IF (l_ic_item_mst_rec.lot_ctl = 0)

Line 417: IF (l_ic_item_mst_rec.lot_ctl = 0)

413: l_trans_rec.lot_status :=l_ic_item_mst_rec.lot_status;
414: END IF;
415:
416: -- Check lot parameters
417: IF (l_ic_item_mst_rec.lot_ctl = 0)
418: THEN
419: IF (l_trans_rec.lot_no <>' ' AND
420: l_trans_rec.lot_no IS NOT NULL)
421: THEN

Line 448: IF (l_ic_item_mst_rec.sublot_ctl = 0)

444: THEN
445: l_trans_rec.sublot_no := NULL;
446: END IF;
447:
448: IF (l_ic_item_mst_rec.sublot_ctl = 0)
449: THEN
450: IF (l_trans_rec.sublot_no <>' ')
451: THEN
452: FND_MESSAGE.SET_NAME('GMI','IC_API_SUBLOT_NOT_REQD');

Line 462: IF (l_ic_item_mst_rec.sublot_ctl = 0)

458:
459: -- Get existing lot details. If item not lot controlled then
460: -- get the default lot.
461:
462: IF (l_ic_item_mst_rec.sublot_ctl = 0)
463: THEN
464: l_trans_rec.sublot_no :=NULL;
465: END IF;
466:

Line 467: IF (l_ic_item_mst_rec.lot_ctl = 0)

463: THEN
464: l_trans_rec.sublot_no :=NULL;
465: END IF;
466:
467: IF (l_ic_item_mst_rec.lot_ctl = 0)
468: THEN
469: l_trans_rec.lot_no :=IC$DEFAULT_LOT;
470: ELSE
471: -- Do not Allow Transactions against DEFAULT LOT

Line 473: IF (l_ic_item_mst_rec.lot_ctl = 1 AND

469: l_trans_rec.lot_no :=IC$DEFAULT_LOT;
470: ELSE
471: -- Do not Allow Transactions against DEFAULT LOT
472: -- H.Verdding B965832 Part 2
473: IF (l_ic_item_mst_rec.lot_ctl = 1 AND
474: l_trans_rec.lot_no='DEFAULTLOT')
475: THEN
476: FND_MESSAGE.SET_NAME('GMI','IC_DEFAULTLOTERR');
477: FND_MSG_PUB.Add;

Line 483: GMI_GLOBAL_GRP.Get_Lot ( p_item_id => l_ic_item_mst_rec.item_id

479: END IF;
480: END IF;
481:
482:
483: GMI_GLOBAL_GRP.Get_Lot ( p_item_id => l_ic_item_mst_rec.item_id
484: , p_lot_no => l_trans_rec.lot_no
485: , p_sublot_no => l_trans_rec.sublot_no
486: , x_ic_lots_mst => l_ic_lots_mst_rec
487: , x_ic_lots_cpg => l_ic_lots_cpg_rec

Line 545: GMI_GLOBAL_GRP.Get_Lot ( p_item_id => l_ic_item_mst_rec.item_id

541: -- Initialize message list to remove 'Lot created' message
542: FND_MSG_PUB.Initialize;
543:
544: -- Get lot details for lot created
545: GMI_GLOBAL_GRP.Get_Lot ( p_item_id => l_ic_item_mst_rec.item_id
546: , p_lot_no => l_trans_rec.lot_no
547: , p_sublot_no => l_trans_rec.sublot_no
548: , x_ic_lots_mst => l_ic_lots_mst_rec
549: , x_ic_lots_cpg => l_ic_lots_cpg_rec

Line 592: ( p_item_loct_ctl => l_ic_item_mst_rec.loct_ctl

588: RAISE FND_API.G_EXC_ERROR;
589: ELSE
590: -- Check location parameters
591: IF NOT GMI_VALID_GRP.Validate_Location
592: ( p_item_loct_ctl => l_ic_item_mst_rec.loct_ctl
593: , p_whse_loct_ctl => l_ic_whse_mst_rec.loct_ctl
594: , p_whse_code => l_trans_rec.from_whse_code
595: , p_location => l_trans_rec.from_location
596: )

Line 632: ( p_item_loct_ctl => l_ic_item_mst_rec.loct_ctl

628: RAISE FND_API.G_EXC_ERROR;
629: ELSE
630: -- Check location parameters
631: IF NOT GMI_VALID_GRP.Validate_Location
632: ( p_item_loct_ctl => l_ic_item_mst_rec.loct_ctl
633: , p_whse_loct_ctl => l_ic_whse_mst_rec.loct_ctl
634: , p_whse_code => l_trans_rec.to_whse_code
635: , p_location => l_trans_rec.to_location
636: )

Line 695: l_trans_rec.lot_status :=l_ic_item_mst_rec.lot_status;

691: (l_ic_loct_inv_rec_from.item_id = 0)
692: THEN
693: l_ic_loct_inv_rec_from.loct_onhand :=0;
694: l_ic_loct_inv_rec_from.loct_onhand2 :=0;
695: l_trans_rec.lot_status :=l_ic_item_mst_rec.lot_status;
696: ELSIF (l_trans_type = 1)
697: THEN
698: FND_MESSAGE.SET_NAME('GMI','IC_API_LOCT_ONHAND_EXISTS');
699: FND_MESSAGE.SET_TOKEN('ITEM_NO',l_trans_rec.item_no);

Line 767: (l_ic_item_mst_rec.dualum_ind = 0 OR

763: RAISE FND_API.G_EXC_ERROR;
764: END IF;
765: IF (l_trans_rec.trans_qty2 <> 0 AND
766: l_trans_rec.trans_qty2 IS NOT NULL) AND
767: (l_ic_item_mst_rec.dualum_ind = 0 OR
768: l_ic_item_mst_rec.dualum_ind =1)
769: THEN
770: FND_MESSAGE.SET_NAME('GMI','IC_API_INVALID_QTY2');
771: FND_MESSAGE.SET_TOKEN('ITEM_NO',l_trans_rec.item_no);

Line 768: l_ic_item_mst_rec.dualum_ind =1)

764: END IF;
765: IF (l_trans_rec.trans_qty2 <> 0 AND
766: l_trans_rec.trans_qty2 IS NOT NULL) AND
767: (l_ic_item_mst_rec.dualum_ind = 0 OR
768: l_ic_item_mst_rec.dualum_ind =1)
769: THEN
770: FND_MESSAGE.SET_NAME('GMI','IC_API_INVALID_QTY2');
771: FND_MESSAGE.SET_TOKEN('ITEM_NO',l_trans_rec.item_no);
772: FND_MESSAGE.SET_TOKEN('LOT_NO',l_trans_rec.lot_no);

Line 792: IF (l_trans_rec.item_um <> l_ic_item_mst_rec.item_um) OR

788:
789: -- Handle Quantities
790: -- If primary Uom differs from item primary UoM then convert
791: -- transaction quantity
792: IF (l_trans_rec.item_um <> l_ic_item_mst_rec.item_um) OR
793: (l_trans_rec.item_um IS NULL)
794: THEN
795: -- If quantity to convert is negative then make positive for conversion
796: IF l_trans_rec.trans_qty < 0

Line 806: , pnew_uom =>l_ic_item_mst_rec.item_um

802: ( pitem_id =>l_item_id
803: , plot_id =>l_lot_id
804: , pcur_qty =>l_trans_rec.trans_qty
805: , pcur_uom =>l_trans_rec.item_um
806: , pnew_uom =>l_ic_item_mst_rec.item_um
807: , patomic =>0
808: );
809: -- Negative quantity indicates UoM conversion failure
810: IF (l_trans_rec.trans_qty < 0)

Line 815: FND_MESSAGE.SET_TOKEN('TO_UOM',l_ic_item_mst_rec.item_um);

811: THEN
812: FND_MESSAGE.SET_NAME('GMI','IC_API_UOM_CONVERSION_ERROR');
813: FND_MESSAGE.SET_TOKEN('ITEM_NO',l_trans_rec.item_no);
814: FND_MESSAGE.SET_TOKEN('FROM_UOM',l_trans_rec.item_um);
815: FND_MESSAGE.SET_TOKEN('TO_UOM',l_ic_item_mst_rec.item_um);
816: FND_MSG_PUB.Add;
817: RAISE FND_API.G_EXC_ERROR;
818: ELSE
819: l_trans_rec.item_um :=l_ic_item_mst_rec.item_um;

Line 819: l_trans_rec.item_um :=l_ic_item_mst_rec.item_um;

815: FND_MESSAGE.SET_TOKEN('TO_UOM',l_ic_item_mst_rec.item_um);
816: FND_MSG_PUB.Add;
817: RAISE FND_API.G_EXC_ERROR;
818: ELSE
819: l_trans_rec.item_um :=l_ic_item_mst_rec.item_um;
820: -- Reverse quantity sign if reversed above
821: IF l_neg_qty = 1
822: THEN
823: l_neg_qty := 0;

Line 830: IF (l_ic_item_mst_rec.dualum_ind > 0)

826: END IF;
827: END IF;
828:
829: -- If dual unit of measure then convert to item secondary unit of measure
830: IF (l_ic_item_mst_rec.dualum_ind > 0)
831: THEN
832: -- If quantity to convert is negative then make positive for conversion
833: IF l_trans_rec.trans_qty < 0
834: THEN

Line 842: , pcur_uom =>l_ic_item_mst_rec.item_um

838: l_qty2 :=GMICUOM.uom_conversion
839: ( pitem_id =>l_item_id
840: , plot_id =>l_lot_id
841: , pcur_qty =>l_trans_rec.trans_qty
842: , pcur_uom =>l_ic_item_mst_rec.item_um
843: , pnew_uom =>l_ic_item_mst_rec.item_um2
844: , patomic =>0
845: );
846: -- Negative quantity indicates UoM conversion failure

Line 843: , pnew_uom =>l_ic_item_mst_rec.item_um2

839: ( pitem_id =>l_item_id
840: , plot_id =>l_lot_id
841: , pcur_qty =>l_trans_rec.trans_qty
842: , pcur_uom =>l_ic_item_mst_rec.item_um
843: , pnew_uom =>l_ic_item_mst_rec.item_um2
844: , patomic =>0
845: );
846: -- Negative quantity indicates UoM conversion failure
847: IF (l_qty2 < 0)

Line 851: FND_MESSAGE.SET_TOKEN('FROM_UOM',l_ic_item_mst_rec.item_um);

847: IF (l_qty2 < 0)
848: THEN
849: FND_MESSAGE.SET_NAME('GMI','IC_API_UOM_CONVERSION_ERROR');
850: FND_MESSAGE.SET_TOKEN('ITEM_NO',l_trans_rec.item_no);
851: FND_MESSAGE.SET_TOKEN('FROM_UOM',l_ic_item_mst_rec.item_um);
852: FND_MESSAGE.SET_TOKEN('TO_UOM',l_ic_item_mst_rec.item_um2);
853: FND_MSG_PUB.Add;
854: RAISE FND_API.G_EXC_ERROR;
855: END IF;

Line 852: FND_MESSAGE.SET_TOKEN('TO_UOM',l_ic_item_mst_rec.item_um2);

848: THEN
849: FND_MESSAGE.SET_NAME('GMI','IC_API_UOM_CONVERSION_ERROR');
850: FND_MESSAGE.SET_TOKEN('ITEM_NO',l_trans_rec.item_no);
851: FND_MESSAGE.SET_TOKEN('FROM_UOM',l_ic_item_mst_rec.item_um);
852: FND_MESSAGE.SET_TOKEN('TO_UOM',l_ic_item_mst_rec.item_um2);
853: FND_MSG_PUB.Add;
854: RAISE FND_API.G_EXC_ERROR;
855: END IF;
856: -- Reverse quantity sign if reversed above

Line 864: IF (l_ic_item_mst_rec.dualum_ind = 1) OR

860: l_trans_rec.trans_qty := 0 - l_trans_rec.trans_qty;
861: l_qty2 := 0 - l_qty2;
862: END IF;
863: -- If fixed conversion then converted value is secondary qty
864: IF (l_ic_item_mst_rec.dualum_ind = 1) OR
865: (l_ic_item_mst_rec.dualum_ind =2 AND l_trans_rec.trans_qty2 = 0)
866: THEN
867: l_trans_rec.trans_qty2 :=l_qty2;
868: l_trans_rec.item_um2 :=l_ic_item_mst_rec.item_um2;

Line 865: (l_ic_item_mst_rec.dualum_ind =2 AND l_trans_rec.trans_qty2 = 0)

861: l_qty2 := 0 - l_qty2;
862: END IF;
863: -- If fixed conversion then converted value is secondary qty
864: IF (l_ic_item_mst_rec.dualum_ind = 1) OR
865: (l_ic_item_mst_rec.dualum_ind =2 AND l_trans_rec.trans_qty2 = 0)
866: THEN
867: l_trans_rec.trans_qty2 :=l_qty2;
868: l_trans_rec.item_um2 :=l_ic_item_mst_rec.item_um2;
869: ELSE

Line 868: l_trans_rec.item_um2 :=l_ic_item_mst_rec.item_um2;

864: IF (l_ic_item_mst_rec.dualum_ind = 1) OR
865: (l_ic_item_mst_rec.dualum_ind =2 AND l_trans_rec.trans_qty2 = 0)
866: THEN
867: l_trans_rec.trans_qty2 :=l_qty2;
868: l_trans_rec.item_um2 :=l_ic_item_mst_rec.item_um2;
869: ELSE
870: -- If secondary Uom differs from item secondary UoM then convert
871: -- transaction quantity
872: IF (l_trans_rec.item_um2 <> l_ic_item_mst_rec.item_um2)

Line 872: IF (l_trans_rec.item_um2 <> l_ic_item_mst_rec.item_um2)

868: l_trans_rec.item_um2 :=l_ic_item_mst_rec.item_um2;
869: ELSE
870: -- If secondary Uom differs from item secondary UoM then convert
871: -- transaction quantity
872: IF (l_trans_rec.item_um2 <> l_ic_item_mst_rec.item_um2)
873: THEN
874: -- If quantity to convert is negative then make positive for conversion
875: IF l_trans_rec.trans_qty < 0
876: THEN

Line 885: , pnew_uom =>l_ic_item_mst_rec.item_um2

881: ( pitem_id =>l_item_id
882: , plot_id =>l_lot_id
883: , pcur_qty =>l_trans_rec.trans_qty2
884: , pcur_uom =>l_trans_rec.item_um2
885: , pnew_uom =>l_ic_item_mst_rec.item_um2
886: , patomic =>0
887: );
888: -- Negative quantity indicates UoM conversion failure
889: IF (l_trans_rec.trans_qty2 < 0)

Line 894: FND_MESSAGE.SET_TOKEN('TO_UOM',l_ic_item_mst_rec.item_um2);

890: THEN
891: FND_MESSAGE.SET_NAME('GMI','IC_API_UOM_CONVERSION_ERROR');
892: FND_MESSAGE.SET_TOKEN('ITEM_NO',l_trans_rec.item_no);
893: FND_MESSAGE.SET_TOKEN('FROM_UOM',l_trans_rec.item_um2);
894: FND_MESSAGE.SET_TOKEN('TO_UOM',l_ic_item_mst_rec.item_um2);
895: FND_MSG_PUB.Add;
896: RAISE FND_API.G_EXC_ERROR;
897: ELSE
898: l_trans_rec.item_um2 :=l_ic_item_mst_rec.item_um2;

Line 898: l_trans_rec.item_um2 :=l_ic_item_mst_rec.item_um2;

894: FND_MESSAGE.SET_TOKEN('TO_UOM',l_ic_item_mst_rec.item_um2);
895: FND_MSG_PUB.Add;
896: RAISE FND_API.G_EXC_ERROR;
897: ELSE
898: l_trans_rec.item_um2 :=l_ic_item_mst_rec.item_um2;
899: -- Reverse quantity sign if reversed above
900: IF l_neg_qty = 1
901: THEN
902: l_neg_qty := 0;

Line 910: ABS(l_qty2) * (1 + l_ic_item_mst_rec.deviation_hi)) OR

906: END IF;
907: -- Check deviation
908: -- H.Verdding B959444 Amended Deviation Logic
909: IF (ABS(l_trans_rec.trans_qty2) >
910: ABS(l_qty2) * (1 + l_ic_item_mst_rec.deviation_hi)) OR
911: (ABS(l_trans_rec.trans_qty2) <
912: ABS(l_qty2) * (1 - l_ic_item_mst_rec.deviation_lo))
913: THEN
914: FND_MESSAGE.SET_NAME('GMI','IC_API_QTY_TOLERANCE_ERROR');

Line 912: ABS(l_qty2) * (1 - l_ic_item_mst_rec.deviation_lo))

908: -- H.Verdding B959444 Amended Deviation Logic
909: IF (ABS(l_trans_rec.trans_qty2) >
910: ABS(l_qty2) * (1 + l_ic_item_mst_rec.deviation_hi)) OR
911: (ABS(l_trans_rec.trans_qty2) <
912: ABS(l_qty2) * (1 - l_ic_item_mst_rec.deviation_lo))
913: THEN
914: FND_MESSAGE.SET_NAME('GMI','IC_API_QTY_TOLERANCE_ERROR');
915: FND_MESSAGE.SET_TOKEN('ITEM_NO',l_trans_rec.item_no);
916: FND_MESSAGE.SET_TOKEN('LOT_NO',l_trans_rec.lot_no);

Line 983: IF (l_ic_item_mst_rec.lot_indivisible = 1) AND

979: END IF;
980: END IF;
981:
982: -- Check move quantity if item is lot-indivisble
983: IF (l_ic_item_mst_rec.lot_indivisible = 1) AND
984: (l_trans_type = 3) AND
985: (l_ic_loct_inv_rec_from.loct_onhand <> l_trans_rec.trans_qty)
986: THEN
987: FND_MESSAGE.SET_NAME('GMI','IC_API_LOT_INDIVISIBLE');

Line 1014: IF (l_ic_item_mst_rec.status_ctl = 1)

1010: l_trans_rec.lot_status := l_ic_loct_inv_rec_from.lot_status;
1011: -- If location inventory found then check lot_status if status
1012: -- controlled item
1013: ELSE
1014: IF (l_ic_item_mst_rec.status_ctl = 1)
1015: THEN
1016: IF (l_ic_loct_inv_rec_from.lot_status <>
1017: l_ic_loct_inv_rec_to.lot_status)
1018: THEN

Line 1045: , l_ic_item_mst_rec.status_ctl

1041: -- Validate lot status for change lot status transaction
1042: IF (l_trans_type = 4)
1043: THEN
1044: IF NOT GMI_VALID_GRP.Validate_lot_status ( l_trans_rec.lot_status
1045: , l_ic_item_mst_rec.status_ctl
1046: )
1047: THEN
1048: FND_MESSAGE.SET_NAME('GMI','IC_API_INVALID_LOT_STATUS');
1049: FND_MESSAGE.SET_TOKEN('LOT_STATUS',l_trans_rec.lot_status);

Line 1075: , l_ic_item_mst_rec.grade_ctl

1071: -- Validate QC grade for change QC grade transaction
1072: IF (l_trans_type = 5) OR (l_trans_type = 1)
1073: THEN
1074: IF NOT GMI_VALID_GRP.Validate_qc_grade ( l_trans_rec.qc_grade
1075: , l_ic_item_mst_rec.grade_ctl
1076: )
1077: THEN
1078: FND_MESSAGE.SET_NAME('GMI','IC_API_INVALID_QC_GRADE');
1079: FND_MESSAGE.SET_TOKEN('QC_GRADE',l_trans_rec.qc_grade);

Line 1389: ( p_item_id IN ic_item_mst.item_id%TYPE

1385: --| HISTORY |
1386: --| 01-OCT-1998 M.Godfrey Created |
1387: --+=========================================================================+
1388: FUNCTION Check_unposted_jnl_lot_status
1389: ( p_item_id IN ic_item_mst.item_id%TYPE
1390: , p_lot_id IN ic_lots_mst.lot_id%TYPE
1391: , p_whse_code IN ic_whse_mst.whse_code%TYPE
1392: , p_location IN ic_loct_mst.location%TYPE
1393: , p_lot_status IN ic_lots_sts.lot_status%TYPE

Line 1468: ( p_item_id IN ic_item_mst.item_id%TYPE

1464: --| HISTORY |
1465: --| 01-OCT-1998 M.Godfrey Created |
1466: --+=========================================================================+
1467: FUNCTION Check_unposted_jnl_qc_grade
1468: ( p_item_id IN ic_item_mst.item_id%TYPE
1469: , p_lot_id IN ic_lots_mst.lot_id%TYPE
1470: , p_qc_grade IN qc_grad_mst.qc_grade%TYPE
1471: )
1472: RETURN BOOLEAN