DBA Data[Home] [Help]

APPS.PA_CONTROL_API_PVT dependencies on PA_UTILS

Line 159: PA_UTILS.Add_Message( p_app_short_name => 'PA'

155: /*Get the control item details- this also checks for Ci_id is Valid or not*/
156: open Get_CI_Data(p_ci_id);
157: fetch Get_CI_Data into l_project_id,l_cr_status_code,l_ci_type_class_code,l_version_number;
158: if Get_CI_Data%notfound then
159: PA_UTILS.Add_Message( p_app_short_name => 'PA'
160: ,p_msg_name => 'PA_CI_INV_CI_ID');
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);

Line 179: PA_UTILS.add_Message( p_app_short_name => 'PA'

175: end if;
176:
177: /* If the control items is ISSUE, then it doesnot have the impact*/
178: if l_ci_type_class_code = 'ISSUE' then
179: PA_UTILS.add_Message( p_app_short_name => 'PA'
180: ,p_msg_name => 'PA_CI_INV_CI_ID');
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);

Line 194: PA_UTILS.add_Message( p_app_short_name => 'PA'

190: These possible impacts types are enabled during the creation of control type.*/
191: open c_impact_types;
192: fetch c_impact_types into l_ci_id;
193: if c_impact_types%notfound then
194: PA_UTILS.add_Message( p_app_short_name => 'PA'
195: ,p_msg_name => 'PA_CI_IMPACT_CODE_INVALID');
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);

Line 220: PA_UTILS.add_Message( p_app_short_name => 'PA'

216: if c_check_impact_exists%found then
217: l_ci_impact_id := c_check_impact_exists_rec.ci_impact_id;
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';

Line 234: PA_UTILS.add_Message( p_app_short_name => 'PA'

230: close c_check_impact_exists;
231: end if;
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';

Line 256: PA_UTILS.add_Message( p_app_short_name => 'PA'

252: end if;
253:
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';

Line 273: PA_UTILS.add_Message( p_app_short_name => 'PA'

269:
270:
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';

Line 294: PA_UTILS.ADD_MESSAGE(p_app_short_name =>'PA'

290: OPEN Check_Workflow_On_CI(p_ci_id);
291: FETCH Check_Workflow_On_CI INTO l_ci_id;
292: if Check_Workflow_On_CI%found then
293: --IF (l_enable_wf_flag = 'Y' AND l_wf_success_status_code IS NOT NULL AND l_wf_failure_status_code IS NOT NULL) THEN
294: PA_UTILS.ADD_MESSAGE(p_app_short_name =>'PA'
295: ,p_msg_name =>'PA_CI_APPROVAL_WORKFLOW');
296: if l_debug_mode = 'Y' then
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);

Line 315: PA_UTILS.add_Message( p_app_short_name => 'PA'

311: /* Check for the status control: check whether the action CONTROL_ITEM_ALLOW_UPDATE
312: is allowed on the current status of the issue. */
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';

Line 718: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',

714:
715: /*Check the ci_id and P_CHANGE_TYPE (should be either CREATE or UPDATE) are valid or not*/
716: if p_ci_id is null or p_ci_id = G_PA_MISS_NUM
717: or p_change_type is null or p_change_type = G_PA_MISS_CHAR then
718: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
719: p_msg_name => 'PA_CI_ID_CHANGE_TYPE_NULL',
720: p_token1 => 'NUMBER',
721: p_value1 => i);
722: if l_debug_mode = 'Y' then

Line 728: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',

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',
731: p_value1 => i);
732: if l_debug_mode = 'Y' then

Line 746: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',

742: or (p_po_header_id is NOT NULL and p_po_header_id <>G_PA_MISS_NUM)
743: or (p_po_line_num is not null and p_po_line_num <> G_PA_MISS_NUM)
744: or (p_po_line_id is not null and p_po_line_id <> G_PA_MISS_NUM) )
745: then
746: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
747: p_msg_name => 'PA_CHANGE_TYPE_INVALID',
748: p_token1 => 'NUMBER',
749: p_value1 => i);
750: if l_debug_mode = 'Y' then

Line 762: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',

758: and (p_po_header_id is NULL or p_po_header_id = G_PA_MISS_NUM)
759: and (p_po_line_num is null or p_po_line_num = G_PA_MISS_NUM)
760: and (p_po_line_id is null or p_po_line_id = G_PA_MISS_NUM) )
761: then
762: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
763: p_msg_name => 'PA_CHANGE_TYPE_INVALID',
764: p_token1 => 'NUMBER',
765: p_value1 => i);
766: if l_debug_mode = 'Y' then

Line 783: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',

779: if p_ci_id is not null and p_ci_id <> G_PA_MISS_NUM then
780: open c_get_project_id(p_ci_id);
781: fetch c_get_project_id into l_project_id;
782: if c_get_project_id%notfound then
783: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
784: p_msg_name => 'PA_CI_INVALID_CI_ID',
785: p_token1 => 'NUMBER',
786: p_value1 => i);
787: if l_debug_mode = 'Y' then

Line 822: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',

