DBA Data[Home] [Help]

APPS.JTF_RS_SRP_TERRITORIES_PVT dependencies on FND_API

Line 110: x_return_status := fnd_api.g_ret_sts_success;

106:
107: BEGIN
108:
109: SAVEPOINT create_rs_srp_territories_pvt;
110: x_return_status := fnd_api.g_ret_sts_success;
111: --DBMS_OUTPUT.put_line(' Started Create Salesrep Territories Pvt ');
112:
113: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
114: RAISE fnd_api.g_exc_unexpected_error;

Line 113: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN

109: SAVEPOINT create_rs_srp_territories_pvt;
110: x_return_status := fnd_api.g_ret_sts_success;
111: --DBMS_OUTPUT.put_line(' Started Create Salesrep Territories Pvt ');
112:
113: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
114: RAISE fnd_api.g_exc_unexpected_error;
115: END IF;
116:
117: IF fnd_api.to_boolean(p_init_msg_list) THEN

Line 114: RAISE fnd_api.g_exc_unexpected_error;

110: x_return_status := fnd_api.g_ret_sts_success;
111: --DBMS_OUTPUT.put_line(' Started Create Salesrep Territories Pvt ');
112:
113: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
114: RAISE fnd_api.g_exc_unexpected_error;
115: END IF;
116:
117: IF fnd_api.to_boolean(p_init_msg_list) THEN
118: fnd_msg_pub.initialize;

Line 117: IF fnd_api.to_boolean(p_init_msg_list) THEN

113: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
114: RAISE fnd_api.g_exc_unexpected_error;
115: END IF;
116:
117: IF fnd_api.to_boolean(p_init_msg_list) THEN
118: fnd_msg_pub.initialize;
119: END IF;
120:
121: --Make the pre processing call to the user hooks

Line 143: IF NOT (x_return_status = fnd_api.g_ret_sts_success) THEN

139: X_MSG_COUNT => x_msg_count,
140: X_MSG_DATA => x_msg_data
141: );
142:
143: IF NOT (x_return_status = fnd_api.g_ret_sts_success) THEN
144: x_return_status := fnd_api.g_ret_sts_unexp_error;
145: fnd_message.set_name('JTF', 'JTF_RS_ERR_PRE_CUST_USR_HOOK');
146: fnd_msg_pub.add;
147: RAISE fnd_api.g_exc_unexpected_error;

Line 144: x_return_status := fnd_api.g_ret_sts_unexp_error;

140: X_MSG_DATA => x_msg_data
141: );
142:
143: IF NOT (x_return_status = fnd_api.g_ret_sts_success) THEN
144: x_return_status := fnd_api.g_ret_sts_unexp_error;
145: fnd_message.set_name('JTF', 'JTF_RS_ERR_PRE_CUST_USR_HOOK');
146: fnd_msg_pub.add;
147: RAISE fnd_api.g_exc_unexpected_error;
148: END IF;

Line 147: RAISE fnd_api.g_exc_unexpected_error;

143: IF NOT (x_return_status = fnd_api.g_ret_sts_success) THEN
144: x_return_status := fnd_api.g_ret_sts_unexp_error;
145: fnd_message.set_name('JTF', 'JTF_RS_ERR_PRE_CUST_USR_HOOK');
146: fnd_msg_pub.add;
147: RAISE fnd_api.g_exc_unexpected_error;
148: END IF;
149: END IF;
150:
151: --Pre Call to the Vertical Type User Hook

Line 171: IF NOT (x_return_status = fnd_api.g_ret_sts_success) THEN

167: X_MSG_COUNT => x_msg_count,
168: X_MSG_DATA => x_msg_data
169: );
170:
171: IF NOT (x_return_status = fnd_api.g_ret_sts_success) THEN
172: x_return_status := fnd_api.g_ret_sts_unexp_error;
173: fnd_message.set_name('JTF', 'JTF_RS_ERR_PRE_VERT_USR_HOOK');
174: fnd_msg_pub.add;
175: RAISE fnd_api.g_exc_unexpected_error;

Line 172: x_return_status := fnd_api.g_ret_sts_unexp_error;

168: X_MSG_DATA => x_msg_data
169: );
170:
171: IF NOT (x_return_status = fnd_api.g_ret_sts_success) THEN
172: x_return_status := fnd_api.g_ret_sts_unexp_error;
173: fnd_message.set_name('JTF', 'JTF_RS_ERR_PRE_VERT_USR_HOOK');
174: fnd_msg_pub.add;
175: RAISE fnd_api.g_exc_unexpected_error;
176: END IF;

Line 175: RAISE fnd_api.g_exc_unexpected_error;

171: IF NOT (x_return_status = fnd_api.g_ret_sts_success) THEN
172: x_return_status := fnd_api.g_ret_sts_unexp_error;
173: fnd_message.set_name('JTF', 'JTF_RS_ERR_PRE_VERT_USR_HOOK');
174: fnd_msg_pub.add;
175: RAISE fnd_api.g_exc_unexpected_error;
176: END IF;
177: END IF;
178:
179: --Pre Call to the Internal Type User Hook

Line 198: IF NOT (x_return_status = fnd_api.g_ret_sts_success) THEN

194: X_RETURN_STATUS => x_return_status,
195: X_MSG_COUNT => x_msg_count,
196: X_MSG_DATA => x_msg_data
197: );
198: IF NOT (x_return_status = fnd_api.g_ret_sts_success) THEN
199: x_return_status := fnd_api.g_ret_sts_unexp_error;
200: fnd_message.set_name('JTF', 'JTF_RS_ERR_PRE_INT_USR_HOOK');
201: fnd_msg_pub.add;
202: RAISE fnd_api.g_exc_unexpected_error;

Line 199: x_return_status := fnd_api.g_ret_sts_unexp_error;

195: X_MSG_COUNT => x_msg_count,
196: X_MSG_DATA => x_msg_data
197: );
198: IF NOT (x_return_status = fnd_api.g_ret_sts_success) THEN
199: x_return_status := fnd_api.g_ret_sts_unexp_error;
200: fnd_message.set_name('JTF', 'JTF_RS_ERR_PRE_INT_USR_HOOK');
201: fnd_msg_pub.add;
202: RAISE fnd_api.g_exc_unexpected_error;
203: END IF;

Line 202: RAISE fnd_api.g_exc_unexpected_error;

198: IF NOT (x_return_status = fnd_api.g_ret_sts_success) THEN
199: x_return_status := fnd_api.g_ret_sts_unexp_error;
200: fnd_message.set_name('JTF', 'JTF_RS_ERR_PRE_INT_USR_HOOK');
201: fnd_msg_pub.add;
202: RAISE fnd_api.g_exc_unexpected_error;
203: END IF;
204: END IF;
205:
206:

Line 218: x_return_status := fnd_api.g_ret_sts_error;

214: AND TERRITORY_ID = l_territory_id;
215:
216: IF l_check_count > 0 THEN
217: --dbms_output.put_line('Salesrep Territory Id already exists for the given Salesrep Id and Territory Id');
218: x_return_status := fnd_api.g_ret_sts_error;
219: fnd_message.set_name('JTF', 'JTF_RS_SRP_TERR_ID_EXISTS');
220: fnd_msg_pub.add;
221: RAISE fnd_api.g_exc_unexpected_error;
222: END IF;

Line 221: RAISE fnd_api.g_exc_unexpected_error;

217: --dbms_output.put_line('Salesrep Territory Id already exists for the given Salesrep Id and Territory Id');
218: x_return_status := fnd_api.g_ret_sts_error;
219: fnd_message.set_name('JTF', 'JTF_RS_SRP_TERR_ID_EXISTS');
220: fnd_msg_pub.add;
221: RAISE fnd_api.g_exc_unexpected_error;
222: END IF;
223:
224: --Date Validations
225: JTF_RESOURCE_UTL.VALIDATE_INPUT_DATES(

Line 230: IF NOT (x_return_status = fnd_api.g_ret_sts_success) THEN

226: p_start_date_active => l_start_date_active,
227: p_end_date_active => l_end_date_active,
228: x_return_status => x_return_status
229: );
230: IF NOT (x_return_status = fnd_api.g_ret_sts_success) THEN
231: x_return_status := fnd_api.g_ret_sts_unexp_error;
232: RAISE fnd_api.g_exc_unexpected_error;
233: END IF;
234: --End of Date Validations

Line 231: x_return_status := fnd_api.g_ret_sts_unexp_error;

227: p_end_date_active => l_end_date_active,
228: x_return_status => x_return_status
229: );
230: IF NOT (x_return_status = fnd_api.g_ret_sts_success) THEN
231: x_return_status := fnd_api.g_ret_sts_unexp_error;
232: RAISE fnd_api.g_exc_unexpected_error;
233: END IF;
234: --End of Date Validations
235:

Line 232: RAISE fnd_api.g_exc_unexpected_error;

228: x_return_status => x_return_status
229: );
230: IF NOT (x_return_status = fnd_api.g_ret_sts_success) THEN
231: x_return_status := fnd_api.g_ret_sts_unexp_error;
232: RAISE fnd_api.g_exc_unexpected_error;
233: END IF;
234: --End of Date Validations
235:
236: --Get the Salesrep Details for the given Salesrep Id

Line 241: x_return_status := fnd_api.g_ret_sts_unexp_error;

237: OPEN c_salesrep_details(l_salesrep_id);
238: FETCH c_salesrep_details INTO l_salesrep_start_date, l_salesrep_end_date;
239: IF c_salesrep_details%NOTFOUND THEN
240: --dbms_output.put_line('Salesrep information not found');
241: x_return_status := fnd_api.g_ret_sts_unexp_error;
242: fnd_message.set_name('JTF', 'JTF_RS_INVALID_SALESREP_ID');
243: fnd_message.set_token('P_SALESREP_ID', l_salesrep_id);
244: fnd_msg_pub.add;
245: CLOSE c_salesrep_details;

Line 246: RAISE fnd_api.g_exc_unexpected_error;

242: fnd_message.set_name('JTF', 'JTF_RS_INVALID_SALESREP_ID');
243: fnd_message.set_token('P_SALESREP_ID', l_salesrep_id);
244: fnd_msg_pub.add;
245: CLOSE c_salesrep_details;
246: RAISE fnd_api.g_exc_unexpected_error;
247: END IF;
248:
249: --Validate that the Salesrep start date is less than the passed start date active
250: IF l_start_date_active < l_salesrep_start_date THEN

Line 252: x_return_status := fnd_api.g_ret_sts_error;

