DBA Data[Home] [Help]

APPS.PA_CONTROL_API_PVT dependencies on FND_API

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

62: x_ci_impact_id OUT NOCOPY NUMBER,
63: p_impact_type_code IN VARCHAR2 := G_PA_MISS_CHAR,
64: p_impact_description IN VARCHAR2 := G_PA_MISS_CHAR,
65: p_mode IN VARCHAR2,
66: p_commit IN VARCHAR2 := FND_API.G_FALSE,
67: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
68: p_api_version_number IN NUMBER ,
69: x_return_status OUT NOCOPY VARCHAR2,
70: x_msg_count OUT NOCOPY NUMBER,

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

63: p_impact_type_code IN VARCHAR2 := G_PA_MISS_CHAR,
64: p_impact_description IN VARCHAR2 := G_PA_MISS_CHAR,
65: p_mode IN VARCHAR2,
66: p_commit IN VARCHAR2 := FND_API.G_FALSE,
67: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
68: p_api_version_number IN NUMBER ,
69: x_return_status OUT NOCOPY VARCHAR2,
70: x_msg_count OUT NOCOPY NUMBER,
71: x_msg_data OUT NOCOPY VARCHAR2

Line 142: x_return_status := FND_API.G_RET_STS_SUCCESS;

138: BEGIN
139:
140:
141: -- initialize the return status to success
142: x_return_status := FND_API.G_RET_STS_SUCCESS;
143: l_debug_mode := NVL(FND_PROFILE.VALUE_SPECIFIC('PA_DEBUG_MODE',fnd_global.user_id, fnd_global.resp_id, 275, null, null), 'N');
144: if l_debug_mode = 'Y' then
145: pa_debug.set_curr_function(p_function =>l_module_name,p_debug_mode => l_debug_mode);
146: end if;

Line 165: x_return_status := FND_API.G_RET_STS_ERROR;

161: if l_debug_mode = 'Y' then
162: pa_debug.g_err_stage:= 'The ci_id is invalid';
163: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
164: end if;
165: x_return_status := FND_API.G_RET_STS_ERROR;
166: close Get_CI_Data;
167: raise FND_API.G_EXC_ERROR;
168: else
169: close Get_CI_Data;

Line 167: raise FND_API.G_EXC_ERROR;

163: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
164: end if;
165: x_return_status := FND_API.G_RET_STS_ERROR;
166: close Get_CI_Data;
167: raise FND_API.G_EXC_ERROR;
168: else
169: close Get_CI_Data;
170: end if;
171:

Line 185: x_return_status := FND_API.G_RET_STS_ERROR;

181: if l_debug_mode = 'Y' then
182: pa_debug.g_err_stage:= 'The given CI_ID is an ISSUE, does not contain any impact';
183: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
184: end if;
185: x_return_status := FND_API.G_RET_STS_ERROR;
186: raise FND_API.G_EXC_ERROR ;
187: end if;
188:
189: /*Checking whether given impact_type_code exists in the possible impacts types

Line 186: raise FND_API.G_EXC_ERROR ;

182: pa_debug.g_err_stage:= 'The given CI_ID is an ISSUE, does not contain any impact';
183: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
184: end if;
185: x_return_status := FND_API.G_RET_STS_ERROR;
186: raise FND_API.G_EXC_ERROR ;
187: end if;
188:
189: /*Checking whether given impact_type_code exists in the possible impacts types
190: These possible impacts types are enabled during the creation of control type.*/

Line 200: x_return_status := FND_API.G_RET_STS_ERROR;

196: if l_debug_mode = 'Y' then
197: pa_debug.g_err_stage:= 'the ci_imapct_type_code is invalid, This is impact is not enabled for the control item type.';
198: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
199: end if;
200: x_return_status := FND_API.G_RET_STS_ERROR;
201: close c_impact_types;
202: raise FND_API.G_EXC_ERROR ;
203: else
204: close c_impact_types;

Line 202: raise FND_API.G_EXC_ERROR ;

198: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
199: end if;
200: x_return_status := FND_API.G_RET_STS_ERROR;
201: close c_impact_types;
202: raise FND_API.G_EXC_ERROR ;
203: else
204: close c_impact_types;
205: end if;
206:

Line 222: x_return_status := FND_API.G_RET_STS_ERROR;

218: l_impact_description1 := c_check_impact_exists_rec.description;
219: if p_mode = 'INSERT' then
220: PA_UTILS.add_Message( p_app_short_name => 'PA'
221: ,p_msg_name => 'PA_CI_IMPACT_EXIST');
222: x_return_status := FND_API.G_RET_STS_ERROR;
223: if l_debug_mode = 'Y' then
224: pa_debug.g_err_stage:= 'Cannot be inserted as the record already exists for the given impact type code';
225: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
226: end if;

Line 228: raise FND_API.G_EXC_ERROR;

224: pa_debug.g_err_stage:= 'Cannot be inserted as the record already exists for the given impact type code';
225: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
226: end if;
227: close c_check_impact_exists;
228: raise FND_API.G_EXC_ERROR;
229: else
230: close c_check_impact_exists;
231: end if;
232: else

Line 236: x_return_status := FND_API.G_RET_STS_ERROR;

232: else
233: if p_mode = 'UPDATE' then
234: PA_UTILS.add_Message( p_app_short_name => 'PA'
235: ,p_msg_name => 'PA_NO_CI_IMPACT');
236: x_return_status := FND_API.G_RET_STS_ERROR;
237: if l_debug_mode = 'Y' then
238: pa_debug.g_err_stage:= 'Cannot update the impact, as there is no record exists';
239: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
240: end if;

Line 242: raise FND_API.G_EXC_ERROR;

238: pa_debug.g_err_stage:= 'Cannot update the impact, as there is no record exists';
239: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
240: end if;
241: close c_check_impact_exists;
242: raise FND_API.G_EXC_ERROR;
243: else
244: close c_check_impact_exists;
245: end if;
246: end if; --end for if c_check_impact_exists

Line 258: x_return_status := FND_API.G_RET_STS_ERROR;

254: /*Security check for the CI_ID UpdateAccess*/
255: if 'T' <> Pa_ci_security_pkg.check_update_access (p_ci_id) then
256: PA_UTILS.add_Message( p_app_short_name => 'PA'
257: ,p_msg_name => 'PA_CI_NO_UPDATE_ACCESS');
258: x_return_status := FND_API.G_RET_STS_ERROR;
259: if l_debug_mode = 'Y' then
260: pa_debug.g_err_stage:= 'the CI_ID does not have the update access';
261: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
262: end if;

Line 263: raise FND_API.G_EXC_ERROR ;

259: if l_debug_mode = 'Y' then
260: pa_debug.g_err_stage:= 'the CI_ID does not have the update access';
261: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
262: end if;
263: raise FND_API.G_EXC_ERROR ;
264: end if;
265: if l_debug_mode = 'Y' then
266: pa_debug.g_err_stage:= 'After call to pa_ci_security_pkg.check_update_acces';
267: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);

Line 275: x_return_status := FND_API.G_RET_STS_ERROR;

271: /*Check for the impact security -- coded as in the UI impact_icon is enabled and disabled based on ControlitemListVO query */
272: if ('EDIT'<> pa_ci_impacts_util.get_update_impact_mode(l_ci_id, l_cr_status_code)) then
273: PA_UTILS.add_Message( p_app_short_name => 'PA'
274: ,p_msg_name => 'PA_CI_NO_IMPACT_UPDATE_ACCESS');
275: x_return_status := FND_API.G_RET_STS_ERROR;
276: if l_debug_mode = 'Y' then
277: pa_debug.g_err_stage:= 'the CI_ID does not have the update Impact access';
278: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
279: end if;