818:
819: open c_cur_vendor_id for l_check_vendor_query;
820: fetch c_cur_vendor_id into l_vendor_id , l_supplier_name;
821: if c_cur_vendor_id%notfound then
822: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
823: p_msg_name => 'PA_VENDOR_ID_INVALID',
824: p_token1 => 'NUMBER',
825: p_value1 => i);
826: if l_debug_mode = 'Y' then

Line 840: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',

836: elsif (p_vendor_id is null or p_vendor_id = G_PA_MISS_NUM )-- end for if p_vendor_id
837: and p_change_type = 'CREATE' then
838: /*for create change type vendor id should not be null
839: But where as in UPDATE we can derive the vendor id from the given header id or po_line id details */
840: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
841: p_msg_name => 'PA_VENDOR_ID_NULL',
842: p_token1 => 'NUMBER',
843: p_value1 => i);
844: if l_debug_mode = 'Y' then

Line 859: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',

855: if p_po_header_id is not null and p_po_header_id <> G_PA_MISS_NUM then
856: open c_check_po_header_id(p_po_header_id,l_project_id,l_org_id);
857: fetch c_check_po_header_id into c_check_po_header_id_rec;
858: if c_check_po_header_id%notfound then
859: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
860: p_msg_name => 'PA_PO_HEADER_ID_INVALID',
861: p_token1 => 'NUMBER',
862: p_value1 => i);
863: if l_debug_mode = 'Y' then

Line 885: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',

881: end if;
882: close c_check_po_header_id;
883: if p_vendor_id is not null and p_vendor_id <> G_PA_MISS_NUM then
884: if l_vendor_id <> p_vendor_id then
885: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
886: p_msg_name => 'PA_VENDOR_ID_INVALID',
887: p_token1 => 'NUMBER',
888: p_value1 => i);
889: if l_debug_mode = 'Y' then

Line 902: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',

898: elsif p_po_number is not null and p_po_number <> G_PA_MISS_CHAR then
899: open c_check_po_number(p_po_number,l_project_id,l_org_id);
900: fetch c_check_po_number into c_check_po_number_rec;
901: if c_check_po_number%notfound then
902: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
903: p_msg_name => 'PA_PO_NUMBER_INVALID',
904: p_token1 => 'NUMBER',
905: p_value1 => i);
906: if l_debug_mode = 'Y' then

Line 928: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',

924: end if;
925: close c_check_po_number;
926: if p_vendor_id is not null then
927: if l_vendor_id <> p_vendor_id then
928: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
929: p_msg_name => 'PA_VENDOR_ID_INVALID',
930: p_token1 => 'NUMBER',
931: p_value1 => i);
932: if l_debug_mode = 'Y' then

Line 944: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',

940: end if;
941: else
942: if (p_po_line_num is not null and p_po_line_num <> G_PA_MISS_NUM)
943: or (p_po_line_id is not null and p_po_line_id <> G_PA_MISS_NUM) then
944: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
945: p_msg_name => 'PA_HEAD_ID_PO_NUM_IS_NULL',
946: p_token1 => 'NUMBER',
947: p_value1 => i);
948: if l_debug_mode = 'Y' then

Line 967: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',

963: and p_po_line_id <> G_PA_MISS_NUM then
964: open c_check_po_line_id(l_po_number,p_po_line_id,l_project_id);
965: fetch c_check_po_line_id into c_check_po_line_id_rec;
966: if c_check_po_line_id%notfound then
967: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
968: p_msg_name => 'PA_PO_LINE_ID_INVALID',
969: p_token1 => 'NUMBER',
970: p_value1 => i);
971: if l_debug_mode = 'Y' then

Line 989: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',

985: elsif l_po_number is not null and p_po_line_num is not null and p_po_line_num<>G_PA_MISS_NUM then
986: open c_check_Doc_number(l_po_number,p_po_line_num,l_project_id);
987: fetch c_check_Doc_number into c_check_Doc_number_rec;
988: if c_check_Doc_number%notfound then
989: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
990: p_msg_name => 'PA_PO_LINE_NUMBER_INVALID',
991: p_token1 => 'NUMBER',
992: p_value1 => i);
993: if l_debug_mode = 'Y' then

Line 1010: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',

1006: end if;
1007: elsif l_po_number is not null and
1008: ((p_po_line_num is null or p_po_line_num = G_PA_MISS_NUM)
1009: or (p_po_line_id is null or p_po_line_id = G_PA_MISS_NUM)) then
1010: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
1011: p_msg_name => 'PA_PO_LINE_ID_LINE_NUM_NULL',
1012: p_token1 => 'NUMBER',
1013: p_value1 => i);
1014: if l_debug_mode = 'Y' then

Line 1042: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',

1038: open c_check_currency_code(p_currency);
1039: fetch c_check_currency_code into l_currency_code, l_currency_name;
1040: if c_check_currency_code%found then
1041: if l_currency_code1 is not null and l_currency_code1 <> l_currency_code then
1042: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
1043: p_msg_name => 'PA_CURRENCY_CODE_INVALID',
1044: p_token1 => 'NUMBER',
1045: p_value1 => i);
1046: if l_debug_mode = 'Y' then

Line 1057: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',