248:
249: --Validate that the Salesrep start date is less than the passed start date active
250: IF l_start_date_active < l_salesrep_start_date THEN
251: --dbms_output.put_line('Start date active cannot be less than Salesrep Start Date');
252: x_return_status := fnd_api.g_ret_sts_error;
253: fnd_message.set_name('JTF', 'JTF_RS_SRP_INVALID_START_DATE');
254: fnd_message.set_token('P_SALESREP_START_DATE', l_salesrep_start_date);
255: fnd_msg_pub.add;
256: RAISE fnd_api.g_exc_unexpected_error;

Line 256: RAISE fnd_api.g_exc_unexpected_error;

252: x_return_status := fnd_api.g_ret_sts_error;
253: fnd_message.set_name('JTF', 'JTF_RS_SRP_INVALID_START_DATE');
254: fnd_message.set_token('P_SALESREP_START_DATE', l_salesrep_start_date);
255: fnd_msg_pub.add;
256: RAISE fnd_api.g_exc_unexpected_error;
257: END IF;
258:
259: --Validate that the passed end date is not Null and less than Salesrep End Date
260: IF l_salesrep_end_date is NOT NULL THEN

Line 263: x_return_status := fnd_api.g_ret_sts_error;

259: --Validate that the passed end date is not Null and less than Salesrep End Date
260: IF l_salesrep_end_date is NOT NULL THEN
261: IF l_end_date_active is NULL THEN
262: --dbms_output.put_line ('End date active cannot be Null as Salesrep has an End date');
263: x_return_status := fnd_api.g_ret_sts_error;
264: fnd_message.set_name('JTF', 'JTF_RS_SRP_END_DATE_NULL');
265: fnd_message.set_token('P_SALESREP_END_DATE', l_salesrep_end_date);
266: fnd_msg_pub.add;
267: RAISE fnd_api.g_exc_unexpected_error;

Line 267: RAISE fnd_api.g_exc_unexpected_error;

263: x_return_status := fnd_api.g_ret_sts_error;
264: fnd_message.set_name('JTF', 'JTF_RS_SRP_END_DATE_NULL');
265: fnd_message.set_token('P_SALESREP_END_DATE', l_salesrep_end_date);
266: fnd_msg_pub.add;
267: RAISE fnd_api.g_exc_unexpected_error;
268: ELSIF p_end_date_active > l_salesrep_end_date THEN
269: --dbms_output.put_line('End date active cannot be greater than Salesrep End Date');
270: x_return_status := fnd_api.g_ret_sts_error;
271: fnd_message.set_name('JTF', 'JTF_RS_SRP_INVALID_END_DATE');

Line 270: x_return_status := fnd_api.g_ret_sts_error;

266: fnd_msg_pub.add;
267: RAISE fnd_api.g_exc_unexpected_error;
268: ELSIF p_end_date_active > l_salesrep_end_date THEN
269: --dbms_output.put_line('End date active cannot be greater than Salesrep End Date');
270: x_return_status := fnd_api.g_ret_sts_error;
271: fnd_message.set_name('JTF', 'JTF_RS_SRP_INVALID_END_DATE');
272: fnd_message.set_token('P_SALESREP_END_DATE', l_salesrep_end_date);
273: fnd_msg_pub.add;
274: RAISE fnd_api.g_exc_unexpected_error;

Line 274: RAISE fnd_api.g_exc_unexpected_error;

270: x_return_status := fnd_api.g_ret_sts_error;
271: fnd_message.set_name('JTF', 'JTF_RS_SRP_INVALID_END_DATE');
272: fnd_message.set_token('P_SALESREP_END_DATE', l_salesrep_end_date);
273: fnd_msg_pub.add;
274: RAISE fnd_api.g_exc_unexpected_error;
275: END IF;
276: END IF;
277:
278: --Get the Territory Details for the given Territory Id

Line 283: x_return_status := fnd_api.g_ret_sts_unexp_error;

279: OPEN c_territory_details(p_territory_id);
280: FETCH c_territory_details INTO l_territory_start_date, l_territory_end_date;
281: IF c_territory_details%NOTFOUND THEN
282: --dbms_output.put_line('Territory information not found');
283: x_return_status := fnd_api.g_ret_sts_unexp_error;
284: fnd_message.set_name('JTF', 'JTF_RS_INVALID_TERRITORY_ID');
285: fnd_message.set_token('P_TERRITORY_ID', p_territory_id);
286: fnd_msg_pub.add;
287: CLOSE c_territory_details;

Line 288: RAISE fnd_api.g_exc_unexpected_error;

284: fnd_message.set_name('JTF', 'JTF_RS_INVALID_TERRITORY_ID');
285: fnd_message.set_token('P_TERRITORY_ID', p_territory_id);
286: fnd_msg_pub.add;
287: CLOSE c_territory_details;
288: RAISE fnd_api.g_exc_unexpected_error;
289: END IF;
290:
291: --Validate that the Territory start date is less than the passed start date active
292: IF p_start_date_active < l_territory_start_date THEN

Line 294: x_return_status := fnd_api.g_ret_sts_error;

290:
291: --Validate that the Territory start date is less than the passed start date active
292: IF p_start_date_active < l_territory_start_date THEN
293: --dbms_output.put_line('Start date active cannot be less than Territory Start Date');
294: x_return_status := fnd_api.g_ret_sts_error;
295: fnd_message.set_name('JTF', 'JTF_RS_TER_INVALID_START_DATE');
296: fnd_message.set_token('P_TERRITORY_START_DATE', l_territory_start_date);
297: fnd_msg_pub.add;
298: RAISE fnd_api.g_exc_unexpected_error;

Line 298: RAISE fnd_api.g_exc_unexpected_error;

294: x_return_status := fnd_api.g_ret_sts_error;
295: fnd_message.set_name('JTF', 'JTF_RS_TER_INVALID_START_DATE');
296: fnd_message.set_token('P_TERRITORY_START_DATE', l_territory_start_date);
297: fnd_msg_pub.add;
298: RAISE fnd_api.g_exc_unexpected_error;
299: END IF;
300:
301: --Validate that the passed end date is not Null and less than Territory End Date
302: IF l_territory_end_date is NOT NULL THEN

Line 305: x_return_status := fnd_api.g_ret_sts_error;

301: --Validate that the passed end date is not Null and less than Territory End Date
302: IF l_territory_end_date is NOT NULL THEN
303: IF l_end_date_active is NULL THEN
304: --dbms_output.put_line ('End date active cannot be Null as Territory has an End date');
305: x_return_status := fnd_api.g_ret_sts_error;
306: fnd_message.set_name('JTF', 'JTF_RS_TER_END_DATE_NULL');
307: fnd_message.set_token('P_TERRITORY_END_DATE', l_territory_end_date);
308: fnd_msg_pub.add;
309: RAISE fnd_api.g_exc_unexpected_error;

Line 309: RAISE fnd_api.g_exc_unexpected_error;

305: x_return_status := fnd_api.g_ret_sts_error;
306: fnd_message.set_name('JTF', 'JTF_RS_TER_END_DATE_NULL');
307: fnd_message.set_token('P_TERRITORY_END_DATE', l_territory_end_date);
308: fnd_msg_pub.add;
309: RAISE fnd_api.g_exc_unexpected_error;
310: ELSIF l_end_date_active > l_territory_end_date THEN
311: --dbms_output.put_line('End date active cannot be greater than Territory End Date');
312: x_return_status := fnd_api.g_ret_sts_error;
313: fnd_message.set_name('JTF', 'JTF_RS_TER_INVALID_END_DATE');

Line 312: x_return_status := fnd_api.g_ret_sts_error;

308: fnd_msg_pub.add;
309: RAISE fnd_api.g_exc_unexpected_error;
310: ELSIF l_end_date_active > l_territory_end_date THEN
311: --dbms_output.put_line('End date active cannot be greater than Territory End Date');
312: x_return_status := fnd_api.g_ret_sts_error;
313: fnd_message.set_name('JTF', 'JTF_RS_TER_INVALID_END_DATE');
314: fnd_message.set_token('P_TERRITORY_END_DATE', l_territory_end_date);
315: fnd_msg_pub.add;
316: RAISE fnd_api.g_exc_unexpected_error;

Line 316: RAISE fnd_api.g_exc_unexpected_error;

312: x_return_status := fnd_api.g_ret_sts_error;
313: fnd_message.set_name('JTF', 'JTF_RS_TER_INVALID_END_DATE');
314: fnd_message.set_token('P_TERRITORY_END_DATE', l_territory_end_date);
315: fnd_msg_pub.add;
316: RAISE fnd_api.g_exc_unexpected_error;
317: END IF;
318: END IF;
319:
320: --Get the next value of the Salesrep_Territory_Id from the sequence

Line 363: x_return_status := fnd_api.g_ret_sts_unexp_error;

359: OPEN c_jtf_rs_srp_territories(l_rowid);
360: FETCH c_jtf_rs_srp_territories INTO l_check_char;
361: IF c_jtf_rs_srp_territories%NOTFOUND THEN
362: --dbms_output.put_line('Error in Table Handler');
363: x_return_status := fnd_api.g_ret_sts_unexp_error;
364: fnd_message.set_name('JTF', 'JTF_RS_TABLE_HANDLER_ERROR');
365: fnd_msg_pub.add;
366: CLOSE c_jtf_rs_srp_territories;
367: RAISE fnd_api.g_exc_unexpected_error;

Line 367: RAISE fnd_api.g_exc_unexpected_error;

363: x_return_status := fnd_api.g_ret_sts_unexp_error;
364: fnd_message.set_name('JTF', 'JTF_RS_TABLE_HANDLER_ERROR');
365: fnd_msg_pub.add;
366: CLOSE c_jtf_rs_srp_territories;
367: RAISE fnd_api.g_exc_unexpected_error;
368: ELSE
369: --dbms_output.put_line('Salesrep Territory Successfully Created');
370: x_salesrep_territory_id := l_salesrep_territory_id;
371: END IF;

Line 401: IF NOT (x_return_status = fnd_api.g_ret_sts_success) THEN

397: X_MSG_COUNT => x_msg_count,
398: X_MSG_DATA => x_msg_data
399: );
400:
401: IF NOT (x_return_status = fnd_api.g_ret_sts_success) THEN
402: x_return_status := fnd_api.g_ret_sts_unexp_error;
403: fnd_message.set_name('JTF', 'JTF_RS_ERR_POST_CUST_USR_HOOK');
404: fnd_msg_pub.add;
405: RAISE fnd_api.g_exc_unexpected_error;

