29: --OUT:
30: --x_to_quantity
31: -- Qty converted from from_uom to the to_uom
32: --x_ret_status
33: -- (a) FND_API.G_RET_STS_SUCCESS - 'S' if successful
34: -- (b) FND_API.G_RET_STS_ERROR - 'E' if known error occurs
35: -- (c) FND_API.G_RET_STS_UNEXP_ERROR - 'U' if unexpected error occurs
36: --Testing:
37: -- None.
30: --x_to_quantity
31: -- Qty converted from from_uom to the to_uom
32: --x_ret_status
33: -- (a) FND_API.G_RET_STS_SUCCESS - 'S' if successful
34: -- (b) FND_API.G_RET_STS_ERROR - 'E' if known error occurs
35: -- (c) FND_API.G_RET_STS_UNEXP_ERROR - 'U' if unexpected error occurs
36: --Testing:
37: -- None.
38: --End of Comments
31: -- Qty converted from from_uom to the to_uom
32: --x_ret_status
33: -- (a) FND_API.G_RET_STS_SUCCESS - 'S' if successful
34: -- (b) FND_API.G_RET_STS_ERROR - 'E' if known error occurs
35: -- (c) FND_API.G_RET_STS_UNEXP_ERROR - 'U' if unexpected error occurs
36: --Testing:
37: -- None.
38: --End of Comments
39: -------------------------------------------------------------------------------
51: l_to_quantity NUMBER := null;
52:
53: BEGIN
54: -- Initialise the return status
55: x_return_status := FND_API.G_RET_STS_SUCCESS;
56:
57: -- check for API version
58: IF ( NOT FND_API.compatible_api_call(l_api_version,p_api_version,l_api_name,G_PKG_NAME) )
59: THEN
54: -- Initialise the return status
55: x_return_status := FND_API.G_RET_STS_SUCCESS;
56:
57: -- check for API version
58: IF ( NOT FND_API.compatible_api_call(l_api_version,p_api_version,l_api_name,G_PKG_NAME) )
59: THEN
60: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
61: return;
62: END IF;
56:
57: -- check for API version
58: IF ( NOT FND_API.compatible_api_call(l_api_version,p_api_version,l_api_name,G_PKG_NAME) )
59: THEN
60: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
61: return;
62: END IF;
63:
64: -- Call the Inv API to get the qty
71: from_name => p_from_unit_of_measure,
72: to_name => p_to_unit_of_measure );
73:
74: IF l_to_quantity < 0 THEN
75: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
76: FND_MESSAGE.SET_NAME('INV','INV_INVALID_UOM_CONV');
77: FND_MESSAGE.SET_TOKEN ('VALUE1',p_from_unit_of_measure);
78: FND_MESSAGE.SET_TOKEN ('VALUE2',p_to_unit_of_measure);
79: FND_MSG_PUB.ADD;
82: END IF;
83:
84: EXCEPTION
85: When Others then
86: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
87: END;
88:
89: -------------------------------------------------------------------------------
90: --Start of Comments
115: --p_sec_unit_of_measure
116: -- The unit of measure corresponding to secondary qty
117: --OUT:
118: --x_ret_status
119: -- (a) FND_API.G_RET_STS_SUCCESS - 'S' if successful
120: -- (b) FND_API.G_RET_STS_ERROR - 'E' if known error occurs
121: -- (c) FND_API.G_RET_STS_UNEXP_ERROR - 'U' if unexpected error occurs
122: --Testing:
123: -- None.
116: -- The unit of measure corresponding to secondary qty
117: --OUT:
118: --x_ret_status
119: -- (a) FND_API.G_RET_STS_SUCCESS - 'S' if successful
120: -- (b) FND_API.G_RET_STS_ERROR - 'E' if known error occurs
121: -- (c) FND_API.G_RET_STS_UNEXP_ERROR - 'U' if unexpected error occurs
122: --Testing:
123: -- None.
124: --End of Comments
117: --OUT:
118: --x_ret_status
119: -- (a) FND_API.G_RET_STS_SUCCESS - 'S' if successful
120: -- (b) FND_API.G_RET_STS_ERROR - 'E' if known error occurs
121: -- (c) FND_API.G_RET_STS_UNEXP_ERROR - 'U' if unexpected error occurs
122: --Testing:
123: -- None.
124: --End of Comments
125: -------------------------------------------------------------------------------
139: l_return_code NUMBER;
140:
141: BEGIN
142: -- Initialise the return status
143: x_return_status := FND_API.G_RET_STS_SUCCESS;
144:
145: -- check for API version
146: IF ( NOT FND_API.compatible_api_call(l_api_version,p_api_version,l_api_name,G_PKG_NAME) )
147: THEN
142: -- Initialise the return status
143: x_return_status := FND_API.G_RET_STS_SUCCESS;
144:
145: -- check for API version
146: IF ( NOT FND_API.compatible_api_call(l_api_version,p_api_version,l_api_name,G_PKG_NAME) )
147: THEN
148: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
149: return;
150: END IF;
144:
145: -- check for API version
146: IF ( NOT FND_API.compatible_api_call(l_api_version,p_api_version,l_api_name,G_PKG_NAME) )
147: THEN
148: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
149: return;
150: END IF;
151:
152: -- call the inv API to check deviation
162: p_unit_of_measure1 => p_pri_unit_of_measure,
163: p_unit_of_measure2 => p_sec_unit_of_measure);
164:
165: IF l_return_code = 0 THEN
166: x_return_status := FND_API.G_RET_STS_ERROR;
167: x_msg_data := FND_MESSAGE.get_encoded;
168: END IF;
169:
170:
169:
170:
171: EXCEPTION
172: When Others then
173: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
174: END;
175:
176: END PO_INV_INTEGRATION_GRP;