Search Results update_finance_lines
Overview
APPS.OTA_TFH_API_BUSINESS_RULES2 is a server-side PL/SQL package body within the Oracle E-Business Suite OTA (Oracle Training Administration / OTA Financials) module. The package encapsulates business-rule logic that governs the treatment of finance headers and their associated finance lines, particularly with respect to transfer status and invoice amounts. It belongs to the OTA Training Financials API family, which provides the underlying data-manipulation and validation routines invoked when training-related financial records are created, modified, or processed through the ETRM (Enterprise Training and Resource Management) subsystem.
The package carries a legacy header signature ("ottfh03t.pkb") indicating that it originated in an earlier release and has been retained in the 12.1.1 and 12.2.2 code lines. It works alongside the companion package OTA_TFL_API_BUSINESS_RULES2, which handles the line-level equivalent logic, and it depends on shared record structures and global variables defined in OTA_TFH_API_SHD.
Key Procedures and Functions
- UPDATE_FINANCE_LINES — The procedure most relevant to the search term. It receives a finance header record and detects whether the header's
transfer_statushas changed by comparing the current value againstg_old_rec.transfer_status. When a change is detected, it callsOTA_TFL_API_BUSINESS_RULES2.CHANGE_LINE_FOR_HEADER, passing the finance_header_id, the new transfer status, and the prior transfer status. In effect, it cascades the header-level transfer status change down to every associated finance line, keeping the line records synchronized with the header. Instrumented throughHR_UTILITY.SET_LOCATIONfor debug tracing. - CHECK_TFL_MEMO_FLAG — A validation routine that examines the memo flag on the related training finance lines. It is used to determine whether a line qualifies as a memo (non-invoiced) record, which affects downstream invoice generation and amount processing.
- INVOICE_FULL_AMOUNT — A function that returns the full amount of an invoice for a given finance header. It sums the
money_amountcolumn fromOTA_FINANCE_LINESfor the specified header, excluding any lines wherecancelled_flag = 'N'does not hold, usingNVLto return zero when no qualifying lines exist. Both finance_header_id and currency_code are accepted as inputs.
Tables Accessed
The sole documented table referenced through APPS synonyms is OTA_FINANCE_LINES, the transactional table holding individual training finance line records. It is read (and indirectly updated via the companion line-level package) to support sum-based amount calculations and to drive transfer-status propagation. The header information itself resides in the OTA finance header table, and global record state is communicated through OTA_TFH_API_SHD.
Usage Notes
This package is an API-layer body and is not intended for direct end-user invocation. It is normally called from OTA forms, concurrent programs, or other PL/SQL APIs when a finance header's transfer status is modified. Because UPDATE_FINANCE_LINES responds to detected value changes on the header record, callers must populate the g_old_rec structure in OTA_TFH_API_SHD before calling; otherwise the change detection will be unreliable. The package is referenced by at least three other packages, confirming its role as a shared business-rule utility. When troubleshooting transfer-status mismatches between headers and lines, this package and its sibling OTA_TFL_API_BUSINESS_RULES2 are the first points of investigation in 12.1.1 and 12.2.2.
-
APPS.OTA_TFH_API_BUSINESS_RULES2 SQL Statements
12.1.1
-
APPS.OTA_TFH_API_BUSINESS_RULES2 SQL Statements
12.2.2
-
PACKAGE BODY: APPS.OTA_TFH_API_BUSINESS_RULES2
12.2.2
-
PACKAGE BODY: APPS.OTA_TFH_API_BUSINESS_RULES2
12.1.1
-
PACKAGE: APPS.OTA_TFH_API_BUSINESS_RULES2
12.2.2
-
PACKAGE: APPS.OTA_TFH_API_BUSINESS_RULES2
12.1.1
-
APPS.OTA_TFH_API_UPD SQL Statements
12.1.1
-
APPS.OTA_TFH_API_UPD SQL Statements
12.2.2
-
APPS.OTA_TFH_API_BUSINESS_RULES2 dependencies on OTA_TFH_API_SHD
12.2.2
-
APPS.OTA_TFH_API_UPD dependencies on OTA_TFH_API_BUSINESS_RULES2
12.2.2
-
APPS.OTA_TFH_API_BUSINESS_RULES2 dependencies on OTA_TFH_API_SHD
12.1.1
-
APPS.OTA_TFH_API_UPD dependencies on OTA_TFH_API_BUSINESS_RULES2
12.1.1
-
APPS.OTA_TFH_API_BUSINESS_RULES2 dependencies on OTA_TFH_API_SHD
12.1.1
-
APPS.OTA_TFH_API_BUSINESS_RULES2 dependencies on OTA_TFH_API_SHD
12.2.2
-
APPS.OTA_TFH_API_UPD dependencies on OTA_TFH_API_BUS
12.1.1
-
APPS.OTA_TFH_API_UPD dependencies on OTA_TFH_API_BUS
12.2.2
-
APPS.OTA_TFH_API_BUSINESS_RULES2 dependencies on OTA_GENERAL
12.2.2
-
APPS.OTA_TFH_API_BUSINESS_RULES2 dependencies on HR_UTILITY
12.1.1
-
APPS.OTA_TFH_API_BUSINESS_RULES2 dependencies on OTA_GENERAL
12.1.1
-
APPS.OTA_TFH_API_BUSINESS_RULES2 dependencies on HR_UTILITY
12.2.2
-
PACKAGE BODY: APPS.OTA_TFH_API_UPD
12.2.2
-
PACKAGE BODY: APPS.OTA_TFH_API_UPD
12.1.1