DBA Data[Home] [Help]

APPS.GML_OPM_ROI_GRP dependencies on FND_API

Line 181: x_return_status := fnd_api.g_ret_sts_success;

177: V_allow_neg_inv NUMBER;
178:
179: BEGIN
180:
181: x_return_status := fnd_api.g_ret_sts_success;
182:
183: IF (p_lot_id IS NULL) AND (g_asn_debug = 'Y') THEN
184: asn_debug.put_line('lotid=>'||p_lot_id||'item id=>'||p_opm_item_id||'orgid=>'||p_organization_id||'locatorid=>'||p_locator_id||'qty=>'||p_primary_quantity);
185: END IF;

Line 237: x_return_status := fnd_api.g_ret_sts_error;

233: --Bug# 3664014
234: IF V_allow_neg_inv = 0 THEN
235: FND_MESSAGE.SET_NAME('GMI','IC_INVQTYNEG');
236: FND_MSG_PUB.Add;
237: x_return_status := fnd_api.g_ret_sts_error;
238: RETURN ;
239: --If set to 2 then give warning.
240: ELSIF V_allow_neg_inv = 2 THEN
241: FND_MESSAGE.SET_NAME('GMI','IC_WARNINVQTYNEG');

Line 265: x_return_status := fnd_api.g_ret_sts_error;

261: -- bug# 3664014
262: IF V_allow_neg_inv = 0 THEN
263: FND_MESSAGE.SET_NAME('GMI','IC_INVQTYNEG');
264: FND_MSG_PUB.Add;
265: x_return_status := fnd_api.g_ret_sts_error;
266: RETURN ;
267: --If set to 2 then give warning.
268: ELSIF V_allow_neg_inv = 2 THEN
269: FND_MESSAGE.SET_NAME('GMI','IC_WARNINVQTYNEG');

Line 280: x_return_status := fnd_api.g_ret_sts_unexp_error;

276: END IF;
277:
278: EXCEPTION
279: WHEN OTHERS THEN
280: x_return_status := fnd_api.g_ret_sts_unexp_error;
281: IF p_lot_id IS NULL THEN
282: l_table_name := 'RCV_TRANSACTIONS_INTERFACE';
283: ELSE
284: l_table_name := 'MTL_TRANSACTION_LOTS_INTERFACE';

Line 554: x_return_status := fnd_api.g_ret_sts_success;

550: l_expire_date DATE ;
551:
552: BEGIN
553:
554: x_return_status := fnd_api.g_ret_sts_success;
555:
556: g_default_lot := nvl(FND_PROFILE.VALUE('IC$DEFAULT_LOT'),'0') ;
557:
558: IF l_inv_debug = 1 THEN

Line 565: x_return_status := fnd_api.g_ret_sts_error;

561:
562: IF p_lot_attribute_rec.lot_no = G_DEFAULT_LOT THEN
563: FND_MESSAGE.SET_NAME('GMI','IC_INVALID_LOT');
564: FND_MSG_PUB.Add;
565: x_return_status := fnd_api.g_ret_sts_error;
566: RETURN ;
567: END IF;
568:
569: SELECT sublot_ctl,shelf_life

Line 578: x_return_status := fnd_api.g_ret_sts_error;

574:
575: IF p_lot_attribute_rec.sublot_no IS NOT NULL AND l_sublot_ctl = 0 THEN
576: FND_MESSAGE.SET_NAME('GMI','IC_INVALID_LOT/SUBLOT');
577: FND_MSG_PUB.Add;
578: x_return_status := fnd_api.g_ret_sts_error;
579: RETURN ;
580: END IF;
581:
582: l_progress := '020' ;

Line 595: x_return_status := fnd_api.g_ret_sts_error;

591: EXCEPTION WHEN OTHERS THEN
592: FND_MESSAGE.SET_NAME('GMI','IC_API_INVALID_REASON_CODE');
593: FND_MESSAGE.SET_TOKEN('REASON_CODE',p_lot_attribute_rec.reason_code);
594: FND_MSG_PUB.Add;
595: x_return_status := fnd_api.g_ret_sts_error;
596: RETURN ;
597: END ;
598: END IF;
599:

Line 610: x_return_status := fnd_api.g_ret_sts_error;

606: IF Cur_lot_ctrl_lot%NOTFOUND THEN
607: CLOSE Cur_lot_ctrl_lot;
608: FND_MESSAGE.SET_NAME('GMI','IC_INVALID_LOT');
609: FND_MSG_PUB.Add;
610: x_return_status := fnd_api.g_ret_sts_error;
611: RETURN ;
612: END IF;
613: CLOSE Cur_lot_ctrl_lot ;
614: ELSE

