64:
65:
66: BEGIN
67: IF ((p_country_code IS NOT NULL) AND
68: (p_country_code <> FND_API.G_MISS_CHAR)) THEN
69: IF p_check_id_flag = 'Y' THEN
70: SELECT territory_code
71: INTO x_country_code
72: FROM fnd_territories
123: Else
124: x_country_code := NULL;
125: End if;
126: END IF;
127: x_return_status := FND_API.G_RET_STS_SUCCESS;
128:
129: EXCEPTION
130: WHEN NO_DATA_FOUND THEN
131: x_return_status := FND_API.G_RET_STS_ERROR;
127: x_return_status := FND_API.G_RET_STS_SUCCESS;
128:
129: EXCEPTION
130: WHEN NO_DATA_FOUND THEN
131: x_return_status := FND_API.G_RET_STS_ERROR;
132: x_error_message_code := 'PA_COUNTRY_INVALID';
133: x_country_code := NULL;
134: WHEN TOO_MANY_ROWS THEN
135: x_return_status := FND_API.G_RET_STS_ERROR;
131: x_return_status := FND_API.G_RET_STS_ERROR;
132: x_error_message_code := 'PA_COUNTRY_INVALID';
133: x_country_code := NULL;
134: WHEN TOO_MANY_ROWS THEN
135: x_return_status := FND_API.G_RET_STS_ERROR;
136: x_error_message_code := 'PA_COUNTRY_AMBIGOUS';
137: x_country_code := NULL;
138: WHEN OTHERS THEN
139: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
135: x_return_status := FND_API.G_RET_STS_ERROR;
136: x_error_message_code := 'PA_COUNTRY_AMBIGOUS';
137: x_country_code := NULL;
138: WHEN OTHERS THEN
139: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
140: x_country_code := NULL;
141: RAISE ;
142:
143: END Check_Country_Name_Or_Code;
206:
207: RAISE NO_DATA_FOUND ;
208: ELSE
209:
210: x_return_status := FND_API.G_RET_STS_SUCCESS;
211:
212: END IF ;
213:
214: /* ELSE
211:
212: END IF ;
213:
214: /* ELSE
215: x_return_status := FND_API.G_RET_STS_SUCCESS;
216:
217: END IF ; */
218:
219:
219:
220: EXCEPTION
221: WHEN NO_DATA_FOUND THEN
222: /* Commented the below two lines for bug 2686227 */
223: /* x_return_status := FND_API.G_RET_STS_ERROR;
224: x_error_message_code := 'PA_ORGANIZATION_INVALID';
225: */
226: NULL;
227: WHEN TOO_MANY_ROWS THEN
224: x_error_message_code := 'PA_ORGANIZATION_INVALID';
225: */
226: NULL;
227: WHEN TOO_MANY_ROWS THEN
228: x_return_status := FND_API.G_RET_STS_ERROR;
229: x_error_message_code := 'PA_ORGANIZATION_AMBIGOUS';
230: WHEN OTHERS THEN
231: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
232: RAISE ;
227: WHEN TOO_MANY_ROWS THEN
228: x_return_status := FND_API.G_RET_STS_ERROR;
229: x_error_message_code := 'PA_ORGANIZATION_AMBIGOUS';
230: WHEN OTHERS THEN
231: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
232: RAISE ;
233:
234: END Get_ORG_Location_Details;
235:
297:
298:
299: /* ELSE */
300:
301: x_return_status := FND_API.G_RET_STS_SUCCESS;
302:
303: /* END IF ; */
304:
305: EXCEPTION
304:
305: EXCEPTION
306: WHEN NO_DATA_FOUND THEN
307: NULL ;
308: x_return_status := FND_API.G_RET_STS_SUCCESS;
309: WHEN TOO_MANY_ROWS THEN
310: x_return_status := FND_API.G_RET_STS_ERROR;
311: x_error_message_code := 'PA_EMP_LOCATION_AMBIGOUS';
312: WHEN OTHERS THEN
306: WHEN NO_DATA_FOUND THEN
307: NULL ;
308: x_return_status := FND_API.G_RET_STS_SUCCESS;
309: WHEN TOO_MANY_ROWS THEN
310: x_return_status := FND_API.G_RET_STS_ERROR;
311: x_error_message_code := 'PA_EMP_LOCATION_AMBIGOUS';
312: WHEN OTHERS THEN
313: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
314: RAISE ;
309: WHEN TOO_MANY_ROWS THEN
310: x_return_status := FND_API.G_RET_STS_ERROR;
311: x_error_message_code := 'PA_EMP_LOCATION_AMBIGOUS';
312: WHEN OTHERS THEN
313: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
314: RAISE ;
315:
316: END Get_EMP_Location_Details;
317:
375: WHERE t.territory_code = l.country_code
376: AND l.location_id = p_location_id ;
377:
378: /* END IF ; */
379: x_return_status := FND_API.G_RET_STS_SUCCESS;
380:
381:
382: EXCEPTION
383: WHEN NO_DATA_FOUND THEN
380:
381:
382: EXCEPTION
383: WHEN NO_DATA_FOUND THEN
384: x_return_status := FND_API.G_RET_STS_ERROR;
385: x_error_message_code := 'PA_PROJ_LOCATION_INVALID';
386: WHEN TOO_MANY_ROWS THEN
387: x_return_status := FND_API.G_RET_STS_ERROR;
388: x_error_message_code := 'PA_PROJ_LOCATION_AMBIGOUS';
383: WHEN NO_DATA_FOUND THEN
384: x_return_status := FND_API.G_RET_STS_ERROR;
385: x_error_message_code := 'PA_PROJ_LOCATION_INVALID';
386: WHEN TOO_MANY_ROWS THEN
387: x_return_status := FND_API.G_RET_STS_ERROR;
388: x_error_message_code := 'PA_PROJ_LOCATION_AMBIGOUS';
389: WHEN OTHERS THEN
390: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
391: RAISE ;
386: WHEN TOO_MANY_ROWS THEN
387: x_return_status := FND_API.G_RET_STS_ERROR;
388: x_error_message_code := 'PA_PROJ_LOCATION_AMBIGOUS';
389: WHEN OTHERS THEN
390: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
391: RAISE ;
392:
393: END Get_PA_Location_Details;
394:
432: AND ( (l.region = p_region)
433: OR (l.region IS NULL AND p_region IS NULL))
434: AND l.country_code = p_country_code ;
435:
436: x_return_status := FND_API.G_RET_STS_SUCCESS;
437:
438: EXCEPTION
439: WHEN NO_DATA_FOUND THEN
440: x_location_id := NULL ;
437:
438: EXCEPTION
439: WHEN NO_DATA_FOUND THEN
440: x_location_id := NULL ;
441: x_return_status := FND_API.G_RET_STS_SUCCESS;
442: WHEN OTHERS THEN
443: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
444: RAISE ;
445:
439: WHEN NO_DATA_FOUND THEN
440: x_location_id := NULL ;
441: x_return_status := FND_API.G_RET_STS_SUCCESS;
442: WHEN OTHERS THEN
443: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
444: RAISE ;
445:
446: END Check_Location_Exists;
447:
519:
520: END IF;
521:
522: x_location_id := l_location_id ;
523: x_return_status := FND_API.G_RET_STS_SUCCESS;
524:
525: END IF;
526: /* ELSE
527: x_return_status := FND_API.G_RET_STS_SUCCESS;
523: x_return_status := FND_API.G_RET_STS_SUCCESS;
524:
525: END IF;
526: /* ELSE
527: x_return_status := FND_API.G_RET_STS_SUCCESS;
528:
529: END IF ; */
530:
531:
530:
531:
532: EXCEPTION
533: WHEN OTHERS THEN
534: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
535: RAISE ;
536:
537: END Get_Location;
538: