DBA Data[Home] [Help]

APPS.PA_CONTROL_API_PUB dependencies on FND_API

Line 68: p_commit IN VARCHAR2 := FND_API.G_FALSE,

64: AND pcit.ci_type_id = pci.ci_type_id;
65:
66: /*Procedure to add workplan impact*/
67: Procedure Add_Workplan_Impact (
68: p_commit IN VARCHAR2 := FND_API.G_FALSE,
69: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
70: p_api_version_number IN NUMBER,
71: x_return_status OUT NOCOPY VARCHAR2,
72: x_msg_count OUT NOCOPY NUMBER,

Line 69: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,

65:
66: /*Procedure to add workplan impact*/
67: Procedure Add_Workplan_Impact (
68: p_commit IN VARCHAR2 := FND_API.G_FALSE,
69: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
70: p_api_version_number IN NUMBER,
71: x_return_status OUT NOCOPY VARCHAR2,
72: x_msg_count OUT NOCOPY NUMBER,
73: x_msg_data OUT NOCOPY VARCHAR2,

Line 88: x_return_status := FND_API.G_RET_STS_SUCCESS;

84: l_msg_index_out NUMBER;
85: l_module_name VARCHAR2(200):='PA_CONTROL_API_PUB.Add_Workplan_Impact';
86: BEGIN
87:
88: x_return_status := FND_API.G_RET_STS_SUCCESS;
89: x_msg_count := 0;
90: l_debug_mode := NVL(FND_PROFILE.VALUE_SPECIFIC('PA_DEBUG_MODE', fnd_global.user_id, fnd_global.resp_id, 275, null, null), 'N');
91:
92: IF l_debug_mode = 'Y' THEN

Line 97: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list, FND_API.G_TRUE)) THEN

93: PA_DEBUG.set_curr_function(p_function => 'Add_Workplan_Impact', p_debug_mode => l_debug_mode);
94: END IF;
95:
96: --initializing the message stack.
97: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list, FND_API.G_TRUE)) THEN
98: FND_MSG_PUB.initialize;
99: END IF;
100:
101: IF p_commit = FND_API.G_TRUE THEN

Line 101: IF p_commit = FND_API.G_TRUE THEN

97: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list, FND_API.G_TRUE)) THEN
98: FND_MSG_PUB.initialize;
99: END IF;
100:
101: IF p_commit = FND_API.G_TRUE THEN
102: savepoint ADD_WORKPLAN_IMPACT_SVPT;
103: END IF;
104:
105: IF l_debug_mode = 'Y' THEN

Line 117: raise FND_API.G_EXC_ERROR;

113: if l_debug_mode = 'Y' then
114: pa_debug.g_err_stage:= 'The ci_id is null';
115: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
116: end if;
117: raise FND_API.G_EXC_ERROR;
118: end if;
119:
120: /*Calling the private API
121: This update_impacts will do all the necessary validations and call

Line 143: IF p_commit = FND_API.G_TRUE and 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 p_commit = FND_API.G_TRUE and x_return_status = FND_API.G_RET_STS_SUCCESS THEN
144: COMMIT;
145: END IF;
146: --Reset the stack
147: if l_debug_mode = 'Y' then

Line 152: when FND_API.G_EXC_ERROR then

148: Pa_Debug.reset_curr_function;
149: end if;
150:
151: Exception
152: when FND_API.G_EXC_ERROR then
153:
154: x_return_status := FND_API.G_RET_STS_ERROR;
155: l_msg_count := FND_MSG_PUB.count_msg;
156:

Line 154: x_return_status := FND_API.G_RET_STS_ERROR;

150:
151: Exception
152: when FND_API.G_EXC_ERROR then
153:
154: x_return_status := FND_API.G_RET_STS_ERROR;
155: l_msg_count := FND_MSG_PUB.count_msg;
156:
157: IF p_commit = FND_API.G_TRUE THEN
158: ROLLBACK TO ADD_WORKPLAN_IMPACT_SVPT;

Line 157: IF p_commit = FND_API.G_TRUE THEN

153:
154: x_return_status := FND_API.G_RET_STS_ERROR;
155: l_msg_count := FND_MSG_PUB.count_msg;
156:
157: IF p_commit = FND_API.G_TRUE THEN
158: ROLLBACK TO ADD_WORKPLAN_IMPACT_SVPT;
159: END IF;
160: if l_msg_count = 1 then
161: pa_interface_utils_pub.get_messages

Line 162: (p_encoded => fnd_api.g_false,

158: ROLLBACK TO ADD_WORKPLAN_IMPACT_SVPT;
159: END IF;
160: if l_msg_count = 1 then
161: pa_interface_utils_pub.get_messages
162: (p_encoded => fnd_api.g_false,
163: p_msg_index => 1,
164: p_msg_count => l_msg_count ,
165: p_msg_data => l_msg_data ,
166: p_data => l_data,

Line 181: x_return_status := fnd_api.g_ret_sts_unexp_error;

177: end if;
178:
179: when others then
180:
181: x_return_status := fnd_api.g_ret_sts_unexp_error;
182: x_msg_data := substr(SQLERRM,1,240);
183:
184: IF p_commit = FND_API.G_TRUE THEN
185: ROLLBACK TO ADD_WORKPLAN_IMPACT_SVPT;

Line 184: IF p_commit = FND_API.G_TRUE THEN

180:
181: x_return_status := fnd_api.g_ret_sts_unexp_error;
182: x_msg_data := substr(SQLERRM,1,240);
183:
184: IF p_commit = FND_API.G_TRUE THEN
185: ROLLBACK TO ADD_WORKPLAN_IMPACT_SVPT;
186: END IF;
187: fnd_msg_pub.add_exc_msg ( p_pkg_name => 'PA_CONTROL_API_PUB',
188: p_procedure_name => 'Add_Workplan_Impact',

Line 200: p_commit IN VARCHAR2 := FND_API.G_FALSE,

196:
197:
198: /*Procedure to add Staffing impact*/
199: Procedure Add_Staffing_Impact(
200: p_commit IN VARCHAR2 := FND_API.G_FALSE,
201: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
202: p_api_version_number IN NUMBER,
203: x_return_status OUT NOCOPY VARCHAR2,
204: x_msg_count OUT NOCOPY NUMBER,

Line 201: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,

197:
198: /*Procedure to add Staffing impact*/
199: Procedure Add_Staffing_Impact(
200: p_commit IN VARCHAR2 := FND_API.G_FALSE,
201: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
202: p_api_version_number IN NUMBER,
203: x_return_status OUT NOCOPY VARCHAR2,
204: x_msg_count OUT NOCOPY NUMBER,
205: x_msg_data OUT NOCOPY VARCHAR2,

Line 220: x_return_status := FND_API.G_RET_STS_SUCCESS;

216: l_msg_index_out NUMBER;
217: l_module_name VARCHAR2(200):='PA_CONTROL_API_PUB.Add_Staffing_Impact';
218: BEGIN
219:
220: x_return_status := FND_API.G_RET_STS_SUCCESS;
221: x_msg_count := 0;
222: l_debug_mode := NVL(FND_PROFILE.VALUE_SPECIFIC('PA_DEBUG_MODE', fnd_global.user_id, fnd_global.resp_id, 275, null, null), 'N');
223:
224: IF l_debug_mode = 'Y' THEN

Line 228: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list, FND_API.G_TRUE)) THEN

224: IF l_debug_mode = 'Y' THEN
225: PA_DEBUG.set_curr_function(p_function => 'Add_Staffing_Impact', p_debug_mode => l_debug_mode);
226: END IF;
227:
228: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list, FND_API.G_TRUE)) THEN
229: FND_MSG_PUB.initialize;
230: END IF;
231:
232: IF p_commit = FND_API.G_TRUE THEN

Line 232: IF p_commit = FND_API.G_TRUE THEN

228: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list, FND_API.G_TRUE)) THEN
229: FND_MSG_PUB.initialize;
230: END IF;
231:
232: IF p_commit = FND_API.G_TRUE THEN
233: savepoint ADD_STAFFING_IMPACT_SVPT;
234: END IF;
235:
236: IF l_debug_mode = 'Y' THEN

Line 248: raise FND_API.G_EXC_ERROR;

244: if l_debug_mode = 'Y' then
245: pa_debug.g_err_stage:= 'The ci_id is null';
246: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
247: end if;
248: raise FND_API.G_EXC_ERROR;
249: end if;
250:
251: /*Calling the private API
252: This update_impacts will do all the necessary validations and call

Line 272: IF p_commit = FND_API.G_TRUE and x_return_status = FND_API.G_RET_STS_SUCCESS THEN

268: x_msg_count => x_msg_count,
269: x_msg_data => x_msg_data
270: );
271:
272: IF p_commit = FND_API.G_TRUE and x_return_status = FND_API.G_RET_STS_SUCCESS THEN
273: COMMIT;
274: END IF;
275: --Reset the stack
276: if l_debug_mode = 'Y' then

Line 281: when FND_API.G_EXC_ERROR then

277: Pa_Debug.reset_curr_function;
278: end if;
279:
280: Exception
281: when FND_API.G_EXC_ERROR then
282:
283: x_return_status := FND_API.G_RET_STS_ERROR;
284: l_msg_count := FND_MSG_PUB.count_msg;
285:

Line 283: x_return_status := FND_API.G_RET_STS_ERROR;

279:
280: Exception
281: when FND_API.G_EXC_ERROR then
282:
283: x_return_status := FND_API.G_RET_STS_ERROR;
284: l_msg_count := FND_MSG_PUB.count_msg;
285:
286: IF p_commit = FND_API.G_TRUE THEN
287: ROLLBACK TO ADD_STAFFING_IMPACT_SVPT;

Line 286: IF p_commit = FND_API.G_TRUE THEN

282:
283: x_return_status := FND_API.G_RET_STS_ERROR;
284: l_msg_count := FND_MSG_PUB.count_msg;
285:
286: IF p_commit = FND_API.G_TRUE THEN
287: ROLLBACK TO ADD_STAFFING_IMPACT_SVPT;
288: END IF;
289:
290: if l_msg_count = 1 then

Line 292: (p_encoded => fnd_api.g_false,

288: END IF;
289:
290: if l_msg_count = 1 then
291: pa_interface_utils_pub.get_messages
292: (p_encoded => fnd_api.g_false,
293: p_msg_index => 1,
294: p_msg_count => l_msg_count ,
295: p_msg_data => l_msg_data ,
296: p_data => l_data,

Line 309: x_return_status := fnd_api.g_ret_sts_unexp_error;

305: Pa_Debug.reset_curr_function;
306: end if;
307:
308: when others then
309: x_return_status := fnd_api.g_ret_sts_unexp_error;
310: x_msg_data := substr(SQLERRM,1,240);
311: IF p_commit = FND_API.G_TRUE THEN
312: ROLLBACK TO ADD_STAFFING_IMPACT_SVPT;
313: END IF;

Line 311: IF p_commit = FND_API.G_TRUE THEN

307:
308: when others then
309: x_return_status := fnd_api.g_ret_sts_unexp_error;
310: x_msg_data := substr(SQLERRM,1,240);
311: IF p_commit = FND_API.G_TRUE THEN
312: ROLLBACK TO ADD_STAFFING_IMPACT_SVPT;
313: END IF;
314: fnd_msg_pub.add_exc_msg ( p_pkg_name => 'PA_CONTROL_API_PUB',
315: p_procedure_name => 'Add_Staffing_Impact',

Line 328: p_commit IN VARCHAR2 := FND_API.G_FALSE,

324:
325:
326: /*Procedure to add Contract impact*/
327: Procedure Add_Contract_Impact(
328: p_commit IN VARCHAR2 := FND_API.G_FALSE,
329: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
330: p_api_version_number IN NUMBER,
331: x_return_status OUT NOCOPY VARCHAR2,
332: x_msg_count OUT NOCOPY NUMBER,

Line 329: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,

325:
326: /*Procedure to add Contract impact*/
327: Procedure Add_Contract_Impact(
328: p_commit IN VARCHAR2 := FND_API.G_FALSE,
329: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
330: p_api_version_number IN NUMBER,
331: x_return_status OUT NOCOPY VARCHAR2,
332: x_msg_count OUT NOCOPY NUMBER,
333: x_msg_data OUT NOCOPY VARCHAR2,

Line 348: x_return_status := FND_API.G_RET_STS_SUCCESS;

344: l_msg_index_out NUMBER;
345: l_module_name VARCHAR2(200):='PA_CONTROL_API_PUB.Add_Contract_Impact';
346: BEGIN
347:
348: x_return_status := FND_API.G_RET_STS_SUCCESS;
349: x_msg_count := 0;
350: l_debug_mode := NVL(FND_PROFILE.VALUE_SPECIFIC('PA_DEBUG_MODE', fnd_global.user_id, fnd_global.resp_id, 275, null, null), 'N');
351:
352: IF l_debug_mode = 'Y' THEN

Line 356: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list, FND_API.G_TRUE)) THEN

352: IF l_debug_mode = 'Y' THEN
353: PA_DEBUG.set_curr_function(p_function => 'Add_Contract_Impact', p_debug_mode => l_debug_mode);
354: END IF;
355:
356: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list, FND_API.G_TRUE)) THEN
357: FND_MSG_PUB.initialize;
358: END IF;
359:
360: IF p_commit = FND_API.G_TRUE THEN

Line 360: IF p_commit = FND_API.G_TRUE THEN

356: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list, FND_API.G_TRUE)) THEN
357: FND_MSG_PUB.initialize;
358: END IF;
359:
360: IF p_commit = FND_API.G_TRUE THEN
361: savepoint ADD_CONTRACT_IMPACT_SVPT;
362: END IF;
363:
364: IF l_debug_mode = 'Y' THEN

Line 376: raise FND_API.G_EXC_ERROR;

372: if l_debug_mode = 'Y' then
373: pa_debug.g_err_stage:= 'The ci_id is null';
374: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
375: end if;
376: raise FND_API.G_EXC_ERROR;
377: end if;
378:
379: /*Calling the private API
380: This update_impacts will do all the necessary validations and call

Line 401: IF p_commit = FND_API.G_TRUE and 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 p_commit = FND_API.G_TRUE and x_return_status = FND_API.G_RET_STS_SUCCESS THEN
402: COMMIT;
403: END IF;
404: --Reset the stack
405: if l_debug_mode = 'Y' then

Line 409: when FND_API.G_EXC_ERROR then

405: if l_debug_mode = 'Y' then
406: Pa_Debug.reset_curr_function;
407: end if;
408: Exception
409: when FND_API.G_EXC_ERROR then
410:
411: x_return_status := FND_API.G_RET_STS_ERROR;
412: l_msg_count := FND_MSG_PUB.count_msg;
413:

Line 411: x_return_status := FND_API.G_RET_STS_ERROR;

407: end if;
408: Exception
409: when FND_API.G_EXC_ERROR then
410:
411: x_return_status := FND_API.G_RET_STS_ERROR;
412: l_msg_count := FND_MSG_PUB.count_msg;
413:
414: IF p_commit = FND_API.G_TRUE THEN
415: ROLLBACK TO ADD_CONTRACT_IMPACT_SVPT;

Line 414: IF p_commit = FND_API.G_TRUE THEN

410:
411: x_return_status := FND_API.G_RET_STS_ERROR;
412: l_msg_count := FND_MSG_PUB.count_msg;
413:
414: IF p_commit = FND_API.G_TRUE THEN
415: ROLLBACK TO ADD_CONTRACT_IMPACT_SVPT;
416: END IF;
417: if l_msg_count = 1 then
418: pa_interface_utils_pub.get_messages

Line 419: (p_encoded => fnd_api.g_false,

415: ROLLBACK TO ADD_CONTRACT_IMPACT_SVPT;
416: END IF;
417: if l_msg_count = 1 then
418: pa_interface_utils_pub.get_messages
419: (p_encoded => fnd_api.g_false,
420: p_msg_index => 1,
421: p_msg_count => l_msg_count ,
422: p_msg_data => l_msg_data ,
423: p_data => l_data,

Line 436: x_return_status := fnd_api.g_ret_sts_unexp_error;

432: Pa_Debug.reset_curr_function;
433: end if;
434:
435: when others then
436: x_return_status := fnd_api.g_ret_sts_unexp_error;
437: x_msg_data := substr(SQLERRM,1,240);
438:
439: IF p_commit = FND_API.G_TRUE THEN
440: ROLLBACK TO ADD_CONTRACT_IMPACT_SVPT;

Line 439: IF p_commit = FND_API.G_TRUE THEN

435: when others then
436: x_return_status := fnd_api.g_ret_sts_unexp_error;
437: x_msg_data := substr(SQLERRM,1,240);
438:
439: IF p_commit = FND_API.G_TRUE THEN
440: ROLLBACK TO ADD_CONTRACT_IMPACT_SVPT;
441: END IF;
442: fnd_msg_pub.add_exc_msg ( p_pkg_name => 'PA_CONTROL_API_PUB',
443: p_procedure_name => 'Add_Contract_Impact',

Line 453: p_commit IN VARCHAR2 := FND_API.G_FALSE,

449: End Add_Contract_Impact;
450:
451: /*Procedure to add Other impact*/
452: Procedure Add_Other_Impact(
453: p_commit IN VARCHAR2 := FND_API.G_FALSE,
454: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
455: p_api_version_number IN NUMBER,
456: x_return_status OUT NOCOPY VARCHAR2,
457: x_msg_count OUT NOCOPY NUMBER,

Line 454: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,

450:
451: /*Procedure to add Other impact*/
452: Procedure Add_Other_Impact(
453: p_commit IN VARCHAR2 := FND_API.G_FALSE,
454: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
455: p_api_version_number IN NUMBER,
456: x_return_status OUT NOCOPY VARCHAR2,
457: x_msg_count OUT NOCOPY NUMBER,
458: x_msg_data OUT NOCOPY VARCHAR2,

Line 473: x_return_status := FND_API.G_RET_STS_SUCCESS;

469: l_msg_index_out NUMBER;
470: l_module_name VARCHAR2(200):='PA_CONTROL_API_PUB.Add_Other_Impact';
471: BEGIN
472:
473: x_return_status := FND_API.G_RET_STS_SUCCESS;
474: x_msg_count := 0;
475: l_debug_mode := NVL(FND_PROFILE.VALUE_SPECIFIC('PA_DEBUG_MODE', fnd_global.user_id, fnd_global.resp_id, 275, null, null), 'N');
476:
477: IF l_debug_mode = 'Y' THEN

Line 481: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list, FND_API.G_TRUE)) THEN

477: IF l_debug_mode = 'Y' THEN
478: PA_DEBUG.set_curr_function(p_function => 'Add_Other_Impact', p_debug_mode => l_debug_mode);
479: END IF;
480:
481: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list, FND_API.G_TRUE)) THEN
482: FND_MSG_PUB.initialize;
483: END IF;
484:
485: IF p_commit = FND_API.G_TRUE THEN

Line 485: IF p_commit = FND_API.G_TRUE THEN

481: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list, FND_API.G_TRUE)) THEN
482: FND_MSG_PUB.initialize;
483: END IF;
484:
485: IF p_commit = FND_API.G_TRUE THEN
486: savepoint ADD_OTHER_IMPACT_SVPT;
487: END IF;
488:
489: IF l_debug_mode = 'Y' THEN

Line 501: raise FND_API.G_EXC_ERROR;

497: if l_debug_mode = 'Y' then
498: pa_debug.g_err_stage:= 'The ci_id is null';
499: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
500: end if;
501: raise FND_API.G_EXC_ERROR;
502: end if;
503:
504: /*Calling the private API
505: This update_impacts will do all the necessary validations and call

Line 526: IF p_commit = FND_API.G_TRUE and x_return_status = FND_API.G_RET_STS_SUCCESS THEN

522: x_msg_count => x_msg_count,
523: x_msg_data => x_msg_data
524: );
525:
526: IF p_commit = FND_API.G_TRUE and x_return_status = FND_API.G_RET_STS_SUCCESS THEN
527: COMMIT;
528: END IF;
529: --Reset the stack
530: if l_debug_mode = 'Y' then

Line 534: when FND_API.G_EXC_ERROR then

530: if l_debug_mode = 'Y' then
531: Pa_Debug.reset_curr_function;
532: end if;
533: Exception
534: when FND_API.G_EXC_ERROR then
535:
536: x_return_status := FND_API.G_RET_STS_ERROR;
537: l_msg_count := FND_MSG_PUB.count_msg;
538:

Line 536: x_return_status := FND_API.G_RET_STS_ERROR;

532: end if;
533: Exception
534: when FND_API.G_EXC_ERROR then
535:
536: x_return_status := FND_API.G_RET_STS_ERROR;
537: l_msg_count := FND_MSG_PUB.count_msg;
538:
539: IF p_commit = FND_API.G_TRUE THEN
540: ROLLBACK TO ADD_OTHER_IMPACT_SVPT;

Line 539: IF p_commit = FND_API.G_TRUE THEN

535:
536: x_return_status := FND_API.G_RET_STS_ERROR;
537: l_msg_count := FND_MSG_PUB.count_msg;
538:
539: IF p_commit = FND_API.G_TRUE THEN
540: ROLLBACK TO ADD_OTHER_IMPACT_SVPT;
541: END IF;
542: if l_msg_count = 1 then
543: pa_interface_utils_pub.get_messages

Line 544: (p_encoded => fnd_api.g_false,

540: ROLLBACK TO ADD_OTHER_IMPACT_SVPT;
541: END IF;
542: if l_msg_count = 1 then
543: pa_interface_utils_pub.get_messages
544: (p_encoded => fnd_api.g_false,
545: p_msg_index => 1,
546: p_msg_count => l_msg_count ,
547: p_msg_data => l_msg_data ,
548: p_data => l_data,

Line 561: x_return_status := fnd_api.g_ret_sts_unexp_error;

557: Pa_Debug.reset_curr_function;
558: end if;
559:
560: when others then
561: x_return_status := fnd_api.g_ret_sts_unexp_error;
562: x_msg_data := substr(SQLERRM,1,240);
563:
564: IF p_commit = FND_API.G_TRUE THEN
565: ROLLBACK TO ADD_OTHER_IMPACT_SVPT;

Line 564: IF p_commit = FND_API.G_TRUE THEN

560: when others then
561: x_return_status := fnd_api.g_ret_sts_unexp_error;
562: x_msg_data := substr(SQLERRM,1,240);
563:
564: IF p_commit = FND_API.G_TRUE THEN
565: ROLLBACK TO ADD_OTHER_IMPACT_SVPT;
566: END IF;
567: fnd_msg_pub.add_exc_msg ( p_pkg_name => 'PA_CONTROL_API_PUB',
568: p_procedure_name => 'Add_Other_Impact',

Line 580: p_commit IN VARCHAR2 := FND_API.G_FALSE,

576:
577: /*Procedure to add Supplier impact ,
578: including the supplier details passed as a table type parameter*/
579: Procedure Add_Supplier_Impact (
580: p_commit IN VARCHAR2 := FND_API.G_FALSE,
581: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
582: p_api_version_number IN NUMBER,
583: x_return_status OUT NOCOPY VARCHAR2,
584: x_msg_count OUT NOCOPY NUMBER,

Line 581: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,

577: /*Procedure to add Supplier impact ,
578: including the supplier details passed as a table type parameter*/
579: Procedure Add_Supplier_Impact (
580: p_commit IN VARCHAR2 := FND_API.G_FALSE,
581: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
582: p_api_version_number IN NUMBER,
583: x_return_status OUT NOCOPY VARCHAR2,
584: x_msg_count OUT NOCOPY NUMBER,
585: x_msg_data OUT NOCOPY VARCHAR2,

Line 614: x_return_status := FND_API.G_RET_STS_SUCCESS;

610: l_change_amount NUMBER;
611:
612:
613: BEGIN
614: x_return_status := FND_API.G_RET_STS_SUCCESS;
615: x_msg_count := 0;
616: l_debug_mode := NVL(FND_PROFILE.VALUE_SPECIFIC('PA_DEBUG_MODE', fnd_global.user_id, fnd_global.resp_id, 275, null, null), 'N');
617:
618: IF l_debug_mode = 'Y' THEN

Line 622: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list, FND_API.G_TRUE)) THEN

618: IF l_debug_mode = 'Y' THEN
619: PA_DEBUG.set_curr_function(p_function => 'Add_Supplier_Impact', p_debug_mode => l_debug_mode);
620: END IF;
621:
622: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list, FND_API.G_TRUE)) THEN
623: FND_MSG_PUB.initialize;
624: END IF;
625:
626: IF p_commit = FND_API.G_TRUE THEN

Line 626: IF p_commit = FND_API.G_TRUE THEN

622: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list, FND_API.G_TRUE)) THEN
623: FND_MSG_PUB.initialize;
624: END IF;
625:
626: IF p_commit = FND_API.G_TRUE THEN
627: savepoint ADD_SUPPLIER_IMPACT_SVPT;
628: END IF;
629:
630: IF l_debug_mode = 'Y' THEN

Line 642: raise FND_API.G_EXC_ERROR;

638: if l_debug_mode = 'Y' then
639: pa_debug.g_err_stage:= 'The ci_id is null';
640: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
641: end if;
642: raise FND_API.G_EXC_ERROR;
643: end if;
644: if l_debug_mode = 'Y' then
645: pa_debug.g_err_stage:= 'Before Calling the Private API PA_CONTROL_API_PVT.update_impacts';
646: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);

Line 671: if x_return_status = FND_API.G_RET_STS_SUCCESS and x_impact_id is not null and p_supplier_det_tbl is not null then

667: end if;
668: /*Calling the supplier details API add Supplier details procedure.
669: If any of the details did not get inserted successfully then roll back
670: them including the impact.*/
671: if x_return_status = FND_API.G_RET_STS_SUCCESS and x_impact_id is not null and p_supplier_det_tbl is not null then
672:
673: PA_CONTROL_API_PVT.Add_supplier_details(
674: p_ci_id => p_ci_id,
675: p_ci_impact_id => x_impact_id,

Line 685: IF p_commit = FND_API.G_TRUE and x_return_status = FND_API.G_RET_STS_SUCCESS THEN

681:
682: end if;
683:
684:
685: IF p_commit = FND_API.G_TRUE and x_return_status = FND_API.G_RET_STS_SUCCESS THEN
686: COMMIT;
687: END IF;
688: --Reset the stack
689: if l_debug_mode = 'Y' then

Line 694: when FND_API.G_EXC_ERROR then

690: Pa_Debug.reset_curr_function;
691: end if;
692:
693: Exception
694: when FND_API.G_EXC_ERROR then
695:
696: x_return_status := fnd_api.g_ret_sts_error;
697: l_msg_count := fnd_msg_pub.count_msg;
698:

Line 696: x_return_status := fnd_api.g_ret_sts_error;

692:
693: Exception
694: when FND_API.G_EXC_ERROR then
695:
696: x_return_status := fnd_api.g_ret_sts_error;
697: l_msg_count := fnd_msg_pub.count_msg;
698:
699: IF p_commit = 'T' THEN
700: ROLLBACK to ADD_SUPPLIER_IMPACT_SVPT;

Line 706: (p_encoded => fnd_api.g_false,

702:
703:
704: if l_msg_count = 1 then
705: pa_interface_utils_pub.get_messages
706: (p_encoded => fnd_api.g_false,
707: p_msg_index => 1,
708: p_msg_count => l_msg_count ,
709: p_msg_data => l_msg_data ,
710: p_data => l_data,

Line 726: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

722: end if;
723:
724: when others then
725:
726: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
727: x_msg_data := substr(SQLERRM,1,240);
728: IF p_commit = FND_API.G_TRUE THEN
729: ROLLBACK TO ADD_SUPPLIER_IMPACT_SVPT;
730: END IF;

Line 728: IF p_commit = FND_API.G_TRUE THEN

724: when others then
725:
726: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
727: x_msg_data := substr(SQLERRM,1,240);
728: IF p_commit = FND_API.G_TRUE THEN
729: ROLLBACK TO ADD_SUPPLIER_IMPACT_SVPT;
730: END IF;
731: fnd_msg_pub.add_exc_msg ( p_pkg_name => 'PA_CONTROL_API_PUB',
732: p_procedure_name => 'Add_Supplier_Impact',

Line 745: p_commit IN VARCHAR2 := FND_API.G_FALSE,

741:
742:
743: /*Procedure to update or implement the Workplan impact*/
744: Procedure Update_Workplan_Impact (
745: p_commit IN VARCHAR2 := FND_API.G_FALSE,
746: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
747: p_api_version_number IN NUMBER,
748: x_return_status OUT NOCOPY VARCHAR2,
749: x_msg_count OUT NOCOPY NUMBER,

Line 746: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,

742:
743: /*Procedure to update or implement the Workplan impact*/
744: Procedure Update_Workplan_Impact (
745: p_commit IN VARCHAR2 := FND_API.G_FALSE,
746: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
747: p_api_version_number IN NUMBER,
748: x_return_status OUT NOCOPY VARCHAR2,
749: x_msg_count OUT NOCOPY NUMBER,
750: x_msg_data OUT NOCOPY VARCHAR2,

Line 765: x_return_status := FND_API.G_RET_STS_SUCCESS;

761: l_msg_index_out NUMBER;
762: l_module_name VARCHAR2(200):='PA_CONTROL_API_PUB.Update_Workplan_Impact';
763: BEGIN
764:
765: x_return_status := FND_API.G_RET_STS_SUCCESS;
766: x_msg_count := 0;
767: l_debug_mode := NVL(FND_PROFILE.VALUE_SPECIFIC('PA_DEBUG_MODE', fnd_global.user_id, fnd_global.resp_id, 275, null, null), 'N');
768:
769: IF l_debug_mode = 'Y' THEN

Line 773: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list, FND_API.G_TRUE)) THEN

769: IF l_debug_mode = 'Y' THEN
770: PA_DEBUG.set_curr_function(p_function => 'Update_Workplan_Impact', p_debug_mode => l_debug_mode);
771: END IF;
772:
773: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list, FND_API.G_TRUE)) THEN
774: FND_MSG_PUB.initialize;
775: END IF;
776:
777: IF p_commit = FND_API.G_TRUE THEN

Line 777: IF p_commit = FND_API.G_TRUE THEN

773: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list, FND_API.G_TRUE)) THEN
774: FND_MSG_PUB.initialize;
775: END IF;
776:
777: IF p_commit = FND_API.G_TRUE THEN
778: savepoint UPDATE_WORKPLAN_IMPACT_SVPT;
779: END IF;
780:
781: IF l_debug_mode = 'Y' THEN

Line 793: raise FND_API.G_EXC_ERROR;

789: if l_debug_mode = 'Y' then
790: pa_debug.g_err_stage:= 'The ci_id is null';
791: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
792: end if;
793: raise FND_API.G_EXC_ERROR;
794: end if;
795:
796:
797: /*Calling the private API

Line 817: IF p_commit = FND_API.G_TRUE and x_return_status = FND_API.G_RET_STS_SUCCESS THEN

813: x_msg_count => x_msg_count,
814: x_msg_data => x_msg_data
815: );
816:
817: IF p_commit = FND_API.G_TRUE and x_return_status = FND_API.G_RET_STS_SUCCESS THEN
818: COMMIT;
819: END IF;
820: --Reset the stack
821: if l_debug_mode = 'Y' then

Line 826: when FND_API.G_EXC_ERROR then

822: Pa_Debug.reset_curr_function;
823: end if;
824:
825: Exception
826: when FND_API.G_EXC_ERROR then
827:
828: x_return_status := fnd_api.g_ret_sts_error;
829: l_msg_count := fnd_msg_pub.count_msg;
830:

Line 828: x_return_status := fnd_api.g_ret_sts_error;

824:
825: Exception
826: when FND_API.G_EXC_ERROR then
827:
828: x_return_status := fnd_api.g_ret_sts_error;
829: l_msg_count := fnd_msg_pub.count_msg;
830:
831: IF p_commit = 'T' THEN
832: ROLLBACK to UPDATE_WORKPLAN_IMPACT_SVPT;

Line 837: (p_encoded => fnd_api.g_false,

833: END IF;
834:
835: if l_msg_count = 1 then
836: pa_interface_utils_pub.get_messages
837: (p_encoded => fnd_api.g_false,
838: p_msg_index => 1,
839: p_msg_count => l_msg_count ,
840: p_msg_data => l_msg_data ,
841: p_data => l_data,

Line 856: x_return_status := fnd_api.g_ret_sts_unexp_error;

852: end if;
853:
854: when others then
855:
856: x_return_status := fnd_api.g_ret_sts_unexp_error;
857: x_msg_data := substr(SQLERRM,1,240);
858: IF p_commit = FND_API.G_TRUE THEN
859: ROLLBACK TO UPDATE_WORKPLAN_IMPACT_SVPT;
860: END IF;

Line 858: IF p_commit = FND_API.G_TRUE THEN

854: when others then
855:
856: x_return_status := fnd_api.g_ret_sts_unexp_error;
857: x_msg_data := substr(SQLERRM,1,240);
858: IF p_commit = FND_API.G_TRUE THEN
859: ROLLBACK TO UPDATE_WORKPLAN_IMPACT_SVPT;
860: END IF;
861:
862:

Line 876: p_commit IN VARCHAR2 := FND_API.G_FALSE,

872: End Update_Workplan_Impact;
873:
874: /*Procedure to update or implement the Staffing impact*/
875: Procedure Update_Staffing_Impact(
876: p_commit IN VARCHAR2 := FND_API.G_FALSE,
877: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
878: p_api_version_number IN NUMBER,
879: x_return_status OUT NOCOPY VARCHAR2,
880: x_msg_count OUT NOCOPY NUMBER,

Line 877: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,

873:
874: /*Procedure to update or implement the Staffing impact*/
875: Procedure Update_Staffing_Impact(
876: p_commit IN VARCHAR2 := FND_API.G_FALSE,
877: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
878: p_api_version_number IN NUMBER,
879: x_return_status OUT NOCOPY VARCHAR2,
880: x_msg_count OUT NOCOPY NUMBER,
881: x_msg_data OUT NOCOPY VARCHAR2,

Line 897: x_return_status := FND_API.G_RET_STS_SUCCESS;

893: l_module_name VARCHAR2(200):='PA_CONTROL_API_PUB.Update_Staffing_Impact';
894:
895: BEGIN
896:
897: x_return_status := FND_API.G_RET_STS_SUCCESS;
898: x_msg_count := 0;
899: l_debug_mode := NVL(FND_PROFILE.VALUE_SPECIFIC('PA_DEBUG_MODE', fnd_global.user_id, fnd_global.resp_id, 275, null, null), 'N');
900:
901: IF l_debug_mode = 'Y' THEN

Line 905: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list, FND_API.G_TRUE)) THEN