Line 621: x_return_status := fnd_api.g_ret_sts_error;

617: IF Cur_sublot_ctrl_lot%NOTFOUND THEN
618: CLOSE Cur_sublot_ctrl_lot;
619: FND_MESSAGE.SET_NAME('GMI','IC_INVALID_LOT');
620: FND_MSG_PUB.Add;
621: x_return_status := fnd_api.g_ret_sts_error;
622: RETURN ;
623: END IF;
624: CLOSE Cur_sublot_ctrl_lot ;
625: END IF;

Line 632: x_return_status := fnd_api.g_ret_sts_error;

628:
629: IF l_inactive_ind = 1 THEN
630: FND_MESSAGE.SET_NAME('GML','PO_INACTIVE_LOT');
631: FND_MSG_PUB.Add;
632: x_return_status := fnd_api.g_ret_sts_error;
633: RETURN ;
634: ELSIF l_delete_mark = 1 THEN
635: FND_MESSAGE.SET_NAME('GML', 'PO_LOT_DELETED');
636: FND_MSG_PUB.Add;

Line 637: x_return_status := fnd_api.g_ret_sts_error;

633: RETURN ;
634: ELSIF l_delete_mark = 1 THEN
635: FND_MESSAGE.SET_NAME('GML', 'PO_LOT_DELETED');
636: FND_MSG_PUB.Add;
637: x_return_status := fnd_api.g_ret_sts_error;
638: RETURN ;
639: END IF;
640:
641: ELSE -- LOT IS NEW

Line 653: x_return_status := fnd_api.g_ret_sts_error;

649:
650: IF l_shelf_life_code = 4 and p_lot_attribute_rec.expiration_date IS NULL THEN
651: FND_MESSAGE.SET_NAME('GMI','IC_INVALID_EXPIRE_DATE');
652: FND_MSG_PUB.Add;
653: x_return_status := fnd_api.g_ret_sts_error;
654: RETURN ;
655: ELSIF l_shelf_life_code = 2 THEN
656:
657: SELECT p_trans_date + l_shelf_life into l_expire_date FROM DUAL ;

Line 697: x_return_status := fnd_api.g_ret_sts_unexp_error;

