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 722: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

989: 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
990: open c_check_Doc_number(l_po_number,p_po_line_num,l_project_id);
991: fetch c_check_Doc_number into c_check_Doc_number_rec;
992: if c_check_Doc_number%notfound then
993: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
994: p_msg_name => 'PA_PO_LINE_NUMBER_INVALID',
995: p_token1 => 'NUMBER',
996: p_value1 => i);
997: if l_debug_mode = 'Y' then

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

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

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

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

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

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

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

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

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

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

Line 1327: PA_UTILS.ADD_MESSAGE

1323: --setting the err occured flag to N initially.
1324: l_any_err_occured_flg := 'N';
1325:
1326: if (p_ci_type_id is null) then
1327: PA_UTILS.ADD_MESSAGE
1328: (p_app_short_name => 'PA',
1329: p_msg_name => 'PA_CI_TYPE_ID_MISSING');
1330: if l_debug_mode = 'Y' then
1331: pa_debug.g_err_stage:= 'ci_type_id is null';

Line 1338: PA_UTILS.ADD_MESSAGE

1334: l_any_err_occured_flg := 'Y';
1335: end if;
1336:
1337: if(p_project_id is null and p_project_number is null and p_project_name is null) then
1338: PA_UTILS.ADD_MESSAGE
1339: (p_app_short_name => 'PA',
1340: p_msg_name => 'PA_CI_PROJECT_MISSING');
1341: if l_debug_mode = 'Y' then
1342: pa_debug.g_err_stage:= 'project id, project number, project name, all three cannot be null';

Line 1353: PA_UTILS.ADD_MESSAGE

1349: /* the passed p_ci_type_id gets validated and we derive the ci_type_attributes for the ci_type_id passed*/
1350: open get_ci_type_attrs(p_ci_type_id);
1351: fetch get_ci_type_attrs into l_ci_type_attrs_rec;
1352: if get_ci_type_attrs%NOTFOUND then
1353: PA_UTILS.ADD_MESSAGE
1354: (p_app_short_name => 'PA',
1355: p_msg_name => 'PA_CI_INVALID_TYPE_ID'); --existing msg.
1356: if l_debug_mode = 'Y' then
1357: pa_debug.g_err_stage:= 'Invalid ci_type_id passed';

Line 1371: PA_UTILS.ADD_MESSAGE

1367: /*now validate the class type code. validate that create_issue api can be used to create issues only and not
1368: change request or change order. And similarly create_change_request, create_change_order are used for their
1369: respective types*/
1370: if(p_ci_type_class_code <> l_ci_type_attrs_rec.ci_type_class_code) then
1371: PA_UTILS.ADD_MESSAGE
1372: (p_app_short_name => 'PA',
1373: p_msg_name => 'PA_CI_INV_API_USE'); --existing msg.
1374: if l_debug_mode = 'Y' then
1375: pa_debug.g_err_stage:= 'wrong usage of the api for the control item type';

Line 1390: PA_UTILS.ADD_MESSAGE

1386: /*a value has been passed for project id, we will validate this value*/
1387: open validate_prj_id(p_project_id);
1388: fetch validate_prj_id into l_project_id;
1389: if validate_prj_id%NOTFOUND then
1390: PA_UTILS.ADD_MESSAGE
1391: (p_app_short_name => 'PA',
1392: p_msg_name => 'PA_CI_NO_PROJECT_ID'); --exisitng message
1393: if l_debug_mode = 'Y' then
1394: pa_debug.g_err_stage:= 'Invalid project id passed';

Line 1408: PA_UTILS.ADD_MESSAGE

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

Line 1426: PA_UTILS.ADD_MESSAGE