901: IF l_debug_mode = 'Y' THEN
902: PA_DEBUG.set_curr_function(p_function => 'Update_Staffing_Impact', p_debug_mode => l_debug_mode);
903: END IF;
904:
905: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list, FND_API.G_TRUE)) THEN
906: FND_MSG_PUB.initialize;
907: END IF;
908:
909: IF p_commit = FND_API.G_TRUE THEN

Line 909: IF p_commit = FND_API.G_TRUE THEN

905: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list, FND_API.G_TRUE)) THEN
906: FND_MSG_PUB.initialize;
907: END IF;
908:
909: IF p_commit = FND_API.G_TRUE THEN
910: savepoint UPDATE_STAFFING_IMPACT_SVPT;
911: END IF;
912:
913: IF l_debug_mode = 'Y' THEN

Line 925: raise FND_API.G_EXC_ERROR;

921: if l_debug_mode = 'Y' then
922: pa_debug.g_err_stage:= 'The ci_id is null';
923: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
924: end if;
925: raise FND_API.G_EXC_ERROR;
926: end if;
927:
928:
929:

Line 950: IF p_commit = FND_API.G_TRUE and 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 p_commit = FND_API.G_TRUE and x_return_status = FND_API.G_RET_STS_SUCCESS THEN
951: COMMIT;
952: END IF;
953: --Reset the stack
954: if l_debug_mode = 'Y' then

Line 959: when FND_API.G_EXC_ERROR then

955: Pa_Debug.reset_curr_function;
956: end if;
957:
958: Exception
959: when FND_API.G_EXC_ERROR then
960:
961: x_return_status := fnd_api.g_ret_sts_error;
962: l_msg_count := fnd_msg_pub.count_msg;
963:

Line 961: x_return_status := fnd_api.g_ret_sts_error;

957:
958: Exception
959: when FND_API.G_EXC_ERROR then
960:
961: x_return_status := fnd_api.g_ret_sts_error;
962: l_msg_count := fnd_msg_pub.count_msg;
963:
964: IF p_commit = 'T' THEN
965: ROLLBACK to UPDATE_STAFFING_IMPACT_SVPT;

Line 970: (p_encoded => fnd_api.g_false,

966: END IF;
967:
968: if l_msg_count = 1 then
969: pa_interface_utils_pub.get_messages
970: (p_encoded => fnd_api.g_false,
971: p_msg_index => 1,
972: p_msg_count => l_msg_count ,
973: p_msg_data => l_msg_data ,
974: p_data => l_data,

Line 989: x_return_status := fnd_api.g_ret_sts_unexp_error;

985: end if;
986:
987: when others then
988:
989: x_return_status := fnd_api.g_ret_sts_unexp_error;
990: x_msg_data := substr(SQLERRM,1,240);
991: IF p_commit = FND_API.G_TRUE THEN
992: ROLLBACK TO UPDATE_STAFFING_IMPACT_SVPT;
993: END IF;

Line 991: IF p_commit = FND_API.G_TRUE THEN

987: when others then
988:
989: x_return_status := fnd_api.g_ret_sts_unexp_error;
990: x_msg_data := substr(SQLERRM,1,240);
991: IF p_commit = FND_API.G_TRUE THEN
992: ROLLBACK TO UPDATE_STAFFING_IMPACT_SVPT;
993: END IF;
994:
995:

Line 1010: p_commit IN VARCHAR2 := FND_API.G_FALSE,

1006:
1007:
1008: /*Procedure to update or implement the Contract impact*/
1009: Procedure Update_Contract_Impact(
1010: p_commit IN VARCHAR2 := FND_API.G_FALSE,
1011: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
1012: p_api_version_number IN NUMBER,
1013: x_return_status OUT NOCOPY VARCHAR2,
1014: x_msg_count OUT NOCOPY NUMBER,

Line 1011: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,

1007:
1008: /*Procedure to update or implement the Contract impact*/
1009: Procedure Update_Contract_Impact(
1010: p_commit IN VARCHAR2 := FND_API.G_FALSE,
1011: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
1012: p_api_version_number IN NUMBER,
1013: x_return_status OUT NOCOPY VARCHAR2,
1014: x_msg_count OUT NOCOPY NUMBER,
1015: x_msg_data OUT NOCOPY VARCHAR2,

Line 1031: x_return_status := FND_API.G_RET_STS_SUCCESS;

1027: l_module_name VARCHAR2(200):='PA_CONTROL_API_PUB.Update_Contract_Impact';
1028:
1029: BEGIN
1030:
1031: x_return_status := FND_API.G_RET_STS_SUCCESS;
1032: x_msg_count := 0;
1033: l_debug_mode := NVL(FND_PROFILE.VALUE_SPECIFIC('PA_DEBUG_MODE', fnd_global.user_id, fnd_global.resp_id, 275, null, null), 'N');
1034:
1035: IF l_debug_mode = 'Y' THEN

Line 1039: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list, FND_API.G_TRUE)) THEN

1035: IF l_debug_mode = 'Y' THEN
1036: PA_DEBUG.set_curr_function(p_function => 'Update_Contract_Impact', p_debug_mode => l_debug_mode);
1037: END IF;
1038:
1039: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list, FND_API.G_TRUE)) THEN
1040: FND_MSG_PUB.initialize;
1041: END IF;
1042:
1043: IF p_commit = FND_API.G_TRUE THEN

Line 1043: IF p_commit = FND_API.G_TRUE THEN

1039: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list, FND_API.G_TRUE)) THEN
1040: FND_MSG_PUB.initialize;
1041: END IF;
1042:
1043: IF p_commit = FND_API.G_TRUE THEN
1044: savepoint UPDATE_CONTRACT_IMPACT_SVPT;
1045: END IF;
1046:
1047: IF l_debug_mode = 'Y' THEN

Line 1059: raise FND_API.G_EXC_ERROR;

1055: if l_debug_mode = 'Y' then
1056: pa_debug.g_err_stage:= 'The ci_id is null';
1057: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
1058: end if;
1059: raise FND_API.G_EXC_ERROR;
1060: end if;
1061:
1062:
1063: /*Calling the private API

Line 1083: IF p_commit = FND_API.G_TRUE and x_return_status = FND_API.G_RET_STS_SUCCESS THEN

1079: x_msg_count => x_msg_count,
1080: x_msg_data => x_msg_data
1081: );
1082:
1083: IF p_commit = FND_API.G_TRUE and x_return_status = FND_API.G_RET_STS_SUCCESS THEN
1084: COMMIT;
1085: END IF;
1086: --Reset the stack
1087: if l_debug_mode = 'Y' then

Line 1092: when FND_API.G_EXC_ERROR then

1088: Pa_Debug.reset_curr_function;
1089: end if;
1090:
1091: Exception
1092: when FND_API.G_EXC_ERROR then
1093:
1094: x_return_status := fnd_api.g_ret_sts_error;
1095: l_msg_count := fnd_msg_pub.count_msg;
1096:

Line 1094: x_return_status := fnd_api.g_ret_sts_error;

1090:
1091: Exception
1092: when FND_API.G_EXC_ERROR then
1093:
1094: x_return_status := fnd_api.g_ret_sts_error;
1095: l_msg_count := fnd_msg_pub.count_msg;
1096:
1097: IF p_commit = 'T' THEN
1098: ROLLBACK to UPDATE_CONTRACT_IMPACT_SVPT;

Line 1103: (p_encoded => fnd_api.g_false,

1099: END IF;
1100:
1101: if l_msg_count = 1 then
1102: pa_interface_utils_pub.get_messages
1103: (p_encoded => fnd_api.g_false,
1104: p_msg_index => 1,
1105: p_msg_count => l_msg_count ,
1106: p_msg_data => l_msg_data ,
1107: p_data => l_data,

Line 1122: x_return_status := fnd_api.g_ret_sts_unexp_error;

1118: end if;
1119:
1120: when others then
1121:
1122: x_return_status := fnd_api.g_ret_sts_unexp_error;
1123: x_msg_data := substr(SQLERRM,1,240);
1124: IF p_commit = FND_API.G_TRUE THEN
1125: ROLLBACK TO UPDATE_CONTRACT_IMPACT_SVPT;
1126: END IF;

Line 1124: IF p_commit = FND_API.G_TRUE THEN

1120: when others then
1121:
1122: x_return_status := fnd_api.g_ret_sts_unexp_error;
1123: x_msg_data := substr(SQLERRM,1,240);
1124: IF p_commit = FND_API.G_TRUE THEN
1125: ROLLBACK TO UPDATE_CONTRACT_IMPACT_SVPT;
1126: END IF;
1127:
1128: fnd_msg_pub.add_exc_msg ( p_pkg_name => 'PA_CONTROL_API_PUB',

Line 1142: p_commit IN VARCHAR2 := FND_API.G_FALSE,

1138:
1139:
1140: /*Procedure to update or implement the Other impact*/
1141: Procedure Update_Other_Impact(
1142: p_commit IN VARCHAR2 := FND_API.G_FALSE,
1143: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
1144: p_api_version_number IN NUMBER,
1145: x_return_status OUT NOCOPY VARCHAR2,
1146: x_msg_count OUT NOCOPY NUMBER,

Line 1143: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,

1139:
1140: /*Procedure to update or implement the Other impact*/
1141: Procedure Update_Other_Impact(
1142: p_commit IN VARCHAR2 := FND_API.G_FALSE,
1143: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
1144: p_api_version_number IN NUMBER,
1145: x_return_status OUT NOCOPY VARCHAR2,
1146: x_msg_count OUT NOCOPY NUMBER,
1147: x_msg_data OUT NOCOPY VARCHAR2,

Line 1163: x_return_status := FND_API.G_RET_STS_SUCCESS;

1159: l_module_name VARCHAR2(200):='PA_CONTROL_API_PUB.Update_Other_Impact';
1160:
1161: BEGIN
1162:
1163: x_return_status := FND_API.G_RET_STS_SUCCESS;
1164: x_msg_count := 0;
1165: l_debug_mode := NVL(FND_PROFILE.VALUE_SPECIFIC('PA_DEBUG_MODE', fnd_global.user_id, fnd_global.resp_id, 275, null, null), 'N');
1166:
1167: IF l_debug_mode = 'Y' THEN

Line 1171: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list, FND_API.G_TRUE)) THEN

1167: IF l_debug_mode = 'Y' THEN
1168: PA_DEBUG.set_curr_function(p_function => 'Update_Other_Impact', p_debug_mode => l_debug_mode);
1169: END IF;
1170:
1171: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list, FND_API.G_TRUE)) THEN
1172: FND_MSG_PUB.initialize;
1173: END IF;
1174:
1175: IF p_commit = FND_API.G_TRUE THEN

Line 1175: IF p_commit = FND_API.G_TRUE THEN

1171: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list, FND_API.G_TRUE)) THEN
1172: FND_MSG_PUB.initialize;
1173: END IF;
1174:
1175: IF p_commit = FND_API.G_TRUE THEN
1176: savepoint UPDATE_OTHER_IMPACT_SVPT;
1177: END IF;
1178:
1179: IF l_debug_mode = 'Y' THEN

Line 1191: raise FND_API.G_EXC_ERROR;

1187: if l_debug_mode = 'Y' then
1188: pa_debug.g_err_stage:= 'The ci_id is null';
1189: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
1190: end if;
1191: raise FND_API.G_EXC_ERROR;
1192: end if;
1193:
1194:
1195:

Line 1216: IF p_commit = FND_API.G_TRUE and x_return_status = FND_API.G_RET_STS_SUCCESS THEN

1212: x_msg_count => x_msg_count,
1213: x_msg_data => x_msg_data
1214: );
1215:
1216: IF p_commit = FND_API.G_TRUE and x_return_status = FND_API.G_RET_STS_SUCCESS THEN
1217: COMMIT;
1218: END IF;
1219: --Reset the stack
1220: if l_debug_mode = 'Y' then

Line 1225: when FND_API.G_EXC_ERROR then

1221: Pa_Debug.reset_curr_function;
1222: end if;
1223:
1224: Exception
1225: when FND_API.G_EXC_ERROR then
1226:
1227: x_return_status := fnd_api.g_ret_sts_error;
1228: l_msg_count := fnd_msg_pub.count_msg;
1229:

Line 1227: x_return_status := fnd_api.g_ret_sts_error;

1223:
1224: Exception
1225: when FND_API.G_EXC_ERROR then
1226:
1227: x_return_status := fnd_api.g_ret_sts_error;
1228: l_msg_count := fnd_msg_pub.count_msg;
1229:
1230: IF p_commit = 'T' THEN
1231: ROLLBACK to UPDATE_OTHER_IMPACT_SVPT;

Line 1236: (p_encoded => fnd_api.g_false,

1232: END IF;
1233:
1234: if l_msg_count = 1 then
1235: pa_interface_utils_pub.get_messages
1236: (p_encoded => fnd_api.g_false,
1237: p_msg_index => 1,
1238: p_msg_count => l_msg_count ,
1239: p_msg_data => l_msg_data ,
1240: p_data => l_data,

Line 1255: x_return_status := fnd_api.g_ret_sts_unexp_error;

1251: end if;
1252:
1253: when others then
1254:
1255: x_return_status := fnd_api.g_ret_sts_unexp_error;
1256: x_msg_data := substr(SQLERRM,1,240);
1257: IF p_commit = FND_API.G_TRUE THEN
1258: ROLLBACK TO UPDATE_OTHER_IMPACT_SVPT;
1259: END IF;

Line 1257: IF p_commit = FND_API.G_TRUE THEN

1253: when others then
1254:
1255: x_return_status := fnd_api.g_ret_sts_unexp_error;
1256: x_msg_data := substr(SQLERRM,1,240);
1257: IF p_commit = FND_API.G_TRUE THEN
1258: ROLLBACK TO UPDATE_OTHER_IMPACT_SVPT;
1259: END IF;
1260:
1261:

Line 1273: p_commit IN VARCHAR2 := FND_API.G_FALSE,

1269: end if;
1270: End Update_Other_Impact;
1271:
1272: Procedure Update_Supplier_Impact (
1273: p_commit IN VARCHAR2 := FND_API.G_FALSE,
1274: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
1275: p_api_version_number IN NUMBER,
1276: x_return_status OUT NOCOPY VARCHAR2,
1277: x_msg_count OUT NOCOPY NUMBER,

Line 1274: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,

1270: End Update_Other_Impact;
1271:
1272: Procedure Update_Supplier_Impact (
1273: p_commit IN VARCHAR2 := FND_API.G_FALSE,
1274: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
1275: p_api_version_number IN NUMBER,
1276: x_return_status OUT NOCOPY VARCHAR2,
1277: x_msg_count OUT NOCOPY NUMBER,
1278: x_msg_data OUT NOCOPY VARCHAR2,

Line 1294: x_return_status := FND_API.G_RET_STS_SUCCESS;

1290: l_module_name VARCHAR2(200):='PA_CONTROL_API_PUB.Update_Supplier_Impact';
1291:
1292: BEGIN
1293:
1294: x_return_status := FND_API.G_RET_STS_SUCCESS;
1295: x_msg_count := 0;
1296: l_debug_mode := NVL(FND_PROFILE.VALUE_SPECIFIC('PA_DEBUG_MODE', fnd_global.user_id, fnd_global.resp_id, 275, null, null), 'N');
1297:
1298: IF l_debug_mode = 'Y' THEN

Line 1302: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list, FND_API.G_TRUE)) THEN

1298: IF l_debug_mode = 'Y' THEN
1299: PA_DEBUG.set_curr_function(p_function => 'Update_Supplier_Impact', p_debug_mode => l_debug_mode);
1300: END IF;
1301:
1302: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list, FND_API.G_TRUE)) THEN
1303: FND_MSG_PUB.initialize;
1304: END IF;
1305:
1306: IF p_commit = FND_API.G_TRUE THEN

Line 1306: IF p_commit = FND_API.G_TRUE THEN

1302: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list, FND_API.G_TRUE)) THEN
1303: FND_MSG_PUB.initialize;
1304: END IF;
1305:
1306: IF p_commit = FND_API.G_TRUE THEN
1307: savepoint UPDATE_SUPPLIER_IMPACT_SVPT;
1308: END IF;
1309:
1310: IF l_debug_mode = 'Y' THEN

Line 1322: raise FND_API.G_EXC_ERROR;

1318: if l_debug_mode = 'Y' then
1319: pa_debug.g_err_stage:= 'The ci_id is null';
1320: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
1321: end if;
1322: raise FND_API.G_EXC_ERROR;
1323: end if;
1324:
1325:
1326: /*Calling the private API

Line 1345: IF p_commit = FND_API.G_TRUE and x_return_status = FND_API.G_RET_STS_SUCCESS THEN

1341: x_msg_count => x_msg_count,
1342: x_msg_data => x_msg_data
1343: );
1344:
1345: IF p_commit = FND_API.G_TRUE and x_return_status = FND_API.G_RET_STS_SUCCESS THEN
1346: COMMIT;
1347: END IF;
1348: --Reset the stack
1349: if l_debug_mode = 'Y' then

Line 1354: when FND_API.G_EXC_ERROR then

1350: Pa_Debug.reset_curr_function;
1351: end if;
1352:
1353: Exception
1354: when FND_API.G_EXC_ERROR then
1355:
1356: x_return_status := fnd_api.g_ret_sts_error;
1357: l_msg_count := fnd_msg_pub.count_msg;
1358:

Line 1356: x_return_status := fnd_api.g_ret_sts_error;

1352:
1353: Exception
1354: when FND_API.G_EXC_ERROR then
1355:
1356: x_return_status := fnd_api.g_ret_sts_error;
1357: l_msg_count := fnd_msg_pub.count_msg;
1358:
1359: IF p_commit = 'T' THEN
1360: ROLLBACK to UPDATE_SUPPLIER_IMPACT_SVPT;

Line 1365: (p_encoded => fnd_api.g_false,

1361: END IF;
1362:
1363: if l_msg_count = 1 then
1364: pa_interface_utils_pub.get_messages
1365: (p_encoded => fnd_api.g_false,
1366: p_msg_index => 1,
1367: p_msg_count => l_msg_count ,
1368: p_msg_data => l_msg_data ,
1369: p_data => l_data,

Line 1384: x_return_status := fnd_api.g_ret_sts_unexp_error;

1380: end if;
1381:
1382: when others then
1383:
1384: x_return_status := fnd_api.g_ret_sts_unexp_error;
1385: x_msg_data := substr(SQLERRM,1,240);
1386: IF p_commit = FND_API.G_TRUE THEN
1387: ROLLBACK TO UPDATE_SUPPLIER_IMPACT_SVPT;
1388: END IF;

Line 1386: IF p_commit = FND_API.G_TRUE THEN

1382: when others then
1383:
1384: x_return_status := fnd_api.g_ret_sts_unexp_error;
1385: x_msg_data := substr(SQLERRM,1,240);
1386: IF p_commit = FND_API.G_TRUE THEN
1387: ROLLBACK TO UPDATE_SUPPLIER_IMPACT_SVPT;
1388: END IF;
1389:
1390: fnd_msg_pub.add_exc_msg ( p_pkg_name => 'PA_CONTROL_API_PUB',

Line 1406: P_COMMIT IN VARCHAR2 := FND_API.G_FALSE,

1402:
1403:
1404: Procedure Delete_Supplier_Impact_Details
1405: (
1406: P_COMMIT IN VARCHAR2 := FND_API.G_FALSE,
1407: P_INIT_MSG_LIST IN VARCHAR2 := FND_API.G_FALSE,
1408: P_API_VERSION_NUMBER IN NUMBER,
1409: X_RETURN_STATUS OUT NOCOPY VARCHAR2,
1410: X_MSG_COUNT OUT NOCOPY NUMBER,

Line 1407: P_INIT_MSG_LIST IN VARCHAR2 := FND_API.G_FALSE,

1403:
1404: Procedure Delete_Supplier_Impact_Details
1405: (
1406: P_COMMIT IN VARCHAR2 := FND_API.G_FALSE,
1407: P_INIT_MSG_LIST IN VARCHAR2 := FND_API.G_FALSE,
1408: P_API_VERSION_NUMBER IN NUMBER,
1409: X_RETURN_STATUS OUT NOCOPY VARCHAR2,
1410: X_MSG_COUNT OUT NOCOPY NUMBER,
1411: X_MSG_DATA OUT NOCOPY VARCHAR2,

Line 1443: x_Return_Status := FND_API.G_RET_STS_SUCCESS;

1439: -- Initialize the Error Stack.
1440: PA_DEBUG.Init_Err_Stack ('PA_CONTROL_API_PUB.Delete_Supplier_Impact_Details');
1441:
1442: -- Initialize the Return Status to Success.
1443: x_Return_Status := FND_API.G_RET_STS_SUCCESS;
1444: x_Msg_Count := 0;
1445:
1446: -- Clear the Global PL/SQL Message table.
1447: IF (FND_API.To_Boolean (p_Init_Msg_List)) THEN

Line 1447: IF (FND_API.To_Boolean (p_Init_Msg_List)) THEN

1443: x_Return_Status := FND_API.G_RET_STS_SUCCESS;
1444: x_Msg_Count := 0;
1445:
1446: -- Clear the Global PL/SQL Message table.
1447: IF (FND_API.To_Boolean (p_Init_Msg_List)) THEN
1448: FND_MSG_PUB.Initialize;
1449: END IF;
1450:
1451: IF p_commit = FND_API.G_TRUE THEN

Line 1451: IF p_commit = FND_API.G_TRUE THEN

1447: IF (FND_API.To_Boolean (p_Init_Msg_List)) THEN
1448: FND_MSG_PUB.Initialize;
1449: END IF;
1450:
1451: IF p_commit = FND_API.G_TRUE THEN
1452: savepoint DELETE_SUPP_DETAIL_SVPT;
1453: END IF;
1454:
1455: -- Check for the null p_ci_transaction_id value.

Line 1462: X_RETURN_STATUS := FND_API.G_RET_STS_ERROR;

1458: -- Add message to the Error Stack that Ci_Id is NULL.
1459: PA_UTILS.Add_Message (p_App_Short_Name => 'PA'
1460: , p_Msg_Name => 'PA_CI_MISS_TRANS_ID'
1461: );
1462: X_RETURN_STATUS := FND_API.G_RET_STS_ERROR;
1463: -- Raise the Invalid Argument exception.
1464: RAISE FND_API.G_EXC_ERROR;
1465: else
1466: open Check_Valid_CI_TRANS_ID;

Line 1464: RAISE FND_API.G_EXC_ERROR;

1460: , p_Msg_Name => 'PA_CI_MISS_TRANS_ID'
1461: );
1462: X_RETURN_STATUS := FND_API.G_RET_STS_ERROR;
1463: -- Raise the Invalid Argument exception.
1464: RAISE FND_API.G_EXC_ERROR;
1465: else
1466: open Check_Valid_CI_TRANS_ID;
1467: fetch Check_Valid_CI_TRANS_ID into l_transaction_id,l_ci_id;
1468: if Check_Valid_CI_TRANS_ID%notfound then

Line 1474: X_RETURN_STATUS := FND_API.G_RET_STS_ERROR;

1470: PA_UTILS.Add_Message (p_App_Short_Name => 'PA'
1471: , p_Msg_Name => 'PA_CI_INV_TRANS_ID'
1472: );
1473: close Check_Valid_CI_TRANS_ID;
1474: X_RETURN_STATUS := FND_API.G_RET_STS_ERROR;
1475: -- Raise the Invalid Argument exception.
1476: RAISE FND_API.G_EXC_ERROR;
1477: end if;
1478: close Check_Valid_CI_TRANS_ID;

Line 1476: RAISE FND_API.G_EXC_ERROR;

1472: );
1473: close Check_Valid_CI_TRANS_ID;
1474: X_RETURN_STATUS := FND_API.G_RET_STS_ERROR;
1475: -- Raise the Invalid Argument exception.
1476: RAISE FND_API.G_EXC_ERROR;
1477: end if;
1478: close Check_Valid_CI_TRANS_ID;
1479: END IF;
1480:

Line 1485: x_return_status := FND_API.G_RET_STS_ERROR;

1481: /*Security check for the CI_ID UpdateAccess*/
1482: if 'T' <> Pa_ci_security_pkg.check_update_access (l_ci_id) then
1483: PA_UTILS.add_Message( p_app_short_name => 'PA'
1484: ,p_msg_name => 'PA_CI_NO_UPDATE_ACCESS');
1485: x_return_status := FND_API.G_RET_STS_ERROR;
1486: if l_debug_mode = 'Y' then
1487: pa_debug.g_err_stage:= 'the CI_ID does not have the update access';
1488: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
1489: end if;

Line 1490: raise FND_API.G_EXC_ERROR ;

1486: if l_debug_mode = 'Y' then
1487: pa_debug.g_err_stage:= 'the CI_ID does not have the update access';
1488: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
1489: end if;
1490: raise FND_API.G_EXC_ERROR ;
1491: end if;
1492:
1493: /* Check for the status control: check whether the action CONTROL_ITEM_ALLOW_UPDATE is allowed on the current status of the issue. */
1494: open c_get_status(l_ci_id);

Line 1503: x_return_status := FND_API.G_RET_STS_ERROR;

1499: if l_debug_mode = 'Y' then
1500: pa_debug.g_err_stage:= 'the ci_id is invalid';
1501: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
1502: end if;
1503: x_return_status := FND_API.G_RET_STS_ERROR;
1504: close c_get_status;
1505: raise FND_API.G_EXC_ERROR ;
1506: end if;
1507: close c_get_status;

Line 1505: raise FND_API.G_EXC_ERROR ;

1501: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
1502: end if;
1503: x_return_status := FND_API.G_RET_STS_ERROR;
1504: close c_get_status;
1505: raise FND_API.G_EXC_ERROR ;
1506: end if;
1507: close c_get_status;
1508:
1509: l_chk_status_ctrl := pa_control_items_utils.CheckCIActionAllowed('CONTROL_ITEM', l_status_code, 'CONTROL_ITEM_ALLOW_UPDATE');

Line 1512: RAISE FND_API.G_EXC_ERROR;

1508:
1509: l_chk_status_ctrl := pa_control_items_utils.CheckCIActionAllowed('CONTROL_ITEM', l_status_code, 'CONTROL_ITEM_ALLOW_UPDATE');
1510: IF (l_chk_status_ctrl = 'N') THEN
1511: PA_UTILS.ADD_MESSAGE('PA', 'PA_CI_NO_ALLOW_UPDATE');
1512: RAISE FND_API.G_EXC_ERROR;
1513: END IF;
1514:
1515:
1516: IF l_debug_mode = 'Y' THEN

Line 1521: if X_RETURN_STATUS = FND_API.g_Ret_Sts_Success then

1517: pa_debug.write(l_module_name, 'After call to pa_control_items_utils.CheckCIActionAllowed', l_debug_level3);
1518: END IF;
1519:
1520:
1521: if X_RETURN_STATUS = FND_API.g_Ret_Sts_Success then
1522: --Calling the api to delete the supplier details
1523: PA_CI_SUPPLIER_PKG.delete_row (p_ci_transaction_id => P_CI_TRANSACTION_ID);
1524: end if;
1525:

Line 1526: IF p_commit = FND_API.G_TRUE and x_return_status = FND_API.G_RET_STS_SUCCESS THEN

1522: --Calling the api to delete the supplier details
1523: PA_CI_SUPPLIER_PKG.delete_row (p_ci_transaction_id => P_CI_TRANSACTION_ID);
1524: end if;
1525:
1526: IF p_commit = FND_API.G_TRUE and x_return_status = FND_API.G_RET_STS_SUCCESS THEN
1527: COMMIT;
1528: END IF;
1529: --Reset the stack
1530: if l_debug_mode = 'Y' then

Line 1534: when FND_API.G_EXC_ERROR then

1530: if l_debug_mode = 'Y' then
1531: Pa_Debug.reset_curr_function;
1532: end if;
1533: Exception
1534: when FND_API.G_EXC_ERROR then
1535:
1536: x_return_status := FND_API.G_RET_STS_ERROR;
1537: l_msg_count := FND_MSG_PUB.count_msg;
1538:

Line 1536: x_return_status := FND_API.G_RET_STS_ERROR;

1532: end if;
1533: Exception
1534: when FND_API.G_EXC_ERROR then
1535:
1536: x_return_status := FND_API.G_RET_STS_ERROR;
1537: l_msg_count := FND_MSG_PUB.count_msg;
1538:
1539: IF p_commit = FND_API.G_TRUE THEN
1540: ROLLBACK TO DELETE_SUPP_DETAIL_SVPT;

Line 1539: IF p_commit = FND_API.G_TRUE THEN

1535:
1536: x_return_status := FND_API.G_RET_STS_ERROR;
1537: l_msg_count := FND_MSG_PUB.count_msg;
1538:
1539: IF p_commit = FND_API.G_TRUE THEN
1540: ROLLBACK TO DELETE_SUPP_DETAIL_SVPT;
1541: END IF;
1542: if l_msg_count = 1 then
1543: pa_interface_utils_pub.get_messages

Line 1544: (p_encoded => fnd_api.g_false,

1540: ROLLBACK TO DELETE_SUPP_DETAIL_SVPT;
1541: END IF;
1542: if l_msg_count = 1 then
1543: pa_interface_utils_pub.get_messages
1544: (p_encoded => fnd_api.g_false,
1545: p_msg_index => 1,
1546: p_msg_count => l_msg_count ,
1547: p_msg_data => l_msg_data ,
1548: p_data => l_data,

Line 1561: x_return_status := fnd_api.g_ret_sts_unexp_error;

1557: Pa_Debug.reset_curr_function;
1558: end if;
1559:
1560: when others then
1561: x_return_status := fnd_api.g_ret_sts_unexp_error;
1562: x_msg_data := substr(SQLERRM,1,240);
1563:
1564: IF p_commit = FND_API.G_TRUE THEN
1565: ROLLBACK TO ADD_CONTRACT_IMPACT_SVPT;

Line 1564: IF p_commit = FND_API.G_TRUE THEN

1560: when others then
1561: x_return_status := fnd_api.g_ret_sts_unexp_error;
1562: x_msg_data := substr(SQLERRM,1,240);
1563:
1564: IF p_commit = FND_API.G_TRUE THEN
1565: ROLLBACK TO ADD_CONTRACT_IMPACT_SVPT;
1566: END IF;
1567: fnd_msg_pub.add_exc_msg ( p_pkg_name => 'PA_CONTROL_API_PUB',
1568: p_procedure_name => 'Delete_Supplier_Impact_Details',

Line 1581: p_commit IN VARCHAR2 := FND_API.G_FALSE,

1577:
1578: /* Update Progress API to update the progress and resolution details are also included
1579: to add the resolution*/
1580: Procedure Update_Progress(
1581: p_commit IN VARCHAR2 := FND_API.G_FALSE,
1582: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
1583: p_api_version_number IN NUMBER,
1584: x_return_status OUT NOCOPY VARCHAR2,
1585: x_msg_count OUT NOCOPY NUMBER,

Line 1582: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,

1578: /* Update Progress API to update the progress and resolution details are also included
1579: to add the resolution*/
1580: Procedure Update_Progress(
1581: p_commit IN VARCHAR2 := FND_API.G_FALSE,
1582: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
1583: p_api_version_number IN NUMBER,
1584: x_return_status OUT NOCOPY VARCHAR2,
1585: x_msg_count OUT NOCOPY NUMBER,
1586: x_msg_data OUT NOCOPY VARCHAR2,

Line 1730: l_max_msg_count NUMBER := FND_API.G_MISS_NUM;

1726:
1727: l_enforce_security VARCHAR2(1) := 'Y';
1728: l_start_wf VARCHAR2(1) := 'Y';
1729: l_num_of_actions NUMBER;
1730: l_max_msg_count NUMBER := FND_API.G_MISS_NUM;
1731: l_status_change_flag VARCHAR2(1) := 'N';
1732: l_validate_only VARCHAR2(1) := FND_API.g_false;
1733: l_recordversionnumber NUMBER(15);
1734: l_ci_id_error_flag VARCHAR2(1) := null;

Line 1732: l_validate_only VARCHAR2(1) := FND_API.g_false;

1728: l_start_wf VARCHAR2(1) := 'Y';
1729: l_num_of_actions NUMBER;
1730: l_max_msg_count NUMBER := FND_API.G_MISS_NUM;
1731: l_status_change_flag VARCHAR2(1) := 'N';
1732: l_validate_only VARCHAR2(1) := FND_API.g_false;
1733: l_recordversionnumber NUMBER(15);
1734: l_ci_id_error_flag VARCHAR2(1) := null;
1735: l_resolution_check VARCHAR2(10) := 'AMG';
1736: l_resolution_req VARCHAR2(10) := 'N';

Line 1742: x_return_status := FND_API.G_RET_STS_SUCCESS;

1738: l_to_status_flag VARCHAR2(10) := 'Y';
1739:
1740:
1741: Begin
1742: x_return_status := FND_API.G_RET_STS_SUCCESS;
1743: l_debug_mode := NVL(FND_PROFILE.VALUE_SPECIFIC('PA_DEBUG_MODE', fnd_global.user_id, fnd_global.resp_id, 275, null, null), 'N');
1744: IF l_debug_mode = 'Y' THEN
1745: PA_DEBUG.set_curr_function(p_function => 'UPDATE_PROGRESS', p_debug_mode => l_debug_mode);
1746: END IF;

Line 1748: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list, FND_API.G_TRUE)) THEN

1744: IF l_debug_mode = 'Y' THEN
1745: PA_DEBUG.set_curr_function(p_function => 'UPDATE_PROGRESS', p_debug_mode => l_debug_mode);
1746: END IF;
1747:
1748: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list, FND_API.G_TRUE)) THEN
1749: FND_MSG_PUB.initialize;
1750: END IF;
1751:
1752: IF p_commit = FND_API.G_TRUE THEN

Line 1752: IF p_commit = FND_API.G_TRUE THEN

1748: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list, FND_API.G_TRUE)) THEN
1749: FND_MSG_PUB.initialize;
1750: END IF;
1751:
1752: IF p_commit = FND_API.G_TRUE THEN
1753: savepoint UPDATE_PROGRESS_SVPT;
1754: END IF;
1755:
1756: IF l_debug_mode = 'Y' THEN

