Search Results add_lines_from_installbase
Overview
ASO_TRADEIN_PVT is a private PL/SQL API within the Oracle E-Business Suite Order-to-Cash (ASO) module. Its business purpose is to validate and process trade-in (buyback or exchange) lines on a quote. When a customer returns an existing item — typically a previously purchased product identified through the Oracle Install Base — and receives credit toward a new purchase, the quote line must be validated against item attributes and install base relationships before it can flow into an order. ASO_TRADEIN_PVT encapsulates that validation logic and the mechanics of populating trade-in lines from the install base.
The package is classified as a Private API (PVT), meaning it is not a published integration interface. It is invoked internally by other ASO packages. The ETRM metadata confirms that ASO_TRADEIN_PVT is referenced by three other packages, consistent with its role as an internal helper rather than a public entry point. The package header revision identifies the source file as asovtrdb.pls, with performance fixes applied as early as 2002, reflecting long-standing use across releases including 12.1.1 and 12.2.2.
Key Procedures and Functions
The ETRM metadata documents five procedures and functions:
- VALIDATE_LINE_TRADEIN — Validates a trade-in quote line. Its documented body logic reads item attributes from MTL_SYSTEM_ITEMS_B (returnable flag, customer order enabled flag, serviceable product flag), inspects the quote line's category and item type, checks for an associated service relationship in ASO_LINE_RELATIONSHIPS, and validates the order and line type against OE_WF_LINE_ASSIGN_V. It returns the standard API status and message pattern via x_return_status, x_msg_count, and x_msg_data.
- ORDERTYPE — Derives or validates the order type associated with the trade-in quote context.
- LINETYPE — Derives or validates the order line type used for the trade-in line.
- ADD_LINES_FROM_INSTALLBASE — Populates trade-in quote lines from Oracle Install Base records. This procedure reads CSI_ITEM_INSTANCES and related CSI relationship tables to identify returnable installed items and create corresponding quote lines.
- VALIDATE_IB_RETURN_QTY — Validates the return quantity for an install base item on a trade-in line. This procedure corresponds directly to the search term "validate_ib_return_qty" and ensures the quantity being returned does not exceed what the install base record supports.
Tables Accessed
The package reads and writes the following tables through APPS synonyms:
- ASO_QUOTE_HEADERS_ALL, ASO_QUOTE_LINES_ALL, ASO_QUOTE_LINE_DETAILS — The quote header, line, and line detail entities that define the trade-in transaction being validated.
- ASO_LINE_RELATIONSHIPS — Used to confirm whether a service relationship exists for a quote line, supporting serviceable-product validation.
- MTL_SYSTEM_ITEMS_B — Provides item attributes such as returnable_flag, customer_order_enabled_flag, and serviceable_product_flag required for trade-in eligibility checks.
- CSI_ITEM_INSTANCES, CSI_II_RELATIONSHIPS — Oracle Install Base instance and relationship data that source the install-based trade-in lines and their return quantities.
- OE_ORDER_LINES_ALL — Order line data used when validating or creating the resulting order line context.
- PLITBLM — The standard EBS temporary/PL-SQL table used for bulk processing and message handling within such private APIs.
Usage Notes
ASO_TRADEIN_PVT is a private package and should not be called directly from custom code as a supported interface. It is invoked by the standard Oracle Quoting and Order Management flows during quote entry and order creation whenever a trade-in line is present. Validation procedures such as VALIDATE_LINE_TRADEIN and VALIDATE_IB_RETURN_QTY execute as part of the pre-submit validation sequence, while ADD_LINES_FROM_INSTALLBASE runs when the user selects installed items to trade in. Because message handling follows the standard x_return_status / x_msg_count / x_msg_data convention, any diagnostic output should be retrieved through the standard message stack. Customers requiring extensions should reference the published ASO_QUOTE_PUB APIs rather than this private body, as its signature and internal behavior may change between patch levels.
-
PACKAGE BODY: APPS.ASO_TRADEIN_PVT
12.1.1
-
PACKAGE BODY: APPS.ASO_TRADEIN_PVT
12.2.2
-
APPS.ASO_TRADEIN_PVT SQL Statements
12.2.2
-
APPS.ASO_TRADEIN_PVT SQL Statements
12.1.1
-
PACKAGE: APPS.ASO_TRADEIN_PVT
12.1.1
-
PACKAGE: APPS.ASO_TRADEIN_PVT
12.2.2
-
APPS.ASO_TRADEIN_PVT dependencies on ASO_DEBUG_PUB
12.2.2
-
APPS.ASO_TRADEIN_PVT dependencies on ASO_DEBUG_PUB
12.1.1
-
APPS.ASO_TRADEIN_PVT dependencies on OE_PROFILE
12.1.1
-
APPS.ASO_TRADEIN_PVT dependencies on FND_API
12.2.2
-
APPS.ASO_TRADEIN_PVT dependencies on OE_PROFILE
12.2.2
-
APPS.ASO_TRADEIN_PVT dependencies on FND_API
12.1.1
-
APPS.ASO_TRADEIN_PVT dependencies on FND_API
12.2.2
-
APPS.ASO_TRADEIN_PVT dependencies on FND_API
12.1.1
-
APPS.ASO_TRADEIN_PVT dependencies on ASO_QUOTE_PUB
12.1.1
-
APPS.ASO_TRADEIN_PVT dependencies on ASO_QUOTE_PUB
12.2.2
-
APPS.ASO_TRADEIN_PVT dependencies on FND_MSG_PUB
12.2.2
-
APPS.ASO_TRADEIN_PVT dependencies on FND_MSG_PUB
12.1.1