1422: /*Derive the project id from project name*/
1423: open get_project_id_frm_name(p_project_name);
1424: fetch get_project_id_frm_name into l_project_id;
1425: if get_project_id_frm_name%NOTFOUND then
1426: PA_UTILS.ADD_MESSAGE
1427: (p_app_short_name => 'PA',
1428: p_msg_name => 'PA_CI_INV_PROJ_NAME');
1429: if l_debug_mode = 'Y' then
1430: pa_debug.g_err_stage:= 'Invalid project name passed';

Line 1452: PA_UTILS.ADD_MESSAGE

1448: if(p_project_id is not null and p_ci_type_id is not null and l_any_err_occured_flg <> 'Y') then
1449: open check_create_ci_priv(p_ci_type_id, p_project_id);
1450: fetch check_create_ci_priv into l_check_create_ci;
1451: if check_create_ci_priv%NOTFOUND then
1452: PA_UTILS.ADD_MESSAGE
1453: (p_app_short_name => 'PA',
1454: p_msg_name => 'PA_CI_NO_SECURITY');
1455: if l_debug_mode = 'Y' then
1456: pa_debug.g_err_stage:= 'Either the project type or role selected by you doesnt have privilge to create the control item';

Line 1826: PA_UTILS.ADD_MESSAGE

1822: l_party_id := pa_control_items_utils.getpartyid(l_user_id);
1823: l_resp_id := fnd_global.resp_id;
1824:
1825: if(p_summary is null) then
1826: PA_UTILS.ADD_MESSAGE
1827: (p_app_short_name => 'PA',
1828: p_msg_name => 'PA_CI_NO_SUMMARY'); --existing msg
1829: if l_debug_mode = 'Y' then
1830: pa_debug.g_err_stage:= 'Summary passed is null';

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

1853: unique index on pa_project_statuses table We derive p_status_code from */
1854: open get_strtng_sts_frm_sts_nme(p_ci_type_id , p_status);
1855: fetch get_strtng_sts_frm_sts_nme into get_strtng_sts_frm_sts_nme_rec;
1856: if (get_strtng_sts_frm_sts_nme%notfound) then
1857: PA_UTILS.Add_message ( p_app_short_name => 'PA'
1858: ,p_msg_name => 'PA_CI_INV_STATUS');
1859: if l_debug_mode = 'Y' then
1860: pa_debug.g_err_stage:= 'Invalid status passed';
1861: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);

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

1874:
1875: open get_strtng_sts_frm_sts_cde(p_ci_type_id, p_status_code);
1876: fetch get_strtng_sts_frm_sts_cde into get_strtng_sts_frm_sts_cde_rec;
1877: if (get_strtng_sts_frm_sts_cde%notfound) then
1878: PA_UTILS.Add_message ( p_app_short_name => 'PA'
1879: ,p_msg_name => 'PA_CI_INVALID_STATUS_CODE'); --this msg is already there
1880: if l_debug_mode = 'Y' then
1881: pa_debug.g_err_stage:= 'Invalid status code passed';
1882: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);

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

1895: /*if owner id is not passed default it with the project manager id*/
1896: open get_prj_mgr_id(p_project_id);
1897: fetch get_prj_mgr_id into get_prj_mgr_id_rec;
1898: if (get_prj_mgr_id%notfound) then
1899: pa_utils.add_message( p_app_short_name => 'PA'
1900: ,p_msg_name => 'PA_CI_NO_MGR_ID'); --Need to check what this msg context shd be.
1901: if l_debug_mode = 'Y' then
1902: pa_debug.g_err_stage:= 'Could not find project manager';
1903: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);

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

1914:
1915: open validate_owner_id(p_project_id, p_owner_id);
1916: fetch validate_owner_id into validate_owner_id_rec;
1917: if(validate_owner_id%notfound) then
1918: pa_utils.add_message( p_app_short_name => 'PA'
1919: ,p_msg_name => 'PA_CI_NO_OWNER'); --existing msg
1920: if l_debug_mode = 'Y' then
1921: pa_debug.g_err_stage:= 'Invalid owner id passed';
1922: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);

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