1053: else
1054: close c_check_currency_code;
1055: end if;
1056: else
1057: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
1058: p_msg_name => 'PA_CURRENCY_CODE_INVALID',
1059: p_token1 => 'NUMBER',
1060: p_value1 => i);
1061: if l_debug_mode = 'Y' then

Line 1071: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',

1067: end if;
1068: elsif (p_currency is null or p_currency = G_PA_MISS_CHAR)
1069: and l_currency_code1 is null
1070: and l_currency_code is null then
1071: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
1072: p_msg_name => 'PA_CURRENCY_CODE_NULL',
1073: p_token1 => 'NUMBER',
1074: p_value1 => i);
1075: if l_debug_mode = 'Y' then

Line 1089: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',

1085: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
1086: end if;
1087:
1088: if (p_change_amount is null or p_change_amount = G_PA_MISS_NUM ) and l_po_line_Amount is null then
1089: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
1090: p_msg_name => 'PA_SUPP_AMOUNT_NULL',
1091: p_token1 => 'NUMBER',
1092: p_value1 => i);
1093: if l_debug_mode = 'Y' then

Line 1310: PA_UTILS.ADD_MESSAGE

1306: --setting the err occured flag to N initially.
1307: l_any_err_occured_flg := 'N';
1308:
1309: if (p_ci_type_id is null) then
1310: PA_UTILS.ADD_MESSAGE
1311: (p_app_short_name => 'PA',
1312: p_msg_name => 'PA_CI_TYPE_ID_MISSING');
1313: if l_debug_mode = 'Y' then
1314: pa_debug.g_err_stage:= 'ci_type_id is null';

Line 1321: PA_UTILS.ADD_MESSAGE

1317: l_any_err_occured_flg := 'Y';
1318: end if;
1319:
1320: if(p_project_id is null and p_project_number is null and p_project_name is null) then
1321: PA_UTILS.ADD_MESSAGE
1322: (p_app_short_name => 'PA',
1323: p_msg_name => 'PA_CI_PROJECT_MISSING');
1324: if l_debug_mode = 'Y' then
1325: pa_debug.g_err_stage:= 'project id, project number, project name, all three cannot be null';

Line 1336: PA_UTILS.ADD_MESSAGE

1332: /* the passed p_ci_type_id gets validated and we derive the ci_type_attributes for the ci_type_id passed*/
1333: open get_ci_type_attrs(p_ci_type_id);
1334: fetch get_ci_type_attrs into l_ci_type_attrs_rec;
1335: if get_ci_type_attrs%NOTFOUND then
1336: PA_UTILS.ADD_MESSAGE
1337: (p_app_short_name => 'PA',
1338: p_msg_name => 'PA_CI_INVALID_TYPE_ID'); --existing msg.
1339: if l_debug_mode = 'Y' then
1340: pa_debug.g_err_stage:= 'Invalid ci_type_id passed';

Line 1354: PA_UTILS.ADD_MESSAGE

1350: /*now validate the class type code. validate that create_issue api can be used to create issues only and not
1351: change request or change order. And similarly create_change_request, create_change_order are used for their
1352: respective types*/
1353: if(p_ci_type_class_code <> l_ci_type_attrs_rec.ci_type_class_code) then
1354: PA_UTILS.ADD_MESSAGE
1355: (p_app_short_name => 'PA',
1356: p_msg_name => 'PA_CI_INV_API_USE'); --existing msg.
1357: if l_debug_mode = 'Y' then
1358: pa_debug.g_err_stage:= 'wrong usage of the api for the control item type';

Line 1373: PA_UTILS.ADD_MESSAGE

1369: /*a value has been passed for project id, we will validate this value*/
1370: open validate_prj_id(p_project_id);
1371: fetch validate_prj_id into l_project_id;
1372: if validate_prj_id%NOTFOUND then
1373: PA_UTILS.ADD_MESSAGE
1374: (p_app_short_name => 'PA',
1375: p_msg_name => 'PA_CI_NO_PROJECT_ID'); --exisitng message
1376: if l_debug_mode = 'Y' then
1377: pa_debug.g_err_stage:= 'Invalid project id passed';

Line 1391: PA_UTILS.ADD_MESSAGE

1387: /*Derive the project id from project number*/
1388: open get_project_id_frm_num(p_project_number);
1389: fetch get_project_id_frm_num into l_project_id;
1390: if get_project_id_frm_num%NOTFOUND then
1391: PA_UTILS.ADD_MESSAGE
1392: (p_app_short_name => 'PA',
1393: p_msg_name => 'PA_CI_INV_PROJ_NUM');
1394: if l_debug_mode = 'Y' then
1395: pa_debug.g_err_stage:= 'Invalid project number passed';

Line 1409: PA_UTILS.ADD_MESSAGE

1405: /*Derive the project id from project name*/
1406: open get_project_id_frm_name(p_project_name);
1407: fetch get_project_id_frm_name into l_project_id;
1408: if get_project_id_frm_name%NOTFOUND then
1409: PA_UTILS.ADD_MESSAGE
1410: (p_app_short_name => 'PA',
1411: p_msg_name => 'PA_CI_INV_PROJ_NAME');
1412: if l_debug_mode = 'Y' then
1413: pa_debug.g_err_stage:= 'Invalid project name passed';

