Search Results populate_control_fields




Overview

OE_OE_FORM_LINE is an Oracle E-Business Suite PL/SQL package in the APPS schema that supports the Order Management (ONT) module, specifically the Order Organizer and Sales Order entry forms. It is defined with AUTHID CURRENT_USER and is classified under the ETRM metadata as an OTHER API, distinct from a fully public interface. Its primary business role is to encapsulate the form-driven logic that edits, validates, and persists sales order lines and their associated attributes without requiring the form layer to embed this logic directly. The package header declares two PL/SQL index-by tables (Number_Tbl_Type and Varchar2_Tbl_Type) used for bulk attribute manipulation, and a Validate_Write_Rec_Type record that aggregates a large set of line-level fields written back during a validation cycle. These fields span scheduling (ship and arrival dates, status and action codes), shipping (ship-from address and organization, subinventory), pricing (unit list and selling price, list and selling percent, pricing quantity and UOM, price list), financials (goods value, discounts, charges, taxes, line tax value), and control columns (creation and update audit columns, lock control). The package is referenced by seven other ONT packages, confirming its role as a shared utility in the sales order line maintenance stack. A profile-driven flag G_ENABLE_VISIBILITY_MSG, derived from the ONT_ENABLE_MSG profile option, governs whether line visibility messages are surfaced.

Key Procedures and Functions

The ETRM metadata documents twenty procedures and functions. VALIDATE_AND_WRITE is the central routine: it validates a line and writes the populated Validate_Write_Rec_Type record, handling scheduling, pricing, shipping, and audit values in a single call. Attribute maintenance is handled by DEFAULT_ATTRIBUTES, which applies defaulting rules to line attributes, and CHANGE_ATTRIBUTE, which modifies a single attribute value. POPULATE_CONTROL_FIELDS and CLEAR_RECORD initialize and reset the working record structure. Matching and lookup logic is provided by IS_ITEM_MATCHED, IS_INTERNAL_ITEM_MATCHED, and IS_DESCRIPTION_MATCHED, which determine whether an entered line corresponds to an existing item, an internal item, or a description-only line. Record retrieval is handled by GET_LINE, GET_LINE_SHIPMENT_NUMBER, and GET_ORDERED_ITEM. Customer context resolution is provided by SHIP_TO_CUSTOMER_ID and INVOICE_TO_CUSTOMER_ID, which derive the appropriate customer identifiers for the line. Row-level operations include DELETE_ROW, LOCK_ROW, and PROCESS_ENTITY. SPLIT_LINE creates line splits, while DELETE_ADJUSTMENTS removes line adjustment records and RESET_CALCULATE_LINE_TOTAL reinitializes line total calculation so pricing is recomputed.

Tables Accessed

The package reads and writes through APPS synonyms. Customer and party data are resolved through HZ_CUST_ACCOUNTS, HZ_CUST_ACCT_SITES, HZ_CUST_ACCT_SITES_ALL, HZ_CUST_SITE_USES_ALL, HZ_LOCATIONS, HZ_PARTIES, and HZ_PARTY_SITES, supporting ship-to and invoice-to resolution for a line. Item validation and cross-reference logic uses MTL_SYSTEM_ITEMS_TL, MTL_CUSTOMER_ITEMS, MTL_CUSTOMER_ITEM_XREFS, MTL_CROSS_REFERENCES, and MTL_CROSS_REFERENCE_TYPES, which underpin the item-matching functions. Organization and warehouse context is supplied by MTL_PARAMETERS. Lookup code validation and description retrieval uses FND_LOOKUP_VALUES. Agreement and pricing-related context is drawn from OE_AGREEMENTS. These accesses concentrate on resolving the customer, item, and organization identities that a sales order line requires before it can be validated and persisted.

Usage Notes

OE_OE_FORM_LINE is designed for the Order Management form layer rather than for direct external invocation. Its use of AUTHID CURRENT_USER and its designation as a non-public API indicate that it is intended to be called by Oracle's own ONT forms and by the seven dependent ONT packages that share its logic. Because the package manipulates form-level record structures and session state, direct calls from custom code risk bypassing validation sequencing and are not advisable. Customizations that need equivalent behavior should invoke the supported public ONT APIs instead. When troubleshooting line defaulting, item matching, ship-to and invoice-to resolution, or line total recalculation in Oracle EBS 12.1.1 and 12.2.2, this package is the appropriate object to trace, and it is frequently encountered in dependent-package call stacks during form debugging.