185: Init_global ;
186:
187: --Clear the global PL/SQL message table
188: IF p_init_msg_list = 'Y' THEN
189: FND_MSG_PUB.initialize;
190: END IF;
191:
192: pa_debug.Init_err_stack ( 'Check User Privilege');
193: x_msg_count :=0;
257: if v_fnd_api_ret_code=fnd_api.g_ret_sts_error
258: OR v_fnd_api_ret_code=fnd_api.g_ret_sts_unexp_error then
259: x_ret_code:=fnd_api.g_false;
260: x_return_status:=fnd_api.g_ret_sts_unexp_error;
261: FND_MSG_PUB.Count_And_Get
262: (p_count => x_msg_count ,
263: p_data => x_msg_data
264: );
265: return;
305: if secure_resp_flag =FND_API.G_RET_STS_UNEXP_ERROR then
306: x_ret_code:=fnd_api.g_false;
307: x_return_status:=fnd_api.g_ret_sts_unexp_error;
308:
309: FND_MSG_PUB.Count_And_Get
310: (p_count => x_msg_count ,
311: p_data => x_msg_data
312: );
313: return;
340: x_return_status:=fnd_api.g_ret_sts_success;
341:
342: ---The following code is for testing the error page
343: /* fnd_message.set_name('PA','PA_SEC_NO_ACCESS');
344: fnd_msg_pub.ADD;
345: FND_MSG_PUB.Count_And_Get
346: (p_count => x_msg_count ,
347: p_data => x_msg_data
348: ); */
341:
342: ---The following code is for testing the error page
343: /* fnd_message.set_name('PA','PA_SEC_NO_ACCESS');
344: fnd_msg_pub.ADD;
345: FND_MSG_PUB.Count_And_Get
346: (p_count => x_msg_count ,
347: p_data => x_msg_data
348: ); */
349:
354: pa_debug.G_err_stage := 'exceptions raised';
355: IF G_debug_flag = 'Y' THEN
356: pa_debug.write_file('check_user_privilege: ' || 'LOG', pa_debug.G_err_stage);
357: END IF;
358: fnd_msg_pub.add_exc_msg
359: (p_pkg_name => G_PKG_NAME,
360: p_procedure_name =>'CHECK_USER_PRIVILEGE' );
361: x_return_status:= FND_API.G_RET_STS_UNEXP_ERROR;
362: x_ret_code :=fnd_api.g_false;
359: (p_pkg_name => G_PKG_NAME,
360: p_procedure_name =>'CHECK_USER_PRIVILEGE' );
361: x_return_status:= FND_API.G_RET_STS_UNEXP_ERROR;
362: x_ret_code :=fnd_api.g_false;
363: FND_MSG_PUB.Count_And_Get
364: (p_count => x_msg_count ,
365: p_data => x_msg_data
366: );
367: end check_user_privilege;
413: return fnd_api.g_false;
414: end if;
415: Exception
416: when others then
417: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
418: fnd_msg_pub.add_exc_msg
419: (p_pkg_name => G_PKG_NAME,
420: p_procedure_name => 'check_sec_by_role');
421: end if;
414: end if;
415: Exception
416: when others then
417: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
418: fnd_msg_pub.add_exc_msg
419: (p_pkg_name => G_PKG_NAME,
420: p_procedure_name => 'check_sec_by_role');
421: end if;
422: return fnd_api.g_ret_sts_unexp_error;
520: RETURN fnd_api.g_false;
521:
522: Exception
523: when others then
524: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
525: fnd_msg_pub.add_exc_msg
526: (p_pkg_name => G_PKG_NAME,
527: p_procedure_name => 'check_sec_by_resp');
528: end if;
521:
522: Exception
523: when others then
524: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
525: fnd_msg_pub.add_exc_msg
526: (p_pkg_name => G_PKG_NAME,
527: p_procedure_name => 'check_sec_by_resp');
528: end if;
529: return fnd_api.g_ret_sts_unexp_error;
579: Init_global ;
580:
581: --Clear the global PL/SQL message table : Changed for bug 5130421
582: IF p_init_msg_list = 'T' THEN
583: FND_MSG_PUB.initialize;
584: END IF;
585:
586: pa_debug.Init_err_stack ( 'check_confirm_asmt');
587: x_msg_count :=0;
624: x_msg_count := x_msg_count+1;
625: x_msg_data := v_error_message_code;
626: x_return_status := fnd_api.g_ret_sts_error;
627: x_ret_code:=fnd_api.g_false;
628: FND_MSG_PUB.add_exc_msg
629: (p_pkg_name =>'pa_resource_utils',
630: p_procedure_name => 'Check_ResourceName_Or_Id',
631: p_error_text => v_error_message_code);
632: RETURN;
644: x_msg_data := v_error_message_code;
645: x_return_status := v_return_status;
646: x_ret_code:=fnd_api.g_false;
647: --Bug# 6134740 Fix start
648: /*FND_MSG_PUB.add_exc_msg
649: (p_pkg_name =>G_PKG_NAME,
650: p_procedure_name => 'GET_RESOURCE_ORG_ID',
651: p_error_text => v_error_message_code);*/
652: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA'
746: x_msg_count := x_msg_count+1;
747: x_msg_data := v_error_message_code;
748: x_return_status := v_return_status;
749: x_ret_code:=fnd_api.g_false;
750: FND_MSG_PUB.add_exc_msg
751: (p_pkg_name =>G_PKG_NAME,
752: p_procedure_name => 'CHECK_MANAGER_RELATION',
753: p_error_text => v_error_message_code);
754: RETURN;
792: if v_fnd_api_ret_code=fnd_api.g_ret_sts_error
793: OR v_fnd_api_ret_code=fnd_api.g_ret_sts_unexp_error then
794: x_ret_code:=fnd_api.g_false;
795: x_return_status:=fnd_api.g_ret_sts_unexp_error;
796: FND_MSG_PUB.Count_And_Get
797: (p_count => x_msg_count ,
798: p_data => x_msg_data
799: );
800: return;
826: pa_debug.G_err_stage := SUBSTR(SQLERRM, 1, 200);
827: IF G_debug_flag = 'Y' THEN
828: pa_debug.write_file( 'LOG', pa_debug.G_err_stage);
829: END IF;
830: fnd_msg_pub.add_exc_msg
831: (p_pkg_name => G_PKG_NAME,
832: p_procedure_name =>'CHECK_CONFIRM_ASMT' );
833: x_return_status:= FND_API.G_RET_STS_UNEXP_ERROR;
834: x_msg_count:=x_msg_count+1;
1221: --dbms_output.put_line('l_exp_error: '||l_exp_error||' l_unexp_error: '||l_unexp_error);
1222: x_return_status := l_return_status;
1223:
1224: IF l_return_status <> fnd_api.g_ret_sts_success THEN
1225: FND_MSG_PUB.Count_And_Get
1226: (p_count => x_msg_count ,
1227: p_data => x_msg_data
1228: );
1229: END IF;
1264:
1265: begin
1266:
1267: --Clear the global PL/SQL message table
1268: -- FND_MSG_PUB.initialize; commented the call for Bug 2887390
1269:
1270: --dbms_output.put_line('inside grant role');
1271: x_return_status:=fnd_api.g_ret_sts_success;
1272: x_msg_count:=0;
1316: x_return_status:=fnd_api.g_ret_sts_error;
1317: else
1318: x_return_status:=fnd_api.g_ret_sts_unexp_error;
1319: end if;
1320: FND_MSG_PUB.Count_And_Get
1321: (p_count => x_msg_count ,
1322: p_data => x_msg_data
1323: );
1324: end if;
1342:
1343: begin
1344:
1345: --Clear the global PL/SQL message table
1346: FND_MSG_PUB.initialize;
1347:
1348: x_return_status :=fnd_api.g_ret_sts_success;
1349: x_msg_count:=0;
1350: x_msg_data :=null;
1364: x_return_status:=fnd_api.g_ret_sts_error;
1365: else
1366: x_return_status:=fnd_api.g_ret_sts_unexp_error;
1367: end if;
1368: FND_MSG_PUB.Count_And_Get
1369: (p_count => x_msg_count ,
1370: p_data => x_msg_data
1371: );
1372: end if;
1399: l_error_code NUMBER;
1400:
1401: begin
1402: --Clear the global PL/SQL message table
1403: FND_MSG_PUB.initialize;
1404:
1405: x_msg_count:=0;
1406: x_msg_data:=null;
1407:
1450: x_return_status:=fnd_api.g_ret_sts_error;
1451: ELSE
1452: x_return_status:=fnd_api.g_ret_sts_unexp_error;
1453: END IF;
1454: FND_MSG_PUB.Count_And_Get
1455: (p_count => x_msg_count ,
1456: p_data => x_msg_data
1457: );
1458: RETURN;
1465: EXCEPTION
1466: WHEN OTHERS THEN
1467: ROLLBACK TO revoke_role_PUB;
1468: x_return_status := FND_API.g_ret_sts_unexp_error ;
1469: IF FND_MSG_PUB.Check_Msg_Level
1470: (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
1471: THEN
1472: FND_MSG_PUB.Add_Exc_Msg
1473: ( G_PKG_NAME ,
1466: WHEN OTHERS THEN
1467: ROLLBACK TO revoke_role_PUB;
1468: x_return_status := FND_API.g_ret_sts_unexp_error ;
1469: IF FND_MSG_PUB.Check_Msg_Level
1470: (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
1471: THEN
1472: FND_MSG_PUB.Add_Exc_Msg
1473: ( G_PKG_NAME ,
1474: 'revoke_role'
1468: x_return_status := FND_API.g_ret_sts_unexp_error ;
1469: IF FND_MSG_PUB.Check_Msg_Level
1470: (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
1471: THEN
1472: FND_MSG_PUB.Add_Exc_Msg
1473: ( G_PKG_NAME ,
1474: 'revoke_role'
1475: );
1476: END IF;
1473: ( G_PKG_NAME ,
1474: 'revoke_role'
1475: );
1476: END IF;
1477: FND_MSG_PUB.Count_And_Get
1478: (p_count => x_msg_count ,
1479: p_data => x_msg_data
1480: );
1481: end;
1501: l_success varchar2(1);
1502:
1503: begin
1504: --Clear the global PL/SQL message table
1505: FND_MSG_PUB.initialize;
1506:
1507: x_return_status:=fnd_api.g_ret_sts_success;
1508: x_msg_count:=0;
1509: x_msg_data:=null;
1518: if l_success=fnd_api.g_true then
1519: x_return_status:=fnd_api.g_ret_sts_success;
1520: else
1521: x_return_status:=fnd_api.g_ret_sts_unexp_error;
1522: FND_MSG_PUB.Count_And_Get
1523: (p_count => x_msg_count ,
1524: p_data => x_msg_data
1525: );
1526: end if;
1562: l_object_id number;
1563:
1564: begin
1565: --Clear the global PL/SQL message table
1566: FND_MSG_PUB.initialize;
1567:
1568: x_msg_count:=0;
1569: x_msg_data:=null;
1570:
1622: return l_set_id;
1623: exception
1624: when no_data_found then
1625: fnd_message.set_name('PA','PA_COMMON_NO_INS_SET');
1626: fnd_msg_pub.ADD;
1627: return null;
1628: when others then
1629: IF FND_MSG_PUB.Check_Msg_Level
1630: (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
1625: fnd_message.set_name('PA','PA_COMMON_NO_INS_SET');
1626: fnd_msg_pub.ADD;
1627: return null;
1628: when others then
1629: IF FND_MSG_PUB.Check_Msg_Level
1630: (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
1631: THEN
1632: FND_MSG_PUB.Add_Exc_Msg
1633: ( G_PKG_NAME ,
1626: fnd_msg_pub.ADD;
1627: return null;
1628: when others then
1629: IF FND_MSG_PUB.Check_Msg_Level
1630: (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
1631: THEN
1632: FND_MSG_PUB.Add_Exc_Msg
1633: ( G_PKG_NAME ,
1634: l_api_name
1628: when others then
1629: IF FND_MSG_PUB.Check_Msg_Level
1630: (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
1631: THEN
1632: FND_MSG_PUB.Add_Exc_Msg
1633: ( G_PKG_NAME ,
1634: l_api_name
1635: );
1636: END IF;
1652: return v_menu_name;
1653: exception
1654: when no_data_found then
1655: --fnd_message.set_name('PA','PA_COMMON_NO_ROLE_MENU');
1656: --fnd_msg_pub.ADD;
1657: return null;
1658: when others then
1659: IF FND_MSG_PUB.Check_Msg_Level
1660: (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
1655: --fnd_message.set_name('PA','PA_COMMON_NO_ROLE_MENU');
1656: --fnd_msg_pub.ADD;
1657: return null;
1658: when others then
1659: IF FND_MSG_PUB.Check_Msg_Level
1660: (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
1661: THEN
1662: FND_MSG_PUB.Add_Exc_Msg
1663: ( G_PKG_NAME ,
1656: --fnd_msg_pub.ADD;
1657: return null;
1658: when others then
1659: IF FND_MSG_PUB.Check_Msg_Level
1660: (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
1661: THEN
1662: FND_MSG_PUB.Add_Exc_Msg
1663: ( G_PKG_NAME ,
1664: l_api_name
1658: when others then
1659: IF FND_MSG_PUB.Check_Msg_Level
1660: (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
1661: THEN
1662: FND_MSG_PUB.Add_Exc_Msg
1663: ( G_PKG_NAME ,
1664: l_api_name
1665: );
1666: END IF;
1695: return v_menu_name;
1696: exception
1697: when no_data_found then
1698: --fnd_message.set_name('PA','PA_COMMON_NO_ROLE_MENU');
1699: --fnd_msg_pub.ADD;
1700: return null;
1701: when others then
1702: IF FND_MSG_PUB.Check_Msg_Level
1703: (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
1698: --fnd_message.set_name('PA','PA_COMMON_NO_ROLE_MENU');
1699: --fnd_msg_pub.ADD;
1700: return null;
1701: when others then
1702: IF FND_MSG_PUB.Check_Msg_Level
1703: (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
1704: THEN
1705: FND_MSG_PUB.Add_Exc_Msg
1706: ( G_PKG_NAME ,
1699: --fnd_msg_pub.ADD;
1700: return null;
1701: when others then
1702: IF FND_MSG_PUB.Check_Msg_Level
1703: (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
1704: THEN
1705: FND_MSG_PUB.Add_Exc_Msg
1706: ( G_PKG_NAME ,
1707: l_api_name
1701: when others then
1702: IF FND_MSG_PUB.Check_Msg_Level
1703: (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
1704: THEN
1705: FND_MSG_PUB.Add_Exc_Msg
1706: ( G_PKG_NAME ,
1707: l_api_name
1708: );
1709: END IF;
1721: return v_menu_id;
1722: exception
1723: when no_data_found then
1724: -- fnd_message.set_name('PA','PA_COMMON_NO_ROLE_MENU');
1725: -- fnd_msg_pub.ADD;
1726: return null;
1727: when others then
1728: IF FND_MSG_PUB.Check_Msg_Level
1729: (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
1724: -- fnd_message.set_name('PA','PA_COMMON_NO_ROLE_MENU');
1725: -- fnd_msg_pub.ADD;
1726: return null;
1727: when others then
1728: IF FND_MSG_PUB.Check_Msg_Level
1729: (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
1730: THEN
1731: FND_MSG_PUB.Add_Exc_Msg
1732: ( G_PKG_NAME ,
1725: -- fnd_msg_pub.ADD;
1726: return null;
1727: when others then
1728: IF FND_MSG_PUB.Check_Msg_Level
1729: (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
1730: THEN
1731: FND_MSG_PUB.Add_Exc_Msg
1732: ( G_PKG_NAME ,
1733: l_api_name
1727: when others then
1728: IF FND_MSG_PUB.Check_Msg_Level
1729: (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
1730: THEN
1731: FND_MSG_PUB.Add_Exc_Msg
1732: ( G_PKG_NAME ,
1733: l_api_name
1734: );
1735: END IF;
1747: return v_menu_id;
1748: exception
1749: when no_data_found then
1750: -- fnd_message.set_name('PA','PA_COMMON_NO_ROLE_MENU');
1751: -- fnd_msg_pub.ADD;
1752: return null;
1753: when others then
1754: IF FND_MSG_PUB.Check_Msg_Level
1755: (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
1750: -- fnd_message.set_name('PA','PA_COMMON_NO_ROLE_MENU');
1751: -- fnd_msg_pub.ADD;
1752: return null;
1753: when others then
1754: IF FND_MSG_PUB.Check_Msg_Level
1755: (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
1756: THEN
1757: FND_MSG_PUB.Add_Exc_Msg
1758: ( G_PKG_NAME ,
1751: -- fnd_msg_pub.ADD;
1752: return null;
1753: when others then
1754: IF FND_MSG_PUB.Check_Msg_Level
1755: (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
1756: THEN
1757: FND_MSG_PUB.Add_Exc_Msg
1758: ( G_PKG_NAME ,
1759: l_api_name
1753: when others then
1754: IF FND_MSG_PUB.Check_Msg_Level
1755: (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
1756: THEN
1757: FND_MSG_PUB.Add_Exc_Msg
1758: ( G_PKG_NAME ,
1759: l_api_name
1760: );
1761: END IF;
1966: l_sql VARCHAR2(32767);
1967: l_predicate VARCHAR2(32767);
1968: BEGIN
1969: --Clear the global PL/SQL message table
1970: FND_MSG_PUB.initialize;
1971:
1972: pa_debug.Init_err_stack ( 'Check_Access_Exist');
1973:
1974: Init_global;
2078: -- IF x_return_status<>FND_API.G_RET_STS_SUCCESS THEN
2079: IF x_return_status<>'T' AND x_return_status<>'F' THEN
2080: x_ret_code := FND_API.G_FALSE;
2081: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2082: FND_MSG_PUB.Count_And_Get
2083: (p_count => x_msg_count ,
2084: p_data => x_msg_data);
2085: RETURN;
2086: ELSIF x_return_status='F' THEN
2120: pa_debug.write_file('check_access_exist: ' || 'LOG', pa_debug.G_err_stage);
2121: END IF;
2122: x_ret_code := FND_API.G_FALSE;
2123: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2124: FND_MSG_PUB.Count_And_Get
2125: (p_count => x_msg_count ,
2126: p_data => x_msg_data);
2127:
2128: END check_access_exist;
2209:
2210: EXCEPTION
2211: when others then
2212: x_return_status:=fnd_api.g_ret_sts_unexp_error;
2213: fnd_msg_pub.add_exc_msg
2214: (p_pkg_name => 'PA_SECURITY_PVT',
2215: p_procedure_name => 'UPDATE_MENU',
2216: p_error_text => SQLCODE);
2217: x_msg_count := 1;
2246:
2247: EXCEPTION
2248: when others then
2249: x_return_status:=fnd_api.g_ret_sts_unexp_error;
2250: fnd_msg_pub.add_exc_msg
2251: (p_pkg_name => 'PA_SECURITY_PVT',
2252: p_procedure_name => 'REVOKE_ROLE_BASED_SEC',
2253: p_error_text => SQLCODE);
2254: x_msg_count := 1;
2452:
2453: x_return_status:=l_return_status;
2454:
2455: IF l_return_status <> fnd_api.g_ret_sts_success THEN
2456: FND_MSG_PUB.Count_And_Get
2457: (p_count => x_msg_count ,
2458: p_data => x_msg_data
2459: );
2460: END IF;
2461:
2462: EXCEPTION
2463: when others then
2464: x_return_status:=fnd_api.g_ret_sts_unexp_error;
2465: fnd_msg_pub.add_exc_msg
2466: (p_pkg_name => 'PA_SECURITY_PVT',
2467: p_procedure_name => 'GRANT_ROLE_BASED_SEC',
2468: p_error_text => SQLCODE);
2469: FND_MSG_PUB.Count_And_Get
2465: fnd_msg_pub.add_exc_msg
2466: (p_pkg_name => 'PA_SECURITY_PVT',
2467: p_procedure_name => 'GRANT_ROLE_BASED_SEC',
2468: p_error_text => SQLCODE);
2469: FND_MSG_PUB.Count_And_Get
2470: (p_count => x_msg_count ,
2471: p_data => x_msg_data
2472: );
2473: END grant_role_based_sec;
2501:
2502: EXCEPTION
2503: when others then
2504: x_return_status:=fnd_api.g_ret_sts_unexp_error;
2505: fnd_msg_pub.add_exc_msg
2506: (p_pkg_name => 'PA_SECURITY_PVT',
2507: p_procedure_name => 'REVOKE_STATUS_BASED_SEC',
2508: p_error_text => SQLCODE);
2509: x_msg_count := 1;
2689:
2690: EXCEPTION
2691: when others then
2692: x_return_status:=fnd_api.g_ret_sts_unexp_error;
2693: fnd_msg_pub.add_exc_msg
2694: (p_pkg_name => 'PA_SECURITY_PVT',
2695: p_procedure_name => 'UPDATE_STATUS_BASED_SEC',
2696: p_error_text => SQLCODE);
2697: FND_MSG_PUB.Count_And_Get
2693: fnd_msg_pub.add_exc_msg
2694: (p_pkg_name => 'PA_SECURITY_PVT',
2695: p_procedure_name => 'UPDATE_STATUS_BASED_SEC',
2696: p_error_text => SQLCODE);
2697: FND_MSG_PUB.Count_And_Get
2698: (p_count => x_msg_count ,
2699: p_data => x_msg_data
2700: );
2701: END update_status_based_sec;
2798: );
2799:
2800: EXCEPTION
2801: WHEN OTHERS THEN
2802: fnd_msg_pub.add_exc_msg
2803: (p_pkg_name => G_PKG_NAME,
2804: p_procedure_name =>'get_resp_with_access' );
2805:
2806: x_return_status:= FND_API.G_RET_STS_UNEXP_ERROR;
2807: x_has_access := 'N';
2808: x_resp_key := '';
2809: x_appl_short_name := '';
2810:
2811: FND_MSG_PUB.Count_And_Get
2812: (p_count => x_msg_count ,
2813: p_data => x_msg_data
2814: );
2815: END GET_RESP_WITH_ACCESS;