1934: if(p_progress_status_code is not null) then
1935: open validate_progress_sts_code(p_progress_status_code);
1936: fetch validate_progress_sts_code into l_progress_status_code;
1937: if (validate_progress_sts_code%notfound) then
1938: pa_utils.add_message( p_app_short_name => 'PA'
1939: ,p_msg_name => 'PA_CI_INV_PRG_CODE');
1940: if l_debug_mode = 'Y' then
1941: pa_debug.g_err_stage:= 'Invalid progress status code passed';
1942: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);

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

1955: l_reason_code := p_reason_code;
1956: if (p_classification_code is null or p_reason_code is null )
1957: then
1958: if (p_classification_code is null) then
1959: pa_utils.add_message( p_app_short_name => 'PA'
1960: ,p_msg_name => 'PA_CI_MIS_CLASSIFICATION_COD'); --msg is already there
1961: if l_debug_mode = 'Y' then
1962: pa_debug.g_err_stage:= 'classification_code is null';
1963: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);

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

1964: end if;
1965: l_any_err_occured_flg := 'Y';
1966: end if;
1967: if (p_reason_code is null) then
1968: pa_utils.add_message( p_app_short_name => 'PA'
1969: ,p_msg_name => 'PA_CI_MISS_REASON_CODE'); --msg is already there
1970: if l_debug_mode = 'Y' then
1971: pa_debug.g_err_stage:= 'reason_code is null';
1972: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);

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

1979: if(p_classification_code is not null) then
1980: open validate_clsfcation_code(p_classification_code);
1981: fetch validate_clsfcation_code into l_classification_code;
1982: if (validate_clsfcation_code%notfound) then
1983: pa_utils.add_message( p_app_short_name => 'PA'
1984: ,p_msg_name => 'PA_CI_CLASSIFICATION_INV');
1985: if l_debug_mode = 'Y' then
1986: pa_debug.g_err_stage:= 'Invalid classification code passed';
1987: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);

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

1997: if(p_reason_code is not null) then
1998: open validate_reason_code(p_reason_code);
1999: fetch validate_reason_code into l_reason_code;
2000: if (validate_reason_code%notfound) then
2001: pa_utils.add_message( p_app_short_name => 'PA'
2002: ,p_msg_name => 'PA_CI_INV_REA_CODE');
2003: if l_debug_mode = 'Y' then
2004: pa_debug.g_err_stage:= 'Invalid reason code passed';
2005: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);

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

2012: end if;
2013:
2014: /*Currently only PA_TASKS type of objects are supported*/
2015: if(p_object_type is not null and p_object_type <> 'PA_TASKS') then
2016: pa_utils.add_message( p_app_short_name => 'PA'
2017: ,p_msg_name => 'PA_CI_INV_OBJ_TYPE');
2018: if l_debug_mode = 'Y' then
2019: pa_debug.g_err_stage:= 'Invalid object type passed';
2020: 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: if (p_object_id is not null) then
2027: open validate_obj_id(p_project_id, p_object_id);
2028: fetch validate_obj_id into l_object_id;
2029: if (validate_obj_id%notfound) then
2030: pa_utils.add_message( p_app_short_name => 'PA'
2031: ,p_msg_name => 'PA_CI_INV_OBJ_ID');
2032: if l_debug_mode = 'Y' then
2033: pa_debug.g_err_stage:= 'Invalid Object Id passed';
2034: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);

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

2043: /*validations for p_closed_date parameter. The date must be supplied for a item in closed status, for statuses other than closed
2044: we should ignore this value*/
2045: if( l_system_status_code = 'CI_CLOSED') then
2046: if(p_date_closed is null) then
2047: pa_utils.add_message( p_app_short_name => 'PA'
2048: ,p_msg_name => 'PA_CI_CLS_DATE_MISS');
2049: if l_debug_mode = 'Y' then
2050: pa_debug.g_err_stage:= 'For a control item in closed status, closed_date is missing';
2051: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);

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

