Search Results check_tfl_memo_flag




Overview

OTA_TFH_API_BUSINESS_RULES2 is a PL/SQL package owned by APPS that encapsulates business-rule validation and maintenance logic for the Oracle Time and Labor (OTL) financial integration layer, specifically the Time and Labor expense/reimbursement "finance lines" structures (the OTA_TFH tables used by the Time Entry and Finance Header/Lines flow). It is declared with AUTHID CURRENT_USER, meaning it executes with the privileges of the invoking schema, and its public interface is deliberately small: two supporting procedures and one query function. The package header carries a legacy revision marker (ottfh03t.pkh), confirming it belongs to the original OTL financial header API family and remains part of the EBS 12.1.1 and 12.2.2 technical stack.

The package exists to keep the header and its dependent finance lines consistent whenever a caller modifies or validates a Time and Labor finance header. Rather than exposing raw DML, it centralises the cross-line rules so that all entry points — forms, the public OTA_TFH API layer, and custom extensions — apply identical logic. The metadata classifies it as API type OTHER, distinguishing it from the primary OTA_TFH_API public packages, and records that it is referenced by three other packages, so it acts as a shared internal rules service rather than a top-level user-facing API.

Key Procedures and Functions

  • CHECK_TFL_MEMO_FLAG — Validates the "memo flag" rule at header level: if the finance header's memo flag is set to 'Y', every associated finance line must also carry a memo flag of 'Y'. The comment block in the source marks the routine as no longer public, indicating it was demoted from the documented public interface while retained for internal callers.
  • UPDATE_FINANCE_LINES — Designed to be called after a post_update operation on the header. It drives the series of subordinate updates that propagate header-level changes down to the corresponding finance lines, keeping the lines synchronised with the amended header. It takes the shared record type defined in ota_tfh_api_shd.g_rec_type, so its input contract is the standard Time and Labor API record structure.
  • INVOICE_FULL_AMOUNT — A function returning VARCHAR2 that evaluates the finance header identified by finance_header_id against a currency code, and returns the full invoiceable amount for that header. The relevant query is executed against OTA_FINANCE_LINES (aggregated by currency), allowing callers to determine the complete amount to be invoiced. The pragma RESTRICT_REFERENCES with WNPS, WNDS asserts that the function writes no package state and reads no database state, a declaration intended to permit its use from SQL (for example, in an expression embedded in a form or a SQL statement) rather than purely from PL/SQL. Because this routine is a pure query, it is safe to invoke repeatedly without side effects — a property that matters for interactive Time and Labor entry screens that must recompute invoice totals as the user changes lines.

Tables Accessed

The documented data access is through the APPS synonym OTA_FINANCE_LINES, the child table storing individual finance lines for a Time and Labor finance header. The principal relevant use is in INVOICE_FULL_AMOUNT, which sums or otherwise resolves the full invoice amount for a header across its lines, filtered by currency code. UPDATE_FINANCE_LINES also logically targets this table, applying the header-driven changes to line records. The parent header structure is supplied to the routines by identifier parameter rather than being read directly in the documented interface.

Usage Notes

The package is invoked indirectly rather than directly by end users. Typical call paths are the Oracle Time and Labor entry forms and the public OTA_TFH API packages, which call UPDATE_FINANCE_LINES after a header post_update, and the three dependent packages recorded in the metadata, which use the memo-flag validation and invoice-amount lookup. Custom code that already manipulates Time and Labor finance headers should reuse these routines rather than performing direct DML, so that the memo-flag rule and header-to-line synchronisation remain enforced. Because INVOICE_FULL_AMOUNT is declared with RESTRICT_REFERENCES and a WNDS promise, custom SQL and form triggers can safely call it to display or compare the full invoiced amount for a given header and currency.