Line 1435: PA_UTILS.ADD_MESSAGE

1431: if(p_project_id is not null and p_ci_type_id is not null and l_any_err_occured_flg <> 'Y') then
1432: open check_create_ci_priv(p_ci_type_id, p_project_id);
1433: fetch check_create_ci_priv into l_check_create_ci;
1434: if check_create_ci_priv%NOTFOUND then
1435: PA_UTILS.ADD_MESSAGE
1436: (p_app_short_name => 'PA',
1437: p_msg_name => 'PA_CI_NO_SECURITY');
1438: if l_debug_mode = 'Y' then
1439: pa_debug.g_err_stage:= 'Either the project type or role selected by you doesnt have privilge to create the control item';

Line 1809: PA_UTILS.ADD_MESSAGE

1805: l_party_id := pa_control_items_utils.getpartyid(l_user_id);
1806: l_resp_id := fnd_global.resp_id;
1807:
1808: if(p_summary is null) then
1809: PA_UTILS.ADD_MESSAGE
1810: (p_app_short_name => 'PA',
1811: p_msg_name => 'PA_CI_NO_SUMMARY'); --existing msg
1812: if l_debug_mode = 'Y' then
1813: pa_debug.g_err_stage:= 'Summary passed is null';

Line 1840: PA_UTILS.Add_message ( p_app_short_name => 'PA'

1836: unique index on pa_project_statuses table We derive p_status_code from */
1837: open get_strtng_sts_frm_sts_nme(p_ci_type_id , p_status);
1838: fetch get_strtng_sts_frm_sts_nme into get_strtng_sts_frm_sts_nme_rec;
1839: if (get_strtng_sts_frm_sts_nme%notfound) then
1840: PA_UTILS.Add_message ( p_app_short_name => 'PA'
1841: ,p_msg_name => 'PA_CI_INV_STATUS');
1842: if l_debug_mode = 'Y' then
1843: pa_debug.g_err_stage:= 'Invalid status passed';
1844: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);

Line 1861: PA_UTILS.Add_message ( p_app_short_name => 'PA'

1857:
1858: open get_strtng_sts_frm_sts_cde(p_ci_type_id, p_status_code);
1859: fetch get_strtng_sts_frm_sts_cde into get_strtng_sts_frm_sts_cde_rec;
1860: if (get_strtng_sts_frm_sts_cde%notfound) then
1861: PA_UTILS.Add_message ( p_app_short_name => 'PA'
1862: ,p_msg_name => 'PA_CI_INVALID_STATUS_CODE'); --this msg is already there
1863: if l_debug_mode = 'Y' then
1864: pa_debug.g_err_stage:= 'Invalid status code passed';
1865: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);

Line 1882: pa_utils.add_message( p_app_short_name => 'PA'

1878: /*if owner id is not passed default it with the project manager id*/
1879: open get_prj_mgr_id(p_project_id);
1880: fetch get_prj_mgr_id into get_prj_mgr_id_rec;
1881: if (get_prj_mgr_id%notfound) then
1882: pa_utils.add_message( p_app_short_name => 'PA'
1883: ,p_msg_name => 'PA_CI_NO_MGR_ID'); --Need to check what this msg context shd be.
1884: if l_debug_mode = 'Y' then
1885: pa_debug.g_err_stage:= 'Could not find project manager';
1886: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);

Line 1901: pa_utils.add_message( p_app_short_name => 'PA'

1897:
1898: open validate_owner_id(p_project_id, p_owner_id);
1899: fetch validate_owner_id into validate_owner_id_rec;
1900: if(validate_owner_id%notfound) then
1901: pa_utils.add_message( p_app_short_name => 'PA'
1902: ,p_msg_name => 'PA_CI_NO_OWNER'); --existing msg
1903: if l_debug_mode = 'Y' then
1904: pa_debug.g_err_stage:= 'Invalid owner id passed';
1905: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);

Line 1921: pa_utils.add_message( p_app_short_name => 'PA'

1917: if(p_progress_status_code is not null) then
1918: open validate_progress_sts_code(p_progress_status_code);
1919: fetch validate_progress_sts_code into l_progress_status_code;
1920: if (validate_progress_sts_code%notfound) then
1921: pa_utils.add_message( p_app_short_name => 'PA'
1922: ,p_msg_name => 'PA_CI_INV_PRG_CODE');
1923: if l_debug_mode = 'Y' then
1924: pa_debug.g_err_stage:= 'Invalid progress status code passed';
1925: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);

Line 1942: pa_utils.add_message( p_app_short_name => 'PA'

1938: l_reason_code := p_reason_code;
1939: if (p_classification_code is null or p_reason_code is null )
1940: then
1941: if (p_classification_code is null) then
1942: pa_utils.add_message( p_app_short_name => 'PA'
1943: ,p_msg_name => 'PA_CI_MIS_CLASSIFICATION_COD'); --msg is already there
1944: if l_debug_mode = 'Y' then
1945: pa_debug.g_err_stage:= 'classification_code is null';
1946: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);

