Search Results validate_grantee_key




Overview

MSC_SECRULE_PKG is a PL/SQL package owned by the APPS schema in Oracle E-Business Suite, with source history traceable to the file MSCXVSPS.pls. It provides the programmatic interface for creating and maintaining security rules within Oracle Advanced Supply Chain Planning and its related planning schemas. Security rules determine which items, customers, suppliers, organizations, and trading partners a given grantee — typically a planner or a responsibility — is permitted to view or transact against during planning runs. The package declares AUTHID CURRENT_USER, meaning its SQL executes with the privileges of the invoking schema rather than the definer, and it defines the constant ORDER_TYPE_ZERO set to 0 as a default order-type discriminator.

The API is the backend for the security rule maintenance form and exposes a symmetric pair of write operations plus a set of validation routines used to resolve and verify user-supplied names before a rule is persisted. It is classified in ETRM as an OTHER API and is not referenced by any other package, confirming it is intended for direct invocation by forms, concurrent programs, or custom integration code rather than as an internal dependency.

Key Procedures and Functions

The package exposes ten documented procedures.

  • INSERT_SEC_RULE — creates a new security rule. Accepts the rule attributes (order type, item, customer, supplier, customer site, supplier site, organization, grantee type and key, start and end dates, privilege, order number, and company name) and returns a return code and error message.
  • EDIT_SEC_RULE — the procedure matching the user search term "edit_sec_rule." It updates an existing security rule identified by p_rule_id, accepting the same attribute set as INSERT_SEC_RULE, with the rule identifier added to target the record to be modified. It returns a status code and error message.
  • VALIDATE_COMPANY_NAME — resolves a company name to its internal company identifier.
  • VALIDATE_ITEM_NAME — verifies an item name within the context of a company.
  • VALIDATE_CUSTOMER_NAME — validates a customer name against a company identifier.
  • VALIDATE_SUPPLIER_NAME — verifies a supplier name and returns its 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 — verifies an organization name and returns its organization identifier.
  • VALIDATE_GRANTEE_KEY — validates the grantee key that identifies the user or group to whom the rule applies.

Tables Accessed

The package reads and writes the core security rule tables. MSC_SECURITY_RULES_S and MSC_X_SECURITY_RULES store the rule definitions and their translated or extracted forms, while MSC_GROUPS supplies grantee group information. Validation logic draws on the planning master data tables MSC_COMPANIES, MSC_COMPANY_RELATIONSHIPS, MSC_COMPANY_SITES, MSC_ITEMS, MSC_ITEM_CUSTOMERS, MSC_ITEM_SUPPLIERS, and MSC_TRADING_PARTNERS. FND_USER is referenced to resolve grantee keys when the grantee type is a user. These tables are accessed through APPS synonyms.

Usage Notes

EDIT_SEC_RULE and INSERT_SEC_RULE are typically invoked by the Security Rules form in Oracle Advanced Supply Chain Planning when a planner saves a rule definition. Custom code should call the procedures with the declared parameter order, supplying the rule identifier for edits and interpreting the OUT return code and error message to detect validation failures. Because the package is AUTHID CURRENT_USER, invocations must occur from a schema with the necessary object privileges on the MSC tables. The validation procedures can be called independently to perform name-to-identifier resolution before committing a rule, which is the recommended pattern for external integrations that must enforce the same validation rules as the standard form.