Search Results key_flex




Overview

The APPS.MRP_Value_To_Id package body is a utility package belonging to Oracle's Material Requirements Planning (MRP) module. Its principal business function is to provide value-to-identifier conversion routines for the key descriptive attributes used during planning data operations. In the Oracle E-Business Suite architecture, many public APIs accept descriptive flexfield or key flexfield values rather than internal surrogate identifiers. This package bridges that gap by offering a standardized set of conversion functions that translate user-facing attribute values—such as flexfield combinations, inventory items, organizations, projects, and tasks—into the numeric identifiers required by the underlying planning tables.

The package originates from the MRPSVIDB.pls source file and carries a header revision of 115.1. The naming convention and the header comments referencing the "generator" indicate that this package is autogenerated as part of the ETRM (E-Business Suite Tables and Relationships Model) tooling, which produces conversion functions to avoid overriding or duplicating existing logic. The Get_Attr_Tbl procedure is explicitly flagged "DO NOT REMOVE" because the generator depends on it to register attributes before appending new conversion functions.

Key Procedures and Functions

The package exposes ten documented procedures and functions:

  • GET_ATTR_TBL — Populates the global attribute table FND_API.g_attr_tbl with the names of the attributes for which conversion functions exist. This routine is used by the generator to avoid overriding or duplicating existing conversion functions.
  • KEY_FLEX — Converts a key flexfield combination, described by its key flexfield code, structure number, application short name, and segment values, into a combination identifier.
  • COMPLETION_LOCATOR — Returns the identifier corresponding to a completion locator value.
  • LINE — Returns the identifier associated with a planning or production line.
  • ORGANIZATION — Returns the identifier for an inventory organization.
  • PRIMARY_ITEM — Returns the identifier for a primary inventory item.
  • PROJECT — Returns the identifier for a project.
  • SCHEDULE_GROUP — Returns the identifier for a schedule group.
  • TASK — Returns the identifier for a project task.
  • WIP_ENTITY — Returns the identifier for a work in process entity.

The KEY_FLEX function is the most significant with respect to the user's search term. It first normalizes missing segment values by converting FND_API.G_MISS_CHAR placeholders to NULL, then invokes FND_FLEX_EXT.get_combination_id, passing the application short name, key flexfield code, structure number, and the prepared segment array to resolve the combination identifier.

Tables Accessed

The documented table reference for this package is PLITBLM, accessed through an APPS synonym. The PLITBLM table stores material planning information, including item-level planning attributes associated with an organization. The conversion routines in this package read from this table to resolve descriptive attribute values into their internal identifiers. The KEY_FLEX function additionally depends on the FND flexfield extension routines, which resolve combinations against the flexfield combination tables rather than against PLITBLM directly.

Usage Notes

This package is typically invoked indirectly. Public APIs in the MRP and related modules call the value-to-id conversion functions when processing inbound records that supply descriptive values instead of identifiers. It may also be called from Oracle Forms-based planner workbenches, from concurrent programs that load or transform planning data, and from custom PL/SQL code that needs to resolve a flexfield combination or an attribute such as organization, project, or WIP entity into its numeric identifier.

Because the package is autogenerated, customizations should not be applied directly to the generated conversion sections; such changes are liable to be lost when the generator reruns. The package is referenced by two other packages within the ETRM model, and callers should be aware that the KEY_FLEX routine expects a properly formed segment array and a valid application short name, structure number, and flexfield code; invalid combinations result in a failed combination lookup.