Line 1951: pa_utils.add_message( p_app_short_name => 'PA'

1947: end if;
1948: l_any_err_occured_flg := 'Y';
1949: end if;
1950: if (p_reason_code is null) then
1951: pa_utils.add_message( p_app_short_name => 'PA'
1952: ,p_msg_name => 'PA_CI_MISS_REASON_CODE'); --msg is already there
1953: if l_debug_mode = 'Y' then
1954: pa_debug.g_err_stage:= 'reason_code is null';
1955: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);

Line 1966: pa_utils.add_message( p_app_short_name => 'PA'

1962: if(p_classification_code is not null) then
1963: open validate_clsfcation_code(p_classification_code);
1964: fetch validate_clsfcation_code into l_classification_code;
1965: if (validate_clsfcation_code%notfound) then
1966: pa_utils.add_message( p_app_short_name => 'PA'
1967: ,p_msg_name => 'PA_CI_CLASSIFICATION_INV');
1968: if l_debug_mode = 'Y' then
1969: pa_debug.g_err_stage:= 'Invalid classification code passed';
1970: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);

Line 1984: pa_utils.add_message( p_app_short_name => 'PA'

1980: if(p_reason_code is not null) then
1981: open validate_reason_code(p_reason_code);
1982: fetch validate_reason_code into l_reason_code;
1983: if (validate_reason_code%notfound) then
1984: pa_utils.add_message( p_app_short_name => 'PA'
1985: ,p_msg_name => 'PA_CI_INV_REA_CODE');
1986: if l_debug_mode = 'Y' then
1987: pa_debug.g_err_stage:= 'Invalid reason code passed';
1988: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);

Line 1999: pa_utils.add_message( p_app_short_name => 'PA'

1995: end if;
1996:
1997: /*Currently only PA_TASKS type of objects are supported*/
1998: if(p_object_type is not null and p_object_type <> 'PA_TASKS') then
1999: pa_utils.add_message( p_app_short_name => 'PA'
2000: ,p_msg_name => 'PA_CI_INV_OBJ_TYPE');
2001: if l_debug_mode = 'Y' then
2002: pa_debug.g_err_stage:= 'Invalid object type passed';
2003: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);

Line 2013: pa_utils.add_message( p_app_short_name => 'PA'

2009: if (p_object_id is not null) then
2010: open validate_obj_id(p_project_id, p_object_id);
2011: fetch validate_obj_id into l_object_id;
2012: if (validate_obj_id%notfound) then
2013: pa_utils.add_message( p_app_short_name => 'PA'
2014: ,p_msg_name => 'PA_CI_INV_OBJ_ID');
2015: if l_debug_mode = 'Y' then
2016: pa_debug.g_err_stage:= 'Invalid Object Id passed';
2017: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);

Line 2030: pa_utils.add_message( p_app_short_name => 'PA'

2026: /*validations for p_closed_date parameter. The date must be supplied for a item in closed status, for statuses other than closed
2027: we should ignore this value*/
2028: if( l_system_status_code = 'CI_CLOSED') then
2029: if(p_date_closed is null) then
2030: pa_utils.add_message( p_app_short_name => 'PA'
2031: ,p_msg_name => 'PA_CI_CLS_DATE_MISS');
2032: if l_debug_mode = 'Y' then
2033: pa_debug.g_err_stage:= 'For a control item in closed status, closed_date is missing';
2034: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);

Line 2051: pa_utils.add_message( p_app_short_name => 'PA'

2047:
2048: if( l_system_status_code = 'CI_CLOSED') then
2049:
2050: if(p_closed_by_id is null) then
2051: pa_utils.add_message( p_app_short_name => 'PA'
2052: ,p_msg_name => 'PA_CI_CLS_BYID_MISS');
2053: if l_debug_mode = 'Y' then
2054: pa_debug.g_err_stage:= 'For a control item in closed status, closed_by_id is missing';
2055: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);

Line 2063: pa_utils.add_message( p_app_short_name => 'PA'

2059: /*validate the p_closed_by_id. Also the persons with the project authority can close the item*/
2060: open validate_cls_by_id(p_project_id , p_closed_by_id);
2061: fetch validate_cls_by_id into l_valid_clsby_id;
2062: if(validate_cls_by_id%notfound) then
2063: pa_utils.add_message( p_app_short_name => 'PA'
2064: ,p_msg_name => 'PA_CI_INV_CLS_BYID');
2065: if l_debug_mode = 'Y' then
2066: pa_debug.g_err_stage:= 'inavlid closed_by_id is passed or user doesnt have project authority';
2067: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);

Line 2094: pa_utils.add_message( p_app_short_name => 'PA'

2090: if(p_resolution_code is not null) then
2091: open validate_resolution_code(p_resolution_code);
2092: fetch validate_resolution_code into l_resolution_code;
2093: if (validate_resolution_code%notfound) then
2094: pa_utils.add_message( p_app_short_name => 'PA'
2095: ,p_msg_name => 'PA_CI_INV_RES_CODE');
2096: if l_debug_mode = 'Y' then
2097: pa_debug.g_err_stage:= 'Invalid resolution code passed';
2098: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);

