DBA Data[Home] [Help]

APPS.GMI_OM_ALLOC_API_PUB dependencies on IC_WHSE_MST

Line 111: l_ic_whse_mst_rec ic_whse_mst%ROWTYPE;

107: l_order_um2 VARCHAR2(3);
108: l_loc_inactive NUMBER;
109: l_ship_from_org_id NUMBER;
110: l_ic_item_mst_rec ic_item_mst_b%ROWTYPE;
111: l_ic_whse_mst_rec ic_whse_mst%ROWTYPE;
112: l_ic_lots_mst_rec ic_lots_mst%ROWTYPE;
113: l_message VARCHAR2(1000);
114: i NUMBER;
115: l_epsilon NUMBER;

Line 158: CURSOR ic_whse_mst_cur(p_organization_id IN NUMBER ) IS

154: SELECT source_line_id
155: FROM wsh_delivery_details
156: WHERE delivery_detail_id = p_line_detail_id;
157:
158: CURSOR ic_whse_mst_cur(p_organization_id IN NUMBER ) IS
159: SELECT *
160: FROM IC_WHSE_MST
161: WHERE mtl_organization_id = p_organization_id;
162:

Line 160: FROM IC_WHSE_MST

156: WHERE delivery_detail_id = p_line_detail_id;
157:
158: CURSOR ic_whse_mst_cur(p_organization_id IN NUMBER ) IS
159: SELECT *
160: FROM IC_WHSE_MST
161: WHERE mtl_organization_id = p_organization_id;
162:
163: CURSOR get_loct_inv_dtls_cur(p_item_id IN NUMBER
164: ,p_lot_id IN NUMBER

Line 210: AND a.whse_code = l_ic_whse_mst_rec.whse_code

206: FROM IC_TRAN_PND a
207: WHERE a.lot_id = l_ic_lots_mst_rec.lot_id
208: AND a.item_id = l_ic_item_mst_rec.item_id
209: AND a.location = NVL(l_tran_rec.location ,l_default_location)
210: AND a.whse_code = l_ic_whse_mst_rec.whse_code
211: AND a.trans_id <> NVL(l_tran_rec.trans_id,0)
212: AND a.delete_mark = 0
213: AND a.completed_ind = 0
214: AND a.trans_qty < 0;

Line 657: OPEN ic_whse_mst_cur(l_ship_from_org_id);

653:
654: /* Warehouse
655: =============*/
656:
657: OPEN ic_whse_mst_cur(l_ship_from_org_id);
658: FETCH ic_whse_mst_cur INTO l_ic_whse_mst_rec;
659:
660: IF(ic_whse_mst_cur%NOTFOUND)
661: THEN

Line 658: FETCH ic_whse_mst_cur INTO l_ic_whse_mst_rec;

654: /* Warehouse
655: =============*/
656:
657: OPEN ic_whse_mst_cur(l_ship_from_org_id);
658: FETCH ic_whse_mst_cur INTO l_ic_whse_mst_rec;
659:
660: IF(ic_whse_mst_cur%NOTFOUND)
661: THEN
662: PrintMsg('ic_whse_mst_cur%NOTFOUND for Organization '||l_ship_from_org_id);

Line 660: IF(ic_whse_mst_cur%NOTFOUND)

656:
657: OPEN ic_whse_mst_cur(l_ship_from_org_id);
658: FETCH ic_whse_mst_cur INTO l_ic_whse_mst_rec;
659:
660: IF(ic_whse_mst_cur%NOTFOUND)
661: THEN
662: PrintMsg('ic_whse_mst_cur%NOTFOUND for Organization '||l_ship_from_org_id);
663: CLOSE ic_whse_mst_cur;
664: l_error_flag := FND_API.G_TRUE;

Line 662: PrintMsg('ic_whse_mst_cur%NOTFOUND for Organization '||l_ship_from_org_id);

658: FETCH ic_whse_mst_cur INTO l_ic_whse_mst_rec;
659:
660: IF(ic_whse_mst_cur%NOTFOUND)
661: THEN
662: PrintMsg('ic_whse_mst_cur%NOTFOUND for Organization '||l_ship_from_org_id);
663: CLOSE ic_whse_mst_cur;
664: l_error_flag := FND_API.G_TRUE;
665: FND_MESSAGE.SET_NAME('GMI','GMI_API_WHSE_NOT_FOUND');
666: FND_MESSAGE.SET_TOKEN('ORG', l_ship_from_org_id);

Line 663: CLOSE ic_whse_mst_cur;

659:
660: IF(ic_whse_mst_cur%NOTFOUND)
661: THEN
662: PrintMsg('ic_whse_mst_cur%NOTFOUND for Organization '||l_ship_from_org_id);
663: CLOSE ic_whse_mst_cur;
664: l_error_flag := FND_API.G_TRUE;
665: FND_MESSAGE.SET_NAME('GMI','GMI_API_WHSE_NOT_FOUND');
666: FND_MESSAGE.SET_TOKEN('ORG', l_ship_from_org_id);
667: FND_MESSAGE.SET_TOKEN('LINE_ID', l_tran_rec.line_id);

Line 671: CLOSE ic_whse_mst_cur;

667: FND_MESSAGE.SET_TOKEN('LINE_ID', l_tran_rec.line_id);
668: FND_MSG_PUB.Add;
669: RAISE FND_API.G_EXC_ERROR;
670: ELSE
671: CLOSE ic_whse_mst_cur;
672: END IF;
673:
674:
675: l_pick_lots_rec.whse_code := l_ic_whse_mst_rec.whse_code;

Line 675: l_pick_lots_rec.whse_code := l_ic_whse_mst_rec.whse_code;

671: CLOSE ic_whse_mst_cur;
672: END IF;
673:
674:
675: l_pick_lots_rec.whse_code := l_ic_whse_mst_rec.whse_code;
676:
677: PrintMsg('l_pick_lots_rec.whse_code : '||l_pick_lots_rec.whse_code);
678: PrintMsg('l_whse_mst_rec.loct_ctl : '||l_ic_whse_mst_rec.loct_ctl);
679:

Line 678: PrintMsg('l_whse_mst_rec.loct_ctl : '||l_ic_whse_mst_rec.loct_ctl);

674:
675: l_pick_lots_rec.whse_code := l_ic_whse_mst_rec.whse_code;
676:
677: PrintMsg('l_pick_lots_rec.whse_code : '||l_pick_lots_rec.whse_code);
678: PrintMsg('l_whse_mst_rec.loct_ctl : '||l_ic_whse_mst_rec.loct_ctl);
679:
680: /* Item
681: ========== */
682:

Line 748: IF( (l_ic_item_mst_rec.loct_ctl * l_ic_whse_mst_rec.loct_ctl ) = 0 AND

744:
745: END IF;
746:
747: /* See if either item is or the warehouse is not location controlled */
748: IF( (l_ic_item_mst_rec.loct_ctl * l_ic_whse_mst_rec.loct_ctl ) = 0 AND
749: NVL(l_tran_rec.location,' ') = ' ')
750: THEN
751: PrintMsg('Either the item or the warehouse is not location controlled,
752: default location will be used');

Line 799: (l_ic_item_mst_rec.loct_ctl * l_ic_whse_mst_rec.loct_ctl) = 0)

795: and the warehouse is location controlled */
796:
797: IF ( NVL(l_tran_rec.location,' ') <> ' ' AND
798: l_tran_rec.location <> l_default_location AND
799: (l_ic_item_mst_rec.loct_ctl * l_ic_whse_mst_rec.loct_ctl) = 0)
800: THEN
801: PrintMsg('location is specified but either the item or the warehouse not location controlled :'
802: || l_ic_item_mst_rec.item_no);
803: l_error_flag := FND_API.G_TRUE;

Line 806: FND_MESSAGE.SET_TOKEN('WHSE_CODE',l_ic_whse_mst_rec.whse_code);

802: || l_ic_item_mst_rec.item_no);
803: l_error_flag := FND_API.G_TRUE;
804: FND_MESSAGE.SET_NAME('GMI','GMI_API_NON_LOCT_CTL_ITEM_WHSE');
805: FND_MESSAGE.SET_TOKEN('ITEM_NO',l_ic_item_mst_rec.item_no);
806: FND_MESSAGE.SET_TOKEN('WHSE_CODE',l_ic_whse_mst_rec.whse_code);
807: FND_MESSAGE.SET_TOKEN('LOCATION',l_tran_rec.location);
808: FND_MESSAGE.SET_TOKEN('LINE_ID',l_tran_rec.line_id);
809: FND_MSG_PUB.Add;
810: RAISE FND_API.G_EXC_ERROR;

Line 816: (l_ic_item_mst_rec.loct_ctl * l_ic_whse_mst_rec.loct_ctl) <> 0 )