Line 1769: x_return_status := FND_API.G_RET_STS_ERROR;

1765: if l_debug_mode = 'Y' then
1766: pa_debug.g_err_stage:= 'the ci_id is null';
1767: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
1768: end if;
1769: x_return_status := FND_API.G_RET_STS_ERROR;
1770: --raise FND_API.G_EXC_ERROR;
1771: l_ci_id_error_flag := 'Y';
1772: else
1773: open c_get_control_item_data;

Line 1770: --raise FND_API.G_EXC_ERROR;

1766: pa_debug.g_err_stage:= 'the ci_id is null';
1767: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
1768: end if;
1769: x_return_status := FND_API.G_RET_STS_ERROR;
1770: --raise FND_API.G_EXC_ERROR;
1771: l_ci_id_error_flag := 'Y';
1772: else
1773: open c_get_control_item_data;
1774: fetch c_get_control_item_data into cp;

Line 1783: x_return_status := FND_API.G_RET_STS_ERROR;

1779: if l_debug_mode = 'Y' then
1780: pa_debug.g_err_stage:= 'the ci_id is invalid';
1781: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
1782: end if;
1783: x_return_status := FND_API.G_RET_STS_ERROR;
1784: close c_get_control_item_data;
1785: --raise FND_API.G_EXC_ERROR;
1786: l_ci_id_error_flag := 'Y';
1787: else

Line 1785: --raise FND_API.G_EXC_ERROR;

1781: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
1782: end if;
1783: x_return_status := FND_API.G_RET_STS_ERROR;
1784: close c_get_control_item_data;
1785: --raise FND_API.G_EXC_ERROR;
1786: l_ci_id_error_flag := 'Y';
1787: else
1788:
1789: l_curr_status_code := cp.status_code;

Line 1857: x_return_status := FND_API.G_RET_STS_ERROR;

1853:
1854: if 'T' <> check_s then
1855: PA_UTILS.add_Message( p_app_short_name => 'PA'
1856: ,p_msg_name => 'PA_CI_NO_UPDATE_ACCESS');
1857: x_return_status := FND_API.G_RET_STS_ERROR;
1858: if l_debug_mode = 'Y' then
1859: pa_debug.g_err_stage:= 'the CI_ID does not have the update access';
1860: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
1861: end if;

Line 1862: --raise FND_API.G_EXC_ERROR ;

1858: if l_debug_mode = 'Y' then
1859: pa_debug.g_err_stage:= 'the CI_ID does not have the update access';
1860: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
1861: end if;
1862: --raise FND_API.G_EXC_ERROR ;
1863:
1864: end if;
1865:
1866:

Line 1876: x_return_status := FND_API.G_RET_STS_ERROR;

1872: FETCH Get_CI_Data INTO l_projectid, l_proj_status_code, l_citypeclasscode, l_recordversionnumber;
1873: -- If NO_DATA_FOUND then report Error.
1874: IF (Get_CI_Data%NOTFOUND) THEN
1875: -- Code to Report Error and Return.
1876: x_return_status := FND_API.G_RET_STS_ERROR;
1877: -- RAISE FND_API.G_EXC_ERROR;
1878: END IF;
1879: CLOSE Get_CI_Data;
1880:

Line 1877: -- RAISE FND_API.G_EXC_ERROR;

1873: -- If NO_DATA_FOUND then report Error.
1874: IF (Get_CI_Data%NOTFOUND) THEN
1875: -- Code to Report Error and Return.
1876: x_return_status := FND_API.G_RET_STS_ERROR;
1877: -- RAISE FND_API.G_EXC_ERROR;
1878: END IF;
1879: CLOSE Get_CI_Data;
1880:
1881:

Line 1890: x_return_status := FND_API.G_RET_STS_ERROR;

1886:
1887: if check_s <> 'Y' then
1888: PA_UTILS.add_Message( p_app_short_name => 'PA'
1889: ,p_msg_name => 'PA_CI_NO_ALLOW_UPDATE');
1890: x_return_status := FND_API.G_RET_STS_ERROR;
1891: if l_debug_mode = 'Y' then
1892: pa_debug.g_err_stage:= 'the CI_ID does not have the update access for the current status';
1893: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
1894: end if;

Line 1895: -- raise FND_API.G_EXC_ERROR ;

1891: if l_debug_mode = 'Y' then
1892: pa_debug.g_err_stage:= 'the CI_ID does not have the update access for the current status';
1893: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
1894: end if;
1895: -- raise FND_API.G_EXC_ERROR ;
1896: end if;
1897:
1898:
1899: end if; -- end for if l_ci_id_error_flag is null then

Line 1994: x_return_status := FND_API.G_RET_STS_ERROR;

1990:
1991: IF (l_rows < 0) THEN
1992: PA_UTILS.Add_Message( p_app_short_name => 'PA'
1993: ,p_msg_name => 'PA_TO_STATUS_INVALID');
1994: x_return_status := FND_API.G_RET_STS_ERROR;
1995: l_to_status_flag := 'N';
1996: ELSE
1997: l_rows1 := DBMS_SQL.FETCH_ROWS(l_cursor);
1998:

Line 2005: x_return_status := FND_API.G_RET_STS_ERROR;

2001: l_ci_status_code := l_ci_status_code_1;
2002: else
2003: PA_UTILS.Add_Message( p_app_short_name => 'PA'
2004: ,p_msg_name => 'PA_TO_STATUS_INVALID');
2005: x_return_status := FND_API.G_RET_STS_ERROR;
2006: l_to_status_flag := 'N';
2007: end if;
2008:
2009: END IF;

Line 2016: x_return_status := FND_API.G_RET_STS_ERROR;

2012: END IF;
2013: ELSIF p_ci_status_code IS NULL THEN
2014: l_ci_status_code := p_ci_status_code;
2015: PA_UTILS.ADD_MESSAGE('PA', 'PA_CI_NULL_STATUS');
2016: x_return_status := FND_API.G_RET_STS_ERROR;
2017: l_to_status_flag := 'N';
2018: END IF;
2019:
2020: /*end of status_code validation*/

Line 2038: x_return_status := FND_API.G_RET_STS_ERROR;

2034: fetch c_check_Progress_code into c_check_Progress_code_rec;
2035: if c_check_Progress_code%notfound then
2036: PA_UTILS.add_Message( p_app_short_name => 'PA'
2037: ,p_msg_name => 'PA_CI_INV_PRG_CODE');
2038: x_return_status := FND_API.G_RET_STS_ERROR;
2039: if l_debug_mode = 'Y' then
2040: pa_debug.g_err_stage:= 'Invalid progress Code is passed';
2041: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
2042: end if;

Line 2055: x_return_status := FND_API.G_RET_STS_ERROR;

2051: if l_debug_mode = 'Y' then
2052: pa_debug.g_err_stage:= 'Progress Code is null';
2053: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
2054: end if;
2055: x_return_status := FND_API.G_RET_STS_ERROR;
2056: end if;
2057:
2058: if p_resolution_code <> G_PA_MISS_CHAR and p_resolution_code is not null then
2059: open c_get_resolution_codes(l_ci_type_id);

Line 2064: x_return_status := FND_API.G_RET_STS_ERROR;

2060: fetch c_get_resolution_codes into c_get_resolution_codes_rec;
2061: if c_get_resolution_codes%notfound then
2062: PA_UTILS.add_Message( p_app_short_name => 'PA'
2063: ,p_msg_name => 'PA_CI_RESOLUTION_INV');
2064: x_return_status := FND_API.G_RET_STS_ERROR;
2065: if l_debug_mode = 'Y' then
2066: pa_debug.g_err_stage:= 'the Resolution Code is invalid';
2067: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
2068: end if;

Line 2070: --raise FND_API.G_EXC_ERROR ;

2066: pa_debug.g_err_stage:= 'the Resolution Code is invalid';
2067: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
2068: end if;
2069: close c_get_resolution_codes;
2070: --raise FND_API.G_EXC_ERROR ;
2071: else
2072: l_resolution_code_id := p_resolution_code;
2073: close c_get_resolution_codes;
2074: end if;

Line 2095: l_to_status_flag = 'Y' and x_return_status = FND_API.G_RET_STS_SUCCESS ) THEN

2091:
2092: IF (l_curr_status_code is NOT NULL AND
2093: l_ci_status_code is NOT NULL AND
2094: l_curr_status_code <> l_ci_status_code AND
2095: l_to_status_flag = 'Y' and x_return_status = FND_API.G_RET_STS_SUCCESS ) THEN
2096:
2097: IF l_debug_mode = 'Y' THEN
2098: pa_debug.write(l_module_name, 'Before call to PA_CONTROL_ITEMS_UTILS.ChangeCIStatusValidate', l_debug_level3);
2099: END IF;

Line 2143: x_return_status := FND_API.G_RET_STS_ERROR;