2064:
2065: if( l_system_status_code = 'CI_CLOSED') then
2066:
2067: if(p_closed_by_id is null) then
2068: pa_utils.add_message( p_app_short_name => 'PA'
2069: ,p_msg_name => 'PA_CI_CLS_BYID_MISS');
2070: if l_debug_mode = 'Y' then
2071: pa_debug.g_err_stage:= 'For a control item in closed status, closed_by_id is missing';
2072: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);

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

2076: /*validate the p_closed_by_id. Also the persons with the project authority can close the item*/
2077: open validate_cls_by_id(p_project_id , p_closed_by_id);
2078: fetch validate_cls_by_id into l_valid_clsby_id;
2079: if(validate_cls_by_id%notfound) then
2080: pa_utils.add_message( p_app_short_name => 'PA'
2081: ,p_msg_name => 'PA_CI_INV_CLS_BYID');
2082: if l_debug_mode = 'Y' then
2083: pa_debug.g_err_stage:= 'inavlid closed_by_id is passed or user doesnt have project authority';
2084: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);

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

2107: if(p_resolution_code is not null) then
2108: open validate_resolution_code(p_resolution_code);
2109: fetch validate_resolution_code into l_resolution_code;
2110: if (validate_resolution_code%notfound) then
2111: pa_utils.add_message( p_app_short_name => 'PA'
2112: ,p_msg_name => 'PA_CI_INV_RES_CODE');
2113: if l_debug_mode = 'Y' then
2114: pa_debug.g_err_stage:= 'Invalid resolution code passed';
2115: 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_priority_code is not null) then
2127: open validate_priority_code(p_priority_code);
2128: fetch validate_priority_code into l_priority_code;
2129: if (validate_priority_code%notfound) then
2130: pa_utils.add_message( p_app_short_name => 'PA'
2131: ,p_msg_name => 'PA_CI_INV_PRIO_CODE');
2132: if l_debug_mode = 'Y' then
2133: pa_debug.g_err_stage:= 'Invalid priority code passed';
2134: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);

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

2143: if(p_effort_level_code is not null) then
2144: open validate_eff_lvl_code(p_effort_level_code);
2145: fetch validate_eff_lvl_code into l_effort_level_code;
2146: if (validate_eff_lvl_code%notfound) then
2147: pa_utils.add_message( p_app_short_name => 'PA'
2148: ,p_msg_name => 'PA_CI_INV_EFFR_CODE');
2149: if l_debug_mode = 'Y' then
2150: pa_debug.g_err_stage:= 'Invalid effort code passed';
2151: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);

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

2165: else
2166: open validate_prj_currency(p_price_currency_code);
2167: fetch validate_prj_currency into l_price_currency_code;
2168: if (validate_prj_currency%notfound) then
2169: pa_utils.add_message( p_app_short_name => 'PA'
2170: ,p_msg_name => 'PA_CI_INV_CURR_CODE');
2171: if l_debug_mode = 'Y' then
2172: pa_debug.g_err_stage:= 'Invalid currency code passed';
2173: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);

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

2259: else --p_auto_number_flag = 'Y' and l_system_status_code <> 'CI_DRAFT'
2260: /*For manual numbering check if passed ci_number already exist.*/
2261: l_ci_number_char := p_ci_number;
2262: if pa_control_items_pvt.ci_number_exists(p_project_id, l_ci_number_char ,p_ci_type_id) = TRUE then
2263: PA_UTILS.Add_Message( p_app_short_name => 'PA'
2264: ,p_msg_name => 'PA_CI_DUPLICATE_CI_NUMBER');--msg already there
2265: if l_debug_mode = 'Y' then
2266: pa_debug.g_err_stage:= 'Duplicate ci_number passed.';
2267: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);

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