Line 280: raise FND_API.G_EXC_ERROR ;

276: if l_debug_mode = 'Y' then
277: pa_debug.g_err_stage:= 'the CI_ID does not have the update Impact access';
278: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
279: end if;
280: raise FND_API.G_EXC_ERROR ;
281: end if;
282:
283: if l_debug_mode = 'Y' then
284: pa_debug.g_err_stage:= 'After call to pa_ci_impacts_util.get_update_impact_mode, to check for the update access';

Line 301: raise FND_API.G_EXC_ERROR ;

297: pa_debug.g_err_stage:= 'Approval workflow is attached';
298: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
299: end if;
300: close Check_Workflow_On_CI;
301: raise FND_API.G_EXC_ERROR ;
302: else
303: close Check_Workflow_On_CI;
304: end if;
305:

Line 317: x_return_status := FND_API.G_RET_STS_ERROR;

313: has_access := pa_control_items_utils.CheckCIActionAllowed('CONTROL_ITEM', l_cr_status_code, 'CONTROL_ITEM_ALLOW_UPDATE',p_ci_id);
314: if has_access <> 'Y' then
315: PA_UTILS.add_Message( p_app_short_name => 'PA'
316: ,p_msg_name => 'PA_CI_NO_ALLOW_UPDATE');
317: x_return_status := FND_API.G_RET_STS_ERROR;
318: if l_debug_mode = 'Y' then
319: pa_debug.g_err_stage:= 'the CI_ID does not have the update access for the current status';
320: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
321: end if;

Line 322: raise FND_API.G_EXC_ERROR ;

318: if l_debug_mode = 'Y' then
319: pa_debug.g_err_stage:= 'the CI_ID does not have the update access for the current status';
320: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
321: end if;
322: raise FND_API.G_EXC_ERROR ;
323: end if;
324: if l_debug_mode = 'Y' then
325: pa_debug.g_err_stage:= 'After checking for CONTROL_ITEM_ALLOW_UPDATE for the current status';
326: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);

Line 337: if p_mode = 'INSERT' and x_return_status = FND_API.G_RET_STS_SUCCESS then

333: pa_debug.g_err_stage:= 'Calling the '||p_mode||' API for impacts';
334: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
335: end if;
336:
337: if p_mode = 'INSERT' and x_return_status = FND_API.G_RET_STS_SUCCESS then
338:
339: /*Validating the p_impact_description with the PA_INTERFACE_UTILS_PUB.G_PA_MISS_XXX */
340: if p_impact_description = G_PA_MISS_CHAR or p_impact_description is null then
341: l_impact_description := null;

Line 349: p_init_msg_list => FND_API.G_FALSE,

345:
346: /*Directly calling the private method in PA_CI_IMPACTS_PVT*/
347: PA_CI_IMPACTS_pvt.create_ci_impact(
348: p_api_version => p_api_version_number,
349: p_init_msg_list => FND_API.G_FALSE,
350: p_commit => p_commit,
351: p_validate_only => 'F',
352: p_max_msg_count => NULL,
353: p_ci_id => p_ci_id,

Line 367: elsif p_mode = 'UPDATE' and x_return_status = FND_API.G_RET_STS_SUCCESS then

363: x_msg_count => x_msg_count,
364: x_msg_data => x_msg_data
365: );
366:
367: elsif p_mode = 'UPDATE' and x_return_status = FND_API.G_RET_STS_SUCCESS then
368:
369: /*Validating the imapct description*/
370: if p_impact_description = G_PA_MISS_CHAR then
371: l_impact_description := l_impact_description1;

Line 380: p_init_msg_list => FND_API.G_FALSE,

376:
377: /*calling directly the PVT method in PA_CI_IMPACTS_pvt*/
378: PA_CI_IMPACTS_pvt.update_ci_impact(
379: p_api_version => p_api_version_number,
380: p_init_msg_list => FND_API.G_FALSE,
381: p_commit => p_commit,
382: p_validate_only => 'F',
383: p_max_msg_count => null,
384: p_ci_impact_id => l_ci_impact_id,

Line 403: if x_return_status <> FND_API.G_RET_STS_SUCCESS then

399: );
400: x_ci_impact_id := 0; --setting the ci_impact_id = 0 in update impact.
401: end if; /*enf for if l_mode*/
402:
403: if x_return_status <> FND_API.G_RET_STS_SUCCESS then
404: raise FND_API.G_EXC_ERROR;
405: end if;
406:
407: --Reset the stack

Line 404: raise FND_API.G_EXC_ERROR;

400: x_ci_impact_id := 0; --setting the ci_impact_id = 0 in update impact.
401: end if; /*enf for if l_mode*/
402:
403: if x_return_status <> FND_API.G_RET_STS_SUCCESS then
404: raise FND_API.G_EXC_ERROR;
405: end if;
406:
407: --Reset the stack
408: if l_debug_mode = 'Y' then

Line 414: when FND_API.G_EXC_ERROR then

410: end if;
411:
412: exception
413:
414: when FND_API.G_EXC_ERROR then
415: x_ci_impact_id := null;
416: x_return_status := FND_API.G_RET_STS_ERROR;
417: l_msg_count := fnd_msg_pub.count_msg;
418: if l_msg_count = 1 then

Line 416: x_return_status := FND_API.G_RET_STS_ERROR;