Line 402: x_return_status := fnd_api.g_ret_sts_unexp_error;

398: X_MSG_DATA => x_msg_data
399: );
400:
401: IF NOT (x_return_status = fnd_api.g_ret_sts_success) THEN
402: x_return_status := fnd_api.g_ret_sts_unexp_error;
403: fnd_message.set_name('JTF', 'JTF_RS_ERR_POST_CUST_USR_HOOK');
404: fnd_msg_pub.add;
405: RAISE fnd_api.g_exc_unexpected_error;
406: END IF;

Line 405: RAISE fnd_api.g_exc_unexpected_error;

401: IF NOT (x_return_status = fnd_api.g_ret_sts_success) THEN
402: x_return_status := fnd_api.g_ret_sts_unexp_error;
403: fnd_message.set_name('JTF', 'JTF_RS_ERR_POST_CUST_USR_HOOK');
404: fnd_msg_pub.add;
405: RAISE fnd_api.g_exc_unexpected_error;
406: END IF;
407: END IF;
408:
409: --Post Call to the Vertical Type User Hook

Line 430: IF NOT (x_return_status = fnd_api.g_ret_sts_success) THEN

426: X_MSG_COUNT => x_msg_count,
427: X_MSG_DATA => x_msg_data
428: );
429:
430: IF NOT (x_return_status = fnd_api.g_ret_sts_success) THEN
431: x_return_status := fnd_api.g_ret_sts_unexp_error;
432: fnd_message.set_name('JTF', 'JTF_RS_ERR_POST_VERT_USR_HOOK');
433: fnd_msg_pub.add;
434: RAISE fnd_api.g_exc_unexpected_error;

Line 431: x_return_status := fnd_api.g_ret_sts_unexp_error;

427: X_MSG_DATA => x_msg_data
428: );
429:
430: IF NOT (x_return_status = fnd_api.g_ret_sts_success) THEN
431: x_return_status := fnd_api.g_ret_sts_unexp_error;
432: fnd_message.set_name('JTF', 'JTF_RS_ERR_POST_VERT_USR_HOOK');
433: fnd_msg_pub.add;
434: RAISE fnd_api.g_exc_unexpected_error;
435: END IF;

Line 434: RAISE fnd_api.g_exc_unexpected_error;

430: IF NOT (x_return_status = fnd_api.g_ret_sts_success) THEN
431: x_return_status := fnd_api.g_ret_sts_unexp_error;
432: fnd_message.set_name('JTF', 'JTF_RS_ERR_POST_VERT_USR_HOOK');
433: fnd_msg_pub.add;
434: RAISE fnd_api.g_exc_unexpected_error;
435: END IF;
436: END IF;
437:
438: --Post Call to the Internal Type User Hook

Line 458: IF NOT (x_return_status = fnd_api.g_ret_sts_success) THEN

454: X_RETURN_STATUS => x_return_status,
455: X_MSG_COUNT => x_msg_count,
456: X_MSG_DATA => x_msg_data
457: );
458: IF NOT (x_return_status = fnd_api.g_ret_sts_success) THEN
459: x_return_status := fnd_api.g_ret_sts_unexp_error;
460: fnd_message.set_name('JTF', 'JTF_RS_ERR_POST_INT_USR_HOOK');
461: fnd_msg_pub.add;
462: RAISE fnd_api.g_exc_unexpected_error;

Line 459: x_return_status := fnd_api.g_ret_sts_unexp_error;

455: X_MSG_COUNT => x_msg_count,
456: X_MSG_DATA => x_msg_data
457: );
458: IF NOT (x_return_status = fnd_api.g_ret_sts_success) THEN
459: x_return_status := fnd_api.g_ret_sts_unexp_error;
460: fnd_message.set_name('JTF', 'JTF_RS_ERR_POST_INT_USR_HOOK');
461: fnd_msg_pub.add;
462: RAISE fnd_api.g_exc_unexpected_error;
463: END IF;

Line 462: RAISE fnd_api.g_exc_unexpected_error;

458: IF NOT (x_return_status = fnd_api.g_ret_sts_success) THEN
459: x_return_status := fnd_api.g_ret_sts_unexp_error;
460: fnd_message.set_name('JTF', 'JTF_RS_ERR_POST_INT_USR_HOOK');
461: fnd_msg_pub.add;
462: RAISE fnd_api.g_exc_unexpected_error;
463: END IF;
464: END IF;
465:
466: /* Standard call for Message Generation */

Line 493: IF NOT (x_return_status = fnd_api.g_ret_sts_success) THEN

489: p_action_code => 'I',
490: p_bind_data_id => l_bind_data_id,
491: x_return_code => x_return_status);
492:
493: IF NOT (x_return_status = fnd_api.g_ret_sts_success) THEN
494: --dbms_output.put_line('Returned Error status from the Message Generation API');
495: x_return_status := fnd_api.g_ret_sts_unexp_error;
496: fnd_message.set_name('JTF', 'JTF_RS_ERR_MESG_GENERATE_API');
497: fnd_msg_pub.add;

Line 495: x_return_status := fnd_api.g_ret_sts_unexp_error;

491: x_return_code => x_return_status);
492:
493: IF NOT (x_return_status = fnd_api.g_ret_sts_success) THEN
494: --dbms_output.put_line('Returned Error status from the Message Generation API');
495: x_return_status := fnd_api.g_ret_sts_unexp_error;
496: fnd_message.set_name('JTF', 'JTF_RS_ERR_MESG_GENERATE_API');
497: fnd_msg_pub.add;
498: RAISE fnd_api.g_exc_unexpected_error;
499: END IF;

Line 498: RAISE fnd_api.g_exc_unexpected_error;

494: --dbms_output.put_line('Returned Error status from the Message Generation API');
495: x_return_status := fnd_api.g_ret_sts_unexp_error;
496: fnd_message.set_name('JTF', 'JTF_RS_ERR_MESG_GENERATE_API');
497: fnd_msg_pub.add;
498: RAISE fnd_api.g_exc_unexpected_error;
499: END IF;
500: END IF;
501: END IF;
502:

Line 503: IF fnd_api.to_boolean(p_commit) THEN

499: END IF;
500: END IF;
501: END IF;
502:
503: IF fnd_api.to_boolean(p_commit) THEN
504: COMMIT WORK;
505: END IF;
506: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
507:

Line 509: WHEN fnd_api.g_exc_unexpected_error THEN

505: END IF;
506: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
507:
508: EXCEPTION
509: WHEN fnd_api.g_exc_unexpected_error THEN
510: --DBMS_OUTPUT.put_line (' ========================================== ');
511: --DBMS_OUTPUT.put_line ('=========== Raised Unexpected Error =============== ');
512: ROLLBACK TO create_rs_srp_territories_pvt;
513: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 513: x_return_status := fnd_api.g_ret_sts_unexp_error;

509: WHEN fnd_api.g_exc_unexpected_error THEN
510: --DBMS_OUTPUT.put_line (' ========================================== ');
511: --DBMS_OUTPUT.put_line ('=========== Raised Unexpected Error =============== ');
512: ROLLBACK TO create_rs_srp_territories_pvt;
513: x_return_status := fnd_api.g_ret_sts_unexp_error;
514: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
515: WHEN OTHERS THEN
516: --DBMS_OUTPUT.put_line (' ========================================== ');
517: --DBMS_OUTPUT.put_line (' =========== Raised Others in Create Group_member Pvt ============= ');

Line 520: x_return_status := fnd_api.g_ret_sts_unexp_error;

516: --DBMS_OUTPUT.put_line (' ========================================== ');
517: --DBMS_OUTPUT.put_line (' =========== Raised Others in Create Group_member Pvt ============= ');
518: --DBMS_OUTPUT.put_line (SQLCODE || SQLERRM);
519: ROLLBACK TO create_rs_srp_territories_pvt;
520: x_return_status := fnd_api.g_ret_sts_unexp_error;
521: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
522:
523: END create_rs_srp_territories;
524:

Line 601: DECODE(p_start_date_active, fnd_api.g_miss_date, start_date_active, p_start_date_active) l_start_date_active,

597: WHERE salesrep_territory_id = l_salesrep_territory_id;
598:
599: CURSOR c_salesrep_territory_update( l_salesrep_territory_id IN NUMBER ) IS
600: SELECT
601: DECODE(p_start_date_active, fnd_api.g_miss_date, start_date_active, p_start_date_active) l_start_date_active,
602: DECODE(p_end_date_active, fnd_api.g_miss_date, end_date_active, p_end_date_active) l_end_date_active,
603: DECODE(p_status, fnd_api.g_miss_char, status, p_status) l_status,
604: DECODE(p_wh_update_date, fnd_api.g_miss_date, wh_update_date, p_wh_update_date) l_wh_update_date,
605: DECODE(p_attribute1,fnd_api.g_miss_char, attribute1, p_attribute1) l_attribute1,

Line 602: DECODE(p_end_date_active, fnd_api.g_miss_date, end_date_active, p_end_date_active) l_end_date_active,

598:
599: CURSOR c_salesrep_territory_update( l_salesrep_territory_id IN NUMBER ) IS
600: SELECT
601: DECODE(p_start_date_active, fnd_api.g_miss_date, start_date_active, p_start_date_active) l_start_date_active,
602: DECODE(p_end_date_active, fnd_api.g_miss_date, end_date_active, p_end_date_active) l_end_date_active,
603: DECODE(p_status, fnd_api.g_miss_char, status, p_status) l_status,
604: DECODE(p_wh_update_date, fnd_api.g_miss_date, wh_update_date, p_wh_update_date) l_wh_update_date,
605: DECODE(p_attribute1,fnd_api.g_miss_char, attribute1, p_attribute1) l_attribute1,
606: DECODE(p_attribute2,fnd_api.g_miss_char, attribute2, p_attribute2) l_attribute2,

Line 603: DECODE(p_status, fnd_api.g_miss_char, status, p_status) l_status,

599: CURSOR c_salesrep_territory_update( l_salesrep_territory_id IN NUMBER ) IS
600: SELECT
601: DECODE(p_start_date_active, fnd_api.g_miss_date, start_date_active, p_start_date_active) l_start_date_active,
602: DECODE(p_end_date_active, fnd_api.g_miss_date, end_date_active, p_end_date_active) l_end_date_active,
603: DECODE(p_status, fnd_api.g_miss_char, status, p_status) l_status,
604: DECODE(p_wh_update_date, fnd_api.g_miss_date, wh_update_date, p_wh_update_date) l_wh_update_date,
605: DECODE(p_attribute1,fnd_api.g_miss_char, attribute1, p_attribute1) l_attribute1,
606: DECODE(p_attribute2,fnd_api.g_miss_char, attribute2, p_attribute2) l_attribute2,
607: DECODE(p_attribute3,fnd_api.g_miss_char, attribute3, p_attribute3) l_attribute3,

