54: END IF;
55: CLOSE c_loc_1;
56:
57: IF x_return_status = fnd_api.g_ret_sts_error THEN
58: FND_MESSAGE.SET_NAME('AR', 'AR_CUST_API_ERROR');
59: FND_MESSAGE.SET_TOKEN('TEXT','Location with the location_id:'||p_location_id||' does not exist');
60: FND_MSG_PUB.ADD;
61: RAISE FND_API.G_EXC_ERROR;
62: END IF;
55: CLOSE c_loc_1;
56:
57: IF x_return_status = fnd_api.g_ret_sts_error THEN
58: FND_MESSAGE.SET_NAME('AR', 'AR_CUST_API_ERROR');
59: FND_MESSAGE.SET_TOKEN('TEXT','Location with the location_id:'||p_location_id||' does not exist');
60: FND_MSG_PUB.ADD;
61: RAISE FND_API.G_EXC_ERROR;
62: END IF;
63:
67:
68: x_return_status := fnd_api.g_ret_sts_error;
69:
70: IF x_return_status = fnd_api.g_ret_sts_error THEN
71: FND_MESSAGE.SET_NAME('AR', 'AR_CUST_API_ERROR');
72: FND_MESSAGE.SET_TOKEN('TEXT','Country is a mandatory field if you do not pass the location_id');
73: FND_MSG_PUB.ADD;
74: RAISE FND_API.G_EXC_ERROR;
75: END IF;
68: x_return_status := fnd_api.g_ret_sts_error;
69:
70: IF x_return_status = fnd_api.g_ret_sts_error THEN
71: FND_MESSAGE.SET_NAME('AR', 'AR_CUST_API_ERROR');
72: FND_MESSAGE.SET_TOKEN('TEXT','Country is a mandatory field if you do not pass the location_id');
73: FND_MSG_PUB.ADD;
74: RAISE FND_API.G_EXC_ERROR;
75: END IF;
76:
83: THEN
84: x_return_status := fnd_api.g_ret_sts_error;
85:
86: IF x_return_status = fnd_api.g_ret_sts_error THEN
87: FND_MESSAGE.SET_NAME('AR', 'AR_CUST_API_ERROR');
88: FND_MESSAGE.SET_TOKEN('TEXT',
89: 'Please enter either a p_location_id or address elements like address1 ...');
90: FND_MSG_PUB.ADD;
91: fnd_msg_pub.count_and_get(
84: x_return_status := fnd_api.g_ret_sts_error;
85:
86: IF x_return_status = fnd_api.g_ret_sts_error THEN
87: FND_MESSAGE.SET_NAME('AR', 'AR_CUST_API_ERROR');
88: FND_MESSAGE.SET_TOKEN('TEXT',
89: 'Please enter either a p_location_id or address elements like address1 ...');
90: FND_MSG_PUB.ADD;
91: fnd_msg_pub.count_and_get(
92: p_encoded => fnd_api.g_false,
104:
105: x_return_status := fnd_api.g_ret_sts_error;
106:
107: IF x_return_status = fnd_api.g_ret_sts_error THEN
108: FND_MESSAGE.SET_NAME('AR', 'AR_CUST_API_ERROR');
109: FND_MESSAGE.SET_TOKEN('TEXT',
110: 'The combination of address elements you have provided does not correspond to any location in the DB');
111: FND_MSG_PUB.ADD;
112: fnd_msg_pub.count_and_get(
105: x_return_status := fnd_api.g_ret_sts_error;
106:
107: IF x_return_status = fnd_api.g_ret_sts_error THEN
108: FND_MESSAGE.SET_NAME('AR', 'AR_CUST_API_ERROR');
109: FND_MESSAGE.SET_TOKEN('TEXT',
110: 'The combination of address elements you have provided does not correspond to any location in the DB');
111: FND_MSG_PUB.ADD;
112: fnd_msg_pub.count_and_get(
113: p_encoded => fnd_api.g_false,
120:
121: x_return_status := fnd_api.g_ret_sts_error;
122:
123: IF x_return_status = fnd_api.g_ret_sts_error THEN
124: FND_MESSAGE.SET_NAME('AR', 'AR_CUST_API_ERROR');
125: FND_MESSAGE.SET_TOKEN('TEXT',
126: 'The combination of address elements you have provided correspond to more than one location in the DB');
127: FND_MSG_PUB.ADD;
128: fnd_msg_pub.count_and_get(
121: x_return_status := fnd_api.g_ret_sts_error;
122:
123: IF x_return_status = fnd_api.g_ret_sts_error THEN
124: FND_MESSAGE.SET_NAME('AR', 'AR_CUST_API_ERROR');
125: FND_MESSAGE.SET_TOKEN('TEXT',
126: 'The combination of address elements you have provided correspond to more than one location in the DB');
127: FND_MSG_PUB.ADD;
128: fnd_msg_pub.count_and_get(
129: p_encoded => fnd_api.g_false,