412: exception
413:
414: when FND_API.G_EXC_ERROR then
415: x_ci_impact_id := null;
416: x_return_status := FND_API.G_RET_STS_ERROR;
417: l_msg_count := fnd_msg_pub.count_msg;
418: if l_msg_count = 1 then
419: pa_interface_utils_pub.get_messages
420: (p_encoded => fnd_api.g_false,

Line 420: (p_encoded => fnd_api.g_false,

416: x_return_status := FND_API.G_RET_STS_ERROR;
417: l_msg_count := fnd_msg_pub.count_msg;
418: if l_msg_count = 1 then
419: pa_interface_utils_pub.get_messages
420: (p_encoded => fnd_api.g_false,
421: p_msg_index => 1,
422: p_msg_count => l_msg_count ,
423: p_msg_data => l_msg_data ,
424: p_data => l_data,

Line 442: x_return_status := fnd_api.g_ret_sts_unexp_error;

438: raise;
439:
440: when others then
441: x_ci_impact_id := null;
442: x_return_status := fnd_api.g_ret_sts_unexp_error;
443: fnd_msg_pub.add_exc_msg ( p_pkg_name => 'PA_CONTROL_API_PVT',
444: p_procedure_name => 'update_impacts',
445: p_error_text => substrb(sqlerrm,1,240));
446: fnd_msg_pub.count_and_get(p_count => x_msg_count,

Line 651: x_return_status := FND_API.G_RET_STS_SUCCESS;

647:
648: BEGIN
649:
650: -- initialize the return status to success
651: x_return_status := FND_API.G_RET_STS_SUCCESS;
652:
653: l_debug_mode :=NVL(FND_PROFILE.VALUE_SPECIFIC('PA_DEBUG_MODE',fnd_global.user_id,fnd_global.resp_id, 275, null, null), 'N');
654: if l_debug_mode = 'Y' then
655: pa_debug.set_curr_function(p_function=>l_module_name,p_debug_mode => l_debug_mode);

Line 726: x_return_status := FND_API.G_RET_STS_ERROR;

722: if l_debug_mode = 'Y' then
723: pa_debug.g_err_stage:= ' The ci_id is null or Change Type is null';
724: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
725: end if;
726: x_return_status := FND_API.G_RET_STS_ERROR;
727: elsif p_change_type is not null and (p_change_type <> 'CREATE' and p_change_type <> 'UPDATE') then
728: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
729: p_msg_name => 'PA_CHANGE_TYPE_INVALID',
730: p_token1 => 'NUMBER',

Line 736: x_return_status := FND_API.G_RET_STS_ERROR;

732: if l_debug_mode = 'Y' then
733: pa_debug.g_err_stage:= ':The Change Type is invalid';
734: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
735: end if;
736: x_return_status := FND_API.G_RET_STS_ERROR;
737: end if; --end for if p_ci_id is null or p_change_type is null
738:
739: /*Checking if the change type is CREATE then po details should be null */
740: If p_change_type is NOT NULL and p_change_type = 'CREATE'

Line 754: x_return_status := FND_API.G_RET_STS_ERROR;

750: if l_debug_mode = 'Y' then
751: pa_debug.g_err_stage:= 'Invalid Change Type (CREATE)- po number should be null';
752: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
753: end if;
754: x_return_status := FND_API.G_RET_STS_ERROR;
755: /*if change_type is UPDATE then user must pass PO details*/
756: elsif p_change_type is NOT NULL and p_change_type = 'UPDATE'
757: and ( (p_po_number is NULL or p_po_number = G_PA_MISS_CHAR)
758: and (p_po_header_id is NULL or p_po_header_id = G_PA_MISS_NUM)

Line 770: x_return_status := FND_API.G_RET_STS_ERROR;

766: if l_debug_mode = 'Y' then
767: pa_debug.g_err_stage:= 'Invalid Change Type (CREATE)- po number should be null';
768: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
769: end if;
770: x_return_status := FND_API.G_RET_STS_ERROR;
771: end if;
772:
773: if l_debug_mode = 'Y' then
774: pa_debug.g_err_stage:= 'After validating the Change Type and ci_id.'||

Line 791: x_return_status := FND_API.G_RET_STS_ERROR;

787: if l_debug_mode = 'Y' then
788: pa_debug.g_err_stage:= 'Invalid Control Item id.' ;
789: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
790: end if;
791: x_return_status := FND_API.G_RET_STS_ERROR;
792: end if;
793: close c_get_project_id;
794: end if;
795:

Line 830: x_return_status := FND_API.G_RET_STS_ERROR;

826: if l_debug_mode = 'Y' then
827: pa_debug.g_err_stage:= 'Invalid Vedor ID';
828: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
829: end if;
830: x_return_status := FND_API.G_RET_STS_ERROR;
831: close c_cur_vendor_id;
832:
833: else
834: close c_cur_vendor_id;

Line 848: x_return_status := FND_API.G_RET_STS_ERROR;

844: if l_debug_mode = 'Y' then
845: pa_debug.g_err_stage:= 'Vedor ID is null';
846: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
847: end if;
848: x_return_status := FND_API.G_RET_STS_ERROR;
849: end if;
850:
851:
852: /* check for the po_number valid or not

Line 867: x_return_status := FND_API.G_RET_STS_ERROR;

863: if l_debug_mode = 'Y' then
864: pa_debug.g_err_stage:= 'The header id is not valid';
865: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
866: end if;
867: x_return_status := FND_API.G_RET_STS_ERROR;
868: close c_check_po_header_id;
869:
870: else
871: l_po_number := c_check_po_header_id_rec.PoNumber;

Line 893: x_return_status := FND_API.G_RET_STS_ERROR;

889: if l_debug_mode = 'Y' then
890: pa_debug.g_err_stage:= 'The Vendor id is not valid';
891: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
892: end if;
893: x_return_status := FND_API.G_RET_STS_ERROR;
894: end if;
895: end if;
896: end if;
897:

Line 910: x_return_status := FND_API.G_RET_STS_ERROR;

906: if l_debug_mode = 'Y' then
907: pa_debug.g_err_stage:= 'The po_number is not valid';
908: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
909: end if;
910: x_return_status := FND_API.G_RET_STS_ERROR;
911: close c_check_po_number;
912:
913: else
914: l_po_number := c_check_po_number_rec.PoNumber;

Line 936: x_return_status := FND_API.G_RET_STS_ERROR;

932: if l_debug_mode = 'Y' then
933: pa_debug.g_err_stage:= 'The Vendor ID is not valid';
934: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
935: end if;
936: x_return_status := FND_API.G_RET_STS_ERROR;
937:
938: end if;
939: end if;
940: end if;

Line 952: x_return_status := FND_API.G_RET_STS_ERROR;

948: if l_debug_mode = 'Y' then
949: pa_debug.g_err_stage:= 'The PO header id or Po Number is null';
950: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
951: end if;
952: x_return_status := FND_API.G_RET_STS_ERROR;
953:
954: end if;
955:
956: end if;

Line 975: x_return_status := FND_API.G_RET_STS_ERROR;

971: if l_debug_mode = 'Y' then
972: pa_debug.g_err_stage:= 'Po Line id is invalid';
973: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
974: end if;
975: x_return_status := FND_API.G_RET_STS_ERROR;
976: close c_check_po_line_id;
977:
978: else
979: l_line_num := c_check_po_line_id_rec.PoLineNum;

Line 997: x_return_status := FND_API.G_RET_STS_ERROR;

993: if l_debug_mode = 'Y' then
994: pa_debug.g_err_stage:= 'Po Line number is invalid';
995: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
996: end if;
997: x_return_status := FND_API.G_RET_STS_ERROR;
998: close c_check_Doc_number;
999:
1000: else
1001: l_line_num := c_check_Doc_number_rec.PoLineNum;

Line 1018: x_return_status := FND_API.G_RET_STS_ERROR;

1014: if l_debug_mode = 'Y' then
1015: pa_debug.g_err_stage:= 'Po Line number is invalid';
1016: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
1017: end if;
1018: x_return_status := FND_API.G_RET_STS_ERROR;
1019: end if;
1020:
1021:
1022: if l_debug_mode = 'Y' then

Line 1050: x_return_status := FND_API.G_RET_STS_ERROR;

1046: if l_debug_mode = 'Y' then
1047: pa_debug.g_err_stage:= 'Currency Code is invalid';
1048: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
1049: end if;
1050: x_return_status := FND_API.G_RET_STS_ERROR;
1051: close c_check_currency_code;
1052:
1053: else
1054: close c_check_currency_code;

Line 1065: x_return_status := FND_API.G_RET_STS_ERROR;

1061: if l_debug_mode = 'Y' then
1062: pa_debug.g_err_stage:= 'Currency Code is invalid';
1063: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
1064: end if;
1065: x_return_status := FND_API.G_RET_STS_ERROR;
1066: close c_check_currency_code;
1067: end if;
1068: elsif (p_currency is null or p_currency = G_PA_MISS_CHAR)
1069: and l_currency_code1 is null

Line 1079: x_return_status := FND_API.G_RET_STS_ERROR;

1075: if l_debug_mode = 'Y' then
1076: pa_debug.g_err_stage:= ' Currency Code is invalid';
1077: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
1078: end if;
1079: x_return_status := FND_API.G_RET_STS_ERROR;
1080: end if;
1081:
1082:
1083: if l_debug_mode = 'Y' then

Line 1097: x_return_status := FND_API.G_RET_STS_ERROR;

1093: if l_debug_mode = 'Y' then
1094: pa_debug.g_err_stage:= 'Change amount cannot be null';
1095: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
1096: end if;
1097: x_return_status := FND_API.G_RET_STS_ERROR;
1098:
1099: elsif p_change_amount is not null and p_change_amount <> G_PA_MISS_NUM then
1100: l_po_line_Amount := p_change_amount;
1101: end if;

Line 1116: if x_return_status = FND_API.G_RET_STS_SUCCESS then

1112: pa_debug.g_err_stage:= 'Before calling the PA_CI_SUPPLIER_UTILS.validateSI to validate and insert';
1113: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
1114: end if;
1115: /*Call the procedure to insert the details*/
1116: if x_return_status = FND_API.G_RET_STS_SUCCESS then
1117: /* PA_CI_SUPPLIER_UTILS.validateSI(
1118: p_ROWID => x_rowid
1119: ,p_RECORD_STATUS => l_record_status
1120: ,p_CI_ID => p_ci_id

Line 1162: raise FND_API.G_EXC_ERROR; --error while inserting the records raise

1158: ,x_return_status => x_return_status
1159: ,x_error_msg_code => l_error_msg_code );
1160:
1161: ELSIF l_error_msg_code is not null then
1162: raise FND_API.G_EXC_ERROR; --error while inserting the records raise
1163: end if;
1164: END LOOP;
1165: if x_return_status <> FND_API.G_RET_STS_SUCCESS or l_error_msg_code is not null then
1166: raise FND_API.G_EXC_ERROR;

Line 1165: if x_return_status <> FND_API.G_RET_STS_SUCCESS or l_error_msg_code is not null then

1161: ELSIF l_error_msg_code is not null then
1162: raise FND_API.G_EXC_ERROR; --error while inserting the records raise
1163: end if;
1164: END LOOP;
1165: if x_return_status <> FND_API.G_RET_STS_SUCCESS or l_error_msg_code is not null then
1166: raise FND_API.G_EXC_ERROR;
1167: end if;
1168: --Reset the stack
1169: if l_debug_mode = 'Y' then

Line 1166: raise FND_API.G_EXC_ERROR;

1162: raise FND_API.G_EXC_ERROR; --error while inserting the records raise
1163: end if;
1164: END LOOP;
1165: if x_return_status <> FND_API.G_RET_STS_SUCCESS or l_error_msg_code is not null then
1166: raise FND_API.G_EXC_ERROR;
1167: end if;
1168: --Reset the stack
1169: if l_debug_mode = 'Y' then
1170: pa_debug.reset_curr_function;

Line 1175: when FND_API.G_EXC_ERROR then

1171: end if;
1172:
1173: Exception
1174:
1175: when FND_API.G_EXC_ERROR then
1176: x_return_status := FND_API.G_RET_STS_ERROR;
1177: l_msg_count := fnd_msg_pub.count_msg;
1178: x_rowid := null; --assign to the initial value
1179: x_ci_transaction_id := null; --assign to the initial value

Line 1176: x_return_status := FND_API.G_RET_STS_ERROR;

1172:
1173: Exception
1174:
1175: when FND_API.G_EXC_ERROR then
1176: x_return_status := FND_API.G_RET_STS_ERROR;
1177: l_msg_count := fnd_msg_pub.count_msg;
1178: x_rowid := null; --assign to the initial value
1179: x_ci_transaction_id := null; --assign to the initial value
1180: if l_msg_count = 1 then

Line 1182: (p_encoded => fnd_api.g_false,

1178: x_rowid := null; --assign to the initial value
1179: x_ci_transaction_id := null; --assign to the initial value
1180: if l_msg_count = 1 then
1181: pa_interface_utils_pub.get_messages
1182: (p_encoded => fnd_api.g_false,
1183: p_msg_index => 1,
1184: p_msg_count => l_msg_count ,
1185: p_msg_data => l_msg_data ,
1186: p_data => l_data,

Line 1201: x_return_status := fnd_api.g_ret_sts_unexp_error;

1197:
1198: raise;
1199:
1200: when others then
1201: x_return_status := fnd_api.g_ret_sts_unexp_error;
1202: x_rowid := null; --assign to the initial value
1203: x_ci_transaction_id := null; --assign to the initial value
1204: fnd_msg_pub.add_exc_msg ( p_pkg_name => 'PA_CONTROL_API_PVT',
1205: p_procedure_name => 'update_impacts',

Line 1288: x_return_status := fnd_api.g_ret_sts_success;

1284: l_any_err_occured_flg VARCHAR2(1);
1285:
1286: begin
1287: -- initialize the return status to success
1288: x_return_status := fnd_api.g_ret_sts_success;
1289: x_msg_count := 0;
1290:
1291: l_debug_mode := NVL(FND_PROFILE.VALUE_SPECIFIC('PA_DEBUG_MODE', fnd_global.user_id, fnd_global.resp_id, 275, null, null), 'N');
1292: l_module_name := 'check_create_ci_allowed' || g_module_name;

Line 1450: raise fnd_api.g_exc_error;

1446: end if;
1447: end if;
1448:
1449: if( l_any_err_occured_flg = 'Y' ) then
1450: raise fnd_api.g_exc_error;
1451: end if;
1452:
1453: if l_debug_mode = 'Y' then
1454: pa_debug.reset_curr_function;

Line 1458: when fnd_api.g_exc_error then

1454: pa_debug.reset_curr_function;
1455: end if;
1456:
1457: exception
1458: when fnd_api.g_exc_error then
1459: x_return_status := fnd_api.g_ret_sts_error;
1460: l_msg_count := fnd_msg_pub.count_msg;
1461: if l_msg_count = 1 then
1462: pa_interface_utils_pub.get_messages

Line 1459: x_return_status := fnd_api.g_ret_sts_error;

1455: end if;
1456:
1457: exception
1458: when fnd_api.g_exc_error then
1459: x_return_status := fnd_api.g_ret_sts_error;
1460: l_msg_count := fnd_msg_pub.count_msg;
1461: if l_msg_count = 1 then
1462: pa_interface_utils_pub.get_messages
1463: (p_encoded => fnd_api.g_false,

Line 1463: (p_encoded => fnd_api.g_false,

1459: x_return_status := fnd_api.g_ret_sts_error;
1460: l_msg_count := fnd_msg_pub.count_msg;
1461: if l_msg_count = 1 then
1462: pa_interface_utils_pub.get_messages
1463: (p_encoded => fnd_api.g_false,
1464: p_msg_index => 1,
1465: p_msg_count => l_msg_count ,
1466: p_msg_data => l_msg_data ,
1467: p_data => l_data,

Line 1489: x_return_status := fnd_api.g_ret_sts_unexp_error;

1485: end if;
1486: --raise the exception
1487: raise;
1488: when others then
1489: x_return_status := fnd_api.g_ret_sts_unexp_error;
1490: fnd_msg_pub.add_exc_msg(p_pkg_name => 'pa_control_api_pvt',
1491: p_procedure_name => 'check_create_ci_allowed',
1492: p_error_text => substrb(sqlerrm,1,240));
1493: fnd_msg_pub.count_and_get(p_count => x_msg_count,

Line 1786: x_return_status := fnd_api.g_ret_sts_success;

1782: l_source_person pa_control_items.source_person%type;
1783: l_ci_id pa_control_items.ci_id%type;
1784: begin
1785: -- initialize the return status to success
1786: x_return_status := fnd_api.g_ret_sts_success;
1787: x_msg_count := 0;
1788:
1789: l_debug_mode := NVL(FND_PROFILE.VALUE_SPECIFIC('PA_DEBUG_MODE', fnd_global.user_id, fnd_global.resp_id, 275, null, null), 'N');
1790: l_module_name := 'validate_param_and_create' || g_module_name;

Line 2219: if x_return_status <> FND_API.g_ret_sts_success then

2215: ,x_return_status => x_return_status
2216: ,x_msg_count => x_msg_count
2217: ,x_msg_data => x_msg_data);
2218:
2219: if x_return_status <> FND_API.g_ret_sts_success then
2220: if l_debug_mode = 'Y' then
2221: pa_debug.g_err_stage:= 'Failed in pa_system_numbers_pkg.get_next_number';
2222: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
2223: end if;

Line 2269: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

2265: l_any_err_occured_flg := 'Y';
2266: end if;
2267: exception
2268: when api_error then
2269: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2270: /*need to get input here as to how to handle the exception and populate the stack with appropriate messages.
2271: Set some other flag l_other_excp here and use tht flag to handle the unexpected case of exception handling*/
2272: l_any_err_occured_flg := 'Y';
2273: end; --for begin

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

2335: p_orig_system_reference=> p_orig_system_reference
2336: );
2337: end if;
2338:
2339: if (x_return_status <> fnd_api.g_ret_sts_success) then
2340: if l_debug_mode = 'Y' then
2341: pa_debug.g_err_stage:= 'Missing ci_number';
2342: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
2343: end if;

Line 2344: raise fnd_api.g_exc_unexpected_error;

2340: if l_debug_mode = 'Y' then
2341: pa_debug.g_err_stage:= 'Missing ci_number';
2342: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
2343: end if;
2344: raise fnd_api.g_exc_unexpected_error;
2345: end if;
2346:
2347: x_ci_id := l_ci_id;
2348: x_ci_number := l_ci_number_char;

Line 2351: raise fnd_api.g_exc_error;

2347: x_ci_id := l_ci_id;
2348: x_ci_number := l_ci_number_char;
2349:
2350: if( l_any_err_occured_flg = 'Y' ) then
2351: raise fnd_api.g_exc_error;
2352: end if;
2353: /* set the out variables ci_id and ci_number if there were no exceptions for any of the attributes*/
2354: x_ci_id := l_ci_id;
2355: x_ci_number := l_ci_number_char;

Line 2363: when fnd_api.g_exc_unexpected_error then

2359: pa_debug.reset_curr_function;
2360: end if;
2361:
2362: exception
2363: when fnd_api.g_exc_unexpected_error then
2364: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2365: FND_MSG_PUB.Count_And_Get(
2366: p_count => x_msg_count ,
2367: p_data => x_msg_data );

Line 2364: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

2360: end if;
2361:
2362: exception
2363: when fnd_api.g_exc_unexpected_error then
2364: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2365: FND_MSG_PUB.Count_And_Get(
2366: p_count => x_msg_count ,
2367: p_data => x_msg_data );
2368: /*Initialize the out variables back to null*/

Line 2377: when fnd_api.g_exc_error then

2373: pa_debug.reset_curr_function;
2374: end if;
2375: --raise the exception
2376: raise;
2377: when fnd_api.g_exc_error then
2378: x_return_status := fnd_api.g_ret_sts_error;
2379: l_msg_count := fnd_msg_pub.count_msg;
2380: if l_msg_count = 1 then
2381: pa_interface_utils_pub.get_messages

Line 2378: x_return_status := fnd_api.g_ret_sts_error;

2374: end if;
2375: --raise the exception
2376: raise;
2377: when fnd_api.g_exc_error then
2378: x_return_status := fnd_api.g_ret_sts_error;
2379: l_msg_count := fnd_msg_pub.count_msg;
2380: if l_msg_count = 1 then
2381: pa_interface_utils_pub.get_messages
2382: (p_encoded => fnd_api.g_false,

Line 2382: (p_encoded => fnd_api.g_false,

2378: x_return_status := fnd_api.g_ret_sts_error;
2379: l_msg_count := fnd_msg_pub.count_msg;
2380: if l_msg_count = 1 then
2381: pa_interface_utils_pub.get_messages
2382: (p_encoded => fnd_api.g_false,
2383: p_msg_index => 1,
2384: p_msg_count => l_msg_count ,
2385: p_msg_data => l_msg_data ,
2386: p_data => l_data,

Line 2405: x_return_status := fnd_api.g_ret_sts_unexp_error;

2401: end if;
2402: --raise the exception
2403: raise;
2404: when others then
2405: x_return_status := fnd_api.g_ret_sts_unexp_error;
2406: fnd_msg_pub.add_exc_msg(p_pkg_name => 'pa_control_api_pvt',
2407: p_procedure_name => 'validate_param_and_create',
2408: p_error_text => substrb(sqlerrm,1,240));
2409: fnd_msg_pub.count_and_get(p_count => x_msg_count,

Line 2451: x_return_status := fnd_api.g_ret_sts_success;

2447: l_check_valid_ci_id_rec check_valid_ci_id%rowtype;
2448: BEGIN
2449:
2450: -- initialize the return status to success
2451: x_return_status := fnd_api.g_ret_sts_success;
2452: x_msg_count := 0;
2453:
2454: l_debug_mode := NVL(FND_PROFILE.VALUE_SPECIFIC('PA_DEBUG_MODE', fnd_global.user_id, fnd_global.resp_id, 275, null, null), 'N');
2455: l_module_name := 'check_create_action_allow' || g_module_name;

Line 2523: raise fnd_api.g_exc_error;

2519: l_any_err_occured_flg := 'Y';
2520: end if;
2521:
2522: if( l_any_err_occured_flg is not null and l_any_err_occured_flg = 'Y' ) then
2523: raise fnd_api.g_exc_error;
2524: end if;
2525:
2526: --rest the stack;
2527: if l_debug_mode = 'Y' then

Line 2532: when fnd_api.g_exc_error then

2528: pa_debug.reset_curr_function;
2529: end if;
2530:
2531: Exception
2532: when fnd_api.g_exc_error then
2533: x_return_status := fnd_api.g_ret_sts_error;
2534: l_msg_count := fnd_msg_pub.count_msg;
2535: if l_msg_count = 1 then
2536: pa_interface_utils_pub.get_messages

Line 2533: x_return_status := fnd_api.g_ret_sts_error;

2529: end if;
2530:
2531: Exception
2532: when fnd_api.g_exc_error then
2533: x_return_status := fnd_api.g_ret_sts_error;
2534: l_msg_count := fnd_msg_pub.count_msg;
2535: if l_msg_count = 1 then
2536: pa_interface_utils_pub.get_messages
2537: (p_encoded => fnd_api.g_false,

Line 2537: (p_encoded => fnd_api.g_false,

2533: x_return_status := fnd_api.g_ret_sts_error;
2534: l_msg_count := fnd_msg_pub.count_msg;
2535: if l_msg_count = 1 then
2536: pa_interface_utils_pub.get_messages
2537: (p_encoded => fnd_api.g_false,
2538: p_msg_index => 1,
2539: p_msg_count => l_msg_count ,
2540: p_msg_data => l_msg_data ,
2541: p_data => l_data,

Line 2558: x_return_status := fnd_api.g_ret_sts_unexp_error;

2554: end if;
2555: --raise the exception
2556: raise;
2557: when others then
2558: x_return_status := fnd_api.g_ret_sts_unexp_error;
2559: fnd_msg_pub.add_exc_msg(p_pkg_name => 'pa_control_api_pvt',
2560: p_procedure_name => 'check_create_action_allow',
2561: p_error_text => substrb(sqlerrm,1,240));
2562: fnd_msg_pub.count_and_get(p_count => x_msg_count,

Line 2617: x_return_status := fnd_api.g_ret_sts_success;

2613: l_module_name VARCHAR2(200);
2614:
2615: BEGIN
2616: -- initialize the return status to success
2617: x_return_status := fnd_api.g_ret_sts_success;
2618: x_msg_count := 0;
2619:
2620: l_debug_mode := NVL(FND_PROFILE.VALUE_SPECIFIC('PA_DEBUG_MODE', fnd_global.user_id, fnd_global.resp_id, 275, null, null), 'N');
2621: l_module_name := 'validate_assignee_id' || g_module_name;

Line 2636: x_return_status := fnd_api.g_ret_sts_error;

2632: /*Validate the passed action assinee id exists in the system*/
2633: open chk_act_assgn_id(p_project_id, p_assignee_id);
2634: fetch chk_act_assgn_id into chk_act_assgn_id_rec;
2635: if(chk_act_assgn_id%notfound) then
2636: x_return_status := fnd_api.g_ret_sts_error;
2637:
2638: if(p_msg_token_num is not null) then
2639: /*if p_msg_token_num is passed then we are raising the parameterized msg which we need in create_action flow frm amg*/
2640: pa_utils.add_message(p_app_short_name => 'PA',

Line 2656: raise fnd_api.g_exc_error;

2652: pa_debug.g_err_stage:= 'Invalid action assingee code passed';
2653: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
2654: end if;
2655: close chk_act_assgn_id;
2656: raise fnd_api.g_exc_error;
2657: else--(chk_act_assgn_id%notfound) then
2658: x_assignee_id := chk_act_assgn_id_rec.party_id;
2659: close chk_act_assgn_id;
2660: end if;--if(chk_act_assgn_id%notfound) then

Line 2663: x_return_status := fnd_api.g_ret_sts_error;

2659: close chk_act_assgn_id;
2660: end if;--if(chk_act_assgn_id%notfound) then
2661: else--if(p_assignee_id is not null) then
2662: /*Action Assignee is Missing for this action record.*/
2663: x_return_status := fnd_api.g_ret_sts_error;
2664:
2665: if(p_msg_token_num is not null) then
2666: pa_utils.add_message(p_app_short_name => 'PA',
2667: p_msg_name => 'PA_CI_MISS_ASSGN_ID',

Line 2679: raise fnd_api.g_exc_error;

2675: if l_debug_mode = 'Y' then
2676: pa_debug.g_err_stage:= 'Action Assignee Id is missing';
2677: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
2678: end if;
2679: raise fnd_api.g_exc_error;
2680: end if;--if(p_assignee_id is not null) then
2681: --rest the stack;
2682: if l_debug_mode = 'Y' then
2683: pa_debug.reset_curr_function;

Line 2687: when fnd_api.g_exc_error then

2683: pa_debug.reset_curr_function;
2684: end if;
2685:
2686: Exception
2687: when fnd_api.g_exc_error then
2688: x_return_status := fnd_api.g_ret_sts_error;
2689: l_msg_count := fnd_msg_pub.count_msg;
2690: if l_msg_count = 1 then
2691: pa_interface_utils_pub.get_messages

Line 2688: x_return_status := fnd_api.g_ret_sts_error;

2684: end if;
2685:
2686: Exception
2687: when fnd_api.g_exc_error then
2688: x_return_status := fnd_api.g_ret_sts_error;
2689: l_msg_count := fnd_msg_pub.count_msg;
2690: if l_msg_count = 1 then
2691: pa_interface_utils_pub.get_messages
2692: (p_encoded => fnd_api.g_false,

Line 2692: (p_encoded => fnd_api.g_false,

2688: x_return_status := fnd_api.g_ret_sts_error;
2689: l_msg_count := fnd_msg_pub.count_msg;
2690: if l_msg_count = 1 then
2691: pa_interface_utils_pub.get_messages
2692: (p_encoded => fnd_api.g_false,
2693: p_msg_index => 1,
2694: p_msg_count => l_msg_count ,
2695: p_msg_data => l_msg_data ,
2696: p_data => l_data,

Line 2712: x_return_status := fnd_api.g_ret_sts_unexp_error;

2708: pa_debug.reset_curr_function;
2709: end if;
2710:
2711: when others then
2712: x_return_status := fnd_api.g_ret_sts_unexp_error;
2713: fnd_msg_pub.add_exc_msg(p_pkg_name => 'pa_control_api_pvt',
2714: p_procedure_name => 'validate_assignee_id',
2715: p_error_text => substrb(sqlerrm,1,240));
2716: fnd_msg_pub.count_and_get(p_count => x_msg_count,

Line 2788: x_return_status := fnd_api.g_ret_sts_success;

2784: chk_valid_src_ci_action_id_rec check_valid_src_ci_action_id%rowtype;
2785:
2786: BEGIN
2787: -- initialize the return status to success
2788: x_return_status := fnd_api.g_ret_sts_success;
2789: x_msg_count := 0;
2790:
2791: l_debug_mode := NVL(FND_PROFILE.VALUE_SPECIFIC('PA_DEBUG_MODE', fnd_global.user_id, fnd_global.resp_id, 275, null, null), 'N');
2792: l_module_name := 'validate_action_attributes' || g_module_name;

Line 2856: if(l_return_status <> fnd_api.g_ret_sts_success) then

2852: ,x_msg_count => l_msg_count
2853: ,x_msg_data => l_msg_data
2854: );
2855:
2856: if(l_return_status <> fnd_api.g_ret_sts_success) then
2857: /* we are not raising the exception here*/
2858: l_any_err_occured_flg := 'Y';
2859: end if;
2860:

Line 3027: raise fnd_api.g_exc_error;

3023:
3024: end if;-- if(p_action_tbl.count > 0) then
3025:
3026: if( l_any_err_occured_flg is not null and l_any_err_occured_flg = 'Y' ) then
3027: raise fnd_api.g_exc_error;
3028: end if;
3029: --reset the err stack
3030: if l_debug_mode = 'Y' then
3031: pa_debug.reset_curr_function;

Line 3035: when fnd_api.g_exc_error then

3031: pa_debug.reset_curr_function;
3032: end if;
3033:
3034: Exception
3035: when fnd_api.g_exc_error then
3036: x_return_status := fnd_api.g_ret_sts_error;
3037: l_msg_count := fnd_msg_pub.count_msg;
3038: if l_msg_count = 1 then
3039: pa_interface_utils_pub.get_messages

Line 3036: x_return_status := fnd_api.g_ret_sts_error;

3032: end if;
3033:
3034: Exception
3035: when fnd_api.g_exc_error then
3036: x_return_status := fnd_api.g_ret_sts_error;
3037: l_msg_count := fnd_msg_pub.count_msg;
3038: if l_msg_count = 1 then
3039: pa_interface_utils_pub.get_messages
3040: (p_encoded => fnd_api.g_false,

Line 3040: (p_encoded => fnd_api.g_false,

3036: x_return_status := fnd_api.g_ret_sts_error;
3037: l_msg_count := fnd_msg_pub.count_msg;
3038: if l_msg_count = 1 then
3039: pa_interface_utils_pub.get_messages
3040: (p_encoded => fnd_api.g_false,
3041: p_msg_index => 1,
3042: p_msg_count => l_msg_count ,
3043: p_msg_data => l_msg_data ,
3044: p_data => l_data,

Line 3060: x_return_status := fnd_api.g_ret_sts_unexp_error;

3056: end if;
3057: --raise the exception
3058: raise;
3059: when others then
3060: x_return_status := fnd_api.g_ret_sts_unexp_error;
3061: fnd_msg_pub.add_exc_msg(p_pkg_name => 'pa_control_api_pvt',
3062: p_procedure_name => 'validate_action_attributes',
3063: p_error_text => substrb(sqlerrm,1,240));
3064: fnd_msg_pub.count_and_get(p_count => x_msg_count,

Line 3110: x_return_status := fnd_api.g_ret_sts_success;

3106: l_num_of_actions number;
3107: l_num_open_action pa_control_items.open_action_num%type;
3108: BEGIN
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_action' || g_module_name;

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

3213: x_return_status => x_return_status,
3214: x_msg_count => x_msg_count,
3215: x_msg_data => x_msg_data);*/
3216:
3217: if(x_return_status <> FND_API.G_RET_STS_SUCCESS) then
3218: l_any_err_occured_flg := 'Y';
3219: end if;
3220:
3221: if l_debug_mode = 'Y' then

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

3241: ,x_return_status => x_return_status
3242: ,x_msg_count => x_msg_count
3243: ,x_msg_data => x_msg_data );
3244:
3245: if(x_return_status <> FND_API.G_RET_STS_SUCCESS) then
3246: l_any_err_occured_flg := 'Y';
3247: end if;
3248:
3249: elsif( p_action_tbl(i).action_status = 'CI_ACTION_CLOSED') then

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

3257: ,x_item_key => l_item_key
3258: ,x_return_status => x_return_status
3259: ,x_msg_count => x_msg_count
3260: ,x_msg_data => x_msg_data );
3261: if(x_return_status <> FND_API.G_RET_STS_SUCCESS) then
3262: l_any_err_occured_flg := 'Y';
3263: end if;
3264: end if;-- if(p_action_tbl(i).action_status = 'CI_ACTION_OPEN') then
3265: end if;--(p_action_tbl(i).start_wf = 'Y')

Line 3283: raise fnd_api.g_exc_unexpected_error;

3279: x_msg_data => x_msg_data);
3280: end if;
3281:
3282: if( l_any_err_occured_flg is not null and l_any_err_occured_flg = 'Y' ) then
3283: raise fnd_api.g_exc_unexpected_error;
3284: end if;
3285:
3286: --reset the err stack
3287: if l_debug_mode = 'Y' then

Line 3292: When fnd_api.g_exc_unexpected_error then

3288: pa_debug.reset_curr_function;
3289: end if;
3290:
3291: Exception
3292: When fnd_api.g_exc_unexpected_error then
3293:
3294: x_return_status := fnd_api.g_ret_sts_unexp_error;
3295: --do a rollback;
3296: FND_MSG_PUB.Count_And_Get(

Line 3294: x_return_status := fnd_api.g_ret_sts_unexp_error;

3290:
3291: Exception
3292: When fnd_api.g_exc_unexpected_error then
3293:
3294: x_return_status := fnd_api.g_ret_sts_unexp_error;
3295: --do a rollback;
3296: FND_MSG_PUB.Count_And_Get(
3297: p_count => x_msg_count ,
3298: p_data => x_msg_data );

Line 3309: x_return_status := fnd_api.g_ret_sts_unexp_error;

3305: end if;
3306: --raise the exception;
3307: raise;
3308: when others then
3309: x_return_status := fnd_api.g_ret_sts_unexp_error;
3310: fnd_msg_pub.add_exc_msg(p_pkg_name => 'pa_control_api_pvt',
3311: p_procedure_name => 'create_action',
3312: p_error_text => substrb(sqlerrm,1,240));
3313: fnd_msg_pub.count_and_get(p_count => x_msg_count,

Line 3369: x_return_status := fnd_api.g_ret_sts_success;

3365:
3366:
3367: begin
3368: -- initialize the return status to success
3369: x_return_status := fnd_api.g_ret_sts_success;
3370: x_msg_count := 0;
3371:
3372: l_debug_mode := NVL(FND_PROFILE.VALUE_SPECIFIC('PA_DEBUG_MODE', fnd_global.user_id, fnd_global.resp_id, 275, null, null), 'N');
3373: l_module_name := 'validate_priv_and_action' || g_module_name;

Line 3398: raise fnd_api.g_exc_error;

3394: pa_debug.g_err_stage := 'all three action_id, ci_id, action_number cannot be missing';
3395: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
3396: end if;
3397: /*raise the exception*/
3398: raise fnd_api.g_exc_error;
3399: end if;-- if( (p_ci_id is null or p_ci_id is = G_PA_MISS_NUM) AND
3400:
3401: if (p_action_id is null or p_action_id = G_PA_MISS_NUM) then
3402:

Line 3419: raise fnd_api.g_exc_error;

3415: pa_debug.g_err_stage := 'there is no action for passed action_number and ci_id';
3416: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
3417: end if;
3418: close get_ci_action_id;
3419: raise fnd_api.g_exc_error;
3420: else--if(get_ci_action_id%notfound) then
3421: x_assignee_id := l_get_ci_action_id_rec.assigned_to;
3422: x_action_id := l_get_ci_action_id_rec.ci_action_id;
3423: x_project_id := l_get_ci_action_id_rec.project_id;

Line 3434: raise fnd_api.g_exc_error;

3430: if (l_debug_mode = 'Y') then
3431: pa_debug.g_err_stage := 'one or both ci_id or action_number is missing';
3432: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
3433: end if;
3434: raise fnd_api.g_exc_error;
3435: end if;--if( (p_ci_id is not null and p_ci_id <> G_PA_MISS_NUM) AND
3436:
3437: else --if (p_action_id is null or p_action_id is G_PA_MISS_NUM) then
3438: /*user has passed a value for action_id. Validate this value here.*/

Line 3450: raise fnd_api.g_exc_error;

3446: pa_debug.g_err_stage := 'invalid action_id passed';
3447: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
3448: end if;
3449: close validate_ci_action_id;
3450: raise fnd_api.g_exc_error;
3451: else--if(validate_ci_action_id%notfound) then
3452: x_assignee_id := l_validate_ci_action_id_rec.assigned_to;
3453: x_action_id := l_validate_ci_action_id_rec.ci_action_id;
3454: x_project_id := l_validate_ci_action_id_rec.project_id;

Line 3467: when fnd_api.g_exc_error then

3463: end if;
3464:
3465: --do the exception handling;
3466: exception
3467: when fnd_api.g_exc_error then
3468: x_return_status := fnd_api.g_ret_sts_error;
3469: l_msg_count := fnd_msg_pub.count_msg;
3470: if l_msg_count = 1 then
3471: pa_interface_utils_pub.get_messages

Line 3468: x_return_status := fnd_api.g_ret_sts_error;

3464:
3465: --do the exception handling;
3466: exception
3467: when fnd_api.g_exc_error then
3468: x_return_status := fnd_api.g_ret_sts_error;
3469: l_msg_count := fnd_msg_pub.count_msg;
3470: if l_msg_count = 1 then
3471: pa_interface_utils_pub.get_messages
3472: (p_encoded => fnd_api.g_false,

Line 3472: (p_encoded => fnd_api.g_false,

3468: x_return_status := fnd_api.g_ret_sts_error;
3469: l_msg_count := fnd_msg_pub.count_msg;
3470: if l_msg_count = 1 then
3471: pa_interface_utils_pub.get_messages
3472: (p_encoded => fnd_api.g_false,
3473: p_msg_index => 1,
3474: p_msg_count => l_msg_count ,
3475: p_msg_data => l_msg_data ,
3476: p_data => l_data,

Line 3497: x_return_status := fnd_api.g_ret_sts_unexp_error;

3493: end if;
3494: --raise the exception
3495: raise;
3496: when others then
3497: x_return_status := fnd_api.g_ret_sts_unexp_error;
3498: fnd_msg_pub.add_exc_msg(p_pkg_name => 'pa_control_api_pvt',
3499: p_procedure_name => 'validate_priv_and_action',
3500: p_error_text => substrb(sqlerrm,1,240));
3501: fnd_msg_pub.count_and_get(p_count => x_msg_count,

Line 3522: p_Commit IN VARCHAR2 DEFAULT FND_API.G_FALSE

3518:
3519:
3520:
3521: Procedure Delete_CI (
3522: p_Commit IN VARCHAR2 DEFAULT FND_API.G_FALSE
3523: , p_Init_Msg_List IN VARCHAR2 DEFAULT FND_API.G_FALSE
3524: , p_Api_Version_Number IN NUMBER
3525: , p_Ci_Id IN NUMBER
3526: , x_Return_Status OUT NOCOPY VARCHAR2

Line 3523: , p_Init_Msg_List IN VARCHAR2 DEFAULT FND_API.G_FALSE

3519:
3520:
3521: Procedure Delete_CI (
3522: p_Commit IN VARCHAR2 DEFAULT FND_API.G_FALSE
3523: , p_Init_Msg_List IN VARCHAR2 DEFAULT FND_API.G_FALSE
3524: , p_Api_Version_Number IN NUMBER
3525: , p_Ci_Id IN NUMBER
3526: , x_Return_Status OUT NOCOPY VARCHAR2
3527: , x_Msg_Count OUT NOCOPY NUMBER

Line 3562: x_Return_Status := FND_API.g_Ret_Sts_Success;

3558: -- Initialize the Error Stack.
3559: --PA_DEBUG.Init_Err_Stack ('PA_CONTROL_API_PVT.Delete_CI');
3560:
3561: -- Initialize the Return Status to Success.
3562: x_Return_Status := FND_API.g_Ret_Sts_Success;
3563: x_Msg_Count := 0;
3564:
3565: -- Clear the Global PL/SQL Message table.
3566: IF (FND_API.To_Boolean (p_Init_Msg_List)) THEN

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

3562: x_Return_Status := FND_API.g_Ret_Sts_Success;
3563: x_Msg_Count := 0;
3564:
3565: -- Clear the Global PL/SQL Message table.
3566: IF (FND_API.To_Boolean (p_Init_Msg_List)) THEN
3567: FND_MSG_PUB.Initialize;
3568: END IF;
3569:
3570: -- If the Ci_Id that is passed in is NULL then report

Line 3583: RAISE FND_API.G_EXC_ERROR;

3579: pa_debug.g_err_stage := 'CI_ID is not passed';
3580: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
3581: end if;
3582: -- Raise the Invalid Argument exception.
3583: RAISE FND_API.G_EXC_ERROR;
3584: END IF;
3585:
3586: -- If the Ci_Id that is passed in does not exist then
3587: -- report Error.

Line 3604: RAISE FND_API.G_EXC_ERROR;

3600: pa_debug.g_err_stage := 'invalid ci_id passed';
3601: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
3602: end if;
3603: -- Raise the Invalid Argument exception.
3604: RAISE FND_API.G_EXC_ERROR;
3605: END IF;
3606: CLOSE Check_Valid_CI;
3607:
3608: -- Open Cursor Get_CI_Data and Fetch the data into our local variables.

Line 3620: RAISE FND_API.G_EXC_ERROR;

3616: if (l_debug_mode = 'Y') then
3617: pa_debug.g_err_stage := 'No data found in Get_CI_Data';
3618: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
3619: end if;
3620: RAISE FND_API.G_EXC_ERROR;
3621: END IF;
3622: CLOSE Get_CI_Data;
3623:
3624: -- Check whether Workflow is running on this Control Item or not.

Line 3683: RAISE FND_API.G_EXC_ERROR;

3679: end if;
3680: END IF;
3681:
3682: -- Raise the Invalid Argument exception.
3683: RAISE FND_API.G_EXC_ERROR;
3684: END IF;
3685: ELSE
3686: -- Close the Cursor.
3687: CLOSE Check_Workflow_On_CI;

Line 3700: RAISE FND_API.G_EXC_ERROR;

3696: pa_debug.g_err_stage := 'CI_ID has workflow Attached';
3697: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
3698: end if;
3699: -- Raise the Invalid Argument exception.
3700: RAISE FND_API.G_EXC_ERROR;
3701: END IF;
3702:
3703: --reset the error stack;
3704: if l_debug_mode = 'Y' then

Line 3709: WHEN FND_API.G_EXC_ERROR THEN

3705: pa_debug.reset_curr_function;
3706: end if;
3707: -- If any exception then catch it.
3708: EXCEPTION
3709: WHEN FND_API.G_EXC_ERROR THEN
3710: -- Set the Return Status as Error.
3711: x_Return_Status := FND_API.g_Ret_Sts_Error;
3712: -- Get the Message Count.
3713: l_Msg_Count := FND_MSG_PUB.Count_Msg;

Line 3711: x_Return_Status := FND_API.g_Ret_Sts_Error;

3707: -- If any exception then catch it.
3708: EXCEPTION
3709: WHEN FND_API.G_EXC_ERROR THEN
3710: -- Set the Return Status as Error.
3711: x_Return_Status := FND_API.g_Ret_Sts_Error;
3712: -- Get the Message Count.
3713: l_Msg_Count := FND_MSG_PUB.Count_Msg;
3714:
3715: IF (l_Msg_Count = 1) THEN

Line 3717: p_Encoded => FND_API.g_False

3713: l_Msg_Count := FND_MSG_PUB.Count_Msg;
3714:
3715: IF (l_Msg_Count = 1) THEN
3716: PA_INTERFACE_UTILS_PUB.Get_Messages (
3717: p_Encoded => FND_API.g_False
3718: , p_Msg_Index => 1
3719: , p_Msg_Count => l_Msg_Count
3720: , p_Msg_Data => l_Msg_Data
3721: , p_Data => l_Data

Line 3740: x_Return_Status := FND_API.g_Ret_Sts_Unexp_Error;

3736: RAISE;
3737:
3738: WHEN OTHERS THEN
3739: -- Set the Return Status as Error.
3740: x_Return_Status := FND_API.g_Ret_Sts_Unexp_Error;
3741:
3742: -- Add the message that is reported in SQL Error.
3743: FND_MSG_PUB.Add_Exc_Msg (
3744: p_Pkg_Name => 'PA_CONTROL_API_PVT',