Line 604: DECODE(p_wh_update_date, fnd_api.g_miss_date, wh_update_date, p_wh_update_date) l_wh_update_date,

600: SELECT
601: DECODE(p_start_date_active, fnd_api.g_miss_date, start_date_active, p_start_date_active) l_start_date_active,
602: DECODE(p_end_date_active, fnd_api.g_miss_date, end_date_active, p_end_date_active) l_end_date_active,
603: DECODE(p_status, fnd_api.g_miss_char, status, p_status) l_status,
604: DECODE(p_wh_update_date, fnd_api.g_miss_date, wh_update_date, p_wh_update_date) l_wh_update_date,
605: DECODE(p_attribute1,fnd_api.g_miss_char, attribute1, p_attribute1) l_attribute1,
606: DECODE(p_attribute2,fnd_api.g_miss_char, attribute2, p_attribute2) l_attribute2,
607: DECODE(p_attribute3,fnd_api.g_miss_char, attribute3, p_attribute3) l_attribute3,
608: DECODE(p_attribute4,fnd_api.g_miss_char, attribute4, p_attribute4) l_attribute4,

Line 605: DECODE(p_attribute1,fnd_api.g_miss_char, attribute1, p_attribute1) l_attribute1,

601: DECODE(p_start_date_active, fnd_api.g_miss_date, start_date_active, p_start_date_active) l_start_date_active,
602: DECODE(p_end_date_active, fnd_api.g_miss_date, end_date_active, p_end_date_active) l_end_date_active,
603: DECODE(p_status, fnd_api.g_miss_char, status, p_status) l_status,
604: DECODE(p_wh_update_date, fnd_api.g_miss_date, wh_update_date, p_wh_update_date) l_wh_update_date,
605: DECODE(p_attribute1,fnd_api.g_miss_char, attribute1, p_attribute1) l_attribute1,
606: DECODE(p_attribute2,fnd_api.g_miss_char, attribute2, p_attribute2) l_attribute2,
607: DECODE(p_attribute3,fnd_api.g_miss_char, attribute3, p_attribute3) l_attribute3,
608: DECODE(p_attribute4,fnd_api.g_miss_char, attribute4, p_attribute4) l_attribute4,
609: DECODE(p_attribute5,fnd_api.g_miss_char, attribute5, p_attribute5) l_attribute5,

Line 606: DECODE(p_attribute2,fnd_api.g_miss_char, attribute2, p_attribute2) l_attribute2,

602: DECODE(p_end_date_active, fnd_api.g_miss_date, end_date_active, p_end_date_active) l_end_date_active,
603: DECODE(p_status, fnd_api.g_miss_char, status, p_status) l_status,
604: DECODE(p_wh_update_date, fnd_api.g_miss_date, wh_update_date, p_wh_update_date) l_wh_update_date,
605: DECODE(p_attribute1,fnd_api.g_miss_char, attribute1, p_attribute1) l_attribute1,
606: DECODE(p_attribute2,fnd_api.g_miss_char, attribute2, p_attribute2) l_attribute2,
607: DECODE(p_attribute3,fnd_api.g_miss_char, attribute3, p_attribute3) l_attribute3,
608: DECODE(p_attribute4,fnd_api.g_miss_char, attribute4, p_attribute4) l_attribute4,
609: DECODE(p_attribute5,fnd_api.g_miss_char, attribute5, p_attribute5) l_attribute5,
610: DECODE(p_attribute6,fnd_api.g_miss_char, attribute6, p_attribute6) l_attribute6,

Line 607: DECODE(p_attribute3,fnd_api.g_miss_char, attribute3, p_attribute3) l_attribute3,

603: DECODE(p_status, fnd_api.g_miss_char, status, p_status) l_status,
604: DECODE(p_wh_update_date, fnd_api.g_miss_date, wh_update_date, p_wh_update_date) l_wh_update_date,
605: DECODE(p_attribute1,fnd_api.g_miss_char, attribute1, p_attribute1) l_attribute1,
606: DECODE(p_attribute2,fnd_api.g_miss_char, attribute2, p_attribute2) l_attribute2,
607: DECODE(p_attribute3,fnd_api.g_miss_char, attribute3, p_attribute3) l_attribute3,
608: DECODE(p_attribute4,fnd_api.g_miss_char, attribute4, p_attribute4) l_attribute4,
609: DECODE(p_attribute5,fnd_api.g_miss_char, attribute5, p_attribute5) l_attribute5,
610: DECODE(p_attribute6,fnd_api.g_miss_char, attribute6, p_attribute6) l_attribute6,
611: DECODE(p_attribute7,fnd_api.g_miss_char, attribute7, p_attribute7) l_attribute7,

Line 608: DECODE(p_attribute4,fnd_api.g_miss_char, attribute4, p_attribute4) l_attribute4,

604: DECODE(p_wh_update_date, fnd_api.g_miss_date, wh_update_date, p_wh_update_date) l_wh_update_date,
605: DECODE(p_attribute1,fnd_api.g_miss_char, attribute1, p_attribute1) l_attribute1,
606: DECODE(p_attribute2,fnd_api.g_miss_char, attribute2, p_attribute2) l_attribute2,
607: DECODE(p_attribute3,fnd_api.g_miss_char, attribute3, p_attribute3) l_attribute3,
608: DECODE(p_attribute4,fnd_api.g_miss_char, attribute4, p_attribute4) l_attribute4,
609: DECODE(p_attribute5,fnd_api.g_miss_char, attribute5, p_attribute5) l_attribute5,
610: DECODE(p_attribute6,fnd_api.g_miss_char, attribute6, p_attribute6) l_attribute6,
611: DECODE(p_attribute7,fnd_api.g_miss_char, attribute7, p_attribute7) l_attribute7,
612: DECODE(p_attribute8,fnd_api.g_miss_char, attribute8, p_attribute8) l_attribute8,

Line 609: DECODE(p_attribute5,fnd_api.g_miss_char, attribute5, p_attribute5) l_attribute5,

605: DECODE(p_attribute1,fnd_api.g_miss_char, attribute1, p_attribute1) l_attribute1,
606: DECODE(p_attribute2,fnd_api.g_miss_char, attribute2, p_attribute2) l_attribute2,
607: DECODE(p_attribute3,fnd_api.g_miss_char, attribute3, p_attribute3) l_attribute3,
608: DECODE(p_attribute4,fnd_api.g_miss_char, attribute4, p_attribute4) l_attribute4,
609: DECODE(p_attribute5,fnd_api.g_miss_char, attribute5, p_attribute5) l_attribute5,
610: DECODE(p_attribute6,fnd_api.g_miss_char, attribute6, p_attribute6) l_attribute6,
611: DECODE(p_attribute7,fnd_api.g_miss_char, attribute7, p_attribute7) l_attribute7,
612: DECODE(p_attribute8,fnd_api.g_miss_char, attribute8, p_attribute8) l_attribute8,
613: DECODE(p_attribute9,fnd_api.g_miss_char, attribute9, p_attribute9) l_attribute9,

Line 610: DECODE(p_attribute6,fnd_api.g_miss_char, attribute6, p_attribute6) l_attribute6,

606: DECODE(p_attribute2,fnd_api.g_miss_char, attribute2, p_attribute2) l_attribute2,
607: DECODE(p_attribute3,fnd_api.g_miss_char, attribute3, p_attribute3) l_attribute3,
608: DECODE(p_attribute4,fnd_api.g_miss_char, attribute4, p_attribute4) l_attribute4,
609: DECODE(p_attribute5,fnd_api.g_miss_char, attribute5, p_attribute5) l_attribute5,
610: DECODE(p_attribute6,fnd_api.g_miss_char, attribute6, p_attribute6) l_attribute6,
611: DECODE(p_attribute7,fnd_api.g_miss_char, attribute7, p_attribute7) l_attribute7,
612: DECODE(p_attribute8,fnd_api.g_miss_char, attribute8, p_attribute8) l_attribute8,
613: DECODE(p_attribute9,fnd_api.g_miss_char, attribute9, p_attribute9) l_attribute9,
614: DECODE(p_attribute10,fnd_api.g_miss_char, attribute10, p_attribute10) l_attribute10,

Line 611: DECODE(p_attribute7,fnd_api.g_miss_char, attribute7, p_attribute7) l_attribute7,

607: DECODE(p_attribute3,fnd_api.g_miss_char, attribute3, p_attribute3) l_attribute3,
608: DECODE(p_attribute4,fnd_api.g_miss_char, attribute4, p_attribute4) l_attribute4,
609: DECODE(p_attribute5,fnd_api.g_miss_char, attribute5, p_attribute5) l_attribute5,
610: DECODE(p_attribute6,fnd_api.g_miss_char, attribute6, p_attribute6) l_attribute6,
611: DECODE(p_attribute7,fnd_api.g_miss_char, attribute7, p_attribute7) l_attribute7,
612: DECODE(p_attribute8,fnd_api.g_miss_char, attribute8, p_attribute8) l_attribute8,
613: DECODE(p_attribute9,fnd_api.g_miss_char, attribute9, p_attribute9) l_attribute9,
614: DECODE(p_attribute10,fnd_api.g_miss_char, attribute10, p_attribute10) l_attribute10,
615: DECODE(p_attribute11,fnd_api.g_miss_char, attribute11, p_attribute11) l_attribute11,

Line 612: DECODE(p_attribute8,fnd_api.g_miss_char, attribute8, p_attribute8) l_attribute8,

608: DECODE(p_attribute4,fnd_api.g_miss_char, attribute4, p_attribute4) l_attribute4,
609: DECODE(p_attribute5,fnd_api.g_miss_char, attribute5, p_attribute5) l_attribute5,
610: DECODE(p_attribute6,fnd_api.g_miss_char, attribute6, p_attribute6) l_attribute6,
611: DECODE(p_attribute7,fnd_api.g_miss_char, attribute7, p_attribute7) l_attribute7,
612: DECODE(p_attribute8,fnd_api.g_miss_char, attribute8, p_attribute8) l_attribute8,
613: DECODE(p_attribute9,fnd_api.g_miss_char, attribute9, p_attribute9) l_attribute9,
614: DECODE(p_attribute10,fnd_api.g_miss_char, attribute10, p_attribute10) l_attribute10,
615: DECODE(p_attribute11,fnd_api.g_miss_char, attribute11, p_attribute11) l_attribute11,
616: DECODE(p_attribute12,fnd_api.g_miss_char, attribute12, p_attribute12) l_attribute12,