693: END IF;
694: END IF;
695:
696: EXCEPTION WHEN OTHERS THEN
697: x_return_status := fnd_api.g_ret_sts_unexp_error;
698: insert_errors( p_rti_id => p_rti_id,
699: p_group_id => null,
700: p_header_interface_id => null,
701: p_column_name => null,

Line 760: x_return_status := fnd_api.g_ret_sts_success;

756: l_item_status_ctl NUMBER(5);
757:
758: BEGIN
759:
760: x_return_status := fnd_api.g_ret_sts_success;
761:
762: SELECT whse_code INTO l_whse_code
763: FROM IC_WHSE_MST
764: WHERE mtl_organization_id = p_organization_id;

Line 822: x_return_status := fnd_api.g_ret_sts_error;

818: IF g_moved_diff_stat = 0 THEN
819: IF (l_inv_lot_status IS NOT NULL) AND (l_inv_lot_status <> l_default_lot_status) THEN
820: FND_MESSAGE.SET_NAME('GML', 'GML_CANT_RECV_DIFF_STATUS');
821: FND_MSG_PUB.Add;
822: x_return_status := fnd_api.g_ret_sts_error;
823: RETURN ;
824: END IF;
825: ELSIF g_moved_diff_stat = 2 THEN
826: IF l_inv_lot_status IS NOT NULL AND l_inv_lot_status <> l_default_lot_status

Line 891: x_return_status := fnd_api.g_ret_sts_error;

887:
888: -- Set the context for the GMI APIs
889: IF( NOT Gmigutl.Setup(l_trans_rec.user_name))
890: THEN
891: x_return_status := fnd_api.g_ret_sts_error;
892: IF l_inv_debug = 1 THEN
893: print_debug('Inventory API SETUP Failed for User Name=>'|| l_trans_rec.user_name, 1);
894: END IF;
895: RETURN ;

Line 927: x_return_status := fnd_api.g_ret_sts_error;

923: ELSIF l_inv_lot_status IS NOT NULL AND l_inv_lot_status <> l_default_lot_status
924: AND l_inv_loct_onhand <> 0 THEN
925: FND_MESSAGE.SET_NAME('GML', 'GML_CANT_RECV_DIFF_STATUS');
926: FND_MSG_PUB.Add;
927: x_return_status := fnd_api.g_ret_sts_error;
928: RETURN ;
929: END IF; -- IF l_inv_lot_status IS NOT NULL
930: END IF; -- IF g_moved_diff_stat = 0 THEN
931:

Line 933: x_return_status := fnd_api.g_ret_sts_unexp_error;

929: END IF; -- IF l_inv_lot_status IS NOT NULL
930: END IF; -- IF g_moved_diff_stat = 0 THEN
931:
932: EXCEPTION WHEN OTHERS THEN
933: x_return_status := fnd_api.g_ret_sts_unexp_error;
934: insert_errors( p_rti_id => p_rti_id,
935: p_group_id => null,
936: p_header_interface_id => null,
937: p_column_name => null,

Line 975: x_return_status := fnd_api.g_ret_sts_success;

971: l_dualum_ind NUMBER(1);
972:
973: BEGIN
974:
975: x_return_status := fnd_api.g_ret_sts_success;
976: l_new_lot_rec := p_new_lot_rec ;
977:
978: l_new_lot_rec.user_name := FND_GLOBAL.USER_NAME;
979:

Line 983: x_return_status := fnd_api.g_ret_sts_error;

979:
980: -- the context for the GMI APIs
981: IF( NOT Gmigutl.Setup(l_new_lot_rec.user_name))
982: THEN
983: x_return_status := fnd_api.g_ret_sts_error;
984: IF l_inv_debug = 1 THEN
985: print_debug('Inventory API SETUP Failed for User Name=>'|| l_new_lot_rec.user_name, 1);
986: END IF;
987: RETURN ;

Line 1014: , p_validation_level => FND_API.G_VALID_LEVEL_FULL

1010:
1011: GMIPAPI.Create_Lot( p_api_version => 3.0
1012: , p_init_msg_list => 'F'
1013: , p_commit => 'F'
1014: , p_validation_level => FND_API.G_VALID_LEVEL_FULL
1015: , p_lot_rec => l_new_lot_rec
1016: , x_ic_lots_mst_row => l_ic_lots_mst_rec
1017: , x_ic_lots_cpg_row => l_ic_lots_cpg_rec
1018: , x_return_status => x_return_status

Line 1082: x_return_status := fnd_api.g_ret_sts_unexp_error;

1078:
1079:
1080: EXCEPTION
1081: WHEN OTHERS THEN
1082: x_return_status := fnd_api.g_ret_sts_unexp_error;
1083: insert_errors( p_rti_id => p_rti_id,
1084: p_group_id => null,
1085: p_header_interface_id => null,
1086: p_column_name => null,

Line 1182: x_return_status := fnd_api.g_ret_sts_error;

1178:
1179: IF g_opm_restrict_rma_lots IN ('RESTRICTED') THEN
1180: FND_MESSAGE.SET_NAME('GML','GML_DIFF_RMA_LOT');
1181: FND_MSG_PUB.Add;
1182: x_return_status := fnd_api.g_ret_sts_error;
1183: RAISE FND_API.G_EXC_ERROR;
1184: ELSE -- warning.put into interface table.
1185: insert_errors( p_rti_id => p_rti_id,
1186: p_group_id => null,

Line 1183: RAISE FND_API.G_EXC_ERROR;

1179: IF g_opm_restrict_rma_lots IN ('RESTRICTED') THEN
1180: FND_MESSAGE.SET_NAME('GML','GML_DIFF_RMA_LOT');
1181: FND_MSG_PUB.Add;
1182: x_return_status := fnd_api.g_ret_sts_error;
1183: RAISE FND_API.G_EXC_ERROR;
1184: ELSE -- warning.put into interface table.
1185: insert_errors( p_rti_id => p_rti_id,
1186: p_group_id => null,
1187: p_header_interface_id => null,

Line 1276: x_return_status := fnd_api.g_ret_sts_error;

1272: /*Give error message that the quantity entered Is greater than the qty entered in the RMA for this lot */
1273: FND_MESSAGE.SET_NAME('GML', 'GML_DIFF_RMA_QTY');
1274: FND_MESSAGE.SET_TOKEN('S1',x_allowed_quantity);
1275: FND_MSG_PUB.Add;
1276: x_return_status := fnd_api.g_ret_sts_error;
1277: END IF;
1278: END IF; -- IF x_allowed = 'N' THEN
1279: END IF; -- IF g_opm_restrict_rma_lots IN ('RESTRICTED_WITH_WARNING','RESTRICTED')
1280:

Line 1284: p_init_msg_lst IN VARCHAR2 := FND_API.G_FALSE,

1280:
1281: END validate_rma_quantity;
1282:
1283: PROCEDURE validate_opm_lot( p_api_version IN NUMBER,
1284: p_init_msg_lst IN VARCHAR2 := FND_API.G_FALSE,
1285: p_mtlt_rowid IN ROWID,
1286: p_new_lot IN VARCHAR2,
1287: p_opm_item_id IN NUMBER,
1288: p_item_no IN VARCHAR2,

Line 1404: x_return_status := fnd_api.g_ret_sts_success;

1400: and itp.lot_id = p_lot_id
1401: and itp.delete_mark <> 1;
1402:
1403: BEGIN
1404: x_return_status := fnd_api.g_ret_sts_success;
1405:
1406: IF NOT FND_API.Compatible_API_Call (l_api_version,
1407: p_api_version,
1408: l_api_name,

Line 1406: IF NOT FND_API.Compatible_API_Call (l_api_version,

1402:
1403: BEGIN
1404: x_return_status := fnd_api.g_ret_sts_success;
1405:
1406: IF NOT FND_API.Compatible_API_Call (l_api_version,
1407: p_api_version,
1408: l_api_name,
1409: l_pkg_name )
1410: THEN

Line 1411: RAISE FND_API.G_EXC_ERROR;

1407: p_api_version,
1408: l_api_name,
1409: l_pkg_name )
1410: THEN
1411: RAISE FND_API.G_EXC_ERROR;
1412: END IF;
1413:
1414: -- Initialize message list if p_init_msg_list is set to TRUE.
1415: IF FND_API.to_Boolean( p_init_msg_lst ) THEN

Line 1415: IF FND_API.to_Boolean( p_init_msg_lst ) THEN

1411: RAISE FND_API.G_EXC_ERROR;
1412: END IF;
1413:
1414: -- Initialize message list if p_init_msg_list is set to TRUE.
1415: IF FND_API.to_Boolean( p_init_msg_lst ) THEN
1416: FND_MSG_PUB.initialize;
1417: END IF;
1418:
1419: l_progress := '020' ;

Line 1525: x_return_status := fnd_api.g_ret_sts_error;

1521:
1522: IF l_same_lot_count > 1 THEN
1523: FND_MESSAGE.SET_NAME('GML', 'GML_LOT_SUBLOT_USED');
1524: FND_MSG_PUB.Add;
1525: x_return_status := fnd_api.g_ret_sts_error;
1526: RAISE FND_API.G_EXC_ERROR;
1527: END IF;
1528:
1529: SELECT count(1) INTO l_total_no_of_lots

Line 1526: RAISE FND_API.G_EXC_ERROR;

1522: IF l_same_lot_count > 1 THEN
1523: FND_MESSAGE.SET_NAME('GML', 'GML_LOT_SUBLOT_USED');
1524: FND_MSG_PUB.Add;
1525: x_return_status := fnd_api.g_ret_sts_error;
1526: RAISE FND_API.G_EXC_ERROR;
1527: END IF;
1528:
1529: SELECT count(1) INTO l_total_no_of_lots
1530: FROM MTL_TRANSACTION_LOTS_TEMP

Line 1613: RAISE FND_API.G_EXC_ERROR;

1609: print_debug('lot id=>'||l_lot_attribute_rec.lot_id, 1);
1610: END IF;
1611:
1612: IF x_return_status <> 'S' THEN
1613: RAISE FND_API.G_EXC_ERROR;
1614: END IF;
1615:
1616: l_progress := '065' ;
1617:

Line 1645: RAISE FND_API.G_EXC_ERROR;

1641: x_allowed_quantity => l_allowed_quantity,
1642: x_return_status => x_return_status );
1643:
1644: IF x_return_status <> 'S' THEN
1645: RAISE FND_API.G_EXC_ERROR;
1646: END IF;
1647: END IF; -- IF l_source_document_code = 'RMA' THEN
1648:
1649:

Line 1678: RAISE FND_API.G_EXC_ERROR;

1674: print_debug('Secondary qty=>'||l_lot_secondary_quantity, 1);
1675: END IF;
1676:
1677: IF x_return_status <> 'S' THEN
1678: RAISE FND_API.G_EXC_ERROR;
1679: END IF;
1680:
1681: IF l_update_lot_qty THEN
1682: update mtl_transaction_lots_temp

Line 1710: RAISE FND_API.G_EXC_ERROR;

1706: print_debug('Check Lot Status for old lot for transaction type '||l_transaction_type||' =>'||x_return_status, 1);
1707: END IF;
1708:
1709: IF x_return_status <> 'S' THEN
1710: RAISE FND_API.G_EXC_ERROR;
1711: END IF;
1712: END IF;
1713: END IF ;
1714: ELSE -- IF p_new_lot = 'N' THEN

Line 1745: RAISE FND_API.G_EXC_ERROR;

1741: print_debug(' Create new lot status for transaction type '||l_transaction_type||' =>'||x_return_status, 1);
1742: END IF;
1743:
1744: IF x_return_status <> 'S' THEN
1745: RAISE FND_API.G_EXC_ERROR;
1746: END IF;
1747: END IF; -- IF p_new_lot = 'N'
1748:
1749: ELSIF (l_transaction_type IN ('CORRECT','RETURN TO RECEIVING','RETURN TO VENDOR','RETURN TO CUSTOMER')) THEN

Line 1806: RAISE fnd_api.g_exc_error;

1802: print_debug(' Validate lot attributes status trx_type,parent_trx_type,grand_parent_trx_type=>'||l_transaction_type||'-'||p_parent_txn_type||'-'||p_grand_parent_txn_type||'-'||x_return_status, 1);
1803: END IF;
1804:
1805: IF x_return_status <> 'S' THEN
1806: RAISE fnd_api.g_exc_error;
1807: END IF;
1808:
1809: IF l_source_document_code = 'RMA' THEN
1810: l_progress := '102' ;

Line 1829: RAISE FND_API.G_EXC_ERROR;

1825: x_allowed_quantity => l_allowed_quantity,
1826: x_return_status => x_return_status );
1827:
1828: IF x_return_status <> 'S' THEN
1829: RAISE FND_API.G_EXC_ERROR;
1830: END IF;
1831:
1832: END IF; -- IF l_source_document_code = 'RMA'
1833:

Line 1863: RAISE FND_API.G_EXC_ERROR;

1859: print_debug('Secondary qty=>'||l_lot_secondary_quantity, 1);
1860: END IF;
1861:
1862: IF x_return_status <> 'S' THEN
1863: RAISE FND_API.G_EXC_ERROR;
1864: END IF;
1865:
1866: IF l_update_lot_qty THEN
1867: update mtl_transaction_lots_temp

Line 1894: RAISE fnd_api.g_exc_error;

1890: print_debug(' Validate lot attributes status trx_type,parent_trx_type,grand_parent_trx_type=>'||l_transaction_type||'-'||p_parent_txn_type||'-'||p_grand_parent_txn_type||'-'||x_return_status, 1);
1891: END IF;
1892:
1893: IF x_return_status <> 'S' THEN
1894: RAISE fnd_api.g_exc_error;
1895: END IF;
1896:
1897: -- validate/derive secondary quantity.
1898: l_progress := '112' ;

Line 1925: RAISE FND_API.G_EXC_ERROR;

1921: print_debug('Secondary qty=>'||l_lot_secondary_quantity, 1);
1922: END IF;
1923:
1924: IF x_return_status <> 'S' THEN
1925: RAISE FND_API.G_EXC_ERROR;
1926: END IF;
1927:
1928: IF l_update_lot_qty THEN
1929: update mtl_transaction_lots_temp

Line 1985: x_return_status := fnd_api.g_ret_sts_error;

1981: FND_MESSAGE.SET_NAME('GML','GML_RECV_INVALID_LOT');
1982: FND_MESSAGE.SET_TOKEN('LOT_NO',l_lot_no);
1983: FND_MESSAGE.SET_TOKEN('SUBLOT_NO',l_sublot_no);
1984: FND_MSG_PUB.Add;
1985: x_return_status := fnd_api.g_ret_sts_error;
1986: RAISE FND_API.G_EXC_ERROR;
1987: END ;
1988:
1989: l_progress := '130' ;

Line 1986: RAISE FND_API.G_EXC_ERROR;

1982: FND_MESSAGE.SET_TOKEN('LOT_NO',l_lot_no);
1983: FND_MESSAGE.SET_TOKEN('SUBLOT_NO',l_sublot_no);
1984: FND_MSG_PUB.Add;
1985: x_return_status := fnd_api.g_ret_sts_error;
1986: RAISE FND_API.G_EXC_ERROR;
1987: END ;
1988:
1989: l_progress := '130' ;
1990:

Line 2007: x_return_status := fnd_api.g_ret_sts_error;

2003: END IF;
2004: FND_MESSAGE.SET_NAME('GML', 'PO_RETURN_MORE_RECEIVE');
2005: FND_MESSAGE.SET_TOKEN('AVAILABLE_QTY',l_net_received_lot_qty);
2006: FND_MSG_PUB.Add;
2007: x_return_status := fnd_api.g_ret_sts_error;
2008: RAISE FND_API.G_EXC_ERROR;
2009: END IF;
2010:
2011: ELSE

Line 2008: RAISE FND_API.G_EXC_ERROR;

2004: FND_MESSAGE.SET_NAME('GML', 'PO_RETURN_MORE_RECEIVE');
2005: FND_MESSAGE.SET_TOKEN('AVAILABLE_QTY',l_net_received_lot_qty);
2006: FND_MSG_PUB.Add;
2007: x_return_status := fnd_api.g_ret_sts_error;
2008: RAISE FND_API.G_EXC_ERROR;
2009: END IF;
2010:
2011: ELSE
2012: /*Total received quantity for that lot*/

Line 2031: x_return_status := fnd_api.g_ret_sts_error;

2027: IF (nvl(l_old_recv_qty,0) - nvl(l_old_rtrn_qty,0) + nvl(l_cr_avaliable_qty,0)) < l_lot_primary_quantity THEN
2028: FND_MESSAGE.SET_NAME('GML', 'PO_RETURN_MORE_RECEIVE');
2029: FND_MESSAGE.SET_TOKEN('AVAILABLE_QTY',nvl(l_old_recv_qty,0) - nvl(l_old_rtrn_qty,0) + nvl(l_cr_avaliable_qty,0));
2030: FND_MSG_PUB.Add;
2031: x_return_status := fnd_api.g_ret_sts_error;
2032: RAISE FND_API.G_EXC_ERROR;
2033: END IF;
2034:
2035: END IF; -- IF nvl(l_comment,'NOT OPM RECEIPT') <> 'OPM RECEIPT' THEN

Line 2032: RAISE FND_API.G_EXC_ERROR;

2028: FND_MESSAGE.SET_NAME('GML', 'PO_RETURN_MORE_RECEIVE');
2029: FND_MESSAGE.SET_TOKEN('AVAILABLE_QTY',nvl(l_old_recv_qty,0) - nvl(l_old_rtrn_qty,0) + nvl(l_cr_avaliable_qty,0));
2030: FND_MSG_PUB.Add;
2031: x_return_status := fnd_api.g_ret_sts_error;
2032: RAISE FND_API.G_EXC_ERROR;
2033: END IF;
2034:
2035: END IF; -- IF nvl(l_comment,'NOT OPM RECEIPT') <> 'OPM RECEIPT' THEN
2036:

Line 2058: RAISE fnd_api.g_exc_error;

2054: print_debug(' validate_quantity_onhand status for trx_type,parent_trx_type,grand_parent_trx_type=>'||l_transaction_type||'-'||p_parent_txn_type||'-'||p_grand_parent_txn_type||'-'||x_return_status, 1);
2055: END IF;
2056:
2057: IF x_return_status NOT IN ('S','W') THEN
2058: RAISE fnd_api.g_exc_error;
2059: END IF;
2060:
2061: --Bug# 3664014 -- insert record in po_interface_error in case of warning.
2062:

Line 2123: RAISE fnd_api.g_exc_error;

2119: print_debug(' Validate lot attributes status trx_type,parent_trx_type,grand_parent_trx_type=>'||l_transaction_type||'-'||p_parent_txn_type||'-'||p_grand_parent_txn_type||'-'||x_return_status, 1);
2120: END IF;
2121:
2122: IF x_return_status <> 'S' THEN
2123: RAISE fnd_api.g_exc_error;
2124: END IF;
2125:
2126: IF l_source_document_code = 'RMA' THEN
2127: l_progress := '152' ;

Line 2146: RAISE FND_API.G_EXC_ERROR;

2142: x_allowed_quantity => l_allowed_quantity,
2143: x_return_status => x_return_status );
2144:
2145: IF x_return_status <> 'S' THEN
2146: RAISE FND_API.G_EXC_ERROR;
2147: END IF;
2148:
2149: END IF; -- IF l_source_document_code = 'RMA'
2150:

Line 2179: RAISE FND_API.G_EXC_ERROR;

2175: print_debug('Secondary qty=>'||l_lot_secondary_quantity, 1);
2176: END IF;
2177:
2178: IF x_return_status <> 'S' THEN
2179: RAISE FND_API.G_EXC_ERROR;
2180: END IF;
2181:
2182: IF l_update_lot_qty THEN
2183: update mtl_transaction_lots_temp

Line 2216: RAISE FND_API.G_EXC_ERROR;

2212: print_debug('Create_new_lot status trx_type,parent_trx_type,grand_parent_trx_type=>'||l_transaction_type||'-'||p_parent_txn_type||'-'||p_grand_parent_txn_type||'-'||x_return_status, 1);
2213: END IF;
2214:
2215: IF x_return_status <> 'S' THEN
2216: RAISE FND_API.G_EXC_ERROR;
2217: END IF;
2218: END IF ;
2219: ELSIF p_parent_txn_type IN ('RETURN TO RECEIVING') THEN
2220: l_progress := '170' ;

Line 2238: x_return_status := fnd_api.g_ret_sts_error;

2234: FND_MESSAGE.SET_NAME('GML','GML_RECV_INVALID_LOT');
2235: FND_MESSAGE.SET_TOKEN('LOT_NO',l_lot_no);
2236: FND_MESSAGE.SET_TOKEN('SUBLOT_NO',l_sublot_no);
2237: FND_MSG_PUB.Add;
2238: x_return_status := fnd_api.g_ret_sts_error;
2239: RAISE FND_API.G_EXC_ERROR;
2240:
2241: END IF ;
2242: END IF; -- IF p_new_lot = 'N' THEN

Line 2239: RAISE FND_API.G_EXC_ERROR;

2235: FND_MESSAGE.SET_TOKEN('LOT_NO',l_lot_no);
2236: FND_MESSAGE.SET_TOKEN('SUBLOT_NO',l_sublot_no);
2237: FND_MSG_PUB.Add;
2238: x_return_status := fnd_api.g_ret_sts_error;
2239: RAISE FND_API.G_EXC_ERROR;
2240:
2241: END IF ;
2242: END IF; -- IF p_new_lot = 'N' THEN
2243:

Line 2269: RAISE fnd_api.g_exc_error;

2265: print_debug(' Validate lot attributes status trx_type,parent_trx_type,grand_parent_trx_type=>'||l_transaction_type||'-'||p_parent_txn_type||'-'||p_grand_parent_txn_type||'-'||x_return_status, 1);
2266: END IF;
2267:
2268: IF x_return_status <> 'S' THEN
2269: RAISE fnd_api.g_exc_error;
2270: END IF;
2271:
2272: -- validate/derive secondary quantity.
2273: l_progress := '181' ;

Line 2300: RAISE FND_API.G_EXC_ERROR;

2296: print_debug('Secondary qty=>'||l_lot_secondary_quantity, 1);
2297: END IF;
2298:
2299: IF x_return_status <> 'S' THEN
2300: RAISE FND_API.G_EXC_ERROR;
2301: END IF;
2302:
2303: IF l_update_lot_qty THEN
2304: update mtl_transaction_lots_temp

Line 2341: RAISE fnd_api.g_exc_error;

2337: print_debug(' Validate lot attributes status trx_type,parent_trx_type,grand_parent_trx_type=>'||l_transaction_type||'-'||p_parent_txn_type||'-'||p_grand_parent_txn_type||'-'||x_return_status, 1);
2338: END IF;
2339:
2340: IF x_return_status <> 'S' THEN
2341: RAISE fnd_api.g_exc_error;
2342: END IF;
2343:
2344: IF l_source_document_code = 'RMA' THEN
2345: l_progress := '192' ;

Line 2364: RAISE FND_API.G_EXC_ERROR;

2360: x_allowed_quantity => l_allowed_quantity,
2361: x_return_status => x_return_status );
2362:
2363: IF x_return_status <> 'S' THEN
2364: RAISE FND_API.G_EXC_ERROR;
2365: END IF;
2366: END IF; -- IF l_source_document_code = 'RMA'
2367:
2368: -- validate/derive secondary quantity.

Line 2396: RAISE FND_API.G_EXC_ERROR;

2392: print_debug('Secondary qty=>'||l_lot_secondary_quantity, 1);
2393: END IF;
2394:
2395: IF x_return_status <> 'S' THEN
2396: RAISE FND_API.G_EXC_ERROR;
2397: END IF;
2398:
2399: IF l_update_lot_qty THEN
2400: update mtl_transaction_lots_temp

Line 2456: x_return_status := fnd_api.g_ret_sts_error;

2452: FND_MESSAGE.SET_NAME('GML','GML_RECV_INVALID_LOT');
2453: FND_MESSAGE.SET_TOKEN('LOT_NO',l_lot_no);
2454: FND_MESSAGE.SET_TOKEN('SUBLOT_NO',l_sublot_no);
2455: FND_MSG_PUB.Add;
2456: x_return_status := fnd_api.g_ret_sts_error;
2457: RAISE FND_API.G_EXC_ERROR;
2458: END ;
2459: l_progress := '210' ;
2460: END IF ; -- IF p_parent_txn_type = 'DELIVER'

Line 2457: RAISE FND_API.G_EXC_ERROR;

2453: FND_MESSAGE.SET_TOKEN('LOT_NO',l_lot_no);
2454: FND_MESSAGE.SET_TOKEN('SUBLOT_NO',l_sublot_no);
2455: FND_MSG_PUB.Add;
2456: x_return_status := fnd_api.g_ret_sts_error;
2457: RAISE FND_API.G_EXC_ERROR;
2458: END ;
2459: l_progress := '210' ;
2460: END IF ; -- IF p_parent_txn_type = 'DELIVER'
2461:

Line 2474: x_return_status := fnd_api.g_ret_sts_error;

2470: FND_MESSAGE.SET_NAME('GML','GML_RECV_INVALID_LOT');
2471: FND_MESSAGE.SET_TOKEN('LOT_NO',l_lot_no);
2472: FND_MESSAGE.SET_TOKEN('SUBLOT_NO',l_sublot_no);
2473: FND_MSG_PUB.Add;
2474: x_return_status := fnd_api.g_ret_sts_error;
2475: RAISE FND_API.G_EXC_ERROR;
2476: END IF;
2477:
2478: IF l_source_document_code = 'RMA' THEN

Line 2475: RAISE FND_API.G_EXC_ERROR;

2471: FND_MESSAGE.SET_TOKEN('LOT_NO',l_lot_no);
2472: FND_MESSAGE.SET_TOKEN('SUBLOT_NO',l_sublot_no);
2473: FND_MSG_PUB.Add;
2474: x_return_status := fnd_api.g_ret_sts_error;
2475: RAISE FND_API.G_EXC_ERROR;
2476: END IF;
2477:
2478: IF l_source_document_code = 'RMA' THEN
2479: l_progress := '221' ;

Line 2506: RAISE fnd_api.g_exc_error;

2502: print_debug(' Validate lot attributes status trx_type,parent_trx_type,grand_parent_trx_type=>'||l_transaction_type||'-'||p_parent_txn_type||'-'||p_grand_parent_txn_type||'-'||x_return_status, 1);
2503: END IF;
2504:
2505: IF x_return_status <> 'S' THEN
2506: RAISE fnd_api.g_exc_error;
2507: END IF;
2508:
2509: IF l_source_document_code = 'RMA' THEN
2510: l_progress := '223' ;

Line 2529: RAISE FND_API.G_EXC_ERROR;

2525: x_allowed_quantity => l_allowed_quantity,
2526: x_return_status => x_return_status );
2527:
2528: IF x_return_status <> 'S' THEN
2529: RAISE FND_API.G_EXC_ERROR;
2530: END IF;
2531:
2532: END IF; -- IF l_source_document_code = 'RMA'
2533:

Line 2562: RAISE FND_API.G_EXC_ERROR;

2558: print_debug('Secondary qty=>'||l_lot_secondary_quantity, 1);
2559: END IF;
2560:
2561: IF x_return_status <> 'S' THEN
2562: RAISE FND_API.G_EXC_ERROR;
2563: END IF;
2564:
2565: IF l_update_lot_qty THEN
2566: update mtl_transaction_lots_temp

Line 2599: RAISE FND_API.G_EXC_ERROR;

2595: print_debug(' Create_new_lot status trx_type,parent_trx_type,grand_parent_trx_type=>'||l_transaction_type||'-'||p_parent_txn_type||'-'||p_grand_parent_txn_type||'-'||x_return_status, 1);
2596: END IF;
2597:
2598: IF x_return_status <> 'S' THEN
2599: RAISE FND_API.G_EXC_ERROR;
2600: END IF;
2601: END IF; -- IF p_new_lot = 'N'
2602: END IF;
2603: END IF; -- ELSIF (l_transaction_type = 'CORRECT' AND l_rti_primary_qty > 0) THEN

Line 2608: WHEN FND_API.G_EXC_ERROR THEN

2604: END IF; -- IF (l_transaction_type IN ('RECEIVE'
2605:
2606:
2607: EXCEPTION
2608: WHEN FND_API.G_EXC_ERROR THEN
2609: x_return_status := fnd_api.g_ret_sts_error;
2610: insert_errors(p_rti_id => l_rti_id,
2611: p_group_id => NULL,
2612: p_header_interface_id => NULL,

Line 2609: x_return_status := fnd_api.g_ret_sts_error;

2605:
2606:
2607: EXCEPTION
2608: WHEN FND_API.G_EXC_ERROR THEN
2609: x_return_status := fnd_api.g_ret_sts_error;
2610: insert_errors(p_rti_id => l_rti_id,
2611: p_group_id => NULL,
2612: p_header_interface_id => NULL,
2613: p_column_name => NULL,

Line 2625: x_return_status := fnd_api.g_ret_sts_unexp_error;

2621: END IF;
2622: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2623:
2624: WHEN OTHERS THEN
2625: x_return_status := fnd_api.g_ret_sts_unexp_error;
2626: insert_errors( p_rti_id => l_rti_id,
2627: p_group_id => null,
2628: p_header_interface_id => null,
2629: p_column_name => null,