812:
813:
814: /* If a location is not specified and the item is location controlled */
815: IF( NVL(l_tran_rec.location,' ') = ' ' AND
816: (l_ic_item_mst_rec.loct_ctl * l_ic_whse_mst_rec.loct_ctl) <> 0 )
817: THEN
818: PrintMsg('location is NOT specified but item and warehouse are location controlled :'||
819: l_ic_item_mst_rec.item_no);
820: l_error_flag := FND_API.G_TRUE;

Line 823: FND_MESSAGE.SET_TOKEN('WHSE_CODE',l_ic_whse_mst_rec.whse_code);

819: l_ic_item_mst_rec.item_no);
820: l_error_flag := FND_API.G_TRUE;
821: FND_MESSAGE.SET_NAME('GMI','GMI_API_LOCATION_REQUIRED');
822: FND_MESSAGE.SET_TOKEN('ITEM_NO',l_ic_item_mst_rec.item_no);
823: FND_MESSAGE.SET_TOKEN('WHSE_CODE',l_ic_whse_mst_rec.whse_code);
824: FND_MESSAGE.SET_TOKEN('LINE_ID',l_tran_rec.line_id);
825: FND_MSG_PUB.Add;
826: RAISE FND_API.G_EXC_ERROR;
827: END IF;

Line 833: IF ( l_ic_whse_mst_rec.loct_ctl * l_ic_whse_mst_rec.loct_ctl > 1)