2272:
2273: /* if auto numbering is enabled then l_ci_number_char wont be null here. For manual numbering checking if
2274: passed ci_number was null.*/
2275: if l_ci_number_char is null and l_system_status_code <> 'CI_DRAFT' then
2276: pa_utils.add_message( p_app_short_name => 'PA'
2277: ,p_msg_name => 'PA_CI_NO_CI_NUMBER'); --msg already there
2278: if l_debug_mode = 'Y' then
2279: pa_debug.g_err_stage:= 'Missing ci_number';
2280: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);

Line 2487: pa_utils.add_message

2483: l_any_err_occured_flg := 'N';
2484:
2485: /* check if p_ci_id is not passed/null*/
2486: if(p_ci_id is null) then
2487: pa_utils.add_message
2488: (p_app_short_name => 'PA',
2489: p_msg_name => 'PA_CI_MISS_CI_ID');
2490: if l_debug_mode = 'Y' then
2491: pa_debug.g_err_stage:= 'ci_id is missing';

Line 2503: pa_utils.add_message

2499: open check_valid_ci_id(p_ci_id);
2500: fetch check_valid_ci_id into l_check_valid_ci_id_rec; --l_ci_id;
2501: if(check_valid_ci_id%notfound) then
2502: /*invalid ci_id*/
2503: pa_utils.add_message
2504: (p_app_short_name => 'PA',
2505: p_msg_name => 'PA_CI_INV_CI_ID');
2506: if l_debug_mode = 'Y' then
2507: pa_debug.g_err_stage:= 'ci_id is invalid';

Line 2529: pa_utils.add_message

2525: end if;
2526:
2527: if(l_create_action_flg is not null and l_create_action_flg = 'F') then
2528: /*user doesnt have privilige to create the action*/
2529: pa_utils.add_message
2530: (p_app_short_name => 'PA',
2531: p_msg_name => 'PA_CI_ACT_FLS_SEC');
2532: if l_debug_mode = 'Y' then
2533: pa_debug.g_err_stage:= 'user doesnt have security to create the action';

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

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',
2658: p_msg_name => 'PA_CI_INV_ACT_ASSGN_CODE', -- We have this similar msg
2659: p_token1 => 'NUMBER', --PA_CI_ACTION_INVALID_ASSIGNEE
2660: p_value1 => p_msg_token_num); --but it doesnt have tokens
2661: else

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

2660: p_value1 => p_msg_token_num); --but it doesnt have tokens
2661: else
2662: /*if p_msg_token_num is not passed then we are raising the msg without any tokens
2663: which we need in take action flow in amg. Note the two msg names are different.*/
2664: pa_utils.add_message(p_app_short_name => 'PA',
2665: p_msg_name => 'PA_CI_INV_ACT_ASSGN_CODE_NT');
2666: end if;--if(p_msg_token_num is not null) then
2667:
2668: if (l_debug_mode = 'Y') then

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

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

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

2684: p_msg_name => 'PA_CI_MISS_ASSGN_ID',
2685: p_token1 => 'NUMBER',
2686: p_value1 => p_msg_token_num);
2687: else--if(p_msg_token_num is not null)
2688: pa_utils.add_message(p_app_short_name => 'PA',
2689: p_msg_name => 'PA_CI_MISS_ASSGN_ID_NT');
2690: end if;--if(p_msg_token_num is not null)
2691:
2692: if l_debug_mode = 'Y' then

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

2839: if(l_action_tbl(i).action_type_code is not null) then
2840: open chk_act_typ_code(l_action_tbl(i).action_type_code);
2841: fetch chk_act_typ_code into chk_act_typ_code_rec;
2842: if(chk_act_typ_code%notfound) then
2843: pa_utils.add_message(p_app_short_name => 'PA',
2844: p_msg_name => 'PA_CI_INV_ACT_CODE',
2845: p_token1 => 'NUMBER',
2846: p_value1 => i);
2847: if l_debug_mode = 'Y' then

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