Line 613: DECODE(p_attribute9,fnd_api.g_miss_char, attribute9, p_attribute9) l_attribute9,

609: DECODE(p_attribute5,fnd_api.g_miss_char, attribute5, p_attribute5) l_attribute5,
610: DECODE(p_attribute6,fnd_api.g_miss_char, attribute6, p_attribute6) l_attribute6,
611: DECODE(p_attribute7,fnd_api.g_miss_char, attribute7, p_attribute7) l_attribute7,
612: DECODE(p_attribute8,fnd_api.g_miss_char, attribute8, p_attribute8) l_attribute8,
613: DECODE(p_attribute9,fnd_api.g_miss_char, attribute9, p_attribute9) l_attribute9,
614: DECODE(p_attribute10,fnd_api.g_miss_char, attribute10, p_attribute10) l_attribute10,
615: DECODE(p_attribute11,fnd_api.g_miss_char, attribute11, p_attribute11) l_attribute11,
616: DECODE(p_attribute12,fnd_api.g_miss_char, attribute12, p_attribute12) l_attribute12,
617: DECODE(p_attribute13,fnd_api.g_miss_char, attribute13, p_attribute13) l_attribute13,

Line 614: DECODE(p_attribute10,fnd_api.g_miss_char, attribute10, p_attribute10) l_attribute10,

610: DECODE(p_attribute6,fnd_api.g_miss_char, attribute6, p_attribute6) l_attribute6,
611: DECODE(p_attribute7,fnd_api.g_miss_char, attribute7, p_attribute7) l_attribute7,
612: DECODE(p_attribute8,fnd_api.g_miss_char, attribute8, p_attribute8) l_attribute8,
613: DECODE(p_attribute9,fnd_api.g_miss_char, attribute9, p_attribute9) l_attribute9,
614: DECODE(p_attribute10,fnd_api.g_miss_char, attribute10, p_attribute10) l_attribute10,
615: DECODE(p_attribute11,fnd_api.g_miss_char, attribute11, p_attribute11) l_attribute11,
616: DECODE(p_attribute12,fnd_api.g_miss_char, attribute12, p_attribute12) l_attribute12,
617: DECODE(p_attribute13,fnd_api.g_miss_char, attribute13, p_attribute13) l_attribute13,
618: DECODE(p_attribute14,fnd_api.g_miss_char, attribute14, p_attribute14) l_attribute14,

Line 615: DECODE(p_attribute11,fnd_api.g_miss_char, attribute11, p_attribute11) l_attribute11,

611: DECODE(p_attribute7,fnd_api.g_miss_char, attribute7, p_attribute7) l_attribute7,
612: DECODE(p_attribute8,fnd_api.g_miss_char, attribute8, p_attribute8) l_attribute8,
613: DECODE(p_attribute9,fnd_api.g_miss_char, attribute9, p_attribute9) l_attribute9,
614: DECODE(p_attribute10,fnd_api.g_miss_char, attribute10, p_attribute10) l_attribute10,
615: DECODE(p_attribute11,fnd_api.g_miss_char, attribute11, p_attribute11) l_attribute11,
616: DECODE(p_attribute12,fnd_api.g_miss_char, attribute12, p_attribute12) l_attribute12,
617: DECODE(p_attribute13,fnd_api.g_miss_char, attribute13, p_attribute13) l_attribute13,
618: DECODE(p_attribute14,fnd_api.g_miss_char, attribute14, p_attribute14) l_attribute14,
619: DECODE(p_attribute15,fnd_api.g_miss_char, attribute15, p_attribute15) l_attribute15,

Line 616: DECODE(p_attribute12,fnd_api.g_miss_char, attribute12, p_attribute12) l_attribute12,

612: DECODE(p_attribute8,fnd_api.g_miss_char, attribute8, p_attribute8) l_attribute8,
613: DECODE(p_attribute9,fnd_api.g_miss_char, attribute9, p_attribute9) l_attribute9,
614: DECODE(p_attribute10,fnd_api.g_miss_char, attribute10, p_attribute10) l_attribute10,
615: DECODE(p_attribute11,fnd_api.g_miss_char, attribute11, p_attribute11) l_attribute11,
616: DECODE(p_attribute12,fnd_api.g_miss_char, attribute12, p_attribute12) l_attribute12,
617: DECODE(p_attribute13,fnd_api.g_miss_char, attribute13, p_attribute13) l_attribute13,
618: DECODE(p_attribute14,fnd_api.g_miss_char, attribute14, p_attribute14) l_attribute14,
619: DECODE(p_attribute15,fnd_api.g_miss_char, attribute15, p_attribute15) l_attribute15,
620: DECODE(p_attribute_category,fnd_api.g_miss_char, attribute1, p_attribute_category) l_attribute_category

Line 617: DECODE(p_attribute13,fnd_api.g_miss_char, attribute13, p_attribute13) l_attribute13,

613: DECODE(p_attribute9,fnd_api.g_miss_char, attribute9, p_attribute9) l_attribute9,
614: DECODE(p_attribute10,fnd_api.g_miss_char, attribute10, p_attribute10) l_attribute10,
615: DECODE(p_attribute11,fnd_api.g_miss_char, attribute11, p_attribute11) l_attribute11,
616: DECODE(p_attribute12,fnd_api.g_miss_char, attribute12, p_attribute12) l_attribute12,
617: DECODE(p_attribute13,fnd_api.g_miss_char, attribute13, p_attribute13) l_attribute13,
618: DECODE(p_attribute14,fnd_api.g_miss_char, attribute14, p_attribute14) l_attribute14,
619: DECODE(p_attribute15,fnd_api.g_miss_char, attribute15, p_attribute15) l_attribute15,
620: DECODE(p_attribute_category,fnd_api.g_miss_char, attribute1, p_attribute_category) l_attribute_category
621: FROM jtf_rs_srp_territories

Line 618: DECODE(p_attribute14,fnd_api.g_miss_char, attribute14, p_attribute14) l_attribute14,

614: DECODE(p_attribute10,fnd_api.g_miss_char, attribute10, p_attribute10) l_attribute10,
615: DECODE(p_attribute11,fnd_api.g_miss_char, attribute11, p_attribute11) l_attribute11,
616: DECODE(p_attribute12,fnd_api.g_miss_char, attribute12, p_attribute12) l_attribute12,
617: DECODE(p_attribute13,fnd_api.g_miss_char, attribute13, p_attribute13) l_attribute13,
618: DECODE(p_attribute14,fnd_api.g_miss_char, attribute14, p_attribute14) l_attribute14,
619: DECODE(p_attribute15,fnd_api.g_miss_char, attribute15, p_attribute15) l_attribute15,
620: DECODE(p_attribute_category,fnd_api.g_miss_char, attribute1, p_attribute_category) l_attribute_category
621: FROM jtf_rs_srp_territories
622: WHERE salesrep_territory_id = l_salesrep_territory_id;

Line 619: DECODE(p_attribute15,fnd_api.g_miss_char, attribute15, p_attribute15) l_attribute15,

615: DECODE(p_attribute11,fnd_api.g_miss_char, attribute11, p_attribute11) l_attribute11,
616: DECODE(p_attribute12,fnd_api.g_miss_char, attribute12, p_attribute12) l_attribute12,
617: DECODE(p_attribute13,fnd_api.g_miss_char, attribute13, p_attribute13) l_attribute13,
618: DECODE(p_attribute14,fnd_api.g_miss_char, attribute14, p_attribute14) l_attribute14,
619: DECODE(p_attribute15,fnd_api.g_miss_char, attribute15, p_attribute15) l_attribute15,
620: DECODE(p_attribute_category,fnd_api.g_miss_char, attribute1, p_attribute_category) l_attribute_category
621: FROM jtf_rs_srp_territories
622: WHERE salesrep_territory_id = l_salesrep_territory_id;
623:

Line 620: DECODE(p_attribute_category,fnd_api.g_miss_char, attribute1, p_attribute_category) l_attribute_category

616: DECODE(p_attribute12,fnd_api.g_miss_char, attribute12, p_attribute12) l_attribute12,
617: DECODE(p_attribute13,fnd_api.g_miss_char, attribute13, p_attribute13) l_attribute13,
618: DECODE(p_attribute14,fnd_api.g_miss_char, attribute14, p_attribute14) l_attribute14,
619: DECODE(p_attribute15,fnd_api.g_miss_char, attribute15, p_attribute15) l_attribute15,
620: DECODE(p_attribute_category,fnd_api.g_miss_char, attribute1, p_attribute_category) l_attribute_category
621: FROM jtf_rs_srp_territories
622: WHERE salesrep_territory_id = l_salesrep_territory_id;
623:
624: salesrep_territory_rec c_salesrep_territory_update%ROWTYPE;

Line 642: x_return_status := fnd_api.g_ret_sts_success;

638: AND jst.salesrep_territory_id = l_salesrep_territory_id;
639:
640: BEGIN
641: SAVEPOINT update_rs_srp_territories_pvt;
642: x_return_status := fnd_api.g_ret_sts_success;
643: --DBMS_OUTPUT.put_line(' Started Update Salesrep Territories Pvt ');
644:
645: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
646: RAISE fnd_api.g_exc_unexpected_error;

Line 645: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN

641: SAVEPOINT update_rs_srp_territories_pvt;
642: x_return_status := fnd_api.g_ret_sts_success;
643: --DBMS_OUTPUT.put_line(' Started Update Salesrep Territories Pvt ');
644:
645: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
646: RAISE fnd_api.g_exc_unexpected_error;
647: END IF;
648:
649: IF fnd_api.to_boolean(p_init_msg_list) THEN

Line 646: RAISE fnd_api.g_exc_unexpected_error;

642: x_return_status := fnd_api.g_ret_sts_success;
643: --DBMS_OUTPUT.put_line(' Started Update Salesrep Territories Pvt ');
644:
645: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
646: RAISE fnd_api.g_exc_unexpected_error;
647: END IF;
648:
649: IF fnd_api.to_boolean(p_init_msg_list) THEN
650: fnd_msg_pub.initialize;

Line 649: IF fnd_api.to_boolean(p_init_msg_list) THEN

