Search Results msc_security_rules_s
Overview
APPS.MSC_SECRULE_PKG is a PL/SQL package body in the Oracle E-Business Suite Advanced Supply Chain Planning (ASCP) schema. It provides the server-side security-rule management API used to create and maintain data security rules that restrict which items, customers, suppliers, trading partners, and organizations a given user or responsibility may see within the planning application. Security rules are central to multi-organization and multi-party planning environments because they govern row-level data visibility across planning workbenches, reports, and inquiries.
The package encapsulates two primary operations: insertion of a new security rule (INSERT_SEC_RULE) and modification of an existing rule (EDIT_SEC_RULE). Supporting validation routines resolve the descriptive names supplied by the caller — item, customer, supplier, customer site, supplier site, organization, company, and grantee key — into the internal surrogate identifiers stored in the security-rule tables. The signature of INSERT_SEC_RULE declares numerous IN parameters (order type, item name, customer name, supplier name, customer site name, supplier site name, org name, grantee type, grantee key, start date, end date, privilege, order number, and company name) together with two OUT NOCOPY parameters: p_return_code and p_err_msg. The user search term "p_err_msg" corresponds directly to this standard error-message output parameter, through which the package communicates failure reasons back to its calling program.
Key Procedures and Functions
The documented API surface comprises ten procedures and functions:
- INSERT_SEC_RULE — Creates a new security rule record after validating and translating all descriptive inputs into internal IDs. It returns
p_return_codeand the diagnostic textp_err_msg. - EDIT_SEC_RULE — Updates an existing security rule, applying the same validation and resolution logic as the insert path.
- VALIDATE_COMPANY_NAME — Resolves and verifies a company name supplied by the caller.
- VALIDATE_ITEM_NAME — Resolves an item name to its internal item identifier.
- VALIDATE_CUSTOMER_NAME — Validates and resolves a customer name to a trading-partner identifier.
- VALIDATE_SUPPLIER_NAME — Validates and resolves a supplier name to a trading-partner identifier.
- VALIDATE_CUSTOMER_SITE_NAME — Resolves a customer site name to its site identifier.
- VALIDATE_SUPPLIER_SITE_NAME — Resolves a supplier site name to its site identifier.
- VALIDATE_ORG_NAME — Resolves an organization name to its organization identifier.
- VALIDATE_GRANTEE_KEY — Validates the grantee key, which may represent a user or a responsibility depending on grantee type.
Internally, INSERT_SEC_RULE declares a cursor c_old_security_rule that queries MSC_X_SECURITY_RULES using NVL-style DECODE comparisons against order type, item, customer, supplier, and site identifiers. This detects duplicate rules before insertion, using local variables such as l_duplicate_rule_id and boolean flags for customer, supplier, customer-item, and supplier-item applicability. The package returns status through l_return_code and a local error buffer (l_err_msg VARCHAR2(1000)) that is propagated to p_err_msg.
Tables Accessed
The package reads and writes the following tables through APPS synonyms:
- MSC_SECURITY_RULES_S — The primary security-rule definition table, holding rule attributes and effective dates.
- MSC_X_SECURITY_RULES — The intersection/detail table linking rules to specific items, customers, suppliers, and sites; queried for duplicate detection and populated on insert.
- MSC_ITEMS, MSC_ITEM_CUSTOMERS, MSC_ITEM_SUPPLIERS — Item definitions and their customer/supplier relationships used during validation.
- MSC_TRADING_PARTNERS, MSC_COMPANIES, MSC_COMPANY_RELATIONSHIPS, MSC_COMPANY_SITES — Customer, supplier, company, and site resolution.
- MSC_GROUPS — Organization/group definitions for org-name validation.
- FND_USER — Validates grantee keys that reference application users.
Usage Notes
MSC_SECRULE_PKG is invoked from the ASCP security-rule maintenance forms and from concurrent or custom programs that programmatically define planning data security. Callers supply descriptive names for business entities and receive surrogate identifiers; they must always inspect p_return_code and display or log p_err_msg when the return code indicates failure. The package is not called by any other documented package, so integration points are limited to forms, concurrent programs, and bespoke extensions. The NOCOPY hint on the OUT parameters indicates the values are written directly by reference for performance, and callers should treat the error buffer as valid only after checking the return code.
-
SEQUENCE: MSC.MSC_SECURITY_RULES_S
12.2.2
owner:MSC, object_type:SEQUENCE, object_name:MSC_SECURITY_RULES_S, status:VALID,
-
SEQUENCE: MSC.MSC_SECURITY_RULES_S
12.1.1
owner:MSC, object_type:SEQUENCE, object_name:MSC_SECURITY_RULES_S, status:VALID,
-
SYNONYM: APPS.MSC_SECURITY_RULES_S
12.2.2
owner:APPS, object_type:SYNONYM, object_name:MSC_SECURITY_RULES_S, status:VALID,
-
SYNONYM: APPS.MSC_SECURITY_RULES_S
12.1.1
owner:APPS, object_type:SYNONYM, object_name:MSC_SECURITY_RULES_S, status:VALID,
-
PACKAGE BODY: APPS.MSC_SECRULE_PKG
12.1.1
owner:APPS, object_type:PACKAGE BODY, object_name:MSC_SECRULE_PKG, status:VALID,
-
PACKAGE BODY: APPS.MSC_SECRULE_PKG
12.2.2
owner:APPS, object_type:PACKAGE BODY, object_name:MSC_SECRULE_PKG, status:VALID,
-
12.1.1 DBA Data
12.1.1
-
12.1.1 DBA Data
12.1.1
-
12.2.2 DBA Data
12.2.2
-
12.2.2 DBA Data
12.2.2
-
12.1.1 DBA Data
12.1.1
-
12.2.2 DBA Data
12.2.2
-
APPS.MSC_SECRULE_PKG dependencies on MSC_SECURITY_RULES_S
12.2.2
-
APPS.MSC_SECRULE_PKG dependencies on MSC_SECURITY_RULES_S
12.1.1
-
12.2.2 DBA Data
12.2.2
-
12.1.1 DBA Data
12.1.1