2894: if(l_action_tbl(i).action_status is not null) then
2895: open chk_action_status_code(l_action_tbl(i).action_status);
2896: fetch chk_action_status_code into l_action_status_code;
2897: if(chk_action_status_code%notfound) then
2898: pa_utils.add_message(p_app_short_name => 'PA',
2899: p_msg_name => 'PA_CI_INV_ACT_STS_CODE',
2900: p_token1 => 'NUMBER',
2901: p_value1 => i);
2902: if (l_debug_mode = 'Y') then

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

2926: or l_ci_status_code = 'CI_REJECTED' or l_ci_status_code = 'CI_SUBMITTED')
2927: and
2928: (l_action_status_code = 'CI_ACTION_OPEN') ) then
2929: /*raise the msg action status not valid for the control item status*/
2930: pa_utils.add_message(p_app_short_name => 'PA',
2931: p_msg_name => 'PA_CI_MISMATCH_ACT_CI_STS',
2932: p_token1 => 'NUMBER',
2933: p_value1 => i);
2934: if (l_debug_mode = 'Y') then

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

2946: end if;--if(chk_action_status_code%notfound) then
2947: else --if(l_action_tbl(i).action_status is not null) then
2948: /*action status is not passed. Raise the error msg.*/
2949: /* we can also default the action status to open if no status is passed. need to crosscheck this*/
2950: pa_utils.add_message(p_app_short_name => 'PA',
2951: p_msg_name => 'PA_CI_MISS_ACT_CI_STS',
2952: p_token1 => 'NUMBER',
2953: p_value1 => i);
2954: if (l_debug_mode = 'Y') then

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

2980: if(l_action_tbl(i).source_ci_action_id is not null) then
2981: open check_valid_src_ci_action_id(l_action_tbl(i).source_ci_action_id);
2982: fetch check_valid_src_ci_action_id into chk_valid_src_ci_action_id_rec;
2983: if(check_valid_src_ci_action_id%notfound) then
2984: pa_utils.add_message(p_app_short_name => 'PA',
2985: p_msg_name => 'PA_CI_INV_SRC_CI_ID',
2986: p_token1 => 'NUMBER',
2987: p_value1 => i);
2988: if (l_debug_mode = 'Y') then

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

2998: x_action_tbl(i).source_ci_action_id := chk_valid_src_ci_action_id_rec.ci_action_id; --l_src_ci_action_id;
2999: close check_valid_src_ci_action_id;
3000: else
3001: /*source_ci_action is not closed. Raise error msg that the source action shd always be closed*/
3002: pa_utils.add_message(p_app_short_name => 'PA',
3003: p_msg_name => 'PA_CI_INV_SRC_CI_ID_STS',
3004: p_token1 => 'NUMBER',
3005: p_value1 => i);
3006: if (l_debug_mode = 'Y') then

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

3018:
3019: /*Validate the date_closed. This is a must for closed/canceled actions*/
3020: if( (l_action_status_code = 'CI_ACTION_CLOSED'or l_action_status_code = 'CI_ACTION_CANCELED') ) then
3021: if (l_action_tbl(i).closed_date is null) then
3022: pa_utils.add_message(p_app_short_name => 'PA',
3023: p_msg_name => 'PA_CI_MISS_DATE_FOR_ACT_CODE',
3024: p_token1 => 'NUMBER',
3025: p_value1 => i);
3026: if (l_debug_mode = 'Y') then

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

3404: if( (p_ci_id is null or p_ci_id = G_PA_MISS_NUM) AND
3405: (p_action_id is null or p_action_id = G_PA_MISS_NUM) AND
3406: (p_action_number is null or p_action_number = G_PA_MISS_NUM)
3407: ) then
3408: pa_utils.add_message(p_app_short_name => 'PA',
3409: p_msg_name => 'PA_CI_MISS_CIID_ACTID_ACTNUM');
3410: if (l_debug_mode = 'Y') then
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);

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

