Search Results get_reference




Overview

INV_DEFAULT_TROLIN is an internal Oracle E-Business Suite PL/SQL package body owned by APPS and classified as an "OTHER" API within the Inventory (INV) module. Its purpose is to supply default values for move order transaction line attributes during the creation of move order lines. The package name reflects this role: "INV" denotes the Inventory application, "Default" describes the defaulting behaviour, and "TROLIN" abbreviates "Transaction Request Order Line" (the MTL_TXN_REQUEST_LINES entity). The package body header, $Header: INVDTRLB.pls 120.7.12020000.2 2012/07/09, confirms it was last revised in the 12.1.1 / 12.2.2 release stream. The package operates against a session-level record, g_trolin_rec, typed as INV_Move_Order_PUB.Trolin_Rec_Type, and maintains a package global, g_max_line_num_header_id, used to track the maximum line number per move order header. Most of the documented "Get_" functions return NULL, indicating that they exist primarily as placeholders or hooks for form-level defaulting logic rather than as active business routines.

Key Procedures and Functions

Three routines are formally documented in the ETRM 12.2.2 metadata:

  • GET_LINE_NUMBER — Returns the next line number to be assigned to a move order line. Internally it selects MTL_TXN_REQUEST_LINES_S.NEXTVAL and compares it against the package global g_max_line_num_header_id. Bug fixes 4347016 and 7126566 (referenced in the source comments) changed the initialisation of the local l_max_line_num variable to be conditional, ensuring that line numbers increment correctly across calls.
  • SET_CALLED_BY_FORM — A context-setting routine that records whether the package is being invoked from an Oracle Forms session. This flag allows the package to vary its defaulting behaviour depending on the calling environment.
  • ATTRIBUTES — Handles default attribute population for the move order line record, working in conjunction with the package-level g_trolin_rec structure.

The body also contains additional Get functions (Get_Date_Required, Get_From_Locator, Get_From_Subinventory_Id, Get_From_Subinventory, Get_Inventory_Item, Get_Line, Get_Header). Most currently return NULL; Get_Line returns the sequence value from MTL_TXN_REQUEST_LINES_S.

Tables Accessed

The package reads and writes through APPS synonyms of the following tables:

Usage Notes

INV_DEFAULT_TROLIN is invoked indirectly rather than called directly by end users. The Inventory Move Orders form and the INV_Move_Order_PUB public API call this package when defaulting attributes on a new move order line. The SET_CALLED_BY_FORM flag permits behaviour to differ between form-driven entry and programmatic API calls. It is referenced by one other package within the Inventory schema. Customisations that need to override line-level defaulting should intercept at the form or API layer; direct modification of this seeded package is not supported.