645: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
646: RAISE fnd_api.g_exc_unexpected_error;
647: END IF;
648:
649: IF fnd_api.to_boolean(p_init_msg_list) THEN
650: fnd_msg_pub.initialize;
651: END IF;
652:
653: --Make the pre processing call to the user hooks

Line 674: IF NOT (x_return_status = fnd_api.g_ret_sts_success) THEN

670: X_MSG_COUNT => x_msg_count,
671: X_MSG_DATA => x_msg_data
672: );
673:
674: IF NOT (x_return_status = fnd_api.g_ret_sts_success) THEN
675: x_return_status := fnd_api.g_ret_sts_unexp_error;
676: fnd_message.set_name('JTF', 'JTF_RS_ERR_PRE_CUST_USR_HOOK');
677: fnd_msg_pub.add;
678: RAISE fnd_api.g_exc_unexpected_error;

Line 675: x_return_status := fnd_api.g_ret_sts_unexp_error;

671: X_MSG_DATA => x_msg_data
672: );
673:
674: IF NOT (x_return_status = fnd_api.g_ret_sts_success) THEN
675: x_return_status := fnd_api.g_ret_sts_unexp_error;
676: fnd_message.set_name('JTF', 'JTF_RS_ERR_PRE_CUST_USR_HOOK');
677: fnd_msg_pub.add;
678: RAISE fnd_api.g_exc_unexpected_error;
679: END IF;

Line 678: RAISE fnd_api.g_exc_unexpected_error;

674: IF NOT (x_return_status = fnd_api.g_ret_sts_success) THEN
675: x_return_status := fnd_api.g_ret_sts_unexp_error;
676: fnd_message.set_name('JTF', 'JTF_RS_ERR_PRE_CUST_USR_HOOK');
677: fnd_msg_pub.add;
678: RAISE fnd_api.g_exc_unexpected_error;
679: END IF;
680: END IF;
681:
682: --Pre Call to the Vertical Type User Hook

Line 701: IF NOT (x_return_status = fnd_api.g_ret_sts_success) THEN

697: X_MSG_COUNT => x_msg_count,
698: X_MSG_DATA => x_msg_data
699: );
700:
701: IF NOT (x_return_status = fnd_api.g_ret_sts_success) THEN
702: x_return_status := fnd_api.g_ret_sts_unexp_error;
703: fnd_message.set_name('JTF', 'JTF_RS_ERR_PRE_VERT_USR_HOOK');
704: fnd_msg_pub.add;
705: RAISE fnd_api.g_exc_unexpected_error;

Line 702: x_return_status := fnd_api.g_ret_sts_unexp_error;

698: X_MSG_DATA => x_msg_data
699: );
700:
701: IF NOT (x_return_status = fnd_api.g_ret_sts_success) THEN
702: x_return_status := fnd_api.g_ret_sts_unexp_error;
703: fnd_message.set_name('JTF', 'JTF_RS_ERR_PRE_VERT_USR_HOOK');
704: fnd_msg_pub.add;
705: RAISE fnd_api.g_exc_unexpected_error;
706: END IF;

Line 705: RAISE fnd_api.g_exc_unexpected_error;

701: IF NOT (x_return_status = fnd_api.g_ret_sts_success) THEN
702: x_return_status := fnd_api.g_ret_sts_unexp_error;
703: fnd_message.set_name('JTF', 'JTF_RS_ERR_PRE_VERT_USR_HOOK');
704: fnd_msg_pub.add;
705: RAISE fnd_api.g_exc_unexpected_error;
706: END IF;
707: END IF;
708:
709: --Pre Call to the Internal Type User Hook

Line 728: IF NOT (x_return_status = fnd_api.g_ret_sts_success) THEN

724: X_MSG_COUNT => x_msg_count,
725: X_MSG_DATA => x_msg_data
726: );
727:
728: IF NOT (x_return_status = fnd_api.g_ret_sts_success) THEN
729: x_return_status := fnd_api.g_ret_sts_unexp_error;
730: fnd_message.set_name('JTF', 'JTF_RS_ERR_PRE_INT_USR_HOOK');
731: fnd_msg_pub.add;
732: RAISE fnd_api.g_exc_unexpected_error;

Line 729: x_return_status := fnd_api.g_ret_sts_unexp_error;

725: X_MSG_DATA => x_msg_data
726: );
727:
728: IF NOT (x_return_status = fnd_api.g_ret_sts_success) THEN
729: x_return_status := fnd_api.g_ret_sts_unexp_error;
730: fnd_message.set_name('JTF', 'JTF_RS_ERR_PRE_INT_USR_HOOK');
731: fnd_msg_pub.add;
732: RAISE fnd_api.g_exc_unexpected_error;
733: END IF;

Line 732: RAISE fnd_api.g_exc_unexpected_error;

728: IF NOT (x_return_status = fnd_api.g_ret_sts_success) THEN
729: x_return_status := fnd_api.g_ret_sts_unexp_error;
730: fnd_message.set_name('JTF', 'JTF_RS_ERR_PRE_INT_USR_HOOK');
731: fnd_msg_pub.add;
732: RAISE fnd_api.g_exc_unexpected_error;
733: END IF;
734: END IF;
735:
736:

Line 746: x_return_status := fnd_api.g_ret_sts_unexp_error;

742: CLOSE c_salesrep_territory_id;
743: fnd_message.set_name('JTF', 'JTF_RS_INVALID_SRP_TERR_ID');
744: fnd_message.set_token('P_SALESREP_TERRITORY_ID', l_salesrep_territory_id);
745: fnd_msg_pub.add;
746: x_return_status := fnd_api.g_ret_sts_unexp_error;
747: RAISE fnd_api.g_exc_unexpected_error;
748: END IF;
749:
750: --Validate Salerep Territory for Update

Line 747: RAISE fnd_api.g_exc_unexpected_error;

743: fnd_message.set_name('JTF', 'JTF_RS_INVALID_SRP_TERR_ID');
744: fnd_message.set_token('P_SALESREP_TERRITORY_ID', l_salesrep_territory_id);
745: fnd_msg_pub.add;
746: x_return_status := fnd_api.g_ret_sts_unexp_error;
747: RAISE fnd_api.g_exc_unexpected_error;
748: END IF;
749:
750: --Validate Salerep Territory for Update
751: OPEN c_salesrep_territory_update(l_salesrep_territory_id);

Line 758: x_return_status := fnd_api.g_ret_sts_unexp_error;

754: CLOSE c_salesrep_territory_update;
755: fnd_message.set_name('JTF', 'JTF_RS_INVALID_SRP_TERR_ID');
756: fnd_message.set_token('P_SALESREP_TERRITORY_ID', l_salesrep_territory_id);
757: fnd_msg_pub.add;
758: x_return_status := fnd_api.g_ret_sts_unexp_error;
759: RAISE fnd_api.g_exc_unexpected_error;
760: END IF;
761:
762: --Date Validations

Line 759: RAISE fnd_api.g_exc_unexpected_error;

755: fnd_message.set_name('JTF', 'JTF_RS_INVALID_SRP_TERR_ID');
756: fnd_message.set_token('P_SALESREP_TERRITORY_ID', l_salesrep_territory_id);
757: fnd_msg_pub.add;
758: x_return_status := fnd_api.g_ret_sts_unexp_error;
759: RAISE fnd_api.g_exc_unexpected_error;
760: END IF;
761:
762: --Date Validations
763: IF (p_start_date_active <>FND_API.G_MISS_DATE OR p_end_date_active <> FND_API.G_MISS_DATE) THEN

Line 763: IF (p_start_date_active <>FND_API.G_MISS_DATE OR p_end_date_active <> FND_API.G_MISS_DATE) THEN

759: RAISE fnd_api.g_exc_unexpected_error;
760: END IF;
761:
762: --Date Validations
763: IF (p_start_date_active <>FND_API.G_MISS_DATE OR p_end_date_active <> FND_API.G_MISS_DATE) THEN
764: JTF_RESOURCE_UTL.VALIDATE_INPUT_DATES(
765: p_start_date_active => l_start_date_active,
766: p_end_date_active => l_end_date_active,
767: x_return_status => x_return_status

Line 769: IF NOT (x_return_status = fnd_api.g_ret_sts_success) THEN

765: p_start_date_active => l_start_date_active,
766: p_end_date_active => l_end_date_active,
767: x_return_status => x_return_status
768: );
769: IF NOT (x_return_status = fnd_api.g_ret_sts_success) THEN
770: x_return_status := fnd_api.g_ret_sts_unexp_error;
771: RAISE fnd_api.g_exc_unexpected_error;
772: END IF;
773: END IF;

Line 770: x_return_status := fnd_api.g_ret_sts_unexp_error;

766: p_end_date_active => l_end_date_active,
767: x_return_status => x_return_status
768: );
769: IF NOT (x_return_status = fnd_api.g_ret_sts_success) THEN
770: x_return_status := fnd_api.g_ret_sts_unexp_error;
771: RAISE fnd_api.g_exc_unexpected_error;
772: END IF;
773: END IF;
774: --End of Date Validations

Line 771: RAISE fnd_api.g_exc_unexpected_error;

767: x_return_status => x_return_status
768: );
769: IF NOT (x_return_status = fnd_api.g_ret_sts_success) THEN
770: x_return_status := fnd_api.g_ret_sts_unexp_error;
771: RAISE fnd_api.g_exc_unexpected_error;
772: END IF;
773: END IF;
774: --End of Date Validations
775:

Line 781: x_return_status := fnd_api.g_ret_sts_unexp_error;

777: OPEN c_salesrep_details(l_salesrep_territory_id);
778: FETCH c_salesrep_details INTO l_salesrep_start_date, l_salesrep_end_date;
779: IF c_salesrep_details%NOTFOUND THEN
780: --dbms_output.put_line('Salesrep information not found for the given Salesrep Territory Id');
781: x_return_status := fnd_api.g_ret_sts_unexp_error;
782: fnd_message.set_name('JTF', 'JTF_RS_INVALID_SRP_TERR_ID');
783: fnd_message.set_token('P_SALESREP_TERRITORY_ID', l_salesrep_territory_id);
784: fnd_msg_pub.add;
785: CLOSE c_salesrep_details;

Line 786: RAISE fnd_api.g_exc_unexpected_error;

782: fnd_message.set_name('JTF', 'JTF_RS_INVALID_SRP_TERR_ID');
783: fnd_message.set_token('P_SALESREP_TERRITORY_ID', l_salesrep_territory_id);
784: fnd_msg_pub.add;
785: CLOSE c_salesrep_details;
786: RAISE fnd_api.g_exc_unexpected_error;
787: END IF;
788:
789: --Validate that the Salesrep start date is less than the passed start date active
790: IF p_start_date_active <>FND_API.G_MISS_DATE THEN