3425: open get_ci_action_id(p_ci_id, p_action_number);
3426: fetch get_ci_action_id into l_get_ci_action_id_rec;
3427: if(get_ci_action_id%notfound) then
3428: /*ci_id and action_number combination is invalid.raise the error message.*/
3429: pa_utils.add_message(p_app_short_name => 'PA',
3430: p_msg_name => 'PA_CI_INV_CIID_ACTNUM');
3431: if (l_debug_mode = 'Y') then
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);

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

3441: close get_ci_action_id;
3442: end if; --if(get_ci_action_id%notfound) then
3443: else--if( (p_ci_id is not null and p_ci_id <> G_PA_MISS_NUM) AND
3444: /*one or both p_ci_id, p_action_number is missing here.*/
3445: pa_utils.add_message(p_app_short_name => 'PA',
3446: p_msg_name => 'PA_CI_INV_CIID_ACTNUM');
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);

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

3456: open validate_ci_action_id(p_action_id);
3457: fetch validate_ci_action_id into l_validate_ci_action_id_rec;
3458: if(validate_ci_action_id%notfound) then
3459: /*incorrect p_action_id is passed. there is no record for this action id*/
3460: pa_utils.add_message(p_app_short_name => 'PA',
3461: p_msg_name => 'PA_CI_INV_ACT_ID');
3462: if (l_debug_mode = 'Y') then
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);

Line 3591: PA_UTILS.Add_Message (

3587: -- If the Ci_Id that is passed in is NULL then report
3588: -- Error.
3589: IF (p_Ci_Id IS NULL) THEN
3590: -- Add message to the Error Stack that Ci_Id is NULL.
3591: PA_UTILS.Add_Message (
3592: p_App_Short_Name => 'PA'
3593: , p_Msg_Name => 'PA_CI_MISS_CI_ID'
3594: );
3595: if (l_debug_mode = 'Y') then

Line 3612: PA_UTILS.Add_Message (

3608: -- Close the Cursor.
3609: CLOSE Check_Valid_CI;
3610:
3611: -- Add message to the Error Stack that this Ci_Id is Invalid.
3612: PA_UTILS.Add_Message (
3613: p_App_Short_Name => 'PA'
3614: , p_Msg_Name => 'PA_CI_INV_CI_ID'
3615: );
3616: if (l_debug_mode = 'Y') then

Line 3675: PA_UTILS.Add_Message (

3671: -- Check if View Access was denied or not.
3672: IF (l_ViewAccess <> 'T') THEN
3673: -- Add message to the Error Stack that the user does not
3674: -- have the privilege to delete this Control Item.
3675: PA_UTILS.Add_Message (
3676: p_App_Short_Name => 'PA'
3677: , p_Msg_Name => 'PA_CI_NO_ALLOW_DELETE'
3678: );
3679: if (l_debug_mode = 'Y') then

Line 3689: PA_UTILS.Add_Message (

3685: -- Check if delete was denied by Status Control or not.
3686: IF (l_DeleteAllowed <> 'Y') THEN
3687: -- Add message to the Error Stack that this Control Item
3688: -- cannot be deleted in its present status.
3689: PA_UTILS.Add_Message (
3690: p_App_Short_Name => 'PA'
3691: , p_Msg_Name => 'PA_CI_DELETE_NOT_ALLOWED'
3692: );
3693: if (l_debug_mode = 'Y') then

Line 3708: PA_UTILS.Add_Message (

3704: CLOSE Check_Workflow_On_CI;
3705:
3706: -- Add message to the Error Stack that this Ci_Id has Workflow
3707: -- attached.
3708: PA_UTILS.Add_Message (
3709: p_App_Short_Name => 'PA'
3710: , p_Msg_Name => 'PA_CI_APPROVAL_WORKFLOW'
3711: );
3712: if (l_debug_mode = 'Y') then