Line 2113: pa_utils.add_message( p_app_short_name => 'PA'

2109: if(p_priority_code is not null) then
2110: open validate_priority_code(p_priority_code);
2111: fetch validate_priority_code into l_priority_code;
2112: if (validate_priority_code%notfound) then
2113: pa_utils.add_message( p_app_short_name => 'PA'
2114: ,p_msg_name => 'PA_CI_INV_PRIO_CODE');
2115: if l_debug_mode = 'Y' then
2116: pa_debug.g_err_stage:= 'Invalid priority code passed';
2117: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);

Line 2130: pa_utils.add_message( p_app_short_name => 'PA'

2126: if(p_effort_level_code is not null) then
2127: open validate_eff_lvl_code(p_effort_level_code);
2128: fetch validate_eff_lvl_code into l_effort_level_code;
2129: if (validate_eff_lvl_code%notfound) then
2130: pa_utils.add_message( p_app_short_name => 'PA'
2131: ,p_msg_name => 'PA_CI_INV_EFFR_CODE');
2132: if l_debug_mode = 'Y' then
2133: pa_debug.g_err_stage:= 'Invalid effort code passed';
2134: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);

Line 2152: pa_utils.add_message( p_app_short_name => 'PA'

2148: else
2149: open validate_prj_currency(p_price_currency_code);
2150: fetch validate_prj_currency into l_price_currency_code;
2151: if (validate_prj_currency%notfound) then
2152: pa_utils.add_message( p_app_short_name => 'PA'
2153: ,p_msg_name => 'PA_CI_INV_CURR_CODE');
2154: if l_debug_mode = 'Y' then
2155: pa_debug.g_err_stage:= 'Invalid currency code passed';
2156: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);

Line 2246: PA_UTILS.Add_Message( p_app_short_name => 'PA'

2242: else --p_auto_number_flag = 'Y' and l_system_status_code <> 'CI_DRAFT'
2243: /*For manual numbering check if passed ci_number already exist.*/
2244: l_ci_number_char := p_ci_number;
2245: if pa_control_items_pvt.ci_number_exists(p_project_id, l_ci_number_char ,p_ci_type_id) = TRUE then
2246: PA_UTILS.Add_Message( p_app_short_name => 'PA'
2247: ,p_msg_name => 'PA_CI_DUPLICATE_CI_NUMBER');--msg already there
2248: if l_debug_mode = 'Y' then
2249: pa_debug.g_err_stage:= 'Duplicate ci_number passed.';
2250: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);

Line 2259: pa_utils.add_message( p_app_short_name => 'PA'

2255:
2256: /* if auto numbering is enabled then l_ci_number_char wont be null here. For manual numbering checking if
2257: passed ci_number was null.*/
2258: if l_ci_number_char is null and l_system_status_code <> 'CI_DRAFT' then
2259: pa_utils.add_message( p_app_short_name => 'PA'
2260: ,p_msg_name => 'PA_CI_NO_CI_NUMBER'); --msg already there
2261: if l_debug_mode = 'Y' then
2262: pa_debug.g_err_stage:= 'Missing ci_number';
2263: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);

Line 2470: pa_utils.add_message

2466: l_any_err_occured_flg := 'N';
2467:
2468: /* check if p_ci_id is not passed/null*/
2469: if(p_ci_id is null) then
2470: pa_utils.add_message
2471: (p_app_short_name => 'PA',
2472: p_msg_name => 'PA_CI_MISS_CI_ID');
2473: if l_debug_mode = 'Y' then
2474: pa_debug.g_err_stage:= 'ci_id is missing';

Line 2486: pa_utils.add_message

2482: open check_valid_ci_id(p_ci_id);
2483: fetch check_valid_ci_id into l_check_valid_ci_id_rec; --l_ci_id;
2484: if(check_valid_ci_id%notfound) then
2485: /*invalid ci_id*/
2486: pa_utils.add_message
2487: (p_app_short_name => 'PA',
2488: p_msg_name => 'PA_CI_INV_CI_ID');
2489: if l_debug_mode = 'Y' then
2490: pa_debug.g_err_stage:= 'ci_id is invalid';

Line 2512: pa_utils.add_message

2508: end if;
2509:
2510: if(l_create_action_flg is not null and l_create_action_flg = 'F') then
2511: /*user doesnt have privilige to create the action*/
2512: pa_utils.add_message
2513: (p_app_short_name => 'PA',
2514: p_msg_name => 'PA_CI_ACT_FLS_SEC');
2515: if l_debug_mode = 'Y' then
2516: pa_debug.g_err_stage:= 'user doesnt have security to create the action';

Line 2640: pa_utils.add_message(p_app_short_name => 'PA',

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',
2641: p_msg_name => 'PA_CI_INV_ACT_ASSGN_CODE', -- We have this similar msg
2642: p_token1 => 'NUMBER', --PA_CI_ACTION_INVALID_ASSIGNEE
2643: p_value1 => p_msg_token_num); --but it doesnt have tokens
2644: else