Line 790: IF p_start_date_active <>FND_API.G_MISS_DATE THEN

786: RAISE fnd_api.g_exc_unexpected_error;
787: END IF;
788:
789: --Validate that the Salesrep start date is less than the passed start date active
790: IF p_start_date_active <>FND_API.G_MISS_DATE THEN
791: IF l_start_date_active < l_salesrep_start_date THEN
792: --dbms_output.put_line('Start date active cannot be less than Salesrep Start Date');
793: x_return_status := fnd_api.g_ret_sts_error;
794: fnd_message.set_name('JTF', 'JTF_RS_SRP_INVALID_START_DATE');

Line 793: x_return_status := fnd_api.g_ret_sts_error;

789: --Validate that the Salesrep start date is less than the passed start date active
790: IF p_start_date_active <>FND_API.G_MISS_DATE THEN
791: IF l_start_date_active < l_salesrep_start_date THEN
792: --dbms_output.put_line('Start date active cannot be less than Salesrep Start Date');
793: x_return_status := fnd_api.g_ret_sts_error;
794: fnd_message.set_name('JTF', 'JTF_RS_SRP_INVALID_START_DATE');
795: fnd_message.set_token('P_SALESREP_START_DATE', l_salesrep_start_date);
796: fnd_msg_pub.add;
797: RAISE fnd_api.g_exc_unexpected_error;

Line 797: RAISE fnd_api.g_exc_unexpected_error;

793: x_return_status := fnd_api.g_ret_sts_error;
794: fnd_message.set_name('JTF', 'JTF_RS_SRP_INVALID_START_DATE');
795: fnd_message.set_token('P_SALESREP_START_DATE', l_salesrep_start_date);
796: fnd_msg_pub.add;
797: RAISE fnd_api.g_exc_unexpected_error;
798: END IF;
799: END IF;
800:
801: --Validate that the passed end date is not Null and less than Salesrep End Date

Line 802: IF p_end_date_active <>FND_API.G_MISS_DATE THEN

798: END IF;
799: END IF;
800:
801: --Validate that the passed end date is not Null and less than Salesrep End Date
802: IF p_end_date_active <>FND_API.G_MISS_DATE THEN
803: IF l_salesrep_end_date is NOT NULL THEN
804: IF l_end_date_active is NULL THEN
805: --dbms_output.put_line ('End date active cannot be Null as Salesrep has an End date');
806: x_return_status := fnd_api.g_ret_sts_error;

Line 806: x_return_status := fnd_api.g_ret_sts_error;

802: IF p_end_date_active <>FND_API.G_MISS_DATE THEN
803: IF l_salesrep_end_date is NOT NULL THEN
804: IF l_end_date_active is NULL THEN
805: --dbms_output.put_line ('End date active cannot be Null as Salesrep has an End date');
806: x_return_status := fnd_api.g_ret_sts_error;
807: fnd_message.set_name('JTF', 'JTF_RS_SRP_END_DATE_NULL');
808: fnd_message.set_token('P_SALESREP_END_DATE', l_salesrep_end_date);
809: fnd_msg_pub.add;
810: RAISE fnd_api.g_exc_unexpected_error;

Line 810: RAISE fnd_api.g_exc_unexpected_error;

806: x_return_status := fnd_api.g_ret_sts_error;
807: fnd_message.set_name('JTF', 'JTF_RS_SRP_END_DATE_NULL');
808: fnd_message.set_token('P_SALESREP_END_DATE', l_salesrep_end_date);
809: fnd_msg_pub.add;
810: RAISE fnd_api.g_exc_unexpected_error;
811: ELSIF l_end_date_active > l_salesrep_end_date THEN
812: --dbms_output.put_line('End date active cannot be greater than Salesrep End Date');
813: x_return_status := fnd_api.g_ret_sts_error;
814: fnd_message.set_name('JTF', 'JTF_RS_SRP_INVALID_END_DATE');

Line 813: x_return_status := fnd_api.g_ret_sts_error;

809: fnd_msg_pub.add;
810: RAISE fnd_api.g_exc_unexpected_error;
811: ELSIF l_end_date_active > l_salesrep_end_date THEN
812: --dbms_output.put_line('End date active cannot be greater than Salesrep End Date');
813: x_return_status := fnd_api.g_ret_sts_error;
814: fnd_message.set_name('JTF', 'JTF_RS_SRP_INVALID_END_DATE');
815: fnd_message.set_token('P_SALESREP_END_DATE', l_salesrep_end_date);
816: fnd_msg_pub.add;
817: RAISE fnd_api.g_exc_unexpected_error;

Line 817: RAISE fnd_api.g_exc_unexpected_error;

813: x_return_status := fnd_api.g_ret_sts_error;
814: fnd_message.set_name('JTF', 'JTF_RS_SRP_INVALID_END_DATE');
815: fnd_message.set_token('P_SALESREP_END_DATE', l_salesrep_end_date);
816: fnd_msg_pub.add;
817: RAISE fnd_api.g_exc_unexpected_error;
818: END IF;
819: END IF;
820: END IF;
821:

Line 827: x_return_status := fnd_api.g_ret_sts_unexp_error;

823: OPEN c_territory_details(l_salesrep_territory_id);
824: FETCH c_territory_details INTO l_territory_start_date, l_territory_end_date;
825: IF c_territory_details%NOTFOUND THEN
826: --dbms_output.put_line('Territory information not found');
827: x_return_status := fnd_api.g_ret_sts_unexp_error;
828: fnd_message.set_name('JTF', 'JTF_RS_INVALID_SRP_TERR_ID');
829: fnd_message.set_token('P_SALESREP_TERRITORY_ID', l_salesrep_territory_id);
830: fnd_msg_pub.add;
831: CLOSE c_territory_details;

Line 832: RAISE fnd_api.g_exc_unexpected_error;

828: fnd_message.set_name('JTF', 'JTF_RS_INVALID_SRP_TERR_ID');
829: fnd_message.set_token('P_SALESREP_TERRITORY_ID', l_salesrep_territory_id);
830: fnd_msg_pub.add;
831: CLOSE c_territory_details;
832: RAISE fnd_api.g_exc_unexpected_error;
833: END IF;
834:
835: --Validate that the Territory start date is less than the passed start date active
836: IF p_start_date_active <>FND_API.G_MISS_DATE THEN

Line 836: IF p_start_date_active <>FND_API.G_MISS_DATE THEN

832: RAISE fnd_api.g_exc_unexpected_error;
833: END IF;
834:
835: --Validate that the Territory start date is less than the passed start date active
836: IF p_start_date_active <>FND_API.G_MISS_DATE THEN
837: IF l_start_date_active < l_territory_start_date THEN
838: --dbms_output.put_line('Start date active cannot be less than Territory Start Date');
839: x_return_status := fnd_api.g_ret_sts_error;
840: fnd_message.set_name('JTF', 'JTF_RS_SRP_INVALID_START_DATE');

Line 839: x_return_status := fnd_api.g_ret_sts_error;

835: --Validate that the Territory start date is less than the passed start date active
836: IF p_start_date_active <>FND_API.G_MISS_DATE THEN
837: IF l_start_date_active < l_territory_start_date THEN
838: --dbms_output.put_line('Start date active cannot be less than Territory Start Date');
839: x_return_status := fnd_api.g_ret_sts_error;
840: fnd_message.set_name('JTF', 'JTF_RS_SRP_INVALID_START_DATE');
841: fnd_message.set_token('P_TERRITORY_START_DATE', l_territory_start_date);
842: fnd_msg_pub.add;
843: RAISE fnd_api.g_exc_unexpected_error;

Line 843: RAISE fnd_api.g_exc_unexpected_error;

839: x_return_status := fnd_api.g_ret_sts_error;
840: fnd_message.set_name('JTF', 'JTF_RS_SRP_INVALID_START_DATE');
841: fnd_message.set_token('P_TERRITORY_START_DATE', l_territory_start_date);
842: fnd_msg_pub.add;
843: RAISE fnd_api.g_exc_unexpected_error;
844: END IF;
845: END IF;
846:
847: --Validate that the passed end date is not Null and less than Territory End Date

Line 848: IF p_start_date_active <>FND_API.G_MISS_DATE THEN

844: END IF;
845: END IF;
846:
847: --Validate that the passed end date is not Null and less than Territory End Date
848: IF p_start_date_active <>FND_API.G_MISS_DATE THEN
849: IF l_territory_end_date is NOT NULL THEN
850: IF l_end_date_active is NULL THEN
851: --dbms_output.put_line ('End date active cannot be Null as Territory has an End date');
852: x_return_status := fnd_api.g_ret_sts_error;

Line 852: x_return_status := fnd_api.g_ret_sts_error;

848: IF p_start_date_active <>FND_API.G_MISS_DATE THEN
849: IF l_territory_end_date is NOT NULL THEN
850: IF l_end_date_active is NULL THEN
851: --dbms_output.put_line ('End date active cannot be Null as Territory has an End date');
852: x_return_status := fnd_api.g_ret_sts_error;
853: fnd_message.set_name('JTF', 'JTF_RS_SRP_END_DATE_NULL');
854: fnd_message.set_token('P_TERRITORY_END_DATE', l_territory_end_date);
855: fnd_msg_pub.add;
856: RAISE fnd_api.g_exc_unexpected_error;

Line 856: RAISE fnd_api.g_exc_unexpected_error;

852: x_return_status := fnd_api.g_ret_sts_error;
853: fnd_message.set_name('JTF', 'JTF_RS_SRP_END_DATE_NULL');
854: fnd_message.set_token('P_TERRITORY_END_DATE', l_territory_end_date);
855: fnd_msg_pub.add;
856: RAISE fnd_api.g_exc_unexpected_error;
857: ELSIF p_end_date_active > l_territory_end_date THEN
858: --dbms_output.put_line('End date active cannot be greater than Territory End Date');
859: x_return_status := fnd_api.g_ret_sts_error;
860: fnd_message.set_name('JTF', 'JTF_RS_SRP_INVALID_END_DATE');

Line 859: x_return_status := fnd_api.g_ret_sts_error;