829:
830: /* If whse is non validated location controlled, do not validate location but verify that
831: the length is <= 16 */
832:
833: IF ( l_ic_whse_mst_rec.loct_ctl * l_ic_whse_mst_rec.loct_ctl > 1)
834: THEN
835: IF( LENGTH(l_tran_rec.location) > 16 )
836: THEN
837: PrintMsg('Non validated location length can not be > 16 : '||

Line 849: ELSIF(l_ic_whse_mst_rec.loct_ctl * l_ic_whse_mst_rec.loct_ctl = 1 AND NVL(l_tran_rec.location,' ') <> ' ')

845: END IF;
846:
847: /* This is not a non validated location */
848:
849: ELSIF(l_ic_whse_mst_rec.loct_ctl * l_ic_whse_mst_rec.loct_ctl = 1 AND NVL(l_tran_rec.location,' ') <> ' ')
850: THEN
851: /* In not non validated location */
852: /* Check that the location is active */
853:

Line 854: OPEN ic_loct_mst_cur( l_tran_rec.location,l_ic_whse_mst_rec.whse_code);

850: THEN
851: /* In not non validated location */
852: /* Check that the location is active */
853:
854: OPEN ic_loct_mst_cur( l_tran_rec.location,l_ic_whse_mst_rec.whse_code);
855: FETCH ic_loct_mst_cur INTO l_loc_inactive;
856:
857: IF ic_loct_mst_cur%NOTFOUND
858: THEN

Line 991: PrintMsg (' ** Whse_code : '|| l_ic_whse_mst_rec.whse_code);

987: -- THEN
988:
989: PrintMsg (' ** Item_id : '|| l_ic_item_mst_rec.item_id);
990: PrintMsg (' ** lot_id : '|| l_ic_lots_mst_rec.lot_id);
991: PrintMsg (' ** Whse_code : '|| l_ic_whse_mst_rec.whse_code);
992: PrintMsg (' ** location : '|| l_tran_rec.location);
993:
994: OPEN get_loct_inv_dtls_cur(l_ic_item_mst_rec.item_id
995: ,l_ic_lots_mst_rec.lot_id

Line 996: ,l_ic_whse_mst_rec.whse_code

992: PrintMsg (' ** location : '|| l_tran_rec.location);
993:
994: OPEN get_loct_inv_dtls_cur(l_ic_item_mst_rec.item_id
995: ,l_ic_lots_mst_rec.lot_id
996: ,l_ic_whse_mst_rec.whse_code
997: ,l_tran_rec.location);
998:
999: FETCH get_loct_inv_dtls_cur INTO l_loct_inv_rec;
1000:

Line 1006: IF( l_ic_whse_mst_rec.loct_ctl * l_ic_whse_mst_rec.loct_ctl > 1)

1002: THEN
1003:
1004: /* What if the warehouse is non location controlled? */
1005:
1006: IF( l_ic_whse_mst_rec.loct_ctl * l_ic_whse_mst_rec.loct_ctl > 1)
1007: THEN
1008: OPEN get_loct_inv_dtls_cur2(l_ic_item_mst_rec.item_id
1009: ,l_ic_lots_mst_rec.lot_id
1010: ,l_ic_whse_mst_rec.whse_code);

Line 1010: ,l_ic_whse_mst_rec.whse_code);

1006: IF( l_ic_whse_mst_rec.loct_ctl * l_ic_whse_mst_rec.loct_ctl > 1)
1007: THEN
1008: OPEN get_loct_inv_dtls_cur2(l_ic_item_mst_rec.item_id
1009: ,l_ic_lots_mst_rec.lot_id
1010: ,l_ic_whse_mst_rec.whse_code);
1011:
1012: FETCH get_loct_inv_dtls_cur2 INTO l_loct_inv_rec;
1013:
1014: IF(get_loct_inv_dtls_cur2%NOTFOUND)

Line 1624: l_ic_whse_mst_rec.orgn_code,

1620: /* Validate the transaction date */
1621:
1622: l_return_val := GMICCAL.trans_date_validate
1623: (l_tran_rec.trans_date,
1624: l_ic_whse_mst_rec.orgn_code,
1625: l_ic_whse_mst_rec.whse_code
1626: );
1627:
1628: IF l_return_val <> 0 THEN

Line 1625: l_ic_whse_mst_rec.whse_code

1621:
1622: l_return_val := GMICCAL.trans_date_validate
1623: (l_tran_rec.trans_date,
1624: l_ic_whse_mst_rec.orgn_code,
1625: l_ic_whse_mst_rec.whse_code
1626: );
1627:
1628: IF l_return_val <> 0 THEN
1629:

Line 1647: FND_MESSAGE.SET_TOKEN('WHSE_CODE',l_ic_whse_mst_rec.whse_code);

1643: FND_MESSAGE.SET_NAME('GMI','IC_BLANKWHSE');
1644: FND_MSG_PUB.Add;
1645: ELSIF l_return_val = GMICCAL.INVCAL_WHSE_ERR THEN
1646: FND_MESSAGE.SET_NAME('GMI','IC_API_INVALID_WHSE_CODE');
1647: FND_MESSAGE.SET_TOKEN('WHSE_CODE',l_ic_whse_mst_rec.whse_code);
1648: FND_MSG_PUB.Add;
1649: ELSIF l_return_val IN (GMICCAL.INVCAL_PERIOD_CLOSED,
1650: GMICCAL.INVCAL_WHSE_CLOSED) THEN
1651:

Line 1654: FND_MESSAGE.SET_TOKEN('WAREH',l_ic_whse_mst_rec.whse_code);

1650: GMICCAL.INVCAL_WHSE_CLOSED) THEN
1651:
1652: FND_MESSAGE.SET_NAME('GMI','IC_API_TXN_POST_CLOSED');
1653: FND_MESSAGE.SET_TOKEN('DATE',l_tran_rec.trans_date);
1654: FND_MESSAGE.SET_TOKEN('WAREH',l_ic_whse_mst_rec.whse_code);
1655: FND_MSG_PUB.Add;
1656: ELSE
1657: FND_MESSAGE.SET_NAME('GMI','ICCAL_GENL_ERR');
1658: FND_MSG_PUB.Add;