Line 2647: pa_utils.add_message(p_app_short_name => 'PA',

2643: p_value1 => p_msg_token_num); --but it doesnt have tokens
2644: else
2645: /*if p_msg_token_num is not passed then we are raising the msg without any tokens
2646: which we need in take action flow in amg. Note the two msg names are different.*/
2647: pa_utils.add_message(p_app_short_name => 'PA',
2648: p_msg_name => 'PA_CI_INV_ACT_ASSGN_CODE_NT');
2649: end if;--if(p_msg_token_num is not null) then
2650:
2651: if (l_debug_mode = 'Y') then

Line 2666: pa_utils.add_message(p_app_short_name => 'PA',

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',
2668: p_token1 => 'NUMBER',
2669: p_value1 => p_msg_token_num);
2670: else--if(p_msg_token_num is not null)

Line 2671: pa_utils.add_message(p_app_short_name => 'PA',

2667: p_msg_name => 'PA_CI_MISS_ASSGN_ID',
2668: p_token1 => 'NUMBER',
2669: p_value1 => p_msg_token_num);
2670: else--if(p_msg_token_num is not null)
2671: pa_utils.add_message(p_app_short_name => 'PA',
2672: p_msg_name => 'PA_CI_MISS_ASSGN_ID_NT');
2673: end if;--if(p_msg_token_num is not null)
2674:
2675: if l_debug_mode = 'Y' then