2139: IF (PA_CONTROL_ITEMS_UTILS.checkhasresolution(p_ci_id) <> 'Y' ) THEN
2140: IF (l_resolution_code_id IS NULL) THEN
2141: PA_UTILS.Add_Message( p_app_short_name => 'PA'
2142: ,p_msg_name => 'PA_CI_RESOLUTION_OPEN');
2143: x_return_status := FND_API.G_RET_STS_ERROR;
2144: END IF;
2145: ELSE
2146: IF (l_resolution_code_id IS NULL) THEN
2147: PA_UTILS.Add_Message( p_app_short_name => 'PA'

Line 2149: x_return_status := FND_API.G_RET_STS_ERROR;

2145: ELSE
2146: IF (l_resolution_code_id IS NULL) THEN
2147: PA_UTILS.Add_Message( p_app_short_name => 'PA'
2148: ,p_msg_name => 'PA_CI_RESOLUTION_OPEN');
2149: x_return_status := FND_API.G_RET_STS_ERROR;
2150: END IF;
2151: END IF;
2152: END IF;
2153:

Line 2159: x_return_status := FND_API.G_RET_STS_ERROR;

2155: IF (PA_CONTROL_ITEMS_UTILS.checkhasresolution(p_ci_id) <> 'Y' ) THEN
2156: IF (l_resolution_code_id IS NULL) THEN
2157: PA_UTILS.Add_Message( p_app_short_name => 'PA'
2158: ,p_msg_name => 'PA_CI_CLOSE_INV_RES');
2159: x_return_status := FND_API.G_RET_STS_ERROR;
2160: END IF;
2161: ELSE
2162: IF (l_resolution_code_id IS NULL) THEN
2163: PA_UTILS.Add_Message( p_app_short_name => 'PA'

Line 2165: x_return_status := FND_API.G_RET_STS_ERROR;

2161: ELSE
2162: IF (l_resolution_code_id IS NULL) THEN
2163: PA_UTILS.Add_Message( p_app_short_name => 'PA'
2164: ,p_msg_name => 'PA_CI_CLOSE_INV_RES');
2165: x_return_status := FND_API.G_RET_STS_ERROR;
2166: END IF;
2167: END IF;
2168: END IF;
2169:

Line 2178: if x_return_status = FND_API.G_RET_STS_SUCCESS then

2174: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
2175: end if;
2176:
2177:
2178: if x_return_status = FND_API.G_RET_STS_SUCCESS then
2179: PA_CONTROL_ITEMS_PKG.UPDATE_ROW(
2180: p_ci_id => p_ci_id
2181: ,p_ci_type_id => l_ci_type_id
2182: ,p_summary => l_summary

Line 2236: raise FND_API.G_EXC_ERROR;

2232: ,x_msg_count => x_msg_count
2233: ,x_msg_data => x_msg_data
2234: );
2235: else
2236: raise FND_API.G_EXC_ERROR;
2237: end if;
2238:
2239: IF (l_status_change_flag = 'Y' AND l_validate_only <> fnd_api.g_true AND x_return_status = 'S') THEN
2240:

Line 2239: IF (l_status_change_flag = 'Y' AND l_validate_only <> fnd_api.g_true AND x_return_status = 'S') THEN

2235: else
2236: raise FND_API.G_EXC_ERROR;
2237: end if;
2238:
2239: IF (l_status_change_flag = 'Y' AND l_validate_only <> fnd_api.g_true AND x_return_status = 'S') THEN
2240:
2241: IF l_debug_mode = 'Y' THEN
2242: pa_debug.write(l_module_name, 'before call to PA_CONTROL_ITEMS_UTILS.ADD_STATUS_CHANGE_COMMENT', l_debug_level3);
2243: END IF;

Line 2287: IF p_commit = FND_API.G_TRUE and x_return_status = FND_API.G_RET_STS_SUCCESS THEN

2283:
2284:
2285:
2286:
2287: IF p_commit = FND_API.G_TRUE and x_return_status = FND_API.G_RET_STS_SUCCESS THEN
2288: COMMIT;
2289: elsif x_return_status <> FND_API.G_RET_STS_SUCCESS then
2290: raise FND_API.G_EXC_ERROR;
2291: END IF;

Line 2289: elsif x_return_status <> FND_API.G_RET_STS_SUCCESS then

2285:
2286:
2287: IF p_commit = FND_API.G_TRUE and x_return_status = FND_API.G_RET_STS_SUCCESS THEN
2288: COMMIT;
2289: elsif x_return_status <> FND_API.G_RET_STS_SUCCESS then
2290: raise FND_API.G_EXC_ERROR;
2291: END IF;
2292: --Reset the stack
2293: if l_debug_mode = 'Y' then

Line 2290: raise FND_API.G_EXC_ERROR;

2286:
2287: IF p_commit = FND_API.G_TRUE and x_return_status = FND_API.G_RET_STS_SUCCESS THEN
2288: COMMIT;
2289: elsif x_return_status <> FND_API.G_RET_STS_SUCCESS then
2290: raise FND_API.G_EXC_ERROR;
2291: END IF;
2292: --Reset the stack
2293: if l_debug_mode = 'Y' then
2294: Pa_Debug.reset_curr_function;

Line 2298: when FND_API.G_EXC_ERROR then

2294: Pa_Debug.reset_curr_function;
2295: end if;
2296:
2297: Exception
2298: when FND_API.G_EXC_ERROR then
2299:
2300: x_return_status := FND_API.G_RET_STS_ERROR;
2301: l_msg_count := fnd_msg_pub.count_msg;
2302: IF p_commit = 'T' THEN

Line 2300: x_return_status := FND_API.G_RET_STS_ERROR;

2296:
2297: Exception
2298: when FND_API.G_EXC_ERROR then
2299:
2300: x_return_status := FND_API.G_RET_STS_ERROR;
2301: l_msg_count := fnd_msg_pub.count_msg;
2302: IF p_commit = 'T' THEN
2303: ROLLBACK to UPDATE_PROGRESS_SVPT;
2304: END IF;

Line 2308: (p_encoded => fnd_api.g_false,

2304: END IF;
2305:
2306: if l_msg_count = 1 then
2307: pa_interface_utils_pub.get_messages
2308: (p_encoded => fnd_api.g_false,
2309: p_msg_index => 1,
2310: p_msg_count => l_msg_count ,
2311: p_msg_data => l_msg_data ,
2312: p_data => l_data,

Line 2326: x_return_status := fnd_api.g_ret_sts_unexp_error;

2322: Pa_Debug.reset_curr_function;
2323: end if;
2324:
2325: when others then
2326: x_return_status := fnd_api.g_ret_sts_unexp_error;
2327: x_msg_data := substr(SQLERRM,1,240);
2328: IF p_commit = FND_API.G_TRUE THEN
2329: ROLLBACK TO UPDATE_PROGRESS_SVPT;
2330: END IF;

Line 2328: IF p_commit = FND_API.G_TRUE THEN

2324:
2325: when others then
2326: x_return_status := fnd_api.g_ret_sts_unexp_error;
2327: x_msg_data := substr(SQLERRM,1,240);
2328: IF p_commit = FND_API.G_TRUE THEN
2329: ROLLBACK TO UPDATE_PROGRESS_SVPT;
2330: END IF;
2331: fnd_msg_pub.add_exc_msg ( p_pkg_name => 'PA_CONTROL_API_PUB',
2332: p_procedure_name => 'Update_Progress',

Line 2347: p_commit IN VARCHAR2 := FND_API.G_FALSE,

2343:
2344:
2345: PROCEDURE CREATE_ISSUE
2346: (
2347: p_commit IN VARCHAR2 := FND_API.G_FALSE,
2348: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
2349: p_api_version_number IN NUMBER := G_PA_MISS_NUM,
2350: p_orig_system_code IN VARCHAR2 := null,
2351: p_orig_system_reference IN VARCHAR2 := null,

Line 2348: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,

2344:
2345: PROCEDURE CREATE_ISSUE
2346: (
2347: p_commit IN VARCHAR2 := FND_API.G_FALSE,
2348: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
2349: p_api_version_number IN NUMBER := G_PA_MISS_NUM,
2350: p_orig_system_code IN VARCHAR2 := null,
2351: p_orig_system_reference IN VARCHAR2 := null,
2352: x_return_status OUT NOCOPY VARCHAR2,

Line 2475: x_return_status := fnd_api.g_ret_sts_success;

2471:
2472: BEGIN
2473:
2474: -- initialize the return status to success
2475: x_return_status := fnd_api.g_ret_sts_success;
2476: x_msg_count := 0;
2477:
2478: l_debug_mode := NVL(FND_PROFILE.VALUE_SPECIFIC('PA_DEBUG_MODE', fnd_global.user_id, fnd_global.resp_id, 275, null, null), 'N');
2479: l_module_name := 'create_issue' || g_module_name;

Line 2485: if fnd_api.to_boolean(nvl(p_init_msg_list, fnd_api.g_true)) then

2481: if l_debug_mode = 'Y' then
2482: pa_debug.set_curr_function(p_function => 'pa_control_api_pub.create_issue', p_debug_mode => l_debug_mode);
2483: end if;
2484:
2485: if fnd_api.to_boolean(nvl(p_init_msg_list, fnd_api.g_true)) then
2486: fnd_msg_pub.initialize;
2487: end if;
2488:
2489: if p_commit = fnd_api.g_true then

Line 2489: if p_commit = fnd_api.g_true then

2485: if fnd_api.to_boolean(nvl(p_init_msg_list, fnd_api.g_true)) then
2486: fnd_msg_pub.initialize;
2487: end if;
2488:
2489: if p_commit = fnd_api.g_true then
2490: savepoint create_issue;
2491: end if;
2492:
2493: if l_debug_mode = 'Y' then

Line 2889: if (p_commit = fnd_api.g_true and x_return_status = fnd_api.g_ret_sts_success)

2885: pa_debug.g_err_stage:= 'after calling validate_param_and_create';
2886: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
2887: end if;
2888:
2889: if (p_commit = fnd_api.g_true and x_return_status = fnd_api.g_ret_sts_success)
2890: then
2891: if l_debug_mode = 'Y' then
2892: pa_debug.g_err_stage := 'about to do a commit';
2893: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);

Line 2904: when fnd_api.g_exc_unexpected_error then

2900: pa_debug.reset_curr_function;
2901: end if;
2902:
2903: EXCEPTION
2904: when fnd_api.g_exc_unexpected_error then
2905:
2906: x_return_status := fnd_api.g_ret_sts_unexp_error;
2907: --do a rollback;
2908: if p_commit = fnd_api.g_true then

Line 2906: x_return_status := fnd_api.g_ret_sts_unexp_error;

2902:
2903: EXCEPTION
2904: when fnd_api.g_exc_unexpected_error then
2905:
2906: x_return_status := fnd_api.g_ret_sts_unexp_error;
2907: --do a rollback;
2908: if p_commit = fnd_api.g_true then
2909: rollback to create_issue;
2910: end if;

Line 2908: if p_commit = fnd_api.g_true then

2904: when fnd_api.g_exc_unexpected_error then
2905:
2906: x_return_status := fnd_api.g_ret_sts_unexp_error;
2907: --do a rollback;
2908: if p_commit = fnd_api.g_true then
2909: rollback to create_issue;
2910: end if;
2911: FND_MSG_PUB.Count_And_Get(
2912: p_count => x_msg_count ,

Line 2925: when fnd_api.g_exc_error then

2921: pa_debug.reset_curr_function;
2922: end if;
2923:
2924:
2925: when fnd_api.g_exc_error then
2926:
2927: x_return_status := fnd_api.g_ret_sts_error;
2928: --do a rollback;
2929: if p_commit = fnd_api.g_true then

Line 2927: x_return_status := fnd_api.g_ret_sts_error;

2923:
2924:
2925: when fnd_api.g_exc_error then
2926:
2927: x_return_status := fnd_api.g_ret_sts_error;
2928: --do a rollback;
2929: if p_commit = fnd_api.g_true then
2930: rollback to create_issue;
2931: end if;

Line 2929: if p_commit = fnd_api.g_true then

2925: when fnd_api.g_exc_error then
2926:
2927: x_return_status := fnd_api.g_ret_sts_error;
2928: --do a rollback;
2929: if p_commit = fnd_api.g_true then
2930: rollback to create_issue;
2931: end if;
2932: l_msg_count := fnd_msg_pub.count_msg;
2933: if l_msg_count = 1 then

Line 2935: (p_encoded => fnd_api.g_false,

2931: end if;
2932: l_msg_count := fnd_msg_pub.count_msg;
2933: if l_msg_count = 1 then
2934: pa_interface_utils_pub.get_messages
2935: (p_encoded => fnd_api.g_false,
2936: p_msg_index => 1,
2937: p_msg_count => l_msg_count ,
2938: p_msg_data => l_msg_data ,
2939: p_data => l_data,

Line 2958: x_return_status := fnd_api.g_ret_sts_unexp_error;

2954: end if;
2955:
2956: when others then
2957:
2958: x_return_status := fnd_api.g_ret_sts_unexp_error;
2959: --do a rollback;
2960: if p_commit = fnd_api.g_true then
2961: rollback to create_issue;
2962: end if;

Line 2960: if p_commit = fnd_api.g_true then

2956: when others then
2957:
2958: x_return_status := fnd_api.g_ret_sts_unexp_error;
2959: --do a rollback;
2960: if p_commit = fnd_api.g_true then
2961: rollback to create_issue;
2962: end if;
2963: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_CONTROL_API_PUB',
2964: p_procedure_name => 'create_issue',

Line 2982: p_commit IN VARCHAR2 := FND_API.G_FALSE,

2978: END CREATE_ISSUE;
2979:
2980: PROCEDURE CREATE_CHANGE_REQUEST
2981: (
2982: p_commit IN VARCHAR2 := FND_API.G_FALSE,
2983: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
2984: p_api_version_number IN NUMBER := G_PA_MISS_NUM,
2985: p_orig_system_code IN VARCHAR2 := null,
2986: p_orig_system_reference IN VARCHAR2 := null,

Line 2983: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,

2979:
2980: PROCEDURE CREATE_CHANGE_REQUEST
2981: (
2982: p_commit IN VARCHAR2 := FND_API.G_FALSE,
2983: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
2984: p_api_version_number IN NUMBER := G_PA_MISS_NUM,
2985: p_orig_system_code IN VARCHAR2 := null,
2986: p_orig_system_reference IN VARCHAR2 := null,
2987: x_return_status OUT NOCOPY VARCHAR2,

Line 3110: x_return_status := fnd_api.g_ret_sts_success;

3106:
3107: BEGIN
3108:
3109: -- initialize the return status to success
3110: x_return_status := fnd_api.g_ret_sts_success;
3111: x_msg_count := 0;
3112:
3113: l_debug_mode := NVL(FND_PROFILE.VALUE_SPECIFIC('PA_DEBUG_MODE', fnd_global.user_id, fnd_global.resp_id, 275, null, null), 'N');
3114: l_module_name := 'create_change_request' || g_module_name;

Line 3120: if fnd_api.to_boolean(nvl(p_init_msg_list, fnd_api.g_true)) then

3116: if l_debug_mode = 'Y' then
3117: pa_debug.set_curr_function(p_function => 'pa_control_api_pub.create_change_request', p_debug_mode => l_debug_mode);
3118: end if;
3119:
3120: if fnd_api.to_boolean(nvl(p_init_msg_list, fnd_api.g_true)) then
3121: fnd_msg_pub.initialize;
3122: end if;
3123:
3124: if p_commit = fnd_api.g_true then

Line 3124: if p_commit = fnd_api.g_true then

3120: if fnd_api.to_boolean(nvl(p_init_msg_list, fnd_api.g_true)) then
3121: fnd_msg_pub.initialize;
3122: end if;
3123:
3124: if p_commit = fnd_api.g_true then
3125: savepoint create_change_request;
3126: end if;
3127:
3128: if l_debug_mode = 'Y' then

Line 3524: if (p_commit = fnd_api.g_true and x_return_status = fnd_api.g_ret_sts_success)

3520: pa_debug.g_err_stage:= 'after calling validate_param_and_create';
3521: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
3522: end if;
3523:
3524: if (p_commit = fnd_api.g_true and x_return_status = fnd_api.g_ret_sts_success)
3525: then
3526: if l_debug_mode = 'Y' then
3527: pa_debug.g_err_stage := 'about to do a commit';
3528: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);

Line 3539: when fnd_api.g_exc_unexpected_error then

3535: pa_debug.reset_curr_function;
3536: end if;
3537:
3538: EXCEPTION
3539: when fnd_api.g_exc_unexpected_error then
3540:
3541: x_return_status := fnd_api.g_ret_sts_unexp_error;
3542: --do a rollback;
3543: if p_commit = fnd_api.g_true then

Line 3541: x_return_status := fnd_api.g_ret_sts_unexp_error;

3537:
3538: EXCEPTION
3539: when fnd_api.g_exc_unexpected_error then
3540:
3541: x_return_status := fnd_api.g_ret_sts_unexp_error;
3542: --do a rollback;
3543: if p_commit = fnd_api.g_true then
3544: rollback to create_change_request;
3545: end if;

Line 3543: if p_commit = fnd_api.g_true then

3539: when fnd_api.g_exc_unexpected_error then
3540:
3541: x_return_status := fnd_api.g_ret_sts_unexp_error;
3542: --do a rollback;
3543: if p_commit = fnd_api.g_true then
3544: rollback to create_change_request;
3545: end if;
3546: FND_MSG_PUB.Count_And_Get(
3547: p_count => x_msg_count ,

Line 3560: when fnd_api.g_exc_error then

3556: pa_debug.reset_curr_function;
3557: end if;
3558:
3559:
3560: when fnd_api.g_exc_error then
3561:
3562: x_return_status := fnd_api.g_ret_sts_error;
3563: --do a rollback;
3564: if p_commit = fnd_api.g_true then

Line 3562: x_return_status := fnd_api.g_ret_sts_error;

3558:
3559:
3560: when fnd_api.g_exc_error then
3561:
3562: x_return_status := fnd_api.g_ret_sts_error;
3563: --do a rollback;
3564: if p_commit = fnd_api.g_true then
3565: rollback to create_change_request;
3566: end if;

Line 3564: if p_commit = fnd_api.g_true then

3560: when fnd_api.g_exc_error then
3561:
3562: x_return_status := fnd_api.g_ret_sts_error;
3563: --do a rollback;
3564: if p_commit = fnd_api.g_true then
3565: rollback to create_change_request;
3566: end if;
3567: l_msg_count := fnd_msg_pub.count_msg;
3568: if l_msg_count = 1 then

Line 3570: (p_encoded => fnd_api.g_false,

3566: end if;
3567: l_msg_count := fnd_msg_pub.count_msg;
3568: if l_msg_count = 1 then
3569: pa_interface_utils_pub.get_messages
3570: (p_encoded => fnd_api.g_false,
3571: p_msg_index => 1,
3572: p_msg_count => l_msg_count ,
3573: p_msg_data => l_msg_data ,
3574: p_data => l_data,

Line 3593: x_return_status := fnd_api.g_ret_sts_unexp_error;

3589: end if;
3590:
3591: when others then
3592:
3593: x_return_status := fnd_api.g_ret_sts_unexp_error;
3594: --do a rollback;
3595: if p_commit = fnd_api.g_true then
3596: rollback to create_change_request;
3597: end if;

Line 3595: if p_commit = fnd_api.g_true then

3591: when others then
3592:
3593: x_return_status := fnd_api.g_ret_sts_unexp_error;
3594: --do a rollback;
3595: if p_commit = fnd_api.g_true then
3596: rollback to create_change_request;
3597: end if;
3598: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_CONTROL_API_PUB',
3599: p_procedure_name => 'create_change_request',

Line 3617: p_commit IN VARCHAR2 := FND_API.G_FALSE,

3613: END CREATE_CHANGE_REQUEST;
3614:
3615: PROCEDURE CREATE_CHANGE_ORDER
3616: (
3617: p_commit IN VARCHAR2 := FND_API.G_FALSE,
3618: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
3619: p_api_version_number IN NUMBER := G_PA_MISS_NUM,
3620: p_orig_system_code IN VARCHAR2 := null,
3621: p_orig_system_reference IN VARCHAR2 := null,

Line 3618: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,

3614:
3615: PROCEDURE CREATE_CHANGE_ORDER
3616: (
3617: p_commit IN VARCHAR2 := FND_API.G_FALSE,
3618: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
3619: p_api_version_number IN NUMBER := G_PA_MISS_NUM,
3620: p_orig_system_code IN VARCHAR2 := null,
3621: p_orig_system_reference IN VARCHAR2 := null,
3622: x_return_status OUT NOCOPY VARCHAR2,

Line 3745: x_return_status := fnd_api.g_ret_sts_success;

3741:
3742: BEGIN
3743:
3744: -- initialize the return status to success
3745: x_return_status := fnd_api.g_ret_sts_success;
3746: x_msg_count := 0;
3747:
3748: l_debug_mode := NVL(FND_PROFILE.VALUE_SPECIFIC('PA_DEBUG_MODE', fnd_global.user_id, fnd_global.resp_id, 275, null, null), 'N');
3749: l_module_name := 'create_change_order' || g_module_name;

Line 3755: if fnd_api.to_boolean(nvl(p_init_msg_list, fnd_api.g_true)) then

3751: if l_debug_mode = 'Y' then
3752: pa_debug.set_curr_function(p_function => 'pa_control_api_pub.create_change_order', p_debug_mode => l_debug_mode);
3753: end if;
3754:
3755: if fnd_api.to_boolean(nvl(p_init_msg_list, fnd_api.g_true)) then
3756: fnd_msg_pub.initialize;
3757: end if;
3758:
3759: if p_commit = fnd_api.g_true then

Line 3759: if p_commit = fnd_api.g_true then

3755: if fnd_api.to_boolean(nvl(p_init_msg_list, fnd_api.g_true)) then
3756: fnd_msg_pub.initialize;
3757: end if;
3758:
3759: if p_commit = fnd_api.g_true then
3760: savepoint create_change_order;
3761: end if;
3762:
3763: if l_debug_mode = 'Y' then

Line 4159: if (p_commit = fnd_api.g_true and x_return_status = fnd_api.g_ret_sts_success)

4155: pa_debug.g_err_stage:= 'after calling validate_param_and_create';
4156: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
4157: end if;
4158:
4159: if (p_commit = fnd_api.g_true and x_return_status = fnd_api.g_ret_sts_success)
4160: then
4161: if l_debug_mode = 'Y' then
4162: pa_debug.g_err_stage := 'about to do a commit';
4163: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);

Line 4174: when fnd_api.g_exc_unexpected_error then

4170: pa_debug.reset_curr_function;
4171: end if;
4172:
4173: EXCEPTION
4174: when fnd_api.g_exc_unexpected_error then
4175:
4176: x_return_status := fnd_api.g_ret_sts_unexp_error;
4177: --do a rollback;
4178: if p_commit = fnd_api.g_true then

Line 4176: x_return_status := fnd_api.g_ret_sts_unexp_error;

4172:
4173: EXCEPTION
4174: when fnd_api.g_exc_unexpected_error then
4175:
4176: x_return_status := fnd_api.g_ret_sts_unexp_error;
4177: --do a rollback;
4178: if p_commit = fnd_api.g_true then
4179: rollback to create_change_order;
4180: end if;

Line 4178: if p_commit = fnd_api.g_true then

4174: when fnd_api.g_exc_unexpected_error then
4175:
4176: x_return_status := fnd_api.g_ret_sts_unexp_error;
4177: --do a rollback;
4178: if p_commit = fnd_api.g_true then
4179: rollback to create_change_order;
4180: end if;
4181: FND_MSG_PUB.Count_And_Get(
4182: p_count => x_msg_count ,

Line 4195: when fnd_api.g_exc_error then

4191: pa_debug.reset_curr_function;
4192: end if;
4193:
4194:
4195: when fnd_api.g_exc_error then
4196:
4197: x_return_status := fnd_api.g_ret_sts_error;
4198: --do a rollback;
4199: if p_commit = fnd_api.g_true then

Line 4197: x_return_status := fnd_api.g_ret_sts_error;

4193:
4194:
4195: when fnd_api.g_exc_error then
4196:
4197: x_return_status := fnd_api.g_ret_sts_error;
4198: --do a rollback;
4199: if p_commit = fnd_api.g_true then
4200: rollback to create_change_order;
4201: end if;

Line 4199: if p_commit = fnd_api.g_true then

4195: when fnd_api.g_exc_error then
4196:
4197: x_return_status := fnd_api.g_ret_sts_error;
4198: --do a rollback;
4199: if p_commit = fnd_api.g_true then
4200: rollback to create_change_order;
4201: end if;
4202: l_msg_count := fnd_msg_pub.count_msg;
4203: if l_msg_count = 1 then

Line 4205: (p_encoded => fnd_api.g_false,

4201: end if;
4202: l_msg_count := fnd_msg_pub.count_msg;
4203: if l_msg_count = 1 then
4204: pa_interface_utils_pub.get_messages
4205: (p_encoded => fnd_api.g_false,
4206: p_msg_index => 1,
4207: p_msg_count => l_msg_count ,
4208: p_msg_data => l_msg_data ,
4209: p_data => l_data,

Line 4228: x_return_status := fnd_api.g_ret_sts_unexp_error;

4224: end if;
4225:
4226: when others then
4227:
4228: x_return_status := fnd_api.g_ret_sts_unexp_error;
4229: --do a rollback;
4230: if p_commit = fnd_api.g_true then
4231: rollback to create_change_order;
4232: end if;

Line 4230: if p_commit = fnd_api.g_true then

4226: when others then
4227:
4228: x_return_status := fnd_api.g_ret_sts_unexp_error;
4229: --do a rollback;
4230: if p_commit = fnd_api.g_true then
4231: rollback to create_change_order;
4232: end if;
4233: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_CONTROL_API_PUB',
4234: p_procedure_name => 'create_change_order',

Line 4252: p_commit IN VARCHAR2 := FND_API.G_FALSE,

4248: END CREATE_CHANGE_ORDER;
4249:
4250: PROCEDURE CREATE_ACTION
4251: (
4252: p_commit IN VARCHAR2 := FND_API.G_FALSE,
4253: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
4254: p_api_version_number IN NUMBER := G_PA_MISS_NUM,
4255: x_return_status OUT NOCOPY VARCHAR2,
4256: x_msg_count OUT NOCOPY NUMBER,

Line 4253: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,

4249:
4250: PROCEDURE CREATE_ACTION
4251: (
4252: p_commit IN VARCHAR2 := FND_API.G_FALSE,
4253: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
4254: p_api_version_number IN NUMBER := G_PA_MISS_NUM,
4255: x_return_status OUT NOCOPY VARCHAR2,
4256: x_msg_count OUT NOCOPY NUMBER,
4257: x_msg_data OUT NOCOPY VARCHAR2,

Line 4277: x_return_status := fnd_api.g_ret_sts_success;

4273: l_project_id pa_control_items.project_id%type;
4274: BEGIN
4275:
4276: -- initialize the return status to success
4277: x_return_status := fnd_api.g_ret_sts_success;
4278: x_msg_count := 0;
4279:
4280: l_debug_mode := NVL(FND_PROFILE.VALUE_SPECIFIC('PA_DEBUG_MODE', fnd_global.user_id, fnd_global.resp_id, 275, null, null), 'N');
4281: l_module_name := 'create_action' || g_module_name;

Line 4287: if fnd_api.to_boolean(nvl(p_init_msg_list, fnd_api.g_true)) then

4283: if l_debug_mode = 'Y' then
4284: pa_debug.set_curr_function(p_function => 'pa_control_api_pub.create_action', p_debug_mode => l_debug_mode);
4285: end if;
4286:
4287: if fnd_api.to_boolean(nvl(p_init_msg_list, fnd_api.g_true)) then
4288: fnd_msg_pub.initialize;
4289: end if;
4290:
4291: if p_commit = fnd_api.g_true then

Line 4291: if p_commit = fnd_api.g_true then

4287: if fnd_api.to_boolean(nvl(p_init_msg_list, fnd_api.g_true)) then
4288: fnd_msg_pub.initialize;
4289: end if;
4290:
4291: if p_commit = fnd_api.g_true then
4292: savepoint create_action;
4293: end if;
4294:
4295: if l_debug_mode = 'Y' then

Line 4350: if (p_commit = fnd_api.g_true and x_return_status = fnd_api.g_ret_sts_success)

4346: ,x_msg_count => x_msg_count
4347: ,x_msg_data => x_msg_data
4348: );
4349:
4350: if (p_commit = fnd_api.g_true and x_return_status = fnd_api.g_ret_sts_success)
4351: then
4352: if l_debug_mode = 'Y' then
4353: pa_debug.g_err_stage := 'about to do a commit';
4354: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);

Line 4365: when fnd_api.g_exc_error then

4361: pa_debug.reset_curr_function;
4362: end if;
4363:
4364: Exception
4365: when fnd_api.g_exc_error then
4366:
4367: x_return_status := fnd_api.g_ret_sts_error;
4368:
4369: --do a rollback;

Line 4367: x_return_status := fnd_api.g_ret_sts_error;

4363:
4364: Exception
4365: when fnd_api.g_exc_error then
4366:
4367: x_return_status := fnd_api.g_ret_sts_error;
4368:
4369: --do a rollback;
4370: if p_commit = fnd_api.g_true then
4371: rollback to create_action;

Line 4370: if p_commit = fnd_api.g_true then

4366:
4367: x_return_status := fnd_api.g_ret_sts_error;
4368:
4369: --do a rollback;
4370: if p_commit = fnd_api.g_true then
4371: rollback to create_action;
4372: end if;
4373:
4374: l_msg_count := fnd_msg_pub.count_msg;

Line 4377: (p_encoded => fnd_api.g_false,

4373:
4374: l_msg_count := fnd_msg_pub.count_msg;
4375: if l_msg_count = 1 then
4376: pa_interface_utils_pub.get_messages
4377: (p_encoded => fnd_api.g_false,
4378: p_msg_index => 1,
4379: p_msg_count => l_msg_count ,
4380: p_msg_data => l_msg_data ,
4381: p_data => l_data,

Line 4404: x_return_status := fnd_api.g_ret_sts_unexp_error;

4400: pa_debug.reset_curr_function;
4401: end if;
4402: when others then
4403:
4404: x_return_status := fnd_api.g_ret_sts_unexp_error;
4405: --do a rollback;
4406: if p_commit = fnd_api.g_true then
4407: rollback to create_action;
4408:

Line 4406: if p_commit = fnd_api.g_true then

4402: when others then
4403:
4404: x_return_status := fnd_api.g_ret_sts_unexp_error;
4405: --do a rollback;
4406: if p_commit = fnd_api.g_true then
4407: rollback to create_action;
4408:
4409: end if;
4410:

Line 4433: p_commit IN VARCHAR2 := FND_API.G_FALSE,

4429:
4430:
4431: PROCEDURE TAKE_ACTION
4432: (
4433: p_commit IN VARCHAR2 := FND_API.G_FALSE,
4434: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
4435: p_api_version_number IN NUMBER := G_PA_MISS_NUM,
4436: x_return_status OUT NOCOPY VARCHAR2,
4437: x_msg_count OUT NOCOPY NUMBER,

Line 4434: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,

4430:
4431: PROCEDURE TAKE_ACTION
4432: (
4433: p_commit IN VARCHAR2 := FND_API.G_FALSE,
4434: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
4435: p_api_version_number IN NUMBER := G_PA_MISS_NUM,
4436: x_return_status OUT NOCOPY VARCHAR2,
4437: x_msg_count OUT NOCOPY NUMBER,
4438: x_msg_data OUT NOCOPY VARCHAR2,

Line 4499: x_return_status := fnd_api.g_ret_sts_success;

4495:
4496: begin
4497:
4498: -- initialize the return status to success
4499: x_return_status := fnd_api.g_ret_sts_success;
4500: x_msg_count := 0;
4501:
4502: l_debug_mode := NVL(FND_PROFILE.VALUE_SPECIFIC('PA_DEBUG_MODE', fnd_global.user_id, fnd_global.resp_id, 275, null, null), 'N');
4503: l_module_name := 'take_action' || g_module_name;

Line 4509: if fnd_api.to_boolean(nvl(p_init_msg_list, fnd_api.g_true)) then

4505: if l_debug_mode = 'Y' then
4506: pa_debug.set_curr_function(p_function => 'pa_control_api_pub.take_action', p_debug_mode => l_debug_mode);
4507: end if;
4508:
4509: if fnd_api.to_boolean(nvl(p_init_msg_list, fnd_api.g_true)) then
4510: fnd_msg_pub.initialize;
4511: end if;
4512:
4513: if p_commit = fnd_api.g_true then

Line 4513: if p_commit = fnd_api.g_true then

4509: if fnd_api.to_boolean(nvl(p_init_msg_list, fnd_api.g_true)) then
4510: fnd_msg_pub.initialize;
4511: end if;
4512:
4513: if p_commit = fnd_api.g_true then
4514: savepoint take_action;
4515: end if;
4516:
4517: if l_debug_mode = 'Y' then

Line 4548: raise fnd_api.g_exc_error;

4544: if (l_debug_mode = 'Y') then
4545: pa_debug.g_err_stage := 'Apps Initialization is not been done';
4546: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
4547: end if;
4548: raise fnd_api.g_exc_error;
4549: elsif( l_assignee_id is not null and (l_assignee_id <> l_party_id) ) then
4550: /*user doesnt have privilige to update the action*/
4551: pa_utils.add_message(p_app_short_name => 'PA',
4552: p_msg_name => 'PA_CI_ACTION_NO_ACCESS');

Line 4557: raise fnd_api.g_exc_error;

4553: if (l_debug_mode = 'Y') then
4554: pa_debug.g_err_stage := 'user doesnt have access to update the action';
4555: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
4556: end if;
4557: raise fnd_api.g_exc_error;
4558: end if;
4559:
4560: if( p_close_action_flag = 'Y' and p_reassign_action_flag = 'Y') then
4561: pa_utils.add_message(p_app_short_name => 'PA',

Line 4567: raise fnd_api.g_exc_error;

4563: if (l_debug_mode = 'Y') then
4564: pa_debug.g_err_stage := 'you cannot both close and reassign the action.';
4565: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
4566: end if;
4567: raise fnd_api.g_exc_error;
4568: end if;-- if( p_close_action_flag := 'Y' and p_reassign_action_flag := 'Y') then
4569:
4570: /*validathe value for the close action flg. It can be either Y, N or G_PA_MISS_CHAR*/
4571: if (p_close_action_flag <> 'N' and p_close_action_flag <> 'Y' and p_close_action_flag <> G_PA_MISS_CHAR) then

Line 4578: raise fnd_api.g_exc_error;

4574: if (l_debug_mode = 'Y') then
4575: pa_debug.g_err_stage := 'Invalid value for close action flag';
4576: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
4577: end if;
4578: raise fnd_api.g_exc_error;
4579: end if;
4580:
4581: /*validathe value for the reassign action flg. It can be either Y, N or G_PA_MISS_CHAR*/
4582: if (p_reassign_action_flag <> 'N' and p_reassign_action_flag <> 'Y' and

Line 4590: raise fnd_api.g_exc_error;

4586: if (l_debug_mode = 'Y') then
4587: pa_debug.g_err_stage := 'Invalid value for reassign action flag';
4588: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
4589: end if;
4590: raise fnd_api.g_exc_error;
4591: end if;
4592:
4593: /*now check which action of three close/reassign or keep open has to be performed*/
4594: if( p_close_action_flag = 'Y' and

Line 4618: x_return_status := FND_API.G_RET_STS_ERROR;

4614: if (l_debug_mode = 'Y') then
4615: pa_debug.g_err_stage := 'only open actions can be closed';
4616: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
4617: end if;
4618: x_return_status := FND_API.G_RET_STS_ERROR;
4619: raise FND_API.G_EXC_ERROR;
4620: end if;
4621:
4622: if(get_action_attrs_rec.sign_off_required_flag = 'Y') then

Line 4619: raise FND_API.G_EXC_ERROR;

4615: pa_debug.g_err_stage := 'only open actions can be closed';
4616: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
4617: end if;
4618: x_return_status := FND_API.G_RET_STS_ERROR;
4619: raise FND_API.G_EXC_ERROR;
4620: end if;
4621:
4622: if(get_action_attrs_rec.sign_off_required_flag = 'Y') then
4623: /*sign off flag is acknowledged only when sign_off_required_flag is Y*/

Line 4648: p_validate_only => fnd_api.g_false,

4644: l_response_text := p_response_text;
4645: end if;--if (p_response_text = G_PA_MISS_CHAR) then
4646:
4647: pa_ci_actions_pvt.close_ci_action(
4648: p_validate_only => fnd_api.g_false,
4649: p_ci_action_id => l_action_id,
4650: p_sign_off_flag => l_sign_off_flag,
4651: p_record_version_number => get_action_attrs_rec.record_version_number,
4652: p_comment_text => l_response_text,

Line 4661: if(x_return_status <> FND_API.G_RET_STS_SUCCESS) then

4657: x_msg_count => x_msg_count,
4658: x_msg_data => x_msg_data
4659: );
4660:
4661: if(x_return_status <> FND_API.G_RET_STS_SUCCESS) then
4662: if (l_debug_mode = 'Y') then
4663: pa_debug.g_err_stage := 'error occured while closing the action';
4664: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
4665: end if;

Line 4666: raise fnd_api.g_exc_unexpected_error;

4662: if (l_debug_mode = 'Y') then
4663: pa_debug.g_err_stage := 'error occured while closing the action';
4664: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
4665: end if;
4666: raise fnd_api.g_exc_unexpected_error;
4667: end if;
4668:
4669: /*check for open notifications for this action which is being closed. Close the open notification for this action*/
4670: open close_notification(l_action_id);

Line 4688: if(x_return_status <> FND_API.G_RET_STS_SUCCESS) then

4684: x_return_status => x_return_status
4685: );
4686: end if;
4687:
4688: if(x_return_status <> FND_API.G_RET_STS_SUCCESS) then
4689: if (l_debug_mode = 'Y') then
4690: pa_debug.g_err_stage := 'error occurred while closing the notification';
4691: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
4692: end if;

Line 4693: raise fnd_api.g_exc_unexpected_error;

4689: if (l_debug_mode = 'Y') then
4690: pa_debug.g_err_stage := 'error occurred while closing the notification';
4691: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
4692: end if;
4693: raise fnd_api.g_exc_unexpected_error;
4694: end if;
4695:
4696: end if;-- if(l_perform_action is not null and l_perform_action = 'C') then
4697:

Line 4712: x_return_status := FND_API.G_RET_STS_ERROR;

4708: if (l_debug_mode = 'Y') then
4709: pa_debug.g_err_stage := 'only open actions can be reassigned';
4710: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
4711: end if;
4712: x_return_status := FND_API.G_RET_STS_ERROR;
4713: raise FND_API.G_EXC_ERROR;
4714: end if;
4715:
4716:

Line 4713: raise FND_API.G_EXC_ERROR;

4709: pa_debug.g_err_stage := 'only open actions can be reassigned';
4710: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
4711: end if;
4712: x_return_status := FND_API.G_RET_STS_ERROR;
4713: raise FND_API.G_EXC_ERROR;
4714: end if;
4715:
4716:
4717: if(get_action_attrs_rec.sign_off_required_flag = 'Y') then

Line 4776: if(x_return_status <> fnd_api.g_ret_sts_success) then

4772: ,x_msg_count => x_msg_count
4773: ,x_msg_data => x_msg_data
4774: );
4775:
4776: if(x_return_status <> fnd_api.g_ret_sts_success) then
4777: if (l_debug_mode = 'Y') then
4778: pa_debug.g_err_stage := 'error occured while validating the assignee id';
4779: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
4780: end if;

Line 4781: raise fnd_api.g_exc_error;

4777: if (l_debug_mode = 'Y') then
4778: pa_debug.g_err_stage := 'error occured while validating the assignee id';
4779: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
4780: end if;
4781: raise fnd_api.g_exc_error;
4782: end if;
4783:
4784: /*need to add a context in the pa_ci_actions_pvt.reassign_ci_action so tht we dont perform the check that
4785: required by date cannot be before the system date*/

Line 4787: p_validate_only => fnd_api.g_false,

4783:
4784: /*need to add a context in the pa_ci_actions_pvt.reassign_ci_action so tht we dont perform the check that
4785: required by date cannot be before the system date*/
4786: pa_ci_actions_pvt.reassign_ci_action(
4787: p_validate_only => fnd_api.g_false,
4788: p_ci_action_id => l_action_id,
4789: p_sign_off_flag => l_sign_off_flag,
4790: p_record_version_number => get_action_attrs_rec.record_version_number,
4791: p_assigned_to => l_reassign_to_id,

Line 4805: if(x_return_status <> FND_API.G_RET_STS_SUCCESS) then

4801: x_msg_count => x_msg_count,
4802: x_msg_data => x_msg_data
4803: );
4804:
4805: if(x_return_status <> FND_API.G_RET_STS_SUCCESS) then
4806: if (l_debug_mode = 'Y') then
4807: pa_debug.g_err_stage := 'error occured while reassigning the action';
4808: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
4809: end if;

Line 4810: raise fnd_api.g_exc_unexpected_error;

4806: if (l_debug_mode = 'Y') then
4807: pa_debug.g_err_stage := 'error occured while reassigning the action';
4808: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
4809: end if;
4810: raise fnd_api.g_exc_unexpected_error;
4811: end if;
4812:
4813: /*check for open notifications for this action which is being closed. Close the open notification for this action*/
4814: open close_notification(l_action_id);

Line 4832: if(x_return_status <> FND_API.G_RET_STS_SUCCESS) then

4828: x_return_status => x_return_status
4829: );
4830: end if;
4831:
4832: if(x_return_status <> FND_API.G_RET_STS_SUCCESS) then
4833: if (l_debug_mode = 'Y') then
4834: pa_debug.g_err_stage := 'error occurred while closing the notification';
4835: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
4836: end if;

Line 4837: raise fnd_api.g_exc_unexpected_error;

4833: if (l_debug_mode = 'Y') then
4834: pa_debug.g_err_stage := 'error occurred while closing the notification';
4835: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
4836: end if;
4837: raise fnd_api.g_exc_unexpected_error;
4838: end if;
4839:
4840: end if;-- if(l_perform_action is not null and l_perform_action = 'R') then
4841:

Line 4855: p_validate_only => fnd_api.g_false,

4851: l_response_text := p_response_text;
4852: end if;--if (p_response_text = G_PA_MISS_CHAR) then
4853:
4854: pa_ci_actions_pvt.add_ci_comment(
4855: p_validate_only => fnd_api.g_false,
4856: p_ci_comment_id => l_ci_comment_id,
4857: p_ci_id => get_action_attrs_rec.ci_id,
4858: p_type_code => 'UNSOLICITED',
4859: p_comment_text => l_response_text,

Line 4871: if(x_return_status <> FND_API.G_RET_STS_SUCCESS) then

4867: x_msg_count => x_msg_count,
4868: x_msg_data => x_msg_data
4869: );
4870:
4871: if(x_return_status <> FND_API.G_RET_STS_SUCCESS) then
4872: if (l_debug_mode = 'Y') then
4873: pa_debug.g_err_stage := 'error occured while adding the response';
4874: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
4875: end if;

Line 4876: raise fnd_api.g_exc_unexpected_error;

4872: if (l_debug_mode = 'Y') then
4873: pa_debug.g_err_stage := 'error occured while adding the response';
4874: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
4875: end if;
4876: raise fnd_api.g_exc_unexpected_error;
4877: end if;
4878:
4879: /*check for open notifications for this action which is being closed. Close the open notification for this action*/
4880: open close_notification(l_action_id);

Line 4898: if(x_return_status <> FND_API.G_RET_STS_SUCCESS) then

4894: x_return_status => x_return_status
4895: );
4896: end if;
4897:
4898: if(x_return_status <> FND_API.G_RET_STS_SUCCESS) then
4899: if (l_debug_mode = 'Y') then
4900: pa_debug.g_err_stage := 'error occurred while closing the notification';
4901: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
4902: end if;

Line 4903: raise fnd_api.g_exc_unexpected_error;

4899: if (l_debug_mode = 'Y') then
4900: pa_debug.g_err_stage := 'error occurred while closing the notification';
4901: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
4902: end if;
4903: raise fnd_api.g_exc_unexpected_error;
4904: end if;
4905: end if;-- if(l_perform_action is not null and l_perform_action = 'O') then
4906:
4907: --handle this exception here

Line 4908: -- raise fnd_api.g_exc_error;

4904: end if;
4905: end if;-- if(l_perform_action is not null and l_perform_action = 'O') then
4906:
4907: --handle this exception here
4908: -- raise fnd_api.g_exc_error;
4909: --raise fnd_api.g_exc_unexpected_error;
4910:
4911: if (p_commit = fnd_api.g_true and x_return_status = fnd_api.g_ret_sts_success)
4912: then

Line 4909: --raise fnd_api.g_exc_unexpected_error;

4905: end if;-- if(l_perform_action is not null and l_perform_action = 'O') then
4906:
4907: --handle this exception here
4908: -- raise fnd_api.g_exc_error;
4909: --raise fnd_api.g_exc_unexpected_error;
4910:
4911: if (p_commit = fnd_api.g_true and x_return_status = fnd_api.g_ret_sts_success)
4912: then
4913: if l_debug_mode = 'Y' then

Line 4911: if (p_commit = fnd_api.g_true and x_return_status = fnd_api.g_ret_sts_success)

4907: --handle this exception here
4908: -- raise fnd_api.g_exc_error;
4909: --raise fnd_api.g_exc_unexpected_error;
4910:
4911: if (p_commit = fnd_api.g_true and x_return_status = fnd_api.g_ret_sts_success)
4912: then
4913: if l_debug_mode = 'Y' then
4914: pa_debug.g_err_stage := 'about to do a commit';
4915: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);

Line 4927: when fnd_api.g_exc_error then

4923: end if;
4924:
4925:
4926: Exception
4927: when fnd_api.g_exc_error then
4928:
4929: --do a rollback;
4930: if p_commit = fnd_api.g_true then
4931: rollback to take_action;

Line 4930: if p_commit = fnd_api.g_true then

4926: Exception
4927: when fnd_api.g_exc_error then
4928:
4929: --do a rollback;
4930: if p_commit = fnd_api.g_true then
4931: rollback to take_action;
4932: end if;
4933:
4934: x_return_status := fnd_api.g_ret_sts_error;

Line 4934: x_return_status := fnd_api.g_ret_sts_error;

4930: if p_commit = fnd_api.g_true then
4931: rollback to take_action;
4932: end if;
4933:
4934: x_return_status := fnd_api.g_ret_sts_error;
4935: l_msg_count := fnd_msg_pub.count_msg;
4936: if l_msg_count = 1 then
4937: pa_interface_utils_pub.get_messages
4938: (p_encoded => fnd_api.g_false,

Line 4938: (p_encoded => fnd_api.g_false,

4934: x_return_status := fnd_api.g_ret_sts_error;
4935: l_msg_count := fnd_msg_pub.count_msg;
4936: if l_msg_count = 1 then
4937: pa_interface_utils_pub.get_messages
4938: (p_encoded => fnd_api.g_false,
4939: p_msg_index => 1,
4940: p_msg_count => l_msg_count ,
4941: p_msg_data => l_msg_data ,
4942: p_data => l_data,

Line 4958: when fnd_api.g_exc_unexpected_error then

4954: if l_debug_mode = 'Y' then
4955: pa_debug.reset_curr_function;
4956: end if;
4957:
4958: when fnd_api.g_exc_unexpected_error then
4959: --do a rollback;
4960: if p_commit = fnd_api.g_true then
4961: rollback to take_action;
4962: end if;

Line 4960: if p_commit = fnd_api.g_true then

4956: end if;
4957:
4958: when fnd_api.g_exc_unexpected_error then
4959: --do a rollback;
4960: if p_commit = fnd_api.g_true then
4961: rollback to take_action;
4962: end if;
4963:
4964: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 4964: x_return_status := fnd_api.g_ret_sts_unexp_error;

4960: if p_commit = fnd_api.g_true then
4961: rollback to take_action;
4962: end if;
4963:
4964: x_return_status := fnd_api.g_ret_sts_unexp_error;
4965: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_CONTROL_API_PUB',
4966: p_procedure_name => 'take_action',
4967: p_error_text => substrb(sqlerrm,1,240));
4968: fnd_msg_pub.count_and_get(p_count => x_msg_count,

Line 4981: if p_commit = fnd_api.g_true then

4977: end if;
4978:
4979: when others then
4980: --do a rollback;
4981: if p_commit = fnd_api.g_true then
4982: rollback to take_action;
4983: end if;
4984:
4985: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 4985: x_return_status := fnd_api.g_ret_sts_unexp_error;

4981: if p_commit = fnd_api.g_true then
4982: rollback to take_action;
4983: end if;
4984:
4985: x_return_status := fnd_api.g_ret_sts_unexp_error;
4986: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_CONTROL_API_PUB',
4987: p_procedure_name => 'take_action',
4988: p_error_text => substrb(sqlerrm,1,240));
4989: fnd_msg_pub.count_and_get(p_count => x_msg_count,

Line 5004: p_commit IN VARCHAR2 := FND_API.G_FALSE,

5000: end TAKE_ACTION;
5001:
5002:
5003: Procedure Cancel_Action(
5004: p_commit IN VARCHAR2 := FND_API.G_FALSE,
5005: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
5006: p_api_version_number IN NUMBER,
5007: x_return_status OUT NOCOPY VARCHAR2,
5008: x_msg_count OUT NOCOPY NUMBER,

Line 5005: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,

5001:
5002:
5003: Procedure Cancel_Action(
5004: p_commit IN VARCHAR2 := FND_API.G_FALSE,
5005: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
5006: p_api_version_number IN NUMBER,
5007: x_return_status OUT NOCOPY VARCHAR2,
5008: x_msg_count OUT NOCOPY NUMBER,
5009: x_msg_data OUT NOCOPY VARCHAR2,

Line 5042: x_return_status := FND_API.G_RET_STS_SUCCESS;

5038: l_project_id pa_control_items.project_id%TYPE;
5039:
5040: begin
5041:
5042: x_return_status := FND_API.G_RET_STS_SUCCESS;
5043: x_msg_count := 0;
5044:
5045: l_debug_mode := NVL(FND_PROFILE.VALUE_SPECIFIC('PA_DEBUG_MODE', fnd_global.user_id, fnd_global.resp_id, 275, null, null), 'N');
5046:

Line 5051: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list, FND_API.G_TRUE)) THEN

5047: IF l_debug_mode = 'Y' THEN
5048: PA_DEBUG.set_curr_function(p_function => 'Cancel_Action', p_debug_mode => l_debug_mode);
5049: END IF;
5050:
5051: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list, FND_API.G_TRUE)) THEN
5052: FND_MSG_PUB.initialize;
5053: END IF;
5054:
5055: IF p_commit = FND_API.G_TRUE THEN

Line 5055: IF p_commit = FND_API.G_TRUE THEN

5051: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list, FND_API.G_TRUE)) THEN
5052: FND_MSG_PUB.initialize;
5053: END IF;
5054:
5055: IF p_commit = FND_API.G_TRUE THEN
5056: savepoint CANCEL_ACTION_SVPT;
5057: END IF;
5058:
5059: IF l_debug_mode = 'Y' THEN

Line 5086: if x_return_status = FND_API.G_RET_STS_SUCCESS then

5082: ,x_msg_data => x_msg_data
5083: );
5084:
5085: /* Get the control item id(if it is passed also with action_id) to check the security */
5086: if x_return_status = FND_API.G_RET_STS_SUCCESS then
5087: open c_get_ci_id(l_action_id);
5088: fetch c_get_ci_id into l_ci_id,l_record_version_number,l_created_by, l_status_code;
5089: if c_get_ci_id%notfound then
5090: pa_utils.add_message(p_app_short_name => 'PA',

Line 5096: x_return_status := FND_API.G_RET_STS_ERROR;

5092: if (l_debug_mode = 'Y') then
5093: pa_debug.g_err_stage := 'invalid action_id passed';
5094: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
5095: end if;
5096: x_return_status := FND_API.G_RET_STS_ERROR;
5097: close c_get_ci_id;
5098: raise FND_API.G_EXC_ERROR;
5099: else
5100: /*User can only delete the actions, which are created by him*/

Line 5098: raise FND_API.G_EXC_ERROR;

5094: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
5095: end if;
5096: x_return_status := FND_API.G_RET_STS_ERROR;
5097: close c_get_ci_id;
5098: raise FND_API.G_EXC_ERROR;
5099: else
5100: /*User can only delete the actions, which are created by him*/
5101: close c_get_ci_id;
5102: if l_created_by <> l_user_id then

Line 5109: x_return_status := FND_API.G_RET_STS_ERROR;

5105: if (l_debug_mode = 'Y') then
5106: pa_debug.g_err_stage := 'invalid action_id passed';
5107: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
5108: end if;
5109: x_return_status := FND_API.G_RET_STS_ERROR;
5110:
5111: raise FND_API.G_EXC_ERROR;
5112: end if;
5113: if l_status_code <> 'CI_ACTION_OPEN' then

Line 5111: raise FND_API.G_EXC_ERROR;

5107: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
5108: end if;
5109: x_return_status := FND_API.G_RET_STS_ERROR;
5110:
5111: raise FND_API.G_EXC_ERROR;
5112: end if;
5113: if l_status_code <> 'CI_ACTION_OPEN' then
5114: pa_utils.add_message(p_app_short_name => 'PA',
5115: p_msg_name => 'PA_CI_CANCEL_OPEN_ACTION');

Line 5120: x_return_status := FND_API.G_RET_STS_ERROR;

5116: if (l_debug_mode = 'Y') then
5117: pa_debug.g_err_stage := 'Only open actions can be cancelled';
5118: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
5119: end if;
5120: x_return_status := FND_API.G_RET_STS_ERROR;
5121: raise FND_API.G_EXC_ERROR;
5122: end if;
5123:
5124: end if;

Line 5121: raise FND_API.G_EXC_ERROR;

5117: pa_debug.g_err_stage := 'Only open actions can be cancelled';
5118: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
5119: end if;
5120: x_return_status := FND_API.G_RET_STS_ERROR;
5121: raise FND_API.G_EXC_ERROR;
5122: end if;
5123:
5124: end if;
5125: end if;

Line 5134: x_return_status := FND_API.G_RET_STS_ERROR;

5130:
5131: if check_s <> 'T' then
5132: PA_UTILS.add_Message( p_app_short_name => 'PA'
5133: ,p_msg_name => 'PA_CI_NO_UPDATE_ACCESS');
5134: x_return_status := FND_API.G_RET_STS_ERROR;
5135: if l_debug_mode = 'Y' then
5136: pa_debug.g_err_stage:= 'Does not have the update access';
5137: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
5138: end if;

Line 5139: raise FND_API.G_EXC_ERROR;

5135: if l_debug_mode = 'Y' then
5136: pa_debug.g_err_stage:= 'Does not have the update access';
5137: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
5138: end if;
5139: raise FND_API.G_EXC_ERROR;
5140: end if;
5141:
5142: --------------------------------------------------------------
5143: /*Need to chck for the open notification details cancelling*/

Line 5150: if x_return_status = FND_API.G_RET_STS_SUCCESS THEN

5146: pa_debug.g_err_stage:= 'Before calling the pa_ci_actions_pvt.cancel_ci_action';
5147: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
5148: end if;
5149:
5150: if x_return_status = FND_API.G_RET_STS_SUCCESS THEN
5151:
5152: pa_ci_actions_pvt.cancel_ci_action(
5153: p_api_version => 1.0,
5154: p_init_msg_list => FND_API.G_FALSE,

Line 5154: p_init_msg_list => FND_API.G_FALSE,

5150: if x_return_status = FND_API.G_RET_STS_SUCCESS THEN
5151:
5152: pa_ci_actions_pvt.cancel_ci_action(
5153: p_api_version => 1.0,
5154: p_init_msg_list => FND_API.G_FALSE,
5155: p_commit => p_commit,
5156: p_validate_only => 'F',
5157: p_ci_action_id => l_action_id,
5158: p_record_version_number => l_record_version_number,

Line 5166: IF p_commit = FND_API.G_TRUE and x_return_status = FND_API.G_RET_STS_SUCCESS THEN

5162: x_msg_data => x_msg_data
5163: );
5164: end if;
5165:
5166: IF p_commit = FND_API.G_TRUE and x_return_status = FND_API.G_RET_STS_SUCCESS THEN
5167: COMMIT;
5168: elsif x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
5169: raise FND_API.G_EXC_ERROR;
5170: END IF;

Line 5168: elsif x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

5164: end if;
5165:
5166: IF p_commit = FND_API.G_TRUE and x_return_status = FND_API.G_RET_STS_SUCCESS THEN
5167: COMMIT;
5168: elsif x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
5169: raise FND_API.G_EXC_ERROR;
5170: END IF;
5171: --Reset the stack
5172: if l_debug_mode = 'Y' then

Line 5169: raise FND_API.G_EXC_ERROR;

5165:
5166: IF p_commit = FND_API.G_TRUE and x_return_status = FND_API.G_RET_STS_SUCCESS THEN
5167: COMMIT;
5168: elsif x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
5169: raise FND_API.G_EXC_ERROR;
5170: END IF;
5171: --Reset the stack
5172: if l_debug_mode = 'Y' then
5173: Pa_Debug.reset_curr_function;

Line 5177: WHEN FND_API.G_EXC_ERROR THEN

5173: Pa_Debug.reset_curr_function;
5174: end if;
5175:
5176: EXCEPTION
5177: WHEN FND_API.G_EXC_ERROR THEN
5178: x_return_status := FND_API.G_RET_STS_ERROR;
5179: l_msg_count := FND_MSG_PUB.COUNT_MSG;
5180:
5181: IF p_commit = 'T' THEN

Line 5178: x_return_status := FND_API.G_RET_STS_ERROR;

5174: end if;
5175:
5176: EXCEPTION
5177: WHEN FND_API.G_EXC_ERROR THEN
5178: x_return_status := FND_API.G_RET_STS_ERROR;
5179: l_msg_count := FND_MSG_PUB.COUNT_MSG;
5180:
5181: IF p_commit = 'T' THEN
5182: ROLLBACK to CANCEL_ACTION_SVPT;

Line 5187: (p_encoded => fnd_api.g_false,

5183: END IF;
5184:
5185: if l_msg_count = 1 then
5186: pa_interface_utils_pub.get_messages
5187: (p_encoded => fnd_api.g_false,
5188: p_msg_index => 1,
5189: p_msg_count => l_msg_count ,
5190: p_msg_data => l_msg_data ,
5191: p_data => l_data,

Line 5206: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

5202: end if;
5203:
5204: when others then
5205:
5206: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
5207: x_msg_data := substr(SQLERRM,1,240);
5208:
5209: IF p_commit = FND_API.G_TRUE THEN
5210: ROLLBACK TO CANCEL_ACTION_SVPT;

Line 5209: IF p_commit = FND_API.G_TRUE THEN

5205:
5206: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
5207: x_msg_data := substr(SQLERRM,1,240);
5208:
5209: IF p_commit = FND_API.G_TRUE THEN
5210: ROLLBACK TO CANCEL_ACTION_SVPT;
5211: END IF;
5212:
5213:

Line 5234: p_Commit IN VARCHAR2 DEFAULT FND_API.G_FALSE

5230: to delete the Issue. The internal procedure is responsible
5231: for all validations.
5232: */
5233: Procedure Delete_Issue (
5234: p_Commit IN VARCHAR2 DEFAULT FND_API.G_FALSE
5235: , p_Init_Msg_List IN VARCHAR2 DEFAULT FND_API.G_FALSE
5236: , p_Api_Version_Number IN NUMBER
5237: , p_Ci_Id IN NUMBER
5238: , x_Return_Status OUT NOCOPY VARCHAR2

Line 5235: , p_Init_Msg_List IN VARCHAR2 DEFAULT FND_API.G_FALSE

5231: for all validations.
5232: */
5233: Procedure Delete_Issue (
5234: p_Commit IN VARCHAR2 DEFAULT FND_API.G_FALSE
5235: , p_Init_Msg_List IN VARCHAR2 DEFAULT FND_API.G_FALSE
5236: , p_Api_Version_Number IN NUMBER
5237: , p_Ci_Id IN NUMBER
5238: , x_Return_Status OUT NOCOPY VARCHAR2
5239: , x_Msg_Count OUT NOCOPY NUMBER

Line 5261: IF FND_API.TO_BOOLEAN(nvl(p_Init_Msg_List, FND_API.G_TRUE)) THEN

5257: PA_DEBUG.set_curr_function(p_function => 'Delete_Issue', p_debug_mode => l_debug_mode);
5258: END IF;
5259:
5260: -- Clear the Global PL/SQL Message table.
5261: IF FND_API.TO_BOOLEAN(nvl(p_Init_Msg_List, FND_API.G_TRUE)) THEN
5262: FND_MSG_PUB.initialize;
5263: END IF;
5264:
5265: IF p_commit = FND_API.G_TRUE THEN

Line 5265: IF p_commit = FND_API.G_TRUE THEN

5261: IF FND_API.TO_BOOLEAN(nvl(p_Init_Msg_List, FND_API.G_TRUE)) THEN
5262: FND_MSG_PUB.initialize;
5263: END IF;
5264:
5265: IF p_commit = FND_API.G_TRUE THEN
5266: savepoint DELETE_ISSUE_SVPT;
5267: END IF;
5268:
5269: IF l_debug_mode = 'Y' THEN

Line 5276: x_Return_Status := FND_API.g_Ret_Sts_Success;

5272: -- Initialize the Error Stack.
5273: -- PA_DEBUG.Init_Err_Stack ('PA_CONTROL_API_PUB.Delete_Issue');
5274:
5275: -- Initialize the Return Status to Success.
5276: x_Return_Status := FND_API.g_Ret_Sts_Success;
5277: x_Msg_Count := 0;
5278:
5279:
5280:

Line 5297: RAISE FND_API.G_EXC_ERROR;

5293: if l_debug_mode = 'Y' then
5294: pa_debug.g_err_stage:= 'Invalid API Use';
5295: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
5296: end if;
5297: RAISE FND_API.G_EXC_ERROR;
5298: END IF;
5299: CLOSE Get_CI_Type_Class_Code;
5300:
5301: -- Call the procedure Delete_CI to delete the Control Item.

Line 5312: IF p_commit = FND_API.G_TRUE and x_return_status = FND_API.G_RET_STS_SUCCESS THEN

5308: , x_Msg_Count => x_Msg_Count
5309: , x_Msg_Data => x_Msg_Data
5310: );
5311:
5312: IF p_commit = FND_API.G_TRUE and x_return_status = FND_API.G_RET_STS_SUCCESS THEN
5313: COMMIT;
5314: elsif x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
5315: raise FND_API.G_EXC_ERROR;
5316: END IF;

Line 5314: elsif x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

5310: );
5311:
5312: IF p_commit = FND_API.G_TRUE and x_return_status = FND_API.G_RET_STS_SUCCESS THEN
5313: COMMIT;
5314: elsif x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
5315: raise FND_API.G_EXC_ERROR;
5316: END IF;
5317:
5318: -- Reset the Error Stack.

Line 5315: raise FND_API.G_EXC_ERROR;

5311:
5312: IF p_commit = FND_API.G_TRUE and x_return_status = FND_API.G_RET_STS_SUCCESS THEN
5313: COMMIT;
5314: elsif x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
5315: raise FND_API.G_EXC_ERROR;
5316: END IF;
5317:
5318: -- Reset the Error Stack.
5319: if l_debug_mode = 'Y' then

Line 5325: WHEN FND_API.G_EXC_ERROR THEN

5321: end if;
5322:
5323: -- If any Exception then catch it.
5324: EXCEPTION
5325: WHEN FND_API.G_EXC_ERROR THEN
5326: -- Set the Return Status as Error.
5327: x_Return_Status := FND_API.g_Ret_Sts_Error;
5328: -- Get the Message Count.
5329: l_Msg_Count := FND_MSG_PUB.Count_Msg;

Line 5327: x_Return_Status := FND_API.g_Ret_Sts_Error;

5323: -- If any Exception then catch it.
5324: EXCEPTION
5325: WHEN FND_API.G_EXC_ERROR THEN
5326: -- Set the Return Status as Error.
5327: x_Return_Status := FND_API.g_Ret_Sts_Error;
5328: -- Get the Message Count.
5329: l_Msg_Count := FND_MSG_PUB.Count_Msg;
5330: --Roll back
5331: IF p_commit = FND_API.G_TRUE THEN

Line 5331: IF p_commit = FND_API.G_TRUE THEN

5327: x_Return_Status := FND_API.g_Ret_Sts_Error;
5328: -- Get the Message Count.
5329: l_Msg_Count := FND_MSG_PUB.Count_Msg;
5330: --Roll back
5331: IF p_commit = FND_API.G_TRUE THEN
5332: ROLLBACK TO DELETE_ISSUE_SVPT;
5333: END IF;
5334: IF (l_Msg_Count = 1) THEN
5335: PA_INTERFACE_UTILS_PUB.Get_Messages (

Line 5336: p_Encoded => FND_API.g_False

5332: ROLLBACK TO DELETE_ISSUE_SVPT;
5333: END IF;
5334: IF (l_Msg_Count = 1) THEN
5335: PA_INTERFACE_UTILS_PUB.Get_Messages (
5336: p_Encoded => FND_API.g_False
5337: , p_Msg_Index => 1
5338: , p_Msg_Count => l_Msg_Count
5339: , p_Msg_Data => l_Msg_Data
5340: , p_Data => l_Data

Line 5356: x_Return_Status := FND_API.g_Ret_Sts_Unexp_Error;

5352: end if;
5353:
5354: WHEN OTHERS THEN
5355: -- Set the Return Status as Error.
5356: x_Return_Status := FND_API.g_Ret_Sts_Unexp_Error;
5357: --Roll back the changes.
5358: IF p_commit = FND_API.G_TRUE THEN
5359: ROLLBACK TO DELETE_ISSUE_SVPT;
5360: END IF;

Line 5358: IF p_commit = FND_API.G_TRUE THEN

5354: WHEN OTHERS THEN
5355: -- Set the Return Status as Error.
5356: x_Return_Status := FND_API.g_Ret_Sts_Unexp_Error;
5357: --Roll back the changes.
5358: IF p_commit = FND_API.G_TRUE THEN
5359: ROLLBACK TO DELETE_ISSUE_SVPT;
5360: END IF;
5361:
5362: -- Add the message that is reported in SQL Error.

Line 5387: p_Commit IN VARCHAR2 DEFAULT FND_API.G_FALSE

5383: to delete the Issue. The internal procedure is responsible
5384: for all validations.
5385: */
5386: Procedure Delete_Change_Request (
5387: p_Commit IN VARCHAR2 DEFAULT FND_API.G_FALSE
5388: , p_Init_Msg_List IN VARCHAR2 DEFAULT FND_API.G_FALSE
5389: , p_Api_Version_Number IN NUMBER
5390: , p_Ci_Id IN NUMBER
5391: , x_Return_Status OUT NOCOPY VARCHAR2

Line 5388: , p_Init_Msg_List IN VARCHAR2 DEFAULT FND_API.G_FALSE

5384: for all validations.
5385: */
5386: Procedure Delete_Change_Request (
5387: p_Commit IN VARCHAR2 DEFAULT FND_API.G_FALSE
5388: , p_Init_Msg_List IN VARCHAR2 DEFAULT FND_API.G_FALSE
5389: , p_Api_Version_Number IN NUMBER
5390: , p_Ci_Id IN NUMBER
5391: , x_Return_Status OUT NOCOPY VARCHAR2
5392: , x_Msg_Count OUT NOCOPY NUMBER

Line 5413: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list, FND_API.G_TRUE)) THEN

5409: PA_DEBUG.set_curr_function(p_function => 'Delete_Change_Request', p_debug_mode => l_debug_mode);
5410: END IF;
5411:
5412: -- Clear the Global PL/SQL Message table.
5413: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list, FND_API.G_TRUE)) THEN
5414: FND_MSG_PUB.initialize;
5415: END IF;
5416:
5417: IF p_commit = FND_API.G_TRUE THEN

Line 5417: IF p_commit = FND_API.G_TRUE THEN

5413: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list, FND_API.G_TRUE)) THEN
5414: FND_MSG_PUB.initialize;
5415: END IF;
5416:
5417: IF p_commit = FND_API.G_TRUE THEN
5418: savepoint DELETE_CR_SVPT;
5419: END IF;
5420:
5421: IF l_debug_mode = 'Y' THEN

Line 5429: x_Return_Status := FND_API.g_Ret_Sts_Success;

5425: -- Initialize the Error Stack.
5426: --PA_DEBUG.Init_Err_Stack ('PA_CONTROL_API_PUB.Delete_Change_Request');
5427:
5428: -- Initialize the Return Status to Success.
5429: x_Return_Status := FND_API.g_Ret_Sts_Success;
5430: x_Msg_Count := 0;
5431:
5432:
5433:

Line 5450: RAISE FND_API.G_EXC_ERROR;

5446: pa_debug.g_err_stage:= 'Invalid API Use';
5447: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
5448: end if;
5449: -- Raise the Error.
5450: RAISE FND_API.G_EXC_ERROR;
5451: END IF;
5452: CLOSE Get_CI_Type_Class_Code;
5453:
5454: -- Call the procedure Delete_CI to delete the Control Item.

Line 5466: IF p_commit = FND_API.G_TRUE and x_return_status = FND_API.G_RET_STS_SUCCESS THEN

5462: , x_Msg_Data => x_Msg_Data
5463: );
5464:
5465:
5466: IF p_commit = FND_API.G_TRUE and x_return_status = FND_API.G_RET_STS_SUCCESS THEN
5467: COMMIT;
5468: elsif x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
5469: raise FND_API.G_EXC_ERROR;
5470: END IF;

Line 5468: elsif x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

5464:
5465:
5466: IF p_commit = FND_API.G_TRUE and x_return_status = FND_API.G_RET_STS_SUCCESS THEN
5467: COMMIT;
5468: elsif x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
5469: raise FND_API.G_EXC_ERROR;
5470: END IF;
5471:
5472:

Line 5469: raise FND_API.G_EXC_ERROR;

5465:
5466: IF p_commit = FND_API.G_TRUE and x_return_status = FND_API.G_RET_STS_SUCCESS THEN
5467: COMMIT;
5468: elsif x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
5469: raise FND_API.G_EXC_ERROR;
5470: END IF;
5471:
5472:
5473: --Reset the stack

Line 5480: WHEN FND_API.G_EXC_ERROR THEN

5476: end if;
5477:
5478: -- If any Exception then catch it.
5479: EXCEPTION
5480: WHEN FND_API.G_EXC_ERROR THEN
5481: -- Set the Return Status as Error.
5482: x_Return_Status := FND_API.g_Ret_Sts_Error;
5483: -- Get the Message Count.
5484: l_Msg_Count := FND_MSG_PUB.Count_Msg;

Line 5482: x_Return_Status := FND_API.g_Ret_Sts_Error;

5478: -- If any Exception then catch it.
5479: EXCEPTION
5480: WHEN FND_API.G_EXC_ERROR THEN
5481: -- Set the Return Status as Error.
5482: x_Return_Status := FND_API.g_Ret_Sts_Error;
5483: -- Get the Message Count.
5484: l_Msg_Count := FND_MSG_PUB.Count_Msg;
5485:
5486: IF p_commit = FND_API.G_TRUE THEN

Line 5486: IF p_commit = FND_API.G_TRUE THEN

5482: x_Return_Status := FND_API.g_Ret_Sts_Error;
5483: -- Get the Message Count.
5484: l_Msg_Count := FND_MSG_PUB.Count_Msg;
5485:
5486: IF p_commit = FND_API.G_TRUE THEN
5487: ROLLBACK TO DELETE_CR_SVPT;
5488: END IF;
5489:
5490: IF (l_Msg_Count = 1) THEN

Line 5492: p_Encoded => FND_API.g_False

5488: END IF;
5489:
5490: IF (l_Msg_Count = 1) THEN
5491: PA_INTERFACE_UTILS_PUB.Get_Messages (
5492: p_Encoded => FND_API.g_False
5493: , p_Msg_Index => 1
5494: , p_Msg_Count => l_Msg_Count
5495: , p_Msg_Data => l_Msg_Data
5496: , p_Data => l_Data

Line 5513: x_Return_Status := FND_API.g_Ret_Sts_Unexp_Error;

5509: end if;
5510:
5511: WHEN OTHERS THEN
5512: -- Set the Return Status as Error.
5513: x_Return_Status := FND_API.g_Ret_Sts_Unexp_Error;
5514:
5515: IF p_commit = FND_API.G_TRUE THEN
5516: ROLLBACK TO DELETE_CR_SVPT;
5517: END IF;

Line 5515: IF p_commit = FND_API.G_TRUE THEN

5511: WHEN OTHERS THEN
5512: -- Set the Return Status as Error.
5513: x_Return_Status := FND_API.g_Ret_Sts_Unexp_Error;
5514:
5515: IF p_commit = FND_API.G_TRUE THEN
5516: ROLLBACK TO DELETE_CR_SVPT;
5517: END IF;
5518:
5519: -- Add the message that is reported in SQL Error.

Line 5544: p_Commit IN VARCHAR2 DEFAULT FND_API.G_FALSE

5540: to delete the Issue. The internal procedure is responsible
5541: for all validations.
5542: */
5543: Procedure Delete_Change_Order (
5544: p_Commit IN VARCHAR2 DEFAULT FND_API.G_FALSE
5545: , p_Init_Msg_List IN VARCHAR2 DEFAULT FND_API.G_FALSE
5546: , p_Api_Version_Number IN NUMBER
5547: , p_Ci_Id IN NUMBER
5548: , x_Return_Status OUT NOCOPY VARCHAR2

Line 5545: , p_Init_Msg_List IN VARCHAR2 DEFAULT FND_API.G_FALSE

5541: for all validations.
5542: */
5543: Procedure Delete_Change_Order (
5544: p_Commit IN VARCHAR2 DEFAULT FND_API.G_FALSE
5545: , p_Init_Msg_List IN VARCHAR2 DEFAULT FND_API.G_FALSE
5546: , p_Api_Version_Number IN NUMBER
5547: , p_Ci_Id IN NUMBER
5548: , x_Return_Status OUT NOCOPY VARCHAR2
5549: , x_Msg_Count OUT NOCOPY NUMBER

Line 5570: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list, FND_API.G_TRUE)) THEN

5566: PA_DEBUG.set_curr_function(p_function => 'Delete_Change_Order', p_debug_mode => l_debug_mode);
5567: END IF;
5568:
5569: -- Clear the Global PL/SQL Message table.
5570: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list, FND_API.G_TRUE)) THEN
5571: FND_MSG_PUB.initialize;
5572: END IF;
5573:
5574: IF p_commit = FND_API.G_TRUE THEN

Line 5574: IF p_commit = FND_API.G_TRUE THEN

5570: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list, FND_API.G_TRUE)) THEN
5571: FND_MSG_PUB.initialize;
5572: END IF;
5573:
5574: IF p_commit = FND_API.G_TRUE THEN
5575: savepoint DELETE_CO_SVPT;
5576: END IF;
5577:
5578: IF l_debug_mode = 'Y' THEN

Line 5585: x_Return_Status := FND_API.g_Ret_Sts_Success;

5581: -- Initialize the Error Stack.
5582: --PA_DEBUG.Init_Err_Stack ('PA_CONTROL_API_PUB.Delete_Change_Order');
5583:
5584: -- Initialize the Return Status to Success.
5585: x_Return_Status := FND_API.g_Ret_Sts_Success;
5586: x_Msg_Count := 0;
5587:
5588:
5589: -- Check whether the Ci_Id that is passed in is for a CO or not.

Line 5605: RAISE FND_API.G_EXC_ERROR;

5601: pa_debug.g_err_stage:= 'Invalid API Use';
5602: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
5603: end if;
5604: -- Raise an Error.
5605: RAISE FND_API.G_EXC_ERROR;
5606: END IF;
5607: CLOSE Get_CI_Type_Class_Code;
5608:
5609: -- Call the procedure Delete_CI to delete the Control Item.

Line 5620: IF p_commit = FND_API.G_TRUE and x_return_status = FND_API.G_RET_STS_SUCCESS THEN

5616: , x_Msg_Count => x_Msg_Count
5617: , x_Msg_Data => x_Msg_Data
5618: );
5619:
5620: IF p_commit = FND_API.G_TRUE and x_return_status = FND_API.G_RET_STS_SUCCESS THEN
5621: COMMIT;
5622: elsif x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
5623: raise FND_API.G_EXC_ERROR;
5624: END IF;

Line 5622: elsif x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

5618: );
5619:
5620: IF p_commit = FND_API.G_TRUE and x_return_status = FND_API.G_RET_STS_SUCCESS THEN
5621: COMMIT;
5622: elsif x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
5623: raise FND_API.G_EXC_ERROR;
5624: END IF;
5625:
5626: -- Reset the Error Stack.

Line 5623: raise FND_API.G_EXC_ERROR;

5619:
5620: IF p_commit = FND_API.G_TRUE and x_return_status = FND_API.G_RET_STS_SUCCESS THEN
5621: COMMIT;
5622: elsif x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
5623: raise FND_API.G_EXC_ERROR;
5624: END IF;
5625:
5626: -- Reset the Error Stack.
5627: if l_debug_mode = 'Y' then

Line 5633: WHEN FND_API.G_EXC_ERROR THEN

5629: end if;
5630:
5631: -- If any Exception then catch it.
5632: EXCEPTION
5633: WHEN FND_API.G_EXC_ERROR THEN
5634: -- Set the Return Status as Error.
5635: x_Return_Status := FND_API.g_Ret_Sts_Error;
5636: -- Get the Message Count.
5637: l_Msg_Count := FND_MSG_PUB.Count_Msg;

Line 5635: x_Return_Status := FND_API.g_Ret_Sts_Error;

5631: -- If any Exception then catch it.
5632: EXCEPTION
5633: WHEN FND_API.G_EXC_ERROR THEN
5634: -- Set the Return Status as Error.
5635: x_Return_Status := FND_API.g_Ret_Sts_Error;
5636: -- Get the Message Count.
5637: l_Msg_Count := FND_MSG_PUB.Count_Msg;
5638:
5639: IF p_commit = FND_API.G_TRUE THEN

Line 5639: IF p_commit = FND_API.G_TRUE THEN

5635: x_Return_Status := FND_API.g_Ret_Sts_Error;
5636: -- Get the Message Count.
5637: l_Msg_Count := FND_MSG_PUB.Count_Msg;
5638:
5639: IF p_commit = FND_API.G_TRUE THEN
5640: ROLLBACK TO DELETE_CO_SVPT;
5641: END IF;
5642:
5643: IF (l_Msg_Count = 1) THEN

Line 5645: p_Encoded => FND_API.g_False

5641: END IF;
5642:
5643: IF (l_Msg_Count = 1) THEN
5644: PA_INTERFACE_UTILS_PUB.Get_Messages (
5645: p_Encoded => FND_API.g_False
5646: , p_Msg_Index => 1
5647: , p_Msg_Count => l_Msg_Count
5648: , p_Msg_Data => l_Msg_Data
5649: , p_Data => l_Data

Line 5665: x_Return_Status := FND_API.g_Ret_Sts_Unexp_Error;

5661: end if;
5662:
5663: WHEN OTHERS THEN
5664: -- Set the Return Status as Error.
5665: x_Return_Status := FND_API.g_Ret_Sts_Unexp_Error;
5666:
5667: IF p_commit = FND_API.G_TRUE THEN
5668: ROLLBACK TO DELETE_CO_SVPT;
5669: END IF;

Line 5667: IF p_commit = FND_API.G_TRUE THEN

5663: WHEN OTHERS THEN
5664: -- Set the Return Status as Error.
5665: x_Return_Status := FND_API.g_Ret_Sts_Unexp_Error;
5666:
5667: IF p_commit = FND_API.G_TRUE THEN
5668: ROLLBACK TO DELETE_CO_SVPT;
5669: END IF;
5670:
5671: -- Add the message that is reported in SQL Error.

Line 5700: p_Commit IN VARCHAR2 DEFAULT FND_API.G_FALSE

5696: 2. Check whether the logged in user has View acceess on
5697: the Control Item or not.
5698: */
5699: Procedure Add_Comments (
5700: p_Commit IN VARCHAR2 DEFAULT FND_API.G_FALSE
5701: , p_Init_Msg_List IN VARCHAR2 DEFAULT FND_API.G_FALSE
5702: , p_Api_Version_Number IN NUMBER
5703: , p_Ci_Id IN NUMBER
5704: , p_Comments_Tbl IN CI_COMMENTS_TBL_TYPE

Line 5701: , p_Init_Msg_List IN VARCHAR2 DEFAULT FND_API.G_FALSE

5697: the Control Item or not.
5698: */
5699: Procedure Add_Comments (
5700: p_Commit IN VARCHAR2 DEFAULT FND_API.G_FALSE
5701: , p_Init_Msg_List IN VARCHAR2 DEFAULT FND_API.G_FALSE
5702: , p_Api_Version_Number IN NUMBER
5703: , p_Ci_Id IN NUMBER
5704: , p_Comments_Tbl IN CI_COMMENTS_TBL_TYPE
5705: , x_Return_Status OUT NOCOPY VARCHAR2

Line 5732: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list, FND_API.G_TRUE)) THEN

5728: PA_DEBUG.set_curr_function(p_function => 'Add_Comments', p_debug_mode => l_debug_mode);
5729: END IF;
5730:
5731: -- Clear the Global PL/SQL Message table.
5732: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list, FND_API.G_TRUE)) THEN
5733: FND_MSG_PUB.initialize;
5734: END IF;
5735:
5736: IF l_debug_mode = 'Y' THEN

Line 5741: IF (p_Commit = FND_API.G_TRUE) THEN

5737: pa_debug.write(l_module_name, 'Start of Add_Comments', l_debug_level3);
5738: END IF;
5739:
5740: -- Set the SavePoint if we have been requested to Commit the Data.
5741: IF (p_Commit = FND_API.G_TRUE) THEN
5742: SAVEPOINT ADD_COMMENTS_SVPT;
5743: END IF;
5744:
5745: -- Initialize the Return Status to Success.

Line 5746: x_Return_Status := FND_API.g_Ret_Sts_Success;

5742: SAVEPOINT ADD_COMMENTS_SVPT;
5743: END IF;
5744:
5745: -- Initialize the Return Status to Success.
5746: x_Return_Status := FND_API.g_Ret_Sts_Success;
5747: x_Msg_Count := 0;
5748:
5749:
5750: -- If the Ci_Id that is passed in is NULL then report

Line 5763: RAISE FND_API.G_EXC_ERROR;

5759: pa_debug.g_err_stage:= 'CI_ID is not passed';
5760: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
5761: end if;
5762: -- Raise the Invalid Argument exception.
5763: RAISE FND_API.G_EXC_ERROR;
5764: END IF;
5765:
5766: -- If the Ci_Id that is passed in does not exist then
5767: -- report Error.

Line 5784: RAISE FND_API.G_EXC_ERROR;

5780: pa_debug.g_err_stage:= 'CI_ID is invalid';
5781: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
5782: end if;
5783: -- Raise the Invalid Argument exception.
5784: RAISE FND_API.G_EXC_ERROR;
5785: END IF;
5786: CLOSE Check_Valid_CI;
5787:
5788: -- Open Cursor Get_CI_Data and fetch the data into out local variables.

Line 5799: RAISE FND_API.G_EXC_ERROR;

5795: pa_debug.g_err_stage:= 'CI_ID is invalid, No data founc in Get_CI_Data Cursor';
5796: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
5797: end if;
5798: CLOSE Get_CI_Data;
5799: RAISE FND_API.G_EXC_ERROR;
5800: END IF;
5801: CLOSE Get_CI_Data;
5802:
5803:

Line 5832: IF (x_Return_Status <> FND_API.G_RET_STS_SUCCESS) THEN

5828: );
5829:
5830: -- If at any time, the Return Status is not success
5831: -- then raise exception to rollbakc all changes.
5832: IF (x_Return_Status <> FND_API.G_RET_STS_SUCCESS) THEN
5833: RAISE FND_API.G_EXC_ERROR;
5834: END IF;
5835: END LOOP;
5836: ELSE -- If View access is denied to the User for this Control Item.

Line 5833: RAISE FND_API.G_EXC_ERROR;

5829:
5830: -- If at any time, the Return Status is not success
5831: -- then raise exception to rollbakc all changes.
5832: IF (x_Return_Status <> FND_API.G_RET_STS_SUCCESS) THEN
5833: RAISE FND_API.G_EXC_ERROR;
5834: END IF;
5835: END LOOP;
5836: ELSE -- If View access is denied to the User for this Control Item.
5837: -- Add message to the Error Stack that the user does not

Line 5845: RAISE FND_API.G_EXC_ERROR;

5841: , p_Msg_Name => 'PA_CI_NO_ALLOW_UPDATE'
5842: );
5843:
5844: -- Raise exception.
5845: RAISE FND_API.G_EXC_ERROR;
5846: END IF;
5847:
5848: -- Commit the data to the Database if p_Commit is True
5849: -- and there are no Errors.

Line 5850: IF (p_Commit = FND_API.G_TRUE AND x_Return_Status = FND_API.G_RET_STS_SUCCESS) THEN

5846: END IF;
5847:
5848: -- Commit the data to the Database if p_Commit is True
5849: -- and there are no Errors.
5850: IF (p_Commit = FND_API.G_TRUE AND x_Return_Status = FND_API.G_RET_STS_SUCCESS) THEN
5851: COMMIT;
5852: END IF;
5853:
5854: -- Reset the Error Stack.

Line 5861: WHEN FND_API.G_EXC_ERROR THEN

5857: end if;
5858:
5859: -- If any Exception then catch it.
5860: EXCEPTION
5861: WHEN FND_API.G_EXC_ERROR THEN
5862: -- Rollback.
5863: IF (p_Commit = FND_API.G_TRUE) THEN
5864: ROLLBACK TO ADD_COMMENTS_SVPT;
5865: END IF;

Line 5863: IF (p_Commit = FND_API.G_TRUE) THEN

5859: -- If any Exception then catch it.
5860: EXCEPTION
5861: WHEN FND_API.G_EXC_ERROR THEN
5862: -- Rollback.
5863: IF (p_Commit = FND_API.G_TRUE) THEN
5864: ROLLBACK TO ADD_COMMENTS_SVPT;
5865: END IF;
5866:
5867: -- Set the Return Status as Error.

Line 5868: x_Return_Status := FND_API.g_Ret_Sts_Error;

5864: ROLLBACK TO ADD_COMMENTS_SVPT;
5865: END IF;
5866:
5867: -- Set the Return Status as Error.
5868: x_Return_Status := FND_API.g_Ret_Sts_Error;
5869: -- Get the Message Count.
5870: l_Msg_Count := FND_MSG_PUB.Count_Msg;
5871:
5872: IF (l_Msg_Count = 1) THEN

Line 5874: p_Encoded => FND_API.g_False

5870: l_Msg_Count := FND_MSG_PUB.Count_Msg;
5871:
5872: IF (l_Msg_Count = 1) THEN
5873: PA_INTERFACE_UTILS_PUB.Get_Messages (
5874: p_Encoded => FND_API.g_False
5875: , p_Msg_Index => 1
5876: , p_Msg_Count => l_Msg_Count
5877: , p_Msg_Data => l_Msg_Data
5878: , p_Data => l_Data

Line 5894: IF (p_Commit = FND_API.G_TRUE) THEN

5890: end if;
5891:
5892: WHEN OTHERS THEN
5893: -- Rollback.
5894: IF (p_Commit = FND_API.G_TRUE) THEN
5895: ROLLBACK TO ADD_COMMENTS_SVPT;
5896: END IF;
5897:
5898: -- Set the Return Status as Error.

Line 5899: x_Return_Status := FND_API.g_Ret_Sts_Unexp_Error;

5895: ROLLBACK TO ADD_COMMENTS_SVPT;
5896: END IF;
5897:
5898: -- Set the Return Status as Error.
5899: x_Return_Status := FND_API.g_Ret_Sts_Unexp_Error;
5900:
5901: -- Add the message that is reported in SQL Error.
5902: FND_MSG_PUB.Add_Exc_Msg (
5903: p_Pkg_Name => 'PA_CONTROL_API_PUB',

Line 5931: p_Commit IN VARCHAR2 DEFAULT FND_API.G_FALSE

5927: Control Item and whether the Control Item in question can
5928: be updated or not based on its current status.
5929: */
5930: Procedure Add_Related_Items (
5931: p_Commit IN VARCHAR2 DEFAULT FND_API.G_FALSE
5932: , p_Init_Msg_List IN VARCHAR2 DEFAULT FND_API.G_FALSE
5933: , p_Api_Version_Number IN NUMBER
5934: , p_Ci_Id IN NUMBER
5935: , p_Related_Items_Tbl IN REL_ITEM_IN_TABLE_TYPE

Line 5932: , p_Init_Msg_List IN VARCHAR2 DEFAULT FND_API.G_FALSE

5928: be updated or not based on its current status.
5929: */
5930: Procedure Add_Related_Items (
5931: p_Commit IN VARCHAR2 DEFAULT FND_API.G_FALSE
5932: , p_Init_Msg_List IN VARCHAR2 DEFAULT FND_API.G_FALSE
5933: , p_Api_Version_Number IN NUMBER
5934: , p_Ci_Id IN NUMBER
5935: , p_Related_Items_Tbl IN REL_ITEM_IN_TABLE_TYPE
5936: , x_Return_Status OUT NOCOPY VARCHAR2

Line 5966: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list, FND_API.G_TRUE)) THEN

5962: PA_DEBUG.set_curr_function(p_function => 'Add_Related_Items', p_debug_mode => l_debug_mode);
5963: END IF;
5964:
5965: -- Clear the Global PL/SQL Message table.
5966: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list, FND_API.G_TRUE)) THEN
5967: FND_MSG_PUB.initialize;
5968: END IF;
5969:
5970: IF l_debug_mode = 'Y' THEN

Line 5977: IF (p_Commit = FND_API.G_TRUE) THEN

5973: -- Initialize the Error Stack.
5974: --PA_DEBUG.Init_Err_Stack ('PA_CONTROL_API_PUB.Add_Related_Items');
5975:
5976: -- Set the SavePoint if we have been requested to Commit the Data.
5977: IF (p_Commit = FND_API.G_TRUE) THEN
5978: SAVEPOINT ADD_RELATED_ITEMS_SVPT;
5979: END IF;
5980:
5981: -- Initialize the Return Status to Success.

Line 5982: x_Return_Status := FND_API.g_Ret_Sts_Success;

5978: SAVEPOINT ADD_RELATED_ITEMS_SVPT;
5979: END IF;
5980:
5981: -- Initialize the Return Status to Success.
5982: x_Return_Status := FND_API.g_Ret_Sts_Success;
5983: x_Msg_Count := 0;
5984:
5985:
5986:

Line 6000: RAISE FND_API.G_EXC_ERROR;

5996: pa_debug.g_err_stage:= 'CI_ID is not passed';
5997: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
5998: end if;
5999: -- Raise the Invalid Argument exception.
6000: RAISE FND_API.G_EXC_ERROR;
6001: END IF;
6002:
6003: -- If the Ci_Id that is passed in does not exist then
6004: -- report Error.

Line 6021: RAISE FND_API.G_EXC_ERROR;

6017: pa_debug.g_err_stage:= 'CI_ID is Invalid';
6018: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
6019: end if;
6020: -- Raise the Invalid Argument exception.
6021: RAISE FND_API.G_EXC_ERROR;
6022: END IF;
6023: CLOSE Check_Valid_CI;
6024:
6025: -- Open Cursor Get_CI_Data and fetch the data into our local variables.

Line 6032: RAISE FND_API.G_EXC_ERROR;

6028: -- If NO_DATA_FOUND then report Error.
6029: IF (Get_CI_Data%NOTFOUND) THEN
6030: -- Code to Report Error and Return.
6031: CLOSE Get_CI_Data;
6032: RAISE FND_API.G_EXC_ERROR;
6033: END IF;
6034: CLOSE Get_CI_Data;
6035:
6036: -- Check whether Workflow is running on this Control Item or not.

Line 6097: IF (x_Return_Status <> FND_API.G_RET_STS_SUCCESS) THEN

6093: );
6094:
6095: -- If at any time, the Return Status is not success
6096: -- then Raise Exception to Rollback all changes.
6097: IF (x_Return_Status <> FND_API.G_RET_STS_SUCCESS) THEN
6098: RAISE FND_API.G_EXC_ERROR;
6099: END IF;
6100: END IF;
6101: END LOOP;

Line 6098: RAISE FND_API.G_EXC_ERROR;

6094:
6095: -- If at any time, the Return Status is not success
6096: -- then Raise Exception to Rollback all changes.
6097: IF (x_Return_Status <> FND_API.G_RET_STS_SUCCESS) THEN
6098: RAISE FND_API.G_EXC_ERROR;
6099: END IF;
6100: END IF;
6101: END LOOP;
6102:

Line 6106: RAISE FND_API.G_EXC_ERROR;

6102:
6103: -- Check for errors. If any related item was invalid,
6104: -- then report Error and rollback all changes.
6105: IF (l_AnyError = 'Y') THEN
6106: RAISE FND_API.G_EXC_ERROR;
6107: END IF;
6108: ELSE
6109: -- Check if Update Access was denied or not.
6110: IF (l_UpdateAccess <> 'T') THEN

Line 6138: RAISE FND_API.G_EXC_ERROR;

6134: end if;
6135: END IF;
6136:
6137: -- Raise the Invalid Argument exception.
6138: RAISE FND_API.G_EXC_ERROR;
6139: END IF;
6140: ELSE
6141: -- Close the Cursor.
6142: CLOSE Check_Workflow_On_CI;

Line 6155: RAISE FND_API.G_EXC_ERROR;

6151: pa_debug.g_err_stage:= 'Ci_Id has Workflow attached.';
6152: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
6153: end if;
6154: -- Raise the Invalid Argument exception.
6155: RAISE FND_API.G_EXC_ERROR;
6156: END IF;
6157:
6158: -- Commit the data to the Database if p_Commit is True
6159: -- and there are no Errors.

Line 6160: IF (p_Commit = FND_API.G_TRUE AND x_Return_Status = FND_API.G_RET_STS_SUCCESS) THEN

6156: END IF;
6157:
6158: -- Commit the data to the Database if p_Commit is True
6159: -- and there are no Errors.
6160: IF (p_Commit = FND_API.G_TRUE AND x_Return_Status = FND_API.G_RET_STS_SUCCESS) THEN
6161: COMMIT;
6162: END IF;
6163:
6164: -- Reset the Error Stack.

Line 6171: WHEN FND_API.G_EXC_ERROR THEN

6167: end if;
6168:
6169: -- If any Exception then catch it.
6170: EXCEPTION
6171: WHEN FND_API.G_EXC_ERROR THEN
6172: -- Rollback.
6173: IF (p_Commit = FND_API.G_TRUE) THEN
6174: ROLLBACK TO ADD_RELATED_ITEMS_SVPT;
6175: END IF;

Line 6173: IF (p_Commit = FND_API.G_TRUE) THEN

6169: -- If any Exception then catch it.
6170: EXCEPTION
6171: WHEN FND_API.G_EXC_ERROR THEN
6172: -- Rollback.
6173: IF (p_Commit = FND_API.G_TRUE) THEN
6174: ROLLBACK TO ADD_RELATED_ITEMS_SVPT;
6175: END IF;
6176:
6177: -- Set the Return Status as Error.

Line 6178: x_Return_Status := FND_API.g_Ret_Sts_Error;

6174: ROLLBACK TO ADD_RELATED_ITEMS_SVPT;
6175: END IF;
6176:
6177: -- Set the Return Status as Error.
6178: x_Return_Status := FND_API.g_Ret_Sts_Error;
6179: -- Get the Message Count.
6180: l_Msg_Count := FND_MSG_PUB.Count_Msg;
6181:
6182: IF (l_Msg_Count = 1) THEN

Line 6184: p_Encoded => FND_API.g_False

6180: l_Msg_Count := FND_MSG_PUB.Count_Msg;
6181:
6182: IF (l_Msg_Count = 1) THEN
6183: PA_INTERFACE_UTILS_PUB.Get_Messages (
6184: p_Encoded => FND_API.g_False
6185: , p_Msg_Index => 1
6186: , p_Msg_Count => l_Msg_Count
6187: , p_Msg_Data => l_Msg_Data
6188: , p_Data => l_Data

Line 6204: IF (p_Commit = FND_API.G_TRUE) THEN

6200: end if;
6201:
6202: WHEN OTHERS THEN
6203: -- Rollback.
6204: IF (p_Commit = FND_API.G_TRUE) THEN
6205: ROLLBACK TO ADD_RELATED_ITEMS_SVPT;
6206: END IF;
6207:
6208: -- Set the Return Status as Error.

Line 6209: x_Return_Status := FND_API.g_Ret_Sts_Unexp_Error;

6205: ROLLBACK TO ADD_RELATED_ITEMS_SVPT;
6206: END IF;
6207:
6208: -- Set the Return Status as Error.
6209: x_Return_Status := FND_API.g_Ret_Sts_Unexp_Error;
6210:
6211: -- Add the message that is reported in SQL Error.
6212: FND_MSG_PUB.Add_Exc_Msg (
6213: p_Pkg_Name => 'PA_CONTROL_API_PUB',

Line 6239: p_Commit IN VARCHAR2 DEFAULT FND_API.G_FALSE

6235: Control Item and whether the Control Item in question can
6236: be updated or not based on its current status.
6237: */
6238: Procedure Delete_Related_Item (
6239: p_Commit IN VARCHAR2 DEFAULT FND_API.G_FALSE
6240: , p_Init_Msg_List IN VARCHAR2 DEFAULT FND_API.G_FALSE
6241: , p_Api_Version_Number IN NUMBER
6242: , p_Ci_Id IN NUMBER
6243: , p_To_Ci_Id IN NUMBER

Line 6240: , p_Init_Msg_List IN VARCHAR2 DEFAULT FND_API.G_FALSE

6236: be updated or not based on its current status.
6237: */
6238: Procedure Delete_Related_Item (
6239: p_Commit IN VARCHAR2 DEFAULT FND_API.G_FALSE
6240: , p_Init_Msg_List IN VARCHAR2 DEFAULT FND_API.G_FALSE
6241: , p_Api_Version_Number IN NUMBER
6242: , p_Ci_Id IN NUMBER
6243: , p_To_Ci_Id IN NUMBER
6244: , x_Return_Status OUT NOCOPY VARCHAR2

Line 6272: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list, FND_API.G_TRUE)) THEN

6268: PA_DEBUG.set_curr_function(p_function => 'Delete_Related_Item', p_debug_mode => l_debug_mode);
6269: END IF;
6270:
6271: -- Clear the Global PL/SQL Message table.
6272: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list, FND_API.G_TRUE)) THEN
6273: FND_MSG_PUB.initialize;
6274: END IF;
6275:
6276: -- Set the SavePoint if we have been requested to Commit the Data.

Line 6277: IF (p_Commit = FND_API.G_TRUE) THEN

6273: FND_MSG_PUB.initialize;
6274: END IF;
6275:
6276: -- Set the SavePoint if we have been requested to Commit the Data.
6277: IF (p_Commit = FND_API.G_TRUE) THEN
6278: SAVEPOINT DELETE_RELATED_ITEMS_SVPT;
6279: END IF;
6280:
6281:

Line 6289: x_Return_Status := FND_API.g_Ret_Sts_Success;

6285: -- Initialize the Error Stack.
6286: --PA_DEBUG.Init_Err_Stack ('PA_CONTROL_API_PUB.Delete_Related_Item');
6287:
6288: -- Initialize the Return Status to Success.
6289: x_Return_Status := FND_API.g_Ret_Sts_Success;
6290: x_Msg_Count := 0;
6291:
6292:
6293: -- If any of the Ci_Ids that are passed in is NULL then

Line 6306: RAISE FND_API.G_EXC_ERROR;

6302: pa_debug.g_err_stage:= 'CI_ID or TO_CI_ID is not passed';
6303: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
6304: end if;
6305: -- Raise the Invalid Argument exception.
6306: RAISE FND_API.G_EXC_ERROR;
6307: END IF;
6308:
6309: -- If the Ci_Id that is passed in does not exist then
6310: -- report Error.

Line 6327: RAISE FND_API.G_EXC_ERROR;

6323: pa_debug.g_err_stage:= 'CI_ID is Invalid';
6324: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
6325: end if;
6326: -- Raise the Invalid Argument exception.
6327: RAISE FND_API.G_EXC_ERROR;
6328: END IF;
6329: CLOSE Check_Valid_CI;
6330:
6331: -- If the To_Ci_Id that is passed in does not exist then

Line 6349: RAISE FND_API.G_EXC_ERROR;

6345: pa_debug.g_err_stage:= 'TO_CI_ID is Invalid';
6346: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
6347: end if;
6348: -- Raise the Invalid Argument exception.
6349: RAISE FND_API.G_EXC_ERROR;
6350: END IF;
6351: CLOSE Check_Valid_CI;
6352:
6353: -- Open Cursor Get_CI_Data and fetch the data into our local variables.

Line 6360: RAISE FND_API.G_EXC_ERROR;

6356: -- If NO_DATA_FOUND then report Error.
6357: IF (Get_CI_Data%NOTFOUND) THEN
6358: -- Code to Report Error and Return.
6359: CLOSE Get_CI_Data;
6360: RAISE FND_API.G_EXC_ERROR;
6361: END IF;
6362: CLOSE Get_CI_Data;
6363:
6364: -- Check whether Workflow is running on this Control Item or not.

Line 6425: RAISE FND_API.G_EXC_ERROR;

6421: end if;
6422: END IF;
6423:
6424: -- Raise the Invalid Argument exception.
6425: RAISE FND_API.G_EXC_ERROR;
6426: END IF;
6427: ELSE
6428: -- Close the Cursor.
6429: CLOSE Check_Workflow_On_CI;

Line 6442: RAISE FND_API.G_EXC_ERROR;

6438: pa_debug.g_err_stage:= 'CI_ID has WorkFlow Attached';
6439: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
6440: end if;
6441: -- Raise the Invalid Argument exception.
6442: RAISE FND_API.G_EXC_ERROR;
6443: END IF;
6444:
6445: IF p_commit = FND_API.G_TRUE and x_return_status = FND_API.G_RET_STS_SUCCESS THEN
6446: COMMIT;

Line 6445: IF p_commit = FND_API.G_TRUE and x_return_status = FND_API.G_RET_STS_SUCCESS THEN

6441: -- Raise the Invalid Argument exception.
6442: RAISE FND_API.G_EXC_ERROR;
6443: END IF;
6444:
6445: IF p_commit = FND_API.G_TRUE and x_return_status = FND_API.G_RET_STS_SUCCESS THEN
6446: COMMIT;
6447: elsif x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
6448: raise FND_API.G_EXC_ERROR;
6449: END IF;

Line 6447: elsif x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

6443: END IF;
6444:
6445: IF p_commit = FND_API.G_TRUE and x_return_status = FND_API.G_RET_STS_SUCCESS THEN
6446: COMMIT;
6447: elsif x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
6448: raise FND_API.G_EXC_ERROR;
6449: END IF;
6450:
6451: -- Reset the Error Stack.

Line 6448: raise FND_API.G_EXC_ERROR;

6444:
6445: IF p_commit = FND_API.G_TRUE and x_return_status = FND_API.G_RET_STS_SUCCESS THEN
6446: COMMIT;
6447: elsif x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
6448: raise FND_API.G_EXC_ERROR;
6449: END IF;
6450:
6451: -- Reset the Error Stack.
6452: if l_debug_mode = 'Y' then

Line 6458: WHEN FND_API.G_EXC_ERROR THEN

6454: end if;
6455:
6456: -- If any Exception then catch it.
6457: EXCEPTION
6458: WHEN FND_API.G_EXC_ERROR THEN
6459: -- Set the Return Status as Error.
6460: x_Return_Status := FND_API.g_Ret_Sts_Error;
6461: -- Get the Message Count.
6462: l_Msg_Count := FND_MSG_PUB.Count_Msg;

Line 6460: x_Return_Status := FND_API.g_Ret_Sts_Error;

6456: -- If any Exception then catch it.
6457: EXCEPTION
6458: WHEN FND_API.G_EXC_ERROR THEN
6459: -- Set the Return Status as Error.
6460: x_Return_Status := FND_API.g_Ret_Sts_Error;
6461: -- Get the Message Count.
6462: l_Msg_Count := FND_MSG_PUB.Count_Msg;
6463:
6464: -- Rollback.

Line 6465: IF (p_Commit = FND_API.G_TRUE) THEN

6461: -- Get the Message Count.
6462: l_Msg_Count := FND_MSG_PUB.Count_Msg;
6463:
6464: -- Rollback.
6465: IF (p_Commit = FND_API.G_TRUE) THEN
6466: ROLLBACK TO DELETE_RELATED_ITEMS_SVPT;
6467: END IF;
6468:
6469: IF (l_Msg_Count = 1) THEN

Line 6471: p_Encoded => FND_API.g_False

6467: END IF;
6468:
6469: IF (l_Msg_Count = 1) THEN
6470: PA_INTERFACE_UTILS_PUB.Get_Messages (
6471: p_Encoded => FND_API.g_False
6472: , p_Msg_Index => 1
6473: , p_Msg_Count => l_Msg_Count
6474: , p_Msg_Data => l_Msg_Data
6475: , p_Data => l_Data

Line 6491: x_Return_Status := FND_API.g_Ret_Sts_Unexp_Error;

6487: end if;
6488:
6489: WHEN OTHERS THEN
6490: -- Set the Return Status as Error.
6491: x_Return_Status := FND_API.g_Ret_Sts_Unexp_Error;
6492:
6493: -- Rollback.
6494: IF (p_Commit = FND_API.G_TRUE) THEN
6495: ROLLBACK TO DELETE_RELATED_ITEMS_SVPT;

Line 6494: IF (p_Commit = FND_API.G_TRUE) THEN

6490: -- Set the Return Status as Error.
6491: x_Return_Status := FND_API.g_Ret_Sts_Unexp_Error;
6492:
6493: -- Rollback.
6494: IF (p_Commit = FND_API.G_TRUE) THEN
6495: ROLLBACK TO DELETE_RELATED_ITEMS_SVPT;
6496: END IF;
6497:
6498: -- Add the message that is reported in SQL Error.

Line 6518: p_commit IN VARCHAR2 := FND_API.G_FALSE,

6514: END Delete_Related_Item;
6515:
6516:
6517: PROCEDURE UPDATE_ISSUE (
6518: p_commit IN VARCHAR2 := FND_API.G_FALSE,
6519: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
6520: p_api_version_number IN NUMBER,
6521: x_return_status OUT NOCOPY VARCHAR2,
6522: x_msg_count OUT NOCOPY NUMBER,

Line 6519: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,

6515:
6516:
6517: PROCEDURE UPDATE_ISSUE (
6518: p_commit IN VARCHAR2 := FND_API.G_FALSE,
6519: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
6520: p_api_version_number IN NUMBER,
6521: x_return_status OUT NOCOPY VARCHAR2,
6522: x_msg_count OUT NOCOPY NUMBER,
6523: x_msg_data OUT NOCOPY VARCHAR2,

Line 6743: l_validate_only VARCHAR2(1) := FND_API.g_false;

6739: l_wf_success_status_code pa_project_statuses.wf_success_status_code%TYPE;
6740: l_wf_failure_status_code pa_project_statuses.wf_failure_status_code%TYPE;
6741: l_status_change_flag VARCHAR2(1) := 'N';
6742: l_start_wf VARCHAR2(1) := 'Y';
6743: l_validate_only VARCHAR2(1) := FND_API.g_false;
6744: l_max_msg_count NUMBER := FND_API.G_MISS_NUM;
6745: l_enforce_security VARCHAR2(1) := 'Y';
6746: l_num_of_actions NUMBER;
6747: l_priority_type VARCHAR2(30) := 'PA_TASK_PRIORITY_CODE';

Line 6744: l_max_msg_count NUMBER := FND_API.G_MISS_NUM;

6740: l_wf_failure_status_code pa_project_statuses.wf_failure_status_code%TYPE;
6741: l_status_change_flag VARCHAR2(1) := 'N';
6742: l_start_wf VARCHAR2(1) := 'Y';
6743: l_validate_only VARCHAR2(1) := FND_API.g_false;
6744: l_max_msg_count NUMBER := FND_API.G_MISS_NUM;
6745: l_enforce_security VARCHAR2(1) := 'Y';
6746: l_num_of_actions NUMBER;
6747: l_priority_type VARCHAR2(30) := 'PA_TASK_PRIORITY_CODE';
6748: l_effort_type VARCHAR2(30) := 'PA_CI_EFFORT_LEVELS';

Line 6772: x_return_status := FND_API.G_RET_STS_SUCCESS;

6768:
6769:
6770: BEGIN
6771:
6772: x_return_status := FND_API.G_RET_STS_SUCCESS;
6773:
6774: l_debug_mode := NVL(FND_PROFILE.VALUE_SPECIFIC('PA_DEBUG_MODE', fnd_global.user_id, fnd_global.login_id, 275, null, null), 'N');
6775:
6776: IF l_debug_mode = 'Y' THEN

Line 6780: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list, FND_API.G_TRUE)) THEN

6776: IF l_debug_mode = 'Y' THEN
6777: PA_DEBUG.set_curr_function(p_function => 'UPDATE_ISSUE', p_debug_mode => l_debug_mode);
6778: END IF;
6779:
6780: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list, FND_API.G_TRUE)) THEN
6781: FND_MSG_PUB.initialize;
6782: END IF;
6783:
6784: IF p_commit = FND_API.G_TRUE THEN

Line 6784: IF p_commit = FND_API.G_TRUE THEN

6780: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list, FND_API.G_TRUE)) THEN
6781: FND_MSG_PUB.initialize;
6782: END IF;
6783:
6784: IF p_commit = FND_API.G_TRUE THEN
6785: savepoint UPDATE_ISSUE_SVPT;
6786: END IF;
6787:
6788: IF l_debug_mode = 'Y' THEN

Line 6798: RAISE FND_API.G_EXC_ERROR;

6794: IF curr_row%NOTFOUND then
6795: close curr_row;
6796: PA_UTILS.Add_Message( p_app_short_name => 'PA'
6797: ,p_msg_name => 'PA_CI_INVALID_ITEM'); /* Change this message */
6798: RAISE FND_API.G_EXC_ERROR;
6799: ELSE
6800:
6801: l_curr_status_code := cp.status_code;
6802: l_record_version_number := cp.record_version_number;

Line 6864: RAISE FND_API.G_EXC_ERROR;

6860: if l_debug_mode = 'Y' then
6861: pa_debug.g_err_stage:= 'wrong usage of the api for the control item type';
6862: pa_debug.write(l_module,pa_debug.g_err_stage,l_debug_level3);
6863: end if;
6864: RAISE FND_API.G_EXC_ERROR;
6865: end if;
6866:
6867:
6868:

Line 6879: RAISE FND_API.G_EXC_ERROR;

6875:
6876: IF (l_check_update_access = 'F') THEN
6877:
6878: PA_UTILS.ADD_MESSAGE('PA', 'PA_CI_NO_UPDATE_ACCESS');
6879: RAISE FND_API.G_EXC_ERROR;
6880:
6881: END IF;
6882:
6883: IF l_debug_mode = 'Y' THEN

Line 6894: RAISE FND_API.G_EXC_ERROR;

6890:
6891: IF (l_chk_status_ctrl = 'N') THEN
6892:
6893: PA_UTILS.ADD_MESSAGE('PA', 'PA_CI_NO_ALLOW_UPDATE');
6894: RAISE FND_API.G_EXC_ERROR;
6895:
6896: END IF;
6897:
6898:

Line 6911: RAISE FND_API.G_EXC_ERROR;

6907: CLOSE c_submit_status;
6908: IF (l_enable_wf_flag = 'Y' AND l_wf_success_status_code IS NOT NULL AND l_wf_failure_status_code IS NOT NULL) THEN
6909:
6910: PA_UTILS.ADD_MESSAGE('PA', 'PA_CI_APPROVAL_WORKFLOW');
6911: RAISE FND_API.G_EXC_ERROR;
6912:
6913: END IF;
6914:
6915: IF l_debug_mode = 'Y' THEN

Line 6994: x_return_status := FND_API.G_RET_STS_ERROR;

6990:
6991: IF (l_rows < 0) THEN
6992: PA_UTILS.Add_Message( p_app_short_name => 'PA'
6993: ,p_msg_name => 'PA_TO_STATUS_INVALID');
6994: x_return_status := FND_API.G_RET_STS_ERROR;
6995: l_to_status_flag := 'N';
6996: ELSE
6997: l_rows1 := DBMS_SQL.FETCH_ROWS(l_cursor);
6998:

Line 7005: x_return_status := FND_API.G_RET_STS_ERROR;

7001: l_ci_status_code := l_ci_status_code_1;
7002: else
7003: PA_UTILS.Add_Message( p_app_short_name => 'PA'
7004: ,p_msg_name => 'PA_TO_STATUS_INVALID');
7005: x_return_status := FND_API.G_RET_STS_ERROR;
7006: l_to_status_flag := 'N';
7007: end if;
7008: END IF;
7009:

Line 7021: x_return_status := FND_API.G_RET_STS_ERROR;

7017: ELSIF p_ci_status_code IS NULL THEN
7018: l_ci_status_code := p_ci_status_code;
7019: PA_UTILS.Add_Message( p_app_short_name => 'PA'
7020: ,p_msg_name => 'PA_CI_NULL_STATUS');
7021: x_return_status := FND_API.G_RET_STS_ERROR;
7022: l_to_status_flag := 'N';
7023: END IF;
7024:
7025: IF p_record_version_number = G_PA_MISS_NUM THEN

Line 7037: x_return_status := FND_API.G_RET_STS_ERROR;

7033: ELSIF p_summary IS NOT NULL THEN
7034: l_summary := p_summary;
7035: ELSIF p_summary IS NULL THEN
7036: PA_UTILS.ADD_MESSAGE('PA', 'PA_CI_NULL_SUMMARY');
7037: x_return_status := FND_API.G_RET_STS_ERROR;
7038: END IF;
7039:
7040: IF p_description = G_PA_MISS_CHAR THEN
7041: NULL;

Line 7116: x_return_status := FND_API.G_RET_STS_ERROR;

7112: end if;
7113: ELSIF p_owner_id IS NULL THEN
7114: PA_UTILS.Add_Message( p_app_short_name => 'PA'
7115: ,p_msg_name => 'PA_CI_OWNER_NULL');
7116: x_return_status := FND_API.G_RET_STS_ERROR;
7117: END IF;
7118:
7119: IF p_classification_code = G_PA_MISS_NUM THEN
7120: NULL;

Line 7128: x_return_status := FND_API.G_RET_STS_ERROR;

7124: IF c_classification%NOTFOUND then
7125: -- close c_classification;
7126: PA_UTILS.Add_Message( p_app_short_name => 'PA'
7127: ,p_msg_name => 'PA_CI_CLASSIFICATION_INV');
7128: x_return_status := FND_API.G_RET_STS_ERROR;
7129: END IF;
7130: close c_classification;
7131: ELSIF p_classification_code IS NULL THEN
7132: PA_UTILS.Add_Message( p_app_short_name => 'PA'

Line 7134: x_return_status := FND_API.G_RET_STS_ERROR;

7130: close c_classification;
7131: ELSIF p_classification_code IS NULL THEN
7132: PA_UTILS.Add_Message( p_app_short_name => 'PA'
7133: ,p_msg_name => 'PA_CI_CLASSIFICATION_NULL');
7134: x_return_status := FND_API.G_RET_STS_ERROR;
7135: END IF;
7136:
7137: IF p_reason_code = G_PA_MISS_NUM THEN
7138: NULL;

Line 7146: x_return_status := FND_API.G_RET_STS_ERROR;

7142: IF c_reason%NOTFOUND then
7143: -- close c_reason;
7144: PA_UTILS.Add_Message( p_app_short_name => 'PA'
7145: ,p_msg_name => 'PA_CI_REASON_INV');
7146: x_return_status := FND_API.G_RET_STS_ERROR;
7147: END IF;
7148: close c_reason;
7149: ELSIF p_reason_code IS NULL THEN
7150: PA_UTILS.Add_Message( p_app_short_name => 'PA'

Line 7152: x_return_status := FND_API.G_RET_STS_ERROR;

7148: close c_reason;
7149: ELSIF p_reason_code IS NULL THEN
7150: PA_UTILS.Add_Message( p_app_short_name => 'PA'
7151: ,p_msg_name => 'PA_CI_REASON_NULL');
7152: x_return_status := FND_API.G_RET_STS_ERROR;
7153: END IF;
7154:
7155: IF p_object_id = G_PA_MISS_NUM THEN
7156: NULL;

Line 7169: x_return_status := FND_API.G_RET_STS_ERROR;

7165:
7166: EXCEPTION WHEN TOO_MANY_ROWS THEN
7167: PA_UTILS.Add_Message( p_app_short_name => 'PA'
7168: ,p_msg_name => 'PA_OBJECT_NAME_MULTIPLE');
7169: x_return_status := FND_API.G_RET_STS_ERROR;
7170:
7171: WHEN OTHERS THEN
7172: PA_UTILS.Add_Message( p_app_short_name => 'PA'
7173: ,p_msg_name => 'PA_OBJECT_NAME_INV');

Line 7174: x_return_status := FND_API.G_RET_STS_ERROR;

7170:
7171: WHEN OTHERS THEN
7172: PA_UTILS.Add_Message( p_app_short_name => 'PA'
7173: ,p_msg_name => 'PA_OBJECT_NAME_INV');
7174: x_return_status := FND_API.G_RET_STS_ERROR;
7175: END;
7176: ELSIF p_object_id IS NULL THEN
7177: l_object_id := p_object_id;
7178: END IF;

Line 7188: x_return_status := FND_API.G_RET_STS_ERROR;

7184: l_object_type := p_object_type;
7185: ELSE
7186: PA_UTILS.Add_Message( p_app_short_name => 'PA'
7187: ,p_msg_name => 'PA_OBJECT_TYPE_INV');
7188: x_return_status := FND_API.G_RET_STS_ERROR;
7189: END IF;
7190: ELSIF p_object_type IS NULL THEN
7191: l_object_type := p_object_type;
7192: END IF;

Line 7211: x_return_status := FND_API.G_RET_STS_ERROR;

7207: IF c_lkup%NOTFOUND then
7208: -- close c_lkup;
7209: PA_UTILS.Add_Message( p_app_short_name => 'PA'
7210: ,p_msg_name => 'PA_CI_PRIORITY_INV');
7211: x_return_status := FND_API.G_RET_STS_ERROR;
7212: END IF;
7213: close c_lkup;
7214: ELSIF p_priority_code IS NULL THEN
7215: l_priority_code := p_priority_code;

Line 7227: x_return_status := FND_API.G_RET_STS_ERROR;

7223: IF c_lkup%NOTFOUND then
7224: -- close c_lkup;
7225: PA_UTILS.Add_Message( p_app_short_name => 'PA'
7226: ,p_msg_name => 'PA_CI_EFFORT_INV');
7227: x_return_status := FND_API.G_RET_STS_ERROR;
7228: END IF;
7229: close c_lkup;
7230: ELSIF p_effort_level_code IS NULL THEN
7231: l_effort_level_code := p_effort_level_code;

Line 7260: x_return_status := FND_API.G_RET_STS_ERROR;

7256: IF c_lkup%NOTFOUND then
7257: -- close c_lkup;
7258: PA_UTILS.Add_Message( p_app_short_name => 'PA'
7259: ,p_msg_name => 'PA_CI_SOURCE_TYPE_INV');
7260: x_return_status := FND_API.G_RET_STS_ERROR;
7261: END IF;
7262: close c_lkup;
7263: ELSIF p_source_type_code IS NULL THEN
7264: l_source_type_code := p_source_type_code;

Line 7304: x_return_status := FND_API.G_RET_STS_ERROR;

7300: l_progress_as_of_date := p_progress_as_of_date;
7301: ELSIF p_progress_as_of_date IS NULL THEN
7302: PA_UTILS.Add_Message( p_app_short_name => 'PA'
7303: ,p_msg_name => 'PA_AS_OF_DATE_NULL');
7304: x_return_status := FND_API.G_RET_STS_ERROR;
7305: END IF;
7306:
7307: OPEN c_auto_num;
7308: FETCH c_auto_num INTO l_auto_numbers;

Line 7324: x_return_status := FND_API.G_RET_STS_ERROR;

7320: IF l_ci_number IS NULL THEN
7321: IF (l_curr_system_status = 'CI_DRAFT' AND (l_new_system_status IS NOT NULL AND l_new_system_status <> 'CI_DRAFT')) THEN
7322: PA_UTILS.Add_Message( p_app_short_name => 'PA'
7323: ,p_msg_name => 'PA_CI_NO_CI_NUMBER');
7324: x_return_status := FND_API.G_RET_STS_ERROR;
7325: ELSIF l_curr_system_status <> 'CI_DRAFT' THEN
7326: PA_UTILS.Add_Message( p_app_short_name => 'PA'
7327: ,p_msg_name => 'PA_CI_NO_CI_NUMBER');
7328: x_return_status := FND_API.G_RET_STS_ERROR;

Line 7328: x_return_status := FND_API.G_RET_STS_ERROR;

7324: x_return_status := FND_API.G_RET_STS_ERROR;
7325: ELSIF l_curr_system_status <> 'CI_DRAFT' THEN
7326: PA_UTILS.Add_Message( p_app_short_name => 'PA'
7327: ,p_msg_name => 'PA_CI_NO_CI_NUMBER');
7328: x_return_status := FND_API.G_RET_STS_ERROR;
7329: END IF;
7330: END IF;
7331: ELSIF p_ci_number IS NULL THEN
7332: IF (l_curr_system_status = 'CI_DRAFT' AND (l_new_system_status IS NOT NULL AND l_new_system_status <> 'CI_DRAFT')) THEN

Line 7335: x_return_status := FND_API.G_RET_STS_ERROR;

7331: ELSIF p_ci_number IS NULL THEN
7332: IF (l_curr_system_status = 'CI_DRAFT' AND (l_new_system_status IS NOT NULL AND l_new_system_status <> 'CI_DRAFT')) THEN
7333: PA_UTILS.Add_Message( p_app_short_name => 'PA'
7334: ,p_msg_name => 'PA_CI_NO_CI_NUMBER');
7335: x_return_status := FND_API.G_RET_STS_ERROR;
7336: ELSIF l_curr_system_status <> 'CI_DRAFT' THEN
7337: PA_UTILS.Add_Message( p_app_short_name => 'PA'
7338: ,p_msg_name => 'PA_CI_NO_CI_NUMBER');
7339: x_return_status := FND_API.G_RET_STS_ERROR;

Line 7339: x_return_status := FND_API.G_RET_STS_ERROR;

7335: x_return_status := FND_API.G_RET_STS_ERROR;
7336: ELSIF l_curr_system_status <> 'CI_DRAFT' THEN
7337: PA_UTILS.Add_Message( p_app_short_name => 'PA'
7338: ,p_msg_name => 'PA_CI_NO_CI_NUMBER');
7339: x_return_status := FND_API.G_RET_STS_ERROR;
7340: END IF;
7341: END IF;
7342:
7343: ELSIF p_ci_number IS NOT NULL THEN

Line 7354: x_return_status := FND_API.G_RET_STS_ERROR;

7350: ELSE
7351: CLOSE c_ci_number;
7352: PA_UTILS.Add_Message( p_app_short_name => 'PA'
7353: ,p_msg_name => 'PA_CI_DUPLICATE_CI_NUMBER');
7354: x_return_status := FND_API.G_RET_STS_ERROR;
7355: END IF;
7356: END IF;
7357:
7358: END IF;

Line 7370: x_return_status := FND_API.G_RET_STS_ERROR;

7366: IF c_statuses%NOTFOUND then
7367: close c_statuses;
7368: PA_UTILS.Add_Message( p_app_short_name => 'PA'
7369: ,p_msg_name => 'PA_PROGRESS_STATUS_INV');
7370: x_return_status := FND_API.G_RET_STS_ERROR;
7371: END IF;
7372: close c_statuses;
7373: ELSIF p_progress_status_code IS NULL THEN
7374: PA_UTILS.Add_Message( p_app_short_name => 'PA'

Line 7376: x_return_status := FND_API.G_RET_STS_ERROR;

7372: close c_statuses;
7373: ELSIF p_progress_status_code IS NULL THEN
7374: PA_UTILS.Add_Message( p_app_short_name => 'PA'
7375: ,p_msg_name => 'PA_PROGRESS_STATUS_NULL');
7376: x_return_status := FND_API.G_RET_STS_ERROR;
7377: END IF;
7378:
7379: IF p_progress_overview = G_PA_MISS_CHAR THEN
7380: NULL;

Line 7394: x_return_status := FND_API.G_RET_STS_ERROR;

7390: IF c_resolution%NOTFOUND then
7391: close c_resolution;
7392: PA_UTILS.Add_Message( p_app_short_name => 'PA'
7393: ,p_msg_name => 'PA_CI_RESOLUTION_INV');
7394: x_return_status := FND_API.G_RET_STS_ERROR;
7395: END IF;
7396: close c_resolution;
7397: ELSIF p_resolution_code IS NULL THEN
7398: l_resolution_code_id := p_resolution_code;

Line 7553: x_return_status := FND_API.G_RET_STS_ERROR;

7549: IF (PA_CONTROL_ITEMS_UTILS.checkhasresolution(p_ci_id) <> 'Y' ) THEN
7550: IF (l_resolution_code_id IS NULL) THEN
7551: PA_UTILS.Add_Message( p_app_short_name => 'PA'
7552: ,p_msg_name => 'PA_CI_RESOLUTION_OPEN');
7553: x_return_status := FND_API.G_RET_STS_ERROR;
7554: END IF;
7555: ELSE
7556: IF (l_resolution_code_id IS NULL) THEN
7557: PA_UTILS.Add_Message( p_app_short_name => 'PA'

Line 7559: x_return_status := FND_API.G_RET_STS_ERROR;

7555: ELSE
7556: IF (l_resolution_code_id IS NULL) THEN
7557: PA_UTILS.Add_Message( p_app_short_name => 'PA'
7558: ,p_msg_name => 'PA_CI_RESOLUTION_OPEN');
7559: x_return_status := FND_API.G_RET_STS_ERROR;
7560: END IF;
7561: END IF;
7562: END IF;
7563:

Line 7569: x_return_status := FND_API.G_RET_STS_ERROR;

7565: IF (PA_CONTROL_ITEMS_UTILS.checkhasresolution(p_ci_id) <> 'Y' ) THEN
7566: IF (l_resolution_code_id IS NULL) THEN
7567: PA_UTILS.Add_Message( p_app_short_name => 'PA'
7568: ,p_msg_name => 'PA_CI_CLOSE_INV_RES');
7569: x_return_status := FND_API.G_RET_STS_ERROR;
7570: END IF;
7571: ELSE
7572: IF (l_resolution_code_id IS NULL) THEN
7573: PA_UTILS.Add_Message( p_app_short_name => 'PA'

Line 7575: x_return_status := FND_API.G_RET_STS_ERROR;

7571: ELSE
7572: IF (l_resolution_code_id IS NULL) THEN
7573: PA_UTILS.Add_Message( p_app_short_name => 'PA'
7574: ,p_msg_name => 'PA_CI_CLOSE_INV_RES');
7575: x_return_status := FND_API.G_RET_STS_ERROR;
7576: END IF;
7577: END IF;
7578: END IF;
7579:

Line 7583: IF (l_validate_only <> fnd_api.g_true AND x_return_status = 'S') THEN

7579:
7580: END IF;
7581:
7582:
7583: IF (l_validate_only <> fnd_api.g_true AND x_return_status = 'S') THEN
7584:
7585: IF l_debug_mode = 'Y' THEN
7586: pa_debug.write(l_module, 'before call to PA_CONTROL_ITEMS_PUB.UPDATE_CONTROL_ITEM', l_debug_level3);
7587: END IF;

Line 7591: ,p_init_msg_list => fnd_api.g_false

7587: END IF;
7588:
7589: PA_CONTROL_ITEMS_PUB.UPDATE_CONTROL_ITEM (
7590: p_api_version => 1.0
7591: ,p_init_msg_list => fnd_api.g_false
7592: ,p_commit => FND_API.g_false
7593: ,p_validate_only => FND_API.g_false
7594: ,p_max_msg_count => FND_API.g_miss_num
7595: ,p_ci_id => p_ci_id

Line 7592: ,p_commit => FND_API.g_false

7588:
7589: PA_CONTROL_ITEMS_PUB.UPDATE_CONTROL_ITEM (
7590: p_api_version => 1.0
7591: ,p_init_msg_list => fnd_api.g_false
7592: ,p_commit => FND_API.g_false
7593: ,p_validate_only => FND_API.g_false
7594: ,p_max_msg_count => FND_API.g_miss_num
7595: ,p_ci_id => p_ci_id
7596: ,p_ci_type_id => l_ci_type_id

Line 7593: ,p_validate_only => FND_API.g_false

7589: PA_CONTROL_ITEMS_PUB.UPDATE_CONTROL_ITEM (
7590: p_api_version => 1.0
7591: ,p_init_msg_list => fnd_api.g_false
7592: ,p_commit => FND_API.g_false
7593: ,p_validate_only => FND_API.g_false
7594: ,p_max_msg_count => FND_API.g_miss_num
7595: ,p_ci_id => p_ci_id
7596: ,p_ci_type_id => l_ci_type_id
7597: ,p_summary => l_summary

Line 7594: ,p_max_msg_count => FND_API.g_miss_num

7590: p_api_version => 1.0
7591: ,p_init_msg_list => fnd_api.g_false
7592: ,p_commit => FND_API.g_false
7593: ,p_validate_only => FND_API.g_false
7594: ,p_max_msg_count => FND_API.g_miss_num
7595: ,p_ci_id => p_ci_id
7596: ,p_ci_type_id => l_ci_type_id
7597: ,p_summary => l_summary
7598: ,p_status_code => l_ci_status_code

Line 7657: IF (l_status_change_flag = 'Y' AND l_validate_only <> fnd_api.g_true AND x_return_status = 'S') THEN

7653: END IF;
7654:
7655: END IF;
7656:
7657: IF (l_status_change_flag = 'Y' AND l_validate_only <> fnd_api.g_true AND x_return_status = 'S') THEN
7658:
7659: IF l_debug_mode = 'Y' THEN
7660: pa_debug.write(l_module, 'before call to PA_CONTROL_ITEMS_UTILS.ADD_STATUS_CHANGE_COMMENT', l_debug_level3);
7661: END IF;

Line 7703: IF (p_commit = FND_API.G_TRUE AND x_return_status = FND_API.G_RET_STS_SUCCESS) THEN

7699:
7700: END IF;
7701:
7702:
7703: IF (p_commit = FND_API.G_TRUE AND x_return_status = FND_API.G_RET_STS_SUCCESS) THEN
7704:
7705: IF l_debug_mode = 'Y' THEN
7706: pa_debug.write(l_module, 'Before Commit', l_debug_level3);
7707: END IF;

Line 7721: WHEN FND_API.G_EXC_ERROR THEN

7717:
7718:
7719: EXCEPTION
7720:
7721: WHEN FND_API.G_EXC_ERROR THEN
7722: IF l_debug_mode = 'Y' THEN
7723: pa_debug.write(l_module, 'in FND_API.G_EXC_ERROR exception', l_debug_level3);
7724: END IF;
7725: x_return_status := FND_API.G_RET_STS_ERROR;

Line 7723: pa_debug.write(l_module, 'in FND_API.G_EXC_ERROR exception', l_debug_level3);

7719: EXCEPTION
7720:
7721: WHEN FND_API.G_EXC_ERROR THEN
7722: IF l_debug_mode = 'Y' THEN
7723: pa_debug.write(l_module, 'in FND_API.G_EXC_ERROR exception', l_debug_level3);
7724: END IF;
7725: x_return_status := FND_API.G_RET_STS_ERROR;
7726: l_msg_count := FND_MSG_PUB.count_msg;
7727:

Line 7725: x_return_status := FND_API.G_RET_STS_ERROR;

7721: WHEN FND_API.G_EXC_ERROR THEN
7722: IF l_debug_mode = 'Y' THEN
7723: pa_debug.write(l_module, 'in FND_API.G_EXC_ERROR exception', l_debug_level3);
7724: END IF;
7725: x_return_status := FND_API.G_RET_STS_ERROR;
7726: l_msg_count := FND_MSG_PUB.count_msg;
7727:
7728: IF p_commit = FND_API.G_TRUE THEN
7729: ROLLBACK TO UPDATE_ISSUE_SVPT;

Line 7728: IF p_commit = FND_API.G_TRUE THEN

7724: END IF;
7725: x_return_status := FND_API.G_RET_STS_ERROR;
7726: l_msg_count := FND_MSG_PUB.count_msg;
7727:
7728: IF p_commit = FND_API.G_TRUE THEN
7729: ROLLBACK TO UPDATE_ISSUE_SVPT;
7730: END IF;
7731:
7732: IF l_msg_count = 1 AND x_msg_data IS NULL THEN

Line 7734: ( p_encoded => FND_API.G_FALSE

7730: END IF;
7731:
7732: IF l_msg_count = 1 AND x_msg_data IS NULL THEN
7733: PA_INTERFACE_UTILS_PUB.get_messages
7734: ( p_encoded => FND_API.G_FALSE
7735: , p_msg_index => 1
7736: , p_msg_count => l_msg_count
7737: , p_msg_data => l_msg_data
7738: , p_data => l_data

Line 7756: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

7752: WHEN OTHERS THEN
7753: IF l_debug_mode = 'Y' THEN
7754: pa_debug.write(l_module, 'in OTHERS exception', l_debug_level3);
7755: END IF;
7756: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
7757: x_msg_data := substr(SQLERRM,1,240);
7758:
7759: IF p_commit = FND_API.G_TRUE THEN
7760: ROLLBACK TO UPDATE_ISSUE_SVPT;

Line 7759: IF p_commit = FND_API.G_TRUE THEN

7755: END IF;
7756: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
7757: x_msg_data := substr(SQLERRM,1,240);
7758:
7759: IF p_commit = FND_API.G_TRUE THEN
7760: ROLLBACK TO UPDATE_ISSUE_SVPT;
7761: END IF;
7762:
7763: FND_MSG_PUB.add_exc_msg

Line 7780: p_commit IN VARCHAR2 := FND_API.G_FALSE,

7776: END UPDATE_ISSUE;
7777:
7778:
7779: PROCEDURE UPDATE_CHANGE_REQUEST (
7780: p_commit IN VARCHAR2 := FND_API.G_FALSE,
7781: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
7782: p_api_version_number IN NUMBER,
7783: x_return_status OUT NOCOPY VARCHAR2,
7784: x_msg_count OUT NOCOPY NUMBER,

Line 7781: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,

7777:
7778:
7779: PROCEDURE UPDATE_CHANGE_REQUEST (
7780: p_commit IN VARCHAR2 := FND_API.G_FALSE,
7781: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
7782: p_api_version_number IN NUMBER,
7783: x_return_status OUT NOCOPY VARCHAR2,
7784: x_msg_count OUT NOCOPY NUMBER,
7785: x_msg_data OUT NOCOPY VARCHAR2,

Line 8003: l_validate_only VARCHAR2(1) := FND_API.g_false;

7999: l_wf_success_status_code pa_project_statuses.wf_success_status_code%TYPE;
8000: l_wf_failure_status_code pa_project_statuses.wf_failure_status_code%TYPE;
8001: l_status_change_flag VARCHAR2(1) := 'N';
8002: l_start_wf VARCHAR2(1) := 'Y';
8003: l_validate_only VARCHAR2(1) := FND_API.g_false;
8004: l_max_msg_count NUMBER := FND_API.G_MISS_NUM;
8005: l_enforce_security VARCHAR2(1) := 'Y';
8006: l_num_of_actions NUMBER;
8007: l_priority_type VARCHAR2(30) := 'PA_TASK_PRIORITY_CODE';

Line 8004: l_max_msg_count NUMBER := FND_API.G_MISS_NUM;

8000: l_wf_failure_status_code pa_project_statuses.wf_failure_status_code%TYPE;
8001: l_status_change_flag VARCHAR2(1) := 'N';
8002: l_start_wf VARCHAR2(1) := 'Y';
8003: l_validate_only VARCHAR2(1) := FND_API.g_false;
8004: l_max_msg_count NUMBER := FND_API.G_MISS_NUM;
8005: l_enforce_security VARCHAR2(1) := 'Y';
8006: l_num_of_actions NUMBER;
8007: l_priority_type VARCHAR2(30) := 'PA_TASK_PRIORITY_CODE';
8008: l_effort_type VARCHAR2(30) := 'PA_CI_EFFORT_LEVELS';

Line 8032: x_return_status := FND_API.G_RET_STS_SUCCESS;

8028:
8029:
8030: BEGIN
8031:
8032: x_return_status := FND_API.G_RET_STS_SUCCESS;
8033:
8034: l_debug_mode := NVL(FND_PROFILE.VALUE_SPECIFIC('PA_DEBUG_MODE', fnd_global.user_id, fnd_global.login_id, 275, null, null), 'N');
8035:
8036: IF l_debug_mode = 'Y' THEN

Line 8040: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list, FND_API.G_TRUE)) THEN

8036: IF l_debug_mode = 'Y' THEN
8037: PA_DEBUG.set_curr_function(p_function => 'UPDATE_CHANGE_REQUEST', p_debug_mode => l_debug_mode);
8038: END IF;
8039:
8040: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list, FND_API.G_TRUE)) THEN
8041: FND_MSG_PUB.initialize;
8042: END IF;
8043:
8044: IF p_commit = FND_API.G_TRUE THEN

Line 8044: IF p_commit = FND_API.G_TRUE THEN

8040: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list, FND_API.G_TRUE)) THEN
8041: FND_MSG_PUB.initialize;
8042: END IF;
8043:
8044: IF p_commit = FND_API.G_TRUE THEN
8045: savepoint UPDATE_CR_SVPT;
8046: END IF;
8047:
8048: IF l_debug_mode = 'Y' THEN

Line 8058: RAISE FND_API.G_EXC_ERROR;

8054: IF curr_row%NOTFOUND then
8055: close curr_row;
8056: PA_UTILS.Add_Message( p_app_short_name => 'PA'
8057: ,p_msg_name => 'PA_CI_INVALID_ITEM'); /* Change this message */
8058: RAISE FND_API.G_EXC_ERROR;
8059: ELSE
8060:
8061: l_curr_status_code := cp.status_code;
8062: l_record_version_number := cp.record_version_number;

Line 8125: RAISE FND_API.G_EXC_ERROR;

8121: if l_debug_mode = 'Y' then
8122: pa_debug.g_err_stage:= 'wrong usage of the api for the control item type';
8123: pa_debug.write(l_module,pa_debug.g_err_stage,l_debug_level3);
8124: end if;
8125: RAISE FND_API.G_EXC_ERROR;
8126: end if;
8127:
8128:
8129:

Line 8140: RAISE FND_API.G_EXC_ERROR;

8136:
8137: IF (l_check_update_access = 'F') THEN
8138:
8139: PA_UTILS.ADD_MESSAGE('PA', 'PA_CI_NO_UPDATE_ACCESS');
8140: RAISE FND_API.G_EXC_ERROR;
8141:
8142: END IF;
8143:
8144: IF l_debug_mode = 'Y' THEN

Line 8155: RAISE FND_API.G_EXC_ERROR;

8151:
8152: IF (l_chk_status_ctrl = 'N') THEN
8153:
8154: PA_UTILS.ADD_MESSAGE('PA', 'PA_CI_NO_ALLOW_UPDATE');
8155: RAISE FND_API.G_EXC_ERROR;
8156:
8157: END IF;
8158:
8159:

Line 8173: RAISE FND_API.G_EXC_ERROR;

8169:
8170: IF (l_enable_wf_flag = 'Y' AND l_wf_success_status_code IS NOT NULL AND l_wf_failure_status_code IS NOT NULL) THEN
8171:
8172: PA_UTILS.ADD_MESSAGE('PA', 'PA_CI_APPROVAL_WORKFLOW');
8173: RAISE FND_API.G_EXC_ERROR;
8174:
8175: END IF;
8176:
8177: IF l_debug_mode = 'Y' THEN

Line 8249: x_return_status := FND_API.G_RET_STS_ERROR;

8245:
8246: IF (l_rows < 0) THEN
8247: PA_UTILS.Add_Message( p_app_short_name => 'PA'
8248: ,p_msg_name => 'PA_TO_STATUS_INVALID');
8249: x_return_status := FND_API.G_RET_STS_ERROR;
8250: l_to_status_flag := 'N';
8251: ELSE
8252: l_rows1 := DBMS_SQL.FETCH_ROWS(l_cursor);
8253:

Line 8260: x_return_status := FND_API.G_RET_STS_ERROR;

8256: l_ci_status_code := l_ci_status_code_1;
8257: else
8258: PA_UTILS.Add_Message( p_app_short_name => 'PA'
8259: ,p_msg_name => 'PA_TO_STATUS_INVALID');
8260: x_return_status := FND_API.G_RET_STS_ERROR;
8261: l_to_status_flag := 'N';
8262: end if;
8263:
8264: END IF;

Line 8271: x_return_status := FND_API.G_RET_STS_ERROR;

8267: END IF;
8268: ELSIF p_ci_status_code IS NULL THEN
8269: l_ci_status_code := p_ci_status_code;
8270: PA_UTILS.ADD_MESSAGE('PA', 'PA_CI_NULL_STATUS');
8271: x_return_status := FND_API.G_RET_STS_ERROR;
8272: l_to_status_flag := 'N';
8273: END IF;
8274:
8275: IF p_record_version_number = G_PA_MISS_NUM THEN

Line 8287: x_return_status := FND_API.G_RET_STS_ERROR;

8283: ELSIF p_summary IS NOT NULL THEN
8284: l_summary := p_summary;
8285: ELSIF p_summary IS NULL THEN
8286: PA_UTILS.ADD_MESSAGE('PA', 'PA_CI_NULL_SUMMARY');
8287: x_return_status := FND_API.G_RET_STS_ERROR;
8288: END IF;
8289:
8290: IF p_description = G_PA_MISS_CHAR THEN
8291: NULL;

Line 8373: x_return_status := FND_API.G_RET_STS_ERROR;

8369: /* Getting validated in pa_control_items_pub.update_control_item API. */
8370: ELSIF p_owner_id IS NULL THEN
8371: PA_UTILS.Add_Message( p_app_short_name => 'PA'
8372: ,p_msg_name => 'PA_CI_OWNER_NULL');
8373: x_return_status := FND_API.G_RET_STS_ERROR;
8374: END IF;
8375:
8376: IF p_classification_code = G_PA_MISS_NUM THEN
8377: NULL;

Line 8385: x_return_status := FND_API.G_RET_STS_ERROR;

8381: IF c_classification%NOTFOUND then
8382: -- close c_classification;
8383: PA_UTILS.Add_Message( p_app_short_name => 'PA'
8384: ,p_msg_name => 'PA_CI_CLASSIFICATION_INV');
8385: x_return_status := FND_API.G_RET_STS_ERROR;
8386: END IF;
8387: close c_classification;
8388: ELSIF p_classification_code IS NULL THEN
8389: PA_UTILS.Add_Message( p_app_short_name => 'PA'

Line 8391: x_return_status := FND_API.G_RET_STS_ERROR;

8387: close c_classification;
8388: ELSIF p_classification_code IS NULL THEN
8389: PA_UTILS.Add_Message( p_app_short_name => 'PA'
8390: ,p_msg_name => 'PA_CI_CLASSIFICATION_NULL');
8391: x_return_status := FND_API.G_RET_STS_ERROR;
8392: END IF;
8393:
8394: IF p_reason_code = G_PA_MISS_NUM THEN
8395: NULL;

Line 8403: x_return_status := FND_API.G_RET_STS_ERROR;

8399: IF c_reason%NOTFOUND then
8400: -- close c_reason;
8401: PA_UTILS.Add_Message( p_app_short_name => 'PA'
8402: ,p_msg_name => 'PA_CI_REASON_INV');
8403: x_return_status := FND_API.G_RET_STS_ERROR;
8404: END IF;
8405: close c_reason;
8406: ELSIF p_reason_code IS NULL THEN
8407: PA_UTILS.Add_Message( p_app_short_name => 'PA'

Line 8409: x_return_status := FND_API.G_RET_STS_ERROR;

8405: close c_reason;
8406: ELSIF p_reason_code IS NULL THEN
8407: PA_UTILS.Add_Message( p_app_short_name => 'PA'
8408: ,p_msg_name => 'PA_CI_REASON_NULL');
8409: x_return_status := FND_API.G_RET_STS_ERROR;
8410: END IF;
8411:
8412: IF p_object_id = G_PA_MISS_NUM THEN
8413: NULL;

Line 8426: x_return_status := FND_API.G_RET_STS_ERROR;

8422:
8423: EXCEPTION WHEN TOO_MANY_ROWS THEN
8424: PA_UTILS.Add_Message( p_app_short_name => 'PA'
8425: ,p_msg_name => 'PA_OBJECT_NAME_MULTIPLE');
8426: x_return_status := FND_API.G_RET_STS_ERROR;
8427:
8428: WHEN OTHERS THEN
8429: PA_UTILS.Add_Message( p_app_short_name => 'PA'
8430: ,p_msg_name => 'PA_OBJECT_NAME_INV');

Line 8431: x_return_status := FND_API.G_RET_STS_ERROR;

8427:
8428: WHEN OTHERS THEN
8429: PA_UTILS.Add_Message( p_app_short_name => 'PA'
8430: ,p_msg_name => 'PA_OBJECT_NAME_INV');
8431: x_return_status := FND_API.G_RET_STS_ERROR;
8432: END;
8433: ELSIF p_object_id IS NULL THEN
8434: l_object_id := p_object_id;
8435: END IF;

Line 8445: x_return_status := FND_API.G_RET_STS_ERROR;

8441: l_object_type := p_object_type;
8442: ELSE
8443: PA_UTILS.Add_Message( p_app_short_name => 'PA'
8444: ,p_msg_name => 'PA_OBJECT_TYPE_INV');
8445: x_return_status := FND_API.G_RET_STS_ERROR;
8446: END IF;
8447: ELSIF p_object_type IS NULL THEN
8448: l_object_type := p_object_type;
8449: END IF;

Line 8468: x_return_status := FND_API.G_RET_STS_ERROR;

8464: IF c_lkup%NOTFOUND then
8465: -- close c_lkup;
8466: PA_UTILS.Add_Message( p_app_short_name => 'PA'
8467: ,p_msg_name => 'PA_CI_PRIORITY_INV');
8468: x_return_status := FND_API.G_RET_STS_ERROR;
8469: END IF;
8470: close c_lkup;
8471: ELSIF p_priority_code IS NULL THEN
8472: l_priority_code := p_priority_code;

Line 8484: x_return_status := FND_API.G_RET_STS_ERROR;

8480: IF c_lkup%NOTFOUND then
8481: -- close c_lkup;
8482: PA_UTILS.Add_Message( p_app_short_name => 'PA'
8483: ,p_msg_name => 'PA_CI_EFFORT_INV');
8484: x_return_status := FND_API.G_RET_STS_ERROR;
8485: END IF;
8486: close c_lkup;
8487: ELSIF p_effort_level_code IS NULL THEN
8488: l_effort_level_code := p_effort_level_code;

Line 8517: x_return_status := FND_API.G_RET_STS_ERROR;

8513: IF c_lkup%NOTFOUND then
8514: -- close c_lkup;
8515: PA_UTILS.Add_Message( p_app_short_name => 'PA'
8516: ,p_msg_name => 'PA_CI_SOURCE_TYPE_INV');
8517: x_return_status := FND_API.G_RET_STS_ERROR;
8518: END IF;
8519: close c_lkup;
8520: ELSIF p_source_type_code IS NULL THEN
8521: l_source_type_code := p_source_type_code;

Line 8561: x_return_status := FND_API.G_RET_STS_ERROR;

8557: l_progress_as_of_date := p_progress_as_of_date;
8558: ELSIF p_progress_as_of_date IS NULL THEN
8559: PA_UTILS.Add_Message( p_app_short_name => 'PA'
8560: ,p_msg_name => 'PA_AS_OF_DATE_NULL');
8561: x_return_status := FND_API.G_RET_STS_ERROR;
8562: END IF;
8563:
8564: OPEN c_auto_num;
8565: FETCH c_auto_num INTO l_auto_numbers;

Line 8581: x_return_status := FND_API.G_RET_STS_ERROR;

8577: IF l_ci_number IS NULL THEN
8578: IF (l_curr_system_status = 'CI_DRAFT' AND (l_new_system_status IS NOT NULL AND l_new_system_status <> 'CI_DRAFT')) THEN
8579: PA_UTILS.Add_Message( p_app_short_name => 'PA'
8580: ,p_msg_name => 'PA_CI_NO_CI_NUMBER');
8581: x_return_status := FND_API.G_RET_STS_ERROR;
8582: ELSIF l_curr_system_status <> 'CI_DRAFT' THEN
8583: PA_UTILS.Add_Message( p_app_short_name => 'PA'
8584: ,p_msg_name => 'PA_CI_NO_CI_NUMBER');
8585: x_return_status := FND_API.G_RET_STS_ERROR;

Line 8585: x_return_status := FND_API.G_RET_STS_ERROR;

8581: x_return_status := FND_API.G_RET_STS_ERROR;
8582: ELSIF l_curr_system_status <> 'CI_DRAFT' THEN
8583: PA_UTILS.Add_Message( p_app_short_name => 'PA'
8584: ,p_msg_name => 'PA_CI_NO_CI_NUMBER');
8585: x_return_status := FND_API.G_RET_STS_ERROR;
8586: END IF;
8587: END IF;
8588: ELSIF p_ci_number IS NULL THEN
8589: IF (l_curr_system_status = 'CI_DRAFT' AND (l_new_system_status IS NOT NULL AND l_new_system_status <> 'CI_DRAFT')) THEN

Line 8592: x_return_status := FND_API.G_RET_STS_ERROR;

8588: ELSIF p_ci_number IS NULL THEN
8589: IF (l_curr_system_status = 'CI_DRAFT' AND (l_new_system_status IS NOT NULL AND l_new_system_status <> 'CI_DRAFT')) THEN
8590: PA_UTILS.Add_Message( p_app_short_name => 'PA'
8591: ,p_msg_name => 'PA_CI_NO_CI_NUMBER');
8592: x_return_status := FND_API.G_RET_STS_ERROR;
8593: ELSIF l_curr_system_status <> 'CI_DRAFT' THEN
8594: PA_UTILS.Add_Message( p_app_short_name => 'PA'
8595: ,p_msg_name => 'PA_CI_NO_CI_NUMBER');
8596: x_return_status := FND_API.G_RET_STS_ERROR;

Line 8596: x_return_status := FND_API.G_RET_STS_ERROR;

8592: x_return_status := FND_API.G_RET_STS_ERROR;
8593: ELSIF l_curr_system_status <> 'CI_DRAFT' THEN
8594: PA_UTILS.Add_Message( p_app_short_name => 'PA'
8595: ,p_msg_name => 'PA_CI_NO_CI_NUMBER');
8596: x_return_status := FND_API.G_RET_STS_ERROR;
8597: END IF;
8598: END IF;
8599:
8600: ELSIF p_ci_number IS NOT NULL THEN

Line 8611: x_return_status := FND_API.G_RET_STS_ERROR;

8607: ELSE
8608: CLOSE c_ci_number;
8609: PA_UTILS.Add_Message( p_app_short_name => 'PA'
8610: ,p_msg_name => 'PA_CI_DUPLICATE_CI_NUMBER');
8611: x_return_status := FND_API.G_RET_STS_ERROR;
8612: END IF;
8613: END IF;
8614:
8615: END IF;

Line 8627: x_return_status := FND_API.G_RET_STS_ERROR;

8623: IF c_statuses%NOTFOUND then
8624: close c_statuses;
8625: PA_UTILS.Add_Message( p_app_short_name => 'PA'
8626: ,p_msg_name => 'PA_PROGRESS_STATUS_INV');
8627: x_return_status := FND_API.G_RET_STS_ERROR;
8628: END IF;
8629: close c_statuses;
8630: ELSIF p_progress_status_code IS NULL THEN
8631: PA_UTILS.Add_Message( p_app_short_name => 'PA'

Line 8633: x_return_status := FND_API.G_RET_STS_ERROR;

8629: close c_statuses;
8630: ELSIF p_progress_status_code IS NULL THEN
8631: PA_UTILS.Add_Message( p_app_short_name => 'PA'
8632: ,p_msg_name => 'PA_PROGRESS_STATUS_NULL');
8633: x_return_status := FND_API.G_RET_STS_ERROR;
8634: END IF;
8635:
8636: IF p_progress_overview = G_PA_MISS_CHAR THEN
8637: NULL;

Line 8651: x_return_status := FND_API.G_RET_STS_ERROR;

8647: IF c_resolution%NOTFOUND then
8648: close c_resolution;
8649: PA_UTILS.Add_Message( p_app_short_name => 'PA'
8650: ,p_msg_name => 'PA_CI_RESOLUTION_INV');
8651: x_return_status := FND_API.G_RET_STS_ERROR;
8652: END IF;
8653: close c_resolution;
8654: ELSIF p_resolution_code IS NULL THEN
8655: l_resolution_code_id := p_resolution_code;

Line 8810: x_return_status := FND_API.G_RET_STS_ERROR;

8806: IF (PA_CONTROL_ITEMS_UTILS.checkhasresolution(p_ci_id) <> 'Y' ) THEN
8807: IF (l_resolution_code_id IS NULL) THEN
8808: PA_UTILS.Add_Message( p_app_short_name => 'PA'
8809: ,p_msg_name => 'PA_CI_RESOLUTION_OPEN');
8810: x_return_status := FND_API.G_RET_STS_ERROR;
8811: END IF;
8812: ELSE
8813: IF (l_resolution_code_id IS NULL) THEN
8814: PA_UTILS.Add_Message( p_app_short_name => 'PA'

Line 8816: x_return_status := FND_API.G_RET_STS_ERROR;

8812: ELSE
8813: IF (l_resolution_code_id IS NULL) THEN
8814: PA_UTILS.Add_Message( p_app_short_name => 'PA'
8815: ,p_msg_name => 'PA_CI_RESOLUTION_OPEN');
8816: x_return_status := FND_API.G_RET_STS_ERROR;
8817: END IF;
8818: END IF;
8819: END IF;
8820:

Line 8826: x_return_status := FND_API.G_RET_STS_ERROR;

8822: IF (PA_CONTROL_ITEMS_UTILS.checkhasresolution(p_ci_id) <> 'Y' ) THEN
8823: IF (l_resolution_code_id IS NULL) THEN
8824: PA_UTILS.Add_Message( p_app_short_name => 'PA'
8825: ,p_msg_name => 'PA_CI_CLOSE_INV_RES');
8826: x_return_status := FND_API.G_RET_STS_ERROR;
8827: END IF;
8828: ELSE
8829: IF (l_resolution_code_id IS NULL) THEN
8830: PA_UTILS.Add_Message( p_app_short_name => 'PA'

Line 8832: x_return_status := FND_API.G_RET_STS_ERROR;

8828: ELSE
8829: IF (l_resolution_code_id IS NULL) THEN
8830: PA_UTILS.Add_Message( p_app_short_name => 'PA'
8831: ,p_msg_name => 'PA_CI_CLOSE_INV_RES');
8832: x_return_status := FND_API.G_RET_STS_ERROR;
8833: END IF;
8834: END IF;
8835: END IF;
8836:

Line 8840: IF (l_validate_only <> fnd_api.g_true AND x_return_status = 'S') THEN

8836:
8837: END IF;
8838:
8839:
8840: IF (l_validate_only <> fnd_api.g_true AND x_return_status = 'S') THEN
8841:
8842: IF l_debug_mode = 'Y' THEN
8843: pa_debug.write(l_module, 'before call to PA_CONTROL_ITEMS_PUB.UPDATE_CONTROL_ITEM', l_debug_level3);
8844: END IF;

Line 8848: ,p_init_msg_list => fnd_api.g_false

8844: END IF;
8845:
8846: PA_CONTROL_ITEMS_PUB.UPDATE_CONTROL_ITEM (
8847: p_api_version => 1.0
8848: ,p_init_msg_list => fnd_api.g_false
8849: ,p_commit => FND_API.g_false
8850: ,p_validate_only => FND_API.g_false
8851: ,p_max_msg_count => FND_API.g_miss_num
8852: ,p_ci_id => p_ci_id

Line 8849: ,p_commit => FND_API.g_false

8845:
8846: PA_CONTROL_ITEMS_PUB.UPDATE_CONTROL_ITEM (
8847: p_api_version => 1.0
8848: ,p_init_msg_list => fnd_api.g_false
8849: ,p_commit => FND_API.g_false
8850: ,p_validate_only => FND_API.g_false
8851: ,p_max_msg_count => FND_API.g_miss_num
8852: ,p_ci_id => p_ci_id
8853: ,p_ci_type_id => l_ci_type_id

Line 8850: ,p_validate_only => FND_API.g_false

8846: PA_CONTROL_ITEMS_PUB.UPDATE_CONTROL_ITEM (
8847: p_api_version => 1.0
8848: ,p_init_msg_list => fnd_api.g_false
8849: ,p_commit => FND_API.g_false
8850: ,p_validate_only => FND_API.g_false
8851: ,p_max_msg_count => FND_API.g_miss_num
8852: ,p_ci_id => p_ci_id
8853: ,p_ci_type_id => l_ci_type_id
8854: ,p_summary => l_summary

Line 8851: ,p_max_msg_count => FND_API.g_miss_num

8847: p_api_version => 1.0
8848: ,p_init_msg_list => fnd_api.g_false
8849: ,p_commit => FND_API.g_false
8850: ,p_validate_only => FND_API.g_false
8851: ,p_max_msg_count => FND_API.g_miss_num
8852: ,p_ci_id => p_ci_id
8853: ,p_ci_type_id => l_ci_type_id
8854: ,p_summary => l_summary
8855: ,p_status_code => l_ci_status_code

Line 8914: IF (l_status_change_flag = 'Y' AND l_validate_only <> fnd_api.g_true AND x_return_status = 'S') THEN

8910: END IF;
8911:
8912: END IF;
8913:
8914: IF (l_status_change_flag = 'Y' AND l_validate_only <> fnd_api.g_true AND x_return_status = 'S') THEN
8915:
8916: /* call the insert table handlers of pa_obj_status_changes and pa_ci_comments here */
8917:
8918: IF l_debug_mode = 'Y' THEN

Line 8961: IF (p_commit = FND_API.G_TRUE AND x_return_status = FND_API.G_RET_STS_SUCCESS) THEN

8957:
8958: END IF;
8959:
8960:
8961: IF (p_commit = FND_API.G_TRUE AND x_return_status = FND_API.G_RET_STS_SUCCESS) THEN
8962:
8963: IF l_debug_mode = 'Y' THEN
8964: pa_debug.write(l_module, 'Before Commit', l_debug_level3);
8965: END IF;

Line 8978: WHEN FND_API.G_EXC_ERROR THEN

8974: end if;
8975:
8976: EXCEPTION
8977:
8978: WHEN FND_API.G_EXC_ERROR THEN
8979: IF l_debug_mode = 'Y' THEN
8980: pa_debug.write(l_module, 'in FND_API.G_EXC_ERROR exception', l_debug_level3);
8981: END IF;
8982: x_return_status := FND_API.G_RET_STS_ERROR;

Line 8980: pa_debug.write(l_module, 'in FND_API.G_EXC_ERROR exception', l_debug_level3);

8976: EXCEPTION
8977:
8978: WHEN FND_API.G_EXC_ERROR THEN
8979: IF l_debug_mode = 'Y' THEN
8980: pa_debug.write(l_module, 'in FND_API.G_EXC_ERROR exception', l_debug_level3);
8981: END IF;
8982: x_return_status := FND_API.G_RET_STS_ERROR;
8983: l_msg_count := FND_MSG_PUB.count_msg;
8984:

Line 8982: x_return_status := FND_API.G_RET_STS_ERROR;

8978: WHEN FND_API.G_EXC_ERROR THEN
8979: IF l_debug_mode = 'Y' THEN
8980: pa_debug.write(l_module, 'in FND_API.G_EXC_ERROR exception', l_debug_level3);
8981: END IF;
8982: x_return_status := FND_API.G_RET_STS_ERROR;
8983: l_msg_count := FND_MSG_PUB.count_msg;
8984:
8985: IF p_commit = FND_API.G_TRUE THEN
8986: ROLLBACK TO UPDATE_CR_SVPT;

Line 8985: IF p_commit = FND_API.G_TRUE THEN

8981: END IF;
8982: x_return_status := FND_API.G_RET_STS_ERROR;
8983: l_msg_count := FND_MSG_PUB.count_msg;
8984:
8985: IF p_commit = FND_API.G_TRUE THEN
8986: ROLLBACK TO UPDATE_CR_SVPT;
8987: END IF;
8988:
8989: IF l_msg_count = 1 AND x_msg_data IS NULL THEN

Line 8991: ( p_encoded => FND_API.G_FALSE

8987: END IF;
8988:
8989: IF l_msg_count = 1 AND x_msg_data IS NULL THEN
8990: PA_INTERFACE_UTILS_PUB.get_messages
8991: ( p_encoded => FND_API.G_FALSE
8992: , p_msg_index => 1
8993: , p_msg_count => l_msg_count
8994: , p_msg_data => l_msg_data
8995: , p_data => l_data

Line 9013: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

9009: WHEN OTHERS THEN
9010: IF l_debug_mode = 'Y' THEN
9011: pa_debug.write(l_module, 'in OTHERS exception', l_debug_level3);
9012: END IF;
9013: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
9014: x_msg_data := substr(SQLERRM,1,240);
9015:
9016: IF p_commit = FND_API.G_TRUE THEN
9017: ROLLBACK TO UPDATE_CR_SVPT;

Line 9016: IF p_commit = FND_API.G_TRUE THEN

9012: END IF;
9013: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
9014: x_msg_data := substr(SQLERRM,1,240);
9015:
9016: IF p_commit = FND_API.G_TRUE THEN
9017: ROLLBACK TO UPDATE_CR_SVPT;
9018: END IF;
9019:
9020: FND_MSG_PUB.add_exc_msg

Line 9037: p_commit IN VARCHAR2 := FND_API.G_FALSE,

9033: END UPDATE_CHANGE_REQUEST;
9034:
9035:
9036: PROCEDURE UPDATE_CHANGE_ORDER (
9037: p_commit IN VARCHAR2 := FND_API.G_FALSE,
9038: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
9039: p_api_version_number IN NUMBER,
9040: x_return_status OUT NOCOPY VARCHAR2,
9041: x_msg_count OUT NOCOPY NUMBER,

Line 9038: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,

9034:
9035:
9036: PROCEDURE UPDATE_CHANGE_ORDER (
9037: p_commit IN VARCHAR2 := FND_API.G_FALSE,
9038: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
9039: p_api_version_number IN NUMBER,
9040: x_return_status OUT NOCOPY VARCHAR2,
9041: x_msg_count OUT NOCOPY NUMBER,
9042: x_msg_data OUT NOCOPY VARCHAR2,

Line 9260: l_validate_only VARCHAR2(1) := FND_API.g_false;

9256: l_wf_success_status_code pa_project_statuses.wf_success_status_code%TYPE;
9257: l_wf_failure_status_code pa_project_statuses.wf_failure_status_code%TYPE;
9258: l_status_change_flag VARCHAR2(1) := 'N';
9259: l_start_wf VARCHAR2(1) := 'Y';
9260: l_validate_only VARCHAR2(1) := FND_API.g_false;
9261: l_max_msg_count NUMBER := FND_API.G_MISS_NUM;
9262: l_enforce_security VARCHAR2(1) := 'Y';
9263: l_num_of_actions NUMBER;
9264: l_priority_type VARCHAR2(30) := 'PA_TASK_PRIORITY_CODE';

Line 9261: l_max_msg_count NUMBER := FND_API.G_MISS_NUM;

9257: l_wf_failure_status_code pa_project_statuses.wf_failure_status_code%TYPE;
9258: l_status_change_flag VARCHAR2(1) := 'N';
9259: l_start_wf VARCHAR2(1) := 'Y';
9260: l_validate_only VARCHAR2(1) := FND_API.g_false;
9261: l_max_msg_count NUMBER := FND_API.G_MISS_NUM;
9262: l_enforce_security VARCHAR2(1) := 'Y';
9263: l_num_of_actions NUMBER;
9264: l_priority_type VARCHAR2(30) := 'PA_TASK_PRIORITY_CODE';
9265: l_effort_type VARCHAR2(30) := 'PA_CI_EFFORT_LEVELS';

Line 9289: x_return_status := FND_API.G_RET_STS_SUCCESS;

9285:
9286:
9287: BEGIN
9288:
9289: x_return_status := FND_API.G_RET_STS_SUCCESS;
9290:
9291: l_debug_mode := NVL(FND_PROFILE.VALUE_SPECIFIC('PA_DEBUG_MODE', fnd_global.user_id, fnd_global.login_id, 275, null, null), 'N');
9292:
9293: IF l_debug_mode = 'Y' THEN

Line 9297: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list, FND_API.G_TRUE)) THEN

9293: IF l_debug_mode = 'Y' THEN
9294: PA_DEBUG.set_curr_function(p_function => 'UPDATE_CHANGE_ORDER', p_debug_mode => l_debug_mode);
9295: END IF;
9296:
9297: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list, FND_API.G_TRUE)) THEN
9298: FND_MSG_PUB.initialize;
9299: END IF;
9300:
9301: IF p_commit = FND_API.G_TRUE THEN

Line 9301: IF p_commit = FND_API.G_TRUE THEN

9297: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list, FND_API.G_TRUE)) THEN
9298: FND_MSG_PUB.initialize;
9299: END IF;
9300:
9301: IF p_commit = FND_API.G_TRUE THEN
9302: savepoint UPDATE_CO_SVPT;
9303: END IF;
9304:
9305: IF l_debug_mode = 'Y' THEN

Line 9315: RAISE FND_API.G_EXC_ERROR;

9311: IF curr_row%NOTFOUND then
9312: close curr_row;
9313: PA_UTILS.Add_Message( p_app_short_name => 'PA'
9314: ,p_msg_name => 'PA_CI_INVALID_ITEM'); /* Change this message */
9315: RAISE FND_API.G_EXC_ERROR;
9316: ELSE
9317:
9318: l_curr_status_code := cp.status_code;
9319: l_record_version_number := cp.record_version_number;

Line 9382: RAISE FND_API.G_EXC_ERROR;

9378: if l_debug_mode = 'Y' then
9379: pa_debug.g_err_stage:= 'wrong usage of the api for the control item type';
9380: pa_debug.write(l_module,pa_debug.g_err_stage,l_debug_level3);
9381: end if;
9382: RAISE FND_API.G_EXC_ERROR;
9383: end if;
9384:
9385:
9386: l_curr_system_status := PA_CONTROL_ITEMS_UTILS.getSystemStatus(l_curr_status_code);

Line 9396: RAISE FND_API.G_EXC_ERROR;

9392:
9393: IF (l_check_update_access = 'F') THEN
9394:
9395: PA_UTILS.ADD_MESSAGE('PA', 'PA_CI_NO_UPDATE_ACCESS');
9396: RAISE FND_API.G_EXC_ERROR;
9397:
9398: END IF;
9399:
9400: IF l_debug_mode = 'Y' THEN

Line 9411: RAISE FND_API.G_EXC_ERROR;

9407:
9408: IF (l_chk_status_ctrl = 'N') THEN
9409:
9410: PA_UTILS.ADD_MESSAGE('PA', 'PA_CI_NO_ALLOW_UPDATE');
9411: RAISE FND_API.G_EXC_ERROR;
9412:
9413: END IF;
9414:
9415:

Line 9429: RAISE FND_API.G_EXC_ERROR;

9425:
9426: IF (l_enable_wf_flag = 'Y' AND l_wf_success_status_code IS NOT NULL AND l_wf_failure_status_code IS NOT NULL) THEN
9427:
9428: PA_UTILS.ADD_MESSAGE('PA', 'PA_CI_APPROVAL_WORKFLOW');
9429: RAISE FND_API.G_EXC_ERROR;
9430:
9431: END IF;
9432:
9433: IF l_debug_mode = 'Y' THEN

Line 9506: x_return_status := FND_API.G_RET_STS_ERROR;

9502:
9503: IF (l_rows < 0) THEN
9504: PA_UTILS.Add_Message( p_app_short_name => 'PA'
9505: ,p_msg_name => 'PA_TO_STATUS_INVALID');
9506: x_return_status := FND_API.G_RET_STS_ERROR;
9507: l_to_status_flag := 'N';
9508: ELSE
9509: l_rows1 := DBMS_SQL.FETCH_ROWS(l_cursor);
9510:

Line 9517: x_return_status := FND_API.G_RET_STS_ERROR;

9513: l_ci_status_code := l_ci_status_code_1;
9514: else
9515: PA_UTILS.Add_Message( p_app_short_name => 'PA'
9516: ,p_msg_name => 'PA_TO_STATUS_INVALID');
9517: x_return_status := FND_API.G_RET_STS_ERROR;
9518: l_to_status_flag := 'N';
9519: end if;
9520:
9521: END IF;

Line 9528: x_return_status := FND_API.G_RET_STS_ERROR;

9524: END IF;
9525: ELSIF p_ci_status_code IS NULL THEN
9526: l_ci_status_code := p_ci_status_code;
9527: PA_UTILS.ADD_MESSAGE('PA', 'PA_CI_NULL_STATUS');
9528: x_return_status := FND_API.G_RET_STS_ERROR;
9529: l_to_status_flag := 'N';
9530: END IF;
9531:
9532: IF p_record_version_number = G_PA_MISS_NUM THEN

Line 9544: x_return_status := FND_API.G_RET_STS_ERROR;

9540: ELSIF p_summary IS NOT NULL THEN
9541: l_summary := p_summary;
9542: ELSIF p_summary IS NULL THEN
9543: PA_UTILS.ADD_MESSAGE('PA', 'PA_CI_NULL_SUMMARY');
9544: x_return_status := FND_API.G_RET_STS_ERROR;
9545: END IF;
9546:
9547: IF p_description = G_PA_MISS_CHAR THEN
9548: NULL;

Line 9631: x_return_status := FND_API.G_RET_STS_ERROR;

9627: /* Getting validated in pa_control_items_pub.update_control_item API. */
9628: ELSIF p_owner_id IS NULL THEN
9629: PA_UTILS.Add_Message( p_app_short_name => 'PA'
9630: ,p_msg_name => 'PA_CI_OWNER_NULL');
9631: x_return_status := FND_API.G_RET_STS_ERROR;
9632: END IF;
9633:
9634: IF p_classification_code = G_PA_MISS_NUM THEN
9635: NULL;

Line 9643: x_return_status := FND_API.G_RET_STS_ERROR;

9639: IF c_classification%NOTFOUND then
9640: -- close c_classification;
9641: PA_UTILS.Add_Message( p_app_short_name => 'PA'
9642: ,p_msg_name => 'PA_CI_CLASSIFICATION_INV');
9643: x_return_status := FND_API.G_RET_STS_ERROR;
9644: END IF;
9645: close c_classification;
9646: ELSIF p_classification_code IS NULL THEN
9647: PA_UTILS.Add_Message( p_app_short_name => 'PA'

Line 9649: x_return_status := FND_API.G_RET_STS_ERROR;

9645: close c_classification;
9646: ELSIF p_classification_code IS NULL THEN
9647: PA_UTILS.Add_Message( p_app_short_name => 'PA'
9648: ,p_msg_name => 'PA_CI_CLASSIFICATION_NULL');
9649: x_return_status := FND_API.G_RET_STS_ERROR;
9650: END IF;
9651:
9652: IF p_reason_code = G_PA_MISS_NUM THEN
9653: NULL;

Line 9661: x_return_status := FND_API.G_RET_STS_ERROR;

9657: IF c_reason%NOTFOUND then
9658: -- close c_reason;
9659: PA_UTILS.Add_Message( p_app_short_name => 'PA'
9660: ,p_msg_name => 'PA_CI_REASON_INV');
9661: x_return_status := FND_API.G_RET_STS_ERROR;
9662: END IF;
9663: close c_reason;
9664: ELSIF p_reason_code IS NULL THEN
9665: PA_UTILS.Add_Message( p_app_short_name => 'PA'

Line 9667: x_return_status := FND_API.G_RET_STS_ERROR;

9663: close c_reason;
9664: ELSIF p_reason_code IS NULL THEN
9665: PA_UTILS.Add_Message( p_app_short_name => 'PA'
9666: ,p_msg_name => 'PA_CI_REASON_NULL');
9667: x_return_status := FND_API.G_RET_STS_ERROR;
9668: END IF;
9669:
9670: IF p_object_id = G_PA_MISS_NUM THEN
9671: NULL;

Line 9684: x_return_status := FND_API.G_RET_STS_ERROR;

9680:
9681: EXCEPTION WHEN TOO_MANY_ROWS THEN
9682: PA_UTILS.Add_Message( p_app_short_name => 'PA'
9683: ,p_msg_name => 'PA_OBJECT_NAME_MULTIPLE');
9684: x_return_status := FND_API.G_RET_STS_ERROR;
9685:
9686: WHEN OTHERS THEN
9687: PA_UTILS.Add_Message( p_app_short_name => 'PA'
9688: ,p_msg_name => 'PA_OBJECT_NAME_INV');

Line 9689: x_return_status := FND_API.G_RET_STS_ERROR;

9685:
9686: WHEN OTHERS THEN
9687: PA_UTILS.Add_Message( p_app_short_name => 'PA'
9688: ,p_msg_name => 'PA_OBJECT_NAME_INV');
9689: x_return_status := FND_API.G_RET_STS_ERROR;
9690: END;
9691: ELSIF p_object_id IS NULL THEN
9692: l_object_id := p_object_id;
9693: END IF;

Line 9703: x_return_status := FND_API.G_RET_STS_ERROR;

9699: l_object_type := p_object_type;
9700: ELSE
9701: PA_UTILS.Add_Message( p_app_short_name => 'PA'
9702: ,p_msg_name => 'PA_OBJECT_TYPE_INV');
9703: x_return_status := FND_API.G_RET_STS_ERROR;
9704: END IF;
9705: ELSIF p_object_type IS NULL THEN
9706: l_object_type := p_object_type;
9707: END IF;

Line 9726: x_return_status := FND_API.G_RET_STS_ERROR;

9722: IF c_lkup%NOTFOUND then
9723: -- close c_lkup;
9724: PA_UTILS.Add_Message( p_app_short_name => 'PA'
9725: ,p_msg_name => 'PA_CI_PRIORITY_INV');
9726: x_return_status := FND_API.G_RET_STS_ERROR;
9727: END IF;
9728: close c_lkup;
9729: ELSIF p_priority_code IS NULL THEN
9730: l_priority_code := p_priority_code;

Line 9742: x_return_status := FND_API.G_RET_STS_ERROR;

9738: IF c_lkup%NOTFOUND then
9739: -- close c_lkup;
9740: PA_UTILS.Add_Message( p_app_short_name => 'PA'
9741: ,p_msg_name => 'PA_CI_EFFORT_INV');
9742: x_return_status := FND_API.G_RET_STS_ERROR;
9743: END IF;
9744: close c_lkup;
9745: ELSIF p_effort_level_code IS NULL THEN
9746: l_effort_level_code := p_effort_level_code;

Line 9775: x_return_status := FND_API.G_RET_STS_ERROR;

9771: IF c_lkup%NOTFOUND then
9772: -- close c_lkup;
9773: PA_UTILS.Add_Message( p_app_short_name => 'PA'
9774: ,p_msg_name => 'PA_CI_SOURCE_TYPE_INV');
9775: x_return_status := FND_API.G_RET_STS_ERROR;
9776: END IF;
9777: close c_lkup;
9778: ELSIF p_source_type_code IS NULL THEN
9779: l_source_type_code := p_source_type_code;

Line 9819: x_return_status := FND_API.G_RET_STS_ERROR;

9815: l_progress_as_of_date := p_progress_as_of_date;
9816: ELSIF p_progress_as_of_date IS NULL THEN
9817: PA_UTILS.Add_Message( p_app_short_name => 'PA'
9818: ,p_msg_name => 'PA_AS_OF_DATE_NULL');
9819: x_return_status := FND_API.G_RET_STS_ERROR;
9820: END IF;
9821:
9822: OPEN c_auto_num;
9823: FETCH c_auto_num INTO l_auto_numbers;

Line 9839: x_return_status := FND_API.G_RET_STS_ERROR;

9835: IF l_ci_number IS NULL THEN
9836: IF (l_curr_system_status = 'CI_DRAFT' AND (l_new_system_status IS NOT NULL AND l_new_system_status <> 'CI_DRAFT')) THEN
9837: PA_UTILS.Add_Message( p_app_short_name => 'PA'
9838: ,p_msg_name => 'PA_CI_NO_CI_NUMBER');
9839: x_return_status := FND_API.G_RET_STS_ERROR;
9840: ELSIF l_curr_system_status <> 'CI_DRAFT' THEN
9841: PA_UTILS.Add_Message( p_app_short_name => 'PA'
9842: ,p_msg_name => 'PA_CI_NO_CI_NUMBER');
9843: x_return_status := FND_API.G_RET_STS_ERROR;

Line 9843: x_return_status := FND_API.G_RET_STS_ERROR;

9839: x_return_status := FND_API.G_RET_STS_ERROR;
9840: ELSIF l_curr_system_status <> 'CI_DRAFT' THEN
9841: PA_UTILS.Add_Message( p_app_short_name => 'PA'
9842: ,p_msg_name => 'PA_CI_NO_CI_NUMBER');
9843: x_return_status := FND_API.G_RET_STS_ERROR;
9844: END IF;
9845: END IF;
9846: ELSIF p_ci_number IS NULL THEN
9847: IF (l_curr_system_status = 'CI_DRAFT' AND (l_new_system_status IS NOT NULL AND l_new_system_status <> 'CI_DRAFT')) THEN

Line 9850: x_return_status := FND_API.G_RET_STS_ERROR;

9846: ELSIF p_ci_number IS NULL THEN
9847: IF (l_curr_system_status = 'CI_DRAFT' AND (l_new_system_status IS NOT NULL AND l_new_system_status <> 'CI_DRAFT')) THEN
9848: PA_UTILS.Add_Message( p_app_short_name => 'PA'
9849: ,p_msg_name => 'PA_CI_NO_CI_NUMBER');
9850: x_return_status := FND_API.G_RET_STS_ERROR;
9851: ELSIF l_curr_system_status <> 'CI_DRAFT' THEN
9852: PA_UTILS.Add_Message( p_app_short_name => 'PA'
9853: ,p_msg_name => 'PA_CI_NO_CI_NUMBER');
9854: x_return_status := FND_API.G_RET_STS_ERROR;

Line 9854: x_return_status := FND_API.G_RET_STS_ERROR;

9850: x_return_status := FND_API.G_RET_STS_ERROR;
9851: ELSIF l_curr_system_status <> 'CI_DRAFT' THEN
9852: PA_UTILS.Add_Message( p_app_short_name => 'PA'
9853: ,p_msg_name => 'PA_CI_NO_CI_NUMBER');
9854: x_return_status := FND_API.G_RET_STS_ERROR;
9855: END IF;
9856: END IF;
9857:
9858: ELSIF p_ci_number IS NOT NULL THEN

Line 9869: x_return_status := FND_API.G_RET_STS_ERROR;

9865: ELSE
9866: CLOSE c_ci_number;
9867: PA_UTILS.Add_Message( p_app_short_name => 'PA'
9868: ,p_msg_name => 'PA_CI_DUPLICATE_CI_NUMBER');
9869: x_return_status := FND_API.G_RET_STS_ERROR;
9870: END IF;
9871: END IF;
9872:
9873: END IF;

Line 9885: x_return_status := FND_API.G_RET_STS_ERROR;

9881: IF c_statuses%NOTFOUND then
9882: close c_statuses;
9883: PA_UTILS.Add_Message( p_app_short_name => 'PA'
9884: ,p_msg_name => 'PA_PROGRESS_STATUS_INV');
9885: x_return_status := FND_API.G_RET_STS_ERROR;
9886: END IF;
9887: close c_statuses;
9888: ELSIF p_progress_status_code IS NULL THEN
9889: PA_UTILS.Add_Message( p_app_short_name => 'PA'

Line 9891: x_return_status := FND_API.G_RET_STS_ERROR;

9887: close c_statuses;
9888: ELSIF p_progress_status_code IS NULL THEN
9889: PA_UTILS.Add_Message( p_app_short_name => 'PA'
9890: ,p_msg_name => 'PA_PROGRESS_STATUS_NULL');
9891: x_return_status := FND_API.G_RET_STS_ERROR;
9892: END IF;
9893:
9894: IF p_progress_overview = G_PA_MISS_CHAR THEN
9895: NULL;

Line 9909: x_return_status := FND_API.G_RET_STS_ERROR;

9905: IF c_resolution%NOTFOUND then
9906: close c_resolution;
9907: PA_UTILS.Add_Message( p_app_short_name => 'PA'
9908: ,p_msg_name => 'PA_CI_RESOLUTION_INV');
9909: x_return_status := FND_API.G_RET_STS_ERROR;
9910: END IF;
9911: close c_resolution;
9912: ELSIF p_resolution_code IS NULL THEN
9913: l_resolution_code_id := p_resolution_code;

Line 10068: x_return_status := FND_API.G_RET_STS_ERROR;

10064: IF (PA_CONTROL_ITEMS_UTILS.checkhasresolution(p_ci_id) <> 'Y' ) THEN
10065: IF (l_resolution_code_id IS NULL) THEN
10066: PA_UTILS.Add_Message( p_app_short_name => 'PA'
10067: ,p_msg_name => 'PA_CI_RESOLUTION_OPEN');
10068: x_return_status := FND_API.G_RET_STS_ERROR;
10069: END IF;
10070: ELSE
10071: IF (l_resolution_code_id IS NULL) THEN
10072: PA_UTILS.Add_Message( p_app_short_name => 'PA'

Line 10074: x_return_status := FND_API.G_RET_STS_ERROR;

10070: ELSE
10071: IF (l_resolution_code_id IS NULL) THEN
10072: PA_UTILS.Add_Message( p_app_short_name => 'PA'
10073: ,p_msg_name => 'PA_CI_RESOLUTION_OPEN');
10074: x_return_status := FND_API.G_RET_STS_ERROR;
10075: END IF;
10076: END IF;
10077: END IF;
10078:

Line 10084: x_return_status := FND_API.G_RET_STS_ERROR;

10080: IF (PA_CONTROL_ITEMS_UTILS.checkhasresolution(p_ci_id) <> 'Y' ) THEN
10081: IF (l_resolution_code_id IS NULL) THEN
10082: PA_UTILS.Add_Message( p_app_short_name => 'PA'
10083: ,p_msg_name => 'PA_CI_CLOSE_INV_RES');
10084: x_return_status := FND_API.G_RET_STS_ERROR;
10085: END IF;
10086: ELSE
10087: IF (l_resolution_code_id IS NULL) THEN
10088: PA_UTILS.Add_Message( p_app_short_name => 'PA'

Line 10090: x_return_status := FND_API.G_RET_STS_ERROR;

10086: ELSE
10087: IF (l_resolution_code_id IS NULL) THEN
10088: PA_UTILS.Add_Message( p_app_short_name => 'PA'
10089: ,p_msg_name => 'PA_CI_CLOSE_INV_RES');
10090: x_return_status := FND_API.G_RET_STS_ERROR;
10091: END IF;
10092: END IF;
10093: END IF;
10094:

Line 10098: IF (l_validate_only <> fnd_api.g_true AND x_return_status = 'S') THEN

10094:
10095: END IF;
10096:
10097:
10098: IF (l_validate_only <> fnd_api.g_true AND x_return_status = 'S') THEN
10099:
10100: IF l_debug_mode = 'Y' THEN
10101: pa_debug.write(l_module, 'before call to PA_CONTROL_ITEMS_PUB.UPDATE_CONTROL_ITEM', l_debug_level3);
10102: END IF;

Line 10106: ,p_init_msg_list => fnd_api.g_false

10102: END IF;
10103:
10104: PA_CONTROL_ITEMS_PUB.UPDATE_CONTROL_ITEM (
10105: p_api_version => 1.0
10106: ,p_init_msg_list => fnd_api.g_false
10107: ,p_commit => FND_API.g_false
10108: ,p_validate_only => FND_API.g_false
10109: ,p_max_msg_count => FND_API.g_miss_num
10110: ,p_ci_id => p_ci_id

Line 10107: ,p_commit => FND_API.g_false

10103:
10104: PA_CONTROL_ITEMS_PUB.UPDATE_CONTROL_ITEM (
10105: p_api_version => 1.0
10106: ,p_init_msg_list => fnd_api.g_false
10107: ,p_commit => FND_API.g_false
10108: ,p_validate_only => FND_API.g_false
10109: ,p_max_msg_count => FND_API.g_miss_num
10110: ,p_ci_id => p_ci_id
10111: ,p_ci_type_id => l_ci_type_id

Line 10108: ,p_validate_only => FND_API.g_false

10104: PA_CONTROL_ITEMS_PUB.UPDATE_CONTROL_ITEM (
10105: p_api_version => 1.0
10106: ,p_init_msg_list => fnd_api.g_false
10107: ,p_commit => FND_API.g_false
10108: ,p_validate_only => FND_API.g_false
10109: ,p_max_msg_count => FND_API.g_miss_num
10110: ,p_ci_id => p_ci_id
10111: ,p_ci_type_id => l_ci_type_id
10112: ,p_summary => l_summary

Line 10109: ,p_max_msg_count => FND_API.g_miss_num

10105: p_api_version => 1.0
10106: ,p_init_msg_list => fnd_api.g_false
10107: ,p_commit => FND_API.g_false
10108: ,p_validate_only => FND_API.g_false
10109: ,p_max_msg_count => FND_API.g_miss_num
10110: ,p_ci_id => p_ci_id
10111: ,p_ci_type_id => l_ci_type_id
10112: ,p_summary => l_summary
10113: ,p_status_code => l_ci_status_code

Line 10172: IF (l_status_change_flag = 'Y' AND l_validate_only <> fnd_api.g_true AND x_return_status = 'S') THEN

10168: END IF;
10169:
10170: END IF;
10171:
10172: IF (l_status_change_flag = 'Y' AND l_validate_only <> fnd_api.g_true AND x_return_status = 'S') THEN
10173:
10174: /* call the insert table handlers of pa_obj_status_changes and pa_ci_comments here */
10175:
10176: IF l_debug_mode = 'Y' THEN

Line 10219: IF (p_commit = FND_API.G_TRUE AND x_return_status = FND_API.G_RET_STS_SUCCESS) THEN

10215:
10216: END IF;
10217:
10218:
10219: IF (p_commit = FND_API.G_TRUE AND x_return_status = FND_API.G_RET_STS_SUCCESS) THEN
10220:
10221: IF l_debug_mode = 'Y' THEN
10222: pa_debug.write(l_module, 'Before Commit', l_debug_level3);
10223: END IF;

Line 10237: WHEN FND_API.G_EXC_ERROR THEN

10233:
10234:
10235: EXCEPTION
10236:
10237: WHEN FND_API.G_EXC_ERROR THEN
10238: IF l_debug_mode = 'Y' THEN
10239: pa_debug.write(l_module, 'in FND_API.G_EXC_ERROR exception', l_debug_level3);
10240: END IF;
10241: x_return_status := FND_API.G_RET_STS_ERROR;

Line 10239: pa_debug.write(l_module, 'in FND_API.G_EXC_ERROR exception', l_debug_level3);

10235: EXCEPTION
10236:
10237: WHEN FND_API.G_EXC_ERROR THEN
10238: IF l_debug_mode = 'Y' THEN
10239: pa_debug.write(l_module, 'in FND_API.G_EXC_ERROR exception', l_debug_level3);
10240: END IF;
10241: x_return_status := FND_API.G_RET_STS_ERROR;
10242: l_msg_count := FND_MSG_PUB.count_msg;
10243:

Line 10241: x_return_status := FND_API.G_RET_STS_ERROR;

10237: WHEN FND_API.G_EXC_ERROR THEN
10238: IF l_debug_mode = 'Y' THEN
10239: pa_debug.write(l_module, 'in FND_API.G_EXC_ERROR exception', l_debug_level3);
10240: END IF;
10241: x_return_status := FND_API.G_RET_STS_ERROR;
10242: l_msg_count := FND_MSG_PUB.count_msg;
10243:
10244: IF p_commit = FND_API.G_TRUE THEN
10245: ROLLBACK TO UPDATE_CO_SVPT;

Line 10244: IF p_commit = FND_API.G_TRUE THEN

10240: END IF;
10241: x_return_status := FND_API.G_RET_STS_ERROR;
10242: l_msg_count := FND_MSG_PUB.count_msg;
10243:
10244: IF p_commit = FND_API.G_TRUE THEN
10245: ROLLBACK TO UPDATE_CO_SVPT;
10246: END IF;
10247:
10248: IF l_msg_count = 1 AND x_msg_data IS NULL THEN

Line 10250: ( p_encoded => FND_API.G_FALSE

10246: END IF;
10247:
10248: IF l_msg_count = 1 AND x_msg_data IS NULL THEN
10249: PA_INTERFACE_UTILS_PUB.get_messages
10250: ( p_encoded => FND_API.G_FALSE
10251: , p_msg_index => 1
10252: , p_msg_count => l_msg_count
10253: , p_msg_data => l_msg_data
10254: , p_data => l_data

Line 10272: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

10268: WHEN OTHERS THEN
10269: IF l_debug_mode = 'Y' THEN
10270: pa_debug.write(l_module, 'in OTHERS exception', l_debug_level3);
10271: END IF;
10272: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
10273: x_msg_data := substr(SQLERRM,1,240);
10274:
10275: IF p_commit = FND_API.G_TRUE THEN
10276: ROLLBACK TO UPDATE_CO_SVPT;

Line 10275: IF p_commit = FND_API.G_TRUE THEN

10271: END IF;
10272: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
10273: x_msg_data := substr(SQLERRM,1,240);
10274:
10275: IF p_commit = FND_API.G_TRUE THEN
10276: ROLLBACK TO UPDATE_CO_SVPT;
10277: END IF;
10278:
10279: FND_MSG_PUB.add_exc_msg