Search Results ota_tfl_api_business_rules2




Overview

APPS.OTA_TFL_API_BUSINESS_RULES2 is a PL/SQL package body in the Oracle E-Business Suite Training and Event Management (OTM) module. Within Oracle EBS 12.1.1 and 12.2.2, it forms part of the "TFL" (Training Finance Lines) application programming interface, a family of packages that governs the financial processing of training and event bookings. The package encapsulates the business rules that determine how amounts are calculated, updated, cancelled, and copied across finance records.

Its central role is to serve as a shared rules engine called by lower-level DML packages such as OTA_TFL_API_INS and OTA_TFL_API_UPD. Rather than embedding calculations in individual insert or update routines, Oracle centralizes the logic in OTA_TFL_API_BUSINESS_RULES2 so that pricing, finance header/line maintenance, cancellations, and header duplication follow consistent rules. The package is documented as valid against the APPS schema and is referenced by six other database objects, confirming it is an invoked dependency rather than an entry point.

Key Procedures and Functions

The ETRM metadata documents seven procedures and functions in this package body:

  • SET_ALL_AMOUNTS — Derives and applies monetary amounts on finance records, typically recalculating totals from price lists, price list entries, and associated booking details.
  • COPY_LINES_TO_NEW_HEADER — Duplicates existing finance lines onto a newly created finance header, supporting rebooking, transfers, and header restructuring.
  • SET_CANCEL_FLAG_FOR_HEADER — Sets the cancellation indicator at the finance header level, cascading rule outcomes to the associated lines.
  • CANCEL_FINANCE_LINE — Applies the cancellation logic to an individual finance line, updating its status flag and related amounts.
  • RECANCEL_FINANCE_LINE — Handles reactivation or re-cancellation of a finance line, reversing or reapplying a prior cancellation state.
  • CHANGE_LINE_FOR_HEADER — Adjusts a finance line in the context of its parent header, commonly when the header attributes change.

The package relies on HR_API, HR_UTILITY, FND_MESSAGE, and FND_CURRENCIES for currency handling, validation, and error messaging, and calls OTA_TFL_API_INS and OTA_TFL_API_UPD for persistence.

Tables Accessed

The package reads and writes the core finance and event structures of OTM:

Usage Notes

OTA_TFL_API_BUSINESS_RULES2 is not intended to be called directly from end-user forms. It is invoked by the TFL insert and update APIs, which in turn are called from OTM booking and finance forms, concurrent programs that process finance lines, and custom extensions. Because it is referenced by six other packages, changes to its logic affect the entire TFL processing chain. Developers extending OTM finance behavior should treat this package as the authoritative location for amount and cancellation rules, and should not bypass it when inserting or updating finance headers and lines.