Line 2826: pa_utils.add_message(p_app_short_name => 'PA',

2822: if(l_action_tbl(i).action_type_code is not null) then
2823: open chk_act_typ_code(l_action_tbl(i).action_type_code);
2824: fetch chk_act_typ_code into chk_act_typ_code_rec;
2825: if(chk_act_typ_code%notfound) then
2826: pa_utils.add_message(p_app_short_name => 'PA',
2827: p_msg_name => 'PA_CI_INV_ACT_CODE',
2828: p_token1 => 'NUMBER',
2829: p_value1 => i);
2830: if l_debug_mode = 'Y' then

Line 2881: pa_utils.add_message(p_app_short_name => 'PA',

2877: if(l_action_tbl(i).action_status is not null) then
2878: open chk_action_status_code(l_action_tbl(i).action_status);
2879: fetch chk_action_status_code into l_action_status_code;
2880: if(chk_action_status_code%notfound) then
2881: pa_utils.add_message(p_app_short_name => 'PA',
2882: p_msg_name => 'PA_CI_INV_ACT_STS_CODE',
2883: p_token1 => 'NUMBER',
2884: p_value1 => i);
2885: if (l_debug_mode = 'Y') then

Line 2913: pa_utils.add_message(p_app_short_name => 'PA',

2909: or l_ci_status_code = 'CI_REJECTED' or l_ci_status_code = 'CI_SUBMITTED')
2910: and
2911: (l_action_status_code = 'CI_ACTION_OPEN') ) then
2912: /*raise the msg action status not valid for the control item status*/
2913: pa_utils.add_message(p_app_short_name => 'PA',
2914: p_msg_name => 'PA_CI_MISMATCH_ACT_CI_STS',
2915: p_token1 => 'NUMBER',
2916: p_value1 => i);
2917: if (l_debug_mode = 'Y') then

Line 2933: pa_utils.add_message(p_app_short_name => 'PA',

2929: end if;--if(chk_action_status_code%notfound) then
2930: else --if(l_action_tbl(i).action_status is not null) then
2931: /*action status is not passed. Raise the error msg.*/
2932: /* we can also default the action status to open if no status is passed. need to crosscheck this*/
2933: pa_utils.add_message(p_app_short_name => 'PA',
2934: p_msg_name => 'PA_CI_MISS_ACT_CI_STS',
2935: p_token1 => 'NUMBER',
2936: p_value1 => i);
2937: if (l_debug_mode = 'Y') then

Line 2967: pa_utils.add_message(p_app_short_name => 'PA',

2963: if(l_action_tbl(i).source_ci_action_id is not null) then
2964: open check_valid_src_ci_action_id(l_action_tbl(i).source_ci_action_id);
2965: fetch check_valid_src_ci_action_id into chk_valid_src_ci_action_id_rec;
2966: if(check_valid_src_ci_action_id%notfound) then
2967: pa_utils.add_message(p_app_short_name => 'PA',
2968: p_msg_name => 'PA_CI_INV_SRC_CI_ID',
2969: p_token1 => 'NUMBER',
2970: p_value1 => i);
2971: if (l_debug_mode = 'Y') then

Line 2985: pa_utils.add_message(p_app_short_name => 'PA',

2981: x_action_tbl(i).source_ci_action_id := chk_valid_src_ci_action_id_rec.ci_action_id; --l_src_ci_action_id;
2982: close check_valid_src_ci_action_id;
2983: else
2984: /*source_ci_action is not closed. Raise error msg that the source action shd always be closed*/
2985: pa_utils.add_message(p_app_short_name => 'PA',
2986: p_msg_name => 'PA_CI_INV_SRC_CI_ID_STS',
2987: p_token1 => 'NUMBER',
2988: p_value1 => i);
2989: if (l_debug_mode = 'Y') then

Line 3005: pa_utils.add_message(p_app_short_name => 'PA',

3001:
3002: /*Validate the date_closed. This is a must for closed/canceled actions*/
3003: if( (l_action_status_code = 'CI_ACTION_CLOSED'or l_action_status_code = 'CI_ACTION_CANCELED') ) then
3004: if (l_action_tbl(i).closed_date is null) then
3005: pa_utils.add_message(p_app_short_name => 'PA',
3006: p_msg_name => 'PA_CI_MISS_DATE_FOR_ACT_CODE',
3007: p_token1 => 'NUMBER',
3008: p_value1 => i);
3009: if (l_debug_mode = 'Y') then

Line 3391: pa_utils.add_message(p_app_short_name => 'PA',

3387: if( (p_ci_id is null or p_ci_id = G_PA_MISS_NUM) AND
3388: (p_action_id is null or p_action_id = G_PA_MISS_NUM) AND
3389: (p_action_number is null or p_action_number = G_PA_MISS_NUM)
3390: ) then
3391: pa_utils.add_message(p_app_short_name => 'PA',
3392: p_msg_name => 'PA_CI_MISS_CIID_ACTID_ACTNUM');
3393: if (l_debug_mode = 'Y') then
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);

Line 3412: pa_utils.add_message(p_app_short_name => 'PA',

3408: open get_ci_action_id(p_ci_id, p_action_number);
3409: fetch get_ci_action_id into l_get_ci_action_id_rec;
3410: if(get_ci_action_id%notfound) then
3411: /*ci_id and action_number combination is invalid.raise the error message.*/
3412: pa_utils.add_message(p_app_short_name => 'PA',
3413: p_msg_name => 'PA_CI_INV_CIID_ACTNUM');
3414: if (l_debug_mode = 'Y') then
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);

Line 3428: pa_utils.add_message(p_app_short_name => 'PA',

3424: close get_ci_action_id;
3425: end if; --if(get_ci_action_id%notfound) then
3426: else--if( (p_ci_id is not null and p_ci_id <> G_PA_MISS_NUM) AND
3427: /*one or both p_ci_id, p_action_number is missing here.*/
3428: pa_utils.add_message(p_app_short_name => 'PA',
3429: p_msg_name => 'PA_CI_INV_CIID_ACTNUM');
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);

Line 3443: pa_utils.add_message(p_app_short_name => 'PA',

3439: open validate_ci_action_id(p_action_id);
3440: fetch validate_ci_action_id into l_validate_ci_action_id_rec;
3441: if(validate_ci_action_id%notfound) then
3442: /*incorrect p_action_id is passed. there is no record for this action id*/
3443: pa_utils.add_message(p_app_short_name => 'PA',
3444: p_msg_name => 'PA_CI_INV_ACT_ID');
3445: if (l_debug_mode = 'Y') then
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);

Line 3574: PA_UTILS.Add_Message (

3570: -- If the Ci_Id that is passed in is NULL then report
3571: -- Error.
3572: IF (p_Ci_Id IS NULL) THEN
3573: -- Add message to the Error Stack that Ci_Id is NULL.
3574: PA_UTILS.Add_Message (
3575: p_App_Short_Name => 'PA'
3576: , p_Msg_Name => 'PA_CI_MISS_CI_ID'
3577: );
3578: if (l_debug_mode = 'Y') then

Line 3595: PA_UTILS.Add_Message (

3591: -- Close the Cursor.
3592: CLOSE Check_Valid_CI;
3593:
3594: -- Add message to the Error Stack that this Ci_Id is Invalid.
3595: PA_UTILS.Add_Message (
3596: p_App_Short_Name => 'PA'
3597: , p_Msg_Name => 'PA_CI_INV_CI_ID'
3598: );
3599: if (l_debug_mode = 'Y') then

Line 3658: PA_UTILS.Add_Message (

3654: -- Check if View Access was denied or not.
3655: IF (l_ViewAccess <> 'T') THEN
3656: -- Add message to the Error Stack that the user does not
3657: -- have the privilege to delete this Control Item.
3658: PA_UTILS.Add_Message (
3659: p_App_Short_Name => 'PA'
3660: , p_Msg_Name => 'PA_CI_NO_ALLOW_DELETE'
3661: );
3662: if (l_debug_mode = 'Y') then

Line 3672: PA_UTILS.Add_Message (

3668: -- Check if delete was denied by Status Control or not.
3669: IF (l_DeleteAllowed <> 'Y') THEN
3670: -- Add message to the Error Stack that this Control Item
3671: -- cannot be deleted in its present status.
3672: PA_UTILS.Add_Message (
3673: p_App_Short_Name => 'PA'
3674: , p_Msg_Name => 'PA_CI_DELETE_NOT_ALLOWED'
3675: );
3676: if (l_debug_mode = 'Y') then

Line 3691: PA_UTILS.Add_Message (

3687: CLOSE Check_Workflow_On_CI;
3688:
3689: -- Add message to the Error Stack that this Ci_Id has Workflow
3690: -- attached.
3691: PA_UTILS.Add_Message (
3692: p_App_Short_Name => 'PA'
3693: , p_Msg_Name => 'PA_CI_APPROVAL_WORKFLOW'
3694: );
3695: if (l_debug_mode = 'Y') then