17: -- no error is raised
18: ---------------------------------------------------------------------
19: PROCEDURE add_tpl_ctg_rec(
20: p_api_version IN NUMBER,
21: p_init_msg_list IN VARCHAR2 := FND_API.g_false,
22: p_commit IN VARCHAR2 := FND_API.g_false,
23: x_return_status OUT VARCHAR2,
24: p_template_id IN NUMBER,
25: p_category_id IN NUMBER
18: ---------------------------------------------------------------------
19: PROCEDURE add_tpl_ctg_rec(
20: p_api_version IN NUMBER,
21: p_init_msg_list IN VARCHAR2 := FND_API.g_false,
22: p_commit IN VARCHAR2 := FND_API.g_false,
23: x_return_status OUT VARCHAR2,
24: p_template_id IN NUMBER,
25: p_category_id IN NUMBER
26: )
38: SAVEPOINT add_tpl_ctg_rec;
39:
40: ---dbms_output.put_line('PASSED TO ADD_TPL_CTG_REC' || p_template_id || '---' || p_category_id);
41:
42: IF NOT FND_API.compatible_api_call(
43: g_api_version,
44: p_api_version,
45: l_api_name,
46: g_pkg_name
44: p_api_version,
45: l_api_name,
46: g_pkg_name
47: ) THEN
48: RAISE FND_API.g_exc_unexpected_error;
49: END IF;
50:
51: IF FND_API.to_boolean(p_init_msg_list) THEN
52: FND_MSG_PUB.initialize;
47: ) THEN
48: RAISE FND_API.g_exc_unexpected_error;
49: END IF;
50:
51: IF FND_API.to_boolean(p_init_msg_list) THEN
52: FND_MSG_PUB.initialize;
53: END IF;
54:
55: x_return_status := FND_API.g_ret_sts_success;
51: IF FND_API.to_boolean(p_init_msg_list) THEN
52: FND_MSG_PUB.initialize;
53: END IF;
54:
55: x_return_status := FND_API.g_ret_sts_success;
56:
57: ---dbms_output.put_line('passed api version check in add_tpl_ctg_rec');
58:
59:
57: ---dbms_output.put_line('passed api version check in add_tpl_ctg_rec');
58:
59:
60: --- Check if the deliverable id exists .
61: IF p_template_id <> FND_API.g_miss_num and p_template_id is not null
62: then
63: IF jtf_dspmgrvalidation_grp.check_deliverable_type_exists(p_template_id,l_type ,l_applicable_to)
64: then
65: ---dbms_output.put_line('passed template check in add_tpl_ctg_rec' || p_template_id );
63: IF jtf_dspmgrvalidation_grp.check_deliverable_type_exists(p_template_id,l_type ,l_applicable_to)
64: then
65: ---dbms_output.put_line('passed template check in add_tpl_ctg_rec' || p_template_id );
66:
67: IF p_category_id <> FND_API.g_miss_num and p_category_id is not null
68: THEN
69: if jtf_dspmgrvalidation_grp.check_category_exists(p_category_id)
70: then
71: ---dbms_output.put_line('passed category check in add_tpl_ctg_rec' || p_category_id );
102: ---dbms_output.put_line('insert record ' || p_template_id || '0-0'|| p_category_id);
103:
104: end if; /* category - template relation not exists check */
105: else
106: raise FND_API.g_exc_error;
107: end if; /* category exists check */
108: else
109: raise jtf_dspmgrvalidation_grp.category_req_exception;
110: end if; /* category id is not null check */
108: else
109: raise jtf_dspmgrvalidation_grp.category_req_exception;
110: end if; /* category id is not null check */
111: else
112: raise FND_API.g_exc_error;
113: END IF;/* deliverable exists check */
114: else
115: raise jtf_dspmgrvalidation_grp.template_req_exception;
116: end if; /*deliverable id is not null check */
117:
118:
119: --- Check if the caller requested to commit ,
120: --- If p_commit set to true, commit the transaction
121: IF FND_API.to_boolean(p_commit) THEN
122: COMMIT;
123: END IF;
124:
125: x_return_status := FND_API.g_ret_sts_success;
121: IF FND_API.to_boolean(p_commit) THEN
122: COMMIT;
123: END IF;
124:
125: x_return_status := FND_API.g_ret_sts_success;
126:
127:
128: EXCEPTION
129:
126:
127:
128: EXCEPTION
129:
130: WHEN FND_API.g_exc_error THEN
131: ROLLBACK TO add_tpl_ctg_rec;
132: x_return_status := FND_API.g_ret_sts_error;
133:
134:
128: EXCEPTION
129:
130: WHEN FND_API.g_exc_error THEN
131: ROLLBACK TO add_tpl_ctg_rec;
132: x_return_status := FND_API.g_ret_sts_error;
133:
134:
135: WHEN FND_API.g_exc_unexpected_error THEN
136: ROLLBACK TO add_tpl_ctg_rec;
131: ROLLBACK TO add_tpl_ctg_rec;
132: x_return_status := FND_API.g_ret_sts_error;
133:
134:
135: WHEN FND_API.g_exc_unexpected_error THEN
136: ROLLBACK TO add_tpl_ctg_rec;
137: x_return_status := FND_API.g_ret_sts_unexp_error ;
138:
139: WHEN jtf_dspmgrvalidation_grp.category_req_exception THEN
133:
134:
135: WHEN FND_API.g_exc_unexpected_error THEN
136: ROLLBACK TO add_tpl_ctg_rec;
137: x_return_status := FND_API.g_ret_sts_unexp_error ;
138:
139: WHEN jtf_dspmgrvalidation_grp.category_req_exception THEN
140: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error)
141: THEN
138:
139: WHEN jtf_dspmgrvalidation_grp.category_req_exception THEN
140: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error)
141: THEN
142: x_return_status := FND_API.g_ret_sts_error;
143: FND_MESSAGE.set_name('JTF','JTF_DSP_CATEGORY_REQ');
144: FND_MSG_PUB.add;
145: END IF;
146:
146:
147: WHEN jtf_dspmgrvalidation_grp.template_req_exception THEN
148: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error)
149: THEN
150: x_return_status := FND_API.g_ret_sts_error;
151: FND_MESSAGE.set_name('JTF','JTF_DSP_TEMPLATE_REQ');
152: FND_MSG_PUB.add;
153: END IF;
154:
153: END IF;
154:
155: WHEN OTHERS THEN
156: ROLLBACK TO add_tpl_ctg_rec;
157: x_return_status := FND_API.g_ret_sts_unexp_error ;
158:
159: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_unexp_error)
160: THEN
161: FND_MSG_PUB.add_exc_msg(g_pkg_name, l_api_name);
172: --
173: ---------------------------------------------------------------------
174: PROCEDURE add_tpl_ctg(
175: p_api_version IN NUMBER,
176: p_init_msg_list IN VARCHAR2 := FND_API.g_false,
177: p_commit IN VARCHAR2 := FND_API.g_false,
178: x_return_status OUT VARCHAR2,
179: x_msg_count OUT NUMBER,
180: x_msg_data OUT VARCHAR2,
173: ---------------------------------------------------------------------
174: PROCEDURE add_tpl_ctg(
175: p_api_version IN NUMBER,
176: p_init_msg_list IN VARCHAR2 := FND_API.g_false,
177: p_commit IN VARCHAR2 := FND_API.g_false,
178: x_return_status OUT VARCHAR2,
179: x_msg_count OUT NUMBER,
180: x_msg_data OUT VARCHAR2,
181: p_template_id IN NUMBER,
197: BEGIN
198:
199: --------------------- initialize -----------------------
200: SAVEPOINT add_tpl_ctg;
201: IF NOT FND_API.compatible_api_call(
202: g_api_version,
203: p_api_version,
204: l_api_name,
205: g_pkg_name
203: p_api_version,
204: l_api_name,
205: g_pkg_name
206: ) THEN
207: RAISE FND_API.g_exc_unexpected_error;
208: END IF;
209:
210:
211: IF FND_API.to_boolean(p_init_msg_list) THEN
207: RAISE FND_API.g_exc_unexpected_error;
208: END IF;
209:
210:
211: IF FND_API.to_boolean(p_init_msg_list) THEN
212: FND_MSG_PUB.initialize;
213: END IF;
214:
215: x_return_status := FND_API.G_RET_STS_SUCCESS;
211: IF FND_API.to_boolean(p_init_msg_list) THEN
212: FND_MSG_PUB.initialize;
213: END IF;
214:
215: x_return_status := FND_API.G_RET_STS_SUCCESS;
216:
217: IF p_template_id is not null and p_template_id <> FND_API.g_miss_num
218: then
219: IF jtf_dspmgrvalidation_grp.check_deliverable_type_exists(p_template_id ,l_type,l_applicable_to) = false then
213: END IF;
214:
215: x_return_status := FND_API.G_RET_STS_SUCCESS;
216:
217: IF p_template_id is not null and p_template_id <> FND_API.g_miss_num
218: then
219: IF jtf_dspmgrvalidation_grp.check_deliverable_type_exists(p_template_id ,l_type,l_applicable_to) = false then
220: raise FND_API.g_exc_error;
221: END IF;/* deliverable exists check */
216:
217: IF p_template_id is not null and p_template_id <> FND_API.g_miss_num
218: then
219: IF jtf_dspmgrvalidation_grp.check_deliverable_type_exists(p_template_id ,l_type,l_applicable_to) = false then
220: raise FND_API.g_exc_error;
221: END IF;/* deliverable exists check */
222: else
223: raise jtf_dspmgrvalidation_grp.template_req_exception;
224: end if; /*deliverable id is not null check */
226:
227: FOR l_index IN 1..p_category_id_tbl.COUNT
228: LOOP
229: ---dbms_output.put_line('passed add_tpl_ctg_rec' || p_category_id_tbl(l_index) ||'---' || p_template_id );
230: add_tpl_ctg_rec(p_api_version,FND_API.g_false,FND_API.g_false,
231: l_return_status , p_template_id,
232: p_category_id_tbl(l_index));
233:
234: if l_return_status <> FND_API.g_ret_sts_success then
230: add_tpl_ctg_rec(p_api_version,FND_API.g_false,FND_API.g_false,
231: l_return_status , p_template_id,
232: p_category_id_tbl(l_index));
233:
234: if l_return_status <> FND_API.g_ret_sts_success then
235: ---dbms_output.put_line('add_TPL_CTG_REC returned error status **********************' ) ;
236: x_return_status := l_return_status;
237: end if;
238: END LOOP;
238: END LOOP;
239:
240: --- Check if the caller requested to commit ,
241: --- If p_commit set to true, commit the transaction
242: IF FND_API.to_boolean(p_commit) THEN
243: COMMIT;
244: END IF;
245:
246: FND_MSG_PUB.count_and_get(
243: COMMIT;
244: END IF;
245:
246: FND_MSG_PUB.count_and_get(
247: p_encoded => FND_API.g_false,
248: p_count => x_msg_count,
249: p_data => x_msg_data
250: );
251:
250: );
251:
252: EXCEPTION
253:
254: WHEN FND_API.g_exc_error THEN
255: ROLLBACK TO add_tpl_ctg;
256: x_return_status := FND_API.g_ret_sts_error;
257: FND_MSG_PUB.count_and_get(
258: p_encoded => FND_API.g_false,
252: EXCEPTION
253:
254: WHEN FND_API.g_exc_error THEN
255: ROLLBACK TO add_tpl_ctg;
256: x_return_status := FND_API.g_ret_sts_error;
257: FND_MSG_PUB.count_and_get(
258: p_encoded => FND_API.g_false,
259: p_count => x_msg_count,
260: p_data => x_msg_data
254: WHEN FND_API.g_exc_error THEN
255: ROLLBACK TO add_tpl_ctg;
256: x_return_status := FND_API.g_ret_sts_error;
257: FND_MSG_PUB.count_and_get(
258: p_encoded => FND_API.g_false,
259: p_count => x_msg_count,
260: p_data => x_msg_data
261: );
262:
260: p_data => x_msg_data
261: );
262:
263:
264: WHEN FND_API.g_exc_unexpected_error THEN
265: ROLLBACK TO add_tpl_ctg;
266: x_return_status := FND_API.g_ret_sts_unexp_error ;
267: FND_MSG_PUB.count_and_get(
268: p_encoded => FND_API.g_false,
262:
263:
264: WHEN FND_API.g_exc_unexpected_error THEN
265: ROLLBACK TO add_tpl_ctg;
266: x_return_status := FND_API.g_ret_sts_unexp_error ;
267: FND_MSG_PUB.count_and_get(
268: p_encoded => FND_API.g_false,
269: p_count => x_msg_count,
270: p_data => x_msg_data
264: WHEN FND_API.g_exc_unexpected_error THEN
265: ROLLBACK TO add_tpl_ctg;
266: x_return_status := FND_API.g_ret_sts_unexp_error ;
267: FND_MSG_PUB.count_and_get(
268: p_encoded => FND_API.g_false,
269: p_count => x_msg_count,
270: p_data => x_msg_data
271: );
272:
272:
273: WHEN jtf_dspmgrvalidation_grp.template_req_exception THEN
274: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error)
275: THEN
276: x_return_status := FND_API.g_ret_sts_error;
277: FND_MESSAGE.set_name('JTF','JTF_DSP_TEMPLATE_REQ');
278: FND_MSG_PUB.add;
279: END IF;
280: FND_MSG_PUB.count_and_get(
277: FND_MESSAGE.set_name('JTF','JTF_DSP_TEMPLATE_REQ');
278: FND_MSG_PUB.add;
279: END IF;
280: FND_MSG_PUB.count_and_get(
281: p_encoded => FND_API.g_false,
282: p_count => x_msg_count,
283: p_data => x_msg_data
284: );
285:
284: );
285:
286: WHEN OTHERS THEN
287: ROLLBACK TO add_tpl_ctg;
288: x_return_status := FND_API.g_ret_sts_unexp_error ;
289:
290: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_unexp_error)
291: THEN
292: FND_MSG_PUB.add_exc_msg(g_pkg_name, l_api_name);
292: FND_MSG_PUB.add_exc_msg(g_pkg_name, l_api_name);
293: END IF;
294:
295: FND_MSG_PUB.count_and_get(
296: p_encoded => FND_API.g_false,
297: p_count => x_msg_count,
298: p_data => x_msg_data
299: );
300:
309: -- for all display contexts
310: --------------------------------------------------------------------
311: PROCEDURE delete_tpl_ctg_relation(
312: p_api_version IN NUMBER,
313: p_init_msg_list IN VARCHAR2 := FND_API.g_false,
314: p_commit IN VARCHAR2 := FND_API.g_false,
315: x_return_status OUT VARCHAR2,
316: x_msg_count OUT NUMBER,
317: x_msg_data OUT VARCHAR2,
310: --------------------------------------------------------------------
311: PROCEDURE delete_tpl_ctg_relation(
312: p_api_version IN NUMBER,
313: p_init_msg_list IN VARCHAR2 := FND_API.g_false,
314: p_commit IN VARCHAR2 := FND_API.g_false,
315: x_return_status OUT VARCHAR2,
316: x_msg_count OUT NUMBER,
317: x_msg_data OUT VARCHAR2,
318: p_tpl_ctg_id_tbl IN tpl_ctg_id_TBL_TYPE
331: BEGIN
332:
333: --------------------- initialize -----------------------
334: SAVEPOINT delete_tpl_ctg_relation;
335: IF NOT FND_API.compatible_api_call(
336: g_api_version,
337: p_api_version,
338: l_api_name,
339: g_pkg_name
337: p_api_version,
338: l_api_name,
339: g_pkg_name
340: ) THEN
341: RAISE FND_API.g_exc_unexpected_error;
342: END IF;
343:
344:
345: IF FND_API.to_boolean(p_init_msg_list) THEN
341: RAISE FND_API.g_exc_unexpected_error;
342: END IF;
343:
344:
345: IF FND_API.to_boolean(p_init_msg_list) THEN
346: FND_MSG_PUB.initialize;
347: END IF;
348:
349: x_return_status := FND_API.G_RET_STS_SUCCESS;
345: IF FND_API.to_boolean(p_init_msg_list) THEN
346: FND_MSG_PUB.initialize;
347: END IF;
348:
349: x_return_status := FND_API.G_RET_STS_SUCCESS;
350:
351: FOR l_index IN 1..p_tpl_ctg_id_tbl.COUNT
352: LOOP
353: BEGIN
352: LOOP
353: BEGIN
354: SAVEPOINT delete_ctg_relation;
355: --- Check if the context_id exists
356: IF p_tpl_ctg_id_tbl(l_index) <> FND_API.g_miss_num and
357: p_tpl_ctg_id_tbl(l_index) is not null
358: THEN
359:
360: --- Delete all the entries matching category id and deliverable id
375:
376: EXCEPTION
377: WHEN OTHERS THEN
378: ROLLBACK TO delete_ctg_relation;
379: x_return_status := FND_API.g_ret_sts_error;
380: END;
381: END LOOP;
382:
383: --- Check if the caller requested to commit ,
381: END LOOP;
382:
383: --- Check if the caller requested to commit ,
384: --- If p_commit set to true, commit the transaction
385: IF FND_API.to_boolean(p_commit) THEN
386: COMMIT;
387: END IF;
388:
389: FND_MSG_PUB.count_and_get(
386: COMMIT;
387: END IF;
388:
389: FND_MSG_PUB.count_and_get(
390: p_encoded => FND_API.g_false,
391: p_count => x_msg_count,
392: p_data => x_msg_data
393: );
394:
393: );
394:
395: EXCEPTION
396:
397: WHEN FND_API.g_exc_error THEN
398: ROLLBACK TO delete_tpl_ctg_relation;
399: x_return_status := FND_API.g_ret_sts_error;
400: FND_MSG_PUB.count_and_get(
401: p_encoded => FND_API.g_false,
395: EXCEPTION
396:
397: WHEN FND_API.g_exc_error THEN
398: ROLLBACK TO delete_tpl_ctg_relation;
399: x_return_status := FND_API.g_ret_sts_error;
400: FND_MSG_PUB.count_and_get(
401: p_encoded => FND_API.g_false,
402: p_count => x_msg_count,
403: p_data => x_msg_data
397: WHEN FND_API.g_exc_error THEN
398: ROLLBACK TO delete_tpl_ctg_relation;
399: x_return_status := FND_API.g_ret_sts_error;
400: FND_MSG_PUB.count_and_get(
401: p_encoded => FND_API.g_false,
402: p_count => x_msg_count,
403: p_data => x_msg_data
404: );
405:
402: p_count => x_msg_count,
403: p_data => x_msg_data
404: );
405:
406: WHEN FND_API.g_exc_unexpected_error THEN
407: ROLLBACK TO delete_tpl_ctg_relation;
408: x_return_status := FND_API.g_ret_sts_unexp_error ;
409: FND_MSG_PUB.count_and_get(
410: p_encoded => FND_API.g_false,
404: );
405:
406: WHEN FND_API.g_exc_unexpected_error THEN
407: ROLLBACK TO delete_tpl_ctg_relation;
408: x_return_status := FND_API.g_ret_sts_unexp_error ;
409: FND_MSG_PUB.count_and_get(
410: p_encoded => FND_API.g_false,
411: p_count => x_msg_count,
412: p_data => x_msg_data
406: WHEN FND_API.g_exc_unexpected_error THEN
407: ROLLBACK TO delete_tpl_ctg_relation;
408: x_return_status := FND_API.g_ret_sts_unexp_error ;
409: FND_MSG_PUB.count_and_get(
410: p_encoded => FND_API.g_false,
411: p_count => x_msg_count,
412: p_data => x_msg_data
413: );
414:
414:
415:
416: WHEN OTHERS THEN
417: ROLLBACK TO delete_tpl_ctg_relation;
418: x_return_status := FND_API.g_ret_sts_unexp_error ;
419:
420: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_unexp_error)
421: THEN
422: FND_MSG_PUB.add_exc_msg(g_pkg_name, l_api_name);
422: FND_MSG_PUB.add_exc_msg(g_pkg_name, l_api_name);
423: END IF;
424:
425: FND_MSG_PUB.count_and_get(
426: p_encoded => FND_API.g_false,
427: p_count => x_msg_count,
428: p_data => x_msg_data
429: );
430:
440: -- 4. Creates a category to templates relationship (JTF_DSP_TPL_CTG)
441: ---------------------------------------------------------------------
442: PROCEDURE add_ctg_tpl(
443: p_api_version IN NUMBER,
444: p_init_msg_list IN VARCHAR2 := FND_API.g_false,
445: p_commit IN VARCHAR2 := FND_API.g_false,
446: x_return_status OUT VARCHAR2,
447: x_msg_count OUT NUMBER,
448: x_msg_data OUT VARCHAR2,
441: ---------------------------------------------------------------------
442: PROCEDURE add_ctg_tpl(
443: p_api_version IN NUMBER,
444: p_init_msg_list IN VARCHAR2 := FND_API.g_false,
445: p_commit IN VARCHAR2 := FND_API.g_false,
446: x_return_status OUT VARCHAR2,
447: x_msg_count OUT NUMBER,
448: x_msg_data OUT VARCHAR2,
449: p_category_id IN NUMBER,
463:
464: --------------------- initialize -----------------------
465: SAVEPOINT add_ctg_tpl;
466:
467: IF NOT FND_API.compatible_api_call(
468: g_api_version,
469: p_api_version,
470: l_api_name,
471: g_pkg_name
469: p_api_version,
470: l_api_name,
471: g_pkg_name
472: ) THEN
473: RAISE FND_API.g_exc_unexpected_error;
474: END IF;
475:
476:
477: IF FND_API.to_boolean(p_init_msg_list) THEN
473: RAISE FND_API.g_exc_unexpected_error;
474: END IF;
475:
476:
477: IF FND_API.to_boolean(p_init_msg_list) THEN
478: FND_MSG_PUB.initialize;
479: END IF;
480:
481:
478: FND_MSG_PUB.initialize;
479: END IF;
480:
481:
482: x_return_status := FND_API.g_ret_sts_success;
483:
484: IF p_category_id <> FND_API.g_miss_num or
485: p_category_id is not null
486: THEN
480:
481:
482: x_return_status := FND_API.g_ret_sts_success;
483:
484: IF p_category_id <> FND_API.g_miss_num or
485: p_category_id is not null
486: THEN
487: if jtf_dspmgrvalidation_grp.check_category_exists(p_category_id) = false then
488: ---dbms_output.put_line('passed category check in add_tpl_ctg_rec' || p_category_id );
485: p_category_id is not null
486: THEN
487: if jtf_dspmgrvalidation_grp.check_category_exists(p_category_id) = false then
488: ---dbms_output.put_line('passed category check in add_tpl_ctg_rec' || p_category_id );
489: raise FND_API.g_exc_error;
490: end if; /* category exists check */
491: else
492: raise jtf_dspmgrvalidation_grp.category_req_exception;
493: end if; /* category id is not null check */
495: --- Add all the entries
496: FOR l_index IN 1..p_template_id_tbl.COUNT
497: LOOP
498:
499: add_tpl_ctg_rec(p_api_version,FND_API.g_false,FND_API.g_false,
500: l_return_status , p_template_id_tbl(l_index),
501: p_category_id);
502:
503: if l_return_status <> FND_API.g_ret_sts_success THEN
499: add_tpl_ctg_rec(p_api_version,FND_API.g_false,FND_API.g_false,
500: l_return_status , p_template_id_tbl(l_index),
501: p_category_id);
502:
503: if l_return_status <> FND_API.g_ret_sts_success THEN
504: ---dbms_output.put_line('add_TPL_CTG_REC returned error status **********************' ) ;
505: x_return_status := l_return_status;
506: end if;
507: END LOOP;
507: END LOOP;
508:
509: --- Check if the caller requested to commit ,
510: --- If p_commit set to true, commit the transaction
511: IF FND_API.to_boolean(p_commit) THEN
512: COMMIT;
513: END IF;
514:
515: FND_MSG_PUB.count_and_get(
512: COMMIT;
513: END IF;
514:
515: FND_MSG_PUB.count_and_get(
516: p_encoded => FND_API.g_false,
517: p_count => x_msg_count,
518: p_data => x_msg_data
519: );
520:
519: );
520:
521: EXCEPTION
522:
523: WHEN FND_API.g_exc_error THEN
524: ROLLBACK TO add_ctg_tpl;
525: x_return_status := FND_API.g_ret_sts_error;
526: FND_MSG_PUB.count_and_get(
527: p_encoded => FND_API.g_false,
521: EXCEPTION
522:
523: WHEN FND_API.g_exc_error THEN
524: ROLLBACK TO add_ctg_tpl;
525: x_return_status := FND_API.g_ret_sts_error;
526: FND_MSG_PUB.count_and_get(
527: p_encoded => FND_API.g_false,
528: p_count => x_msg_count,
529: p_data => x_msg_data
523: WHEN FND_API.g_exc_error THEN
524: ROLLBACK TO add_ctg_tpl;
525: x_return_status := FND_API.g_ret_sts_error;
526: FND_MSG_PUB.count_and_get(
527: p_encoded => FND_API.g_false,
528: p_count => x_msg_count,
529: p_data => x_msg_data
530: );
531:
528: p_count => x_msg_count,
529: p_data => x_msg_data
530: );
531:
532: WHEN FND_API.g_exc_unexpected_error THEN
533: ROLLBACK TO add_ctg_tpl;
534: x_return_status := FND_API.g_ret_sts_unexp_error ;
535: FND_MSG_PUB.count_and_get(
536: p_encoded => FND_API.g_false,
530: );
531:
532: WHEN FND_API.g_exc_unexpected_error THEN
533: ROLLBACK TO add_ctg_tpl;
534: x_return_status := FND_API.g_ret_sts_unexp_error ;
535: FND_MSG_PUB.count_and_get(
536: p_encoded => FND_API.g_false,
537: p_count => x_msg_count,
538: p_data => x_msg_data
532: WHEN FND_API.g_exc_unexpected_error THEN
533: ROLLBACK TO add_ctg_tpl;
534: x_return_status := FND_API.g_ret_sts_unexp_error ;
535: FND_MSG_PUB.count_and_get(
536: p_encoded => FND_API.g_false,
537: p_count => x_msg_count,
538: p_data => x_msg_data
539: );
540:
541: WHEN jtf_dspmgrvalidation_grp.category_req_exception THEN
542: ROLLBACK TO add_ctg_tpl;
543: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error)
544: THEN
545: x_return_status := FND_API.g_ret_sts_error;
546: FND_MESSAGE.set_name('JTF','JTF_DSP_CATEGORY_REQ');
547: FND_MSG_PUB.add;
548: END IF;
549: FND_MSG_PUB.count_and_get(
546: FND_MESSAGE.set_name('JTF','JTF_DSP_CATEGORY_REQ');
547: FND_MSG_PUB.add;
548: END IF;
549: FND_MSG_PUB.count_and_get(
550: p_encoded => FND_API.g_false,
551: p_count => x_msg_count,
552: p_data => x_msg_data
553: );
554:
553: );
554:
555: WHEN OTHERS THEN
556: ROLLBACK TO add_ctg_tpl;
557: x_return_status := FND_API.g_ret_sts_unexp_error ;
558:
559: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_unexp_error)
560: THEN
561: FND_MSG_PUB.add_exc_msg(g_pkg_name, l_api_name);
561: FND_MSG_PUB.add_exc_msg(g_pkg_name, l_api_name);
562: END IF;
563:
564: FND_MSG_PUB.count_and_get(
565: p_encoded => FND_API.g_false,
566: p_count => x_msg_count,
567: p_data => x_msg_data
568: );
569: