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 655: x_return_status := FND_API.G_RET_STS_SUCCESS;

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

Line 730: x_return_status := FND_API.G_RET_STS_ERROR;

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

Line 740: x_return_status := FND_API.G_RET_STS_ERROR;

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

Line 758: x_return_status := FND_API.G_RET_STS_ERROR;

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

Line 774: x_return_status := FND_API.G_RET_STS_ERROR;

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

Line 795: x_return_status := FND_API.G_RET_STS_ERROR;

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

Line 834: x_return_status := FND_API.G_RET_STS_ERROR;

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

Line 852: x_return_status := FND_API.G_RET_STS_ERROR;

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

Line 871: x_return_status := FND_API.G_RET_STS_ERROR;

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

Line 897: x_return_status := FND_API.G_RET_STS_ERROR;

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

Line 914: x_return_status := FND_API.G_RET_STS_ERROR;

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

Line 940: x_return_status := FND_API.G_RET_STS_ERROR;

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

Line 956: x_return_status := FND_API.G_RET_STS_ERROR;

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

Line 979: x_return_status := FND_API.G_RET_STS_ERROR;

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

Line 1001: x_return_status := FND_API.G_RET_STS_ERROR;

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

Line 1022: x_return_status := FND_API.G_RET_STS_ERROR;

1018: if l_debug_mode = 'Y' then
1019: pa_debug.g_err_stage:= 'Po Line number is invalid';
1020: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
1021: end if;
1022: x_return_status := FND_API.G_RET_STS_ERROR;
1023: end if;
1024:
1025:
1026: if l_debug_mode = 'Y' then

Line 1054: x_return_status := FND_API.G_RET_STS_ERROR;

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

Line 1069: x_return_status := FND_API.G_RET_STS_ERROR;

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

Line 1083: x_return_status := FND_API.G_RET_STS_ERROR;

1079: if l_debug_mode = 'Y' then
1080: pa_debug.g_err_stage:= ' Currency Code is invalid';
1081: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
1082: end if;
1083: x_return_status := FND_API.G_RET_STS_ERROR;
1084: end if;
1085:
1086:
1087: if l_debug_mode = 'Y' then

Line 1101: x_return_status := FND_API.G_RET_STS_ERROR;

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

Line 1120: if x_return_status = FND_API.G_RET_STS_SUCCESS then

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

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

1175: ,x_return_status => x_return_status
1176: ,x_error_msg_code => l_error_msg_code );
1177:
1178: ELSIF l_error_msg_code is not null then
1179: raise FND_API.G_EXC_ERROR; --error while inserting the records raise
1180: end if;
1181: END LOOP;
1182: if x_return_status <> FND_API.G_RET_STS_SUCCESS or l_error_msg_code is not null then
1183: raise FND_API.G_EXC_ERROR;

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

1178: ELSIF l_error_msg_code is not null then
1179: raise FND_API.G_EXC_ERROR; --error while inserting the records raise
1180: end if;
1181: END LOOP;
1182: if x_return_status <> FND_API.G_RET_STS_SUCCESS or l_error_msg_code is not null then
1183: raise FND_API.G_EXC_ERROR;
1184: end if;
1185: --Reset the stack
1186: if l_debug_mode = 'Y' then

Line 1183: raise FND_API.G_EXC_ERROR;

1179: raise FND_API.G_EXC_ERROR; --error while inserting the records raise
1180: end if;
1181: END LOOP;
1182: if x_return_status <> FND_API.G_RET_STS_SUCCESS or l_error_msg_code is not null then
1183: raise FND_API.G_EXC_ERROR;
1184: end if;
1185: --Reset the stack
1186: if l_debug_mode = 'Y' then
1187: pa_debug.reset_curr_function;

Line 1192: when FND_API.G_EXC_ERROR then

1188: end if;
1189:
1190: Exception
1191:
1192: when FND_API.G_EXC_ERROR then
1193: x_return_status := FND_API.G_RET_STS_ERROR;
1194: l_msg_count := fnd_msg_pub.count_msg;
1195: x_rowid := null; --assign to the initial value
1196: x_ci_transaction_id := null; --assign to the initial value

Line 1193: x_return_status := FND_API.G_RET_STS_ERROR;

1189:
1190: Exception
1191:
1192: when FND_API.G_EXC_ERROR then
1193: x_return_status := FND_API.G_RET_STS_ERROR;
1194: l_msg_count := fnd_msg_pub.count_msg;
1195: x_rowid := null; --assign to the initial value
1196: x_ci_transaction_id := null; --assign to the initial value
1197: if l_msg_count = 1 then

Line 1199: (p_encoded => fnd_api.g_false,

1195: x_rowid := null; --assign to the initial value
1196: x_ci_transaction_id := null; --assign to the initial value
1197: if l_msg_count = 1 then
1198: pa_interface_utils_pub.get_messages
1199: (p_encoded => fnd_api.g_false,
1200: p_msg_index => 1,
1201: p_msg_count => l_msg_count ,
1202: p_msg_data => l_msg_data ,
1203: p_data => l_data,

Line 1218: x_return_status := fnd_api.g_ret_sts_unexp_error;

1214:
1215: raise;
1216:
1217: when others then
1218: x_return_status := fnd_api.g_ret_sts_unexp_error;
1219: x_rowid := null; --assign to the initial value
1220: x_ci_transaction_id := null; --assign to the initial value
1221: fnd_msg_pub.add_exc_msg ( p_pkg_name => 'PA_CONTROL_API_PVT',
1222: p_procedure_name => 'update_impacts',

Line 1305: x_return_status := fnd_api.g_ret_sts_success;

1301: l_any_err_occured_flg VARCHAR2(1);
1302:
1303: begin
1304: -- initialize the return status to success
1305: x_return_status := fnd_api.g_ret_sts_success;
1306: x_msg_count := 0;
1307:
1308: l_debug_mode := NVL(FND_PROFILE.VALUE_SPECIFIC('PA_DEBUG_MODE', fnd_global.user_id, fnd_global.resp_id, 275, null, null), 'N');
1309: l_module_name := 'check_create_ci_allowed' || g_module_name;

Line 1467: raise fnd_api.g_exc_error;

1463: end if;
1464: end if;
1465:
1466: if( l_any_err_occured_flg = 'Y' ) then
1467: raise fnd_api.g_exc_error;
1468: end if;
1469:
1470: if l_debug_mode = 'Y' then
1471: pa_debug.reset_curr_function;

Line 1475: when fnd_api.g_exc_error then

1471: pa_debug.reset_curr_function;
1472: end if;
1473:
1474: exception
1475: when fnd_api.g_exc_error then
1476: x_return_status := fnd_api.g_ret_sts_error;
1477: l_msg_count := fnd_msg_pub.count_msg;
1478: if l_msg_count = 1 then
1479: pa_interface_utils_pub.get_messages

Line 1476: x_return_status := fnd_api.g_ret_sts_error;

1472: end if;
1473:
1474: exception
1475: when fnd_api.g_exc_error then
1476: x_return_status := fnd_api.g_ret_sts_error;
1477: l_msg_count := fnd_msg_pub.count_msg;
1478: if l_msg_count = 1 then
1479: pa_interface_utils_pub.get_messages
1480: (p_encoded => fnd_api.g_false,

Line 1480: (p_encoded => fnd_api.g_false,

1476: x_return_status := fnd_api.g_ret_sts_error;
1477: l_msg_count := fnd_msg_pub.count_msg;
1478: if l_msg_count = 1 then
1479: pa_interface_utils_pub.get_messages
1480: (p_encoded => fnd_api.g_false,
1481: p_msg_index => 1,
1482: p_msg_count => l_msg_count ,
1483: p_msg_data => l_msg_data ,
1484: p_data => l_data,

Line 1506: x_return_status := fnd_api.g_ret_sts_unexp_error;

1502: end if;
1503: --raise the exception
1504: raise;
1505: when others then
1506: x_return_status := fnd_api.g_ret_sts_unexp_error;
1507: fnd_msg_pub.add_exc_msg(p_pkg_name => 'pa_control_api_pvt',
1508: p_procedure_name => 'check_create_ci_allowed',
1509: p_error_text => substrb(sqlerrm,1,240));
1510: fnd_msg_pub.count_and_get(p_count => x_msg_count,

Line 1803: x_return_status := fnd_api.g_ret_sts_success;

1799: l_source_person pa_control_items.source_person%type;
1800: l_ci_id pa_control_items.ci_id%type;
1801: begin
1802: -- initialize the return status to success
1803: x_return_status := fnd_api.g_ret_sts_success;
1804: x_msg_count := 0;
1805:
1806: l_debug_mode := NVL(FND_PROFILE.VALUE_SPECIFIC('PA_DEBUG_MODE', fnd_global.user_id, fnd_global.resp_id, 275, null, null), 'N');
1807: l_module_name := 'validate_param_and_create' || g_module_name;

Line 2236: if x_return_status <> FND_API.g_ret_sts_success then

2232: ,x_return_status => x_return_status
2233: ,x_msg_count => x_msg_count
2234: ,x_msg_data => x_msg_data);
2235:
2236: if x_return_status <> FND_API.g_ret_sts_success then
2237: if l_debug_mode = 'Y' then
2238: pa_debug.g_err_stage:= 'Failed in pa_system_numbers_pkg.get_next_number';
2239: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
2240: end if;

Line 2286: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

2282: l_any_err_occured_flg := 'Y';
2283: end if;
2284: exception
2285: when api_error then
2286: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2287: /*need to get input here as to how to handle the exception and populate the stack with appropriate messages.
2288: Set some other flag l_other_excp here and use tht flag to handle the unexpected case of exception handling*/
2289: l_any_err_occured_flg := 'Y';
2290: end; --for begin

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

2352: p_orig_system_reference=> p_orig_system_reference
2353: );
2354: end if;
2355:
2356: if (x_return_status <> fnd_api.g_ret_sts_success) then
2357: if l_debug_mode = 'Y' then
2358: pa_debug.g_err_stage:= 'Missing ci_number';
2359: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
2360: end if;

Line 2361: raise fnd_api.g_exc_unexpected_error;

2357: if l_debug_mode = 'Y' then
2358: pa_debug.g_err_stage:= 'Missing ci_number';
2359: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
2360: end if;
2361: raise fnd_api.g_exc_unexpected_error;
2362: end if;
2363:
2364: x_ci_id := l_ci_id;
2365: x_ci_number := l_ci_number_char;

Line 2368: raise fnd_api.g_exc_error;

2364: x_ci_id := l_ci_id;
2365: x_ci_number := l_ci_number_char;
2366:
2367: if( l_any_err_occured_flg = 'Y' ) then
2368: raise fnd_api.g_exc_error;
2369: end if;
2370: /* set the out variables ci_id and ci_number if there were no exceptions for any of the attributes*/
2371: x_ci_id := l_ci_id;
2372: x_ci_number := l_ci_number_char;

Line 2380: when fnd_api.g_exc_unexpected_error then

2376: pa_debug.reset_curr_function;
2377: end if;
2378:
2379: exception
2380: when fnd_api.g_exc_unexpected_error then
2381: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2382: FND_MSG_PUB.Count_And_Get(
2383: p_count => x_msg_count ,
2384: p_data => x_msg_data );

Line 2381: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

2377: end if;
2378:
2379: exception
2380: when fnd_api.g_exc_unexpected_error then
2381: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2382: FND_MSG_PUB.Count_And_Get(
2383: p_count => x_msg_count ,
2384: p_data => x_msg_data );
2385: /*Initialize the out variables back to null*/

Line 2394: when fnd_api.g_exc_error then

2390: pa_debug.reset_curr_function;
2391: end if;
2392: --raise the exception
2393: raise;
2394: when fnd_api.g_exc_error then
2395: x_return_status := fnd_api.g_ret_sts_error;
2396: l_msg_count := fnd_msg_pub.count_msg;
2397: if l_msg_count = 1 then
2398: pa_interface_utils_pub.get_messages

Line 2395: x_return_status := fnd_api.g_ret_sts_error;

2391: end if;
2392: --raise the exception
2393: raise;
2394: when fnd_api.g_exc_error then
2395: x_return_status := fnd_api.g_ret_sts_error;
2396: l_msg_count := fnd_msg_pub.count_msg;
2397: if l_msg_count = 1 then
2398: pa_interface_utils_pub.get_messages
2399: (p_encoded => fnd_api.g_false,

Line 2399: (p_encoded => fnd_api.g_false,

2395: x_return_status := fnd_api.g_ret_sts_error;
2396: l_msg_count := fnd_msg_pub.count_msg;
2397: if l_msg_count = 1 then
2398: pa_interface_utils_pub.get_messages
2399: (p_encoded => fnd_api.g_false,
2400: p_msg_index => 1,
2401: p_msg_count => l_msg_count ,
2402: p_msg_data => l_msg_data ,
2403: p_data => l_data,

Line 2422: x_return_status := fnd_api.g_ret_sts_unexp_error;

2418: end if;
2419: --raise the exception
2420: raise;
2421: when others then
2422: x_return_status := fnd_api.g_ret_sts_unexp_error;
2423: fnd_msg_pub.add_exc_msg(p_pkg_name => 'pa_control_api_pvt',
2424: p_procedure_name => 'validate_param_and_create',
2425: p_error_text => substrb(sqlerrm,1,240));
2426: fnd_msg_pub.count_and_get(p_count => x_msg_count,

Line 2468: x_return_status := fnd_api.g_ret_sts_success;

2464: l_check_valid_ci_id_rec check_valid_ci_id%rowtype;
2465: BEGIN
2466:
2467: -- initialize the return status to success
2468: x_return_status := fnd_api.g_ret_sts_success;
2469: x_msg_count := 0;
2470:
2471: l_debug_mode := NVL(FND_PROFILE.VALUE_SPECIFIC('PA_DEBUG_MODE', fnd_global.user_id, fnd_global.resp_id, 275, null, null), 'N');
2472: l_module_name := 'check_create_action_allow' || g_module_name;

Line 2540: raise fnd_api.g_exc_error;

2536: l_any_err_occured_flg := 'Y';
2537: end if;
2538:
2539: if( l_any_err_occured_flg is not null and l_any_err_occured_flg = 'Y' ) then
2540: raise fnd_api.g_exc_error;
2541: end if;
2542:
2543: --rest the stack;
2544: if l_debug_mode = 'Y' then

Line 2549: when fnd_api.g_exc_error then

2545: pa_debug.reset_curr_function;
2546: end if;
2547:
2548: Exception
2549: when fnd_api.g_exc_error then
2550: x_return_status := fnd_api.g_ret_sts_error;
2551: l_msg_count := fnd_msg_pub.count_msg;
2552: if l_msg_count = 1 then
2553: pa_interface_utils_pub.get_messages

Line 2550: x_return_status := fnd_api.g_ret_sts_error;

2546: end if;
2547:
2548: Exception
2549: when fnd_api.g_exc_error then
2550: x_return_status := fnd_api.g_ret_sts_error;
2551: l_msg_count := fnd_msg_pub.count_msg;
2552: if l_msg_count = 1 then
2553: pa_interface_utils_pub.get_messages
2554: (p_encoded => fnd_api.g_false,

Line 2554: (p_encoded => fnd_api.g_false,

2550: x_return_status := fnd_api.g_ret_sts_error;
2551: l_msg_count := fnd_msg_pub.count_msg;
2552: if l_msg_count = 1 then
2553: pa_interface_utils_pub.get_messages
2554: (p_encoded => fnd_api.g_false,
2555: p_msg_index => 1,
2556: p_msg_count => l_msg_count ,
2557: p_msg_data => l_msg_data ,
2558: p_data => l_data,

Line 2575: x_return_status := fnd_api.g_ret_sts_unexp_error;

2571: end if;
2572: --raise the exception
2573: raise;
2574: when others then
2575: x_return_status := fnd_api.g_ret_sts_unexp_error;
2576: fnd_msg_pub.add_exc_msg(p_pkg_name => 'pa_control_api_pvt',
2577: p_procedure_name => 'check_create_action_allow',
2578: p_error_text => substrb(sqlerrm,1,240));
2579: fnd_msg_pub.count_and_get(p_count => x_msg_count,

Line 2634: x_return_status := fnd_api.g_ret_sts_success;

2630: l_module_name VARCHAR2(200);
2631:
2632: BEGIN
2633: -- initialize the return status to success
2634: x_return_status := fnd_api.g_ret_sts_success;
2635: x_msg_count := 0;
2636:
2637: l_debug_mode := NVL(FND_PROFILE.VALUE_SPECIFIC('PA_DEBUG_MODE', fnd_global.user_id, fnd_global.resp_id, 275, null, null), 'N');
2638: l_module_name := 'validate_assignee_id' || g_module_name;

Line 2653: x_return_status := fnd_api.g_ret_sts_error;

2649: /*Validate the passed action assinee id exists in the system*/
2650: open chk_act_assgn_id(p_project_id, p_assignee_id);
2651: fetch chk_act_assgn_id into chk_act_assgn_id_rec;
2652: if(chk_act_assgn_id%notfound) then
2653: x_return_status := fnd_api.g_ret_sts_error;
2654:
2655: if(p_msg_token_num is not null) then
2656: /*if p_msg_token_num is passed then we are raising the parameterized msg which we need in create_action flow frm amg*/
2657: pa_utils.add_message(p_app_short_name => 'PA',

Line 2673: raise fnd_api.g_exc_error;

2669: pa_debug.g_err_stage:= 'Invalid action assingee code passed';
2670: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
2671: end if;
2672: close chk_act_assgn_id;
2673: raise fnd_api.g_exc_error;
2674: else--(chk_act_assgn_id%notfound) then
2675: x_assignee_id := chk_act_assgn_id_rec.party_id;
2676: close chk_act_assgn_id;
2677: end if;--if(chk_act_assgn_id%notfound) then

Line 2680: x_return_status := fnd_api.g_ret_sts_error;

2676: close chk_act_assgn_id;
2677: end if;--if(chk_act_assgn_id%notfound) then
2678: else--if(p_assignee_id is not null) then
2679: /*Action Assignee is Missing for this action record.*/
2680: x_return_status := fnd_api.g_ret_sts_error;
2681:
2682: if(p_msg_token_num is not null) then
2683: pa_utils.add_message(p_app_short_name => 'PA',
2684: p_msg_name => 'PA_CI_MISS_ASSGN_ID',

Line 2696: raise fnd_api.g_exc_error;

2692: if l_debug_mode = 'Y' then
2693: pa_debug.g_err_stage:= 'Action Assignee Id is missing';
2694: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
2695: end if;
2696: raise fnd_api.g_exc_error;
2697: end if;--if(p_assignee_id is not null) then
2698: --rest the stack;
2699: if l_debug_mode = 'Y' then
2700: pa_debug.reset_curr_function;

Line 2704: when fnd_api.g_exc_error then

2700: pa_debug.reset_curr_function;
2701: end if;
2702:
2703: Exception
2704: when fnd_api.g_exc_error then
2705: x_return_status := fnd_api.g_ret_sts_error;
2706: l_msg_count := fnd_msg_pub.count_msg;
2707: if l_msg_count = 1 then
2708: pa_interface_utils_pub.get_messages

Line 2705: x_return_status := fnd_api.g_ret_sts_error;

2701: end if;
2702:
2703: Exception
2704: when fnd_api.g_exc_error then
2705: x_return_status := fnd_api.g_ret_sts_error;
2706: l_msg_count := fnd_msg_pub.count_msg;
2707: if l_msg_count = 1 then
2708: pa_interface_utils_pub.get_messages
2709: (p_encoded => fnd_api.g_false,

Line 2709: (p_encoded => fnd_api.g_false,

2705: x_return_status := fnd_api.g_ret_sts_error;
2706: l_msg_count := fnd_msg_pub.count_msg;
2707: if l_msg_count = 1 then
2708: pa_interface_utils_pub.get_messages
2709: (p_encoded => fnd_api.g_false,
2710: p_msg_index => 1,
2711: p_msg_count => l_msg_count ,
2712: p_msg_data => l_msg_data ,
2713: p_data => l_data,

Line 2729: x_return_status := fnd_api.g_ret_sts_unexp_error;

2725: pa_debug.reset_curr_function;
2726: end if;
2727:
2728: when others then
2729: x_return_status := fnd_api.g_ret_sts_unexp_error;
2730: fnd_msg_pub.add_exc_msg(p_pkg_name => 'pa_control_api_pvt',
2731: p_procedure_name => 'validate_assignee_id',
2732: p_error_text => substrb(sqlerrm,1,240));
2733: fnd_msg_pub.count_and_get(p_count => x_msg_count,

Line 2805: x_return_status := fnd_api.g_ret_sts_success;

2801: chk_valid_src_ci_action_id_rec check_valid_src_ci_action_id%rowtype;
2802:
2803: BEGIN
2804: -- initialize the return status to success
2805: x_return_status := fnd_api.g_ret_sts_success;
2806: x_msg_count := 0;
2807:
2808: l_debug_mode := NVL(FND_PROFILE.VALUE_SPECIFIC('PA_DEBUG_MODE', fnd_global.user_id, fnd_global.resp_id, 275, null, null), 'N');
2809: l_module_name := 'validate_action_attributes' || g_module_name;

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

2869: ,x_msg_count => l_msg_count
2870: ,x_msg_data => l_msg_data
2871: );
2872:
2873: if(l_return_status <> fnd_api.g_ret_sts_success) then
2874: /* we are not raising the exception here*/
2875: l_any_err_occured_flg := 'Y';
2876: end if;
2877:

Line 3044: raise fnd_api.g_exc_error;

3040:
3041: end if;-- if(p_action_tbl.count > 0) then
3042:
3043: if( l_any_err_occured_flg is not null and l_any_err_occured_flg = 'Y' ) then
3044: raise fnd_api.g_exc_error;
3045: end if;
3046: --reset the err stack
3047: if l_debug_mode = 'Y' then
3048: pa_debug.reset_curr_function;

Line 3052: when fnd_api.g_exc_error then

3048: pa_debug.reset_curr_function;
3049: end if;
3050:
3051: Exception
3052: when fnd_api.g_exc_error then
3053: x_return_status := fnd_api.g_ret_sts_error;
3054: l_msg_count := fnd_msg_pub.count_msg;
3055: if l_msg_count = 1 then
3056: pa_interface_utils_pub.get_messages

Line 3053: x_return_status := fnd_api.g_ret_sts_error;

3049: end if;
3050:
3051: Exception
3052: when fnd_api.g_exc_error then
3053: x_return_status := fnd_api.g_ret_sts_error;
3054: l_msg_count := fnd_msg_pub.count_msg;
3055: if l_msg_count = 1 then
3056: pa_interface_utils_pub.get_messages
3057: (p_encoded => fnd_api.g_false,

Line 3057: (p_encoded => fnd_api.g_false,

3053: x_return_status := fnd_api.g_ret_sts_error;
3054: l_msg_count := fnd_msg_pub.count_msg;
3055: if l_msg_count = 1 then
3056: pa_interface_utils_pub.get_messages
3057: (p_encoded => fnd_api.g_false,
3058: p_msg_index => 1,
3059: p_msg_count => l_msg_count ,
3060: p_msg_data => l_msg_data ,
3061: p_data => l_data,

Line 3077: x_return_status := fnd_api.g_ret_sts_unexp_error;

3073: end if;
3074: --raise the exception
3075: raise;
3076: when others then
3077: x_return_status := fnd_api.g_ret_sts_unexp_error;
3078: fnd_msg_pub.add_exc_msg(p_pkg_name => 'pa_control_api_pvt',
3079: p_procedure_name => 'validate_action_attributes',
3080: p_error_text => substrb(sqlerrm,1,240));
3081: fnd_msg_pub.count_and_get(p_count => x_msg_count,

Line 3127: x_return_status := fnd_api.g_ret_sts_success;

3123: l_num_of_actions number;
3124: l_num_open_action pa_control_items.open_action_num%type;
3125: BEGIN
3126: -- initialize the return status to success
3127: x_return_status := fnd_api.g_ret_sts_success;
3128: x_msg_count := 0;
3129:
3130: l_debug_mode := NVL(FND_PROFILE.VALUE_SPECIFIC('PA_DEBUG_MODE', fnd_global.user_id, fnd_global.resp_id, 275, null, null), 'N');
3131: l_module_name := 'create_action' || g_module_name;

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

3230: x_return_status => x_return_status,
3231: x_msg_count => x_msg_count,
3232: x_msg_data => x_msg_data);*/
3233:
3234: if(x_return_status <> FND_API.G_RET_STS_SUCCESS) then
3235: l_any_err_occured_flg := 'Y';
3236: end if;
3237:
3238: if l_debug_mode = 'Y' then

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

3258: ,x_return_status => x_return_status
3259: ,x_msg_count => x_msg_count
3260: ,x_msg_data => x_msg_data );
3261:
3262: if(x_return_status <> FND_API.G_RET_STS_SUCCESS) then
3263: l_any_err_occured_flg := 'Y';
3264: end if;
3265:
3266: elsif( p_action_tbl(i).action_status = 'CI_ACTION_CLOSED') then

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

3274: ,x_item_key => l_item_key
3275: ,x_return_status => x_return_status
3276: ,x_msg_count => x_msg_count
3277: ,x_msg_data => x_msg_data );
3278: if(x_return_status <> FND_API.G_RET_STS_SUCCESS) then
3279: l_any_err_occured_flg := 'Y';
3280: end if;
3281: end if;-- if(p_action_tbl(i).action_status = 'CI_ACTION_OPEN') then
3282: end if;--(p_action_tbl(i).start_wf = 'Y')

Line 3300: raise fnd_api.g_exc_unexpected_error;

3296: x_msg_data => x_msg_data);
3297: end if;
3298:
3299: if( l_any_err_occured_flg is not null and l_any_err_occured_flg = 'Y' ) then
3300: raise fnd_api.g_exc_unexpected_error;
3301: end if;
3302:
3303: --reset the err stack
3304: if l_debug_mode = 'Y' then

Line 3309: When fnd_api.g_exc_unexpected_error then

3305: pa_debug.reset_curr_function;
3306: end if;
3307:
3308: Exception
3309: When fnd_api.g_exc_unexpected_error then
3310:
3311: x_return_status := fnd_api.g_ret_sts_unexp_error;
3312: --do a rollback;
3313: FND_MSG_PUB.Count_And_Get(

Line 3311: x_return_status := fnd_api.g_ret_sts_unexp_error;

3307:
3308: Exception
3309: When fnd_api.g_exc_unexpected_error then
3310:
3311: x_return_status := fnd_api.g_ret_sts_unexp_error;
3312: --do a rollback;
3313: FND_MSG_PUB.Count_And_Get(
3314: p_count => x_msg_count ,
3315: p_data => x_msg_data );

Line 3326: x_return_status := fnd_api.g_ret_sts_unexp_error;

3322: end if;
3323: --raise the exception;
3324: raise;
3325: when others then
3326: x_return_status := fnd_api.g_ret_sts_unexp_error;
3327: fnd_msg_pub.add_exc_msg(p_pkg_name => 'pa_control_api_pvt',
3328: p_procedure_name => 'create_action',
3329: p_error_text => substrb(sqlerrm,1,240));
3330: fnd_msg_pub.count_and_get(p_count => x_msg_count,

Line 3386: x_return_status := fnd_api.g_ret_sts_success;

3382:
3383:
3384: begin
3385: -- initialize the return status to success
3386: x_return_status := fnd_api.g_ret_sts_success;
3387: x_msg_count := 0;
3388:
3389: l_debug_mode := NVL(FND_PROFILE.VALUE_SPECIFIC('PA_DEBUG_MODE', fnd_global.user_id, fnd_global.resp_id, 275, null, null), 'N');
3390: l_module_name := 'validate_priv_and_action' || g_module_name;

Line 3415: raise fnd_api.g_exc_error;

3411: pa_debug.g_err_stage := 'all three action_id, ci_id, action_number cannot be missing';
3412: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
3413: end if;
3414: /*raise the exception*/
3415: raise fnd_api.g_exc_error;
3416: end if;-- if( (p_ci_id is null or p_ci_id is = G_PA_MISS_NUM) AND
3417:
3418: if (p_action_id is null or p_action_id = G_PA_MISS_NUM) then
3419:

Line 3436: raise fnd_api.g_exc_error;

3432: pa_debug.g_err_stage := 'there is no action for passed action_number and ci_id';
3433: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
3434: end if;
3435: close get_ci_action_id;
3436: raise fnd_api.g_exc_error;
3437: else--if(get_ci_action_id%notfound) then
3438: x_assignee_id := l_get_ci_action_id_rec.assigned_to;
3439: x_action_id := l_get_ci_action_id_rec.ci_action_id;
3440: x_project_id := l_get_ci_action_id_rec.project_id;

Line 3451: raise fnd_api.g_exc_error;

3447: if (l_debug_mode = 'Y') then
3448: pa_debug.g_err_stage := 'one or both ci_id or action_number is missing';
3449: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
3450: end if;
3451: raise fnd_api.g_exc_error;
3452: end if;--if( (p_ci_id is not null and p_ci_id <> G_PA_MISS_NUM) AND
3453:
3454: else --if (p_action_id is null or p_action_id is G_PA_MISS_NUM) then
3455: /*user has passed a value for action_id. Validate this value here.*/

Line 3467: raise fnd_api.g_exc_error;

3463: pa_debug.g_err_stage := 'invalid action_id passed';
3464: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
3465: end if;
3466: close validate_ci_action_id;
3467: raise fnd_api.g_exc_error;
3468: else--if(validate_ci_action_id%notfound) then
3469: x_assignee_id := l_validate_ci_action_id_rec.assigned_to;
3470: x_action_id := l_validate_ci_action_id_rec.ci_action_id;
3471: x_project_id := l_validate_ci_action_id_rec.project_id;

Line 3484: when fnd_api.g_exc_error then

3480: end if;
3481:
3482: --do the exception handling;
3483: exception
3484: when fnd_api.g_exc_error then
3485: x_return_status := fnd_api.g_ret_sts_error;
3486: l_msg_count := fnd_msg_pub.count_msg;
3487: if l_msg_count = 1 then
3488: pa_interface_utils_pub.get_messages

Line 3485: x_return_status := fnd_api.g_ret_sts_error;

3481:
3482: --do the exception handling;
3483: exception
3484: when fnd_api.g_exc_error then
3485: x_return_status := fnd_api.g_ret_sts_error;
3486: l_msg_count := fnd_msg_pub.count_msg;
3487: if l_msg_count = 1 then
3488: pa_interface_utils_pub.get_messages
3489: (p_encoded => fnd_api.g_false,

Line 3489: (p_encoded => fnd_api.g_false,

3485: x_return_status := fnd_api.g_ret_sts_error;
3486: l_msg_count := fnd_msg_pub.count_msg;
3487: if l_msg_count = 1 then
3488: pa_interface_utils_pub.get_messages
3489: (p_encoded => fnd_api.g_false,
3490: p_msg_index => 1,
3491: p_msg_count => l_msg_count ,
3492: p_msg_data => l_msg_data ,
3493: p_data => l_data,

Line 3514: x_return_status := fnd_api.g_ret_sts_unexp_error;

3510: end if;
3511: --raise the exception
3512: raise;
3513: when others then
3514: x_return_status := fnd_api.g_ret_sts_unexp_error;
3515: fnd_msg_pub.add_exc_msg(p_pkg_name => 'pa_control_api_pvt',
3516: p_procedure_name => 'validate_priv_and_action',
3517: p_error_text => substrb(sqlerrm,1,240));
3518: fnd_msg_pub.count_and_get(p_count => x_msg_count,

Line 3539: p_Commit IN VARCHAR2 DEFAULT FND_API.G_FALSE

3535:
3536:
3537:
3538: Procedure Delete_CI (
3539: p_Commit IN VARCHAR2 DEFAULT FND_API.G_FALSE
3540: , p_Init_Msg_List IN VARCHAR2 DEFAULT FND_API.G_FALSE
3541: , p_Api_Version_Number IN NUMBER
3542: , p_Ci_Id IN NUMBER
3543: , x_Return_Status OUT NOCOPY VARCHAR2

Line 3540: , p_Init_Msg_List IN VARCHAR2 DEFAULT FND_API.G_FALSE

3536:
3537:
3538: Procedure Delete_CI (
3539: p_Commit IN VARCHAR2 DEFAULT FND_API.G_FALSE
3540: , p_Init_Msg_List IN VARCHAR2 DEFAULT FND_API.G_FALSE
3541: , p_Api_Version_Number IN NUMBER
3542: , p_Ci_Id IN NUMBER
3543: , x_Return_Status OUT NOCOPY VARCHAR2
3544: , x_Msg_Count OUT NOCOPY NUMBER

Line 3579: x_Return_Status := FND_API.g_Ret_Sts_Success;

3575: -- Initialize the Error Stack.
3576: --PA_DEBUG.Init_Err_Stack ('PA_CONTROL_API_PVT.Delete_CI');
3577:
3578: -- Initialize the Return Status to Success.
3579: x_Return_Status := FND_API.g_Ret_Sts_Success;
3580: x_Msg_Count := 0;
3581:
3582: -- Clear the Global PL/SQL Message table.
3583: IF (FND_API.To_Boolean (p_Init_Msg_List)) THEN

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

3579: x_Return_Status := FND_API.g_Ret_Sts_Success;
3580: x_Msg_Count := 0;
3581:
3582: -- Clear the Global PL/SQL Message table.
3583: IF (FND_API.To_Boolean (p_Init_Msg_List)) THEN
3584: FND_MSG_PUB.Initialize;
3585: END IF;
3586:
3587: -- If the Ci_Id that is passed in is NULL then report

Line 3600: RAISE FND_API.G_EXC_ERROR;

3596: pa_debug.g_err_stage := 'CI_ID is not passed';
3597: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
3598: end if;
3599: -- Raise the Invalid Argument exception.
3600: RAISE FND_API.G_EXC_ERROR;
3601: END IF;
3602:
3603: -- If the Ci_Id that is passed in does not exist then
3604: -- report Error.

Line 3621: RAISE FND_API.G_EXC_ERROR;

3617: pa_debug.g_err_stage := 'invalid ci_id passed';
3618: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
3619: end if;
3620: -- Raise the Invalid Argument exception.
3621: RAISE FND_API.G_EXC_ERROR;
3622: END IF;
3623: CLOSE Check_Valid_CI;
3624:
3625: -- Open Cursor Get_CI_Data and Fetch the data into our local variables.

Line 3637: RAISE FND_API.G_EXC_ERROR;

3633: if (l_debug_mode = 'Y') then
3634: pa_debug.g_err_stage := 'No data found in Get_CI_Data';
3635: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
3636: end if;
3637: RAISE FND_API.G_EXC_ERROR;
3638: END IF;
3639: CLOSE Get_CI_Data;
3640:
3641: -- Check whether Workflow is running on this Control Item or not.

Line 3700: RAISE FND_API.G_EXC_ERROR;

3696: end if;
3697: END IF;
3698:
3699: -- Raise the Invalid Argument exception.
3700: RAISE FND_API.G_EXC_ERROR;
3701: END IF;
3702: ELSE
3703: -- Close the Cursor.
3704: CLOSE Check_Workflow_On_CI;

Line 3717: RAISE FND_API.G_EXC_ERROR;

3713: pa_debug.g_err_stage := 'CI_ID has workflow Attached';
3714: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
3715: end if;
3716: -- Raise the Invalid Argument exception.
3717: RAISE FND_API.G_EXC_ERROR;
3718: END IF;
3719:
3720: --reset the error stack;
3721: if l_debug_mode = 'Y' then

Line 3726: WHEN FND_API.G_EXC_ERROR THEN

3722: pa_debug.reset_curr_function;
3723: end if;
3724: -- If any exception then catch it.
3725: EXCEPTION
3726: WHEN FND_API.G_EXC_ERROR THEN
3727: -- Set the Return Status as Error.
3728: x_Return_Status := FND_API.g_Ret_Sts_Error;
3729: -- Get the Message Count.
3730: l_Msg_Count := FND_MSG_PUB.Count_Msg;

Line 3728: x_Return_Status := FND_API.g_Ret_Sts_Error;

3724: -- If any exception then catch it.
3725: EXCEPTION
3726: WHEN FND_API.G_EXC_ERROR THEN
3727: -- Set the Return Status as Error.
3728: x_Return_Status := FND_API.g_Ret_Sts_Error;
3729: -- Get the Message Count.
3730: l_Msg_Count := FND_MSG_PUB.Count_Msg;
3731:
3732: IF (l_Msg_Count = 1) THEN

Line 3734: p_Encoded => FND_API.g_False

3730: l_Msg_Count := FND_MSG_PUB.Count_Msg;
3731:
3732: IF (l_Msg_Count = 1) THEN
3733: PA_INTERFACE_UTILS_PUB.Get_Messages (
3734: p_Encoded => FND_API.g_False
3735: , p_Msg_Index => 1
3736: , p_Msg_Count => l_Msg_Count
3737: , p_Msg_Data => l_Msg_Data
3738: , p_Data => l_Data

Line 3757: x_Return_Status := FND_API.g_Ret_Sts_Unexp_Error;

3753: RAISE;
3754:
3755: WHEN OTHERS THEN
3756: -- Set the Return Status as Error.
3757: x_Return_Status := FND_API.g_Ret_Sts_Unexp_Error;
3758:
3759: -- Add the message that is reported in SQL Error.
3760: FND_MSG_PUB.Add_Exc_Msg (
3761: p_Pkg_Name => 'PA_CONTROL_API_PVT',