855: fnd_msg_pub.add;
856: RAISE fnd_api.g_exc_unexpected_error;
857: ELSIF p_end_date_active > l_territory_end_date THEN
858: --dbms_output.put_line('End date active cannot be greater than Territory End Date');
859: x_return_status := fnd_api.g_ret_sts_error;
860: fnd_message.set_name('JTF', 'JTF_RS_SRP_INVALID_END_DATE');
861: fnd_message.set_token('P_TERRITORY_END_DATE', l_territory_end_date);
862: fnd_msg_pub.add;
863: RAISE fnd_api.g_exc_unexpected_error;

Line 863: RAISE fnd_api.g_exc_unexpected_error;

859: x_return_status := fnd_api.g_ret_sts_error;
860: fnd_message.set_name('JTF', 'JTF_RS_SRP_INVALID_END_DATE');
861: fnd_message.set_token('P_TERRITORY_END_DATE', l_territory_end_date);
862: fnd_msg_pub.add;
863: RAISE fnd_api.g_exc_unexpected_error;
864: END IF;
865: END IF;
866: END IF;
867:

Line 916: x_return_status := fnd_api.g_ret_sts_unexp_error;

912: EXCEPTION
913: WHEN NO_DATA_FOUND THEN
914: --dbms_output.put_line('Error in Table Handler');
915: CLOSE c_salesrep_territory_update;
916: x_return_status := fnd_api.g_ret_sts_unexp_error;
917: fnd_message.set_name('JTF', 'JTF_RS_TABLE_HANDLER_ERROR');
918: fnd_msg_pub.add;
919: RAISE fnd_api.g_exc_unexpected_error;
920: END;

Line 919: RAISE fnd_api.g_exc_unexpected_error;

915: CLOSE c_salesrep_territory_update;
916: x_return_status := fnd_api.g_ret_sts_unexp_error;
917: fnd_message.set_name('JTF', 'JTF_RS_TABLE_HANDLER_ERROR');
918: fnd_msg_pub.add;
919: RAISE fnd_api.g_exc_unexpected_error;
920: END;
921: --dbms_output.put_line('Salesrep Territory Successfully Updated');
922:
923: --Close the cursors

Line 950: IF NOT (x_return_status = fnd_api.g_ret_sts_success) THEN

946: X_MSG_COUNT => x_msg_count,
947: X_MSG_DATA => x_msg_data
948: );
949:
950: IF NOT (x_return_status = fnd_api.g_ret_sts_success) THEN
951: x_return_status := fnd_api.g_ret_sts_unexp_error;
952: fnd_message.set_name('JTF', 'JTF_RS_ERR_POST_CUST_USR_HOOK');
953: fnd_msg_pub.add;
954: RAISE fnd_api.g_exc_unexpected_error;

Line 951: x_return_status := fnd_api.g_ret_sts_unexp_error;

947: X_MSG_DATA => x_msg_data
948: );
949:
950: IF NOT (x_return_status = fnd_api.g_ret_sts_success) THEN
951: x_return_status := fnd_api.g_ret_sts_unexp_error;
952: fnd_message.set_name('JTF', 'JTF_RS_ERR_POST_CUST_USR_HOOK');
953: fnd_msg_pub.add;
954: RAISE fnd_api.g_exc_unexpected_error;
955: END IF;

Line 954: RAISE fnd_api.g_exc_unexpected_error;

950: IF NOT (x_return_status = fnd_api.g_ret_sts_success) THEN
951: x_return_status := fnd_api.g_ret_sts_unexp_error;
952: fnd_message.set_name('JTF', 'JTF_RS_ERR_POST_CUST_USR_HOOK');
953: fnd_msg_pub.add;
954: RAISE fnd_api.g_exc_unexpected_error;
955: END IF;
956: END IF;
957:
958: --Post Call to the Vertical Type User Hook

Line 977: IF NOT (x_return_status = fnd_api.g_ret_sts_success) THEN

973: X_MSG_COUNT => x_msg_count,
974: X_MSG_DATA => x_msg_data
975: );
976:
977: IF NOT (x_return_status = fnd_api.g_ret_sts_success) THEN
978: x_return_status := fnd_api.g_ret_sts_unexp_error;
979: fnd_message.set_name('JTF', 'JTF_RS_ERR_POST_VERT_USR_HOOK');
980: fnd_msg_pub.add;
981: RAISE fnd_api.g_exc_unexpected_error;

Line 978: x_return_status := fnd_api.g_ret_sts_unexp_error;

974: X_MSG_DATA => x_msg_data
975: );
976:
977: IF NOT (x_return_status = fnd_api.g_ret_sts_success) THEN
978: x_return_status := fnd_api.g_ret_sts_unexp_error;
979: fnd_message.set_name('JTF', 'JTF_RS_ERR_POST_VERT_USR_HOOK');
980: fnd_msg_pub.add;
981: RAISE fnd_api.g_exc_unexpected_error;
982: END IF;

Line 981: RAISE fnd_api.g_exc_unexpected_error;

977: IF NOT (x_return_status = fnd_api.g_ret_sts_success) THEN
978: x_return_status := fnd_api.g_ret_sts_unexp_error;
979: fnd_message.set_name('JTF', 'JTF_RS_ERR_POST_VERT_USR_HOOK');
980: fnd_msg_pub.add;
981: RAISE fnd_api.g_exc_unexpected_error;
982: END IF;
983: END IF;
984:
985: --Post Call to the Internal Type User Hook

Line 1004: IF NOT (x_return_status = fnd_api.g_ret_sts_success) THEN

1000: X_MSG_COUNT => x_msg_count,
1001: X_MSG_DATA => x_msg_data
1002: );
1003:
1004: IF NOT (x_return_status = fnd_api.g_ret_sts_success) THEN
1005: x_return_status := fnd_api.g_ret_sts_unexp_error;
1006: fnd_message.set_name('JTF', 'JTF_RS_ERR_POST_INT_USR_HOOK');
1007: fnd_msg_pub.add;
1008: RAISE fnd_api.g_exc_unexpected_error;

Line 1005: x_return_status := fnd_api.g_ret_sts_unexp_error;

1001: X_MSG_DATA => x_msg_data
1002: );
1003:
1004: IF NOT (x_return_status = fnd_api.g_ret_sts_success) THEN
1005: x_return_status := fnd_api.g_ret_sts_unexp_error;
1006: fnd_message.set_name('JTF', 'JTF_RS_ERR_POST_INT_USR_HOOK');
1007: fnd_msg_pub.add;
1008: RAISE fnd_api.g_exc_unexpected_error;
1009: END IF;

Line 1008: RAISE fnd_api.g_exc_unexpected_error;

1004: IF NOT (x_return_status = fnd_api.g_ret_sts_success) THEN
1005: x_return_status := fnd_api.g_ret_sts_unexp_error;
1006: fnd_message.set_name('JTF', 'JTF_RS_ERR_POST_INT_USR_HOOK');
1007: fnd_msg_pub.add;
1008: RAISE fnd_api.g_exc_unexpected_error;
1009: END IF;
1010: END IF;
1011:
1012: /* Standard call for Message Generation */

Line 1038: IF NOT (x_return_status = fnd_api.g_ret_sts_success) THEN

1034: p_action_code => 'U',
1035: p_bind_data_id => l_bind_data_id,
1036: x_return_code => x_return_status);
1037:
1038: IF NOT (x_return_status = fnd_api.g_ret_sts_success) THEN
1039: --dbms_output.put_line('Returned Error status from the Message Generation API');
1040: x_return_status := fnd_api.g_ret_sts_unexp_error;
1041: fnd_message.set_name('JTF', 'JTF_RS_ERR_MESG_GENERATE_API');
1042: fnd_msg_pub.add;

Line 1040: x_return_status := fnd_api.g_ret_sts_unexp_error;

1036: x_return_code => x_return_status);
1037:
1038: IF NOT (x_return_status = fnd_api.g_ret_sts_success) THEN
1039: --dbms_output.put_line('Returned Error status from the Message Generation API');
1040: x_return_status := fnd_api.g_ret_sts_unexp_error;
1041: fnd_message.set_name('JTF', 'JTF_RS_ERR_MESG_GENERATE_API');
1042: fnd_msg_pub.add;
1043: RAISE fnd_api.g_exc_unexpected_error;
1044: END IF;

Line 1043: RAISE fnd_api.g_exc_unexpected_error;

1039: --dbms_output.put_line('Returned Error status from the Message Generation API');
1040: x_return_status := fnd_api.g_ret_sts_unexp_error;
1041: fnd_message.set_name('JTF', 'JTF_RS_ERR_MESG_GENERATE_API');
1042: fnd_msg_pub.add;
1043: RAISE fnd_api.g_exc_unexpected_error;
1044: END IF;
1045: END IF;
1046: END IF;
1047:

Line 1049: IF fnd_api.to_boolean(p_commit) THEN

1045: END IF;
1046: END IF;
1047:
1048:
1049: IF fnd_api.to_boolean(p_commit) THEN
1050: COMMIT WORK;
1051: END IF;
1052: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
1053:

Line 1055: WHEN fnd_api.g_exc_unexpected_error THEN

1051: END IF;
1052: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
1053:
1054: EXCEPTION
1055: WHEN fnd_api.g_exc_unexpected_error THEN
1056: --DBMS_OUTPUT.put_line (' ========================================== ');
1057: --DBMS_OUTPUT.put_line ('=========== Raised Unexpected Error =============== ');
1058: ROLLBACK TO update_rs_srp_territories_pvt;
1059: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 1059: x_return_status := fnd_api.g_ret_sts_unexp_error;

1055: WHEN fnd_api.g_exc_unexpected_error THEN
1056: --DBMS_OUTPUT.put_line (' ========================================== ');
1057: --DBMS_OUTPUT.put_line ('=========== Raised Unexpected Error =============== ');
1058: ROLLBACK TO update_rs_srp_territories_pvt;
1059: x_return_status := fnd_api.g_ret_sts_unexp_error;
1060: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
1061: WHEN OTHERS THEN
1062: --DBMS_OUTPUT.put_line (' ========================================== ');
1063: --DBMS_OUTPUT.put_line (' =========== Raised Others in Update Salesrep Territories Pvt ============= ');

Line 1066: x_return_status := fnd_api.g_ret_sts_unexp_error;

1062: --DBMS_OUTPUT.put_line (' ========================================== ');
1063: --DBMS_OUTPUT.put_line (' =========== Raised Others in Update Salesrep Territories Pvt ============= ');
1064: --DBMS_OUTPUT.put_line (SQLCODE || SQLERRM);
1065: ROLLBACK TO update_rs_srp_territories_pvt;
1066: x_return_status := fnd_api.g_ret_sts_unexp_error;
1067: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
1068:
1069: END update_rs_srp_territories;
1070: