Search Results ukey_cols




Overview

OE_DEFAULTING_FWK_PUB is a public PL/SQL package in the Oracle Order Management (OE) module of Oracle E-Business Suite. Its principal business function is to generate PL/SQL defaulting handler packages dynamically at runtime, based on metadata stored in the Oracle Application Object Library (AK) and Order Management defaulting setup tables. Rather than shipping a fixed set of compiled handlers, Order Management models defaulting entities, object attributes, and defaulting rules as data, and this package reads that data and emits the corresponding package specification and package body source code. The emitted source is then compiled through the AD_DDL utility.

The package header comment (revision 120.2, dated 2006/09/15) identifies it as a non-shipped internal object. It declares a package-name constant, a global login sequence derived from FND_GLOBAL.login_id, a cached application schema, a concurrent-request mode flag, and a maximum line size constant of 256 characters. It also defines a PL/SQL collection type used to cache generated package body records keyed by entity, package specification, and package body indicators, so that generation work is performed once per run for performance reasons.

Key Procedures and Functions

The documented procedures fall into three groups. The generator entry points are CREATE_ENTITY_DEF_HANDLER, CREATE_OBJ_ATTR_DEF_HANDLER, CREATE_ENTITY_DEF_UTIL_HANDLER, and CREATE_OE_DEF_HDLR. These drive the production of defaulting handler code for entities, object attributes, and utility routines, with CREATE_OE_DEF_HDLR serving as the top-level Order Management defaulting handler generator.

The code-emission helpers are PKG_HEADER, PKG_END, ASSIGN, PARAMETER, TEXT, and COMMENT. These correspond directly to the source fragments visible in the excerpt, which shows internal utilities Put_Line, New_Line, and Init_Applsys_Schema calling ad_ddl.build_package to append generated lines. PKG_HEADER and PKG_END delimit the generated unit, ASSIGN and PARAMETER emit assignment and parameter declarations, and TEXT and COMMENT emit literal text and comment lines respectively.

Supporting internal logic includes Init_Applsys_Schema, which calls FND_INSTALLATION.GET_APP_INFO('FND', ...) to resolve the application schema, and Put_Line, which writes to FND_FILE.LOG only when running under a concurrent request (determined from FND_PROFILE.VALUE('CONC_REQUEST_ID')).

Tables Accessed

The package reads AK_UNIQUE_KEYS and AK_UNIQUE_KEY_COLUMNS — these define unique key columns (the "ukey_cols" concept users search for) that are used to build primary key lookup and defaulting logic in the generated handlers. AK_FOREIGN_KEYS and AK_FOREIGN_KEY_COLUMNS supply relationship metadata; AK_OBJECT_ATTRIBUTES supplies attribute definitions. FND_APPLICATION resolves application identifiers, OE_AK_OBJECTS_EXT and OE_AK_OBJ_ATTR_EXT hold Order Management-specific object and attribute extensions, and OE_DEF_ATTR_CONDNS, OE_DEF_ATTR_DEF_RULES, and OE_DEF_CONDN_ELEMS hold attribute conditions, defaulting rules, and condition elements. AD_DDL performs the actual package build, while PLITBLM, USER_ERRORS, and USER_OBJECTS are used to read the generated source back and verify compilation.

Usage Notes

Because this is a generator rather than a business API, it is normally invoked during Order Management setup or upgrade when defaulting metadata changes, or from concurrent programs that regenerate defaulting handlers. It is not intended for direct call from Oracle Forms or custom application code. Administrators and developers typically trigger it when defaulting rules have been modified and the affected handler packages must be rebuilt and recompiled.