50: END IF;
51:
52: EXCEPTION
53: WHEN OTHERS THEN
54: itg_msg.no_gl_currency(p_sob);
55: RAISE FND_API.G_EXC_ERROR;
56: END;
57:
58: IF (l_Debug_Level <= 2) THEN
164: END;
165: END IF;
166:
167: IF l_param_name IS NOT NULL THEN
168: ITG_MSG.missing_element_value(l_param_name, l_param_value);
169: RAISE FND_API.G_EXC_ERROR;
170: END IF;
171:
172:
180: FETCH currency_csr INTO currency_to_rec;
181: CLOSE currency_csr;
182:
183: IF(currency_to_rec.currency_code IS NULL) THEN
184: ITG_MSG.missing_element_value('CURRTO', p_currency_to);
185: RAISE FND_API.G_EXC_ERROR;
186: END IF;
187:
188: /* validate currfrom */
186: END IF;
187:
188: /* validate currfrom */
189: IF p_currency_from IS NULL THEN
190: ITG_MSG.missing_element_value('CURRFROM', p_currency_from);
191: RAISE FND_API.G_EXC_ERROR;
192: END IF;
193:
194:
200: FETCH currency_csr INTO currency_from_rec;
201: CLOSE currency_csr;
202:
203: IF (currency_from_rec.currency_code IS NULL) THEN
204: ITG_MSG.missing_element_value('CURRFROM', p_currency_from);
205: RAISE FND_API.G_EXC_ERROR;
206: END IF;
207:
208: IF (l_Debug_Level <= 1) THEN
209: itg_debug_pub.Add('PER - Some final checks.' ,1);
210: END IF;
211:
212: IF currency_from_rec.currency_code = currency_to_rec.currency_code THEN
213: ITG_MSG.same_currency_code;
214: RAISE FND_API.G_EXC_ERROR;
215: ELSIF( currency_from_rec.derive_type IS NOT NULL
216: AND currency_from_rec.derive_type <> currency_to_rec.derive_type
217: ) THEN
216: AND currency_from_rec.derive_type <> currency_to_rec.derive_type
217: ) THEN
218: /* Check this condition , I am not sure, it was checking with =
219: originally .I changed that to <> ** */
220: ITG_MSG.no_currtype_match(currency_from_rec.derive_type,currency_to_rec.derive_type);
221: RAISE FND_API.G_EXC_ERROR;
222: END IF;
223: END;
224: -- Validation ends
285: l_found := get_error_code%FOUND;
286: CLOSE get_error_code;
287:
288: IF l_found THEN
289: ITG_MSG.daily_exchange_rate_error(
290: p_currency_from,
291: p_currency_to,
292: l_error_code);
293: RAISE FND_API.G_EXC_ERROR;
302: EXCEPTION
303: WHEN FND_API.G_EXC_ERROR THEN
304: ROLLBACK TO Process_ExchangeRate_PVT;
305: x_return_status := FND_API.G_RET_STS_ERROR;
306: ITG_msg.checked_error(g_action);
307:
308: WHEN OTHERS THEN
309: ROLLBACK TO Process_ExchangeRate_PVT;
310: ITG_msg.unexpected_error(g_action);
306: ITG_msg.checked_error(g_action);
307:
308: WHEN OTHERS THEN
309: ROLLBACK TO Process_ExchangeRate_PVT;
310: ITG_msg.unexpected_error(g_action);
311: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
312: itg_debug.msg('Unexpected error (Exchange-rate sync) - ' || substr(SQLERRM,1,255),true);
313: END;
314: