Search Results copy_lines_to_new_header
Overview
APPS.OTA_TFL_API_BUSINESS_RULES2 is a PL/SQL package within the Oracle E-Business Suite OTA (Oracle Training Administration / Learning Management) module, classified in the ETRM repository as an API of type OTHER. It encapsulates the core business rules governing how financial data for training and learning activities is calculated and maintained. Its principal responsibility is to derive the AMOUNTS values — standard_amount, money_amount, and unitary_amount — that appear on finance lines, applying the rules associated with the finance line type and the booking deal type. In addition, the package supports housekeeping operations on the finance sub-ledger, such as copying finance lines between headers and managing cancellation flags. The package is declared with AUTHID CURRENT_USER, meaning its unqualified references to schema objects resolve against the privileges of the invoking session rather than the package owner.
Key Procedures and Functions
- SET_ALL_AMOUNTS — The most prominent documented routine and the target of the "set_all_amounts" search. It sets the standard_amount, money_amount, and unitary_amount values on a finance line, determining each amount from the finance line type and the booking deal type. It receives contextual identifiers such as the activity version, event, booking, booking deal, resource allocation, resource booking, currency code, price basis, and number of places, and returns the three amounts to the caller.
- COPY_LINES_TO_NEW_HEADER — Copies finance lines from one finance header to another. Only lines whose cancelled_flag equals 'N' are copied, so cancelled lines are excluded from the transfer.
- SET_CANCEL_FLAG_FOR_HEADER — Sets the cancellation flag at the finance header level, marking the associated finance lines as cancelled.
- CANCEL_FINANCE_LINE — Cancels an individual finance line.
- RECANCEL_FINANCE_LINE — Re-applies cancellation to a finance line, supporting scenarios in which a previously cancelled line must be cancelled again after reversal or correction.
- CHANGE_LINE_FOR_HEADER — Supports modification of finance lines associated with a header.
The ETRM metadata records seven documented procedures or functions in total for this package.
Tables Accessed
The package reads and writes the principal tables of the OTA finance and pricing model, accessed through APPS synonyms:
- OTA_FINANCE_HEADERS and OTA_FINANCE_LINES — the core finance sub-ledger records that the copy, cancellation, and amount-setting routines operate upon.
- OTA_BOOKING_DEALS — supplies the booking deal type that drives amount derivation in SET_ALL_AMOUNTS.
- OTA_EVENTS, OTA_RESOURCE_ALLOCATIONS, and OTA_RESOURCE_BOOKINGS — provide the event and resource context passed to SET_ALL_AMOUNTS.
- OTA_PRICE_LISTS and OTA_PRICE_LIST_ENTRIES — pricing sources consulted when resolving amounts and price basis.
- OTA_VENDOR_SUPPLIES, OTA_ACT_CAT_INCLUSIONS, and OTA_DELEGATE_BOOKINGS — supporting tables for supplier, activity category inclusion, and delegate booking information.
- FND_CURRENCIES — the currency repository used to validate and interpret the currency code passed into the amount calculation.
Usage Notes
OTA_TFL_API_BUSINESS_RULES2 is an internal OTA business-rule layer rather than an end-user-facing interface. It is typically invoked by OTA forms and concurrent programs when finance lines are created or updated, and by other OTA packages — the ETRM repository reports that six other packages reference it. Custom extensions that must produce OTA finance lines consistent with standard behaviour should call the public procedures directly rather than manipulating OTA_FINANCE_LINES through ad hoc DML. Because SET_ALL_AMOUNTS relies on the finance line type, booking deal type, price list, and currency inputs, callers must supply accurate context values; incomplete parameters will yield incorrect amounts. The package is documented for both Oracle EBS 12.1.1 and 12.2.2, and its header date confirms it has been stable since 2002.
-
PACKAGE: APPS.OTA_TFL_API_BUSINESS_RULES2
12.2.2
-
PACKAGE: APPS.OTA_TFL_API_BUSINESS_RULES2
12.1.1
-
PACKAGE: APPS.OTA_TFH_API_BUSINESS_RULES
12.2.2
-
PACKAGE: APPS.OTA_TFH_API_BUSINESS_RULES
12.1.1
-
PACKAGE BODY: APPS.OTA_TFL_API_BUSINESS_RULES2
12.2.2
-
PACKAGE BODY: APPS.OTA_TFL_API_BUSINESS_RULES2
12.1.1
-
PACKAGE BODY: APPS.OTA_TFH_API_BUSINESS_RULES
12.2.2
-
APPS.OTA_TFH_API_BUSINESS_RULES dependencies on OTA_TFL_API_BUSINESS_RULES2
12.2.2
-
PACKAGE BODY: APPS.OTA_TFH_API_BUSINESS_RULES
12.1.1
-
APPS.OTA_TFH_API_BUSINESS_RULES dependencies on OTA_TFL_API_BUSINESS_RULES2
12.1.1
-
APPS.OTA_TFL_API_BUSINESS_RULES2 dependencies on OTA_FINANCE_LINES
12.1.1
-
APPS.OTA_TFL_API_BUSINESS_RULES2 dependencies on OTA_FINANCE_LINES
12.2.2
-
APPS.OTA_TFL_API_BUSINESS_RULES2 dependencies on HR_UTILITY
12.2.2
-
APPS.OTA_TFL_API_BUSINESS_RULES2 dependencies on HR_UTILITY
12.1.1